The VGA is upwardly-compatible with the CGA, MDA, and EGA in that all
commonly-used I/O activities are emulated at the expected port addresses.
Video programming at the hardware port level has become increasingly
difficult and risky while the BIOS programming interface has become
flexible and comprehensive. It is recommended that you use the BIOS
functions when possible. See INT 10H (video services).
The following table lists ports and indexes for the VGA without providing
full details. Since the VGA uses the same port range as the EGA, you may
3c0H Attribute Address Register (read/write)
3c0H Palette Registers / Other Attribute Registers (write)
Index: 00H 0fH Palette registers
11H overscan (border) color
13H horizontal pixel panning
14H color select register
3c1H Palette Registers (read)
3c2H Miscellaneous Output Register (write)
3c2H Input Status Register 0 (read)
3c3H VGA Enable Register (read/write)
3c4H Sequencer Address Register (read/write)
3c5H Other Sequencer Registers (read/write)
3c7H PEL Address Register for Read Mode (write)
3c7H DAC State Register (read)
3c8H PEL Address Register for Write Mode (read)
3caH Feature Control Register (read)
3ccH Miscellaneous Output Register (read)
3ceH Graphics Address Register
3cfH Other Graphics Registers
05H graphics mode register
06H miscellaneous graphics control
3?4H CRT controller address (3b4H=MDA emulation, 3d4H=CGA emulation)
3?5H CRT controller internal registers
Index: 00H horizontal total
02H start horizontal blanking (character count)
03H end horizontal blanking
04H start horizontal retrace (character position)
05H end horizontal retrace
06H vertical total (scan lines)
07H overflow (bit 8 for certain CRTC registers)
08H preset row scan; first scan line after vertical retrace
0cH regen start address (high)
0dH regen start address (low)
0eH Cursor location (high)
0fH Cursor location (low)
10H vertical retrace start
12H vertical displayed end (scan line)
13H vertical displayed adjustment
14H underline location. Bits 0-5 are scan line number.
15H start vertical blanking (scan line)
16H end vertical blanking
18H line compare (scan line) Used for split screen
3?aH Feature Control Register (write) (3baH=mono emulation, 3daH=CGA emul.)
3?aH Input Status Register 1 (read)