With int 10h , the BL register is used for color attributes.
If you are not dealing with CGA, where the BL value is the number of the palette, the BL value is a number representing the foreground color (4 bits - low part) and background color (4 bits - high part).
For example, if you need a blue (0x01) background with a red (0x04) text color, you need to put 0x14 in the BL register - in binary format, which is 00010100 .
0001 0100 |_ Background _| |_ Foreground _|
Colors usually:
- Black 0x00 - Blue 0x01 - Green 0x02 - Cyan 0x03 - Red 0x04 - Magenta 0x05 - Brown 0x06 - LightGray 0x07 - DarkGray 0x08 - LightBlue 0x09 - LightGreen 0x0A - LightCyan 0x0B - LightRed 0x0C - LightMagenta 0x0D - LightBrown 0x0E - White 0x0F
source share