📄 vga.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>vga bios layout</title>
<meta name="generator" content="microsoft frontpage 3.0">
</head>
<body background="../jpg/di1.JPG">
<p align="center"><font size="6" color="#0000ff">vga bios layout </font></p>
<div align="center"><center>
<table border="0" width="88%">
<tr>
<td width="100%">----------1000-------------------------------<br>
int 10 - video - set video mode<br>
ah = 00h<br>
al = mode (see below)<br>
return: al = video mode flag (phoenix bios)<br>
20h mode > 7<br>
30h modes <= 7 except mode 6<br>
3fh mode 6<br>
al = crt controller mode byte (phoenix 386 bios v1.10)<br>
notes: ibm standard modes do not clear the screen if the high bit of al is set<br>
(ega or higher only)<br>
seealso: ax=0070h,ax=007eh,ax=10f0h,ax=6f05h,ah=ffh"go32",int 5f/ah=00h<br>
<br>
values for video mode:<br>
text/ text pixel pixel colors display scrn system<br>
grph resol box resoltn pages addr<br>
00h = t 40x25 8x14 16gray 8 b800 ega<br>
= t 40x25 8x16 16 8 b800 mcga<br>
= t 40x25 9x16 16 8 b800 vga<br>
01h = t 40x25 8x14 16 8 b800 ega<br>
= t 40x25 8x16 16 8 b800 mcga<br>
= t 40x25 9x16 16 8 b800 vga<br>
02h = t 80x25 8x14 16gray 4 b800 ega<br>
= t 80x25 8x16 16 4 b800 mcga<br>
= t 80x25 9x16 16 4 b800 vga<br>
03h = t 80x25 8x14 16 4 b800 ega<br>
= t 80x25 8x16 16 4 b800 mcga<br>
= t 80x25 9x16 16 4 b800 vga<br>
04h = g 40x25 8x8 320x200 4 b800 cga,pcjr,ega,mcga,vga<br>
05h = g 40x25 8x8 320x200 4gray b800 cga,pcjr,ega<br>
= g 40x25 8x8 320x200 4 b800 mcga,vga<br>
06h = g 80x25 8x8 640x200 2 b800 cga,pcjr,ega,mcga,vga<br>
07h = t 80x25 9x14 mono var b000 mda,hercules,ega<br>
= t 80x25 9x16 mono b000 vga<br>
0bh = reserved (used internally by ega bios)<br>
0ch = reserved (used internally by ega bios)<br>
0dh = g 40x25 8x8 320x200 16 8 a000 ega,vga<br>
0eh = g 80x25 8x8 640x200 16 4 a000 ega,vga<br>
0fh = g 80x25 8x14 640x350 mono 2 a000 ega,vga<br>
10h = g 80x25 8x14 640x350 4 2 a000 64k ega<br>
= g 640x350 16 a000 256k ega,vga<br>
11h = g 80x30 8x16 640x480 mono a000 vga,mcga,ati ega,ati vip<br>
12h = g 80x30 8x16 640x480 16/256k a000 vga,ati vip<br>
= g 80x30 8x16 640x480 16/64 a000 ati ega wonder<br>
13h = g 40x25 8x8 320x200 256/256k a000 vga,mcga,ati vip<br>
----------1001-------------------------------<br>
int 10 - video - set text-mode cursor shape<br>
ah = 01h<br>
ch = bit 7 should be zero<br>
bits 6,5 cursor blink<br>
(00=normal, 01=invisible, 10=erratic, 11=slow)<br>
(00=normal, other=invisible on ega/vga)<br>
bits 4-0 top scan line containing cursor<br>
cl = bottom scan line containing cursor (bits 0-4)<br>
notes: buggy on ega systems--bios remaps cursor shape in 43 line modes, but<br>
returns unmapped cursor shape<br>
applications which wish to change the cursor by programming the<br>
hardware directly on ega or above should call int 10/ax=1130h or<br>
read 0040h:0085h first to determine the current font height<br>
bug: ami 386 bios and ast premier 386 bios will lock up the system if al<br>
is not equal to the current video mode<br>
seealso: ah=03h,ax=cd05h<br>
----------1002-------------------------------<br>
int 10 - video - set cursor position<br>
ah = 02h<br>
bh = page number<br>
0-3 in modes 2&3<br>
0-7 in modes 0&1<br>
0 in graphics modes<br>
dh = row (00h is top)<br>
dl = column (00h is left)<br>
seealso: ah=03h,ah=05h<br>
----------1003-------------------------------<br>
int 10 - video - get cursor position and size<br>
ah = 03h<br>
bh = page number<br>
0-3 in modes 2&3<br>
0-7 in modes 0&1<br>
0 in graphics modes<br>
return: ax = 0000h (phoenix bios)<br>
ch = start scan line<br>
cl = end scan line<br>
dh = row (00h is top)<br>
dl = column (00h is left)<br>
notes: a separate cursor is maintained for each of up to 8 display pages<br>
many rom bioses incorrectly return the default size for a color display<br>
(start 06h, end 07h) when a monochrome display is attached<br>
seealso: ah=01h,ah=02h<br>
----------1004-------------------------------<br>
int 10 - video - read light pen position (ega only)<br>
ah = 04h<br>
return: ah = light pen trigger flag<br>
00h not down/triggered<br>
01h down/triggered <br>
dh,dl = row,column of character light pen is on <br>
ch = pixel row (graphics modes 04h-06h)<br>
cx = pixel row (graphics modes with >200 rows)<br>
bx = pixel column<br>
notes: on a cga, returned column numbers are always multiples of 2 (320-<br>
column modes) or 4 (640-column modes)<br>
returned row numbers are only accurate to two lines<br>
----------1005-------------------------------<br>
int 10 - video - select active display page<br>
ah = 05h<br>
al = new page number (00h to number of pages - 1) (see ah=00h)<br>
seealso: ah=0fh<br>
----------1006-------------------------------<br>
int 10 - video - scroll up window<br>
ah = 06h<br>
al = number of lines by which to scroll up (00h = clear entire window)<br>
bh = attribute used to write blank lines at bottom of window<br>
ch,cl = row,column of window's upper left corner<br>
dh,dl = row,column of window's lower right corner<br>
note: affects only the currently active page (see ah=05h)<br>
warning: some implementations have a bug which destroys bp<br>
seealso: ah=07h,ah=72h,ah=73h<br>
----------1007-------------------------------<br>
int 10 - video - scroll down window<br>
ah = 07h<br>
al = number of lines by which to scroll down (00h=clear entire window)<br>
bh = attribute used to write blank lines at top of window<br>
ch,cl = row,column of window's upper left corner<br>
dh,dl = row,column of window's lower right corner<br>
note: affects only the currently active page (see ah=05h)<br>
warning: some implementations have a bug which destroys bp<br>
seealso: ah=06h,ah=72h,ah=73h<br>
----------1008-------------------------------<br>
int 10 - video - read character and attribute at cursor position<br>
ah = 08h<br>
bh = page number (00h to number of pages - 1) (see ah=00h)<br>
return: ah = attribute<br>
bit 7: blink<br>
bits 6-4: background../jpg/di1.JPGd color<br>
000 black<br>
001 blue<br>
010 green<br>
011 cyan<br>
100 red<br>
101 magenta<br>
110 brown<br>
111 white<br>
bits 3-0: foreground color<br>
0000 black 1000 dark gray<br>
0001 blue 1001 light blue<br>
0010 green 1010 light green<br>
0011 cyan 1011 light cyan<br>
0100 red 1100 light red<br>
0101 magenta 1101 light magenta<br>
0110 brown 1110 yellow<br>
0111 light gray 1111 white<br>
al = character<br>
notes: for monochrome displays, a foreground of 1 with background../jpg/di1.JPG0 is underlined<br>
the blink bit may be reprogrammed to enable intense background../jpg/di1.JPGd colors<br>
using ax=1003h or by programming the crt controller<br>
seealso: ah=09h,ax=1003h<br>
----------1009-------------------------------<br>
int 10 - video - write character and attribute at cursor position<br>
ah = 09h<br>
al = character to display<br>
bh = page number (00h to number of pages - 1) (see ah=00h)<br>
bl = attribute (text mode) or color (graphics mode)<br>
if bit 7 set in graphics mode, character is xor'ed onto screen<br>
cx = number of times to write character<br>
notes: all characters are displayed, including cr, lf, and bs<br>
replication count in cx may produce an unpredictable result in graphics<br>
modes if it is greater than the number of positions remaining in the<br>
current row<br>
seealso: ah=08h,ah=0ah,ah=4bh,int 17/ah=60h,int 1f,int 43,int 44<br>
----------100a-------------------------------<br>
int 10 - video - write character only at cursor position<br>
ah = 0ah<br>
al = character to display<br>
bh = page number (00h to number of pages - 1) (see ah=00h)<br>
bl = attribute (pcjr only) or color (graphics mode)<br>
if bit 7 set in graphics mode, character is xor'ed onto screen<br>
cx = number of times to write character<br>
notes: all characters are displayed, including cr, lf, and bs<br>
replication count in cx may produce an unpredictable result in graphics<br>
modes if it is greater than the number of positions remaining in the<br>
current row<br>
seealso: ah=08h,ah=09h,ah=4bh,int 17/ah=60h,int 1f,int 43,int 44<br>
----------100b--bh00-------------------------<br>
int 10 - video - set background../jpg/di1.JPG color<br>
ah = 0bh<br>
bh = 00h<br>
bl = background../jpg/di1.JPG color (border only in text modes)<br>
seealso: ah=0bh/bh=01h<br>
----------100b--bh01-------------------------<br>
int 10 - video - set palette<br>
ah = 0bh<br>
bh = 01h<br>
bl = palette id<br>
00h background../jpg/di1.JPG green, red, and brown/yellow<br>
01h background../jpg/di1.JPG cyan, magenta, and white<br>
seealso: ah=0bh/bh=00h<br>
----------100c-------------------------------<br>
int 10 - video - write graphics pixel<br>
ah = 0ch<br>
bh = page number<br>
al = pixel color (if bit 7 set, value is xor'ed onto screen)<br>
cx = column<br>
dx = row<br>
notes: valid only in graphics modes<br>
bh is ignored if the current video mode supports only one page<br>
seealso: ah=0dh,ah=46h<br>
----------100d-------------------------------<br>
int 10 - video - read graphics pixel<br>
ah = 0dh<br>
bh = page number<br>
cx = column<br>
dx = row<br>
return: al = pixel color<br>
notes: valid only in graphics modes<br>
bh is ignored if the current video mode supports only one page<br>
seealso: ah=0ch,ah=47h<br>
----------100e-------------------------------<br>
int 10 - video - teletype output<br>
ah = 0eh<br>
al = character to write<br>
bh = page number<br>
bl = foreground color (graphics modes only)<br>
notes: characters 07h (bel), 08h (bs), 0ah (lf), and 0dh (cr) are interpreted<br>
and do the expected things<br>
ibm pc roms dated 4/24/81 and 10/19/81 require that bh be the same as<br>
the current active page<br>
seealso: ah=02h,ah=0ah<br>
----------100f-------------------------------<br>
int 10 - video - get current video mode<br>
ah = 0fh<br>
return: ah = number of character columns<br>
al = display mode (see ah=00h)<br>
bh = active page (see ah=05h)<br>
notes: if mode was set with bit 7 set ("no blanking"), the returned mode will<br>
also have bit 7 set<br>
ega, vga, and ultravision return either al=03h (color) or al=07h<br>
(monochrome) in all extended-row text modes<br>
seealso: ah=00h,ah=05h,ax=1130h,ax=cd04h<br>
----------101000----------------------------<br>
int 10 - video - set single palette register (pcjr,ega,mcga,vga)<br>
ax = 1000h<br>
bl = palette register number (00h-0fh)<br>
= attribute register number (undocumented)<br>
10h attribute mode control register (should let bios control this)<br>
11h overscan color register (see also ax=1001h)<br>
12h color plane enable register (bits 3-0 enable corresponding<br>
text attribute bit)<br>
13h horizontal pel panning register<br>
14h color select register<br>
bh = color or attribute register value<br>
notes: on mcga, only bx = 0712h is supported<br>
under ultravision, the palette locking status (see ax=cd01h)<br>
determines the outcome<br>
seealso: ax=1002h,ax=1007h,ax=cd01h<br>
----------101001-----------------------------<br>
int 10 - video - set border (overscan) color (pcjr,ega,vga)<br>
ax = 1001h<br>
bh = border color (00h-3fh)<br>
bug: the original ibm vga bios incorrectly updates the parameter save area<br>
and places the border color at offset 11h of the palette table<br>
rather than offset 10h<br>
note: under ultravision, the palette locking status (see ax=cd01h)<br>
determines the outcome<br>
seealso: ax=1002h,ax=1008h,ax=cd01h<br>
----------101002-----------------------------<br>
int 10 - video - set all palette registers (pcjr,ega,vga)<br>
ax = 1002h<br>
es:dx -> palette register list<br>
note: under ultravision, the palette locking status (see ax=cd01h)<br>
determines the outcome<br>
seealso: ax=1000h,ax=1001h,ax=1009h,ax=cd01h<br>
<br>
format of palette register list:<br>
offset size description<br>
00h 16 bytes colors for palette registers 00h through 0fh<br>
10h byte border color<br>
----------101003-----------------------------<br>
int 10 - video - toggle intensity/blinking bit (jr, ps, tandy 1000, ega, vga)<br>
ax = 1003h<br>
bl = new state<br>
00h background../jpg/di1.JPGy enabled<br>
01h blink enabled<br>
note: although there is no function to get the current status, bit 5 of<br>
0040h:0065h indicates the state<br>
seealso: ah=08h<br>
----------101007-----------------------------<br>
int 10 - video - get individual palette register (vga,ultravision v2+)<br>
ax = 1007h<br>
bl = palette or attribute (undoc) register number (see ax=1000h)<br>
return: bh = palette or attribute register value<br>
notes: ultravision v2+ supports this function even on color ega systems in<br>
video modes 00h-03h, 10h, and 12h; direct programming of the palette<br>
registers will cause incorrect results because the ega registers are<br>
write-only. to guard against older versions or unsupported video<br>
modes, programs which expect to use this function on ega systems<br>
should set bh to ffh on entry.<br>
seealso: ax=1000h,ax=1009h<br>
----------101008-----------------------------<br>
int 10 - video - read overscan (border color) register (vga,ultravision v2+)<br>
ax = 1008h<br>
return: bh = border color (00h-3fh)<br>
notes: ultravision v2+ supports this function even on color ega systems in<br>
video modes 00h-03h, 10h, and 12h; direct programming of the palette<br>
registers will cause incorrect results because the ega registers are<br>
write-only. to guard against older versions or unsupported video<br>
modes, programs which expect to use this function on ega systems<br>
should set bh to ffh on entry.<br>
seealso: ax=1001h<br>
----------101009-----------------------------<br>
int 10 - video - read all palette registers and overscan register (vga)<br>
ax = 1009h<br>
es:dx -> 17-byte buffer (see ax=1002h)<br>
notes: ultravision v2+ supports this function even on color ega systems in<br>
video modes 00h-03h, 10h, and 12h; direct programming of the palette<br>
registers will cause incorrect results because the ega registers are<br>
write-only. to guard against older versions or unsupported video<br>
modes, programs which expect to use this function on ega systems<br>
should set the es:dx buffer to ffh before calling.<br>
seealso: ax=1002h,ax=1007h,ax=cd02h<br>
----------101010-----------------------------<br>
int 10 - video - set individual dac register (vga/mcga)<br>
ax = 1010h<br>
bx = register number<br>
ch = new value for green (0-63)<br>
cl = new value for blue (0-63)<br>
dh = new value for red (0-63)<br>
seealso: ax=1012h,ax=1015h<br>
----------101012-----------------------------<br>
int 10 - video - set block of dac registers (vga/mcga)<br>
ax = 1012h<br>
bx = starting color register<br>
cx = number of registers to set<br>
es:dx -> table of 3*cx bytes where each 3 byte group represents one<br>
byte each of red, green and blue (0-63)<br>
seealso: ax=1010h,ax=1017h<br>
----------101013-----------------------------<br>
int 10 - video - select video dac color page (vga)<br>
ax = 1013h<br>
bl = subfunction<br>
00h select paging mode<br>
bh = 00h select 4 blocks of 64<br>
bh = 01h select 16 blocks of 16<br>
01h select page<br>
bh = page number (00h to 03h) or (00h to 0fh)<br>
note: not valid in mode 13h<br>
seealso: ax=101ah<br>
----------101015-----------------------------<br>
int 10 - video - read individual dac register (vga/mcga)<br>
ax = 1015h<br>
bl = palette register number<br>
return: dh = red value<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -