NOTE: All coordinates used by the CRT are 0-based. So, an 80 character wide screen has columns 0-79. Do not assume there are 80 columns. The display could have less or more when in a VESA or other text mode. The same goes for the number of Rows. When DEBUG is defined, trying to set or use an invalid coordinates will cause the program to terminate with error messages.
WARNING: All macros that are part of CRT require DS to be the program Data Segment. For flat binary (COM files), this means DS must equal CS when using these macros.
Standard display functions:
TextMode | Change the video mode. |
ResetMode | Restore video mode. |
RequireTextMode | Terminate with error if in a graphics mode. |
GetTextMode | Return current video mode. |
TextAttr | Set text color foreground and background attributes. |
TextColor | Set text foreground color. |
TextBackground | Set text background color. |
GetTextAttr | Return current text color and background attributes. |
ClrEol | Clear the current line from the cursor postion. |
ClrScr | Clear the current window. |
Window | Set the text display area bounds. |
GotoXY | Move cursor to specified or relative window location. |
GetWhereXY | Return CRT cursor position within window. |
GetLimitXY | Return maximum XY position within window. |
GetWindMin | Return upper left window coordinates. |
GetWindMax | Return lower right window coordinates. |
WindowSize | Return the bytes required to save the window. |
WindowSave | Save the contents of the window to memory. |
WindowLoad | Load the contents of memory to a window. |
InsChar | Insert a black space at the cursor postion. |
DelChar | Delete the character at the cursor position. |
InsColumn | Insert a column at the cursor position. |
DelColumn | Delete the column at the cursor position. |
InsLine | Insert a line at the cursor position. |
DelLine | Delete the line at the cursor position. |
Scroll | Scroll the window a specified direction. |
CursorHide | Hide the cursor. |
CursorShow | Unhide the cursor. |
CursorNormal | Set cursor shape to the same shape as at startup. |
CursorSmall | Set cursor shape to a single line. |
CursorHalf | Set cursur shape to half the font height. |
CursorFull | Set cursor shape to full height of the font. |
CursorVisible | Test if cursor is not hidden. |
CursorInvisible | Test if cursor is hidden. |
Delay | Pause execution for specified time. |
Sound | Set PC SPeaker to specified frequency. |
NoSound | Turn off PC speaker. |
Display functions for stuff that is generally handled automatically:
CursorUpdate | Synchronize the visible cursor location with the CRT. |
CursorAdjust | Synchronize the CRT with the visible cursor location. |
Functions that are mostly for internal usage. Most do not process ASCII control codes or move the cursor to a new position when finished:
CRT_GetCharAttr | Return character and attribute at cursor position. |
CRT_PutCharAttr | Put a character using an attribute at cursor position. |
CRT_PutChar | Put a character using TEXTATTR at cursor position. |
CRT_PutString | Put a string using TEXTATTR at cursor position. |
CRT_WriteChar | Write a character using TEXTATTR at cursor position. |
CRT_WriteString | Write a string using TEXTATTR at cursor position. |