⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vgabios.txt

📁 比较详尽的VGA端口寄存器的文档
💻 TXT
📖 第 1 页 / 共 3 页
字号:
----------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)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -