6530 Programmer's Guide

Block Mode Operation
3-26
6530 Programmer’s Guide
The 6530 protocol also limits what can be transmitted. Colors are set by
sending the register color value (in hex) added to a hex 20. For example,
to set the foreground color to light red (register 12) the data field should
contain a hex 42 followed by a hex 2C (representing one pair).
Background color defaults to black unless the background color is
otherwise specified. This is done by setting code 45 hex followed by a
hex value referring to a different color - for instance, 25 for magenta.
Foreground color will default to red if not set or if the setting is invalid.
The CGA has 16 fixed foreground colors for the PC. The first 8 of the 16
colors can be used as background colors. because the EGA is
configurable, the 16 can be chosen from a total of 64 colors. The VGA is
also configurable, and the 16 colors can be assigned from a range of 256
choices. The VGA’s 256K range of colors is only available in the
graphics mode 13. The 6530 uses mode 3 (color text).
For CGA, EGA, and VGA implementation, there is a one-to-one
correlation between register usage and color identifier. For example, if a
CI of 21 is given, register one is used. If CI equals 22, register 2 is used.
Table 3-4. Color Codes
Reg Color Code
00 black 20
01 blue 21
02 green 22
03 cyan 23
04 red 24
05 magenta 25
06 brown 26
07 light gray 27
08 dark gray (black) 28
09 light blue 29
0A light green 2A
0B light cyan 2B
0C light red 2C