Vga Bios DOS
Vga Bios DOS
Vga Bios DOS
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)
Notes:
IBM standard modes do not clear the screen if the high bit of AL is
set
(EGA or higher only)
SeeAlso: AX=0070h,AX=007Eh,AX=10F0h,AX=6F05h,AH=FFh"GO32",INT 5F/AH=00h
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
SeeAlso: AH=03h,AX=CD05h
----------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)
SeeAlso: AH=03h,AH=05h
----------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
SeeAlso: AH=01h,AH=02h
----------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 (320column 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)
SeeAlso: AH=0Fh
----------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
SeeAlso: AH=07h,AH=72h,AH=73h
----------1007------------------------------INT 10 - VIDEO - SCROLL DOWN WINDOW
AH = 07h
AX = 1008h
Return: BH = border color (00h-3Fh)
Notes: UltraVision v2+ supports this function even on color EGA systems in
video modes 00h-03h, 10h, and 12h; direct programming of the palette
registers will cause incorrect results because the EGA registers are
write-only. To guard against older versions or unsupported video
modes, programs which expect to use this function on EGA systems
should set BH to FFh on entry.
SeeAlso: AX=1001h
----------101009----------------------------INT 10 - VIDEO - READ ALL PALETTE REGISTERS AND OVERSCAN REGISTER (VGA)
AX = 1009h
ES:DX -> 17-byte buffer (see AX=1002h)
Notes: UltraVision v2+ supports this function even on color EGA systems in
video modes 00h-03h, 10h, and 12h; direct programming of the palette
registers will cause incorrect results because the EGA registers are
write-only. To guard against older versions or unsupported video
modes, programs which expect to use this function on EGA systems
should set the ES:DX buffer to FFh before calling.
SeeAlso: AX=1002h,AX=1007h,AX=CD02h
----------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)
SeeAlso: AX=1012h,AX=1015h
----------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)
SeeAlso: AX=1010h,AX=1017h
----------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
SeeAlso: AX=101Ah
----------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
SeeAlso: AX=1010h,AX=1017h
----------101017----------------------------INT 10 - VIDEO - READ BLOCK OF DAC REGISTERS (VGA/MCGA)
AX = 1017h
BX = starting palette register
CX = number of palette registers to read
R09
R0A
R0B
R12
R14
=
=
=
=
=
SeeAlso: AX=CD10h
----------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
UltraVision v2+ sets INT 43 to the appropriate font for AL=22h,23h,24h,
and 29h
SeeAlso: INT 1F, INT 43
----------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)
11h (UltraVision v2+) 8x20 font (VGA) or 8x19 font (autosync EGA)
12h (UltraVision v2+) 8x10 font (VGA) or 8x11 font (autosync EGA)
Return: ES:BP = specified pointer
CX
= bytes/character
DL
= character rows on screen - 1
Note: for UltraVision v2+, the 9xN alternate fonts follow the corresponding
8xN font at ES:BP+256N
SeeAlso: AX=1100h,AX=1120h,INT 1F,INT 43
----------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
2Eh
31h
32h
33h
of state information:
Size Description
DWORD address of static functionality table (see below)
BYTE video mode in effect
WORD number of columns
WORD length of regen buffer in bytes
WORD starting address of regen buffer
WORD cursor position for page 0
WORD cursor position for page 1
WORD cursor position for page 2
WORD cursor position for page 3
WORD cursor position for page 4
WORD cursor position for page 5
WORD cursor position for page 6
WORD cursor position for page 7
WORD cursor type
BYTE active display page
WORD CRTC port address
BYTE current setting of register (3?8)
BYTE current setting of register (3?9)
BYTE number of rows
WORD bytes/character
BYTE display combination code of active display
BYTE DCC of alternate display
WORD number of colors supported in current mode
BYTE number of pages supported in current mode
BYTE number of scan lines active
(0,1,2,3) = (200,350,400,480)
BYTE primary character block
BYTE secondary character block
BYTE miscellaneous flags
bit 0 all modes on all displays on
1 gray 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
3 BYTEs reserved (00h)
BYTE video memory available
00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K
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
13 BYTEs reserved (00h)
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 gray 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