home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / vga < prev    next >
Text File  |  1990-01-04  |  34KB  |  824 lines

  1. .VGA BIOS STARTING ADDRESS:
  2.  
  3. .VGA BIOS SIZE:
  4.  
  5. .VGA ROM BIOS main feature :
  6.  1. Video adapter diagnostic (self-test)
  7.  2. Video service routines
  8.  3. ASCII code table
  9.  4. Video parameter table 
  10.  
  11. .I/O ROM construction:
  12.  1. The first word: 55 AA as identifier
  13.  2. Byte 02: total length /512
  14.  3. Jump instruction
  15.  
  16. .MAIN FEATURE:
  17.  
  18.  1.DIAGNOSTIC:
  19.  2.SERVICE ROUTINE:
  20.  
  21. .BACKWARD CAPABILITY:
  22.  
  23. .MEMORY CONFIGURATION:
  24.  
  25. .NMI: 
  26.  
  27. Sequence:
  28.  
  29. 1. Disable VGA 
  30.  
  31. 2. Check if other display card exists?
  32.   
  33.    write 4 words to VRAM (B000 & B800)
  34.    read back
  35.    If VRAM R/W O.K then set equip_flag and CF
  36.  
  37. 3. Enable VGA and access I/O
  38.  
  39. 4. Set fixed vector      (Note 1)
  40.    INT 10h  : 
  41.    INT 1Fh  : 2nd 128 8x8 ASCII code
  42.    INT 43h  : 1st 128 8x8 ASCII code
  43.    INT 1Dh  :  
  44.    INT 6dh  :
  45.    INT 42h  : IBM (CGA,MDA,MGA) original INT 10 vector (F000:F065) 
  46.          
  47. 5. Test video RAM
  48.    By writing a pattern to VRAM then reading it back
  49.    If an error occurs, sound 1 long and 2 short error beeps.
  50.  
  51. 6. Sense monitor type
  52.    R G B -- 12h,12h,12h : If port 3C2h bit 4 on, color monitor is attached
  53.    R G B --   4,12h,4   : If port 3C2h bit 4 on, mono monitor is attached
  54.    else, no monitor is attached.
  55.  
  56. 7. Dual (alternative) monitor test 
  57.    Set corresponding and relative flags 
  58.  
  59. 8. Set CRT mode according to the current flags setting
  60.  
  61. 9. Test vertical retrace signal
  62.    Read input status register, if an error occurrs, sound 1 long and 3 short 
  63.    error beeps.
  64.  
  65. 10. Show ACER copyright
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.                  ****************************************
  75.                  *                                      *
  76.                  ******       INTRODUCTION       ********
  77.                  *                                      *
  78.                  ****************************************
  79.  
  80.  
  81.  
  82.          A. VIDEO MODE :
  83.             1. Text mode
  84.             2. Graphics mode
  85.      
  86.          B. DISPLAY MEMORY ORGANIZATION
  87.      
  88.          C. CHARACTER GENERATOR
  89.      
  90.          D. COLOR PALETTE AND COLOR REGISTER
  91.      
  92.          E. GRAPHICS READ AND WRITE MODES
  93.             1. Write modes : 0-3
  94.             2. Read modes  : 0-1
  95.      
  96.          F. VGA REGISTER
  97.             1. General or External registers
  98.             2. Sequencer registers
  99.             3. CRTC registers
  100.             4. Graphics registers
  101.             5. Attribute registers
  102.      
  103.          G. VGA BIOS DATA AREA
  104.      
  105.          H. VIDEO BIOS SERVICE ROUTINES
  106.      
  107.      
  108.  
  109.  
  110.                   ************************************
  111.                   *                                  *
  112.                   *******     TEXT  MODES      *******
  113.                   *                                  *
  114.                   ************************************
  115.  
  116.  ┌────────────────────────────────────────────────────────────────────────────────┐
  117.  │ Mode      Type of      #Chars              Display Page    Resolution   Buffer │
  118.  │           Adapter     (X/Y)   Char Box   Format    no.      in Pixels          │
  119.  ├────────────────────────────────────────────────────────────────────────────────│
  120.  │ 0,1       EGA/VGA     40/25     8 x 8    16/256K   8        320 x 200   B8000  │
  121.  ├────────────────────────────────────────────────────────────────────────────────│
  122.  │ 0*,1*     EGA/VGA     40/25     8 x 14   16/256K   8        320 x 350   B8000  │
  123.  ├────────────────────────────────────────────────────────────────────────────────│     
  124.  │ 0+,1+     VGA         40/25     8 x 16   16/256K   8        320 x 400   B8000  │
  125.  ├────────────────────────────────────────────────────────────────────────────────│  
  126.  │ 2,3       EGA/VGA     80/25     8 x 8    16/256K   8        640 x 200   B8000  │
  127.  ├────────────────────────────────────────────────────────────────────────────────│ 
  128.  │ 2*,3*     EGA/VGA     80/25     8 x 14   16/256K   8        640 x 350   B8000  │
  129.  ├────────────────────────────────────────────────────────────────────────────────│ 
  130.  │ 2+,3+     VGA         80/25     8 x 16   16/256K   8        640 x 400   B8000  │
  131.  ├────────────────────────────────────────────────────────────────────────────────│ 
  132.  │ 7         EGA/VGA     80/25     9 x 14   bw        8        720 x 350   B0000  │
  133.  ├────────────────────────────────────────────────────────────────────────────────│  
  134.  │ 7+        VGA         80/25     9 x 16   bw        8        720 x 400   B0000  │
  135.  └────────────────────────────────────────────────────────────────────────────────┘ 
  136.  
  137. Notes:
  138.  
  139.    1. The asterisk (*) in the display mode indicates that the VGA is in a text mode
  140.       with 350 vertical lines.
  141.  
  142.    2. The plus (+) in the display mode indicates that the VGA is in a text mode
  143.       with 400 vertical lines.
  144.  
  145.    3. Display modes 0 through 6 emulate the Color Graphics Adapter(CGA).
  146.       Mode 7 emulates the IBM Monochrome MDA or Hercules Monochrome graphics.
  147.  
  148.    4. The code "bw" stands for black and white or synonymously monochrome.
  149.  
  150.  
  151.  
  152.  
  153.  
  154.                   ************************************
  155.                   *                                  *
  156.                   *******    GRAPHICS MODES    *******
  157.                   *                                  *
  158.                   ************************************
  159.  
  160. ┌─────────────────────────────────────────────────────────────────────────────┐
  161. │   Mode              #Chars            Display   Page     Resolution  Buffer │
  162. │  (Hex)   Adapter    (X/Y)   Char Box  Format    no.      in Pixels          │
  163. ├─────────────────────────────────────────────────────────────────────────────│  
  164. │  4,5     EGA/VGA    40/25     8 x 8   4/256K    1        320 x 200   B8000  │
  165. ├─────────────────────────────────────────────────────────────────────────────│
  166. │  6       EGA/VGA    80/25     8 x 8   2/256K    1        640 x 350   B8000  │
  167. ├─────────────────────────────────────────────────────────────────────────────│
  168. │  D       EGA/VGA    40/25     8 x 8   16/256K   8        320 x 200   A0000  │
  169. ├─────────────────────────────────────────────────────────────────────────────│
  170. │  E       EGA/VGA    80/25     8 x 8   16/256K   4        640 x 200   A0000  │
  171. ├─────────────────────────────────────────────────────────────────────────────│
  172. │  F       EGA/VGA    80/25     8 x 14  bw        2        640 x 350   A0000  │
  173. ├─────────────────────────────────────────────────────────────────────────────│
  174. │ 10       EGA/VGA    80/25     8 x 14  16/256K   2        640 x 350   A0000  │
  175. ├─────────────────────────────────────────────────────────────────────────────│
  176. │ 11       VGA        80/30     8 x 16  2/256K    1        640 x 480   A0000  │
  177. ├──────────────────────────────────────────────────────────────────────────── │
  178. │ 12       VGA        80/30     8 x 16  16/256K   1        640 x 480   A0000  │
  179. ├─────────────────────────────────────────────────────────────────────────────┤
  180. │ 13       VGA        40/25     8 x 8   256/256K  1        320 x 200   A0000  │
  181. └─────────────────────────────────────────────────────────────────────────────┘
  182.  
  183.  
  184.  
  185. ┌────────────────────────────────────────────────────────────────────────┐
  186. │  MODE                                                                  │
  187. │  (Hex)     # of Colors    # Bits per Plane  Bit Planes Affected  Notes │
  188. ├────────────────────────────────────────────────────────────────────────┤
  189. │   4,5          4           2                 0,1                  1    │
  190. ├────────────────────────────────────────────────────────────────────────│
  191. │   6            2           1                 0                    2    │
  192. ├────────────────────────────────────────────────────────────────────────│
  193. │   D           16           1                 0,1,2,3              3    │
  194. ├────────────────────────────────────────────────────────────────────────│
  195. │   E           16           1                 0,1,2,3              3    │
  196. ├────────────────────────────────────────────────────────────────────────│
  197. │   F            4           1                 0,2                  4    │
  198. ├────────────────────────────────────────────────────────────────────────│
  199. │   10          16           1                 0,1,2,3              3    │
  200. ├────────────────────────────────────────────────────────────────────────│
  201. │   11           2           1                 0                    2    │
  202. ├────────────────────────────────────────────────────────────────────────│
  203. │   12          16           1                 0,1,2,3              3    │
  204. ├────────────────────────────────────────────────────────────────────────┤
  205. │   13         256           8                 0,1,2 or 3           5    │
  206. └────────────────────────────────────────────────────────────────────────┘
  207.  
  208.    Notes:
  209.  
  210.    1.In modes 4 and 5, alternate bytes of data, each containing four pixels,
  211.      are stored in bit plane 0 and bit plane 1. Bit plane 0 contributes to the 
  212.      low-order bit, and bit plane 1 contributes to the high-order bit of the 
  213.      two-bit pixel.
  214.  
  215.    2.In modes 6 and 11 hex, each pixel consists of one bit in bit plane 0.
  216.  
  217.    3.In mode D,E,10,12 hex, each pixel corresponds to one bit in each of the 
  218.      four bit planes. Bit plane 0 contributes to the low-order bit, followed by 
  219.      bit plane 1, and bit plane 2. Bit plane 3 contributes to the high-order 
  220.      bit of the four bit pixel.
  221.  
  222.    4.In mode F hex, bit plane 0 contributes to the low-order bit and bit plane
  223.      2 contributes the high-order bit of the two bit pixel.
  224.  
  225.    5.In mode 13 hex, all four bit planes are chained together and each pixel
  226.      consists of eight bits. The plane in which a pixel resides depends on the
  227.      position of the pixel on the display. Each plane holds one-quarter of
  228.      the pixels.
  229.  
  230.  
  231.  
  232.  
  233.                   ************************************
  234.                   *                                  *
  235.                   *******   CHARACTER  FONTS   *******
  236.                   *                                  *
  237.                   ************************************
  238.  
  239.  
  240.  
  241.   There are 5 character fonts set supported:
  242.   8 by 8 ,8 by 14, 8 by 16, 9 by 14, and 9 by 16.
  243.  
  244.   The 9 by 14 and 9 by 16 character font are referred to as the supplement
  245.   character set. It is called supplemental because not all of the 256
  246.   characters are provided. Typical characters that are included in the 
  247.   supplement are quotation marks ("),the plus sign (+), the minus sign (-),
  248.   M,T,V,W,X,Y,Z,m,v,w and line-drawing symbols.
  249.  
  250.  
  251.  
  252.  
  253.  
  254.         
  255.                   ************************************
  256.                   *                                  *
  257.                   ****     CHARACTER ATTRIBUTE    ****
  258.                   *                                  *
  259.                   ************************************
  260.  
  261.                         A. MONOCHROME MODE
  262.                   
  263.  
  264.                      Mode 7: Monochrome Attributes
  265.  ──────────────────────────────────────────────────────────────────────────────
  266.     Background (bits 6-4)     Foreground (bits 2-0)       Attribute
  267.  ──────────────────────────────────────────────────────────────────────────────
  268.     0                         0                          Black
  269.     0                         1                          Underline
  270.     0                         7                          Normal (white on black)
  271.     7                         0                          Reversed (black on white)
  272.     7                         7                          White
  273.  
  274.  
  275.  
  276.  
  277.                Mode 7: Examples of Monochrome Attributes
  278.  
  279.  ────────────────────────────────────────────────────────────────────────
  280.    Blink    Background   Intens   Foreground    Code
  281.    (Bit 7)  (bits 6-4)   (Bit 3)  (Bit 2-0)    (Hex)   Attribute
  282.  ────────────────────────────────────────────────────────────────────────
  283.    0        0            0        1            1       Underline
  284.    0        0            1        1            9       Intense Underline
  285.    0        7            0        0            70      Reversed
  286.    0        7            1        0            74      Intense Reversed
  287.    1        7            0        0            F0      Blinking Reversed
  288.    1        7            1        0            F1      Intense Blinking Reserved
  289.  
  290.  
  291.  
  292.                      Mode 7: Palette Registers
  293.  ───────────────────────────────────────────────────────────────────────
  294.    Register #      Register Value       Register #       Register Value
  295.  ───────────────────────────────────────────────────────────────────────
  296.    0               00                   8                10
  297.    1               08                   9                18
  298.    2               08                   A                18
  299.    3               08                   B                18
  300.    4               08                   C                18
  301.    5               08                   D                18
  302.    6               08                   E                18
  303.    7               08                   F                18
  304.  
  305.  
  306.   
  307.  
  308.  
  309.  
  310.                    B. SIXTEEN-COLOR MODE
  311.  
  312.              Default Colors for a 16-color Palette
  313.        ────────────────────────────────────────────────
  314.          Palette Register (Hex)               Color
  315.        ────────────────────────────────────────────────
  316.                0                              Black
  317.                1                              Blue
  318.                2                              Green
  319.                3                              Cyan
  320.                4                              Red
  321.                5                              Magenta
  322.                6                              Brown
  323.                7                              White
  324.                8                              Gray
  325.                9                              Light Blue
  326.                A                              Light Green
  327.                B                              Light cyan
  328.                C                              Light red
  329.                D                              Light Magenta
  330.                E                              Light Brown (yellow)
  331.                F                              Bright White
  332.       
  333.  
  334.  
  335.                    C. ATTRIBUTE BYTE IN THE 16-COLOR MODE
  336.  
  337.  
  338.               7     6     5     4     3     2     1     0
  339.             ┌──────────────────────┬──────────────────────┐
  340.             │                      │                      │
  341.             └──────────────────────┴──────────────────────┘
  342.                  Background             Foreground
  343.  
  344.  
  345.              7     6     5     4     3     2     1     0
  346.             ┌──────────────────────┬────┬─────────────────┐
  347.             │                      │    │                 │
  348.             └──────────────────────┴─┼──┴─────────────────┘
  349.                 Background           │    Forground
  350.                                      Font #
  351.  
  352.              7     6     5     4     3     2     1     0
  353.             ┌───┬──────────────────┬──────────────────────┐
  354.             │   │                  │                      │
  355.             └─┼─┴──────────────────┴──────────────────────┘
  356.               │    Background           Foreground
  357.              Blinking
  358.  
  359.  
  360.              7     6     5     4     3     2     1     0
  361.             ┌───┬──────────────────┬───┬──────────────────┐
  362.             │   │                  │   │                  │
  363.             └─┼─┴──────────────────┴─┼─┴──────────────────┘
  364.               │     Background       │      Foreground
  365.             Blinking                Font #
  366.  
  367.  
  368.   Note:
  369.  
  370.   1.  The character attribute byte determines the character color,
  371.       blinking status and selects from one of the two character
  372.       sets.
  373.  
  374.       Bit 3 of the character attribute byte is used either to select one of
  375.       16 foreground colors for the associated character or to choose from one
  376.       of two resident character sets.
  377.  
  378.       Bit 7 is selected for dual function; either being part of the
  379.       background color code or being a switch for the blinking feature.
  380.  
  381.   2.  The default alphanumeric characters are defined by the bit patterns in the 
  382.       first table in MAP 2, regardless of the value of bit 3 of the attribute
  383.       bytes of the characters displayed.
  384.  
  385.       Changing the value in the Character Map Select register, changes the
  386.       character definition tables associated with bit 3 of the attribute bytes.
  387.  
  388.       If two different values appear in the bit fields in the Character Map 
  389.       Select register, the value of bit 3 designates one of the two different character
  390.       definition tables.
  391.  
  392.  
  393.  
  394.  
  395.  
  396.                   ************************************
  397.                   *                                  *
  398.                   *******    VGA REGISTERS      ******
  399.                   *                                  *
  400.                   ************************************
  401.  
  402.                      General or External Registers
  403. _____________________________________________________________________________              
  404.                Name                 Write (Hex)     Read (Hex)
  405.                Misc. Output         3C2             3CC
  406.                Feature Control      3DA/3BA         3CA
  407.                Input Status #0                      3C2
  408.                Input Status #1                      3DA/3BA
  409. _____________________________________________________________________________              
  410.  
  411.  
  412.  
  413.                      Sequencer Registers
  414. _____________________________________________________________________________              
  415.                Name               Index        R/W Port(Hex)
  416.                Address                x        3C4
  417.                Reset                  0        3C5
  418.                Clocking Mode          1        3C5
  419.                Map Mask               2        3C5
  420.                Character Map Select   3        3C5
  421.                Memory Mode            4        3C5
  422. _____________________________________________________________________________              
  423.  
  424.  
  425.                     Attribute Controller Registers
  426. _____________________________________________________________________________              
  427.                Name                  Index        R/W Port(Hex)
  428.                Address                   x        3C0
  429.                Palette                 0-F        3C1
  430.                Mode Control             10        3C1
  431.                Overscan Color           11        3C1
  432.                Color Plane Enable       12        3C1
  433.                Horizontal Pixel Panning 13        3C1
  434.                Color Select             14        3C1
  435. _____________________________________________________________________________              
  436.  
  437.  
  438.  
  439.                      Graphics Control Registers:
  440. _____________________________________________________________________________              
  441.                Name               Index        R/W Port(Hex)
  442.                Graphics Address       x           3CE
  443.                Set/Reset              0           3CF
  444.                Enable Set/Reset       1           3CF
  445.                Color Compare          2           3CF
  446.                Data Rotate            3           3CF
  447.                Read Map Select        4           3CF
  448.                Mode                   5           3CF
  449.                Miscellaneous          6           3CF
  450.                Color Don't Care       7           3CF
  451.                Bit Mask               8           3CF
  452. _____________________________________________________________________________              
  453.  
  454.  
  455.                      CRT Controller Registers
  456. _____________________________________________________________________________              
  457.                Name               Index        R/W Port(Hex)
  458.         Address
  459.         Horizontal Total
  460.         Horizontal Display End
  461.         Start Horizontal Blank
  462.         End Horizontal Blank
  463.         Start Horizontal Retrace
  464.         End Horizontal Retrace
  465.         Vertical Total
  466.         Overflow
  467.         Preset Row Scan
  468.         Max Scan Line
  469.         Cursor Start
  470.         Cursor End
  471.         Start Address High
  472.         Start Address Low
  473.         Cursor Location High
  474.         Cursor Location Low
  475.         Vertical Retrace Start
  476.         Vertical Retrace Low
  477.         Vertical Display End
  478.         Offset
  479.         Underline Location
  480.         Start Vertical Blank
  481.         End Vertical Blank
  482.         Mode Control
  483.         Line Compare
  484. _____________________________________________________________________________              
  485.  
  486.  
  487.  
  488.  
  489.  
  490.                   ************************************
  491.                   *                                  *
  492.                   *******    MEMORY MAPPING     ******
  493.                   *                                  *
  494.                   ************************************
  495.  
  496.  
  497.    The video buffer can be configured as the following :
  498.  
  499.       1). A000:0 -------  128K for mode D,E,F,10,11,12 and 13
  500.  
  501.       2). A000:0 -------   64K for character generator for text modes
  502.  
  503.       3). B000:0 -------   32k for mode 7 and 7+
  504.  
  505.       4). B800:0 -------   32K for text mode 0,1,2,3 and graphics modes 4,5,6
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.                   ************************************
  513.                   *                                  *
  514.                   *******  CHARACTER GENERATOR  ******
  515.                   *                                  *
  516.                   ************************************
  517.  
  518.  
  519.  The character generator consists of the dot patterns that represent each 
  520.  character in the character set.
  521.  
  522.  The character dot patterns are stored in character boxes, each of which is
  523.  32 bytes long.
  524.  
  525.  Bits set to 1 in the character font will be displayed in the foreground color,
  526.  and bits reset to 0 will be displayed in the background color.
  527.  
  528.  The display memory consists of four display planes called bit planes, each
  529.  being 64K bytes long.
  530.  
  531.  VGA supports eight font tables. Each table consists of 256 32-byte bit patterns,
  532.  so the character box height is 32 scan lines. When the displayed character box contains
  533.  fewer than 32 lines, the character generator ignores the extra bytes in each character
  534.  definition.
  535.  
  536.  The character generator has 8 blocks as shown below:
  537.  
  538.   A000:0   ╔═════════╗            ┌────────────────────┐  
  539.            ║ Font 0 ─╫──────── 0 │         0          │
  540.     2000   ╟─────────║            ├────────────────────│
  541.            ║ Font 4  ║          1 │         1          │                            
  542.     4000   ╠═════════╣            ├────────────────────│   character 0
  543.            ║ Font 1  ║            │         .          │
  544.     6000   ╟─────────║            │         .          │
  545.            ║ Font 5  ║            │         .          │
  546.     8000   ╠═════════╣            ├────────────────────│
  547.            ║ Font 2  ║         31 │        31          │
  548.     A000   ╟─────────║       ─────┼────────────────────┼─────────
  549.            ║ Font 6  ║         32 │         0          │
  550.     C000   ╠═════════╣            ├────────────────────│         
  551.            ║ Font 3  ║            │         .          │    character 1
  552.     E000   ╟─────────║            │         .          │
  553.            ║ Font 7  ║            │────────────────────│                   
  554.            ╙═════════╝         63 │        31          │   
  555.                              ─────┼────────────────────┼─────────
  556.                                64 │         .          │
  557.                                   │         .          │
  558.                                   │         .          │
  559.                               ────┼────────────────────┼──────────
  560.                                   │         0          │
  561.                                   ├────────────────────│
  562.                                   │                    │
  563.                                   │                    │     character 255
  564.                                   ├────────────────────┤
  565.                              8191 │        31          │
  566.                                   └────────────────────┘
  567.                          
  568.                           
  569.         
  570.  
  571.  
  572.                   ***************************************************
  573.                   *                                                 *
  574.                   *******   GRAPHICS MODES PIXEL PROGRAMMING   ******
  575.                   *                                                 *
  576.                   ***************************************************
  577.  
  578.                   A. Relative Registers Accessed:
  579.  
  580.                      Graphics Control Registers:
  581.                     
  582.                      Name               Index        R/W Port(Hex)
  583.                      Graphics Address       x           3CE
  584.                      Set/Reset              0           3CF
  585.                      Enable Set/Reset       1           3CF
  586.                      Color Compare          2           3CF
  587.                      Data Rotate            3           3CF
  588.                      Read Map Select        4           3CF
  589.                      Mode                   5           3CF
  590.                      Miscellaneous          6           3CF
  591.                      Color Don't Care       7           3CF
  592.                      Bit Mask               8           3CF
  593.  
  594.                  B. Read/Write Mode
  595.  
  596.                     1. Write Mode 0 (EGA/VGA)
  597.                     2. Write Mode 1 (EGA/VGA)
  598.                     3. Write Mode 2 (EGA/VGA)
  599.                     4. Write Mode 3 (VGA Only)
  600.                     5. Read Mode 0 (EGA/VGA)
  601.                     6. Read Mode 1 (EGA/VGA)
  602.  
  603.  
  604.  
  605.  
  606.  
  607.                   ***************************************
  608.                   *                                     *
  609.                   *******  PALETTE/COLOR REGISTER  ******
  610.                   *                                     *
  611.                   ***************************************
  612.  
  613.                
  614.                             Palette Utilization
  615.      ───────────────────────────────────────────────────────────────────────
  616.       Display Mode (hex)     Number of Colors     Palette Register Affected
  617.  
  618.        0,1                      16                     0-15
  619.        2,3                      16                     0-15
  620.        4,5                       4                     0,1,2,3
  621.        6                         2                     0,1
  622.        7                         4                     0,1,4,5
  623.        D                        16                     0-15
  624.        E                        16                     0-15
  625.        F                         4                     0,1,4,5
  626.        10                       16                     0-15
  627.        11                        2                     0,1
  628.        12                       16                     0-15
  629.        13                      256                     0-15
  630.  
  631.                        Mode 7 Palette Defult Values
  632.      ──────────────────────────────────────────────────────────
  633.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  634.      Value     0  8  8  8  8  8  8  8  10 18 18 18 18 18 18 18
  635.      ───────────────────────────────────────────────────────────
  636.  
  637.  
  638.                        Mode F Palette Default Values
  639.      ──────────────────────────────────────────────────────────
  640.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  641.      Value     0  8  -  -  18 18 -  -  -  -  -  -  -  -  -  - 
  642.      ───────────────────────────────────────────────────────────
  643.  
  644.  
  645.                        Mode 0,1,2,3 Palette Default Values
  646.      ──────────────────────────────────────────────────────────
  647.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  648.      Value     0  1  2  3  4  5  14 7  38 39 3A 3B 3C 3D 3E 3F
  649.      ───────────────────────────────────────────────────────────
  650.  
  651.  
  652.                        CGA-compatible Color Selection
  653.      ────────────────────────────────────────────────────────────────
  654.      ATR 1    ATR 0   Set 1         Set 0        VGA Palette Register
  655.      0        0       Background    Background    0
  656.      0        1       Cyan          Green         1
  657.      1        0       Magenta       Red           2
  658.      1        1       White         Brown         3
  659.  
  660.  
  661.                        Mode 6 Palette Default Values
  662.      ──────────────────────────────────────────────────────────
  663.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  664.      Value     0  17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 
  665.      ───────────────────────────────────────────────────────────
  666.  
  667.  
  668.  
  669.                        Mode 11 Palette Default Values
  670.      ──────────────────────────────────────────────────────────
  671.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  672.      Value     0  37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 
  673.      ───────────────────────────────────────────────────────────
  674.  
  675.  
  676.  
  677.                    Mode D,E,10 and 12 Palette Default Values
  678.      ──────────────────────────────────────────────────────────
  679.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  680.      Value     0  1  2  3  4  5  14 7  38 39 3A 3B 3C 3D 3E 3F
  681.      ───────────────────────────────────────────────────────────
  682.  
  683.  
  684.                        Mode 13 Palette Default Values
  685.      ──────────────────────────────────────────────────────────
  686.      Register  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  687.      Value     0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  688.      ───────────────────────────────────────────────────────────
  689.  
  690.  
  691.                        COLOR REGISTERS
  692.  
  693.      The VGA is equipped with 256 Color Registers. A pixel or character in 
  694.      display memory consists of one to eight bits of data. This data is
  695.      used to address the 16 palette registers. The output of these palette
  696.      registers is used in conjunction with the data in displaying memory to 
  697.      address the color registers. The color registers contain the color codes
  698.      that are output to the digital-to-analog converters (DAC). The output of
  699.      the DAC are sent to the monitor. Each of the color registers consists of 
  700.      a red, green, and blue component. Each of these color components is six bits
  701.      wide.
  702.      
  703.  
  704.  
  705.  
  706.  
  707.            
  708.                   ************************************
  709.                   *                                  *
  710.                   *******    VGA BIOS CALLS     ******
  711.                   *                                  *
  712.                   ************************************
  713.  
  714.  
  715.                               CONTROL
  716.        ___________________________________________________________
  717.  
  718.        Mode Set
  719.        Select Active Display Page
  720.        Select Alternate Print Screen Routine
  721.        Video Enable/Disable
  722.        Display Switch
  723.        Video Screen On/Off
  724.  
  725.  
  726.                           RETURN STATE
  727.        ___________________________________________________________
  728.        Return Curren Video State
  729.        Return Video Information
  730.        Read/Write Displat Combination Code
  731.        Return Functionality/State Information
  732.        Save/Restore Video State
  733.  
  734.  
  735.                          INTERACTIVE
  736.        ___________________________________________________________
  737.        Set Cursor Type
  738.        Set Cursor Position
  739.        Read Cursor Position
  740.        Cursor Emulation
  741.  
  742.  
  743.                          TEXT
  744.        ___________________________________________________________
  745.        Scroll Active Page Up
  746.        Scroll Active Page Down
  747.        Read Character/Attribute
  748.        Write Character/Attribute
  749.        Write Character Only
  750.        Write Teletypewriter to Active Page
  751.        Select Scan Lines for Text Modes
  752.        Write String
  753.  
  754.  
  755.                         GRAPHICS
  756.        ___________________________________________________________
  757.  
  758.        Write Dot
  759.        Read Dot
  760.  
  761.  
  762.                            PALETTE
  763.        ___________________________________________________________
  764.        Set Color Palette
  765.        Set Individual Palette Register
  766.        Set Overscan (Boarder) Register
  767.        Set All Palette Registers and Overscan
  768.        Toggle Intensity/Blinking Bit
  769.        Read Individual Palette Register
  770.        Read Overscan Resister
  771.        Read all Palette Registers and Overscan
  772.        Default Palette Loading During Mode Set
  773.  
  774.  
  775.                        COLOR REGISTERS
  776.        ___________________________________________________________
  777.        Set Individual Color Register
  778.        Set block of Color Registers
  779.        Select Color Page
  780.        Read Individual Color Register
  781.        Read Block of Color Registers
  782.        Read Current Color Page Number
  783.        Sum Color Values to Gray Scale
  784.        Default Palette Loading During Mode Set
  785.        Summing to Gray Scales
  786.  
  787.                     CHARACTER GENERATOR 
  788.        ___________________________________________________________
  789.        User text Load with Reset
  790.        ROM Monochrome Set with Reset
  791.        ROM 8x8 Character Set Load with Reset
  792.        Set Block Specifier           
  793.        ROM 8x16 Character Set Load with Reset
  794.        User Alpha Load
  795.        ROM Monochrome Set
  796.        ROM 8x8 Character Set Load 
  797.        ROM 8x16 Character Set Load
  798.        User Graphics Characters INT 1FH (8x8)
  799.        User Graphics Characters
  800.        Graphics Mode ROM 8x14 Character Set Load
  801.        Graphics Mode ROM 8x8 Character Set Load 
  802.        Graphics Mode ROM 8x16 Character Set Load
  803.        Return Character Generator Information
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.