HTBasic Help
×
Menu
Index

Write to Display

 
int kbdcrt_dispstr( int col, int line, char *buf, int len, int clr );
 
Where:
 col  - alpha character column number
 line - alpha character row number
 buf  - string pointer
 len  - string length
 clr  - color value or enhancement attributes buffer flag
         0-255 = text color value (See description)
            -1 = buf is a two byte string, first byte character,
                 second byte color and enhancement attributes
                 0x00FF - color value (See description)
                 0x0100 - inverse video attribute bit
                 0x0200 - blink attribute bit
                 0x0400 - underline attribute bit
 
Description
This routine writes a string directly to the display at the specified text location in either the requested color or the specified attributes. Because this routine bypasses the normal Output Area buffer routines, characters cannot be read back with the kbdcrt_crtreadstr routine and can not be scrolled back onto the screen with the kbdcrt_scrolldn and kbdcrt_scrollup routines. Use the kbdcrt_printstr routine to enter characters into the extended Output Area buffer.
 
The values of col and line are the same as specified by PRINT TABXY(col,line). If the color value is -1 then the string contains the character to display in the first byte and the enhancement and color attributes in the second byte.
 
The return value is either a zero for no errors or an HTBasic error code.
 
Example
int error;
error = kbdcrt_dispstr( 10, 10, "This is a test", 14, 1 );
See Also
kbdcrt_printstr