Selects a palette, background, or border color.
Call with:
To set the background color and border color for graphics modes or the border color for text modes
AH = 0BH
BH = 00H
BL = color
To select the palette (320-by-200 4-color graphics modes)
AH = 0BH
BH = 01H
BL = palette (see Notes)
Returns:
Nothing
Notes:
In text modes, this function selects only the border color. The background color of each individual character is controlled by the upper 4 bits of that character's attribute byte.
On the CGA and EGA, this function is valid for palette selection only in 320-by-200 4-color graphics modes.
In 320-by-200 4-color graphics modes, if register BH = 01H, the following palettes may be selected:
Palette Pixel value Color 0 0 same as background 1 green 2 red 3 brown or yellow 1 0 same as background 1 cyan 2 magenta 3 white
On the CGA in 640-by-200 2-color graphics mode, the background color selected with this function actually controls the display color for nonzero pixels; zero pixels are always displayed as black.
On the PCjr in 640-by-200 2-color graphics mode, if BH = 00H and bit 0 of register BL is cleared, pixel value 1 is displayed as white; if bit 0 is set, pixel value 1 is displayed as black.
See also Int 10H Function 10H, which is used for palette programming on the PCjr, EGA, MCGA, and VGA.