INT 10H 1302H: Display Character/Attribute Cells
Compatibility: AT EGA VGA
Expects: AX 1302H
BH video page
CX number of characters to display (see below)
DH,DL row,column to start writing
ES:BP address of start of char/attr string to write
Info: This displays a specially-formatted string, letting you specify a
video attribute for each character.
ES:BP This must point to an array of character/attribute pairs. For
DB 'H',07H, 'e',07H, 'l',07H, 'l',07H, 'o',07H, '!',0fH
Would display Hello! (actually, the "Hello" would be in white
characters on a black background (video attribute 07H), and "!"
would be in bright white on a black background (attribute 0fH).
Warning! This function treats these characters specially:
CR (0dH) ÄÄÄ cursor to start of same line
LF (0aH) ÄÄÄ cursor to current clm on next lower line
BEL (07H) ÄÄÄ beep the speaker
When it encounters one of these characters, it takes the listed
control action, and then treats the next byte as a character-not
the attribute for the (undisplayed) control action.
CX specifies the number of characters in the string (it will
typically be half the length of the char/attr array).
Notes: ž This fn requires that you modify BP. When calling from high-
level languages such as C, be very to save and restore BP,
since it is used to keep track of the "stack frame".
ž Be careful about the odd handling of CR, LF, and BEL. After
"displaying" any of these characters, the char/attr pairs are
out of sync. Thus, this is not useful as a generic tool for
restoring screen data that has been copied directly from video
memory (see Video Memory Layouts).
See Also: INT 10H 1300H (write string)
INT 10H 1301H (write string & update cursor)
INT 10H 1303H (write char/attr cells and update cursor)
INT 10H: Video Services