VGABIOS.TXT

----------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)
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 (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)
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
        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
SeeAlso: AH=06h,AH=72h,AH=73h
----------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 gray
                       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 gray  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
SeeAlso: AH=09h,AX=1003h
----------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
SeeAlso: AH=08h,AH=0Ah,AH=4Bh,INT 17/AH=60h,INT 1F,INT 43,INT 44
----------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
SeeAlso: AH=08h,AH=09h,AH=4Bh,INT 17/AH=60h,INT 1F,INT 43,INT 44
----------100B--BH00-------------------------
INT 10 - VIDEO - SET BACKGROUND/BORDER COLOR
        AH = 0Bh
        BH = 00h
        BL = background/border color (border only in text modes)
SeeAlso: AH=0Bh/BH=01h
----------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
SeeAlso: AH=0Bh/BH=00h
----------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
SeeAlso: AH=0Dh,AH=46h
----------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
SeeAlso: AH=0Ch,AH=47h
----------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
SeeAlso: AH=02h,AH=0Ah
----------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, VGA, and UltraVision return either AL=03h (color) or AL=07h
       (monochrome) in all extended-row text modes
SeeAlso: AH=00h,AH=05h,AX=1130h,AX=CD04h
----------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
       under UltraVision, the palette locking status (see AX=CD01h)
       determines the outcome
SeeAlso: AX=1002h,AX=1007h,AX=CD01h
----------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
Note: under UltraVision, the palette locking status (see AX=CD01h)
      determines the outcome
SeeAlso: AX=1002h,AX=1008h,AX=CD01h
----------101002-----------------------------
INT 10 - VIDEO - SET ALL PALETTE REGISTERS (PCjr,EGA,VGA)
        AX = 1002h
        ES:DX -> palette register list
Note: under UltraVision, the palette locking status (see AX=CD01h)
      determines the outcome
SeeAlso: AX=1000h,AX=1001h,AX=1009h,AX=CD01h

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
SeeAlso: AH=08h
----------101007-----------------------------
INT 10 - VIDEO - GET INDIVIDUAL PALETTE REGISTER (VGA,UltraVision v2+)
        AX = 1007h
        BL = palette or attribute (undoc) register number (see AX=1000h)
Return: BH = palette or attribute register value
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=1000h,AX=1009h
----------101008-----------------------------
INT 10 - VIDEO - READ OVERSCAN (BORDER COLOR) REGISTER (VGA,UltraVision v2+)
        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
        ES:DX -> buffer (3 * CX bytes in size) (see also AX=1012h)
Return: buffer filled with CX red, green and blue triples
SeeAlso: AX=1012h,AX=1015h
----------101018-----------------------------
INT 10 - VIDEO - undocumented - SET PEL MASK (VGA/MCGA)
        AX = 1018h
        BL = new PEL value
SeeAlso: AX=1019h
----------101019-----------------------------
INT 10 - VIDEO - undocumented - READ PEL MASK (VGA/MCGA)
        AX = 1019h
Return: BL = value read
SeeAlso: AX=1018h
----------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
SeeAlso: AX=1013h
----------10101B-----------------------------
INT 10 - VIDEO - PERFORM GRAY-SCALE SUMMING (VGA/MCGA)
        AX = 101Bh
        BX = starting palette register
        CX = number of registers to convert
SeeAlso: AH=12h/BL=33h
----------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 ***)
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
             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
SeeAlso: INT 05
----------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
----------1012--BL33-------------------------
INT 10 - VIDEO - ALTERNATE FUNCTION SELECT (VGA, MCGA) - GRAY-SCALE SUMMING
        AH = 12h
        BL = 33h
        AL = 00h enable gray scale summing
             01h disable gray scale summing
Return: AL = 12h if function supported
SeeAlso: AX=101Bh,AX=BF06h
----------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: recognizes 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
SeeAlso: AH=09h,AH=0Ah
----------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
SeeAlso: AH=15h

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 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
 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 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