Article ID: 35148 - Last Review: November 21, 2006 - Revision: 1.2 Underline, Reverse, Intense, Blinking in Monochrome SCREEN 0This article was previously published under Q35148 SUMMARY
On the Hercules Graphics Adapter (HGA) or the IBM Monochrome Display
Adapter (MDA), the foreground and background arguments of the COLOR
statement support underlined, reverse-video (highlighted), blinking,
or high-intensity characters. Reverse/underline and intense/reverse
combinations are not supported by HGA or MDA.
MORE INFORMATION
The following 11 combinations of COLOR statement foreground and
background values are available on monochrome, SCREEN 0 (text)
displays:
FORMAT COLOR Statement ATTRIBUTE White on black (normal) COLOR 7,0 7 Black on black (no display) COLOR 0,0 0 Black on white (reverse) COLOR 0,7 112 Underline COLOR 1,0 1 Intense COLOR 10,0 10 Blinking COLOR 18,0 130 Reverse blinking COLOR 16,7 240 Intense underline COLOR 9,0 9 Intense blinking COLOR 26,0 138 Underline blinking COLOR 17,0 129 Intense blinking underline COLOR 25,0 137
In text mode (SCREEN 0), two consecutive bytes are used to store each character in screen memory. One byte contains the ASCII value of a character, and the following byte contains ATTRIBUTE information for that character. Attributes can be calculated with the following formula:
ATTRIBUTE = 128*(FOREGROUND\16)+BACKGROUND*16+(FOREGROUND MOD 16)
[Note: The backslash character (\) is the integer division operator.]
See Pages 79-81 of "The Peter Norton Programmer's Guide to the IBM PC" (published by Microsoft Press, 1985) for more information about attributes. The following book from Microsoft Press describes video details more completely:
"Programmer's Guide to PC & PS/2 Video Systems," by Richard Wilton
(1987). Chapter 3 describes the alphanumeric video modes.
The following is a code example:
APPLIES TO
| Article Translations
|

Back to the top
