| |||||||||
| |||||||||
MASM uses DOS functions 02 and 06 to display a single character. DOS function 09 is used for the display of strings of characters. DOS Functions 02 and 06Both functions are identical, except that function 02 can be interrupted by a control break (Ctrl-Break), while function 06 cannot. The ASCII code of the character to be displayed has to be stored in register DL. To display a single ASCII character at the current cursor position, use the following sequence of instructions:
The Character code may be the ASCII code of the character taken from the ASCII table, or the character itself written between quotes. The following code displays number 2 on the screen using its ASCII code:
The following code also displays number 2 on the screen:
|