Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 3

PrintString

Function number: 27

Prints a text string on the graphics screen starting at the current cursor position using the current text color.

Register entry values

AX = EE1B
BX = Action when printing string
  0 = Don't advance to the next line after printing the string
  1 = Advance to the next line after printing the string
CX = Length of string
DS = Segment address of string
DX = Offset address of string

Register exit values

None

Example

MOV     AX,0EE1BH       ;Print text string function
MOV BX,1 ;Use an ending carriage return/line feed
MOV CX,10 ;Length of string
MOV DX,SEG String ;Segment address of string
MOV DS,DX ; ..
MOV DX,OFFSET String;Offset address of string
INT 10H ;Call GRAFIX

Comments

Using the 'SetColor' function you can use any of the 16 colors to print the string with. Using the 'SetCursor' function you control the starting row and column location the string will be printed at.