Display VESA

Color Text Mode

There 8 pages in the address space B8000h~ BFFFFh It’s most popular that the monitor shows the page 0. One page shows 80*25 characters, each character use 2 bytes

Character layout

Byte Description
0 the ASCII code
1 the control code

Control code

Bit Description
0 Front B
1 Front G
2 Front R
3 Highlight
4 Back B
5 Back G
6 Back R
7 Blink

Underline

The Underline is controlled by VGA register 14 and 15. The PC system use port 0x3d4 and 0x3d4 VGA registers 0x3d4 is the index regiser and 0x3d4 is the data register. For instance, to write value to VGA registers 14

out 0x3d4, 14
out 0x3d5, value
Reg Description
14 Underline Position X
15 Underline Position Y