home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / DOSREF18.ZIP / CHAPTER.003 < prev    next >
Encoding:
Text File  |  1990-11-07  |  136.2 KB  |  2,968 lines

  1.  
  2.    **  Programmer's  Technical  Reference  for  MSDOS  and  the  IBM  PC **
  3.                         ┌─────────────────────────────┐
  4.                         │ Shareware Version, 10/26/90 │
  5.                         │  Please Register Your Copy  │
  6.                         └─────────────────────────────┘
  7.                     Copyright (c) 1987, 1990 Dave Williams
  8.                           USA copyright TXG 392-616
  9.                      ISBN 1-878830-02-3 (disk-based text)
  10.  
  11.  
  12.                           C H A P T E R    T H R E E
  13.  
  14.                  THE PC ROM BIOS - Interrupts 10h through 19h
  15.  
  16.  
  17. ┌─────────────────────────────────────────────────────────────────────────────┐
  18. │Interrupt 10h  Video I/O - services to handle video output                   │
  19. └─────────────────────────────────────────────────────────────────────────────┘
  20. (0:0040h)       The ROM video routines in the original PC BIOS are designed for
  21.                 use with the Color Graphics Adapter and incorporate code to test
  22.                 for the horizontal retrace before writing. The check is
  23.                 performed no matter what actual display adapter is installed.
  24.                 The ROM character table for the first 128 characters is located
  25.                 at 0FA6Eh in the PC. Int 01Fh can be used to point to a second
  26.                 table of 128 characters.
  27.                  CS, SS, DS, ES, BX, CX, DX are preserved during call. All
  28.                 others are destroyed.
  29.  
  30. Function 00h    Determine or Set Video State
  31. entry   AH      00h     set video mode
  32.         AL      display mode:                    CGA|PCjr|MDA|MCGA|EGA|VGA|8514
  33.                 00h     40x25 B/W text           CGA|PCjr|   |    |EGA|   |
  34.   16 color              40x25, 320x400 graphics     |    |   |MCGA|   |   |
  35.   16 color              40x25, 360x400 graphics     |    |   |    |   |VGA|
  36.   16 color      01h     40x25 color text         CGA|PCjr|   |    |EGA|   |
  37.                 02h     80x25 B/W text           CGA|PCjr|   |    |EGA|   |
  38.   16 color              80x25 640x400 graphics      |    |   |MCGA|   |   |
  39.   16 color              80x25 720x400 graphics      |    |   |    |VGA|   |
  40.   16 color      03h     80x25 color text         CGA|PCjr|   |    |EGA|VGA|
  41.   4 color       04h     320x200 color graphics   CGA|PCjr|   |    |EGA|   |
  42.   4 tone gray   05h     320x200 B/W graphics     CGA|PCjr|   |    |EGA|   |
  43.   2 color       06h     640x200 B/W graphics     CGA|PCjr|   |    |EGA|   |
  44.   monochrome    07h     80x25 monochrome text       |    |MDA|    |EGA|   |
  45.   16 color      08h     160x200 color graphics   CGA|PCjr|   |    |   |   |
  46.   16 color      09h     320x200 color graphics      |PCjr|   |    |   |VGA|
  47.   4 color       0Ah     640x200 color graphics      |PCjr|   |    |   |   |
  48.      N/A        0Bh     BIOS font load              |    |   |    |EGA|VGA|
  49.      N/A        0Ch     BIOS font load              |    |   |    |EGA|VGA|
  50.   16 color      0Dh     320x200 graphics            |    |   |    |EGA|VGA|
  51.   16 color      0Eh     640x200 graphics            |    |   |    |EGA|VGA|
  52.   monochrome    0Fh     640x350 graphics            |    |   |    |EGA|VGA|
  53.   16 & 64 color 10h     640x350 color hi-res        |    |   |    |EGA|VGA|
  54.   2 color       11h     640x480 graphics            |    |   |MCGA|   |VGA|
  55.   16 color      12h     640x480 graphics            |    |   |    |   |VGA|
  56.   256 color     13h     320x200 graphics            |    |   |MCGA|   |VGA|8514
  57.                 14h-20h used by EGA and VGA graphics modes
  58.                 18h     132x44 8x8 char mono        | Tseng Labs EVA
  59.                 19h     132x25 8x14 char mono       | Tseng Labs EVA
  60.                 1Ah     132x28 8x13 char mono       | Tseng Labs EVA
  61.  monochrome     21h     Hercules Graphics, Graphics Page 1
  62.  monochrome     22h     Hercules Graphics, Graphics Page 2
  63.                 22h     132x44                      | Tseng, Ahead
  64.                 23h     132x25                      | Tseng Labs EVA
  65.                         132x25                      | Ahead Systems EGA2001
  66.                         132x25                      | ATI EGA Wonder
  67.                 24h     132x28                      | Tseng Labs EVA
  68.                 25h     80x60  640x480              | Tseng Labs EVA
  69.  16 color               640x480                     | VEGA VGA
  70.                 26h     80x60                       | Tseng Labs EVA
  71.                         80x60   640x480             | Ahead Systems EGA2001
  72.  16 color       27h     720x512                     | VEGA VGA
  73.  monochrome             132x25                      | ATI EGA Wonder
  74.                 28h     unknown                     | VEGA VGA
  75.  16 color       29h     800x600                     | VEGA VGA
  76.  256 color      2Dh     640x350                     | VEGA VGA
  77.  256 color      2Eh     640x480                     | VEGA VGA
  78.  256 color      2Fh     720x512                     | VEGA VGA
  79.  256 color      30h     800x600                     | VEGA VGA
  80.                         unknown                     | AT&T 6300
  81.  16 color       36h     960x720                     | VEGA VGA
  82.  16 color       37h     1024x768                    | VEGA VGA
  83.  monochrome             132x44                      | ATI EGA Wonder
  84.  2 color        40h     640x400                     | AT&T 6300
  85.                         80x43                       | VEGA VGA
  86.  16 color       41h     640x200                     | AT&T 6300
  87.                         132x25                      | VEGA VGA
  88.  16 color       42h     640x400                     | AT&T 6300
  89.                         132x43                      | VEGA VGA
  90.                 43h     unsupported 640x200 of 640x400 viewport  AT&T 6300
  91.                         80x60                       | VEGA VGA
  92.                 44h     disable VDC and DEB output  | AT&T 6300
  93.                         100x60                      | VEGA VGA
  94.                 48h     80x50   640x400             | AT&T 6300
  95.                 4Dh     120x25                      | VEGA VGA
  96.                 4Eh     120x43                      | VEGA VGA
  97.                 4Fh     132x25                      | VEGA VGA
  98.  monochrome     50h     132x25                      | Ahead Systems EGA2001
  99.  16 color               640x480                     | Paradise EGA-480
  100.  monochrome             80x43                       | VEGA VGA
  101.                         640x480 mono?               | Taxan 565 EGA
  102.                 51h     80x30                       | Paradise EGA-480
  103.  monochrome             132x25                      | VEGA VGA
  104.                         640x480 ?                   | ATI EGA Wonder
  105.  monochrome     52h     132x44                      | Ahead Systems EGA2001
  106.  monochrome             132x43                      | VEGA VGA
  107.                         752x410 ?                   | ATI EGA Wonder
  108.                 53h     800x560 ?                   | ATI EGA Wonder
  109.                 54h     132x43                      | Paradise EGA-480
  110.  16 color               132x43                      | Paradise VGA
  111.  16 color               132x43                      | Paradise VGA on multisync
  112.                         132x43                      | Taxan 565 EGA
  113.                 55h     132x25                      | Paradise EGA-480
  114.  16 color               132x25                      | Paradise VGA
  115.  16 color               132x25                      | Paradise VGA on multisync
  116.                         132x25                      | Taxan 565 EGA
  117.                 56h     132x43                      | NSI Smart EGA+
  118.                         132x43                      | Paradise VGA
  119.                         132x43                      | Paradise VGA on multisync
  120.  monochrome             132x43                      | Taxan 565 EGA
  121.                 57h     132x25                      | NSI Smart EGA+
  122.                         132x25                      | Paradise VGA
  123.                         132x25                      | Paradise VGA on multisync
  124.  monochrome             132x25                      | Taxan 565 EGA
  125.                 58h     100x75   800x600 16/256k    | Paradise VGA
  126.                 59h     100x75   800x600            | Paradise VGA
  127.                 5Eh     640x400                     | Paradise VGA,VEGA VGA
  128.                 5Fh     640x480                     | Paradise VGA
  129.                 60h     80x?   ?x400                | Corona/Cordata BIOS v4.10+
  130.                         752x410                     | VEGA VGA
  131.                 60h     400 line graphics+80 col text |(Corona/Cordata)
  132.                 61h     400 line graphics           | Corona/Cordata BIOS v4.10+
  133.                         720x540                     | VEGA VGA
  134.                 62h     800x600                     | VEGA VGA
  135.  16 color       71h     100x35 800x600              | NSI Smart EGA+
  136.                 74h     640x400 graphics            | Toshiba 3100
  137.                 7Eh     Special Mode Set            | Paradise VGA (see below)
  138.                         BX      horizontal dimension of the mode desired
  139.                         CX      vertical dimension of the mode desired
  140.                                 (both BX/CX in pixels for graphics modes, rows
  141.                                 for text modes)
  142.                         DX      number of colors of the mode desired
  143.                                 (use 0 for monochrome modes)
  144.                         return  BH      7Eh if successful
  145.                 7Fh     Special Function Set        | Paradise VGA (see below)
  146.                         BH      00h     Set VGA Operation
  147.                                 01h     Set Non-VGA Operation
  148.                                 02h     Query Mode Status
  149.                         return  BL      0       if operating in VGA mode
  150.                                         1       if non-VGA mode.
  151.                                 CH      total video RAM size in 64k byte units
  152.                                 CL      video RAM used by the current mode
  153.                                 03h  Lock Current Mode
  154.                                      Allows current mode (VGA or non-VGA) to
  155.                                      survive reboot.
  156.                         BH     0Ah,0Bh,0Ch,0Dh,0Eh,0Fh
  157.                                write paradise registers 0,1,2,3,4,5
  158.                                (port 03CEh indexes A,B,C,D,E,F)
  159.                         BL     value to set in the paradise register.
  160.                         BH     1Ah,1Bh,1Ch,1Dh,1Eh,1Fh
  161.                                read paradise registers 0,1,2,3,4,5
  162.                                (port 03CEh indexes A,B,C,D,E,F)
  163.                         return BL       value of the Paradise register
  164.                                BH       7Fh if successful.
  165.                         note   Color modes (0,1,2,3,4,5,6) will set non-VGA CGA
  166.                                operation. Monochrome mode 7 will set non-VGA
  167.                                MDA/Hercules operation.
  168.                 82h     80x25 B&W                   | AT&T VDC overlay mode *
  169.                 83h     80x25                       | AT&T VDC overlay mode *
  170.                 86h     640x200 B&W                 | AT&T VDC overlay mode *
  171.                 C0h     640x400   2/prog pallet     | AT&T VDC overlay mode *
  172.                 C4h     disable output              | AT&T VDC overlay mode *
  173.                 D0h     640x400                     | DEC VAXmate AT&T mode
  174.                 unknown 640x225                     | Z-100
  175.                 unknown 640x400                     | Z-100
  176.  
  177. note 1) If the high bit in AL is set, the display buffer is not cleared when a
  178.         new mode is selected. This may be used to mix modes on the display;
  179.         for example, characters of two difference sizes might be displayed
  180.      2) Modes 8-10 are available on the PCjr, Tandy 1000, and PS/2
  181.      3) IBM claims 100% software and hardware emulation of the CGA with the
  182.         MCGA chipset. All registers may be read and written as CGA. All
  183.         characters are double-scanned to give 80x25 with 400 line resolution.
  184.         The attributes for setting border color may be set on MCGA, but the
  185.         borders will remain the default color (they cannot actually be set)
  186.      4) The IBM Color Graphics Adapter (CGA) is too slow for the screen to
  187.         be updated before the vertical retrace of the monitor is completed.
  188.         If the video RAM is addressed directly, the screen will have "snow"
  189.         or interference. IBM's default is to turn the adapter off when it is
  190.         being updated, ie "flickering" when the display is scrolled.
  191.      5) The vertical retrace signal may be ignored when using the MCGA adapter.
  192.         The MCGA will not generate snow when written to. There is no flicker
  193.         with the MCGA.
  194.      6) The PCjr Video Gate Array uses a user-defined block of main system RAM
  195.         from 4 to 32k in size instead of having dedicated memory for the
  196.         display. Vertical retrace may be ignored when writing to the PCjr.
  197.         There is no flicker with the PCjr display.
  198.      7) The Hercules Graphics Card has 750x348 resolution
  199.      8) The Hercules Graphics Card takes 64k beginning at B:000 (same as MDA)
  200.      9) The CGA, MCGA, and VGA adapters use hardware address B:800
  201.     10) The BIOS clears the screen when the mode is set or reset.
  202.     11) For AT&T VDC overlay modes, BL contains the DEB mode, which may be 06h,
  203.         40h, or 44h
  204.     12) Int 10 will take the shapes of the first 128 characters (00h-7Fh) from
  205.         the table located in ROM at absolute address F000:FA6E. The EGA and VGA
  206.         have hardware capability to change this.
  207.  
  208.  
  209. Function 01h    Set Cursor Type - set the size of the cursor or turn it off
  210. entry   AH      01h
  211.         CH      bit values:
  212.                 bits 0-4  top line for cursor in character cell
  213.                 bits 5-6  blink attribute
  214.                           00    normal
  215.                           01    invisible (no cursor)
  216.                           10    slow      (not used on original IBM PC)
  217.                           11    fast
  218.         CL      bit values:
  219.                 bits 0-4  bottom line for cursor in character cell
  220. return  none
  221. note 1) The ROM BIOS default cursors are:  start    end
  222.                      monochrome mode 07h:    11     12
  223.                       text modes 00h-03h:     6      7
  224.      2) The blinking in text mode is caused by hardware and cannot be turned
  225.         off, though some kludges can temporarily fake a nonblinking cursor
  226.      3) The cursor is automatically turned off in graphics mode
  227.      4) Another method of turning off the cursor in text mode is to position it
  228.         to a nondisplayable address, such as (X,Y)=(0,25)
  229.      5) Buggy on EGA systems - BIOS remaps cursor shape in 43 line modes, but
  230.         returns unmapped cursor shape
  231.  
  232.  
  233. Function 02h    Set Cursor Position - reposition the cursor to (X,Y)
  234. entry   AH      02h
  235.         BH      video page
  236.                 00h     graphics mode
  237.                 03h     modes 2 and 3
  238.                 07h     modes 0 and 1
  239.         DH      row    (Y=0-24)
  240.         DL      column (X=0-79 or 0-39)
  241. return  none
  242. note 1) (0,0) is upper left corner of the screen
  243.  
  244.  
  245. Function 03h    Read Cursor Position - return the position of the cursor
  246. entry   AH      03h
  247.         BH      page number
  248.                 00h     in graphics modes
  249.                 03h     in modes 2 & 3
  250.                 07h     in modes 0 & 1
  251. return  CH      top line for cursor    (bits 4-0)
  252.         CL      bottom line for cursor (bits 4-0)
  253.         DH      row number    (Y=0-24)
  254.         DL      column number (X=0-79 or 0-39)
  255.  
  256.  
  257. Function 04h    Read Light Pen - fetch light pen information
  258. entry   AH      04h
  259. return  AH      00h     light pen not triggered
  260.         AH      01h     light pen is triggered, values in resgisters
  261.         BX      pixel column               (X=0-319 or 0-639)  graphics mode
  262.         CH      raster line                (Y=0-199)        old graphics modes
  263.         CX      (EGA) raster line (0-nnn)                   new graphics modes
  264.         DH      row of current position    (Y=0-24)            text mode
  265.         DL      column of current position (X=0-79 or 0-39)    text mode
  266. note    Not supported on PS/2
  267.  
  268.  
  269. Function 05h    Select Active Page - set page number for services 6 and 7
  270. entry   AH      05h
  271.         AL      number of new active page
  272.                 0-7     modes 00h and 01h (CGA)
  273.                 0-3     modes 02h and 03h (CGA)
  274.                 0-7     modes 02h and 03h (EGA)
  275.                 0-7     mode 0Dh (EGA)
  276.                 0-3     mode 0Eh (EGA)
  277.                 0-1     mode 0Fh (EGA)
  278.                 0-1     mode 10h (EGA)
  279.                 0       set address of graphics bitmap buffer (modes 60h,61h)
  280.                         BX      segment of buffer
  281.                 0Fh     get address of graphics bitmap buffer (modes 60h,61h)
  282.                         BX      segment of buffer
  283. for PCjr only:
  284.         AL      80h to read CRT/CPU page registers
  285.                 81h to set CPU page register to value in BL
  286.                 82h to set CRT page register to value in BH
  287.                 83h to set both CPU and page registers
  288.                     (and Corona/Cordata BIOS v4.10+)
  289.         BH      CRT page number for subfunctions 82h and 83h
  290.         BL      CPU page register for subfunctions 81h and 83h
  291. return  standard PC  none
  292.         PCjr         if called with AH bit 7=1 then
  293.                      BH      CRT page register (if AL >= 80h)
  294.                      BL      CPU page register (if AL >= 80h)
  295.         DX      segment of graphics bitmap buffer (video modes 60h,61h; AL=0Fh)
  296. note 1) Mono adapter has only one display page
  297.      2) CGA has four 80x25 text pages or eight 40x25 text pages
  298.      3) A separate cursor is maintained for each display page
  299.      4) Switching between pages does not affect their contents
  300.      5) Higher page numbers indicate higher memory positions
  301.  
  302.  
  303. Function 06h    Scroll Page Up - scroll up or clear a display "window"
  304. entry   AH      06h
  305.         AL      number of lines blanked at bottom of page
  306.                 0 = blank entire window
  307.         BH      attributes to be used on blank line
  308.         CH      row    (Y) of upper left corner or window
  309.         CL      column (X) of upper left corner of window
  310.         DH      row    (Y) of lower right corner of window
  311.         DL      column (X) of lower right corner of window
  312. return  none
  313. note 1) Push BP before scrolling, pop after
  314.      2) If in CGA text mode, affects current page only
  315.  
  316.  
  317. Function 07h    Scroll Page Down - scroll down or clear a display "window"
  318. entry   AH      07h
  319.         AL      number of lines to be blanked at top of page
  320.                 0 = blank entire window
  321.         BH      attributes to be used on blank line
  322.         CH      row    (Y) of upper left corner or window
  323.         CL      column (X) of upper left corner of window
  324.         DH      row    (Y) of lower right corner of window
  325.         DL      column (X) of lower right corner of window
  326. return  none
  327. note 1) Push BP before scrolling, pop after
  328.      2) If in CGA text mode, affects current page only
  329.  
  330.  
  331. Function 08h    Read Character Attribute - of character at current cursor pos.
  332. entry   AH      08h
  333.         BH      display page number - text mode
  334. return  AH      character attribute - text mode
  335.         AL      ASCII code of character at current cursor position
  336.  
  337.  
  338. Function  09h   Write Character and Attribute - at current cursor position
  339. entry   AH      09h
  340.         AL      ASCII code of character to display
  341.         BH      display page number - text mode
  342.         BL      attribute/color of character
  343.         CX      number of characters to write
  344. return  none
  345. note 1) CX should not exceed actual rows availible, or results may be erratic
  346.      2) Setting CX to zero will cause runaway
  347.      3) All values of AL result in some sort of display; the various control
  348.         characters are not recognized as special and do not change the current
  349.         cursor position
  350.      4) Does not change cursor position when called - the cursor must be
  351.         advanced with int 10 function 0Ah.
  352.      5) If used to write characters in graphics mode with bit 7 of AH set to 1
  353.         the character will by XORed with the current display contents.
  354.      6) In graphics mode the bit patterns for ASCII character codes 80h-0FFh
  355.         are obtained from a table. On the standard PC and AT, the location is at
  356.         interrupt vector 01Fh (0000:007C). For ASCII characters 00h-07Fh, the
  357.         table is at an address in ROM. On the PCjr the table is at interrupt
  358.         vector 44h (0000:00110) and is in addressable RAM (may be replaced by
  359.         the user)
  360.      7) All characters are displayed, including CR, LF, and BS
  361.  
  362.  
  363. Function 0Ah    Write Character - display character(s) (use current attribute)
  364. entry   AH      0Ah
  365.         AL      ASCII code of character to display
  366.         BH      display page - text mode
  367.         BL      color of character (graphics mode, PCjr only)
  368.         CX      number of times to write character
  369. return  none
  370. note 1) CX should not exceed actual rows availible, or results may be erratic
  371.      2) All values of AL result in some sort of display; the various control
  372.         characters are not recognized as special and do not change the current
  373.         cursor position
  374.      3) If used to write characters in graphics mode with bit 7 of AH set to 1
  375.         the character will by XORed with the current display contents.
  376.      4) In graphics mode the bit patterns for ASCII character codes 80h-0FFh
  377.         are obtained from a table. On the standard PC and AT, the location is at
  378.         interrupt vector 01Fh (0000:007C). For ASCII characters 00h-07Fh, the
  379.         table is at an address in ROM. On the PCjr the table is at interrupt
  380.         vector 44h (0000:00110) and is in addressable RAM (may be replaced by
  381.         the user)
  382.      5) In EGA in graphics modes, replication count in CX works correctly only
  383.         if all characters written are contained on the same row
  384.      6) All characters are displayed, including CR, LF, and BS
  385.  
  386.  
  387. Function 0Bh    Set Color Palette - set palette for graphics or text border
  388. entry   AH      0Bh
  389.         BH      00h     select border (text mode)
  390.         BL      color 0-15, 16-31 for high-intensity characters
  391.         BH      01h     set graphics palette with value in BL
  392.  (CGA)  BL      0       green/red/yellow
  393.                 1       cyan/magenta/white
  394.  (EGA) (graphics modes)
  395.         BH      0
  396.         BL      has border color (0-15) & high intensity bkgr'd color (16-31)
  397.         BH      1
  398.         BL      contains palette being selected (0-1)
  399. return  none
  400. note 1) Valid in CGA mode 04h, PCjr modes 06h, 08h-0Ah
  401.       2) Although the registers in the MCGA may be set as if to change the
  402.         border, the MCGA will not display a border no matter what register
  403.         settings are used.
  404.  
  405.  
  406. Function 0Ch    Write Dot - plot one graphics pixel
  407. entry   AH      0Ch
  408.         AL      dot color code  (0/1 in mode 6, 0-3 in modes 4 and 5)
  409.                 (set bit 7 to XOR the dot with current color)
  410.                 0-3 mode 04h, 05h
  411.                 0-1 mode 06h
  412.         BH      page number (ignored if adapter supports only one page)
  413.         CX      column (X=0000h - 027Fh)
  414.                 (0 - 319 in modes 4,5,13,  0 - 639 in modes 6,14,15,16)
  415.         DX      row    (Y=0000h - 00C7h) (0 - 199 CGA)
  416. return  none
  417. note    Video graphics modes 4-6 only
  418.  
  419.  
  420. Function 0Dh    Read Dot - determine the color of one graphics pixel
  421. entry   AH      0Dh
  422.         CX      column (X=0000h - 027Fh)  (0-319 or 639)
  423.         DX      row    (Y=0000h - 00C7h)  (0-199)
  424. return  AL      color of dot
  425. note    Only valid in graphics mode
  426.  
  427.  
  428. Function 0Eh    Write TTY - write one character and update cursor. Also handles
  429.                 CR (0Dh), beep (07h), backspace (10h), and scrolling
  430. entry   AH      0Eh
  431.         AL      ASCII code of character to be written
  432.         BH      page number (text)
  433.         BL      foreground color (video modes 6 & 7 only) (graphics)
  434. return  none
  435. note 1) The ASCII codes for bell, backspace, carriage return, and linefeed are
  436.         recognized and appropriate action taken. All other characters are
  437.         written to the screen and the cursor is advanced to the next position
  438.      2) Text can be written to any CGA page regardless of current active page
  439.      3) Automatic linewrap and scrolling are provided through this function
  440.      4) This is the function used by the DOS CON console driver.
  441.      5) This function does not explicitly allow the use of attributes to the
  442.         characters written. Attributes may be provided by first writing an ASCII
  443.         27h (blank) with the desired attributes using function 09h, then
  444.         overwriting with the actual character using this function. While clumsy
  445.         this allows use of the linewrap and scrolling services provided by
  446.         this function
  447.  
  448.  
  449. Function 0Fh    Return Current Video State - mode and size of the screen
  450. entry   AH      0Fh
  451. return  AH      number of character columns on screen
  452.         AL      mode currently set (see AH=00h for display mode codes)
  453.         BH      current active display page
  454. note    If mode was set with bit 7 set ("no blanking"), the returned mode will
  455.         also have bit 7 set
  456.  
  457.  
  458. Function 10h    Set Palette Registers       (PCjr, Tandy 1000, EGA, MCGA, VGA)
  459. entry   AH      10h
  460.         AL      00h     set individual palette register
  461.                         BH      color value to store
  462.                         BL      palette register to set
  463.                                 (on MCGA, only BX = 0712h is supported)
  464.                 01h     set border color palette register
  465.                         BH      color value to store
  466.                 02h             set all palette registers and overscan
  467.                         ES:DX   pointer to 17-byte list
  468.                                 bytes 0-15   values for palette regs. 0-15
  469.                                 byte 16      value for border color register
  470.                 03h     toggle blink/intensity bit     (Jr, EGA, MCGA, VGA)
  471.                         BL      00h     enable intensity
  472.                                 01h     enable blink
  473.                 04h     unknown
  474.                 05h     unknown
  475.                 06h     unknown
  476.                 07h     read individual palette register                 (VGA)
  477.                         BL      palette register number
  478.                 return  BH      palette register value
  479.                 08h     read overscan (order color) register             (VGA)
  480.                 return  BH      value
  481.                 09h     read all palette registers and overscan register (VGA)
  482.                         ES:DX   pointer to buffer address (17 bytes)
  483.                 10h     set individual video DAC color register    (MCGA, VGA)
  484.                         BX      register number
  485.                         CH      new value for green (0-63)
  486.                         CL      new value for blue (0-63)
  487.                         DH      new value for red (0-63)
  488.                 11h     unknown
  489.                 12h     set block of video DAC color registers     (MCGA, VGA)
  490.                         BX      starting color register
  491.                         CX      number of registers to set
  492.                         ES:DX   table of 3*CX bytes where each 3 byte group
  493.                                 represents one byte each of red, green and
  494.                                 blue (0-63)
  495.                 13h     set video DAC color page                         (VGA)
  496.                         BH      00h     select 4 blocks of 64
  497.                         BH      01h     select 16 blocks of 16
  498.                         BL      00h     select paging mode
  499.                         BL      01h     select Page
  500.                         BH      page number (00h to 03h) or (00h to 0Fh)
  501.                                 (not valid in mode 13h)
  502.                 14h     unknown
  503.                 15h     read individual video DAC color register   (MCGA, VGA)
  504.                         BL      palette register number
  505.                 return  DH      red value
  506.                         CH      green value
  507.                         CL      blue value
  508.                 16h     unknown
  509.                 17h     read block of video DAC color registers    (MCGA, VGA)
  510.                         BX      starting palette register
  511.                         CX      number of palette registers to read
  512.                         ES:DX   buffer (3 * CX bytes in size)
  513.                 return  CX number of red, green and blue triples in buffer
  514.                 18h     *UNDOCUMENTED* set PEL mask
  515.                         BL      new PEL value
  516.                 19h     *UNDOCUMENTED* read PEL mask
  517.                         BL      value read
  518.                 1Ah     read video DAC color-page state                  (VGA)
  519.                 return  BL      paging mode
  520.                                 0       four pages of 64
  521.                                 1       sixteen pages of 16
  522.                         BH      current page
  523.                 1Bh     perform gray-scale summing                 (MCGA, VGA)
  524.                         BX      starting palette register
  525.                         CX      number of registers to convert
  526.  
  527.         BH      color value
  528.         BL      if AL=00h       palette register to set (00h-0Fh)
  529.                 if AL=03h       0       to enable intensity
  530.                                 1       to enable blinking
  531.         ES:DX   if AL=02h       pointer to 16-byte table of register values
  532.                                 followed by the overscan value:
  533.                                 bytes 0-15     values for palette registers 0-15
  534.                                 byte 16        value for border register
  535. return  none
  536. note    DAC is Digital to Analog Convertor circuit in MCGA/VGA chips
  537.  
  538.  
  539. Function 11h    Character Generator Routine (EGA and after)
  540. entry   AH      11h
  541.                 The following functions will cause a mode set, completely
  542.                 resetting the video environment, but without clearing the video
  543.                 buffer.
  544.         AL      00h, 10h  load user-specified patterns
  545.                         BH      number of bytes per character pattern
  546.                         BL      block to load in map 2
  547.                         CX      count of patterns to store
  548.                         DX      character offset into map 2 block
  549.                         ES:BP   pointer to user table
  550.                 01h, 11h  load ROM monochrome patterns (8 by 14)
  551.                         BL      block to load
  552.                 02h, 12h  load ROM 8 by 8 double-dot patterns
  553.                         BL      block to load
  554.                 03h       set block specifier
  555.                         BL      block specifier
  556.                (EGA/MCGA) bits 0,1   = block selected by chars with attribute
  557.                           bit  3     = 0
  558.                           bits 2,3   = block selected by chars with attribute
  559.                           bit  3     = 1
  560.                (VGA)      bits 0,1,4 = block selected by attribute bit 3 = 0
  561.                           bits 2,3,5 = block selected by attribute bit 3 = 1
  562.                 04h,14h   load 8x16 text character set (MCGA, VGA)
  563.                           The routines called with AL=1x are designed to be
  564.                           called only immediately after a mode set and are
  565.                           similar to the routines called with AL=0x, except
  566.                           that:
  567.                           Page 0 must be active.
  568.                           Bytes/character is recalculated.
  569.                           Max character rows is recalculated.
  570.                           CRT buffer length is recalculated.
  571.                           CRTC registers are reprogrammed as follows:
  572.                           reg09h    bytes/char-1; max scan line (mode 7 only)
  573.                           reg0Ah    bytes/char-2; cursor start
  574.                           reg0Bh    0           ; cursor end
  575.                           reg12h    ((rows+1)*(bytes/char))-1
  576.                                                 ; vertical display end
  577.                           reg14h    bytes/char  ; underline loc
  578.                                     (* BUG: should be 1 less *)
  579.  
  580.                         The following functions are meant to be called only
  581.                        after a mode set:
  582.                 20h     user 8 by 8 graphics characters (int 1Fh)
  583.                         ES:BP   pointer to user table
  584.                 21h     user graphics characters
  585.                         ES:BP   pointer to user table
  586.                         CX      bytes per character
  587.                         BL      row specifier
  588.                                 0       user set
  589.                                         DL      number of rows
  590.                                 1       14 rows
  591.                                 2       25 rows
  592.                                 3       43 rows
  593.                 22h     ROM 8 by 14 set
  594.                         BL      row specifier
  595.                 23h     ROM 8 by 8 double dot
  596.                         BL      row specifier
  597.                 24h     load 8x16 graphics characters (MCGA, VGA)
  598.                         BL      row specifier
  599.  
  600.                 30h     Get Font Information          (EGA, MCGA, VGA)
  601.                         BH      pointer specifier
  602.                                 0       int 1Fh pointer
  603.                                 1       int 44h pointer
  604.                                 2       ROM 8 by 14 character font pointer
  605.                                 3       ROM 8 by 8 double dot font pointer
  606.                                 4       ROM 8 by 8 DD font (top half)
  607.                                 5       ROM text alternate (9 by 14) pointer
  608. return  ES:BP   specified pointer value
  609.         CX      bytes/character
  610.         DL      character rows on screen
  611.  
  612.  
  613. Function 12h    Alternate Select (EGA and after)
  614. entry   AH      12h
  615.         BL      10h     return EGA information
  616.                 return  BH      00h     if color mode is in effect (3Dx)
  617.                                 01h     if mono mode is in effect (3Dx)
  618.                         BL      00h     if 64k EGA memory
  619.                                 01h     if 128k EGA memory
  620.                                 02h     if 192k EGA memory
  621.                                 03h     if 256k EGA memory
  622.                         CH      feature bits
  623.                         CL      switch settings
  624.                 20h     select alternate print screen routine
  625.                 30h     select vertical resolution for text modes       (VGA)
  626.                         AL      00h     200 scan lines
  627.                                 01h     350 scan lines
  628.                                 02h     400 scan lines
  629.                 return  AL      12h if function supported
  630.                 31h     enable/disable default palette loading    (MCGA, VGA)
  631.                         AL      00h     enable default palette loading
  632.                                 01h     disable default palette loading
  633.                 return  AL      12h if function was supported
  634.                 32h     enable/disable video addressing           (MCGA, VGA)
  635.                         AL      00h     enable video
  636.                                 01h     disable video
  637.                 return  AL      12h if function was supported
  638.                 33h     enable/disable default gray scale summing (MCGA, VGA)
  639.                         AL      00h     enable gray scale summing
  640.                                 01h     disable gray scale summing
  641.                 return  AL      12h if function was supported
  642.                 34h     enable/disable text cursor emulation            (VGA)
  643.                         AL      00h     enable cursor emulation
  644.                                 01h     disable cursor emulation
  645.                 return  AL      12h if function was supported
  646.                 35h     display-switch interface                        (PS/2)
  647.                         AL      00h     initial adapter video off
  648.                                 01h     initial planar video on
  649.                                 02h     switch active video off
  650.                                 03h     switch inactive video on
  651.                                 80h     *undocumented* set system board video
  652.                                         active flag
  653.                         ES:DX   buffer (128 byte save area if AL = 0, 2 or 3)
  654.                 return  AL      12h if function was supported
  655.                 36h     video refresh control                           (VGA)
  656.                         AL      00h     enable refresh
  657.                                 01h     disable refresh
  658.                 return  AL      12h     if function supported
  659.                         BX      5500h   (used by ATI and TAXAN)
  660.                         BX      5502h   (used by ATI and TAXAN)
  661.  
  662.  
  663. Function 13h    Enhanced String Write                        (AT, XT/286, PS/2)
  664. entry   AH      13h
  665.         AL      00h     Write String, Don't Move Cursor 
  666.                 01h     Write String, Move Cursor
  667.                 02h     Write String of Alternating Characters and Attributes;
  668.                         Don't Move Cursor
  669.                         bit 0: set in order to move cursor after write
  670.                         bit 1: set if string contains alternating chars and
  671.                                attributes
  672.                 03h     Write String of Alternating Characters and Attributes;
  673.                         Move Cursor
  674.                         bit 0: set in order to move cursor after write
  675.                         bit 1: set if string contains alternating characters
  676.                                and attributes
  677.         BH      display page number
  678.         BL      attribute if AL bit 1 clear
  679.         CX      length of string
  680.         DH      row of starting cursor position
  681.         DL      column of starting cursor position
  682.         ES:BP   pointer to start of string
  683. return  none
  684. note    Recognizes CR, LF, BS, and bell
  685.  
  686.  
  687. Function 14h    Load LCD Character Font                      (Convertible)
  688. entry   AH      14h
  689.         AL      00h     load user specified font
  690.                 BH      number of bytes per character
  691.  
  692.                 BL      00h     load main font (block 0)
  693.                         01h     load alternate font (block 1)
  694.                 CX      number of characters to store
  695.                 DX      character offset into RAM font area
  696.                 ES:DI   pointer to character font
  697.         AL      01h     load system ROM default font
  698.         BL      00h     load main font (block 0)
  699.                 01h     load alternate font (block 1)
  700.         AL      02h     set mapping of LCD high intensity attribute
  701.         BL      00h     ignore high intensity attribute
  702.                 01h     map high intensity to underscore
  703.                 02h     map high intensity to reverse video
  704.                 03h     map high intensity to seleected alternate font
  705. return  unknown
  706.  
  707.  
  708. Function 15h    Return Physical Display Parameters           (Convertible)
  709. entry   AH      15h
  710. return  AX      Alternate display adapter type
  711.         ES:DI   pointer to parameter table:
  712.                 word #  information
  713.                 01h     monitor model number
  714.                 02h     vertical pixels per meter
  715.                 03h     horizontal pixels per meter
  716.                 04h     total number of vertical pixels
  717.                 05h     total number of horizontal pixels
  718.                 06h     horizontal pixel separation in micrometers
  719.                 07h     vertical pixel separation in micrometers
  720.  
  721.  
  722. Function 1Ah    Display Combination Code                     (MCGA, VGA)
  723.                 Using the compatibility BIOS of the PS/2 Models 50, 60, 80 there
  724.                 is a way to determine which video controller and attached
  725.                 display are on the system.  The Display Combination Code (DCC)
  726.                 is a Video BIOS function that provides the capability.
  727. entry   AH      1Ah
  728.         AL      00h     read display combination code
  729.                 01h     write display combination code
  730. return  AL      1Ah     indicates Compatibility BIOS is supported,
  731.                         any other value is invalid
  732.         BH      Display Combination Code (DCC)
  733.                 00h     no display
  734.                 01h     IBM monochrome adapter and display
  735.                 02h     IBM color/graphics monitor adapter w/color display
  736.                 03h     reserved
  737.                 04h     IBM EGA, color display
  738.                 05h     IBM EGA, monochrome display
  739.                 06h     IBM PGA, color display
  740.                 07h     VGA, analog monochrome display
  741.                 08h     VGA, analog color display
  742.                 09h     reserved
  743.                 0Ah     MCGA, digital color display
  744.                 0Bh     MCGA, analog monochrome display
  745.                 0Ch     MCGA, analog color display
  746.                 0FFh    unknown display type
  747.         BL      active display device code
  748. note    This function may be used to test for VGA, since it is not supported in
  749.         earlier adapters. If AL is still 1Ah when the call completes, a VGA
  750.         compatible adapter is present.
  751.  
  752.  
  753. Function 1Bh    Functionality/State Information              (MCGA, VGA)
  754. entry   AH      1Bh
  755.         BX      implementation type
  756.                 0000h return funtionality/state information
  757.         ES:DI   pointer to 64 byte buffer
  758. return  AL      1Bh if function supported
  759.         ES:DI   buffer filled
  760.                 00h     address of functionality table
  761.                 01h     unknown
  762.                 02h     unknown
  763.                 03h     unknown
  764.                 04h     current video mode
  765.                 05h     number of columns
  766.                 06h     unknown
  767.                 07h     length of regen buffer in bytes
  768.                 09h     starting address of regen buffer
  769.                 0Bh     cursor position for page 0
  770.                 0Dh     cursor position for page 1
  771.                 0Fh     cursor position for page 2
  772.                 11h     cursor position for page 3
  773.                 13h     cursor position for page 4
  774.                 15h     cursor position for page 5
  775.                 17h     cursor position for page 6
  776.                 19h     cursor position for page 7
  777.                 1Bh     cursor type
  778.                 1Dh     active display page
  779.                 1Eh     CRTC port address
  780.                 20h     current setting of register (3?8)
  781.                 21h     current setting of register (3?9)
  782.                 22h     number of rows
  783.                 23h     bytes/character
  784.                 25h     DCC of active display
  785.                 26h     DCC of alternate display
  786.                 27h     number of colors supported in current mode
  787.                 29h     number of pages supported in current mode
  788.                 2Ah     number of scan lines active
  789.                         (0,1,2,3) = (200,350,400,480)
  790.                 2Bh     primary character block
  791.                 2Ch     secondary character block
  792.                 2Dh     miscellaneous flags byte
  793.                         bit 0 all modes on all displays on
  794.                             1 gray summing on
  795.                             2 monochrome display attached
  796.                             3 default palette loading disabled
  797.                             4 cursor emulation enabled
  798.                             5 0=intensity; 1=blinking
  799.                             6 reserved
  800.                             7 reserved
  801.                 2Eh to 30h reserved
  802.                 31h     video memory available
  803.                         00h=64K, 01h=128K, 02h=192K, 03h=256K
  804.                 32h     save pointer state flags byte
  805.                         bit 0 512 character set active
  806.                             1 dynamic save area present
  807.                             2 alphanumeric font override active
  808.                             3 graphics font override active
  809.                             4 palette override active
  810.                             5 DCC override active
  811.                             6 reserved
  812.                             7 reserved
  813.                 33h to 3Fh  reserved
  814. note    State Functionality Table format (16 bytes)
  815.         00h     modes supported #1
  816.                 bit 0 to bit 7 = 1 modes 0,1,2,3,4,5,6 supported
  817.         01h     modes supported #2
  818.                 bit 0 to bit 7 = 1 modes 8,9,A,B,C,D,E,F supported
  819.         02h     modes supported #3
  820.                 bit 0 to bit 3 = 1 modes 10,11,12,13 supported
  821.                 bit 4 to bit 7 reserved
  822.         03h to 06h reserved
  823.         07h     scan lines supported
  824.                 bit 0 to bit 2 = 1 if scan lines 200,350,400 supported
  825.         08h     total number of character blocks available in text modes
  826.         09h     maximum number of active character blocks in text modes
  827.         0Ah     miscellaneous function flags #1
  828.                 bit 0 all modes on all displays function supported
  829.                     1 gray summing function supported
  830.                     2 character font loading function supported
  831.                     3 default palette loading enable/disable supported
  832.                     4 cursor emulation function supported
  833.                     5 EGA palette present
  834.                     6 color palette present
  835.                     7 color paging function supported
  836.         0Bh     miscellaneous function flags #2
  837.                 bit 0 light pen supported
  838.                     1 save/restore state function 1Ch supported
  839.                     2 intensity blinking function supported
  840.                     3 Display Combination Code supported
  841.                     4-7 reserved
  842.         0Ch to 0Dh reserved
  843.         0Eh     Save pointer function flags
  844.                 bit 0 512 character set supported
  845.                     1 dynamic save area supported
  846.  
  847.                     2 text font override supported
  848.                     3 graphics font override supported
  849.                     4 palette override supported
  850.                     5 DCC extension supported
  851.                     6 reserved
  852.                     7 reserved
  853.         0Fh     reserved
  854.  
  855.  
  856. Function 1Ch    Save/Restore Video State                     (VGA)
  857. entry   AH      1Ch
  858.         AL      00h     return state buffer size
  859.                 01h     save video state
  860.                         ES:BX   buffer address
  861.                 02h     restore video state
  862.                         ES:BX   buffer address of previously saved state
  863.         CX      requested states
  864.                 bit  0      video hardware
  865.                      1      BIOS data areas
  866.                      2      color registers and DAC state
  867.                      3-15   reserved
  868. return  AL      1Ch if function supported
  869.         BX      number of 64 byte blocks needed (function 00h)
  870. note    VGA only
  871.  
  872.  
  873. Function 40h    Set Graphics Mode (Hercules Graphics Card Plus)
  874. entry   AH      40h
  875. return  unknown
  876.  
  877.  
  878. Function  41h   Set Text Mode (Hercules Graphics Card Plus)
  879. entry   AH      41h
  880. return  unknown
  881.  
  882.  
  883. Function 42h    Clear Current Page (Hercules Graphics Card Plus)
  884. entry   AH      42h
  885. return  unknown
  886.  
  887.  
  888. Function 43h    Select Drawing Page (Hercules Graphics Card Plus)
  889. entry   AH      43h
  890.         AL      page number (0,1)
  891. return  unknown
  892.  
  893.  
  894. Function 44h    Select Drawing Function (Hercules Graphics Card Plus)
  895. entry   AH      44h
  896.         AL      0       clear pixels
  897.                 1       set pixels
  898.                 2       invert pixels
  899. return  unknown
  900.  
  901.  
  902. Function 45h    Select Page to Display (Hercules Graphics Card Plus)
  903. entry   AH      45h
  904.         AL      page number (0,1)
  905. return  unknown
  906.  
  907.  
  908. Function 46h    Draw One Pixel (Hercules Graphics Card Plus)
  909. entry   AH      46h
  910.         DI      x       (0-720)
  911.         BP      y       (0-347)
  912. return  unknown
  913. note    Function 44h determines operation and function 43h which page to use.
  914.  
  915.  
  916. Function 47h    Find Pixel Value (Hercules Graphics Card Plus)
  917. entry   AH      47h
  918.         DI      x       (0-720)
  919.         BP      y       (0-347)
  920. return  AL      0       pixel clear
  921.                 1       pixel set
  922. note    Function 43h specifies page that is used.
  923.  
  924.  
  925. Function 48h    Move to Point (Hercules Graphics Card Plus)
  926. entry   AH      48h
  927.         DI      x       (0-720)
  928.         BP      y       (0-347)
  929. return  unknown
  930.  
  931.  
  932. Function 49h    Draw to Point (Hercules Graphics Card Plus)
  933. entry   AH      49h
  934.         DI      x       (0-720)
  935.         BP      y       (0-347)
  936. return  unknown
  937. note    Function 48h or 49h specify first point, 44h operation and 43h page
  938.         to use.
  939.  
  940.  
  941. Function 4Ah    Block Fill (Hercules Graphics Card Plus)
  942. entry   AH      4Ah
  943. return  unknown
  944.  
  945.  
  946. Function 4Bh    Display Character (Hercules Graphics Card Plus)
  947. entry   AH      4Bh
  948.         AL      ASCII code for character to display
  949.         DI      x       (0-720)
  950.         BP      y       (0-347)
  951. return  unknown
  952. note    Unlike the other BIOS character functions character position is
  953.         specified in pixels rather than rows and columns.
  954.  
  955.  
  956. Function 4Ch    Draw Arc (Hercules Graphics Card Plus)
  957. entry   AH      4Ch
  958. return  unknown
  959.  
  960.  
  961. Function 4Dh    Draw Circle (Hercules Graphics Card Plus)
  962. entry   AH      4Dh
  963. return  unknown
  964.  
  965.  
  966. Function 4Eh    Fill Area (Hercules Graphics Card Plus)
  967. entry   AH      4Eh
  968. return  unknown
  969.  
  970.  
  971. Function 6Ah    Direct Graphics Interface Standard (DGIS)
  972. entry   AH      6Ah
  973.         AL      00h     Inquire Available Devices
  974.                         BX      0
  975.                         CX      0
  976.                         DX      buffer length (may be 0)
  977.                         ES:DI   address of buffer
  978.                 return  BX      number of bytes stored in buffer
  979.                         CX      bytes req'd for all descriptions (0 if no DGIS)
  980.                 note    Buffer contains descriptions and addresses of DGIS-
  981.                         compatible display(s) and printer(s)
  982.                 01h     Redirect Character Output
  983.                         CX      0
  984.                         ES:DI   address of device to send INT 10 output to
  985.                 return  CX      0    output could not be redirected
  986.                             else INT 10h output now routed to requested display
  987.                 02h     Inquire int 10 Output Device
  988.                         ES:DI   0:0
  989.                 return  ES:DI   0:0  if current display is non-DGIS
  990.                                 else address of the current DGIS INT 10 display
  991.  
  992.  
  993. Function 6Fh    Set Video Mode (VEGA Extended EGA/VGA)
  994. entry   AH      6F
  995.         AL      05h
  996.         BL      mode|     (graphics mode if graphics resolution listed)
  997.                     | text |pixel| graphic|color|disp|scrn| system
  998.                     | resol|box  |resoltn |     |page|addr|
  999.                 62h               800x600   16              VEGA Extended EGA
  1000.                 65h              1024x768   16              VEGA Extended EGA
  1001.                 66h               640x400  256              VEGA Extended VGA
  1002.                 67h               640x480  256              VEGA Extended VGA
  1003.                 68h               720x540  256              VEGA Extended VGA
  1004.                 69h               800x600  256              VEGA Extended VGA
  1005.  
  1006.  
  1007. Function 70h    Get Video RAM Address                        (Tandy 1000)
  1008. entry   AH      70h
  1009. return  AX      segment addresses of the following
  1010.                 BX      offset address of green plane
  1011.                 CX      segment address of green plane
  1012.                 DX      segment address of red/blue plane
  1013. note    (red offset = 0, blue offset = 4000)
  1014.  
  1015.  
  1016. Function 71h    Get INCRAM Addresses                         (Tandy 1000)
  1017. entry   AH      71h
  1018. return  AX      segment address of the following
  1019.                 BX      segment address of INCRAM
  1020.                 CX      offset address of INCRAM
  1021.  
  1022.  
  1023. Function 72h    Scroll Screen Right                          (Tandy 1000)
  1024. entry   AH      72h
  1025.         AL      number of columns blanked at left of page
  1026.                 00h     blank window
  1027.         BH      attributes to be used on blank columns
  1028.         CH,CL   row, column address of upper left corner
  1029.         DH,DL   row, column address of lower right corner
  1030.  
  1031.  
  1032. Function 73h    Scroll Screen Left                           (Tandy 1000)
  1033. entry   AH      73h
  1034.         AL      number of columns blanked at right of page
  1035.                 00h     blank window
  1036.         BH      attributes to be used on blank columns
  1037.         CH,CL   row, column address of upper left corner
  1038.         DH,DL   row, column address of lower right corner
  1039.  
  1040.  
  1041. Function 80h    DESQview - Set (something)
  1042. entry   AH      80h 
  1043.         DX      4456h ('DV')
  1044.         ES:DI   pointer to FAR subroutine to be called on?
  1045. return  DS      segment of DESQview data structure for video buffer
  1046. note 1) This function is probably meant for internal use only, due to the magic
  1047.         value required in DX
  1048.      2) The subroutine seems to be called when the DESQview menu is accessed
  1049.         on entry, AL = 03h or 04h
  1050.  
  1051.  
  1052. Function 81h    DESQview video - Get something?
  1053. entry   AH      81h
  1054.         DX      4456h ('DV')
  1055. return  ES    segment of DESQview data structure for video buffer
  1056.         byte ES:[0] = current window number
  1057. note    This function is probably meant for internal use only, due to the
  1058.         magic value required in DX
  1059.  
  1060.  
  1061. Function 82h    DESQview - Get Current Window Info
  1062. entry   AH      82h
  1063.         DX      4456h ('DV')
  1064. return  AH      unknown
  1065.         AL      current window number
  1066.         BH      unknown
  1067.         BL      direct screen writes
  1068.                 0       program does not do direct writes
  1069.                 1       program does direct writes, so shadow buffer not usable
  1070.         CH      unknown
  1071.         CL      current video mode
  1072.         DS      segment in DESQview for data structure
  1073.                 in DV 2.00,
  1074.                   byte DS:[0] = window number
  1075.                   word DS:[1] = segment of other data structure
  1076.                   word DS:[3] = segment of window's object handle
  1077.         ES      segment of DESQview data structure for video buffer
  1078. note    This function is probably meant for internal use only, due to the magic
  1079.         value required in DX
  1080.  
  1081.  
  1082. Function 0F0h   Microsoft Mouse driver EGA support - Read One Register
  1083. entry   AH      0F0h
  1084.         BL      register number
  1085.         DX      group index
  1086.                 (pointer/data chips)
  1087.                 00h     CRT Controller (25 reg) 3B4h mono, 3D4h color
  1088.                 08h     sequencer (5 registers) 3C4h
  1089.                 10h     graphics controller (9 registers) 3CEh
  1090.                 18h     attribute controller (20 registers) 3C0h
  1091.                 (single registers)
  1092.                 20h     miscellaneous output register 3C2h
  1093.                 28h     feature control register (3BAh mono, 3DAh color
  1094.                 30h     graphics 1 position register 3CCh
  1095.                 38h     graphics 2 position register 3CAh
  1096. return  BL      data
  1097.  
  1098.  
  1099. Function 0F1h   Microsoft Mouse driver EGA support - Write One Register
  1100. entry   AH      0F1h
  1101.         DX      group index (see function F0h)
  1102.         BL      register number
  1103.         BH      value to write
  1104. return  BL      data
  1105.  
  1106.  
  1107. Function 0F2h   Microsoft Mouse driver EGA support - Read Register Range
  1108. entry   AH      0F2h
  1109.         CH      starting register number
  1110.         CL      number of registers (>1)
  1111.         DX      group index
  1112.                 00h     CRTC (3B4h mono modes, 3D4h color modes)
  1113.                 08h     sequencer 3C4h
  1114.                 10h     graphics controller 3CEh
  1115.                 18h     attribute controller 3C0h
  1116.         ES:BX   pointer to buffer, CL bytes
  1117.  
  1118.  
  1119. Function 0F3h   Microsoft Mouse driver EGA support - Write Register Range
  1120. entry   AH      0F3h
  1121.         CH      starting register
  1122.         CL      number of registers (>1)
  1123.         DX      group index
  1124.                 00h     CRTC (3B4h mono modes, 3D4h color modes)
  1125.                 08h     sequencer 3C4h
  1126.                 10h     graphics controller 3CEh
  1127.                 18h     attribute controller 3C0h
  1128.         ES:BX   pointer to buffer, CL bytes
  1129.  
  1130.  
  1131. Function 0F4h   Microsoft Mouse driver EGA support - Read Register Set
  1132. entry   AH      0F4h
  1133.         CX      number of registers (>1)
  1134.         ES:BX   pointer to table of records in this format:
  1135.           bytes 1-2 group index
  1136.                 (pointer/data chips)
  1137.                 00h     CRTC (3B4h mono modes, 3D4h color modes)
  1138.                 08h     sequencer 3C4h
  1139.                 10h     graphics controller 3CEh
  1140.                 18h     attribute controller 3C0h
  1141.                 (single registers)
  1142.                 20h     miscellaneous output register 3C2h
  1143.                 28h     feature control register (3BAh mono modes, 3DAh color)
  1144.                 30h     graphics 1 position register 3CCh
  1145.                 38h     graphics 2 position register 3CAh
  1146.          byte 3 register number (0 for single registers)
  1147.          byte 4 register value
  1148.  
  1149.  
  1150. Function 0F5h   Microsoft Mouse driver EGA support - Read Register Set
  1151. entry   AH      0F5h
  1152.         CX      number of registers (>1)
  1153.         ES:BX   pointer to table of records in this format:
  1154.           bytes 1-2 group index
  1155.                 (pointer/data chips)
  1156.                 00h     CRTC (3B4h mono modes, 3D4h color modes)
  1157.                 08h     sequencer 3C4h
  1158.                 10h     graphics controller 3CEh
  1159.                 18h     attribute controller 3C0h
  1160.                 (single registers)
  1161.                 20h     miscellaneous output register 3C2h
  1162.                 28h     feature control register (3BAh mono modes, 3DAh color)
  1163.                 30h     graphics 1 position register 3CCh
  1164.                 38h     graphics 2 position register 3CAh
  1165.          byte 3 register number (0 for single registers)
  1166.          byte 4 register value
  1167.  
  1168.  
  1169. Function 0F6h   Microsoft Mouse driver EGA support
  1170.                 Revert to Default Registers
  1171. entry   AH      0F6h
  1172. return  unknown
  1173.  
  1174.  
  1175. Function 0F7h   Microsoft Mouse driver EGA support
  1176.                 Define Default Register Table
  1177. entry   AH      0F7h
  1178.         DX      port number
  1179.         ES:BX   address of table of one byte entries, one byte to be written to
  1180.                 each register
  1181.                 (pointer/data chips)
  1182.                 00h     CRTC (3B4h mono modes, 3D4h color modes)
  1183.                 08h     sequencer 3C4h
  1184.                 10h     graphics controller 3CEh
  1185.                 18h     attribute controller 3C0h
  1186.                 (single registers)
  1187.                 20h     miscellaneous output register 3C2h
  1188.                 28h     feature control register (3BAh mono, 3DAh color)
  1189.                 30h     graphics 1 position register 3CCh
  1190.                 38h     graphics 2 position register 3CAh
  1191.  
  1192.  
  1193. Function 0FAh   Microsoft Mouse driver EGA support - Interrogate Driver
  1194. entry   AH      0FAh
  1195.         BX      00h
  1196. return  BX      00h     if mouse driver not present
  1197.         ES:BX   pointer to EGA Register Interface version number, if present:
  1198.                 byte 1  major release number
  1199.                 byte 2  minor release number
  1200.  
  1201.  
  1202. Function 0FEh   Get Alternate Screen Buffer Address (text mode only)
  1203.                                                     (Topview/DesQview/Taskview)
  1204. entry   AH     0FEh
  1205.         ES:DI  segment:offset of assumed video buffer
  1206. return: ES:DI  segment:offset of actual video buffer
  1207. note 1) This alternate video buffer can be written to directly, in the same
  1208.         manner as writing to B:000 or B:800. The MT program will manage the
  1209.         actual display.
  1210.      2) There is no need to synchronize vertical retrace when writing to the
  1211.         alternate buffer; this is managed by the MT program
  1212.      3) If TopView or DESQview is not running, ES:DI is returned unchanged.
  1213.      4) TopView requires that function 0FFh be called every time you write into
  1214.         the buffer to tell TopView that something changed
  1215.  
  1216.  
  1217. Function 0FFh   Update Real Display (text mode only)                  (TopView)
  1218.                 Update Video Buffer                 (Topview/DesQview/Taskview)
  1219. entry   AH      0FFh
  1220.         CX      number of sequential characters that have been modified
  1221.         DI      offset of first character that has been modified
  1222.         ES      segment of video buffer
  1223. return  unknown
  1224. note 1) DesQview supports this call, but does not require it
  1225.      2) Avoid CX=0
  1226.  
  1227.  
  1228. ┌─────────────────────────────────────────────────────────────────────────────┐
  1229. │Interrupt 11h  Equipment Check                                               │
  1230. └─────────────────────────────────────────────────────────────────────────────┘
  1231. (0:0044h)       fetch a code describing active peripherals.
  1232. entry   AH      11h
  1233. return  AX      Equipment listing word          Bits are:
  1234.                 0       number of floppy drives
  1235.                         0       no drives
  1236.                         1       bootable (IPL) diskette drive installed
  1237.                 1       math chip
  1238.                         0       no math coprocessor (80x87) present
  1239.                         1       math coprocessor (80x87) present
  1240.          (PS/2) 2       0       mouse not installed
  1241.                         1       mouse installed
  1242.           (PC)  2,3     system board RAM
  1243.                         0,0     16k    (PC-0, PC-1)
  1244.                         1,1     64k    (PC-2, XT)
  1245.                         note 1) not commonly used. Set both bits to 1
  1246.                              2) both bits always 1 in AT
  1247.                 4,5     initial video mode
  1248.                         0,0     no video installed (use with dumb terminal)
  1249.                         0,1     40x25 color      (CGA)
  1250.                         1,0     80x25 color      (CGA, EGA, PGA, MCGA, VGA)
  1251.                         1,1     80x25 monochrome (MDA or Hercules, most super-
  1252.                                                   hires mono systems)
  1253.                 6,7     number of diskette drives (only if bit 0  1)
  1254.                         0,0     1 drives
  1255.                         0,1     2 drives
  1256.                         1,0     3 drives
  1257.                         1,1     4 drives
  1258.                 8       0       DMA present 
  1259.                         1       no DMA (PCjr, some Tandy 1000s, 1400LT)
  1260.                 9,A,B   number of RS232 serial ports (0-3)
  1261.                         0,0,0   none
  1262.                         0,0,1   1
  1263.                         0,1,0   2
  1264.                         0,1,1   3
  1265.                         1,0,0   4
  1266.                 C       0       no game I/O attached
  1267.                         1       game I/O attached (default for PCjr)
  1268.                 D       serial accessory installation
  1269.                         0       no serial accessories installed
  1270.                         1       Convertible - internal modem installed
  1271.                         1       PCjr - serial printer attached
  1272.                 E,F     number of parallel printers
  1273.                         0,0     none
  1274.                         0,1     one   (LPT1, PRN)
  1275.                         1,0     two   (LPT2)
  1276.                         1,1     three (LPT3)
  1277.                         note    Models before PS/2 would allow a fourth
  1278.                                 parallel printer. Remapping of the BIOS in the
  1279.                                 PS/2s does not allow the use of LPT4.
  1280.  
  1281.  
  1282.  
  1283.  
  1284. ┌─────────────────────────────────────────────────────────────────────────────┐
  1285. │Interrupt 12h  Memory Size                                                   │
  1286. └─────────────────────────────────────────────────────────────────────────────┘
  1287. (0:0048h)       get system memory
  1288. return  AX      number of contiguous 1K RAM blocks
  1289. note 1) This service does not depend on the setting of the motherboard switches
  1290.      2) This is the same value stored in absolute address 04:13h
  1291.  
  1292.  
  1293.  
  1294.  
  1295. ┌─────────────────────────────────────────────────────────────────────────────┐
  1296. │Interrupt 13h  Disk I/O - access the disk drives (floppy and hard disk)      │
  1297. └─────────────────────────────────────────────────────────────────────────────┘
  1298. (0:004Ch)      does not try rereading disk if an error is returned
  1299.  
  1300.                                         
  1301. Function 00h    Reset - reset the disk controller chip
  1302. entry   AH      00h
  1303.         DL      drive (if bit 7 is set both hard disks and floppy disks reset)
  1304. return  AH      status
  1305. note 1) Forces controller chip to recalibrate read/write heads
  1306.      2) Some systems (Sanyo 55x) this resets all drives
  1307.  
  1308.  
  1309. Function 01h    Get Status of disk system
  1310. entry   AH      01h
  1311.         DL      drive (hard disk if bit 7 set)
  1312. return  AL      status of most recent operation
  1313.                 00h     successful completion
  1314.                 01h     bad command
  1315.                 02h     address mark not found
  1316.                 03h     tried to write on write-protected disk
  1317.                 04h     sector not found
  1318.                 05h     reset failed (hard disk)
  1319.                 06h     diskette removed or changed
  1320.                 07h     bad parameter table (hard disk)
  1321.                 08h     DMA overrun
  1322.                 09h     attempt to DMA across 64K boundary
  1323.                 0Ah     bad sector detected (hard disk)
  1324.                 0Bh     bad track detected (hard disk)
  1325.                 0Ch     unsupported track
  1326.                 0Dh     invalid number of sectors on format (hard disk)
  1327.                 0Eh     control data address mark detected (hard disk)
  1328.                 0Fh     DMA arbitration error (hard disk)
  1329.                 10h     bad CRC/EEC on read
  1330.                 11h     data ECC corrected
  1331.                 20h     controller failure
  1332.                 40h     seek failed
  1333.                 80h     timeout
  1334.                 0AAh    drive not ready (hard disk)
  1335.                 0BBh    undefined error (hard disk)
  1336.                 0CCh    write fault     (hard disk)
  1337.                 0E0h    status error    (hard disk)
  1338.                 0FFh    sense operation failed (hard disk)
  1339.  
  1340.  
  1341. Function 02h    Read Sectors - read one or more sectors from diskette
  1342. entry   AH      02h
  1343.         AL      number of sectors to read 
  1344.         BX      address of buffer (ES=segment)
  1345.         CH      track number (0-39 or 0-79 for floppies)
  1346.                 (for hard disk, bits 8,9 in high bits of CL)
  1347.         CL      sector number (1 to 18, not value checked)
  1348.         DH      head number (0 or 1)
  1349.         DL      drive (0=A, 1=B, etc.) (bit 7=0)  (drive 0-7)
  1350.         ES:BX   address to store/fetch data  (buffer to fill)
  1351.        [0000:0078]  dword pointer to diskette parms
  1352. return  CF      clear (0) for successful
  1353.                 set (1) failure
  1354.                 AH      status (00h, 02h, 03h, 04h, 08h, 09h, 10h, 0Ah, 20h,
  1355.                         40h, 80h)
  1356.         AL      number of sectors transferred
  1357. note 1) Number of sectors begins with 1, not 0
  1358.      2) Trying to read zero sectors is considered a programming error; results
  1359.         are not defined
  1360.                                                                         
  1361.  
  1362. Function 03h    Write Sectors - write from memory to disk
  1363. entry   AH      03h
  1364.         AL      number of sectors to write (1-8)
  1365.         CH      track number (for hard disk, bits 8,9 in high bits of CL)
  1366.         CL      beginning sector number
  1367.                 (if hard disk, high two bits are high bits of track #)
  1368.         DH      head number
  1369.         DL      drive number (0-7)
  1370.         ES:BX   address of buffer for data
  1371. return  CF      set if error
  1372.                 AH      status (see above)
  1373.         AL      number of sectors written
  1374. note 1) Number of sectors begins with 1, not 0
  1375.      2) Trying to write zero sectors is considered a programming error; results
  1376.         are not defined
  1377.  
  1378.  
  1379. Function 04h    Verify - verify that a write operation was successful
  1380. entry   AH      04h
  1381.         AL      number of sectors to verify (1-8)
  1382.         CH      track number  (for hard disk, bits 8,9 in high bits of CL)
  1383.         CL      beginning sector number
  1384.         DH      head number
  1385.         DL      drive number (0-7)
  1386. return  CF      set on error
  1387.                 AH      status (see above) 
  1388.         AL      number of sectors verified
  1389.        
  1390.  
  1391. Function 05h    Format Track - write sector ID bytes for 1 track
  1392. entry   AH      05h
  1393.         AL      number of sectors to create on this track
  1394.         CH      track (or cylinder) number
  1395.         CL      sector number
  1396.         DH      head number (0, 1)
  1397.         DL      drive number (0-3)
  1398.         ES:BX   pointer to 4-byte address field (C-H-R-N)
  1399.                 byte 1 = (C) cylinder or track
  1400.                 byte 2 = (H) head
  1401.                 byte 3 = (R) sector
  1402.                 byte 4 = (N) bytes/sector (0 = 128, 1 = 256, 2 = 512, 3 = 1024)
  1403. return  CF      set if error occurred
  1404.                 AH      status code (see above)
  1405. note    Not valid for ESDI hard disks on PS/2
  1406.                  
  1407.  
  1408. Function 06h    Hard Disk - format track and set bad sector flags 
  1409.                                                      (PC2, PC-XT, and Portable)
  1410. entry   AH      06h
  1411.         AL      interleave value (XT only)
  1412.         CH      cylinder number (bits 8,9 in high bits of CL)
  1413.         CL      sector number
  1414.         DH      head
  1415.         DL      drive
  1416.         ES:BX   512 byte format buffer
  1417.                 the first 2*(sectors/track) bytes contain f,n for each sector
  1418.                    f  00Fh for good sector 
  1419.                       80h for bad sector
  1420.                    n  sector number
  1421. return  AH      status code 
  1422.  
  1423.                                      
  1424. Function 07h    Hard Disk - format the drive starting at the desired track
  1425.                                                       (PC2, PC-XT and Portable)
  1426. entry   AH      07h
  1427.         AL      interleave value (XT only) (01h-10h) 
  1428.         CH      cylinder number (bits 8,9 in high bits of CL) (00h-03FFh)
  1429.         CL      sector number
  1430.         DH      head number (0-7)
  1431.         DL      drive number (80h-87h, 80h=C, 81h=D,...)
  1432.         ES:BX   format buffer, size = 512 bytes
  1433.                 the first 2*(sectors/track) bytes contain f,n for each sector
  1434.                 f=00h for good sector 
  1435.                   80h for bad sector
  1436.                 n=sector number
  1437. return  AH      status code (see above)
  1438. note    Award AT BIOS routines are extended to handle more than 1024 cylinders.
  1439.         AL      number of sectors
  1440.         CH      cylinder numberm low 8 bits
  1441.         CL      sector number bits 0-5, bits 6-7 are high 2 cylinder bits
  1442.         DH      head number (bits 0-5) bits 6-7 are extended high cyls (>1024)
  1443.         DL      drive number (0-1 for diskette, 80h-81h for hard disk)
  1444.         ES:BX   transfer address
  1445.  
  1446.  
  1447. Function 08h    Read Drive Parameters             (XT, CONV, AT, XT/286, PS/2)
  1448. entry   AH      08h 
  1449.         DL      drive number (0-2)
  1450. return  CF      set on error
  1451.                 AH      status code (see above)
  1452.         BL      drive type (see AH=17h below) (AT/PS2 floppies only)
  1453.         CH      maximum useable value for cylinder number
  1454.         CL      maximum useable value for sector number or cylinder number 
  1455.         DH      maximum usable value for head number
  1456.         DL      number of consecutive acknowledging drives (0-2)
  1457.         ES:DI   drive parameter table
  1458.  
  1459.  
  1460. Function 09h    Initialize Two Fixed Disk Base Tables    (XT, AT, XT/286, PS/2)
  1461.                 (install nonstandard drive)
  1462. entry   AH      09h
  1463. return  CF      set on error
  1464.                 AH      status code (see above)
  1465.                 data block definitions:
  1466.                 +0   maximum number of cylinders (dw)
  1467.                 +2   maximum number of heads (db)
  1468.                 +3   starting reduced write current cylinder  (dw - XT only)
  1469.                 +5   starting write precomp cylinder (dw)
  1470.                 +7   maximum ECC data burst length (db - XT only)
  1471.                 +8   control byte: Bits  
  1472.                      0,1,2 ─ drive option
  1473.                      3,4,5 - always zero
  1474.                          6 - disable ECC retries
  1475.                          7 - disable access retries
  1476. note 1) Int 41h points to table for drive 0
  1477.      2) Int 46h points to table for drive 1
  1478.      3) 41h used by XT, 41h and 46h used by AT
  1479.  
  1480.  
  1481. Function 0Ah    Read Long   (Hard disk)                 (XT, AT, XT/286, PS/2)
  1482. entry   AH      0Ah
  1483.         CH      cylinder number (bits 8,9 in high bits of CL)
  1484.         CL      sector number
  1485.         DL      drive ID
  1486.         DH      head number
  1487.         ES:BX   pointer to buffer to fill
  1488. return  CF      set on error
  1489.                 AH      status code (see above)
  1490.         AL      number of sectors actually transferred
  1491. note 1) A "long" sector includes a 4 byte EEC (Extended Error Correction) code
  1492.      2) Used for diagnostics only on PS/2 systems
  1493.  
  1494.  
  1495. Function 0Bh    Write Long                              (XT, AT, XT/286, PS/2)
  1496. entry   AH      0Bh
  1497.         CH      cylinder (bits 8,9 in high bits of CL)
  1498.         CL      sector number
  1499.         DH      head number
  1500.         DL      drive ID
  1501.         ES:BX   pointer to buffer containing data
  1502. return  CF      set on error
  1503.                 AH      status code (see above)   
  1504.         AL      number of sectors actually transferred
  1505. note 1) A "long" sector includes a 4 byte EEC (Extended Error Correction) code
  1506.      2) Used for diagnostics only on PS/2 systems
  1507.  
  1508.  
  1509. Function 0Ch    Seek To Cylinder                (except PC, PCjr)
  1510. entry   AH      0Ch
  1511.         CH      cylinder number (bits 8,9 in high bits of CL)
  1512.         DH      head number
  1513.         DL      drive ID
  1514. return  CF      set on error
  1515.                 AH      status code (see above)
  1516. note 1) Positions heads over a particular cylinder
  1517.  
  1518.  
  1519. Function 0Dh    Alternate Disk Reset                    (except PC, PCjr)
  1520. entry   AH      0Dh
  1521.         DL      drive ID
  1522. return  CF      set on error
  1523.         AH      status code (see above)
  1524. note    Not for PS/2 ESDI hard disks
  1525.  
  1526.  
  1527. Function 0Eh    Read Sector Buffer                         (XT, Portable PS/2)
  1528. entry   AH      0Eh 
  1529.         AL      number of sectors
  1530.         CH      cylinder (bits 8,9 in top two bits of CL)
  1531.         CL      sector number
  1532.         DH      head number
  1533.         DL      drive number
  1534.         ES:BX   pointer to buffer
  1535. return  CF      set on error
  1536.                 AH      status code (see above)
  1537.         AL      number of sectors actually transferred    
  1538. note 1) Transfers controller's sector buffer.  No data is read from the drive
  1539.      2) Used for diagnostics only on PS/2 systems
  1540.       
  1541.  
  1542. Function 0Fh    Write sector buffer                          (XT, Portable)
  1543. entry   AH      0Fh 
  1544.         AL      number of sectors
  1545.         CH      cylinder (bits 8,9 in top two bits of CL)
  1546.         CL      sector number
  1547.         DH      head number
  1548.         DL      drive number
  1549.         ES:BX   pointer to buffer
  1550. return  CF      set if error
  1551.                 AH      status code
  1552.         AL      number of sectors actually transferred
  1553. note 1) Should be called before formatting to initialize the controller's
  1554.         sector buffer.
  1555.      2) Used for diagnostics only on PS/2 systems
  1556.       
  1557.  
  1558. Function 10h    Test For Drive Ready
  1559. entry   AH      10h
  1560.         DL      drive ID
  1561. return  CF      set on error
  1562.                 AH      status code (see above)
  1563.                                     
  1564.  
  1565. Function 11h    Recalibrate Drive
  1566. entry   AH      11h
  1567.         DL      drive ID
  1568. return  CF      set on error
  1569.                 AH      status code (see above)
  1570.               
  1571.  
  1572. Function 12h    Controller RAM Diagnostic                (XT, Portable, PS/2)
  1573. entry   AH      12h
  1574. return  CF      set on error
  1575.                 AH      status code (see AH=1 above)
  1576. note    Used for diagnostics only on PS/2 systems
  1577.  
  1578.  
  1579. Function 13h    Drive Diagnostic                             (XT, Portable)
  1580. entry   AH      13h
  1581. return  CF      set on error
  1582.                 AH      status code (see above)
  1583. note    Used for diagnostics only on PS/2 systems
  1584.  
  1585.  
  1586. Function 14h    Controller Internal Diagnostic               (AT, XT/286)
  1587. entry   AH      14h
  1588. return  CF      set on error
  1589.         AH      status code (see above)
  1590. note 1) OEM is Western Digital 1003-WA2 hard/floppy combination controller
  1591.         in AT and XT/286.
  1592.      2) Used for diagnostics only in PS/2 systems
  1593.  
  1594.  
  1595. Function 15h    Get Disk Type                                (except PC and XT)
  1596. entry   AH      15h
  1597.         DL      drive ID
  1598. return  AH      disk type
  1599.                 00h     no drive is present
  1600.                 01h     diskette, no change detection present
  1601.                 02h     diskette, change detection present
  1602.                 03h     fixed disk
  1603.         CX:DX   number of 512-byte sectors when AH = 03h
  1604.  
  1605.  
  1606. Function 16h    Change of Disk Status (diskette)             (except PC and XT)
  1607. entry   AH      16h
  1608. return  AH      disk change status
  1609.                 00h     no disk change
  1610.                 01h     disk changed
  1611.         DL      drive that had disk change
  1612.       
  1613.  
  1614. Function 17h    Set Disk Type for Format (diskette)          (except PC and XT)
  1615. entry   AH      17h
  1616.         AL      00h     no disk
  1617.                 01h     360kb diskette in 360Kb drive
  1618.                 02h     360kb diskette in 1.2M drive
  1619.                 03h     1.2M diskette in 1.2M drive
  1620.                 04h     720kb diskette in 720Kb drive
  1621.         DL      drive number
  1622. return  AH      status of operation
  1623. note    This function is probably enhanced for the PS/2 series to detect
  1624.         1.44 in 1.44 and 720k in 1.44.
  1625.  
  1626.  
  1627. Function 18h    Set Media Type For Format  (diskette)        (AT, XT/286, PS/2)
  1628. entry   AH      18h
  1629.         CH      lower 8 bits of number of tracks
  1630.         CL      high 2 bits of number of tracks (6,7) sectors per track 
  1631.                 (bits 0-5)
  1632.         DL      drive number
  1633. return  AH      00h      if requested combination supported
  1634.                 01h      if function not available
  1635.                 0Ch      if not suppported or drive type unknown
  1636.                 80h      if there is no media in the drive
  1637.         ES:DI   pointer to 11-byte parameter table
  1638.  
  1639.  
  1640. Function 19h    Park Hard Disk Heads                         (XT/286, PS/2)
  1641. entry   AH      19h 
  1642.         DL      drive
  1643. return  CF      set on error
  1644.                 AH      error code
  1645.  
  1646.  
  1647. Function 1Ah    ESDI Hard Disk - Format                         (PS/2)
  1648. entry   AH      1Ah
  1649.         AL      defect table count
  1650.         CL      format modifiers
  1651.                 bits    0 ignore primary defect map
  1652.                         1 ignore secondary defect map
  1653.                         2 update secondary defect map
  1654.                         3 perform surface analysis
  1655.                         4 generate periodic interrupt
  1656.         DL      drive
  1657.         ES:BX   pointer to defect table
  1658. return  CF      set on error
  1659.                 AH      status (see AH=1 above)
  1660. note    If periodic interrupt selected, int 15h/AH=0Fh is called after each
  1661.         cylinder is formatted
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667. ┌─────────────────────────────────────────────────────────────────────────────┐
  1668. │Interrupt 14h  Initialize and Access Serial Port For Int 14                  │
  1669. └─────────────────────────────────────────────────────────────────────────────┘
  1670. (0:0050h)       the following status is defined:
  1671.  
  1672.         serial status byte:
  1673.         bits    0 delta clear to send
  1674.                 1 delta data set ready
  1675.                 2 trailing edge ring detector
  1676.                 3 delta receive line signal detect
  1677.                 4 clear to send
  1678.                 5 data set ready
  1679.                 6 ring indicator
  1680.                 7 receive line signal detect
  1681.  
  1682.         line status byte:
  1683.         bits    0 data ready
  1684.                 1 overrun error
  1685.                 2 parity error
  1686.                 3 framing error
  1687.                 4 break detect
  1688.                 5 transmit holding register empty
  1689.                 6 transmit shift register empty
  1690.                 7 time out  note: if bit 7 set then other bits are invalid
  1691.  
  1692.  All routines have AH=function number and DX=RS232 card number (0 based).
  1693. AL=character to send or received character on exit, unless otherwise noted.
  1694.  
  1695. entry   AH      00h     Initialize And Access Serial Communications Port
  1696.                         bit pattern: BBBPPSLL
  1697.                         BBB = baud rate:   110,150,300,600,1200,2400,4800,9600 
  1698.                         PP  = parity:      01 = odd, 11 = even 
  1699.                         S   = stop bits:   0 = 1, 1 = 2
  1700.                         LL  = word length: 10 = 7-bits, 11 = 8-bits 
  1701.         AL      parms for initialization:
  1702.                 bit pattern:
  1703.                 0       word length
  1704.                 1       word length
  1705.                 2       stop bits 
  1706.                 3       parity
  1707.                 4       parity
  1708.                 5       baud rate 
  1709.                 6       baud rate 
  1710.                 7       baud rate 
  1711.                 word length     10      7 bits
  1712.                                 11      8 bits
  1713.                 stop bits       0       1 stop bit
  1714.                                 1       2 stop bits
  1715.                 parity          00      none
  1716.                                 01      odd
  1717.                                 11      even
  1718.                 baud rate       000     110 baud
  1719.                                 001     150 baud
  1720.                                 010     300 baud
  1721.                                 011     600 baud
  1722.                                 100     1200 baud
  1723.                                 101     2400 baud
  1724.                                 110     4800 baud
  1725.                                 111     9600 baud  (4800 on PCjr)
  1726.         DX      port number
  1727. return  AH      line status
  1728.         AL      modem status
  1729.  
  1730.  
  1731. Function 01h    Send Character in AL to Comm Port DX (0 or 1)
  1732. entry   AH      01h
  1733.         AL      character
  1734.         DX      port number (0 or 1)
  1735. return  AH      RS232 status code
  1736.                 bit     0       data ready
  1737.                         1       overrun error
  1738.                         2       parity error
  1739.                         3       framing error
  1740.                         4       break detected
  1741.                         5       transmission buffer register empty
  1742.                         6       transmission shift register empty
  1743.                         7       timeout
  1744.         AL      modem status
  1745.                 bit
  1746.                         0       delta clear-to-send
  1747.                         1       delta data-set-ready
  1748.                         2       trailing edge ring detected
  1749.                         3       change, receive line signal detected
  1750.                         4       clear-to-send
  1751.                         5       data-set-ready
  1752.                         6       ring received
  1753.                         7       receive line signal detected
  1754.  
  1755.  
  1756. Function 02h    Wait For A Character From Comm Port DX
  1757. entry   AH      02h
  1758. return  AL      character received
  1759.         AH      error code (see above)(00h for no error)
  1760.  
  1761.  
  1762. Function 03h    Fetch the Status of Comm Port DX (0 or 1) 
  1763. entry   AH      03h
  1764. return  AH      set bits (01h) indicate comm-line status 
  1765.                 bit     7       timeout
  1766.                 bit     6       empty transmit shift register
  1767.                 bit     5       empty transmit holding register
  1768.                 bit     4       break detected ("long-space")
  1769.                 bit     3       framing error
  1770.                 bit     2       parity error
  1771.                 bit     1       overrun error
  1772.                 bit     0       data ready
  1773.         AL      set bits indicate modem status
  1774.                 bit     7       received line signal detect
  1775.                 bit     6       ring indicator
  1776.                 bit     5       data set ready
  1777.                 bit     4       clear to send 
  1778.                 bit     3       delta receive line signal detect
  1779.                 bit     2       trailing edge ring detector 
  1780.                 bit     1       delta data set ready
  1781.                 bit     0       delta clear to send
  1782.  
  1783.  
  1784. Function 04h    Extended Initialize                             (PC Convertible)
  1785. entry   AH      04h
  1786.         AL      break status
  1787.                 01h     if break
  1788.                 00h     if no break
  1789.         BH      parity
  1790.                 00h     no parity
  1791.                 01h     odd parity
  1792.                 02h     even parity
  1793.                 03h     stick parity odd
  1794.                 04h     stick parity even
  1795.         BL      number of stop bits
  1796.                 00h     one stop bit
  1797.                 01h     2 stop bits (1½ if 5 bit word length)
  1798.         CH      word length
  1799.                 00h     5 bits
  1800.                 01h     6 bits
  1801.                 02h     7 bits
  1802.                 03h     8 bits
  1803.         CL      baud rate
  1804.                 00h     110
  1805.                 01h     150
  1806.                 02h     300
  1807.                 03h     600
  1808.                 04h     1200
  1809.                 05h     2400
  1810.                 06h     4800
  1811.                 07h     9600
  1812.                 08h     19200
  1813. return  AL      modem status
  1814.         AH      line control status
  1815.  
  1816.  
  1817. Function 05h    Extended Communication Port Control             (PS/2)
  1818. entry   AH      05h
  1819.         AL      00h     read modem control register
  1820.                 return  BL      modem control reg (see AL=1)
  1821.         AL      01h     write modem control register
  1822.         BL      modem control register: (for AL=00 and AL=01)  bits
  1823.                 0       data terminal ready
  1824.                 1       request to send
  1825.                 2       out1
  1826.                 3       out2
  1827.                 4       loop
  1828.                 5,6,7   reserved
  1829. return  AH      status
  1830.  
  1831. ┌─────────────────────────────────────────────────────────────────────────────┐
  1832. │Interrupt 15h  Cassette I/O                                                  │
  1833. └─────────────────────────────────────────────────────────────────────────────┘
  1834. (0:0054h)       Renamed "System Services" on PS/2 line
  1835.  
  1836. Function 00h    Turn Cassette Motor On                          (PC, PCjr only)
  1837. entry   AH      00h
  1838. return  AH      86h     no cassette present
  1839.         CF      set on error
  1840.                 AH      error code
  1841.                         00h     no errors
  1842.                         01h     CRC error
  1843.                         02h     bad tape signals
  1844.                                 no data transitions (PCjr)
  1845.                         03h     no data found on tape
  1846.                                 not used (PCjr)
  1847.                         04h     no data
  1848.                                 no leader (PCjr)
  1849.                         80h     invalid command
  1850.                         86h     no cassette present
  1851.                                 not valid in PCjr
  1852. note    NOP for systems where cassette not supported
  1853.  
  1854.  
  1855. Function 01h    Turn Cassette Motor Off                         (PC, PCjr only)
  1856. entry   AH      01h
  1857. return  AH      86h     no cassette present
  1858.         CF      set on error
  1859.                 AH      error code
  1860. note    NOP for systems where cassette not supported
  1861.  
  1862.  
  1863. Function 02h    Read Blocks From Cassette                       (PC, PCjr only)
  1864. entry   AH      02h
  1865.         CX      count of bytes to read
  1866.         ES:BX   pointer to data buffer
  1867. return  CF      set on error
  1868.                 AH      error code
  1869.         DX      count of bytes actually read
  1870.         ES:BX   pointer past last byte written
  1871. note 1) NOP for systems where cassette not supported
  1872.      2) Cassette operations normally read 256 byte blocks
  1873.  
  1874.  
  1875. Function 03h    Write Data Blocks to Cassette                   (PC, PCjr only)
  1876. entry   AH      03h
  1877.         CX      count of bytes to write
  1878.         ES:BX   pointer to data buffer
  1879. return  CF      set on error
  1880.                 AH      error code (see 02h)
  1881.         CX      0
  1882.         ES:BX   pointer to last byte written+1
  1883. note 1) NOP for systems where cassette not supported
  1884.      2) The last block is padded to 256 bytes with zeroes if needed
  1885.      3) No errors are returned by this service
  1886.  
  1887.  
  1888. Function 0Fh    ESDI Format Unit Periodic Interrupt          (PS/2 50, 60, 80)
  1889. entry   AH      0Fh
  1890.         AL      phase code
  1891.                 00h     reserved
  1892.                 01h     surface analysis
  1893.                 02h     formatting
  1894. return  CF      clear   if formatting should continue
  1895.                 set     if it should terminate
  1896. note    Called during ESDI drive formatting after each cylinder is completed
  1897.  
  1898.  
  1899. Function 10h    TopView API Function Calls                      (TopView)
  1900. entry   AH      00h     PAUSE   Give Up CPU Time
  1901.                         return  00h     after other processes run
  1902.                 01h     GETMEM  allocate "system" memory
  1903.                         BX      number of bytes to allocate
  1904.                         return  ES:DI pointer to block of memory
  1905.                 02h     PUTMEM  deallocate "system" memory
  1906.                         ES:DI   pointer to previously allocated block
  1907.                         return  block freed
  1908.                 03h     PRINTC  display character/attribute on screen
  1909.                         BH      attribute
  1910.                         BL      character
  1911.                         DX      segment of object handle for window
  1912.                         note    BX=0 does not display anything, it only
  1913.                                 positions the hardware cursor
  1914.                 10h     unknown
  1915.                         AL      04h thru 12h
  1916.                         return  TopView - unimplemented in DV 2.0x
  1917.                                 pops up "Programming error" window in DV 2.0x
  1918.                 11h     unknown
  1919.                 12h     unknown
  1920.                 13h     GETBIT  define a 2nd-level interrupt handler
  1921.                         ES:DI   pointer to FAR service routine
  1922.                         return  BX      bit mask indicating which bit was
  1923.                                         allocated
  1924.                                         0 if no more bits available
  1925.                 14h     FREEBIT undefine a 2nd-level interrupt handler
  1926.                         BX      bit mask from int 15/AH 13h
  1927.                 15h     SETBIT  schedule one or more 2nd-level interrupts
  1928.                         BX      bit mask for interrupts to post
  1929.                         return  indicated routines will be called at next ???
  1930.                 16h     ISOBJ   verify object handle
  1931.                         ES:DI   possible object handle
  1932.                         return   BX     -1 if ES:DI is a valid object handle
  1933.                                          0 if ES:DI is not
  1934.                 17h     TopView - unimplemented in DV 2.00
  1935.                         return  pops up "Programming Error" window in DV 2.00
  1936.                 18h     LOCATE  Find Window at a Given Screen Location
  1937.                         BH      column
  1938.                         BL      row
  1939.                         ES      segment of object handle for ?
  1940.                                 (0 = use default)
  1941.                         return  ES      segment of object handle for window
  1942.                                         which is visible at the indicated
  1943.                                         position
  1944.                 19h     SOUND   Make Tone
  1945.                         BX      frequency in Hertz
  1946.                         CX      duration in clock ticks (18.2 ticks/sec)
  1947.                         return  immediately, tone continues to completion
  1948.                         note    If another tone is already playing, the new tone
  1949.                                 does not start until completion of the previous
  1950.                                 one. In DV 2.00, it is possible to enqueue
  1951.                                 about 32 tones before the process is blocked
  1952.                                 until a note completes.
  1953.                                 In DV 2.00, the lowest tone allowed is 20 Hz
  1954.                 1Ah     OSTACK  Switch to Task's Internal Stack
  1955.                         return  stack switched
  1956.                 1Bh     BEGINC  Begin Critical Region
  1957.                         return  task-switching temporarily disabled
  1958.  
  1959.                         note    Will not task-switch until END CRITICAL REGION
  1960.                                 (AH=1Ch) is called
  1961.                 1Ch     ENDC    End Critical Region
  1962.                         return  task-switching enabled
  1963.                 1Dh     STOP    STOP TASK
  1964.                         ES      segment of object handle for task to be stopped
  1965.                                 (= handle of main window for that task)
  1966.                         return  indicated task will no longer get CPU time
  1967.                         note    At least in DV 2.00, this function is ignored
  1968.                                 unless the indicated task is the current task.
  1969.                 1Eh     START   Start Task
  1970.                         ES      segment of object handle for task to be started
  1971.                                 (== handle of main window for that task)
  1972.                         return  Indicated task is started up again
  1973.                 1Fh     DISPEROR Pop-Up Error Window
  1974.                         BX      bit fields:
  1975.                                 0-12    number of characters to display
  1976.                                 13,14   which mouse button may be pressed to
  1977.                                         remove window
  1978.                                         00      either
  1979.                                         01      left
  1980.                                         10      right
  1981.                                         11      either
  1982.                                 15      beep if 1
  1983.                         DS:DI   pointer to text of message
  1984.                         CH      width of error window (0 = default)
  1985.                         CL      height of error window (0 = default)
  1986.                         DX      segment of object handle
  1987.                         return  BX      status:
  1988.                                         1       left button pressed
  1989.                                         2       right button pressed
  1990.                                         27      ESC key pressed
  1991.                         note    Window remains on-screen until ESC or indicated
  1992.                                 mouse button is pressed
  1993.                 20h     TopView - unimplemented in DV 2.0x
  1994.                         return  pops up "Programming Error" window in DV 2.0x
  1995.                 21h     PGMINT  Interrupt Another Task
  1996.                         BX      segment of object handle for task to interrupt
  1997.                         DX:CX   address of FAR routine to jump to next time
  1998.                                 task is run
  1999.                         return  nothing?
  2000.                         note    The current ES, DS, SI, DI, and BP are passed
  2001.                                 to the FAR routine
  2002.                 22h     GETVER  Get Version
  2003.                         BX      00h
  2004.                         return  BX      nonzero, TopView or compatible loaded
  2005.                                 BH      minor version
  2006.                                 BL      major version
  2007.                         notes   TaskView returns BX = 0001h
  2008.                                 DESQview 2.0 returns BX = 0A01h
  2009.                 23h     POSWIN  Position Window
  2010.                         BX      segment of object handle for parent window
  2011.                                 within which to position the window (0 = full
  2012.                                 screen)
  2013.                         CH      # columns to offset from position in DL
  2014.                         CL      # rows to offset from position in DL
  2015.                         DL      bit flags
  2016.                                 0,1     horizontal position
  2017.                                         00      current
  2018.                                         01      center
  2019.                                         10      left
  2020.                                         11      right
  2021.                                 2,3     vertical position
  2022.                                         00      current
  2023.                                         01      center
  2024.                                         10      top
  2025.                                         11      bottom
  2026.                                 4       don't redraw screen if set
  2027.                                 5-7     not used
  2028.                         ES      segment of object handle for window to be
  2029.                                 positioned
  2030.                         return  nothing
  2031.                 24h     GETBUF  Get Virtual Screen Information
  2032.                         BX      segment of object handle for window (0=default)
  2033.                         return  CX      size of virtual screen in bytes
  2034.                                 DL      0 or 1, unknown
  2035.                                 ES:DI   address of virtual screen
  2036.                 25h     USTACK  Switch Back to User's Stack
  2037.                         return  stack switched back
  2038.                         note    Call only after int 15h,fn1Ah
  2039.                 26h-2Ah DesQview (TopView?) - unimplemented in DV 2.0x
  2040.                         return  pops up "Programming Error" window in DV 2.0x 
  2041.                 2Bh     POSTTASK  Awaken Task       DesQview 2.0 (TopView?)
  2042.                         BX      segment of object handle for task
  2043.                         return  nothing
  2044.                 2Ch     Start New Application in New Process
  2045.                         DesQview 2.0 (TopView?)
  2046.                         ES:DI   pointer to contents of .PIF/.DVP file
  2047.                         BX      size of .PIF/.DVP info
  2048.                         return  BX      segment of object handle for new task
  2049.                 2Dh     Keyboard Mouse Control       DesQview 2.0 
  2050.                         BL      subfunction
  2051.                                 00h     determine whether using keyboard mouse
  2052.                                 01h     turn keyboard mouse on
  2053.                                 02h     turn keyboard mouse off
  2054.                         return  (calling BL was 00h)
  2055.                                 BL      0       using real mouse
  2056.                                         1       using keyboard mouse
  2057.  
  2058.  
  2059. Function 11h    Topview commands
  2060. entry   AH      11h
  2061.         AL      various
  2062. note    In DesQview 2.0x, these function calls are identical to AH=0DEh, so
  2063.         see those below
  2064.  
  2065.  
  2066. Function 20h    PRINT.COM  (DOS internal)        (AT, XT-286, PS/2 50+)
  2067. entry   AH      20h
  2068.         AL      subfunction
  2069.                 00h     unknown (PRINT)
  2070.                 01h     unknown (PRINT)
  2071.                 10h     sets up SysReq routine on AT, XT/286, PS/2
  2072.                 11h     completion of SysReq routine (software only)
  2073. note 1) AL=0 or 1 sets or resets some flags which affect what PRINT does when
  2074.         it tries to access the disk
  2075.  
  2076.  
  2077. Function 21h    Power-On Self Test (POST) Error Log             (PS/2 50+)
  2078. entry   AH      21h
  2079.         AL       00h    read POST log
  2080.                  01h    write POST log
  2081.                         BH      device ID
  2082.                         BL      error code
  2083. return  CF      set on error
  2084.         AH      status
  2085.                 00h    OK
  2086.                        BX      number of error codes stored
  2087.                        ES:DI   pointer to error log
  2088.                 01h    list full
  2089.                 80h    invalid command
  2090.                 86h    unsupported
  2091. note    The log is a series of words, the first byte of which identifies the
  2092.         error code and the second the device.
  2093.  
  2094.  
  2095. Function 40h    Read/Modify Profiles                            (Convertible)
  2096. entry   AH      40h
  2097.         AL      00h     read system profile in CX,BX
  2098.                 01h     write system profile from CX, BX
  2099.                 02h     read internal modem profile in BX
  2100.                 03h     write internal modem profile from BX
  2101.         BX      profile info
  2102. return  BX      internal modem profile (from 02h)
  2103.         CX,BX   system profile (from 00h)
  2104.  
  2105.  
  2106. Function 41h    Wait On External Event                          (Convertible)
  2107. entry   AH      41h
  2108.         AL      condition type
  2109.                 bits 0-2: condition to wait for
  2110.                           0 any external event
  2111.                           1 compare and return if equal
  2112.                           2 compare and return if not equal
  2113.                           3 test and return if not zero
  2114.                           4 test and return if zero
  2115.                 bit 3:    reserved
  2116.                 bit 4:    1=port address, 0=user byte
  2117.                 bits 5-7: reserved
  2118.         BH      condition compare or mask value
  2119.                 condition codes:
  2120.                 0       any external event
  2121.                 1       compare and return if equal
  2122.                 2       compare and return if not equal
  2123.                 3       test and return if not zero
  2124.                 4       test and return if zero
  2125.         BL      timeout value times 55 milliseconds
  2126.                 0 if no time limit
  2127.         DX      I/O port address (if AL bit 4 = 1)
  2128.         ES:DI   pointer to user byte (if AL bit 4 = 0)
  2129.  
  2130.  
  2131. Function 42h    Request System Power Off                        (Convertible)
  2132. entry   AH      42h
  2133.         AL      00h     to use system profile
  2134.                 01h     to force suspend regardless of profile
  2135.  
  2136.  
  2137. Function 43h    Read System Status                              (Convertible)
  2138. entry   AH      43h
  2139. return  AL      status bits:
  2140.                 0       LCD detached
  2141.                 1       reserved
  2142.                 2       RS232/parallel powered on
  2143.                 3       internal modem powered on
  2144.                 4       power activated by alarm
  2145.                 5       standby power lost
  2146.                 6       external power in use
  2147.                 7       battery low
  2148.  
  2149.  
  2150. Function 44h    (De)activate Internal Modem Power               (Convertible)
  2151. entry   AH      44h
  2152.         AL      00h      to power off
  2153.                 01h      to power on
  2154.  
  2155.  
  2156. Function 4Fh    Keyboard Intercept                    (except PC, PCjr, and XT)
  2157. entry   AH      4Fh
  2158.         AL      scan code, CF set
  2159. return  AL      scan code, CF set if processing desired
  2160. note    Called by int 9 handler to translate scan codes
  2161.  
  2162.  
  2163. Function 80h    Device Open                                  (AT, XT/286, PS/2)
  2164. entry   AH      80h
  2165.         BX      device ID
  2166.         CX      process ID
  2167. return  CF      set on error
  2168.         AH      status
  2169.  
  2170.  
  2171. Function 81h    Device Close                                 (AT, XT/286, PS/2)
  2172. entry   AH      81h
  2173.         BX      device ID
  2174.         CX      process ID
  2175. return  CF      set on error
  2176.         AH      status
  2177.  
  2178.  
  2179. Function 82h    Program Termination                          (AT, XT/286, PS/2)
  2180.         AH      82h
  2181.         BX      device ID
  2182. return: CF      set on error
  2183.         AH      status
  2184. note    Closes all devices opened with function 80h
  2185.  
  2186.  
  2187. Function 83h    Event Wait                       (AT, XT/286, Convertible, PS/2)
  2188. entry   AH      83h
  2189.         AL      00h     to set interval
  2190.                 10h     to cancel
  2191.         CX,DX   number of microseconds to wait (granularity is 976 microseconds)
  2192.         ES:BX   pointer to memory flag (bit 7 is set when interval expires)
  2193.                 (pointer is to caller's memory)
  2194. return  CF      set (1) if function already busy
  2195.  
  2196.  
  2197. Function 84h    Read Joystick Input Settings                 (AT, XT/286, PS/2)
  2198. entry   AH      84h
  2199.         DX      00h     to read the current switch settings  (return in AL)
  2200.                 01h     to read the resistive inputs
  2201. return  AX      A(X) value
  2202.         BX      A(Y) value
  2203.         CX      B(X) value
  2204.         DX      B(Y) value
  2205.         AL      switch settings (bits 7-4)
  2206.  
  2207.  
  2208. Function 85h    System Request (SysReq) Key Pressed        (except PC, PCjr, XT)
  2209. entry   AH      85h
  2210. return  AL      00h      key pressed
  2211.                 01h      key released
  2212. note    Called by keyboard decode routine
  2213.  
  2214.  
  2215. Function 86h    Elapsed Time Wait                          (except PC, PCjr, XT)
  2216.         AH      86h
  2217.         CX,DX   number of microseconds to wait
  2218. return  CF      clear   after wait elapses
  2219.         CF      set     immediately due to error
  2220. note    Only accurate to 977 microseconds
  2221.  
  2222.  
  2223. Function 87h    Extended Memory Block Move              (286/386 machines only)
  2224.         AH      87h
  2225.         CX      number of words to move
  2226.         ES:SI   pointer to Global Descriptor Table (GDT)
  2227.                 offset 00h      null descriptor
  2228.                        08h      uninitialized, will be made into GDT descriptor
  2229.                        10h      descriptor for source of move
  2230.                        18h      descriptor for destination of move
  2231.                        20h      uninitialized, used by BIOS
  2232.                        28h      uninitialized, will be made into SS descriptor
  2233. return  CF      set on error
  2234.         AH      status
  2235.                 00h     source copied into destination
  2236.                 01h     parity error
  2237.                 02h     interrupt error
  2238.                 03h     address line 20 gating failed
  2239.  
  2240.  
  2241. Function 88h    Extended Memory Size Determine                (AT, XT/286, PS/2)
  2242. entry   AH      88h
  2243. return  AX      # of contiguous 1K blocks of memory starting at address 1024k
  2244.  
  2245.  
  2246. Function 89h    Switch Processor to Protected Mode            (AT, XT/286, PS/2)
  2247. entry   AH      89h
  2248.         BH      interrupt number of IRQ 8 (IRQ 9Fh use next 7 interrupts)
  2249.         BL      interrupt number of IRQ 0 (IRQ 17h use next 7 interrupts)
  2250.         CX      offset into protected mode CS to jump to
  2251.         DS:SI   pointer to Global Descriptor Table for protected mode
  2252.                 offset  00h     null descriptor
  2253.                         08h     GDT descriptor
  2254.                         10h     IDT descriptor
  2255.                         18h     DS
  2256.                         20h     ES
  2257.                         28h     SS
  2258.                         30h     CS
  2259.                         38h     uninitialized, used to build descriptor for
  2260.                                 BIOS CS
  2261. return  AH      0FFh  error enabling address line 20
  2262.         CF      set on error
  2263.       
  2264.  
  2265. Function 90h    Device Busy Loop                         (except PC, PCjr, XT)
  2266. entry   AH      90h
  2267.         AL      type code:
  2268.                 00h     disk
  2269.                 01h     diskette
  2270.                 02h     keyboard
  2271.                 03h     PS/2 pointing device
  2272.                 80h     network (ES:BX = pointer to network control block)
  2273.                 0FCh    hard disk reset (PS/2)
  2274.                 0FDh    diskette motor start
  2275.                 0FEh    printer
  2276.         ES:BX   pointer to request block for type codes 80h through 0BFh
  2277. return  CF      1 (set) if wait time satisfied
  2278.                 0 (clear) if driver must perform wait
  2279. note    Used by NETBIOS
  2280.         Type codes are allocated as follows:
  2281.         00h-7Fh non-reentrant devices; OS must arbitrate access
  2282.         80h-BFh reentrant devices; ES:BX points to a unique control block
  2283.         C0h-FFh wait-only calls, no complementary int 15, fn91h call
  2284.  
  2285.  
  2286. Function 91h    Set Flag and Complete Interrupt          (except PC, PCjr, XT)
  2287. entry   AH      91h
  2288.         AL      type code (see AH=90h above)
  2289.         ES:BX    pointer to request block for type codes 80h through 0BFh
  2290. return  AH       0
  2291. note    Used by NETBIOS
  2292.                                                                 
  2293.  
  2294. Function 0C0h   Get System Configuration      (XT after 1/10/86, PC Convertible,
  2295.                                                XT/286, AT, PS/2)
  2296. entry   AH      0C0h
  2297. return  CF      1 if BIOS doesn't support call
  2298.         ES:BX   pointer to ROM system descriptor table
  2299.                 dword   number of bytes in the following table (norm. 16 bytes)
  2300.                 byte    system ID byte; see Chapter 2 for interpretation
  2301.                 byte    secondary ID distingushes between AT and XT/286, etc.
  2302.                 byte    BIOS revision level, 0 for 1st release, 1 for 2nd, etc.
  2303.                 byte    feature information
  2304.                         80h     DMA channel 3 used by hard disk BIOS
  2305.                         40h     2nd 8259 installed
  2306.                         20h     realtime clock installed
  2307.                         10h     int 15h, fn 04h called upon int 09h
  2308.                         08h     wait for external event supported (int 15fn41)
  2309.                                 used on Convertible; reserved on PS/2 systems
  2310.                         04h     extended BIOS area allocated at 640k
  2311.                         03h     reserved
  2312.                         02h     bus is Micro Channel instead of PC
  2313.                         01h     reserved
  2314.                         00h     reserved
  2315.                 byte    unknown (set to 0) (reserved by IBM)
  2316.                 byte    unknown (set to 0) (reserved by IBM)
  2317.                 byte    unknown (set to 0)
  2318.                 byte    unknown (set to 0) (Award copyright here)
  2319. note 1) Int 15h is also used for the Multitask Hook on PS/2 machines. No 
  2320.         register settings availible yet.
  2321.      2) The 1/10/86 XT BIOS returns an incorrect value for the feature byte.
  2322.  
  2323.  
  2324. Function 0C1h   System - Return Extended-BIOS Data-Area Segment Address (PS/2)
  2325. entry   AH      0C1h
  2326. return  CF      set on error
  2327.         ES      segment of data area
  2328.  
  2329.  
  2330. Function 0C2h   Pointing Device BIOS Interface      (DesQview 2.x)    (PS/2)
  2331. entry   AH      0C2h
  2332.         AL      00h     enable/disable
  2333.                         BH      00h    disable
  2334.                 01h     reset
  2335.                         return  BH     device ID
  2336.                 02h     set sampling rate
  2337.                         BH      00h    10/second
  2338.                                 01h    20/second
  2339.                                 02h    40/second
  2340.                                 03h    60/second
  2341.                                 04h    80/second
  2342.                                 05h    100/second
  2343.                                 06h    200/second
  2344.                 03h set resolution
  2345.                         BH     00h     one count per mm
  2346.                                01h     two counts per mm
  2347.                                02h     four counts per mm
  2348.                                03h     eight counts per mm
  2349.                 04h     get type
  2350.                         return  BH      device ID
  2351.                 05h     initialize
  2352.                         BH      data package size (1 - 8 bytes)
  2353.                 06h     get/set scaling factor
  2354.                         BH      00h return device status
  2355.                                 return  BL      status byte
  2356.                                         bit 0: right button pressed
  2357.                                         bit 1: reserved
  2358.                                         bit 2: left button pressed
  2359.                                         bit 3: reserved
  2360.                                         bit 4: 0=1:1 scaling, 1=2:1 scaling
  2361.                                         bit 5: device enabled
  2362.                                         bit 6: 0=stream mode, 1=remote mode
  2363.                                         bit 7: reserved
  2364.                                         CL      resolution (see function 03h)
  2365.                                         DL      sample rate, reports per second
  2366.                                 01h     set scaling at 1:1
  2367.                                 02h     set scaling at 2:1
  2368.                 07h     set device handler address
  2369.                         ES:BX   user device handler
  2370.                         return  AL      00h
  2371. return  CF      set on error
  2372.         AH      status
  2373.                 00h     successful
  2374.                 01h     invalid function
  2375.                 02h     invalid input
  2376.                 03h     interface error
  2377.                 04h     need to resend
  2378.                 05h     no device handler installed
  2379. note    The values in BH for those functions that take it as input are stored
  2380.         in different locations for each subfunction
  2381.  
  2382.  
  2383. Function 0C3h   Enable/Disable Watchdog Timeout                 (PS/2 50+)
  2384. entry   AH      0C3h
  2385.         AL      00h     disable
  2386.                 01h     enable
  2387.                         BX      timer counter
  2388. return  CF      set on error
  2389. note    The watchdog timer generates an NMI
  2390.  
  2391.  
  2392. Function 0C4h   Programmable Option Select                      (PS/2 50+)
  2393. entry   AH      04Ch
  2394.         AL      00h     return base POS register address
  2395.                 01h     enable slot
  2396.                         BL      slot number
  2397.                 02h     enable adapter
  2398. return  CF      set on error
  2399.         DX      base POS register address (if function 00h)
  2400.  
  2401.                                                 
  2402. Function 0DEh   DesQview Services                             (DesQview)
  2403. entry   AH      0DEh
  2404.         AL      00h     Get Program Name
  2405.                         return  AX      offset into DESQVIEW.DVO of current
  2406.                                         program's record:
  2407.                                         byte    length of name
  2408.                                         n bytes name
  2409.                                         2 bytes keys to invoke program (second
  2410.                                                 = 00h if only one key used)
  2411.                                         word    ? (I see 0 always)
  2412.                                         byte    end flag: 00h for all but last
  2413.                                                 entry, which is 0FFh
  2414.                 01h     Update "Open Window" Menu
  2415.                         return  none
  2416.                         note    Reads DESQVIEW.DVO, disables Open menu if file
  2417.                                 not in current directory
  2418.                 02h     unimplemented in DV 2.0x
  2419.                         return  nothing (NOP in DV 2.0x)
  2420.                 03h     unimplemented in DV 2.0x
  2421.                         return  nothing (NOP in DV 2.0x)
  2422.                 04h     Get Available Common Memory
  2423.                         return  BX      bytes of common memory available
  2424.                                 CX      largest block available
  2425.                                 DX      total common memory in bytes
  2426.                 05h     Get Available Conventional Memory
  2427.                         return  BX      K of memory available
  2428.                                 CX      largest block available
  2429.                                 DX      total conventional memory in K
  2430.                 06h     Get Available Expanded Memory
  2431.                         return  BX      K of expanded memory available
  2432.                                 CX      largest block available
  2433.                                 DX      total expanded memory in K
  2434.                 07h     APPNUM  Get Current Program's Number
  2435.                         return  AX      number of program as it appears on the
  2436.                                         "Switch Windows" menu
  2437.                 08h     GET (unknown)
  2438.                         return  AX      0       unknown
  2439.                                         1       unknown
  2440.                 09h     unimplemented in DV 2.00
  2441.                         return  nothing (NOP in DV 2.00)
  2442.                 0Ah     DBGPOKE Display Character on Status Line
  2443.                         BL      character
  2444.                         return  character displayed, next call will display in
  2445.                                 next position (which wraps back to the start of
  2446.                                 the line if off the right edge of screen)
  2447.                         note 1) Displays character on bottom line of *physical*
  2448.                                 screen, regardless of current size of window
  2449.                                 (even entirely hidden)
  2450.                              2) Does not know about graphics display modes,
  2451.                                 just pokes the characters into display memory
  2452.                 0Bh     APILEVEL Define Minimum API Level Required
  2453.                         BL      API level
  2454.                                 >2 pops up "You need a newer version" error
  2455.                                 window in DV 2.00
  2456.                         BH      unknown
  2457.                         return  AX      maximum API level?
  2458.                 0Ch     GETMEM  Allocate "System" Memory
  2459.                         BX      number of bytes
  2460.                         return  ES:DI   pointer to allocated block
  2461.                 0Dh     PUTMEM  Deallocate "System" Memory
  2462.                         ES:DI   pointer to previously allocated block
  2463.                         return  nothing
  2464.                 0Eh     Find Mailbox by Name    (DV 2.0+)
  2465.                         ES:DI   pointer to name to find
  2466.                         CX      length of name
  2467.                         return  BX      0       not found
  2468.                                         1       found
  2469.                                 DS:SI   object handle
  2470.                 0Fh     Enable DesQview Extensions      (DV 2.0+)
  2471.                         return  AX and BX destroyed (seems to be bug, weren't
  2472.                                 saved & restored)
  2473.                         note 1) Sends a manager stream with opcodes AEh, BDh,
  2474.                                 and BFh to task's window
  2475.                              2) Enables an additional mouse mode
  2476.                 10h     PUSHKEY  PUT KEY INTO KEYBOARD INPUT STREAM  (DV 2.0+)
  2477.                         BH      scan code
  2478.                         BL      character
  2479.                         return  BX      unknown (sometimes, but not always,
  2480.                                         same as BX passed in)
  2481.                         note    A later read will get the keystroke as if it
  2482.                                 had been typed by the user
  2483.                 11h     ENABLE/DISABLE AUTO JUSTIFICATION OF WINDOW (DV 2.0+)
  2484.                         BL      0       viewport will not move automatically
  2485.                                 nonzero viewport will move to keep cursor
  2486.                                         visible
  2487.                         return  none
  2488.                 12h     unknown (DV 2.0+)
  2489.                         BX      0       clear something?
  2490.                                 nonzero set something?
  2491.                         return  none
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497. ┌─────────────────────────────────────────────────────────────────────────────┐
  2498. │Interrupt 16h  Keyboard I/O                                                  │
  2499. └─────────────────────────────────────────────────────────────────────────────┘
  2500. (0:0058h)       access the keyboard 
  2501.  
  2502.  
  2503. Function  00h   Get Keyboard Input - read the next character in keyboard buffer,
  2504.                 if no key ready, wait for one.
  2505. entry   AH      00h     
  2506. return  AH      scan code 
  2507.         AL      ASCII character 
  2508.        
  2509.  
  2510. Function  01h   Check Keystroke Buffer - Do Not Clear
  2511. entry   AH      01h    
  2512. return  ZF      0 (clear) if character in buffer
  2513.                 1 (set)   if no character in buffer
  2514.         AH      scan code of character (if ZF=0)
  2515.         AL      ASCII character if applicable
  2516. note    Keystroke is not removed from buffer
  2517.  
  2518.  
  2519. Function  02h   Shift Status - fetch bit flags indicating shift status 
  2520. entry   AH      02h
  2521. return  AL      bit codes (same as [0040:0017])
  2522.                 bit 7   Insert state
  2523.                 bit 6   CapsLock state
  2524.                 bit 5   NumLock state
  2525.                 bit 4   ScrollLock state
  2526.                 bit 3   Alt key
  2527.                 bit 2   Control key
  2528.                 bit 1   Left shift (left caps-shift key)
  2529.                 bit 0   Right shift (right caps-shift key)
  2530. note    other codes found at [0040:0018]
  2531.                 bit 7   Insert shift (Ins key)
  2532.                 bit 6   Caps shift (CapsLock key)
  2533.                 bit 5   Num shift (NumLock key) 
  2534.                 bit 4   Scroll shift (ScrollLock key)
  2535.                 bit 3   Hold state (Ctrl-NumLock is in effect)
  2536.  
  2537.  
  2538. Function 03h    Keyboard - Set Repeat Rate            (PCjr, AT, XT/286, PS/2)
  2539. entry   AH      03h 
  2540.         AL      00h     reset typematic             (PCjr)
  2541.                 01h     increase initial delay      (PCjr)
  2542.                 02h     increase continuing delay   (PCjr)
  2543.                 03h     increase both delays        (PCjr)
  2544.                 04h     turn off typematic          (PCjr)
  2545.                 05h     set typematic rate          (AT, PS/2)
  2546.         BH      00h-03h for delays of 250ms, 500ms, 750ms, or 1second
  2547.                         0,0     250ms
  2548.                         0,1     500ms
  2549.                         1,0     750ms
  2550.                         1,1     1 second
  2551.         BL      00h-1Fh for typematic rates of 30cps down to 2cps
  2552.                         00000 30     01011 10.9   10101 4.5
  2553.                         00001 26.7   01100 10     10110 4.3
  2554.                         00010 24     01101 9.2    10111 4
  2555.                         00011 21.8   01110 8.6    11000 3.7
  2556.                         00100 20     01111 8      11001 3.3
  2557.                         00101 18.5   10000 7.5    11010 3
  2558.                         00110 17.1   10001 6.7    11011 2.7
  2559.                         00111 16     10010 6      11100 2.5
  2560.                         01000 15     10011 5.5    11101 2.3
  2561.                         01001 13.3   10011 5.5    11110 2.1
  2562.                         01010 12     10100 5      11111 2
  2563.  
  2564.  
  2565. Function 04h    Keyboard Click Toggle                 (PCjr and Convertible)
  2566. entry   AH      04h
  2567.         AL      00h     for click off
  2568.                 01h     for click on 
  2569.           
  2570.  
  2571. Function 05h    Keyboard Buffer Write            (AT or PS/2 with enhanced kbd)
  2572.                 (XT/286, PS/2, AT with "Enhanced" keyboard)
  2573. entry   AH      05h
  2574.         CH      scan code
  2575.         CL      ASCII character
  2576. return  AL      01h if buffer full
  2577.  
  2578.  
  2579. Function 10h    Get Enhanced Keystroke And Read      (F11, F12 Enhanced Keyb'd)
  2580.                 (XT/286, PS/2, AT with "Enhanced" keyboard)
  2581. entry   AH      10h
  2582. return  AH      scan code
  2583.         AL      ASCII character if applicable
  2584.  
  2585.  
  2586. Function 11h    Check Enhanced Keystroke         (F11-F12 on enhanced keyboard)
  2587.                 (XT/286, PS/2, AT with "Enhanced" keyboard)
  2588. entry   AH      11h
  2589. return  ZF      0       (clear) if key pressed
  2590.                 1       if buffer empty
  2591.         AH      scan code (when ZF=0)
  2592.         AL      ASCII character if applicable (when ZF=0)
  2593. note    Keystroke is not removed from buffer
  2594.  
  2595.  
  2596. Function 12h    Extended Get Shift Status         (F11, F12 Enhanced keyboard)
  2597. entry    AH     12h
  2598. return   AL     bit
  2599.                 0       right Shift key depressed
  2600.                 1       left Shift key depressed
  2601.                 2       Control key depressed
  2602.                 3       Alt key depressed
  2603.                 4       ScrollLock state active
  2604.                 5       NumLock state active
  2605.                 6       CapsLock state active
  2606.                 7       insert state is active
  2607.         AH      0       left Control key pressed
  2608.                 1       left Alt key depressed
  2609.                 2       right Control key pressed
  2610.                 3       right Alt key depressed
  2611.                 4       Scroll Lock key depressed
  2612.                 5       NumLock key depressed
  2613.                 6       CapsLock key depressed
  2614.                 7       SysReq key depressed
  2615.  
  2616.  
  2617. Function F0h    Set CPU speed (Compaq 386)
  2618. entry   AH      F0h     set speed
  2619. return  unknown
  2620. note    used by Compaq DOS MODE command.
  2621.         parameters not availible
  2622.  
  2623.                                       
  2624.  
  2625.  
  2626.  
  2627. ┌─────────────────────────────────────────────────────────────────────────────┐
  2628. │Interrupt 17h  Printer                                                       │
  2629. └─────────────────────────────────────────────────────────────────────────────┘
  2630. (0:005Ch)       access the parallel printer(s)
  2631.                 AH is changed. All other registers left alone.
  2632.  
  2633. Function  00h   Print Character/send AL to printer DX (0, 1, or 2) 
  2634. entry   AH      00h
  2635.         AL      character
  2636.         DX      printer to be used (0,1,2)
  2637. return  AH      status byte
  2638.                 bit
  2639.                 0       time out
  2640.                 1       unused
  2641.                 2       unused
  2642.                 3       I/O error
  2643.                 4       selected
  2644.                 5       out of paper
  2645.                 6       acknowledge
  2646.                 7       not busy
  2647.  
  2648.  
  2649. Function 01h    Initialize Printer - set init line low, send 0Ch to printer DX 
  2650. entry   AH      01h
  2651.         DX      printer port to be initialized (0,1,2)
  2652. return  status as below
  2653.  
  2654.  
  2655. Function  02h   Printer Status - read status of printer DX into AH 
  2656. entry   AH      02h
  2657.         DX      printer port to be used (0,1,2)
  2658. return  AH      bit flags       bit 7   0 = printer is busy
  2659.                                 bit 6   ACKnowledge line state
  2660.                                 bit 5   out-of-paper line state
  2661.                                 bit 4   printer selected line state 
  2662.                                 bit 3   I/O error
  2663.                                 bit 2   unused 
  2664.                                 bit 1   unused 
  2665.                                 bit 0   time-out error 
  2666.  
  2667.  
  2668.                                       
  2669.  
  2670.  
  2671. ┌─────────────────────────────────────────────────────────────────────────────┐
  2672. │Interrupt 18h  ROM BASIC                                                     │
  2673. └─────────────────────────────────────────────────────────────────────────────┘
  2674. (0:0060h)       Execute ROM BASIC at address 0F600h:0000h
  2675. note 1) Often reboots a compatible
  2676.      
  2677.  
  2678.  
  2679.  
  2680.  
  2681. ┌─────────────────────────────────────────────────────────────────────────────┐
  2682. │Interrupt 19h  Bootstrap Loader                                              │
  2683. └─────────────────────────────────────────────────────────────────────────────┘
  2684. (0:0064h)       Reads track 0, sector 1 into address 0000h:7C00h, then transfers
  2685.                 control to that address. If no diskette drive available, 
  2686.                 transfers to ROM-BASIC or displays loader error message.
  2687.                 Causes reboot of disk system if invoked while running.
  2688.                 (no memory test performed).
  2689.                           
  2690.  
  2691.  
  2692.  
  2693.  
  2694. ┌─────────────────────────────────────────────────────────────────────────────┐
  2695. │Interrupt 1Ah  Time of Day                                                   │
  2696. └─────────────────────────────────────────────────────────────────────────────┘
  2697. (0:0068h)       access the PC internal clock
  2698.  
  2699. Function 00h    Read System Time Counter
  2700. entry   AH      00h
  2701. return  CX      high word of clock count
  2702.         DX      low word of clock count 
  2703.         AL      00h if clock was read or written (via AH=0,1) within the current
  2704.                 24-hour period. Otherwise, AL > 0
  2705.  
  2706.  
  2707. Function 01h    Set Clock - set # of 55ms clock ticks in system time counter
  2708. entry   AH      01h
  2709.         CX:DX   high word/low word count of timer ticks 
  2710. return  none
  2711. note 1) The clock ticks are incremented by timer interrupt at 18.2065 times 
  2712.         per second or 54.9254milliseconds/count. Therefore: 
  2713.                 counts per second = 18      (12h)
  2714.                 counts per minute = 1092    (444h)
  2715.                 counts per hour   = 65543   (10011h)
  2716.                 counts per day    = 1573040 (1800B0h)
  2717.      2) counter is zeroed when system is rebooted
  2718.  
  2719.  
  2720. Function 02h    Read Real Time Clock Time                       (AT and after)
  2721. entry   AH      02h
  2722. return  CH      hours in BCD
  2723.         CL      minutes in BCD
  2724.         DH      seconds in BCD
  2725.         DL      1 (set) if daylight savings time option
  2726.         CF      1 (set) if clock not operating
  2727.  
  2728.  
  2729. Function 03h    Set Real Time Clock Time                        (AT and after)
  2730. entry   AH      03h
  2731.         CH      hours in BCD
  2732.         CL      minutes in BCD
  2733.         DH      seconds in BCD
  2734.         DL      0 (clear) if standard time
  2735.                 1 (set) if daylight savings time option
  2736. return  none
  2737.  
  2738.  
  2739. Function 04h    Read Real Time Clock Date                       (AT and after)
  2740. entry   AH      04h
  2741. return  CH      century in BCD (19 or 20)
  2742.         CL      year in BCD
  2743.         DH      month in BCD
  2744.         DL      day in BCD
  2745.         CF      1 (set) if clock not operating
  2746.  
  2747.  
  2748. Function 05h    Set Real Time Clock Date                        (AT and after)
  2749. entry   AH      05h
  2750.         CH      century in BCD (19 or 20)
  2751.         CL      year in BCD
  2752.         DH      month in BCD
  2753.         DL      day in BCD
  2754. return  none
  2755.  
  2756.                            
  2757. Function 06h    Set Real Time Clock Alarm                       (AT and after)
  2758. entry   AH      06h
  2759.         CH      hours in BCD
  2760.         CL      minutes in BCD
  2761.         DH      seconds in BCD
  2762. return  CF      set if alarm already set or clock inoperable
  2763. note    Int 4Ah occurs at specified alarm time every 24hrs until reset
  2764.  
  2765.  
  2766. Function 07h    Reset Real Time Clock Alarm                     (AT and after)
  2767. entry   AH      07h
  2768. return  none
  2769.  
  2770.  
  2771. Function 08h    Set Real Time Clock Activated Power On Mode     (Convertible)
  2772. entry   AH      08h
  2773.         CH      hours in BCD
  2774.         CL      minutes in BCD
  2775.         DH      seconds in BCD
  2776.  
  2777.  
  2778. Function 09h    Read Real Time Clock Alarm Time and Status
  2779.                                                 (Convertible and PS/2 Model 30)
  2780. entry   AH      09h
  2781. return  CH      hours in BCD
  2782.         CL      minutes in BCD
  2783.         DH      seconds in BCD
  2784.         DL      alarm status:
  2785.                 00h     if alarm not enabled
  2786.                 01h     if alarm enabled but will not power up system
  2787.                 02h     if alarm will power up system
  2788.  
  2789.  
  2790. Function 0Ah    Read System-Timer Day Counter   (XT-2 [640k motherboard], PS/2)
  2791. entry   AH      0Ah
  2792. return  CF      set on error
  2793.         CX      count of days since Jan 1,1980
  2794.  
  2795.  
  2796. Function 0Bh    Set System-Timer Day Counter    (XT-2 [640k motherboard], PS/2)
  2797. entry   AH      0Bh
  2798.         CX      count of days since Jan 1,1980
  2799. return  CF      set on error
  2800.  
  2801.  
  2802. Function 80h    Set Up Sound Multiplexor                (PCjr) (Tandy 1000?)
  2803. entry   AH      80h
  2804.         AL      00h     source is 8253 channel 2
  2805.                 01h     source is cassette input
  2806.                 02h     source is I/O channel "audio in"
  2807.                 03h     source is TI sound generator chip
  2808.                           
  2809.  
  2810.  
  2811.  
  2812.         
  2813. ┌─────────────────────────────────────────────────────────────────────────────┐
  2814. │Interrupt 1Bh  Control-Break                                                 │
  2815. └─────────────────────────────────────────────────────────────────────────────┘
  2816. (0:006Ch)       This interrupt is called when the keyboard scanner of the IBM 
  2817.                 machines detects Ctrl and Break pressed at the same time.
  2818.  
  2819. note 1) If the break occurred while processing an interrupt, one or more
  2820.         end of interrupt commands must be send to the 8259 Programmable
  2821.         Interrupt Controller.
  2822.      2) All I/O devices should be reset in case an operation was underway at
  2823.         the time.
  2824.      3) It is normally pointed to an IRET during system initialization so that
  2825.         it does nothing, but some programs change it to return a ctrl-C scan 
  2826.         code and thus invoke int 23h.
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832. ┌─────────────────────────────────────────────────────────────────────────────┐
  2833. │Interrupt 1Ch  Timer Tick                                                    │
  2834. └─────────────────────────────────────────────────────────────────────────────┘
  2835. (0:0070h)
  2836. note 1) Taken 18.2065 times per second 
  2837.      2) Normally vectors to dummy IRET unless PRINT.COM has been installed.
  2838.      3) If an application moves the interrupt pointer, it is the responsibility
  2839.         of that application to save and restore all registers that may be
  2840.         modified.
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846. ┌─────────────────────────────────────────────────────────────────────────────┐
  2847. │Interrupt 1Dh  Vector of Video Initialization Parameters                     │
  2848. └─────────────────────────────────────────────────────────────────────────────┘
  2849. (0:0074h)       This doubleword address points to 3 sets of 16-bytes containing
  2850.                 data to initialize for video modes for video modes 0 & 1 (40 
  2851.                 column), 2 & 3 (80 column), and 4, 5 & 6 (graphics) on the 
  2852.                 Motorola 6845 CRT controller chip.
  2853.  6845 registers:
  2854.         R0      horizontal total (horizontal sync in characters)
  2855.         R1      horizontal displayed (characters per line)
  2856.         R2      horizontal sync position (move display left or right)
  2857.         R3      sync width (vertical and horizontal pulse: 4-bits each)
  2858.         R4      vertical total (total character lines)
  2859.         R5      vertical adjust (adjust for 50 or 60 Hz refresh)
  2860.         R6      vertical displayed (lines of chars displayed)
  2861.         R7      vertical sync position (lines shifted up or down)
  2862.         R8      interlace (bits 4 and 5) and skew (bits 6 and 7)
  2863.         R9      max scan line addr (scan lines per character row)
  2864.         R10     cursor start (starting scan line of cursor)
  2865.         R11     cursor stop (ending scan line of cursor)
  2866.         R12     video memory start address high byte (6-bits)
  2867.         R13     video memory start address low byte (8-bits)
  2868.         R14     cursor address high byte (6-bits)
  2869.         R15     cursor address low byte (8-bits)
  2870.  
  2871.  6845 Video Init Tables:
  2872.         table for modes 0 and 1   \
  2873.         table for modes 2 and 3    \ each table is 16 bytes long and
  2874.         table for modes 4,5, and 6 / contains values for 6845 registers
  2875.         table for mode 7          /
  2876.         4 words:   size of video RAM for modes 0/1, 2/3, 4/5, and 6/7
  2877.         8 bytes:   number of columns in each mode
  2878.         8 bytes:   video controller mode byte for each mode
  2879. note 1) There are 4 separate tables, and all 4 must be initialized if all
  2880.         video modes will be used.
  2881.      2) The power-on initialization code of the computer points this vector
  2882.         to the ROM BIOS video routines.
  2883.      3) IBM recommends that if this table needs to be modified, it should be
  2884.         copied into RAM and only the nescessary changes made.
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890. ┌─────────────────────────────────────────────────────────────────────────────┐
  2891. │Interrupt 1Eh  Vector of Diskette Controller Parameters                      │
  2892. └─────────────────────────────────────────────────────────────────────────────┘
  2893. (0:0078h)       Dword address points to data base table that is used by BIOS.
  2894.                 Default location is at 0F000:0EFC7h. 11-byte table format:
  2895.                 bytes:
  2896.                 00h     4-bit step rate, 4-bit head unload time 
  2897.                 01h     7-bit head load time, 1-bit DMA flag
  2898.                 02h     54.9254 ms counts - delay till motor off (37-38 typ)
  2899.                 03h     sector size: 
  2900.                         00h     128 bytes
  2901.                         01h     256 bytes
  2902.                         02h     512 bytes
  2903.                         03h     1024 bytes
  2904.                 04h     last sector on track (8 or 9 typical)
  2905.                 05h     gap between sectors on read/write (42 typical)
  2906.                 06h     data length for DMA transfers (0FFh typical)
  2907.                 07h     gap length between sectors for format (80 typical)
  2908.                 08h     sector fill byte for format (0F6h typical)
  2909.                 09h     head settle time (in milliseconds) (15 to 25 typical)
  2910.                         DOS 1.0   0
  2911.                         DOS 2.10  15
  2912.                         DOS 3.1   1
  2913.                 10h     motor start time (in 1/8 second intervals) (2 to 4 typ.)
  2914.                         DOS 2.10  2
  2915. note 1) This vector is pointed to the ROM BIOS diskette tables on system 
  2916.         initialization
  2917.      2) IBM recommends that if this table needs to be modified, it should be
  2918.         copied into RAM and only the nescessary changes made.
  2919.  
  2920.  
  2921.  
  2922.  
  2923. ┌─────────────────────────────────────────────────────────────────────────────┐
  2924. │Interrupt 1Fh  Pointer to Graphics Character Extensions (Graphics Set 2)     │
  2925. └─────────────────────────────────────────────────────────────────────────────┘
  2926. (0:007Ch)       This is the pointer to data used by the ROM video routines to
  2927.                 display characters above ASCII 127 while in CGA medium and high
  2928.                 res graphics modes.
  2929.  
  2930. note 1) Doubleword address points to 1K table composed of 28 8-byte character 
  2931.         definition bit-patterns. First byte of each entry is top row, last byte
  2932.         is bottom row.
  2933.      2) The first 128 character patterns are located in system ROM.
  2934.      3) This vector is set to 000:0 at system initialization
  2935.      4) Used by DOS' external GRAFTABL command
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941. ┌─────────────────────────────────────────────────────────────────────────────┐
  2942. │Interrupt 20h  Terminate Current Program                                     │
  2943. └─────────────────────────────────────────────────────────────────────────────┘
  2944. (0:0080h)
  2945.  Issue int 20h to exit from a program. This vector transfers to the logic in 
  2946. DOS to restore the terminate address, the Ctrl-Break address,and the critical 
  2947. error exit address to the values they had on entry to the program. All the file
  2948. buffers are flushed and all handles are closed. You should close all files 
  2949. changed in length (see function calls 10h and 3Eh) before issuing this 
  2950. interrupt. If the changed file is not closed, its length, time, and date are 
  2951. not recorded correctly in the directory.
  2952.  For a program to pass a completion code or an error code when terminating, it
  2953. must use either function call 4Ch (Terminate a Process) or 31h (Terminate 
  2954. Process and Stay Resident). These two methods are preferred over using 
  2955. int 20h and the codes returned by them can be interrogated in batch processing. 
  2956. Important: Before you issue an interrupt 20h, your program must ensure that 
  2957.            the CS register contains the segment of its program segment prefix.
  2958.  
  2959. Interrupt 20h   DOS - Terminate Program
  2960. entry   no parameters
  2961. return  The following vectors are restored from the Program Segment Prefix:
  2962.         0Ah     Program Terminate
  2963.         0Eh     Control-C
  2964.         12h     Critical Error
  2965. note    IBM and Microsoft recommend using int 21 Fn 4Ch. Using int 20 is
  2966.         officially frowned upon since the introduction of DOS 2.0
  2967.  
  2968.