----------1000------------------------------- INT 10 - VIDEO - SET VIDEO MODE AH = 00h AL = mode (see below) Return: AL = video mode flag (Phoenix BIOS) 20h mode > 7 30h modes <= 7 except mode 6 3Fh mode 6 AL = CRT controller mode byte (Phoenix 386 BIOS v1.10) Note: IBM standard modes do not clear the screen if the high bit of AL is set (EGA or higher only) Values for video mode: text/ text pixel pixel colors display scrn system grph resol box resoltn pages addr 00h = T 40x25 8x14 16gray 8 B800 EGA = T 40x25 8x16 16 8 B800 MCGA = T 40x25 9x16 16 8 B800 VGA 01h = T 40x25 8x14 16 8 B800 EGA = T 40x25 8x16 16 8 B800 MCGA = T 40x25 9x16 16 8 B800 VGA 02h = T 80x25 8x14 16gray 4 B800 EGA = T 80x25 8x16 16 4 B800 MCGA = T 80x25 9x16 16 4 B800 VGA 03h = T 80x25 8x14 16 4 B800 EGA = T 80x25 8x16 16 4 B800 MCGA = T 80x25 9x16 16 4 B800 VGA 04h = G 40x25 8x8 320x200 4 B800 CGA,PCjr,EGA,MCGA,VGA 05h = G 40x25 8x8 320x200 4gray B800 CGA,PCjr,EGA = G 40x25 8x8 320x200 4 B800 MCGA,VGA 06h = G 80x25 8x8 640x200 2 B800 CGA,PCjr,EGA,MCGA,VGA 07h = T 80x25 9x14 mono var B000 MDA,Hercules,EGA = T 80x25 9x16 mono B000 VGA 0Bh = reserved (used internally by EGA BIOS) 0Ch = reserved (used internally by EGA BIOS) 0Dh = G 40x25 8x8 320x200 16 8 A000 EGA,VGA 0Eh = G 80x25 8x8 640x200 16 4 A000 EGA,VGA 0Fh = G 80x25 8x14 640x350 mono 2 A000 EGA,VGA 10h = G 80x25 8x14 640x350 4 2 A000 64k EGA = G 640x350 16 A000 256k EGA,VGA 11h = G 80x30 8x16 640x480 mono A000 VGA,MCGA,ATI EGA,ATI VIP 12h = G 80x30 8x16 640x480 16/256k A000 VGA,ATI VIP = G 80x30 8x16 640x480 16/64 A000 ATI EGA Wonder 13h = G 40x25 8x8 320x200 256/256k A000 VGA,MCGA,ATI VIP ----------1001------------------------------- INT 10 - VIDEO - SET TEXT-MODE CURSOR SHAPE AH = 01h CH = bit 7 should be zero bits 6,5 cursor blink (00=normal, 01=invisible, 10=erratic, 11=slow) (00=normal, other=invisible on EGA/VGA) bits 4-0 top scan line containing cursor CL = bottom scan line containing cursor (bits 0-4) Notes: buggy on EGA systems--BIOS remaps cursor shape in 43 line modes, but returns unmapped cursor shape applications which wish to change the cursor by programming the hardware directly on EGA or above should call INT 10/AX=1130h or read 0040h:0085h first to determine the current font height BUG: AMI 386 BIOS and AST Premier 386 BIOS will lock up the system if AL is not equal to the current video mode ----------1002------------------------------- INT 10 - VIDEO - SET CURSOR POSITION AH = 02h BH = page number 0-3 in modes 2&3 0-7 in modes 0&1 0 in graphics modes DH = row (00h is top) DL = column (00h is left) ----------1003------------------------------- INT 10 - VIDEO - GET CURSOR POSITION AND SIZE AH = 03h BH = page number 0-3 in modes 2&3 0-7 in modes 0&1 0 in graphics modes Return: AX = 0000h (Phoenix BIOS) CH = start scan line CL = end scan line DH = row (00h is top) DL = column (00h is left) Notes: a separate cursor is maintained for each of up to 8 display pages many ROM BIOSes incorrectly return the default size for a color display (start 06h, end 07h) when a monochrome display is attached ----------1004------------------------------- INT 10 - VIDEO - READ LIGHT PEN POSITION (EGA Only) AH = 04h Return: AH = light pen trigger flag 00h not down/triggered 01h down/triggered DH,DL = row,column of character light pen is on CH = pixel row (graphics modes 04h-06h) CX = pixel row (graphics modes with >200 rows) BX = pixel column Notes: on a CGA, returned column numbers are always multiples of 2 (320- column modes) or 4 (640-column modes) returned row numbers are only accurate to two lines ----------1005------------------------------- INT 10 - VIDEO - SELECT ACTIVE DISPLAY PAGE AH = 05h AL = new page number (00h to number of pages - 1) (see AH=00h) ----------1006------------------------------- INT 10 - VIDEO - SCROLL UP WINDOW AH = 06h AL = number of lines by which to scroll up (00h = clear entire window) BH = attribute used to write blank lines at bottom of window CH,CL = row,column of window's upper left corner DH,DL = row,column of window's lower right corner Note: affects only the currently active page (see AH=05h) Warning: some implementations have a bug which destroys BP ----------1007------------------------------- INT 10 - VIDEO - SCROLL DOWN WINDOW AH = 07h AL = number of lines by which to scroll down (00h=clear entire window) BH = attribute used to write blank lines at top of window CH,CL = row,column of window's upper left corner DH,DL = row,column of window's lower right corner Note: affects only the currently active page (see AH=05h) Warning: some implementations have a bug which destroys BP ----------1008------------------------------- INT 10 - VIDEO - READ CHARACTER AND ATTRIBUTE AT CURSOR POSITION AH = 08h BH = page number (00h to number of pages - 1) (see AH=00h) Return: AH = attribute bit 7: blink bits 6-4: background color 000 black 001 blue 010 green 011 cyan 100 red 101 magenta 110 brown 111 white bits 3-0: foreground color 0000 black 1000 dark grey 0001 blue 1001 light blue 0010 green 1010 light green 0011 cyan 1011 light cyan 0100 red 1100 light red 0101 magenta 1101 light magenta 0110 brown 1110 yellow 0111 light grey 1111 white AL = character Notes: for monochrome displays, a foreground of 1 with background 0 is underlined the blink bit may be reprogrammed to enable intense background colors using AX=1003h or by programming the CRT controller ----------1009------------------------------- INT 10 - VIDEO - WRITE CHARACTER AND ATTRIBUTE AT CURSOR POSITION AH = 09h AL = character to display BH = page number (00h to number of pages - 1) (see AH=00h) BL = attribute (text mode) or color (graphics mode) if bit 7 set in graphics mode, character is xor'ed onto screen CX = number of times to write character Notes: all characters are displayed, including CR, LF, and BS replication count in CX may produce an unpredictable result in graphics modes if it is greater than the number of positions remaining in the current row ----------100A------------------------------- INT 10 - VIDEO - WRITE CHARACTER ONLY AT CURSOR POSITION AH = 0Ah AL = character to display BH = page number (00h to number of pages - 1) (see AH=00h) BL = attribute (PCjr only) or color (graphics mode) if bit 7 set in graphics mode, character is xor'ed onto screen CX = number of times to write character Notes: all characters are displayed, including CR, LF, and BS replication count in CX may produce an unpredictable result in graphics modes if it is greater than the number of positions remaining in the current row ----------100B--BH00------------------------- INT 10 - VIDEO - SET BACKGROUND/BORDER COLOR AH = 0Bh BH = 00h BL = background/border color (border only in text modes) ----------100B--BH01------------------------- INT 10 - VIDEO - SET PALETTE AH = 0BH BH = 01h BL = palette ID 00h background, green, red, and brown/yellow 01h background, cyan, magenta, and white ----------100C------------------------------- INT 10 - VIDEO - WRITE GRAPHICS PIXEL AH = 0Ch BH = page number AL = pixel color (if bit 7 set, value is xor'ed onto screen) CX = column DX = row Notes: valid only in graphics modes BH is ignored if the current video mode supports only one page ----------100D------------------------------- INT 10 - VIDEO - READ GRAPHICS PIXEL AH = 0Dh BH = page number CX = column DX = row Return: AL = pixel color Notes: valid only in graphics modes BH is ignored if the current video mode supports only one page ----------100E------------------------------- INT 10 - VIDEO - TELETYPE OUTPUT AH = 0Eh AL = character to write BH = page number BL = foreground color (graphics modes only) Notes: characters 07h (BEL), 08h (BS), 0Ah (LF), and 0Dh (CR) are interpreted and do the expected things IBM PC ROMs dated 4/24/81 and 10/19/81 require that BH be the same as the current active page ----------100F------------------------------- INT 10 - VIDEO - GET CURRENT VIDEO MODE AH = 0Fh Return: AH = number of character columns AL = display mode (see AH=00h) BH = active page (see AH=05h) Notes: if mode was set with bit 7 set ("no blanking"), the returned mode will also have bit 7 set EGA and VGA return either AL=03h (color) or AL=07h (monochrome) in all extended-row text modes ----------101000---------------------------- INT 10 - VIDEO - SET SINGLE PALETTE REGISTER (PCjr,EGA,MCGA,VGA) AX = 1000h BL = palette register number (00h-0Fh) = attribute register number (undocumented) 10h attribute mode control register (should let BIOS control this) 11h overscan color register (see also AX=1001h) 12h color plane enable register (bits 3-0 enable corresponding text attribute bit) 13h horizontal PEL panning register 14h color select register BH = color or attribute register value Notes: on MCGA, only BX = 0712h is supported ----------101001----------------------------- INT 10 - VIDEO - SET BORDER (OVERSCAN) COLOR (PCjr,EGA,VGA) AX = 1001h BH = border color (00h-3Fh) BUG: the original IBM VGA BIOS incorrectly updates the parameter save area and places the border color at offset 11h of the palette table rather than offset 10h ----------101002----------------------------- INT 10 - VIDEO - SET ALL PALETTE REGISTERS (PCjr,EGA,VGA) AX = 1002h ES:DX -> palette register list Format of palette register list: Offset Size Description 00h 16 BYTEs colors for palette registers 00h through 0Fh 10h BYTE border color ----------101003----------------------------- INT 10 - VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA) AX = 1003h BL = new state 00h background intensity enabled 01h blink enabled Note: although there is no function to get the current status, bit 5 of 0040h:0065h indicates the state ----------101007----------------------------- INT 10 - VIDEO - GET INDIVIDUAL PALETTE REGISTER (VGA) AX = 1007h BL = palette or attribute (undoc) register number (see AX=1000h) Return: BH = palette or attribute register value ----------101008----------------------------- INT 10 - VIDEO - READ OVERSCAN (BORDER COLOR) REGISTER (VGA) AX = 1008h Return: BH = border color (00h-3Fh) ----------101009----------------------------- INT 10 - VIDEO - READ ALL PALETTE REGISTERS AND OVERSCAN REGISTER (VGA) AX = 1009h ES:DX -> 17-byte buffer (see AX=1002h) ----------101010----------------------------- INT 10 - VIDEO - SET INDIVIDUAL DAC REGISTER (VGA/MCGA) AX = 1010h BX = register number CH = new value for green (0-63) CL = new value for blue (0-63) DH = new value for red (0-63) ----------101012----------------------------- INT 10 - VIDEO - SET BLOCK OF DAC REGISTERS (VGA/MCGA) AX = 1012h BX = starting color register CX = number of registers to set ES:DX -> table of 3*CX bytes where each 3 byte group represents one byte each of red, green and blue (0-63) ----------101013----------------------------- INT 10 - VIDEO - SELECT VIDEO DAC COLOR PAGE (VGA) AX = 1013h BL = subfunction 00h select paging mode BH = 00h select 4 blocks of 64 BH = 01h select 16 blocks of 16 01h select page BH = page number (00h to 03h) or (00h to 0Fh) Note: not valid in mode 13h ----------101015----------------------------- INT 10 - VIDEO - READ INDIVIDUAL DAC REGISTER (VGA/MCGA) AX = 1015h BL = palette register number Return: DH = red value CH = green value CL = blue value ----------101017----------------------------- INT 10 - VIDEO - READ BLOCK OF DAC REGISTERS (VGA/MCGA) AX = 1017h BX = starting palette register CX = number of palette registers to read ES:DX -> buffer (3 * CX bytes in size) (see also AX=1012h) Return: buffer filled with CX red, green and blue triples ----------101018----------------------------- INT 10 - VIDEO - undocumented - SET PEL MASK (VGA/MCGA) AX = 1018h BL = new PEL value ----------101019----------------------------- INT 10 - VIDEO - undocumented - READ PEL MASK (VGA/MCGA) AX = 1019h Return: BL = value read ----------10101A----------------------------- INT 10 - VIDEO - GET VIDEO DAC COLOR-PAGE STATE (VGA) AX = 101Ah Return: BL = paging mode 00h four pages of 64 01h sixteen pages of 16 BH = current page ----------10101B----------------------------- INT 10 - VIDEO - PERFORM GRAY-SCALE SUMMING (VGA/MCGA) AX = 101Bh BX = starting palette register CX = number of registers to convert ----------1011------------------------------- INT 10 - VIDEO - TEXT-MODE CHARACTER GENERATOR FUNCTIONS (PS, EGA, VGA) AH = 11h The following functions will cause a mode set, completely resetting the video environment, but without clearing the video buffer AL = 00h, 10h: load user-specified patterns ES:BP -> user table CX = count of patterns to store DX = character offset into map 2 block BL = block to load in map 2 BH = number of bytes per character pattern AL = 01h, 11h: load ROM monochrome patterns (8 by 14) BL = block to load AL = 02h, 12h: load ROM 8 by 8 double-dot patterns BL = block to load AL = 03h: set block specifier BL = block specifier (EGA/MCGA) bits 0,1 = block selected by chars with attribute bit 3=0 bits 2,3 = block selected by chars with attribute bit 3=1 (VGA) bits 0,1,4 = block selected by attribute bit 3 = 0 bits 2,3,5 = block selected by attribute bit 3 = 1 AL = 04h, 14h: load ROM 8x16 character set (VGA) BL = block to load The routines called with AL=1xh are designed to be called only immediately after a mode set and are similar to the routines called with AL=0xh, except that: Page 0 must be active. Bytes/character is recalculated. Max character rows is recalculated. CRT buffer length is recalculated. CRTC registers are reprogrammed as follows: R09 = bytes/char-1 ; max scan line (mode 7 only) R0A = bytes/char-2 ; cursor start R0B = 0 ; cursor end R12 = ((rows+1)*(bytes/char))-1 ; vertical display end R14 = bytes/char; underline loc (*** BUG: should be 1 less ***) ----------1011------------------------------- INT 10 - VIDEO - GRAPHICS-MODE CHARACTER GENERATOR FUNCTIONS (PS, EGA, VGA) AH = 11h AL = 20h: set user 8 by 8 graphics characters (INT 1F) ES:BP -> user table AL = 21h: set user graphics characters ES:BP -> user table CX = bytes per character BL = row specifier 00h user set DL = number of rows 01h 14 rows 02h 25 rows 03h 43 rows AL = 22h: ROM 8 by 14 set BL = row specifier (see above) AL = 23h: ROM 8 by 8 double dot BL = row specifier (see above) AL = 24h: load 8x16 graphics characters (VGA/MCGA) BL = row specifier (see above) AL = 29h: load 8x16 graphics characters (Compaq Systempro) BL = row specifier (see above) Notes: these functions are meant to be called only after a mode set ----------101130----------------------------- INT 10 - VIDEO - GET FONT INFORMATION (EGA, MCGA, VGA) AX = 1130h BH = pointer specifier 00h INT 1Fh pointer 01h INT 43h pointer 02h ROM 8x14 character font pointer 03h ROM 8x8 double dot font pointer 04h ROM 8x8 double dot font (high 128 characters) 05h ROM alpha alternate (9 by 14) pointer (EGA,VGA) 06h ROM 8x16 font (MCGA, VGA) 07h ROM alternate 9x16 font (VGA only) Return: ES:BP = specified pointer CX = bytes/character DL = character rows on screen - 1 ----------1012--BL10------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (PS, EGA, VGA, MCGA) - GET EGA INFO AH = 12h BL = 10h Return: BH = 00h color mode in effect (I/O port 3Dxh) 01h mono mode in effect (I/O port 3Bxh) BL = 00h 64k bytes memory installed 01h 128k bytes memory installed 02h 192k bytes memory installed 03h 256k bytes memory installed CH = feature bits CL = switch settings ----------1012--BL20------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (PS,EGA,VGA,MCGA) - ALTERNATE PRTSC AH = 12h BL = 20h select alternate print screen routine Notes: installs a PrtSc routine from the video card's BIOS to replace the default PrtSc handler from the ROM BIOS, which usually does not understand screen heights other than 25 lines some adapters disable print-screen instead of enhancing it ----------1012--BL30------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA) - SELECT VERTICAL RESOLUTION AH = 12h BL = 30h AL = vertical resolution 00h 200 scan lines 01h 350 scan lines 02h 400 scan lines Return: AL = 12h if function supported ----------1012--BL31------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA, MCGA) - PALETTE LOADING AH = 12h BL = 31h AL = 00h enable default palette loading 01h disable default palette loading Return: AL = 12h if function supported ----------1012--BL32------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA, MCGA) - VIDEO ADDRESSING AH = 12h BL = 32h AL = 00h enable video addressing 01h disable video addressing Return: AL = 12h if function supported Desc: Specifies whether the CPU should have access to video memory and the display adapter's I/O registers ----------1012--BL33------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA, MCGA) - GRAY-SCALE SUMMING AH = 12h BL = 33h AL = 00h enable grey scale summing 01h disable grey scale summing Return: AL = 12h if function supported ----------1012--BL34------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA) - CURSOR EMULATION AH = 12h BL = 34h AL = 00h enable alphanumeric cursor emulation 01h disable alphanumeric cursor emulation Return: AL = 12h if function supported ----------1012--BL35------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (PS) - DISPLAY-SWITCH INTERFACE AH = 12h BL = 35h AL = 00h initial adapter video off 01h initial planar video on 02h switch active video off 03h switch inactive video on 80h *UNDOCUMENTED* set system board video active flag ES:DX -> buffer (128 byte save area if AL = 0, 2 or 3) Return: AL = 12h if function supported ----------1012--BL36------------------------- INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (PS, VGA) - VIDEO REFRESH CONTROL AH = 12h BL = 36h AL = 00h enable refresh 01h disable refresh Return: AL = 12h if function supported ----------1013------------------------------- INT 10 - VIDEO - WRITE STRING (AT and later,EGA) AH = 13h AL = write mode bit 0: update cursor after writing 1: string contains alternating characters and attributes BH = page number BL = attribute if string contains only characters CX = number of characters in string DH,DL = row,column at which to start writing ES:BP -> string to write Notes: recognises CR, LF, BS, and bell also available PC or XT with EGA or higher HP 95LX only supports write mode 00h BUG: on the IBM VGA Adapter, any scrolling which may occur is performed on the active page rather than the requested page ----------101A------------------------------- INT 10 - VIDEO - DISPLAY COMBINATION (PS,VGA/MCGA) AH = 1Ah AL = 00h read display combination code Return: BL = active display code (see below) BH = alternate display code 01h set display combination code BL = active display code (see below) BH = alternate display code Return: AL = 1Ah if function was supported Values for display combination code: 00h no display 01h monochrome adapter w/ monochrome display 02h CGA w/ color display 03h reserved 04h EGA w/ color display 05h EGA w/ monochrome display 06h PGA w/ color display 07h VGA w/ monochrome analog display 08h VGA w/ color analog display 09h reserved 0Ah MCGA w/ digital color display 0Bh MCGA w/ monochrome analog display 0Ch MCGA w/ color analog display FFh unknown display type ----------101B------------------------------- INT 10 - VIDEO - FUNCTIONALITY/STATE INFORMATION (PS,VGA/MCGA) AH = 1Bh BX = implementation type 0000h return functionality/state information ES:DI -> 64 byte buffer for state information (see below) Return: AL = 1Bh if function supported ES:DI buffer filled with state information Format of state information: Offset Size Description 00h DWORD address of static functionality table (see below) 04h BYTE video mode in effect 05h WORD number of columns 07h WORD length of regen buffer in bytes 09h WORD starting address of regen buffer 0Bh WORD cursor position for page 0 0Dh WORD cursor position for page 1 0Fh WORD cursor position for page 2 11h WORD cursor position for page 3 13h WORD cursor position for page 4 15h WORD cursor position for page 5 17h WORD cursor position for page 6 19h WORD cursor position for page 7 1Bh WORD cursor type 1Dh BYTE active display page 1Eh WORD CRTC port address 20h BYTE current setting of register (3?8) 21h BYTE current setting of register (3?9) 22h BYTE number of rows 23h WORD bytes/character 25h BYTE display combination code of active display 26h BYTE DCC of alternate display 27h WORD number of colors supported in current mode 29h BYTE number of pages supported in current mode 2Ah BYTE number of scan lines active (0,1,2,3) = (200,350,400,480) 2Bh BYTE primary character block 2Ch BYTE secondary character block 2Dh BYTE miscellaneous flags bit 0 all modes on all displays on 1 grey summing on 2 monochrome display attached 3 default palette loading disabled 4 cursor emulation enabled 5 0 = intensity; 1 = blinking 6 PS/2 P70 plasma display (without 9-dot wide font) active 7 reserved 2Eh 3 BYTEs reserved (00h) 31h BYTE video memory available 00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K 32h BYTE save pointer state flags bit 0 512 character set active 1 dynamic save area present 2 alpha font override active 3 graphics font override active 4 palette override active 5 DCC override active 6 reserved 7 reserved 33h 13 BYTEs reserved (00h) Format of Static Functionality Table: Offset Size Description 00h BYTE modes supported #1 bit 0 to bit 7 = 1 modes 0,1,2,3,4,5,6 supported 01h BYTE modes supported #2 bit 0 to bit 7 = 1 modes 8,9,0Ah,0Bh,0Ch,0Dh,0Eh,0Fh supported 02h BYTE modes supported #3 bit 0 to bit 3 = 1 modes 10h,11h,12h,13h supported bit 4 to bit 7 reserved 03h 4 BYTEs reserved 07h BYTE scan lines supported bit 0 to bit 2 = 1 if scan lines 200,350,400 supported 08h BYTE total number of character blocks available in text modes 09h BYTE maximum number of active character blocks in text modes 0Ah BYTE miscellaneous function flags #1 bit 0 all modes on all displays function supported 1 grey summing function supported 2 character font loading function supported 3 default palette loading enable/disable supported 4 cursor emulation function supported 5 EGA palette present 6 color palette present 7 color paging function supported 0Bh BYTE miscellaneous function flags #2 bit 0 light pen supported 1 save/restore state function 1Ch supported 2 intensity blinking function supported 3 Display Combination Code supported 4-7 reserved 0Ch WORD reserved 0Eh BYTE save pointer function flags bit 0 512 character set supported 1 dynamic save area supported 2 alpha font override supported 3 graphics font override supported 4 palette override supported 5 DCC extension supported 6 reserved 7 reserved 0Fh BYTE reserved ----------101C------------------------------- INT 10 - VIDEO - SAVE/RESTORE VIDEO STATE (PS50+,VGA) AH = 1Ch AL = 00h return state buffer size Return: BX = number of 64-byte blocks needed 01h save video state ES:BX -> buffer 02h restore video state ES:BX -> buffer containing previously saved state CX = requested states bit 0 video hardware 1 BIOS data areas 2 color registers and DAC state 3-15 reserved Return: AL = 1Ch if function supported Format of video hardware state: Offset Size Description 00h BYTE sequencer index register 01h BYTE CRTC index register 02h BYTE graphics controller index register 03h BYTE attribute controller index register 04h BYTE feature controller register 05h 4 BYTEs sequencer registers 09h BYTE sequencer register 0 0Ah 25 BYTEs CRTC registers 0-8 23h 16 BYTEs palette registers 00h-0Fh 33h 4 BYTEs attribute registers 10h-13h 37h 9 BYTEs graphics controller registers 0-8 40h BYTE CRTC base address (low) 41h BYTE CRTC base address (high) 42h BYTE plane 0 latch 43h BYTE plane 1 latch 44h BYTE plane 2 latch 45h BYTE plane 3 latch Format of DAC state: Offset Size Description 00h BYTE read/write mode DAC 01h BYTE pixel address 02h BYTE pixel mask 03h 768 BYTEs color data (256 triples) 303h BYTE color select register Memory: 0:410h WORD Bit 4-5: Initial video mode 0: EGA,VGA,PGA 1:40x25 color, 2: 80x25 color, 3: 80x25 monochrome 0:449h BYTE Video current mode 0:44Ah WORD Video columns on screen 0:44Ch WORD Video page (regen buffer) size in bytes 0:44Eh WORD Video current page start address in regen buffer 0:450h 16 BYTEs Video cursor position (col, row) for eight pages, 0 based 0:460h WORD Video cursor type, 6845 compatible, hi=startline, lo=endline 0:462h BYTE Video current page number 0:463h WORD Video CRT controller base address: color=03D4h, mono=03B4h 0:465h BYTE Video current setting of mode select register 03D8h/03B8h 0:466h BYTE Video current setting of CGA palette register 03D9h 0:484h BYTE Video EGA/MCGA/VGA rows on screen minus one 0:485h WORD Video EGA/MCGA/VGA character height in scan-lines 0:487h BYTE Video EGA/VGA control: [MCGA: =00h] bit 0: =0 alphanumeric cursor emulation enabled, =1 not. When enabled the text mode cursor size (INT 10h, AH=01h) are translated to EGA/VGA size. 1: =0 for color or ECD monitor, =1 for mono monitor 2: =1 if to wait for display enable (what means this?) 3: =0 if EGA/VGA video system active, =1 if inactive 4: reserved 6-5: RAM on adapter = (this field + 1) * 64K 7: =1 if not to clear RAM (see INT 10h, AH=00h) 0:488h BYTE Video EGA/VGA switches: [MCGA: reserved] bits 0-3: configuration switches 4-1 (=0 on, =1 off) Values as read: 0h Pri MDA, Sec EGA+old color display 40 x 25 1h Pri MDA, Sec EGA+old color display 80 x 25 2h Pri MDA, Sec EGA+ECD normal mode (CGA emulation) 3h Pri MDA, Sec EGA+ECD enhanced mode 4h Pri CGA 40 x 25, Sec EGA mono display 5h Pri CGA 80 x 25, Sec EGA mono display 6h Pri EGA+old color display 40 x 25, Sec MDA 7h Pri EGA+old color display 80 x 25, Sec MDA 8h Pri EGA+ECD normal mode (CGA emul), Sec MDA 9h Pri EGA+ECD enhanced mode, Sec MDA Ah Pri EGA mono display, Sec CGA 40 x 25 Bh Pri EGA mono display, Sec CGA 80 x 25 bits 7-4: power-on state of feature connector bits 3-0 Note: When bit4 of 40h:89h is 0, VGA emulates 350-line EGA if this byte is x3h or x9h, otherwise emulates 200-line CGA in 400-line double scan. VGA resets this byte to x9h after the mode set. 0:489h BYTE Video MCGA/VGA mode-set option control: bit 0: [VGA] =1 if VGA active, =0 if not [MCGA] reserved, zero 1: =1 if grey scale summing enabled, =0 if disabled 2: =1 if mono display, =0 if color display 3: =0 if default palette loading enabled at mode set 4: [VGA] =1 if to use 400-line mode at next mode set =0 if to emulate EGA at next mode set This bit set to 1 after the mode set. [MCGA] =1 use 400-line mode at next mode set =0 emulate CGA, digital monitor, 200 lines, 8 x 8 text font at next mode set Bit unchanged by mode set. 5: reserved 6: =1 if display switching enabled, =0 if disabled bits 7 and 4: 0 0 350-line mode requested 0 1 400-line mode at next mode set 1 0 200-line mode requested 1 1 reserved Note: Apparently VGA BIOS mode set disregards bit 7 and uses byte 40h:88h to determine 200/350 selection when bit 4 is zero . Presumably bit 7 is a convenience for other purposes. Bit 7 is reset to zero after the mode set. 0:48Ah BYTE Video [MCGA/VGA]: index into Display Combination Code table 0:4A8h DWORD Pointer to the Video Save Pointer Table (see below) Format of Video Save Pointer Table [EGA/VGA/MCGA only]: Offset Size Description 00h DWORD ptr to Video Parameter Table 04h DWORD ptr to Parameter Dynamic Save Area, else 0 [EGA/VGA only] 08h DWORD ptr to Alphanumeric Character Set Override, else 0 0Ch DWORD ptr to Graphics Character Set Override, else 0 10h DWORD [VGA only] ptr to Secondary Save Pointer Table, must be valid 14h DWORD reserved, zero 18h DWORD reserved, zero Note: table initially in ROM, copy to RAM to alter, then update 40h:A8h. Format of Secondary Video Save Pointer Table [VGA only]: Offset Size Description 00h WORD Length of this table in bytes, including this word (1Ah) 02h DWORD ptr to Display Combination Code Table, must be valid 06h DWORD ptr to second Alphanumeric Character Set Override, else 0 0Ah DWORD ptr to User Palette Profile Table, else 0 0Eh DWORD reserved, zero 12h DWORD reserved, zero 16h DWORD reserved, zero Note: table initially in ROM, copy to RAM to alter, then alter Save Ptr Table. Format of Video Parameter Table [EGA, VGA only]: An array of 23 [EGA] or 29 [VGA] elements, each element being 64 bytes long. Elements appear in the order: 00h-03h Modes 00h-03h in 200-line CGA emulation mode 04h-0Eh Modes 04h-0Eh 0Fh-10h Modes 0Fh-10h when only 64kB RAM on adapter 11h-12h Modes 0Fh-10h when >64kB RAM on adapter 13h-16h Modes 00h-03h in 350-line mode 17h VGA Modes 00h or 01h in 400-line mode 18h VGA Modes 02h or 03h in 400-line mode 19h VGA Mode 07h in 400-line mode 1Ah-1Ch VGA Modes 11h-13h Format of Video Parameter Table element [EGA, VGA only]: Offset Size Description 00h BYTE Columns on screen (see 0:44Ah) 01h BYTE Rows on screen minus one (see 0:484h) 02h BYTE Height of character in scan lines (see 0:485h) 03h WORD Size of video buffer (see 0:44Ch) 05h 4 BYTEs Values for Sequencer Registers 1-4 09h BYTE Value for Miscellaneous Output Register 0Ah 25 BYTEs Values for CRTC Registers 00h-18h 23h 20 BYTEs Values for Attribute Controller Registers 00h-13h 37h 9 BYTEs Values for Graphics Controller Registers 00h-08h Format of Video Parameter Table [MCGA only] {guesswork from inspection}: 16 triplet BYTEs of R,G,B DAC info for 16 colors; An array of 11 elements, each element being 32 bytes long. Elements appear in the order: Modes 00h,01h in 200-line mode for digital displays Modes 00h,01h in 400-line mode for analog displays Modes 02h,03h in 200-line mode for digital displays Modes 02h,03h in 400-line mode for analog displays Modes 04h,05h in 200-line mode for digital displays Modes 04h,05h in 400-line mode for analog displays Mode 06h in 200-line mode for digital displays Mode 06h in 400-line mode for analog displays Mode 11h Mode 13h in 200-line mode for digital displays Mode 13h in 400-line mode for analog displays Format of Video Parameter Table element [MCGA only]: Offset Size Description 00h BYTE Columns on screen (see 0:44Ah) 01h BYTE Rows on screen minus one (see 0:484h) 02h BYTE Height of character in scan lines (see 0:485h) 03h WORD Size of video buffer (see 0:44Ch) 05h WORD ??? always zero 07h 21 BYTEs Video data registers 00h-14h to port 3D5h indexed by 3D4h 1Ch BYTE PEL Mask to port 3C6h 1Dh BYTE CGA Mode Control to port 3D8h 1Eh BYTE CGA Border Control to port 3D9h 1Fh BYTE Extended Mode Control to port 3DDh Format of Video Parameter Dynamic Save Area [EGA, VGA only]: Offset Size Description 00h 16 BYTEs Last data written to Attribute Contr. Palette Registers 0-15 10h BYTE Last data written to Attribute Controller Overscan Register 11h-FFh Reserved Note: Need for table was that EGA registers were write-only. Note: If default values (from the Video Parameter Table) are over-ridden at a mode set by the VGA User Palette Profile Table, then the Dynamic Save Area is updated with the default values, not the User Profile ones.