home *** CD-ROM | disk | FTP | other *** search
/ The California Collection / TheCaliforniaCollection.cdr / his038 / qbints.lzh / INTERRUP.NEW < prev    next >
Encoding:
Text File  |  1989-04-06  |  148.5 KB  |  4,274 lines

  1. ---------------------------------------------
  2. The use of -> instead of = signifies that the indicated register or 
  3. register pair contains a pointer to the specified item 
  4. ---------------------------------------------
  5. INT 05 - PRINT-SCREEN KEY
  6.    Automatically called by keyboard scanner when print-screen key is pressed.
  7.    Normally executes routine to print the screen, but may call any routine that
  8.    can safely be executed from inside the keyboard scanner.  Status and result
  9.    byte for default handler is at address 0050:0000.
  10. ---------------------------------------------
  11. INT 10 - VIDEO - SET VIDEO MODE
  12.     AH = 00h
  13.     AL = mode (graphics mode if graphics resolution listed)
  14.          text  pixel graphic color disp scrn  system
  15.          resol    box  resoltn       page addr
  16.        00h = 40x25    8x8         B&W     8    B800 CGA
  17.            = 40x25    8x14         B&W     8    B800 ATI VIP
  18.        01h = 40x25    8x8          16     8    B800 CGA
  19.            = 40x25    8x14          16     8    B800 ATI VIP
  20.        02h = 80x25    8x8         B&W     4    B800 CGA
  21.            = 80x25    8x8         B&W     8    B800 EGA/MCGA/VGA
  22.            = 80x25    8x14         B&W     8    B800 ATI VIP
  23.        03h = 80x25    8x8          16     4    B800 CGA
  24.            = 80x25    8x8          16     8    B800 EGA/MCGA/VGA
  25.        04h = 40x25    8x8  320x200   4     1    B800 CGA
  26.        05h = 40x25    8x8  320x200 4 gray  1    B800 CGA
  27.        06h = 80x25    8x8  640x200 B&W     1    B800 CGA
  28.        07h = 80x25    9x14         mono    1    B000 MDA/Hercules
  29.            = 80x25                 8         EGA/VGA
  30.            = 80x25    9x14         mono    B000 ATI VIP
  31.        08h = 20x25    8x8  160x200  16    B800 PCjr/Tandy 1000
  32.        09h = 40x25    8x8  320x200  16    B800 PCjr/Tandy 1000
  33.        0Ah = 80x25    8x8  640x200   4    B800 PCjr/Tandy 1000
  34.        0Bh = reserved (used internally by EGA BIOS)
  35.        0Ch = reserved (used internally by EGA BIOS)
  36.        0Dh = 40x25    8x8  320x200  16     8    A000 EGA/VGA
  37.        0Eh = 80x25    8x8  640x200  16     4    A000 EGA/VGA
  38.        0Fh = 80x25    8x14 640x350 mono    2    A000 EGA/VGA
  39.        10h = 80x25    8x14 640x350 4or16   2    A000 EGA/VGA
  40.        11h = 80x30    8x16 640x480 mono    A000 VGA/MCGA/ATI EGA/ATI VIP
  41.        12h = 80x30    8x16 640x480  16    A000 VGA/ATI VIP
  42.            = 80x30    8x16 640x480 16/64    A000 ATI EGA Wonder
  43.        13h = 40x25    8x8  320x200 256    A000 VGA/MCGA/ATI VIP
  44.        14h = 80x25    8x8  640x200             Lava Chrome II EGA
  45.        15h = 80x25    8x14 640x350             Lava Chrome II EGA
  46.        16h = 80x25    8x14 640x350             Lava Chrome II EGA
  47.        17h = 80x34    8x14 640x480             Lava Chrome II EGA
  48.        18h = 132x44 8x8         mono         Tseng Labs EVA
  49.            = 80x34    8x14 640x480             Lava Chrome II EGA
  50.        19h = 132x25 8x14         mono         Tseng Labs EVA
  51.        1Ah = 132x28 8x13         mono         Tseng Labs EVA
  52.        22h = 132x44 8x8                 Tseng, Ahead
  53.        23h = 132x25 6x14                 Tseng Labs EVA
  54.            = 132x25 8x14                 Ahead Systems EGA2001
  55.            = 132x25 8x8          16    B800 ATI EGA Wonder/ATI VIP
  56.        24h = 132x28 6x13                 Tseng Labs EVA
  57.        25h = 80x60    8x8  640x480             Tseng Labs EVA
  58.            =         640x480  16         VEGA VGA
  59.        26h = 80x60    8x8                 Tseng Labs EVA
  60.            = 80x60    8x8  640x480             Ahead Systems EGA2001
  61.        27h =         720x512  16         VEGA VGA
  62.            = 132x25 8x8         mono    B000 ATI EGA Wonder/ATI VIP
  63.        28h = ???x???                 VEGA VGA
  64.        29h =         800x600  16         VEGA VGA
  65.        2Dh =         640x350 256         VEGA VGA
  66.        2Eh =         640x480 256         VEGA VGA
  67.        2Fh =         720x512 256         VEGA VGA
  68.        30h =         800x600 256         VEGA VGA
  69.            =         ???x???        B800 AT&T 6300
  70.        33h = 132x44 8x8          16    B800 ATI EGA Wonder/ATI VIP
  71.        36h =         960x720  16         VEGA VGA
  72.        37h =        1024x768  16         VEGA VGA
  73.            = 132x44 8x8         mono    B000 ATI EGA Wonder/ATI VIP
  74.        40h = 80x25    8x16 640x400   2     1    B800 AT&T 6300, Compaq Portable
  75.            = 80x43                     VEGA VGA
  76.        41h =         640x200  16     1         AT&T 6300
  77.            = 132x25                  VEGA VGA
  78.        42h = 80x25    8x16 640x400  16         AT&T 6300
  79.            = 132x43                  VEGA VGA
  80.        43h = unsupported 640x200 of 640x400 viewport  AT&T 6300
  81.            = 80x60                     VEGA VGA
  82.        44h = disable VDC and DEB output         AT&T 6300
  83.            = 100x60                  VEGA VGA
  84.        48h = 80x50    8x8  640x400   2    B800 AT&T 6300
  85.        49h = 80x30    8x16 640x480             Lava Chrome II EGA
  86.        4Dh = 120x25                  VEGA VGA
  87.        4Eh = 120x43                  VEGA VGA
  88.        4Fh = 132x25                  VEGA VGA
  89.        50h = 132x25 9x14         mono         Ahead Systems EGA2001
  90.            = 80x30    8x16 640x480  16         Paradise EGA-480
  91.            = 80x43             mono         VEGA VGA
  92.            =         640x480 mono???         Taxan 565 EGA
  93.            = 80x34                     Lava Chrome II EGA
  94.        51h = 80x30    8x16                 Paradise EGA-480
  95.            = 132x25          mono         VEGA VGA
  96.            = 80x34    8x14 640x480  16         ATI EGA Wonder
  97.            = 80x30                     Lava Chrome II EGA
  98.        52h = 132x44 9x8         mono         Ahead Systems EGA2001
  99.            = 132x43          mono         VEGA VGA
  100.            = 94x29    8x14 752x410  16         ATI EGA Wonder
  101.            = 80x60                     Lava Chrome II EGA
  102.        53h = 100x40 8x14 800x560  16         ATI EGA Wonder/ATI VIP
  103.            = 132x43                  Lava Chrome II EGA
  104.        54h = 132x43 8x8                 Paradise EGA-480
  105.            = 132x43 7x9         16/256k    B800 Paradise VGA
  106.            = 132x43 8x9         16/256k    B800 Paradise VGA on multisync
  107.            = 132x43                     Taxan 565 EGA
  108.            = 100x42 8x14 800x600  16    A000 ATI EGA Wonder
  109.            = 132x25                  Lava Chrome II EGA
  110.        55h = 132x25 8x14                 Paradise EGA-480
  111.            = 132x25 7x16         16/256k    B800 Paradise VGA
  112.            = 132x25 8x16         16/256k    B800 Paradise VGA on multisync
  113.            = 132x25                     Taxan 565 EGA
  114.            = 80x66    8x8         16/256k    A000 ATI VIP
  115.            = 94x29    8x14 752x410             Lava Chrome II EGA
  116.        56h = 132x43 8x8         3???    2    B000 NSI Smart EGA+
  117.            = 132x43 7x9           4    B000 Paradise VGA
  118.            = 132x43 8x9           4    B000 Paradisk VGA on multisync
  119.            = 132x43          mono         Taxan 565 EGA
  120.        57h = 132x25 8x14         3???    4    B000 NSI Smart EGA+
  121.            = 132x25 7x16           4    B000 Paradise VGA
  122.            = 132x25 8x16           4    B000 Paradise VGA on multisync
  123.            = 132x25          mono         Taxan 565 EGA
  124.        58h = 100x75 8x8  800x600 16/256k    A000 Paradise VGA
  125.            = 80x33    8x14          16    B800 ATI EGA Wonder/ATI VIP
  126.        59h = 100x75 8x8  800x600   2    A000 Paradise VGA
  127.            = 80x66    8x8         16/256k    A000 ATI VIP
  128.        5Eh =         640x400 256         Paradise VGA,VEGA VGA
  129.        5Fh =         640x480 256         Paradise VGA
  130.        60h = 80x???      ???x400             Corona/Cordata BIOS v4.10+
  131.            =         752x410             VEGA VGA
  132.        61h =         ???x400             Corona/Cordata BIOS v4.10+
  133.            =         720x540             VEGA VGA
  134.        62h =         800x600             VEGA VGA
  135.        70h = extended mode set (see below)         Everex Micro Enhancer EGA
  136.        71h = 100x35 8x16 800x600 16of64    A000 NSI Smart EGA+
  137.        74h =         640x400   2    B800 Toshiba 3100 AT&T mode
  138.        7Eh = special mode set (see below)         Paradise VGA
  139.        7Fh = special function set (see below)    Paradise VGA
  140.        82h = 80x25             B&W         AT&T VDC overlay mode *
  141.        83h = 80x25                     AT&T VDC overlay mode *
  142.        86h =         640x200 B&W         AT&T VDC overlay mode *
  143.        C0h =         640x400   2/prog pallet AT&T VDC overlay mode *
  144.        C4h = disable output              AT&T VDC overlay mode *
  145.        D0h =         640x400   2    B800 DEC VAXmate AT&T mode
  146.        ??? =         640x225             Z-100
  147.        ??? =         640x400             Z-100
  148.  
  149.  * for AT&T VDC overlay modes, BL contains the DEB mode, which may be 06h,
  150.       40h, or 44h
  151. Note: IBM standard modes do not clear the screen if the high bit of AL is set
  152. ---------------------------------------------
  153. INT 10 - VIDEO - SET CURSOR CHARACTERISTICS
  154.     AH = 01h
  155.     CH bits 0-4 = start line for cursor in character cell
  156.        bits 5-6 = blink attribute
  157.              (00=normal, 01=invisible, 10=slow, 11=fast)
  158.     CL bits 0-4 = end line for cursor in character cell
  159. Note: buggy on EGA systems--BIOS remaps cursor shape in 43 line modes, but
  160.       returns unmapped cursor shape
  161. ---------------------------------------------
  162. INT 10 - VIDEO - SET CURSOR POSITION
  163.     AH = 02h
  164.     DH,DL = row, column (0,0 = upper left)
  165.     BH = page number
  166.         0 in graphics modes
  167.         0-3 in modes 2&3
  168.         0-7 in modes 0&1
  169. ---------------------------------------------
  170. INT 10 - VIDEO - READ CURSOR POSITION
  171.     AH = 03h
  172.     BH = page number
  173.         0 in graphics modes
  174.         0-3 in modes 2&3
  175.         0-7 in modes 0&1
  176. Return: DH,DL = row,column
  177.     CH = cursor start line
  178.     CL = cursor end line
  179. ---------------------------------------------
  180. INT 10 - VIDEO - READ LIGHT PEN POSITION (all but PS)
  181.     AH = 04h
  182. Return: AH = 0: light pen switch not activated
  183.     AH = 1: light pen values in registers
  184.         DH,DL = row,column of current position
  185.         CH = raster line (0-199) (EGA) old graphics modes
  186.         CX = (EGA) raster line (0-nnn) new graphics modes
  187.         BX = pixel column (0-319 or 0-639)
  188. ---------------------------------------------
  189. INT 10 - VIDEO - SELECT DISPLAY PAGE
  190.     AH = 05h
  191.     AL =
  192.         0-7: new page value for modes 0 & 1
  193.         0-3: new page value for modes 2 & 3
  194.         80h: read CRT/CPU page registers [PCjr only]
  195.         81h: set CPU page register to value in BL [PCjr only]
  196.         82h: set CRT page register to value in BH [PCjr only]
  197.         83h: set both display registers to values in BH, BL [PCjr only]
  198.         {Corona/Cordata BIOS v4.10+}
  199.         00h: set address of graphics bitmap buffer (video modes 60h,61h)
  200.            BX = segment of buffer
  201.         0Fh: get address of graphics bitmap buffer (video modes 60h,61h)
  202. Return: BH = CRT page register (if AL >= 80h)
  203.     BL = CPU page register (if AL >= 80h)
  204.     DX = segment of graphics bitmap buffer (video modes 60h,61h; AL=0Fh)
  205. ---------------------------------------------
  206. INT 10 - VIDEO - SCROLL PAGE UP
  207.     AH = 06h
  208.     AL = number of lines to scroll window (0 = blank whole window)
  209.     BH = attributes to be used on blanked lines
  210.     CH,CL = row,column of upper left corner of window to scroll
  211.     DH,DL = row,column of lower right corner of window
  212. ---------------------------------------------
  213. INT 10 - VIDEO - SCROLL PAGE DOWN
  214.     AH = 07h
  215.     AL = number of lines to scroll window (0 = blank whole window)
  216.     BH = attributes to be used on blanked lines
  217.     CH,CL = row,column of upper left corner of window to scroll
  218.     DH,DL = row,column of lower right corner of window
  219. ---------------------------------------------
  220. INT 10 - VIDEO - READ ATTRIBUTES/CHARACTER AT CURSOR POSITION
  221.     AH = 08h
  222.     BH = display page
  223. Return: AL = character
  224.     AH = attribute of character (alpha modes)
  225. ---------------------------------------------
  226. INT 10 - VIDEO - WRITE ATTRIBUTES/CHARACTERS AT CURSOR POS
  227.     AH = 09h
  228.     AL = character
  229.     BH = display page
  230.     BL = attributes of char (alpha modes) or color (graphics modes)
  231.          if bit 7 == 1 in graphics mode, character is xor'ed onto screen
  232.     CX = number of times to write character
  233. Note: all characters are displayed, including CR, LF, and BS
  234. ---------------------------------------------
  235. INT 10 - VIDEO - WRITE CHARACTERS ONLY AT CURSOR POS
  236.     AH = 0Ah
  237.     AL = character
  238.     BH = display page - alpha mode
  239.     BL = color of character (graphics mode, PCjr only)
  240.          if bit 7 == 1 in graphics mode, character is xor'ed onto screen
  241.     CX = number of times to write character
  242.          (EGA) in graphics modes, replication count in CX works correctly
  243.          only if all character written are contains on the same row
  244. Note: all characters are displayed, including CR, LF, and BS
  245. ---------------------------------------------
  246. INT 10 - VIDEO - SET COLOR PALETTE
  247.     AH = 0Bh
  248.     BH = 0
  249.         BL = border color (0-15) (text modes)
  250.          border color and background color (graphics modes)
  251.         (EGA)
  252.         BL = border color (0-15) and high-intensity background color
  253.           (16-31??? maybe should be high nybble?)
  254.     BH = 1
  255.         BL = palette (0-3)
  256. ---------------------------------------------
  257. INT 10 - VIDEO - WRITE DOT ON SCREEN
  258.     AH = 0Ch
  259.     AL = color of dot (0/1 in mode 6, 0-3 in modes 4 and 5)
  260.          if bit 7 set, new color will be XORed with current pixel
  261.     BH = display page (ignored if mode only supports one page)
  262.     CX = column
  263.     DX = row
  264. Note: only valid in graphics modes
  265. ---------------------------------------------
  266. INT 10 - VIDEO - READ DOT ON SCREEN
  267.     AH = 0Dh
  268.     BH = display page (ignored if mode only supports one page)
  269.     CX = column
  270.     DX = row
  271. Return: AL = color read
  272. Note: only valid in graphics modes
  273. ---------------------------------------------
  274. INT 10 - VIDEO - WRITE CHARACTER AND ADVANCE CURSOR (TTY WRITE)
  275.     AH = 0Eh
  276.     AL = character
  277.     BH = display page (alpha modes)
  278.     BL = foreground color (graphics modes)
  279. Note: characters 07h (BEL), 08h (BS), 0Ah (LF), and 0Dh (CR) are interpreted
  280.       and do the expected things
  281. ---------------------------------------------
  282. INT 10 - VIDEO - GET CURRENT VIDEO MODE
  283.     AH = 0Fh
  284. Return: AH = number of columns on screen
  285.     AL = current video mode (see INT 10h/AH=00h)
  286.     BH = current active display page
  287. Note:    if mode was set with bit 7 set ("no blanking"), the returned mode will
  288.     also have bit 7 set
  289. ---------------------------------------------
  290. INT 10 - VIDEO - SET PALETTE REGISTERS (Jr, PS, TANDY 1000, EGA, VGA)
  291.     AH = 10h
  292.     AL = subfunction
  293.         00h set palette register
  294.         BL = palette register to set
  295.         BH = color value to store
  296.         (on MCGA, only BX = 0712h is supported)
  297.         01h set border color register
  298.         BH = color value to store
  299.         02h set all palette registers and overscan
  300.         ES:DX -> 17-byte list
  301.            bytes 0-15 = values for palette regs. 0-15
  302.            byte 16 = value for border color register
  303. ---------------------------------------------
  304. INT 10 - VIDEO - TOGGLE INTENSITY/BLINKING BIT (Jr, PS, TANDY 1000, EGA, VGA)
  305.     AX = 1003h
  306.     BL = 00h enable intensity
  307.        = 01h enable blink
  308. ---------------------------------------------
  309. INT 10 - VIDEO - GET PALETTE REGISTERS (VGA)
  310.     AH = 10h
  311.     AL = subfunction
  312.         07h read individual palette register
  313.         BL = palette register number
  314.         Return: BH = palette register value
  315.         08h read overscan (border color) register
  316.         Return: BH = value
  317.         09h read all palette registers and overscan register
  318.         ES:DX = buffer address (17 bytes)
  319. ---------------------------------------------
  320. INT 10 - VIDEO - WRITE STRING (AT,XT286,PS,EGA,VGA)
  321.     AH = 13h
  322.     AL = mode
  323.         bit 0: set in order to move cursor after write
  324.         bit 1: set if string contains alternating characters and attributes
  325.     BL = attribute if AL bit 1 clear
  326.     BH = display page number
  327.     DH,DL = row,column of starting cursor position
  328.     CX = length of string
  329.     ES:BP -> start of string
  330. Note: recognizes CR, LF, BS, and bell
  331. ---------------------------------------------
  332. INT 10 - VIDEO - SAVE/RESTORE VIDEO STATE (PS50+,VGA)
  333.     AH = 1Ch
  334.     CX = requested states
  335.          bit 0 video hardware
  336.          1 BIOS data areas
  337.          2 color registers and DAC state
  338.          3-15 reserved
  339.     AL = 0: return state buffer size
  340.         Return: BX = number of 64 byte blocks needed
  341.          1: save video state
  342.         ES:BX = buffer address
  343.          2: restore video state
  344.         ES:BX = buffer address of previously saved state
  345. Return: AL = 1Ch if function supported
  346. ---------------------------------------------
  347. INT 10 - Direct Graphics Interface Standard (DGIS) - INQUIRE AVAILABLE DEVICES
  348.     AX = 6A00h
  349.     BX = 0
  350.     CX = 0
  351.     DX = buffer length (may be 0)
  352.     ES:DI = address of buffer
  353. Return: BX = number of bytes stored in buffer
  354.     CX = bytes required for all descriptions (0 if no DGIS)
  355. Note:    buffer contains descriptions and addresses of DGIS-compatible display(s)
  356.     and printer(s)
  357. ---------------------------------------------
  358. INT 10 - DGIS - REDIRECT CHARACTER OUTPUT
  359.     AX = 6A01h
  360.     CX = 0
  361.     ES:DI = address of device to send INT 10 output to
  362. Return: CX = 0      output could not be redirected
  363.          else INT 10h output now routed to requested display
  364. ---------------------------------------------
  365. INT 10 - DGIS - INQUIRE INT 10 OUTPUT DEVICE
  366.     AX = 6A02h
  367.     ES:DI = 0:0
  368. Return: ES:DI = 0:0  if current display is non-DGIS
  369.         else address of the current DGIS INT 10 display
  370. ---------------------------------------------
  371. INT 10 - VIDEO - SET VIDEO MODE (VEGA EXTENDED EGA/VGA)
  372.     AX = 6F05h
  373.     BL = mode (graphics mode if graphics resolution listed)
  374.          text  pixel graphic color disp scrn  system
  375.          resol    box  resoltn       page addr
  376.        62h =         800x600  16         VEGA Extended EGA
  377.        65h =        1024x768  16         VEGA Extended EGA
  378.        66h =         640x400 256         VEGA Extended VGA
  379.        67h =         640x480 256         VEGA Extended VGA
  380.        68h =         720x540 256         VEGA Extended VGA
  381.        69h =         800x600 256         VEGA Extended VGA
  382. ---------------------------------------------
  383. INT 10 - Microsoft Mouse driver EGA support - READ ONE REGISTER
  384.     AH = F0h
  385.     BL = register number
  386.     DX = group index
  387.         Pointer/data chips
  388.            00h CRT Controller (25 reg) 3B4h mono modes, 3D4h color modes
  389.            08h Sequencer (5 registers) 3C4h
  390.            10h Graphics Controller (9 registers) 3CEh
  391.            18h Attribute Controller (20 registers) 3C0h
  392.         Single registers
  393.            20h Miscellaneous Output register 3C2h
  394.            28h Feature Control register (3BAh mono modes, 3DAh color modes)
  395.            30h Graphics 1 Position register 3CCh
  396.            38h Graphics 2 Position register 3CAh
  397. Return: BL = data
  398. ---------------------------------------------
  399. INT 10 - Microsoft Mouse driver EGA support - WRITE ONE REGISTER
  400.     AH = F1h
  401.     DX = group index (see function F0h)
  402.     BL = register number
  403.     BH = value to write
  404. Return: BL = data
  405. ---------------------------------------------
  406. INT 10 - Microsoft Mouse driver EGA support - READ REGISTER RANGE
  407.     AH = F2h
  408.     CH = starting register number
  409.     CL = Number of registers (>1)
  410.     DX = group index
  411.          00h CRTC (3B4h mono modes, 3D4h color modes)
  412.          08h Sequencer 3C4h
  413.          10h Graphics Controller 3CEh
  414.          18h Attribute Controller 3C0h
  415.     ES:BX -> buffer, CL bytes
  416. ---------------------------------------------
  417. INT 10 - Microsoft Mouse driver EGA support - WRITE REGISTER RANGE
  418.     AH = F3h
  419.     CH = starting register
  420.     CL = number of registers (>1)
  421.     DX = group index
  422.          00h CRTC (3B4h mono modes, 3D4h color modes)
  423.          08h Sequencer 3C4h
  424.          10h Graphics Controller 3CEh
  425.          18h Attribute Controller 3C0h
  426.     ES:BX -> buffer, CL bytes
  427. ---------------------------------------------
  428. INT 10 - Microsoft Mouse driver EGA support - READ REGISTER SET
  429.     AH = F4h
  430.     CX = number of registers (>1)
  431.     ES:BX -> table of records in this format:
  432.          bytes 1-2 group index
  433.         Pointer/data chips
  434.            00h CRTC (3B4h mono modes, 3D4h color modes)
  435.            08h Sequencer 3C4h
  436.            10h Graphics Controller 3CEh
  437.            18h Attribute Controller 3C0h
  438.         Single registers
  439.            20h Miscellaneous Output register 3C2h
  440.            28h Feature Control register (3BAh mono modes, 3DAh color)
  441.            30h Graphics 1 Position register 3CCh
  442.            38h Graphics 2 Position register 3CAh
  443.          byte 3 register number (0 for single registers)
  444.          byte 4 register value
  445. ---------------------------------------------
  446. INT 10 - Microsoft Mouse driver EGA support - READ REGISTER SET
  447.     AH = F5h
  448.     CX = number of registers (>1)
  449.     ES:BX -> table of records in this format:
  450.          bytes 1-2 port number
  451.         Pointer/data chips
  452.            00h CRTC (3B4h mono modes, 3D4h color modes)
  453.            08h Sequencer 3C4h
  454.            10h Graphics Controller 3CEh
  455.            18h Attribute Controller 3C0h
  456.         Single registers
  457.            20h Miscellaneous Output register 3C2h
  458.            28h Feature Control register (3BAh mono modes, 3DAh color)
  459.            30h Graphics 1 Position register 3CCh
  460.            38h Graphics 2 Position register 3CAh
  461.          byte 3 register number (0 for single registers)
  462.          byte 4 register value
  463. --------------------------------------------
  464. INT 10 - Microsoft Mouse driver EGA support - REVERT TO DEFAULT REGISTERS
  465.     AH = F6h
  466. --------------------------------------------
  467. INT 10 - Microsoft Mouse driver EGA support - DEFINE DEFAULT REGISTER TABLE
  468.     AH = F7h
  469.     DX = port number
  470.        Pointer/data chips
  471.           00h CRTC (3B4h mono modes, 3D4h color modes)
  472.           08h Sequencer 3C4h
  473.           10h Graphics Controller 3CEh
  474.           18h Attribute Controller 3C0h
  475.        Single registers
  476.           20h Miscellaneous Output register 3C2h
  477.           28h Feature Control register (3BAh mono modes, 3DAh color modes)
  478.           30h Graphics 1 Position register 3CCh
  479.           38h Graphics 2 Position register 3CAh
  480.     ES:BX address of table of one byte entries, one byte
  481.           to be written to each register
  482. --------------------------------------------
  483. INT 10 - Microsoft Mouse driver EGA support - INTERROGATE DRIVER
  484.     AH = FAh
  485.     BX = 0
  486. Return: BX = 0 if mouse driver not present
  487.     ES:BX -> EGA Register Interface version number, if present:
  488.         byte 1 = major release number
  489.         byte 2 = minor release number
  490. --------------------------------------------
  491. INT 11 - EQUIPMENT DETERMINATION
  492. Return: AX = equipment flag bits
  493.         0      diskette installed
  494.         1      8087 present
  495.         2      mouse installed (PS2 only)
  496.         2,3   number of 16K banks of RAM on motherboard (PC only)
  497.           number of 64K banks of RAM on motherboard (XT only)
  498.           always = 11 on AT and above
  499.         4,5   initial video mode
  500.           01 = 40x25 color
  501.           10 = 80x25 color
  502.           11 = 80X25 IBM monochrome
  503.         6,7   number of diskette drives (only if bit 0 = 1)
  504.           00 = 1, 01 = 2, 10 = 3, 11 = 4
  505.         8      0 = dma present, 1 = no dma on system (PCjr???)
  506.         9-11  number of RS232 cards
  507.         12      game I/O attached
  508.         13      serial printer installed (PCjr)
  509.           internal modem installed (PC/Convertible)
  510.         14,15 number of printers
  511. ---------------------------------------------
  512. INT 12 - MEMORY SIZE
  513. Return: AX = number of contiguous 1K blocks of memory
  514. ---------------------------------------------
  515. INT 13 - DISK - RESET DISK SYSTEM
  516.     AH = 00h
  517.     DL = drive (if bit 7 is set both hard disks and floppy disks reset)
  518. ---------------------------------------------
  519. INT 13 - DISK - STATUS OF DISK SYSTEM
  520.     AH = 01h
  521.     DL = drive (hard disk if bit 7 set)
  522. Return: AL = status
  523.         00h = successful completion
  524.         01h = bad command
  525.         02h = address mark not found
  526.         03h = write attempted on write-protected disk
  527.         04h = sector not found
  528.         05h = reset failed (hard disk)
  529.         06h = diskette changed
  530.         07h = parameter act. failed (hard disk)
  531.         08h = DMA overrun (floppy disk)
  532.         09h = DMA across 64K boundary
  533.         0Ah = bad sector detected (hard disk)
  534.         0Bh = bad track detected (hard disk)
  535.         0Ch = unsupported track
  536.         0Dh = invalid number of sectors on format (hard disk)
  537.         0Eh = control data address mark detected (hard disk)
  538.         0Fh = DMA arbitration error (hard disk)
  539.         10h = bad CRC/ECC
  540.         11h = data ECC corrected (hard disk)
  541.         20h = controller failure
  542.         40h = seek failed
  543.         80h = time out
  544.         AAh = drive not ready (hard disk)
  545.         BBh = undefined error (hard disk)
  546.         CCh = write fault (hard disk)
  547.         E0h = status register error (hard disk)
  548.         FFh = sense operation failed (hard disk)
  549. ---------------------------------------------
  550. INT 13 - DISK - READ SECTORS INTO MEMORY
  551.     AH = 02h
  552.     AL = number of sectors to read
  553.     CH = track (for hard disk, bits 8,9 in high bits of CL)
  554.     CL = sector
  555.     DH = head
  556.     DL = drive
  557.     ES:BX = address of buffer to fill
  558. Return: CF set on error
  559.     AH = status (see AH=1 above)
  560.     AL = number of sectors read
  561. ---------------------------------------------
  562. INT 13 - DISK - WRITE SECTORS FROM MEMORY
  563.     AH = 03h
  564.     AL = number of sectors to write
  565.     CH = track (if hard disk, bits 8,9 in high bits of CL)
  566.     CL = sector (if hard disk, high two bits are high bits of track #)
  567.     DH = head
  568.     DL = drive
  569.     ES:BX = address of buffer
  570. Return: CF set on error
  571.     AH = status (see AH=1 above)
  572.     AL = number of sectors written
  573. ---------------------------------------------
  574. INT 13 - DISK - VERIFY SECTORS
  575.     AH = 04h
  576.     AL = number of sectors to verify
  577.     CH = track (for hard disk, bits 8,9 in high bits of CL)
  578.     CL = sector
  579.     DH = head
  580.     DL = drive
  581. Return: CF set on error
  582.     AH = status (see AH=1 above)
  583.     AL = number of sectors verified
  584. ---------------------------------------------
  585. INT 13 - FLOPPY - FORMAT TRACK
  586.     AH = 05h
  587.     AL = number of sectors to create on this track
  588.     CH = track
  589.     CL = sector
  590.     DH = head
  591.     DL = drive
  592.     ES:BX -> array of 4-byte address fields
  593.            byte 1 = track
  594.            byte 2 = head
  595.            byte 3 = sector
  596.            byte 4 = bytes/sector  0=128, 1=256, 2=512, 3=1024
  597. Return: CF set if error occurred
  598.     AH = status code (see AH=1 above)
  599. ---------------------------------------------
  600. INT 13 - FIXED DISK - FORMAT TRACK
  601.     AH = 05h
  602.     AL = interleave value (XT only)
  603.     ES:BX = 512-byte format buffer
  604.         the first 2*(sectors/track) bytes contain F,N for each sector
  605.            F = 00 for good sector, 80h for bad sector
  606.            N = sector number
  607.     CH = cylinder number (bits 8,9 in high bits of CL)
  608.     CL = sector number
  609.     DH = head
  610.     DL = drive
  611. Return: AH = status code (see AH=1 above)
  612. ---------------------------------------------
  613. INT 13 - FIXED DISK - FORMAT TRACK AND SET BAD SECTOR FLAGS (XT,PORT)
  614.     AH = 06h
  615.     AL = interleave value
  616.     CH = cylinder number (bits 8,9 in high bits of CL)
  617.     CL = sector number
  618.     DH = head
  619.     DL = drive
  620. Return: AH = status code (see AH=1 above)
  621. ---------------------------------------------
  622. INT 13 - FIXED DISK - FORMAT DRIVE STARTING AT GIVEN TRACK (XT,PORT)
  623.     AH = 07h
  624.     AL = interleave value (XT only)
  625.     ES:BX = 512-byte format buffer, see AH=6 above
  626.     CH = cylinder number (bits 8,9 in high bits of CL)
  627.     CL = sector number
  628.     DH = head
  629.     DL = drive
  630. Return: AH = status code (see AH=1 above)
  631. ---------------------------------------------
  632. INT 13 - DISK - GET CURRENT DRIVE PARAMETERS (XT,AT,XT286,CONV,PS)
  633.     AH = 08h
  634.     DL = drive number
  635. Return: CF set on error
  636.     AH = status code (see AH=1 above)
  637.     BL = drive type (see AH=17h below) (AT/PS2 floppies only)
  638.     DL = number of consecutive acknowledging drives
  639.     DH = maximum value for head number
  640.     CL = maximum value fo sector number
  641.     CH = maximum value for cylinder number
  642.     ES:DI = drive parameter table
  643. ---------------------------------------------
  644. INT 13 - FIXED DISK - INITIALIZE TWO FIXED DISK BASE TABLES (XT,AT,XT286,PS)
  645.     AH = 09h
  646. Return: CF set on error
  647.     AH = status code (see AH=1 above)
  648.     INT 41h points to table for drive 0
  649.     INT 46h points to table for drive 1
  650. ---------------------------------------------
  651. INT 13 - FIXED DISK - READ LONG (XT,AT,XT286,PS)
  652.     AH = 0Ah
  653.     DL = drive ID
  654.     DH = head
  655.     CH = cylinder (bits 8,9 in high bits of CL)
  656.     CL = sector
  657.     ES:BX -> buffer to fill
  658. Return: CF set on error
  659.     AH = status code (see AH=1 above)
  660.     AL = number of sectors read
  661. Note: used for diagnostics only on PS/2 systems
  662. ---------------------------------------------
  663. INT 13 - FIXED DISK - WRITE LONG (XT,AT,XT286,PS)
  664.     AH = 0Bh
  665.     DL = drive ID
  666.     DH = head
  667.     CH = cylinder (bits 8,9 in high bits of CL)
  668.     CL = sector
  669.     ES:BX -> buffer containing data
  670. Return: CF set on error
  671.     AH = status code (see AH=1 above)
  672.     AL = number of sectors written
  673. Note: used for diagnostics only on PS/2 systems
  674. ---------------------------------------------
  675. INT 13 - FIXED DISK - SEEK TO CYLINDER (XT,AT,XT286,PS)
  676.     AH = 0Ch
  677.     DL = drive ID
  678.     DH = head
  679.     CH = cylinder (bits 8,9 in high bits of CL)
  680. Return: CF set on error
  681.     AH = status code (see AH=1 above)
  682. ---------------------------------------------
  683. INT 13 - FIXED DISK - ALTERNATE DISK RESET (XT,AT,XT286,PS)
  684.     AH = 0Dh
  685.     DL = drive ID
  686. Return: CF set on error
  687.     AH = status code (see AH=1 above)
  688. ---------------------------------------------
  689. INT 13 - FIXED DISK - READ SECTOR BUFFER (XT,PS)
  690.     AH = 0Eh
  691.     ES:BX -> buffer
  692. Return: CF set on error
  693.     AH = status code (see AH=1 above)
  694. Notes: transfers controller's sector buffer.  No data is read from the drive
  695.        used for diagnostics only on PS/2 systems
  696. ---------------------------------------------
  697. INT 13 - FIXED DISK - WRITE SECTOR BUFFER (XT,PS)
  698.     AH = 0Fh
  699.     ES:BX -> buffer
  700. Return: CF set on error
  701.     AH = status code (see AH=1 above)
  702. Notes:    should be called before formatting to initialize the controller's
  703.     sector buffer.
  704.     used for diagnostics only on PS/2 systems
  705. ---------------------------------------------
  706. INT 13 - FIXED DISK - TEST FOR DRIVE READY (XT,AT,XT286,PS)
  707.     AH = 10h
  708.     DL = drive ID
  709. Return: CF set on error
  710.     AH = status code (see AH=1 above)
  711. ---------------------------------------------
  712. INT 13 - FIXED DISK - RECALIBRATE DRIVE (XT,AT,XT286,PS)
  713.     AH = 11h
  714.     DL = drive ID
  715. Return: CF set on error
  716.     AH = status code (see AH=1 above)
  717. ---------------------------------------------
  718. INT 13 - FIXED DISK - CONTROLER RAM DIAGNOSTIC (XT,PS)
  719.     AH = 12h
  720. Return: CF set on error
  721.     AH = status code (see AH=1 above)
  722. Note: used for diagnostics only on PS/2 systems
  723. ---------------------------------------------
  724. INT 13 - FIXED DISK - DRIVE DIAGNOSTIC (XT,PS)
  725.     AH = 13h
  726. Return: CF set on error
  727.     AH = status code (see AH=1 above)
  728. Note: used for diagnostics only on PS/2 systems
  729. ---------------------------------------------
  730. INT 13 - FIXED DISK - CONTROLLER DIAGNOSTICS (XT,AT,XT286,PS)
  731.     AH = 14h
  732. Return: CF set on error
  733.     AH = status code (see AH=1 above)
  734. Note: used for diagnostics only on PS/2 systems
  735. ---------------------------------------------
  736. INT 13 - DISK - GET TYPE (AT,XT2,XT286,CONV,PS)
  737.     AH = 15h
  738.     DL = drive ID
  739. Return: CF set on error
  740.     AH = disk type
  741.         0 = disk not there
  742.         1 = floppy, no change detection present
  743.         2 = floppy with change detection
  744.         3 = fixed disk
  745.            CX:DX = number of 512-byte sectors
  746. ---------------------------------------------
  747. INT 13 - FLOPPY DISK - CHANGE OF DISK STATUS (AT,XT2,XT286,CONV,PS)
  748.     AH = 16h
  749.     DL = drive to check
  750. Return: AH = disk change status
  751.         0 = no disk change
  752.         6 = disk changed
  753. ---------------------------------------------
  754. INT 13 - DISK - SET TYPE (AT,XT2,XT286,CONV,PS)
  755.     AH = 17h
  756.     AL = disk type
  757.         00h = no disk
  758.         01h = regular disk in regular drive
  759.         02h = regular disk in high-capacity drive
  760.         03h = high-capacity disk in high-capacity drive
  761.         04h = 720K disk in 720K drive
  762.     DL = drive ID
  763. ---------------------------------------------
  764. INT 13 - DISK - SET MEDIA TYPE FOR FORMAT (AT model 3x9,XT2,XT286,PS)
  765.     AH = 18h
  766.     DL = drive number
  767.     CH = lower 8 bits of number of tracks
  768.     CL = sectors per track (bits 0-5)
  769.          top 2 bits of number of tracks (bits 6,7)
  770. Return: AH = 00h  requested combination supported
  771.          01h  function not available
  772.          0Ch  not supported or drive type unknown
  773.          80h  there is no disk in the drive
  774.     ES:DI -> 11-byte parameter table
  775. ---------------------------------------------
  776. INT 13 - FIXED DISK - PARK HEADS (XT286,PS)
  777.     AH = 19h
  778.     DL = drive
  779. Return: CF set on error
  780.     AH = status (see AH=1 above)
  781. ---------------------------------------------
  782. INT 13 - ESDI FIXED DISK - FORMAT UNIT (PS)
  783.     AH = 1Ah
  784.     AL = defect table count
  785.     CL = format modifiers
  786.         bit 0: ignore primary defect map
  787.         bit 1: ignore secondary defect map
  788.         bit 2: update secondary defect map
  789.         bit 3: perform surface analysis
  790.         bit 4: generate periodic interrupt
  791.     DL = drive
  792.     ES:BX -> defect table
  793. Return: CF set on error
  794.     AH = status (see AH=1 above)
  795. Note:    if periodic interrupt selected, INT 15h/AH=0Fh is called after each
  796.     cylinder is formatted
  797. ---------------------------------------------
  798. INT 13 - DISK - ??? (PS/2)
  799.     AH = 1Ch
  800.     AL = ??? (0Ah one value)
  801. Return: ???
  802. Note: used by LLFORMAT.COM on PS/2 50/60 reference disk
  803. ---------------------------------------------
  804. INT 13 - DISK - ??? (Western Digital "Super BIOS")
  805.     AH = 20h
  806.     ???
  807. Return: ???
  808. Note: seems to return some kind of status
  809. ---------------------------------------------
  810. INT 14 - SERIAL I/O - INITIALIZE USART
  811.     AH = 00h
  812.     AL = initializing parameters
  813.         7 - 6 - 5       4 - 3     2      1 - 0
  814.         -BAUD RATE-    PARITY   STOP   WORD
  815.                     BITS  LENGTH
  816.         000  110 bd    00 none  0-1   10 - 7
  817.         001  150 bd    01 odd   1-2   11 - 8
  818.         010  300 bd    11 even
  819.         011  600 bd
  820.         100 1200 bd
  821.         101 2400 bd
  822.         110 4800 bd
  823.         111 9600 bd (4800 on PCjr)
  824.     DX = port number (0-3)
  825. Return: AH = RS-232 status code bits
  826.         0: data ready
  827.         1: overrun error
  828.         2: parity error
  829.         3: framing error
  830.         4: break detected
  831.         5: transmission buffer register empty
  832.         6: transmission shift register empty
  833.         7: time out--if set, other bits invalid
  834.     AL = modem status bits
  835.         0: delta Clear-To-Send
  836.         1: delta Data-Set-Ready
  837.         2: trailing edge of ring detected
  838.         3: change in receive line signal detected
  839.         4: Clear-To-Send
  840.         5: Data-Set-Ready
  841.         6: ring detected
  842.         7: receive line signal detected
  843. ---------------------------------------------
  844. INT 14 - FOSSIL (Fido/Opus/Seadog Standard Interface Level) - INITIALIZE
  845.     AH = 00h
  846.     AL = initializing parameters
  847.         7 - 6 - 5       4 - 3     2      1 - 0
  848.         -BAUD RATE-    PARITY   STOP   WORD
  849.                     BITS  LENGTH
  850.         000 19200 bd   00 none  0-1   10 - 7
  851.         001 38400 bd   01 odd   1-2   11 - 8
  852.         010   300 bd   11 even
  853.         011   600 bd
  854.         100  1200 bd
  855.         101  2400 bd
  856.         110  4800 bd
  857.         111  9600 bd (4800 on PCjr)
  858.     DX = port number (0-3)
  859. Return: AH = RS-232 status code bits
  860.         0: RDA - input data is available in buffer
  861.         1: OVRN - data has been lost
  862.         5: THRE - room is available in output buffer
  863.         6: TSRE - output buffer empty
  864.     AL = modem status bits
  865.         3: always 1
  866.         7: DCD - carrier detect
  867. ---------------------------------------------
  868. INT 14 - SERIAL I/O - TRANSMIT CHARACTER
  869.     AH = 01h
  870.     AL = character
  871.     DX = port number (0-3)
  872. Return: AX = port status (see AH = 00h above)
  873. ---------------------------------------------
  874. INT 14 - SERIAL I/O - RECEIVE CHARACTER
  875.     AH = 02h
  876.     DX = port number (0-3)
  877. Return: AL = character received
  878.     AH = RS-232 status code (see AH = 00h above)
  879. Note:    will timeout if DSR is not asserted, even if function 03h returns
  880.     data ready
  881. ---------------------------------------------
  882. INT 14 - FOSSIL - RECEIVE CHARACTER WITH WAIT
  883.     AH = 02h
  884.     DX = port number (0-3)
  885. Return: AL = character received
  886.     AH = 00h
  887. ---------------------------------------------
  888. INT 14 - SERIAL I/O - GET USART STATUS
  889.     AH = 03h
  890.     DX = port number (0-3)
  891. Return: AX = port status code (see AH = 00h above)
  892. ---------------------------------------------
  893. INT 14 - SERIAL I/O - EXTENDED INITIALIZE (CONVERTIBLE,PS)
  894.     AH = 04h
  895.     AL = break status
  896.         0 if break
  897.         1 if no break
  898.     BH = parity
  899.         0 no parity
  900.         1 odd parity
  901.         2 even parity
  902.         3 stick parity odd
  903.         4 stick parity even
  904.     BL = number of stop bits
  905.         0: one stop bit
  906.         1: two stop bits (1.5 if 5 bit word length)
  907.     CH = word length
  908.         0: 5 bits
  909.         1: 6 bits
  910.         2: 7 bits
  911.         3: 8 bits
  912.     CL = baud rate
  913.         0: 110
  914.         1: 150
  915.         2: 300
  916.         3: 600
  917.         4: 1200
  918.         5: 2400
  919.         6: 4800
  920.         7: 9600
  921.         8: 19200
  922.     DX = port number
  923. Return: AX = port status code (see AH = 00h above)
  924. ---------------------------------------------
  925. INT 14 - FOSSIL - INITIALIZE DRIVER
  926.     AH = 04h
  927.     DX = port number
  928.     optionally BX=4F50h
  929.            ES:CX = address of byte to be set upon ^C
  930. Return: AX = 1954h (if successful)
  931.     BL = maximum function number supported (excluding 7Eh and above)
  932.     BH = revision of FOSSIL supported
  933.     DTR is raised
  934. ---------------------------------------------
  935. INT 14 - SERIAL I/O - EXTENDED COMMUNICATION PORT CONTROL (CONVERTIBLE,PS)
  936.     AH = 05h
  937.     AL = 0 read modem control register
  938.           Return: BL = modem control register (see below)
  939.               AH = status
  940.     AL = 1 write modem control register
  941.           BL = modem control register
  942.           bit 0: data terminal ready
  943.           bit 1: request to send
  944.           bit 2: OUT1
  945.           bit 3: OUT2
  946.           bit 4: LOOP
  947.           bits 5-7 reserved
  948.           Return: AX = status
  949.     DX = port number
  950. ---------------------------------------------
  951. INT 14 - FOSSIL - DEINITIALIZE DRIVER
  952.     AH = 05h
  953.     DX = port number
  954. Return: none
  955.     DTR is not affected
  956. ---------------------------------------------
  957. INT 14 - FOSSIL - RAISE/LOWER DTR
  958.     AH = 06h
  959.     DX = port
  960.     AL = DTR state to be set
  961.         00h = lower
  962.         01h = raise
  963. ---------------------------------------------
  964. INT 14 - FOSSIL - RETURN TIMER TICK PARAMETERS
  965.     AH = 07h
  966. Return: AL = timer tick interrupt number
  967.     AH = ticks per second on interrupt number in AL
  968.     DX = approximate number of milliseconds per tick
  969. ---------------------------------------------
  970. INT 14 - FOSSIL - FLUSH OUTPUT BUFFER WAITING TILL ALL OUTPUT IS DONE
  971.     AH = 08h
  972.     DX = port number
  973. ---------------------------------------------
  974. INT 14 - FOSSIL - PURGE OUTPUT BUFFER THROWING AWAY ALL PENDING OUTPUT
  975.     AH = 09h
  976.     DX = port number
  977. ---------------------------------------------
  978. INT 14 - FOSSIL - PURGE INTPUT BUFFER THROWING AWAY ALL PENDING INPUT
  979.     AH = 0Ah
  980.     DX = port number
  981. ---------------------------------------------
  982. INT 14 - FOSSIL - TRANSMIT NO WAIT
  983.     AH = 0Bh
  984.     AL = character
  985.     DX = port number
  986. Return: AX = 0000h character not accepted
  987.        = 0001h character accepted
  988. ---------------------------------------------
  989. INT 14 - FOSSIL - NON-DESTRUCTIVE READ AHEAD
  990.     AH = 0Ch
  991.     DX = port number
  992. Return: AX = FFFFh character not available
  993.     AX = 00xxh character xx available
  994. ---------------------------------------------
  995. INT 14 - FOSSIL - KEYBOARD READ WITHOUT WAIT
  996.     AH = 0Dh
  997. Return: AX = FFFFh character not available
  998.        = xxyyh standard IBM-style scan code
  999. ---------------------------------------------
  1000. INT 14 - FOSSIL - KEYBOARD READ WITH WAIT
  1001.     AH = 0Eh
  1002. Return: AX = xxyyh standard IBM-style scan code
  1003. ---------------------------------------------
  1004. INT 14 - FOSSIL - ENABLE/DISABLE FLOW CONTROL
  1005.     AH = 0Fh
  1006.     AL = bit mask describing flow control requested
  1007.         0: xon/xoff on transmit (watch for xoff while sending)
  1008.         1: CTS/RTS (CTS on transmit/RTS on receive)
  1009.         2: reserved
  1010.         3: xon/xoff on receive (send xoff when buffer near full)
  1011.         4-7: all 1
  1012.     DX = port number
  1013. ---------------------------------------------
  1014. INT 14 - FOSSIL - EXTENDED ^C/^K CHECKING AND TRANSMIT ON/OFF
  1015.     AH = 10h
  1016.     AL = bit mask
  1017.         0: enable/disable ^C/^K checking
  1018.         1: enable/disable the transmitter
  1019.     DX = port number
  1020. ---------------------------------------------
  1021. INT 14 - FOSSIL - SET CURRENT CURSOR LOCATION
  1022.     AH = 11h
  1023.     DH = row
  1024.     DL = column
  1025. Note: this is the same as INT 10/AH=02h
  1026. ---------------------------------------------
  1027. INT 14 - FOSSIL - READ CURRENT CURSOR LOCATION
  1028.     AH = 12h
  1029. Return: DH = row
  1030.     DL = column
  1031. Note: this is the same as INT 10/AH=03h
  1032. ---------------------------------------------
  1033. INT 14 - FOSSIL - SINGLE CHARACTER ANSI WRITE TO SCREEN
  1034.     AH = 13h
  1035.     AL = character
  1036. ---------------------------------------------
  1037. INT 14 - FOSSIL - ENABLE OR DISABLE WATCHDOG PROCESSING
  1038.     AH = 14h
  1039.     AL = 01h enable watchdog
  1040.          00h disable watchdog
  1041.     DX = port number
  1042. ---------------------------------------------
  1043. INT 14 - FOSSIL - WRITE CHARACTER TO SCREEN USING BIOS SUPPORT ROUTINES
  1044.     AH = 15h
  1045.     AL = character
  1046. ---------------------------------------------
  1047.  
  1048. INT 14 - FOSSIL - INSERT/DELETE FUNCTION FROM TIMER TICK CHAIN
  1049.     AH = 16h
  1050.     AL = function
  1051.         00h = delete
  1052.         01h = add
  1053.     ES:DX -> routine to call
  1054. Return: AX = 0000h successful
  1055.          0001h unsuccessful
  1056. ---------------------------------------------
  1057. INT 14 - FOSSIL - REBOOT SYSTEM
  1058.     AH = 17h
  1059.     AL = method
  1060.         00h = cold boot
  1061.         01h = warm boot
  1062. ---------------------------------------------
  1063. INT 14 - FOSSIL - READ BLOCK
  1064.     AH = 18h
  1065.     CX = maximum number of characters to transfer
  1066.     DX = port number
  1067.     ES:DI -> user buffer
  1068. Return: AX = number of characters transfered
  1069. ---------------------------------------------
  1070. INT 14 - FOSSIL - WRITE BLOCK
  1071.     AH = 19h
  1072.     CX = maximum number of characters to transfer
  1073.     DX = port number
  1074.     ES:DI -> user buffer
  1075. Return: AX = number of characters transfered
  1076. ---------------------------------------------
  1077. INT 14 - FOSSIL - BREAK BEGIN OR END
  1078.     AH = 1Ah
  1079.     AL = 00h stop sending 'break'
  1080.          01h start sending 'break'
  1081.     DX = port number
  1082. ---------------------------------------------
  1083. INT 14 - FOSSIL - RETURN INFORMATION ABOUT THE DRIVER
  1084.     AH = 1Bh
  1085.     DX = port number
  1086.     CX = size of user buffer
  1087.     ES:DI -> user buffer
  1088. Return: AX = number of characters transferred
  1089. Structure =
  1090.     WORD    size of structure in bytes
  1091.     BYTE    FOSSIL spec driver conforms to
  1092.     BYTE    revision level of this specific driver
  1093.     DWORD    pointer to ASCII identification string
  1094.     WORD    size of the input buffer
  1095.     WORD    number of bytes left in buffer
  1096.     WORD    size of the output buffer
  1097.     WORD    number of bytes left in buffer
  1098.     BYTE    width of screen
  1099.     BYTE    length of screen
  1100.     BYTE    actual baud rate, computer to modem
  1101. ---------------------------------------------
  1102. INT 14 - FOSSIL - INSTALL AN EXTERNAL APPLICATION FUNCTION
  1103.     AH = 7Eh
  1104.     AL = code assigned to external application
  1105.     ES:DX -> entry point
  1106. Return: AX = 1954h
  1107.     BL = code assigned to application (same as input AL)
  1108.     DH = 00h failed
  1109.          01h successful
  1110. ---------------------------------------------
  1111. INT 14 - FOSSIL - REMOVE AN EXTERNAL APPLICATION FUNCTION
  1112.     AH = 7Fh
  1113.     AL = code assigned to external application
  1114.     ES:DX -> entry point
  1115. Return: AX = 1954h
  1116.     BL = code assigned to application (same as input AL)
  1117.     DH = 00h failed
  1118.          01h successful
  1119. ---------------------------------------------
  1120. Int 15 - SYSTEM - FORMAT UNIT PERIODIC INTERRUPT (PS ESDI drives only)
  1121.     AH = 0Fh
  1122.     AL = phase code
  1123.         00h reserved
  1124.         01h surface analysis
  1125.         02h formatting
  1126. Return: CF clear if formatting should continue, set if it should terminate
  1127. Note: called during ESDI drive formatting after each cylinder is completed
  1128. ---------------------------------------------
  1129. INT 15 - PRINT.COM - ??? (AT,XT286,PS50+)
  1130.     AH = 20h
  1131.     AL = subfunction
  1132.         00h ???
  1133.         01h ???
  1134.         10h setup of SYSREQ routine (OS hook)
  1135.         11h completion of SYSREQ function (OS hook)
  1136. Note: AL = 0,1 set or reset some flags which affect what PRINT does when it
  1137.       tries to access the disk
  1138. ---------------------------------------------
  1139. INT 15 - SYSTEM - POWER-ON SELF-TEST ERROR LOG (PS50+)
  1140.     AH = 21h
  1141.     AL = subfunction
  1142.         00h read POST log
  1143.         01h write POST log
  1144.         BH = device ID
  1145.         BL = error code
  1146. Return: CF set on error
  1147.     AH = status (00h OK, 01h list full, 80h invalid cmd, 86h unsupported)
  1148.     if function 00h:
  1149.        BX = number of error codes stored
  1150.        ES:DI -> error log
  1151. Note: the log is a series of words, the first byte of which identifies the
  1152.       error code and the second the device.
  1153. ---------------------------------------------
  1154. INT 15 - OS HOOK - KEYBOARD INTERCEPT (AT model 3x9,XT2,XT286,CONV,PS)
  1155.     AH = 4Fh
  1156.     AL = scan code
  1157.     CF set
  1158. Return: CF set
  1159.        AL = scan code
  1160.     CF clear
  1161.        scan code should not be used
  1162. Note: Called by INT 9 handler to translate scan codes
  1163. ---------------------------------------------
  1164. INT 15 - OS HOOK - DEVICE OPEN (AT,XT2,XT286,PS)
  1165.     AH = 80h
  1166.     BX = device ID
  1167.     CX = process type
  1168. Return: CF set on error
  1169.     AH = status
  1170. ---------------------------------------------
  1171. INT 15 - OS HOOK - DEVICE CLOSE (AT,XT2,XT286,PS)
  1172.     AH = 81h
  1173.     BX = device ID
  1174.     CX = process type
  1175. Return: CF set on error
  1176.     AH = status
  1177. ---------------------------------------------
  1178. INT 15 - OS HOOK - DEVICE PROGRAM TERMINATE (AT,XT2,XT286,PS)
  1179.     AH = 82h
  1180.     BX = device ID
  1181. Return: CF set on error
  1182.     AH = status
  1183. Note: closes all devices opened with function 80h
  1184. ---------------------------------------------
  1185. INT 15 - SYSTEM - EVENT WAIT (AT,XT286,CONV,PS)
  1186.     AH = 83h
  1187.     AL = subservice
  1188.         0 = set interval
  1189.         1 = cancel
  1190.     ES:BX -> event flag (bit 7 set when interval expires)
  1191.     CX:DX = number of microseconds to wait (only accurate to 977 us)
  1192. Return: CF set if function already busy
  1193. ---------------------------------------------
  1194. INT 15 - SYSTEM - READ JOYSTICK (AT,XT2,XT286,PS)
  1195.     AH = 84h
  1196.     DX = subservice
  1197.         0 get switch settings
  1198.           Return: AL = switch settings (bits 7-4)
  1199.         1 read joystick inputs
  1200.           Return: AX = A(x) value
  1201.               BX = A(y) value
  1202.               CX = B(x) value
  1203.               DX = B(y) value
  1204. ---------------------------------------------
  1205. INT 15 - OS HOOK - SYSTEM REQUEST KEY PRESSED (AT,XT2,XT286,CONV,PS)
  1206.     AH = 85h
  1207.     AL = 0 press
  1208.        = 1 release
  1209. Return: CF set on error
  1210.     AH = status
  1211. Note: called by keyboard decode routine
  1212. ---------------------------------------------
  1213. INT 15 - SYSTEM - WAIT (AT,XT2,XT286,CONV,PS)
  1214.     AH = 86h
  1215.     CX,DX = number of microseconds to wait (only accurate to 977 us)
  1216. Return: CF clear: after wait elapses
  1217.     CF set: immediately due to error
  1218. ---------------------------------------------
  1219. INT 15 - EXTENDED MEMORY - BLOCK MOVE (AT,XT286,PS)
  1220.     AH = 87h
  1221.     CX = number of words to move
  1222.     ES:SI -> global descriptor table
  1223.         00h-0Fh zero
  1224.         10h-11h source segment length in bytes (2*CX-1 or greater)
  1225.         12h-14h 24-bit linear source address
  1226.         15h     access rights byte (93h)
  1227.         16h-17h zero
  1228.         18h-19h destination segment length in bytes (2*CX-1 or greater)
  1229.         1Ah-1Ch 24-bit linear destination address
  1230.         1Dh     access rights byte (93h)
  1231.         1Eh-2Fh zero   
  1232. Return: CF set on error
  1233.     AH = status
  1234.         00h source copied into destination
  1235.         01h parity error
  1236.         02h interrupt error
  1237.         03h address line 20 gating failed
  1238. ---------------------------------------------
  1239. INT 15 - EXTENDED MEMORY - GET MEMORY SIZE (AT,XT286,PS)
  1240.     AH = 88h
  1241. Return: AX = memory size in K
  1242. ---------------------------------------------
  1243. INT 15 - SYSTEM - SWITCH TO VIRTUAL MODE (AT,XT286,PS50+)
  1244.     AH = 89h
  1245.     BL = interrupt number of IRQ0 (IRQ1-7 use next 7 interrupts)
  1246.     BH = interrupt number of IRQ8 (IRQ9-F use next 7 interrupts)
  1247.     DS:SI -> GDT for protected mode
  1248.            offset 0h  null descriptor
  1249.               8h  GDT descriptor
  1250.              10h  IDT descriptor
  1251.              18h  DS
  1252.              20h  ES
  1253.              28h  SS
  1254.              30h  CS
  1255.              38h  uninitialized, used to build descriptor for BIOS CS
  1256.     CX = offset into protected-mode CS to jump to
  1257. Return: CF set on error
  1258.        AH = 0FFh  error enabling address line 20
  1259. ---------------------------------------------
  1260. INT 15 - OS HOOK - DEVICE BUSY LOOP (AT,XT2,XT286,CONV,PS)
  1261.     AH = 90h
  1262.     AL = type code
  1263.         00h: disk
  1264.         01h: diskette
  1265.         02h: keyboard
  1266.         03h: PS/2 pointing device
  1267.         80h: network
  1268.         FCh: disk reset
  1269.         FDh: diskette motor start
  1270.         FEh: printer
  1271.     ES:BX -> request block for type codes 80h through BFh
  1272. Return: CF set if wait time satisfied
  1273.     CF clear if driver must perform wait
  1274. Note: type codes are allocated as follows:
  1275.     00-7F non-reentrant devices; OS must arbitrate access
  1276.     80-BF reentrant devices; ES:BX points to a unique control block
  1277.     C0-FF wait-only calls, no complementary INT 15/AH=91h call
  1278. ---------------------------------------------
  1279. INT 15 - OS HOOK - SET FLAG AND COMPLETE INTERRUPT (AT,XT2,XT286,CONV,PS)
  1280.     AH = 91h
  1281.     AL = type code, see AH=90h above
  1282.     ES:BX -> request block for type codes 80h through BFh
  1283. Return: AH = 0
  1284. ---------------------------------------------
  1285. INT 15 - SYSTEM - GET CONFIGURATION (XT after 1/10/86,AT mdl 3x9,CONV,XT286,PS)
  1286.     AH = C0h
  1287. Return: CF set if BIOS doesn't support call
  1288.     ES:BX -> ROM table
  1289.          byte_count  dw   ?   ; number of bytes following
  1290.          model     db   ?   ; PC=ff, XT=fe or fb, PCjr = fd, etc, etc
  1291.          submodel     db   ?   ; distingushes between AT and XT/286, etc.
  1292.          BIOS_rev     db   ?   ; 0 for first release, 1 for 2nd, etc.
  1293.          featbyte     db   ?   ; 80h = DMA channel 3 used by hd BIOS
  1294.                   ; 40h = 2nd 8259 installed
  1295.                   ; 20h = Real-Time Clock installed
  1296.                   ; 10h = INT 15h/AH=4Fh called upon INT 9h
  1297.                   ;  8h = wait for external event supported
  1298.                   ;  4h = extended BIOS area allocated at 640K
  1299.                   ;  2h = bus is Micro Channel instead of PC
  1300.                   ;  1h   reserved
  1301.          res1     dw   0
  1302.          res2     dw   0
  1303. Note: the 1/10/86 XT BIOS returns an incorrect value for featbyte.
  1304. ---------------------------------------------
  1305. INT 15 - SYSTEM - RETURN EXTENDED-BIOS DATA-AREA SEGMENT ADDRESS (PS)
  1306.     AH = C1h
  1307. Return: CF set on error
  1308.     ES = segment of data area
  1309. ---------------------------------------------
  1310. INT 15 - POINTING DEVICE BIOS INTERFACE (PS,DESQview 2.x)
  1311.     AH = C2h
  1312.     AL = subfunction
  1313.         00h enable/disable
  1314.            BH = 00h disable
  1315.             01h enable
  1316.         01h reset
  1317.            Return: BH = device ID
  1318.         02h set sampling rate
  1319.            BH = 00h 10/second
  1320.             01h 20/second
  1321.             02h 40/second
  1322.             03h 60/second
  1323.             04h 80/second
  1324.             05h 100/second
  1325.             06h 200/second
  1326.         03h set resolution
  1327.            BH = 00h one count per mm
  1328.             01h two counts per mm
  1329.             02h four counts per mm
  1330.             03h eight counts per mm
  1331.         04h get type
  1332.            Return: BH = device ID
  1333.         05h initialize
  1334.            BH = data package size (1 - 8 bytes)
  1335.         06h get/set scaling factor
  1336.            BH = 00h return device status
  1337.                Return: BL = status
  1338.                    bit 0: right button pressed
  1339.                    bit 1: reserved
  1340.                    bit 2: left button pressed
  1341.                    bit 3: reserved
  1342.                    bit 4: 0 if 1:1 scaling, 1 if 2:1 scaling
  1343.                    bit 5: device enabled
  1344.                    bit 6: 0 if stream mode, 1 if remote mode
  1345.                    bit 7: reserved
  1346.                    CL = resolution (see function 03h)
  1347.                    DL = sample rate, reports per second
  1348.             01h set scaling at 1:1
  1349.             02h set scaling at 2:1
  1350.         07h set device handler address
  1351.            ES:BX = user device handler
  1352. Return: CF set on error
  1353.     AH = status
  1354.         00h successful
  1355.         01h invalid function
  1356.         02h invalid input
  1357.         03h interface error
  1358.         04h need to resend
  1359.         05h no device handler installed
  1360. --------------------------------------------
  1361. INT 15 - ENABLE/DISABLE WATCHDOG TIMEOUT (PS50+)
  1362.     AH = C3h
  1363.     AL = 00h disable
  1364.          01h enable
  1365.         BX = timer counter
  1366. Return: CF set on error
  1367. Note: the watchdog timer generates an NMI
  1368. ---------------------------------------------
  1369. INT 15 - PROGRAMMABLE OPTION SELECT (PS50+)
  1370.     AH = C4h
  1371.     AL = 00h return base POS register address
  1372.          01h enable slot
  1373.          BL = slot number
  1374.          02h enable adapter
  1375. Return: CF set on error
  1376.     DX = base POS register address (if function 00h)
  1377. ---------------------------------------------
  1378. INT 16 - KEYBOARD - READ CHAR FROM BUFFER, WAIT IF EMPTY
  1379.     AH = 00h
  1380. Return: AH = scan code
  1381.     AL = character
  1382. ---------------------------------------------
  1383. INT 16 - KEYBOARD - CHECK BUFFER, DO NOT CLEAR
  1384.     AH = 01h
  1385. Return: ZF = 0 character in buffer
  1386.         AH = scan code
  1387.         AL = character
  1388.     ZF = 1 no character in buffer
  1389. ---------------------------------------------
  1390. INT 16 - KEYBOARD - GET SHIFT STATUS
  1391.     AH = 02h
  1392.     AL = shift status bits
  1393.         0 = right shift key depressed
  1394.         1 = left shift key depressed
  1395.         2 = CTRL depressed
  1396.         3 = ALT depressed
  1397.         4 = SCROLL LOCK active
  1398.         5 = NUM LOCK active
  1399.         6 = CAPS LOCK active
  1400.         7 = INSERT state active
  1401. ---------------------------------------------
  1402. INT 16 - KEYBOARD - SET DELAYS (Jr,AT model 339,XT286,PS)
  1403.     AH = 03h
  1404.     AL = subfunction
  1405.         0 reset typematic (PCjr)
  1406.         1 increase initial delay (PCjr)
  1407.         2 increase continuing delay (PCjr)
  1408.         3 increase both delays (PCjr)
  1409.         4 turn off typematic (PCjr)
  1410.         5 Set typematic rate (AT or PS/2)
  1411.     BH = 00 - 03 for delays of 250ms, 500ms, 750ms, or 1s
  1412.     BL = 00 - 1F for typematic rates of 30cps down to 2cps
  1413. ---------------------------------------------
  1414. INT 16 - KEYBOARD - KEYCLICK (Jr,CONV)
  1415.     AH = 04h
  1416.     AL =
  1417.         0 click off
  1418.         1 click on
  1419. ---------------------------------------------
  1420. INT 16 - KEYBOARD - WRITE TO KEYBOARD BUFFER (AT model 339,XT2,XT286,PS)
  1421.     AH = 05h
  1422.     CH = scan code
  1423.     CL = character
  1424. Return: AL = 1 if buffer full
  1425. ---------------------------------------------
  1426. INT 16 - KEYBOARD - GET ENHANCED KEYSTROKE (AT model 339,XT2,XT286,PS)
  1427.     AH = 10h
  1428. Return: AH = scan code
  1429.     AL = character
  1430. ---------------------------------------------
  1431. INT 16 - KEYBOARD - CHECK ENHANCED KEYSTROKE (AT model 339,XT2,XT286,PS)
  1432.     AH = 11h
  1433. Return: ZF = 0 if keystroke available
  1434.         AH = scan code \ meaningless if ZF = 1
  1435.         AL = character /
  1436.     ZF = 1 if kbd buffer empty
  1437. ---------------------------------------------
  1438. INT 16 - KEYBOARD - GET ENHANCED SHIFT FLAGS (AT model 339,XT2,XT286,PS)
  1439.     AH = 12h
  1440. Return: AL (same as for AH=02h)
  1441.        bit 7: Ins ON
  1442.        bit 6: CapsLock ON
  1443.        bit 5: NumLock ON
  1444.        bit 4: ScrollLock ON
  1445.        bit 3: Either ALT key down
  1446.        bit 2: Either CTRL key down
  1447.        bit 1: Left shift key down
  1448.        bit 0: Right shift key down
  1449.     AH
  1450.        bit 7: SysReq key down
  1451.        bit 6: CapsLock key down
  1452.        bit 5: NumLock key down
  1453.        bit 4: ScrollLock key down
  1454.        bit 3: Right Alt key down
  1455.        bit 2: Right Ctrl key down
  1456.        bit 1: Left Alt key down
  1457.        bit 0: Right Alt key down
  1458. ---------------------------------------------
  1459. INT 17 - PRINTER - OUTPUT CHARACTER
  1460.     AH = 00h
  1461.     AL = character
  1462.     DX = printer port (0-3)
  1463. Return: AH = status bits
  1464.         0 = time out
  1465.         1 = unused
  1466.         2 = unused
  1467.         3 = I/O error
  1468.         4 = selected
  1469.         5 = out of paper
  1470.         6 = acknowledge
  1471.         7 = not busy
  1472. ---------------------------------------------
  1473. INT 17 - PRINTER - INITIALIZE
  1474.     AH = 01h
  1475.     DX = printer port (0-3)
  1476. Return: AH = status (see AH = 00h above)
  1477. ---------------------------------------------
  1478. INT 17 - PRINTER - GET STATUS
  1479.     AH = 02h
  1480.     DX = printer port (0-3)
  1481. Return: AH = status (see AH = 00h above)
  1482. ---------------------------------------------
  1483. INT 18 - TRANSFER TO ROM BASIC
  1484.    causes transfer to ROM-based BASIC (IBM-PC)
  1485.    often reboots a compatible; often has no effect at all
  1486. ---------------------------------------------
  1487. INT 19 - DISK BOOT
  1488.    causes reboot of disk system (no memory test performed)
  1489. ---------------------------------------------
  1490. INT 1A - CLOCK - GET TIME OF DAY
  1491.     AH = 00h
  1492. Return: CX:DX = clock count
  1493.     AL = 0 if clock was read or written (via AH=0,1)
  1494.            within the current 24-hour period
  1495.            Otherwise, AL > 0
  1496. ---------------------------------------------
  1497. INT 1A - CLOCK - SET TIME OF DAY
  1498.     AH = 01h
  1499.     CX:DX = clock count
  1500. Return: time of day set
  1501. ---------------------------------------------
  1502. INT 1A - CLOCK - READ REAL TIME CLOCK (AT,XT286,CONV,PS)
  1503.     AH = 02h
  1504. Return: CH = hours in BCD
  1505.     CL = minutes in BCD
  1506.     DH = seconds in BCD
  1507. ---------------------------------------------
  1508. INT 1A - CLOCK - SET REAL TIME CLOCK (AT,XT286,CONV,PS)
  1509.     AH = 03h
  1510.     CH = hours in BCD
  1511.     CL = minutes in BCD
  1512.     DH = seconds in BCD
  1513.     DL = 1, if daylight savings; 0 if standard time
  1514. Return: CMOS clock set
  1515. ---------------------------------------------
  1516. INT 1A - CLOCK - READ DATE FROM REAL TIME CLOCK (AT,XT286,CONV,PS)
  1517.     AH = 04h
  1518. Return: DL = day in BCD
  1519.     DH = month in BCD
  1520.     CL = year in BCD
  1521.     CH = century (19h or 20h)
  1522. ---------------------------------------------
  1523. INT 1A - CLOCK - SET DATE IN REAL TIME CLOCK (AT,XT286,CONV,PS)
  1524.     AH = 05h
  1525.     DL = day in BCD
  1526.     DH = month in BCD
  1527.     CL = year in BCD
  1528.     CH = century (19h or 20h)
  1529. Return: CMOS clock set
  1530. ---------------------------------------------
  1531. INT 1A - CLOCK - SET ALARM (AT,XT286,CONV,PS)
  1532.     AH = 06h
  1533.     CH = hours in BCD
  1534.     CL = minutes in BCD
  1535.     DH = seconds in BCD
  1536. Return: CF set if alarm already set or clock inoperable
  1537.     INT 4Ah will be called when alarm goes off, every 24 hours until reset
  1538. ---------------------------------------------
  1539. INT 1A - CLOCK - RESET ALARM (AT,XT286,CONV,PS)
  1540.     AH = 07h
  1541. Return: alarm disabled
  1542. ---------------------------------------------
  1543. INT 1A - CLOCK - SET RTC ACTIVATED POWER ON MODE (CONVERTIBLE)
  1544.     AH = 08h
  1545.     CH = hours in BCD
  1546.     CL = minutes in BCD
  1547.     DH = seconds in BCD
  1548. ---------------------------------------------
  1549. INT 1A - CLOCK - READ RTC ALARM TIME AND STATUS (CONV,PS30)
  1550.     AH = 09h
  1551. Return: CH = hours in BCD
  1552.     CL = minutes in BCD
  1553.     DH = seconds in BCD
  1554.     DL = alarm status
  1555.         0  alarm not enabled
  1556.         1  alarm enabled but will not power up system
  1557.         2  alarm will power up system
  1558. ---------------------------------------------
  1559. INT 1A - CLOCK - READ SYSTEM-TIMER DAY COUNTER (XT2,PS)
  1560.     AH = 0Ah
  1561. Return: CF set on error
  1562.     CX = count of days since Jan 1,1980
  1563. ---------------------------------------------
  1564. INT 1A - CLOCK - SET SYSTEM-TIMER DAY COUNTER (XT2,PS)
  1565.     AH = 0Bh
  1566.     CX = count of days since Jan 1,1980
  1567. Return: CF set on error
  1568. ---------------------------------------------
  1569. INT 1A - PCjr - SET UP SOUND MULTIPLEXOR
  1570.     AH = 80h
  1571.     AL = 0 source is 8253 channel 2
  1572.          1 source is cassette input
  1573.          2 source is I/O channel "Audio IN"
  1574.          3 source is sound generator chip
  1575. ---------------------------------------------
  1576. INT 1A - AT&T 6300 - READ TIME AND DATE
  1577.     AH = FEh
  1578. Return: BX = day count (1 = Jan 1, 1984)
  1579.     CH = hour
  1580.     CL = minute
  1581.     DH = second
  1582.     DL = hundredths
  1583. ---------------------------------------------
  1584. INT 1B - CTRL-BREAK KEY
  1585.    This interrupt is called when the keyboard scanner of the IBM
  1586.    machines detects CTRL and BREAK pressed at the same time. It
  1587.    normally points to a short routine in DOS which sets the
  1588.    Ctrl-C flag, thus invoking INT 23h the next time DOS checks
  1589.    for Ctrl-C.
  1590. ---------------------------------------------
  1591. INT 1C - CLOCK TICK
  1592.    This interrupt is called (in the IBM) at the end of each time-update
  1593.    operation by the time-of-day routines.  It normally points to an IRET.
  1594. ---------------------------------------------
  1595. INT 1D -> 6845 VIDEO INIT TABLES
  1596.     table for modes 0 and 1   \
  1597.     table for modes 2 and 3    \ each table is 16 bytes long and
  1598.     table for modes 4,5, and 6 / contains values for 6845 registers
  1599.     table for mode 7      /
  1600.     4 words -- size of video RAM for modes 0/1, 2/3, 4/5, and 6/7
  1601.     8 bytes -- number of columns in each mode
  1602.     8 bytes -- video controller mode byte for each mode
  1603. ---------------------------------------------
  1604. INT 1E -> DISKETTE PARAMS (BASE TABLE)
  1605.     (Default at F000:EFC7 in PC and most compatibles)
  1606.     DB    step rate & head unload times
  1607.     DB    head load time & DMA
  1608.     DB    motor off time in clock ticks (36 or 37 typical)
  1609.     DB    sector size in bytes (0->128, 1->256, 2->512, 3->1024)
  1610.     DB    last sector number (8 or 9 typical)
  1611.     DB    inter-sector gap size on read/write (42 typical)
  1612.     DB    data transfer length (255 typical)
  1613.     DB    inter-sector gap size on format (80 typical)
  1614.     DB    sector fill on format (F6h typical)
  1615.     DB    head-settle time ms (typical 25, 1.10->0, 2.10->15, 3.10->1)
  1616.     DB    motor start-up time (1/8 secs) (typical 4, 2.10->2)
  1617. ---------------------------------------------
  1618. INT 1F -> GRAPHICS SET 2
  1619.        (NOT a vector!) pointer to bitmaps for high 128 chars
  1620. ---------------------------------------------
  1621. INT 20 - Minix - SEND/RECEIVE MESSAGE
  1622.     AX = process ID of other process
  1623.     BX -> message
  1624.     CX = 1 send
  1625.          2 receive
  1626.          3 send&receive
  1627. Note: the message contains the system call number (numbered as in V7 Unix(tm))
  1628.       and the call parameters
  1629. ---------------------------------------------
  1630. INT 20 - DOS - PROGRAM TERMINATION
  1631. returns to DOS--identical to INT 21/AH=00h
  1632. ---------------------------------------------
  1633. INT 21 - DOS - PROGRAM TERMINATION
  1634.     AH = 00h
  1635. Return: never
  1636. ---------------------------------------------
  1637. INT 21 - DOS - KEYBOARD INPUT
  1638.     AH = 01h
  1639. Return: AL = character read
  1640. Note: ^C/^Break are checked, and INT 23h executed if read
  1641.       character is echoed to standard output
  1642. ---------------------------------------------
  1643. INT 21 - DOS - DISPLAY OUTPUT
  1644.     AH = 02h
  1645.     DL = character to send to standard output
  1646. Note: ^C/^Break are checked, and INT 23h executed if pressed
  1647. ---------------------------------------------
  1648. INT 21 - DOS - AUX INPUT
  1649.     AH = 03h
  1650. Return: AL = character read
  1651. ---------------------------------------------
  1652. INT 21 - DOS - AUX OUTPUT
  1653.     AH = 04h
  1654.     DL = character to send
  1655. ---------------------------------------------
  1656. INT 21 - DOS - PRINTER OUTPUT
  1657.     AH = 05h
  1658.     DL = character to print
  1659. ---------------------------------------------
  1660. INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER OUTPUT
  1661.     AH = 06h
  1662.     DL = character <> FFh
  1663. ---------------------------------------------
  1664. INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER INPUT
  1665.     AH = 06h
  1666.     DL = 0FFh
  1667. Return: ZF set     = no character
  1668.     ZF clear = character recieved
  1669.           AL = character
  1670. Notes: Character is echoed to STDOUT if received.
  1671.        ^C/^Break are NOT checked
  1672. ---------------------------------------------
  1673. INT 21 - DOS - DIRECT STDIN INPUT, NO ECHO
  1674.     AH = 07h
  1675. Note: same as function 06h for input but char not echoed
  1676. ---------------------------------------------
  1677. INT 21 - DOS - KEYBOARD INPUT, NO ECHO
  1678.     AH = 08h
  1679. Return: AL = character
  1680. Note: same as function 07h, but ^C/^Break are checked
  1681. ---------------------------------------------
  1682. INT 21 - DOS - PRINT STRING
  1683.     AH = 09h
  1684.     DS:DX = address of string terminated by "$"
  1685. Note: ^C/^Break checked, and INT 23h called if pressed
  1686. ---------------------------------------------
  1687. INT 21 - DOS - BUFFERED KEYBOARD INPUT
  1688.     AH = 0Ah
  1689.     DS:DX = address of buffer
  1690. Note: first byte of buffer must contain maximum length
  1691.       on entry, second byte contains actual length of previous line which may
  1692.     be recalled with the DOS line-editing commands
  1693.       on return the second byte contains actual length, third and
  1694.     subsequent bytes contain the input line
  1695. ---------------------------------------------
  1696. INT 21 - DOS - CHECK STANDARD INPUT STATUS
  1697.     AH = 0Bh
  1698. Return: AL = FFh if character available
  1699.          00h if no character
  1700. Note: ^C/^Break checked, and INT 23h called if pressed
  1701. ---------------------------------------------
  1702. INT 21 - DOS - CLEAR KEYBOARD BUFFER
  1703.     AH = 0Ch
  1704.     AL must be 1, 6, 7, 8, or 0Ah.
  1705. Notes: Flushes all typeahead input, then executes function specified by AL
  1706.        (effectively moving it to AH and repeating the INT 21 call).
  1707.        If AL contains a value not in the list above, the keyboard buffer is
  1708.        flushed and no other action is taken.
  1709. ---------------------------------------------
  1710. INT 21 - DOS - DISK RESET
  1711.     AH = 0Dh
  1712. Note: Flushes all disk buffers.
  1713. ---------------------------------------------
  1714. INT 21 - DOS - SELECT DISK
  1715.     AH = 0Eh
  1716.     DL = new default drive number (0 = A, 1 = B, etc.)
  1717. Return: AL = number of logical drives
  1718. ---------------------------------------------
  1719. INT 21 - DOS - OPEN DISK FILE
  1720.     AH = 0Fh
  1721.     DS:DX = address of FCB
  1722. Return: AL = 00h file found
  1723.          FFh file not found
  1724. Note: (DOS 3.x) file opened in compatibility mode
  1725. ---------------------------------------------
  1726. INT 21 - DOS - CLOSE DISK FILE
  1727.     AH = 10h
  1728.     DS:DX = address of FCB
  1729. Return: AL = 00h directory update successful
  1730.          FFh file not found in directory
  1731. ---------------------------------------------
  1732. INT 21 - DOS - SEARCH FIRST USING FCB
  1733.     AH = 11h
  1734.     DS:DX = address of FCB
  1735. Return: AL = status
  1736.         00h file found
  1737.         FFh file not found
  1738. Note: If file found, FCB is created at DTA address and set up to
  1739.       OPEN or DELETE it.
  1740. ---------------------------------------------
  1741. INT 21 - DOS - SEARCH NEXT USING FCB
  1742.     AH = 12h
  1743.     DS:DX = address of FCB
  1744. Return: AL = status
  1745.         00h file found
  1746.         FFh file not found
  1747. Note: If file found, FCB is created at DTA address and set up to
  1748.       OPEN or DELETE it.
  1749. ---------------------------------------------
  1750. INT 21 - DOS - DELETE FILE via FCB
  1751.     AH = 13h
  1752.     DS:DX = address of FCB with filename field filled with template for
  1753.         deletion ('?' wildcard allowed)
  1754. Return: AL = status
  1755.         00h file found
  1756.         FFh file not found
  1757. ---------------------------------------------
  1758. INT 21 - DOS - SEQUENTIAL DISK FILE READ
  1759.     AH = 14h
  1760.     DS:DX = address of FCB
  1761. Return: AL = status
  1762.         0 successful read
  1763.         1 end of file
  1764.         2 data transfer area too small
  1765.         3 partial record, EOF
  1766. ---------------------------------------------
  1767. INT 21 - DOS - SEQUENTIAL DISK RECORD WRITE
  1768.     AH = 15h
  1769.     DS:DX = address of FCB
  1770. Return: AL = status
  1771.         0 successful write
  1772.         1 disk full
  1773.         2 data transfer area too small
  1774. ---------------------------------------------
  1775. INT 21 - DOS - CREATE A DISK FILE
  1776.     AH = 16h
  1777.     DS:DX = address of FCB
  1778. Return: AL = status
  1779.         00h successful creation
  1780.         FFh directory full
  1781. Note: if file already exists, it is truncated to zero length
  1782. ---------------------------------------------
  1783. INT 21 - DOS - RENAME FILE via FCB
  1784.     AH = 17h
  1785.     DS:DX = address of FCB
  1786.     FCB contains new name starting at byte 17h.
  1787. Return: AL = status
  1788.         00h file found
  1789.         FFh file not found
  1790. ---------------------------------------------
  1791. INT 21 - DOS internal - UNUSED
  1792.     AH = 18h
  1793. Return: AL = 0
  1794. ---------------------------------------------
  1795. INT 21 - DOS - GET DEFAULT DISK NUMBER
  1796.     AH = 19h
  1797. Return: AL = current drive number (letter - 'A')
  1798. ---------------------------------------------
  1799. INT 21 - DOS - SET DISK TRANSFER AREA ADDRESS
  1800.     AH = 1Ah
  1801.     DS:DX = address of buffer
  1802. ---------------------------------------------
  1803. INT 21 - DOS - ALLOCATION TABLE INFORMATION
  1804.     AH = 1Bh
  1805. Return: DS:BX points to FAT ID byte for default drive
  1806.     DX = number of allocation units on disk
  1807.     AL = number of sectors per allocation unit (cluster)
  1808.     CX = number of bytes per sector
  1809. ---------------------------------------------
  1810. INT 21 - DOS - ALLOCATION TABLE INFORMATION FOR SPECIFIC DEVICE
  1811.     AH = 1Ch
  1812.     DL = Drive Number to check
  1813. Return: DS:BX points to FAT ID byte
  1814.     DX = number of allocation units on disk
  1815.     AL = number of sectors per allocation unit (cluster)
  1816.     CX = number of bytes per sector
  1817. ---------------------------------------------
  1818. INT 21 - DOS internal - UNUSED
  1819.     AH = 1Dh
  1820. Return: AL = 0
  1821. ---------------------------------------------
  1822. INT 21 - DOS internal - UNUSED
  1823.     AH = 1Eh
  1824. Return: AL = 0
  1825. ---------------------------------------------
  1826. INT 21 - DOS internal - GET DEFAULT DRIVE PARAMETER BLOCK
  1827.     AH = 1Fh
  1828. Return: AL = 00h No Error
  1829.          FFh Error
  1830.     DS:BX -> drive parameter block
  1831. Note: for DOS 2.x and 3.x, this just invokes function 32h with DL = 0
  1832. ---------------------------------------------
  1833. INT 21 - DOS internal - UNUSED
  1834.     AH = 20h
  1835. Return: AL = 0
  1836. ---------------------------------------------
  1837. INT 21 - DOS - RANDOM DISK RECORD READ
  1838.     AH = 21h
  1839.     DS:DX = address of FCB
  1840. Return: AL = status
  1841.         0 successful read
  1842.         1 end of file
  1843.         2 data transfer area too small
  1844.         3 partial record, EOF
  1845. ---------------------------------------------
  1846. INT 21 - DOS - RANDOM DISK RECORD WRITE
  1847.     AH = 22h
  1848.     DS:DX = address of FCB
  1849. Return: AL = status (see AH = 21h above)
  1850. ---------------------------------------------
  1851. INT 21 - DOS - GET FILE SIZE
  1852.     AH = 23h
  1853.     DS:DX = address of unopened FCB with filename and record size fields
  1854.         initialized
  1855. Return: AL = status
  1856.         00h file found
  1857.         FFh file not found
  1858. Note: FCB's random-record field set to number of records (rounded up)
  1859. ---------------------------------------------
  1860. INT 21 - DOS - SET RANDOM RECORD FIELD
  1861.     AH = 24h
  1862.     DS:DX = address of FCB
  1863. Return: Random Record Field of FCB is set to be same as Current Block
  1864.     and Current Record.
  1865. Note: FCB must be OPEN already
  1866. ---------------------------------------------
  1867. INT 21 - DOS - SET INTERRUPT VECTOR
  1868.     AH = 25h
  1869.     AL = interrupt number
  1870.     DS:DX = new vector to be used for specified interrupt
  1871. ---------------------------------------------
  1872. INT 21 - DOS - CREATE PSP
  1873.     AH = 26h
  1874.     DX = Segment number to set up PSP at
  1875. Return: Current PSP is copied to specified segment
  1876. Note:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1877.     taken from interrupt vector table
  1878. ---------------------------------------------
  1879. INT 21 - DOS - RANDOM BLOCK READ
  1880.     AH = 27h
  1881.     DS:DX = address of FCB
  1882.     CX = number of records to be read
  1883. Return: AL = status
  1884.         0 successful read
  1885.         1 end of file
  1886.         2 data transfer area too small
  1887.         3 partial record, EOF
  1888. ---------------------------------------------
  1889. INT 21 - DOS - RANDOM BLOCK WRITE
  1890.     AH = 28h
  1891.     DS:DX = address of FCB
  1892.     CX = number of records to be written
  1893.          if zero, truncate file to current random file position
  1894. Return: AL = status
  1895.         0 successful write
  1896.         1 disk full
  1897.         2 data transfer area too small
  1898. ---------------------------------------------
  1899. INT 21 - DOS - PARSE FILENAME
  1900.     AH = 29h
  1901.     DS:SI -> string to parse
  1902.     ES:DI -> buffer to fill with unopened FCB
  1903.     AL = bit mask to control parsing
  1904.         0 = 0: parsing stops if file separator found
  1905.         1: leading separator ignored
  1906.         1 = 0: drive number in FCB set to default drive if not present
  1907.            in string
  1908.         1: drive number in FCB not changed
  1909.         2 = 0: filename in FCB set to blanks if no filename in string
  1910.         1: filename in FCB not changed if string does not contain
  1911.            a filename
  1912.         3 = 0: extension in FCB set to blanks if no extension in string
  1913.         1: extension left unchanged
  1914. Return: AL = 00h: no wildcards in name or extension
  1915.          01h: wildcards appeared
  1916.          FFh: drive specifier invalid
  1917.     DS:SI -> first byte after parsed string
  1918.     ES:DI buffer filled with unopened FCB
  1919. ---------------------------------------------
  1920. INT 21 - DOS - GET CURRENT DATE
  1921.     AH = 2Ah
  1922. Return: DL = day
  1923.     DH = month
  1924.     CX = year
  1925.     AL = day of the week (0=Sunday, 1=Monday, etc.)
  1926. ---------------------------------------------
  1927. INT 21 - DOS - SET CURRENT DATE
  1928.     AH = 2Bh
  1929.     DL = day
  1930.     DH = month
  1931.     CX = year
  1932. Return: AL = 00h if no error
  1933.        = FFh if bad value sent to routine
  1934. Note: DOS 3.3 also sets CMOS clock
  1935. ---------------------------------------------
  1936. INT 21 - DESQview - INSTALLATION CHECK
  1937.     AH = 2Bh
  1938.     AL = subfunction (DV v2.00+)
  1939.         01h get version
  1940.         Return: BX = version (BH = major, BL = minor)
  1941.         Note: early copies of v2.00 return 0002h
  1942.         02h get shadow buffer info, and start shadowing
  1943.         Return: BH = rows in shadow buffer
  1944.             BL = columns in shadow buffer
  1945.             DX = segment of shadow buffer
  1946.         04h get shadow buffer info
  1947.         Return: BH = rows in shadow buffer
  1948.             BL = columns in shadow buffer
  1949.             DX = segment of shadow buffer
  1950.         05h stop shadowing
  1951.     CX = 4445h ('DE')
  1952.     DX = 5351h ('SQ')
  1953. Return: AL = FFh if DESQview not installed
  1954. Note:    in DESQview v1.x, there were no subfunctions; this call only identified
  1955.     whether or not DESQview was loaded
  1956. ---------------------------------------------
  1957. INT 21 - DOS - GET CURRENT TIME
  1958.     AH = 2Ch
  1959. Return: CH = hours
  1960.     CL = minutes
  1961.     DH = seconds
  1962.     DL = hundredths of seconds
  1963. Note: time is updated approximately every 5/100 second
  1964. ---------------------------------------------
  1965. INT 21 - DOS - SET CURRENT TIME
  1966.     AH = 2Dh
  1967.     CH = hours
  1968.     CL = minutes
  1969.     DH = seconds
  1970.     DL = hundredths of seconds
  1971. Return: AL = 00h if no error
  1972.        = FFh if bad value sent to routine
  1973. Note: DOS 3.3 also sets CMOS clock
  1974. ---------------------------------------------
  1975. INT 21 - DOS - SET VERIFY FLAG
  1976.     AH = 2Eh
  1977.     DL = 0
  1978.     AL = 1 VERIFY on
  1979.          0 VERIFY off
  1980. ---------------------------------------------
  1981. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1982.     AH = 2Fh
  1983. Return: ES:BX = address of DTA
  1984. ---------------------------------------------
  1985. INT 21 - DOS 2+ - GET DOS VERSION
  1986.     AH = 30h
  1987. Return: AL = Major Version number (0 for DOS 1.x)
  1988.     AH = Minor Version number
  1989.     BH = OEM number
  1990.         00h IBM
  1991.         16h DEC
  1992.     BL:CX = 24-bit user number
  1993. ---------------------------------------------
  1994. INT 21 - DOS 2+ - TERMINATE BUT STAY RESIDENT
  1995.     AH = 31h
  1996.     AL = exit code
  1997.     DX = program size, in paragraphs
  1998.  
  1999. ---------------------------------------------
  2000. INT 21 - DOS 2+ internal - GET DRIVE PARAMETER BLOCK
  2001.     AH = 32h
  2002.     DL = drive number
  2003.         0 = default, 1 = A, etc.
  2004. Return: AL = 0FFh if invalid drive number, else
  2005.     DS:BX -> drive parameter block.
  2006.  
  2007. Structure of DOS Drive Parameter Block:
  2008. Offset    Size    Description
  2009.  00h    BYTE    drive number (0 = A, etc.)
  2010.  01h    BYTE    unit number within device driver
  2011.  02h    WORD    number of bytes per sector
  2012.  04h    BYTE    largest sector number in cluster (one less than sect/clust)
  2013.  05h    BYTE    log base two of the cluster size
  2014.  06h    WORD    number of reserved (boot) sectors
  2015.  08h    BYTE    number of copies of the FAT
  2016.  09h    WORD    number of root directory entries
  2017.  0Bh    WORD    first data sector on medium
  2018.  0Dh    WORD    largest possible cluster number (one more than # data clust)
  2019.  0Fh    BYTE    number of sectors in one FAT copy
  2020.  10h    WORD    first sector of root directory
  2021.  12h    DWORD    address of device driver for this drive
  2022.  16h    BYTE    media descriptor byte for medium
  2023.  17h    BYTE    FFh indicates block must be rebuilt
  2024.         (DOS 3.x) 00h indicates block accessed
  2025.  18h    DWORD    address of next device block, offset = FFFFh indicates last
  2026. ---DOS 2.x only---
  2027.  1Ch    WORD    starting cluster of current directory (0 = root directory)
  2028.  1Eh 64 BYTEs    ASCIZ current directory path string
  2029. ---DOS 3.x---
  2030. ; this was always:
  2031.  1Ch    WORD = 0    probably unused, values left from before
  2032.  1Eh    WORD = 0FFFFh    block was built
  2033. ---------------------------------------------
  2034. INT 21 - DOS 2+ - EXTENDED CONTROL-BREAK CHECKING
  2035.     AH = 33h
  2036.     AL = subfunction
  2037.         00h get state
  2038.         01h set state
  2039.            DL = 0 for OFF or 1 for ON
  2040.         02h internal, called by PRINT.COM (DOS 3.1)
  2041.         05h internal, return boot drive in DL (1=A:) (not in DOS 3.1)
  2042. Return: DL = current BREAK setting if AL = 00h
  2043.         0 BREAK=OFF
  2044.         1 BREAK=ON
  2045.     AL = FFh if error
  2046. ---------------------------------------------
  2047. INT 21 - DOS 2+ internal - RETURN CritSectFlag POINTER
  2048.     AH = 34h
  2049. Return: ES:BX -> 1-byte DOS "Critical Section Flag", also known as InDOS flag
  2050. Notes:    when the critical section flag is nonzero, code within DOS is being
  2051.     executed.  It is safe to enter DOS when both the critical section flag
  2052.     and the critical error flag are zero.
  2053.  
  2054.     The critical error flag is the byte after the critical section flag in
  2055.     DOS 2.x, and the byte BEFORE the critical section flag in DOS 3.x 
  2056.     (except COMPAQ DOS 3.0, where the critical error flag is located 1AAh
  2057.     bytes BEFORE the critical section flag)
  2058. ---------------------------------------------
  2059. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  2060.     AH = 35h
  2061.     AL = interrupt number
  2062. Return: ES:BX = value of interrupt vector
  2063. ---------------------------------------------
  2064. INT 21 - DOS 2+ - GET DISK SPACE
  2065.     AH = 36h
  2066.     DL = drive code (0 = default, 1 = A, 2 = B, etc.)
  2067. Return: AX = number of sectors per cluster
  2068.          or 0FFFFh if invalid drive
  2069.     BX = number of available clusters
  2070.     CX = bytes per sector
  2071.     DX = total clusters
  2072. Note: multiply AX * CX * BX for free space on disk
  2073.       multiply AX * CX * DX for total disk space
  2074. ---------------------------------------------
  2075. INT 21 - DOS 2+ internal - SWITCHAR/AVAILDEV
  2076.     AH = 37h
  2077.     AL = subfunction
  2078.        0 Read switch character (returns current character in DL)
  2079.        1 Set switch character (specify new character in DL)
  2080.        2 (DOS 2.x only) Read device availability (as set by function AL=3)
  2081.        3 (DOS 2.x only) Set device availability, where:
  2082.          DL = 0 means \DEV\ must preceed device names
  2083.          DL <> 0 means \DEV\ need not preceed device names
  2084. Return: AL = FFh means the value in AL was not in the range 0-3.
  2085.     DL = Switch character (if AL=0 or 1)
  2086.          Device availability flag (if AL=2 or 3)
  2087. ---------------------------------------------
  2088. INT 21 - DOS 2+ - GET COUNTRY-DEPENDENT INFORMATION
  2089.     AH = 38h
  2090. --DOS 2.x--
  2091.     AL = 0    get current-country info
  2092.     DS:DX = segment:offset of buffer for returned info
  2093. Return: BX = country code
  2094.     buffer at DS:DX filled as follows:
  2095.        bytes 0-1 = date format   0 = USA    mm dd yy
  2096.                      1 = Europe dd mm yy
  2097.                      2 = Japan    yy mm dd
  2098.        byte 2    = currency symbol
  2099.        byte 3    = 00h
  2100.        byte 4    = thousands separator char
  2101.        byte 5    = 00h
  2102.        byte 6    = decimal separator char
  2103.        byte 7    = 00h
  2104.        bytes 8-1Fh reserved
  2105.  
  2106. --DOS 3.x--
  2107.     AL = 0 for current country
  2108.     AL = 01h thru 0FEh for specific country with code <255
  2109.     AL = 0FFh for specific country with code >= 255
  2110.        BX = 16-bit country code
  2111.     DS:DX = segment:offset of buffer for returned info
  2112.     DX = 0FFFFh if setting country code, rather than getting info
  2113. Return: (if DX <> 0FFFFh)
  2114.     CF set on error
  2115.         AX = error code (02h)
  2116.     CF clear if successful
  2117.         BX = country code
  2118.         DS:DX filled in:
  2119.             WORD  date format (see above)
  2120.           5 BYTEs currency symbol string, ASCIZ
  2121.             BYTE  thousands separator char
  2122.             BYTE  00h
  2123.             BYTE  decimal separator char
  2124.             BYTE  00h
  2125.             BYTE  date separator char
  2126.             BYTE  00h
  2127.             BYTE  time separator char
  2128.             BYTE  00h
  2129.             BYTE  currency format
  2130.             bit 2 = set if currency symbol replaces decimal pt
  2131.             bit 1 = number of spaces between value and curr sym
  2132.             bit 0 = 0 if currency symbol precedes value
  2133.                 1 if currency symbol follows value
  2134.             BYTE  number of digits after decimal in currency
  2135.             BYTE  time format
  2136.             bit 0 = 0 if 12-hour clock
  2137.                 1 if 24-hour clock
  2138.             DWORD address of case map routine (FAR CALL, AL = char to map)
  2139.             BYTE  data-list separator char
  2140.             BYTE  00h
  2141.          10 BYTEs reserved
  2142. ---------------------------------------------
  2143. INT 21 - DOS 2+ - CREATE A SUBDIRECTORY (MKDIR)
  2144.     AH = 39h
  2145.     DS:DX = address of ASCIZ pathname
  2146. Return: CF set on error
  2147.         AX = error code (03h,05h)
  2148. ---------------------------------------------
  2149. INT 21 - DOS 2+ - REMOVE A DIRECTORY ENTRY (RMDIR)
  2150.     AH = 3Ah
  2151.     DS:DX = address of ASCIZ pathname
  2152. Return: CF set on error
  2153.         AX = error code (03h,05h,06h,10h)
  2154. ---------------------------------------------
  2155. INT 21 - DOS 2+ - CHANGE THE CURRENT DIRECTORY (CHDIR)
  2156.     AH = 3Bh
  2157.     DS:DX = address of ASCIZ directory name
  2158. Return: CF set on error
  2159.         AX = error code (03h)
  2160. ---------------------------------------------
  2161. INT 21 - DOS 2+ - CREATE A FILE WITH HANDLE (CREAT)
  2162.     AH = 3Ch
  2163.     CX = attributes for file
  2164.         bit 0: read-only
  2165.         1: hidden
  2166.         2: system
  2167.         3: volume label
  2168.         4: reserved, must be zero (directory)
  2169.         5: archive bit
  2170.         7: if set, file is shareable under Novell NetWare
  2171.     DS:DX = address of ASCIZ filename
  2172. Return: CF set on error
  2173.         AX = error code (03h,04h,05h)
  2174.     CF clear if successful
  2175.         AX = file handle
  2176. ---------------------------------------------
  2177. INT 21 - DOS 2+ - OPEN DISK FILE WITH HANDLE
  2178.     AH = 3Dh
  2179.     AL = access code
  2180.         0 = Read Only
  2181.         1 = Write Only
  2182.         2 = Read/Write
  2183.     AL bits 7-3 = file-sharing modes (DOS 3.x)
  2184.         bit 7    = inheritance flag, set for no inheritance
  2185.         bits 4-6 = sharing mode
  2186.               000 compatibility mode
  2187.               001 exclusive (deny all)
  2188.               010 write access denied (deny write)
  2189.               011 read access denied (deny read)
  2190.               100 full access permitted (deny none)
  2191.         bit 3    = reserved, should be zero
  2192.     DS:DX = address of ASCIZ filename
  2193. Return: CF set on error
  2194.         AX = error code (01h,02h,03h,04h,05h,0Ch)
  2195.     CF clear if successful
  2196.         AX = file handle
  2197. ---------------------------------------------
  2198. INT 21 - DOS 2+ - CLOSE A FILE WITH HANDLE
  2199.     AH = 3Eh
  2200.     BX = file handle
  2201. Return: CF set on error
  2202.         AX = error code (06h)
  2203. ---------------------------------------------
  2204. INT 21 - DOS 2+ - READ FROM FILE WITH HANDLE
  2205.     AH = 3Fh
  2206.     BX = file handle
  2207.     CX = number of bytes to read
  2208.     DS:DX = address of buffer
  2209. Return: CF set on error
  2210.         AX = error code (05h,06h)
  2211.     CF clear if successful
  2212.         AX = number of bytes read (0 if at EOF before call)
  2213. ---------------------------------------------
  2214. INT 21 - DOS 2+ - WRITE TO FILE WITH HANDLE
  2215.     AH = 40h
  2216.     BX = file handle
  2217.     CX = number of bytes to write
  2218.     DS:DX -> buffer
  2219. Return: CF set on error
  2220.         AX = error code (05h,06h)
  2221.     CF clear if successful
  2222.         AX = number of bytes actually written
  2223. Note: if CX is zero, no data is written, and the file is truncated or extended
  2224.       to the current position
  2225. ---------------------------------------------
  2226. INT 21 - DOS 2+ - DELETE A FILE (UNLINK)
  2227.     AH = 41h
  2228.     DS:DX -> ASCIZ name of file to delete
  2229. Return: CF set on error
  2230.         AX = error code (02h,05h)
  2231. ---------------------------------------------
  2232. INT 21 - DOS 2+ - MOVE FILE READ/WRITE POINTER (LSEEK)
  2233.     AH = 42h
  2234.     AL = method value
  2235.         0 = offset from beginning of file
  2236.         1 = offset from present location
  2237.         2 = offset from end of file
  2238.     BX = file handle
  2239.     CX:DX = offset in bytes
  2240. Return: CF set on error
  2241.         AX = error code (01h,06h)
  2242.     CF clear if successful
  2243.         DX:AX = new offset
  2244. ---------------------------------------------
  2245. INT 21 - DOS 2+ - GET/PUT FILE ATTRIBUTES (CHMOD)
  2246.     AH = 43h
  2247.     AL =
  2248.         0 = get file attributes
  2249.         1 = put file attributes
  2250.            CX = file attribute bits
  2251.            0 = read only
  2252.            1 = hidden file
  2253.            2 = system file
  2254.            3 = volume label
  2255.            4 = subdirectory
  2256.            5 = written since backup
  2257.            8 = shareable (Novell NetWare)
  2258.     DS:DX -> ASCIZ file name
  2259. Return: CF set on error
  2260.         AX = error code (01h,02h,03h,05h)
  2261.     CX = file attributes on get
  2262. ---------------------------------------------
  2263. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  2264.     AX = 4400h
  2265.     BX = file or device handle
  2266. Return: CF set on error
  2267.        AX = error code
  2268.     CF clear if successful
  2269.        DX = device info
  2270.        If bit 7 set: (character device)
  2271.            bit 0: console input device
  2272.            1: console output device
  2273.            2: NUL device
  2274.            3: CLOCK$ device
  2275.            4: device is special
  2276.            5: binary (raw) mode
  2277.            6: Not EOF
  2278.           12: network device (DOS 3.x)
  2279.           14: can process IOCTL control strings (func 2-5)
  2280.        If bit 7 clear: (file)
  2281.            bits 0-5 are block device number
  2282.            6: file has not been written
  2283.           12: network device (DOS 3.x)
  2284.           14: ??? (DOS 3.x)
  2285.           15: file is remote (DOS 3.x)
  2286. ---------------------------------------------
  2287. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  2288.     AX = 4401h
  2289.     BX = device handle
  2290.     DH = 0
  2291.     DL = device information to set (bits 0-7 from function 0)
  2292. Return: CF set on error
  2293.         AX = error code
  2294. ---------------------------------------------
  2295. INT 21 - DOS 2+ - IOCTL - READ CHARACTER DEVICE CONTROL STRING
  2296.     AX = 4402h
  2297.     BX = device handle
  2298.     CX = number of bytes to read
  2299.     DS:DX -> buffer
  2300. Return: CF set on error
  2301.         AX = error code
  2302.     CF clear if successful
  2303.         AX = number of bytes read
  2304. ---------------------------------------------
  2305. INT 21 - DOS 2+ - IOCTL - WRITE CHARACTER DEVICE CONTROL STRING
  2306.     AX = 4403h
  2307.     BX = device handle
  2308.     CX = number of bytes to write
  2309.     DS:DX -> buffer
  2310. Return: CF set on error
  2311.         AX = error code
  2312.     CF clear if successful
  2313.         AX = number of bytes written
  2314. ---------------------------------------------
  2315. INT 21 - DOS 2+ - IOCTL - READ BLOCK DEVICE CONTROL STRING
  2316.     AX = 4404h
  2317.     BL = drive number (0=default)
  2318.     CX = number of bytes to read
  2319.     DS:DX -> buffer
  2320. Return: CF set on error
  2321.        AX = error code
  2322.     CF clear if successful
  2323.        AX = number of bytes read
  2324. ---------------------------------------------
  2325. INT 21 - DOS 2+ - IOCTL - WRITE BLOCK DEVICE CONTROL STRING
  2326.     AX = 4405h
  2327.     BL = drive number (0=default)
  2328.     CX = number of bytes to write
  2329.     DS:DX -> buffer
  2330. Return: CF set on error
  2331.         AX = error code
  2332.     CF clear if successful
  2333.         AX = number of bytes written
  2334. ---------------------------------------------
  2335. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  2336.     AX = 4406h
  2337.     BX = file or device handle
  2338. Return: AL = FFh device ready
  2339.          00h device not ready
  2340. ---------------------------------------------
  2341. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  2342.     AX = 4407h
  2343.     BX = file or device handle
  2344. Return: AL = FFh device ready
  2345.          00h device not ready
  2346. Note: for DOS 2.x, files are always ready for output
  2347. ---------------------------------------------
  2348. INT 21 - DOS 3.x - IOCTL - BLOCK DEVICE CHANGEABLE
  2349.     AX = 4408h
  2350.     BL = drive number (0=default)
  2351. Return: AX = 00h removable
  2352.          01h fixed
  2353.          0Fh invalid drive
  2354. ---------------------------------------------
  2355. INT 21 - DOS 3.x - IOCTL - BLOCK DEVICE LOCAL
  2356.     AX = 4409h
  2357.     BL = drive number (0=default)
  2358. Return: DX = attribute word, bit 12 set if device is remote
  2359. ---------------------------------------------
  2360. INT 21 - DOS 3.x - IOCTL - HANDLE LOCAL
  2361.     AX = 440Ah
  2362.     BX = file handle
  2363. Return: DX = attribute word, bit 15 set if file is remote
  2364. Note:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  2365.     the file server on which the handle is located in CX
  2366. ---------------------------------------------
  2367. INT 21 - DOS 3.x - IOCTL - SET SHARING RETRY COUNT
  2368.     AX = 440Bh
  2369.     CX = delay (default 1)
  2370.     DX = retry count (default 3)
  2371. Return: CF set on error
  2372.         AX = error code
  2373. ---------------------------------------------
  2374. INT 21 - DOS 3.2 - IOCTL - GENERIC
  2375.     AX = 440Ch
  2376.     BX = device handle
  2377.     CH = category code
  2378.         00h unknown (DOS 3.3)
  2379.         01h COMn: (DOS 3.3)
  2380.         03h CON (DOS 3.3)
  2381.         05h LPTn:
  2382.     CL = function
  2383.         45h set iteration count
  2384.         4Ah select code page
  2385.         4Ch start code-page preparation
  2386.         4Dh end code-page preparation
  2387.         65h get iteration count
  2388.         6Ah query selected code page
  2389.         6Bh query prepare list
  2390.     DS:DX -> parameter block
  2391.         for CL=45h        WORD  iteration count
  2392.         for CL=4Ah,4Dh,6Ah    WORD  length of data
  2393.                 WORD  code page ID
  2394.         for CL=4Ch        WORD  flags
  2395.                 WORD  length of remainder of parameter block
  2396.                 WORD  number of code pages following
  2397.                   N WORDs code page 1,...,N
  2398.         for CL=6Bh        WORD  length of following data
  2399.                 WORD  number of hardware code pages
  2400.                   N WORDs hardware code pages 1,...,N
  2401.                 WORD  number of prepared code pages
  2402.                   N WORDs prepared code pages 1,...,N
  2403. Return: CF set on error
  2404.         AX = error code
  2405. ---------------------------------------------
  2406. INT 21 - DOS 3.2 - IOCTL - BLOCK DEVICE REQUEST
  2407.     AX = 440Dh
  2408.     BL = drive number (0=default)
  2409.     CH = category code
  2410.         08h disk drive
  2411.     CL = function
  2412.          40h set device parameters
  2413.         41h write logical device track
  2414.         42h format and verify logical device track
  2415.         60h get device parameters
  2416.         61h read logical device track
  2417.         62h verify logical device track
  2418.     DS:DX -> parameter block
  2419.     for functions 40h, 60h
  2420.         BYTE  special functions
  2421.         bit 0 set if function to use current BPB, clear if Device BIOS
  2422.             Parameter Block field contains new default BPB
  2423.         bit 1 set if function to use track layout fields only
  2424.             must be clear if CL=60h
  2425.         bit 2 set if all sectors in track same size (should be set)
  2426.         bits 3-7 reserved
  2427.         BYTE  device type
  2428.         00h  320K/360K disk
  2429.         01h  1.2M disk
  2430.         02h  720K disk
  2431.         03h  single-density 8-inch disk
  2432.         04h  double-density 8-inch disk
  2433.         05h  fixed disk
  2434.         06h  tape drive
  2435.         07h  other type of block device
  2436.         WORD  device attributes
  2437.         bit 0 set if nonremovable medium
  2438.         bit 1 set if door lock supported
  2439.         bits 2-15 reserved
  2440.         WORD  number of cylinders
  2441.         BYTE  media type
  2442.         00h 1.2M disk (default)
  2443.         01h 320K/360K disk
  2444.      31 BYTEs device BPB (see function 53h)
  2445.         WORD  number of sectors per track (start of track layout field)
  2446.       N word pairs: number,size of each sector in track
  2447.     for functions 41h, 61h
  2448.         BYTE  reserved, must be zero
  2449.         WORD  number of disk head
  2450.         WORD  number of disk cylinder
  2451.         WORD  number of first sector to read/write
  2452.         WORD  number of sectors
  2453.         DWORD transfer address
  2454.     for functions 42h, 62h
  2455.         BYTE  reserved, must be zero
  2456.         WORD  number of disk head
  2457.         WORD  number of disk cylinder
  2458. Return: CF set on error
  2459.        AX = error code
  2460. ---------------------------------------------
  2461. INT 21 - DOS 3.2 - IOCTL - GET LOGICAL DRIVE MAP
  2462.     AX = 440Eh
  2463.     BL = drive number (0=default)
  2464. Return: CF set on error
  2465.         AX = error code
  2466.     CF clear if successful
  2467.         AL = 0 block device has only one logical drive assigned
  2468.          1..26 the last letter used to reference the drive (1=A:,etc)
  2469. ---------------------------------------------
  2470. INT 21 - DOS 3.2 - IOCTL - SET LOGICAL DRIVE MAP
  2471.     AX = 440Fh
  2472.     BL = physical drive number (0=default)
  2473. Return: CF set on error
  2474.         AX = error code
  2475. Note: maps logical drives to physical drives, similar to DOS's treatment of
  2476.     a single physical floppy drive as both A: and B:
  2477. ---------------------------------------------
  2478. INT 21 - DOS 2+ - CREATE DUPLICATE HANDLE (DUP)
  2479.     AH = 45h
  2480.     BX = file handle to duplicate
  2481. Return: CF set on error
  2482.         AX = error code (04h,06h)
  2483.     CF clear if successful
  2484.         AX = new file handle
  2485. ---------------------------------------------
  2486. INT 21 - DOS 2+ - FORCE DUPLICATE HANDLE (FORCDUP,DUP2)
  2487.     AH = 46h
  2488.     BX = existing file handle
  2489.     CX = new file handle
  2490. Return: CF set on error
  2491.         AX = error code (04h,06h)
  2492. Note: closes file with handle BX if it is still open
  2493. ---------------------------------------------
  2494. INT 21 - DOS 2+ - GET CURRENT DIRECTORY
  2495.     AH = 47h
  2496.     DL = drive (0=default, 1=A, etc.)
  2497.     DS:SI points to 64-byte buffer area
  2498. Return: CF set on error
  2499.         AX = error code (0Fh)
  2500. Note: the returned path does not include the initial backslash
  2501. ---------------------------------------------
  2502. INT 21 - DOS 2+ - ALLOCATE MEMORY
  2503.     AH = 48h
  2504.     BX = number of 16-byte paragraphs desired
  2505. Return: CF set on error
  2506.         AX = error code (07h,08h)
  2507.         BX = maximum available
  2508.     CF clear if successful
  2509.         AX = segment of allocated memory block
  2510. ---------------------------------------------
  2511. INT 21 - DOS 2+ - FREE MEMORY
  2512.     AH = 49h
  2513.     ES = segment address of area to be freed
  2514. Return: CF set on error
  2515.         AX = error code (07h,09h)
  2516. ---------------------------------------------
  2517. INT 21 - DOS 2+ - ADJUST MEMORY BLOCK SIZE (SETBLOCK)
  2518.     AH = 4Ah
  2519.     ES = segment address of block to change
  2520.     BX = new size in paragraphs
  2521. Return: CF set on error
  2522.         AX = error code (07h,08h,09h)
  2523.         BX = maximum size possible for the block
  2524. ---------------------------------------------
  2525. INT 21 - DOS 2+ - LOAD OR EXECUTE (EXEC)
  2526.     AH = 4Bh
  2527.     AL = subfunction
  2528.         0 = load and execute program
  2529.         1 = load but do not execute (internal)
  2530.         3 = load overlay; do not create PSP
  2531.     DS:DX = filename
  2532.     ES:BX = parameter block
  2533.            AL =
  2534.           0: WORD segment of environment (0 = use current)
  2535.              DWORD -> command line
  2536.              DWORD -> FCB 1
  2537.              DWORD -> FCB 2
  2538.           1: WORD segment of environment (0 = use current)
  2539.              DWORD -> command line
  2540.              DWORD -> FCB 1
  2541.              DWORD -> FCB 2
  2542.              DWORD (DOS 3.x) will hold SS:SP on return
  2543.              DWORD (DOS 3.x) will hold entry point (CS:IP) on return
  2544.           3: WORD segment load address
  2545.              WORD segment relocation factor
  2546. Return: CF set on error
  2547.         AX = error code (01h,02h,05h,08h,0Ah,0Bh)
  2548.     CF clear if successful
  2549.         if function 1 and DOS 3.x or DESQview, process ID set to new
  2550.         program's PSP; get with function 62h
  2551.         if function 1 and DOS 2.x, new program's initial stack and 
  2552.         entry point returned in registers
  2553. Note: DOS 2.x destroys all registers, including SS:SP
  2554.  
  2555. Structure of .EXE file header:
  2556.  00h    WORD  4Dh, 5Ah signature (sometimes 5Ah, 4Dh)
  2557.  02h    WORD  image size remainder (program size mod 512)
  2558.  04h    WORD  file size in pages (program size div 512) 
  2559.  06h    WORD  number of relocation items
  2560.  08h    WORD  header size in paragraphs
  2561.  0Ah    WORD  minimum extra paragraphs needed
  2562.  0Ch    WORD  maximum extra paragraphs needed
  2563.  0Eh    WORD  stack segment
  2564.  10h    WORD  stack offset
  2565.  12h    WORD  word checksum of entire file
  2566.  14h    DWORD initial CS:IP
  2567.  18h    WORD  offset of relocation table 
  2568.  1Ah    WORD  overlay number
  2569. ---------------------------------------------
  2570. INT 21 - DOS 2+ - QUIT WITH EXIT CODE (EXIT)
  2571.     AH = 4Ch
  2572.     AL = exit code
  2573. Return: never returns
  2574. ---------------------------------------------
  2575. INT 21 - DOS 2+ - GET EXIT CODE OF SUBPROGRAM (WAIT)
  2576.     AH = 4Dh
  2577. Return: AL = exit code of subprogram (functions 31h or 4Ch)
  2578.     AH = circumstance which caused termination
  2579.         0 = Terminate/abort
  2580.         1 = Control-C
  2581.         2 = Hard error
  2582.         3 = Terminate and stay resident
  2583. ---------------------------------------------
  2584. INT 21 - DOS 2+ - FIND FIRST ASCIZ (FIND FIRST)
  2585.     AH = 4Eh
  2586.     CX = search attributes
  2587.     DS:DX -> ASCIZ filename
  2588. Return: CF set on error
  2589.         AX = error code (02h,12h)
  2590.     [DTA] = data block
  2591.           undocumented fields, 21 bytes total
  2592.          ---PCDOS 3.10---
  2593.               BYTE  drive letter
  2594.            11 BYTEs search template
  2595.               BYTE  search attributes
  2596.          ---DOS 2.x (and DOS 3.x except 3.1???)---
  2597.               BYTE  search attributes
  2598.               BYTE  drive letter
  2599.            11 BYTEs search template
  2600.          ---both 2.x and 3.x---
  2601.                       WORD  entry count within directory
  2602.             4 BYTEs reserved
  2603.               WORD  cluster number of parent directory
  2604.           BYTE  attribute of file found
  2605.           WORD  file time
  2606.           WORD  file date
  2607.           DWORD file size
  2608.        13 BYTEs ASCIZ filename+extension
  2609. ---------------------------------------------
  2610. INT 21 - DOS 2+ - FIND NEXT ASCIZ (FIND NEXT)
  2611.     AH = 4Fh
  2612.     [DTA] = data block from last AH = 4Eh/4Fh call
  2613. Return: CF set on error
  2614.         AX = error code (12h)
  2615.     [DTA] = data block, see AH = 4Eh above
  2616. ---------------------------------------------
  2617. INT 21 - DOS 2+ internal - SET PSP SEGMENT
  2618.     AH = 50h
  2619.     BX = segment address of new PSP
  2620. Note: under DOS 2.xx, this function cannot be invoked inside an INT 28h handler
  2621.       without setting the Critical Error flag
  2622. ---------------------------------------------
  2623. INT 21 - DOS 2+ internal - GET PSP SEGMENT
  2624.     AH = 51h
  2625. Return: BX = current PSP segment
  2626. Note: under DOS 2.xx, this function cannot be invoked inside an INT 28h handler
  2627.       without setting the Critical Error flag
  2628.  
  2629. Structure of PSP:
  2630.  00h  2 BYTEs program exit point
  2631.  02h      WORD  memory size in paragraphs
  2632.  04h    BYTE  unused
  2633.  05h  5 BYTEs CP/M entry point
  2634.  0Ah    DWORD terminate address (old INT 22h)
  2635.  0Eh    DWORD break address (old INT 23h)
  2636.  12h    DWORD critical error handler (old INT 24h)
  2637.  16h    WORD  parent PSP segment
  2638.  18h 20 BYTEs DOS 2+ open file table, FFh = unused
  2639.  2Ch    WORD  DOS 2+ environment segment
  2640.  2Eh    DWORD DOS 2+ process's SS:SP on entry to last INT 21 call
  2641.  32h    WORD  DOS 3.x max open files
  2642.  36h    DWORD DOS 3.x open file table address
  2643.  38h 24 BYTEs unused by DOS versions <= 3.3
  2644.  50h  3 BYTEs DOS function dispatcher (FAR routine)
  2645.  53h  9 BYTEs unused
  2646.  5Ch 16 BYTEs FCB #1, filled in from first commandline argument
  2647.  6Ch 20 BYTEs FCB #2, filled in from second commandline argument
  2648.  80h 128 BYTEs command tail / default DTA buffer
  2649. ---------------------------------------------
  2650. INT 21 - DOS 2+ internal - GET LIST OF LISTS
  2651.     AH = 52h
  2652. Return: ES:BX points to DOS list of lists
  2653.  
  2654. List of Lists:
  2655. Bytes    Value
  2656. -2&-1    segment of first memory control block
  2657. 00h-03h pointer to first DOS Device Control Block (see function 32h)
  2658. 04h-07h pointer to list of DOS file tables
  2659.     DWORD pointer to next file table
  2660.     WORD  number of files in this table
  2661.     35h bytes per file
  2662.       00h-01h number of file handles referring to this file
  2663.       02h      access mode (see function 3Dh)
  2664.       03h-04h ???
  2665.       05h-06h device info word (see function 44h/AL=00h)
  2666.       07h-0Ah pointer to device driver header if character device
  2667.           pointer to DOS Device Control Block if block device (see
  2668.           func 32h for format)
  2669.       0Bh-0Ch starting cluster of file
  2670.       0Dh-0Eh file time in packed format
  2671.       0Fh-10h file date in packed format
  2672.       11h-14h file size
  2673.       15h-18h current offset in file
  2674.       19h-1Ah ???
  2675.       1Bh-1Ch last cluster read
  2676.       1Dh-1Eh number of sector containing directory entry
  2677.       1Fh      offset of directory entry within sector (byte offset/32)
  2678.       20h-2Ah filename in FCB format (no path, no period, blank-padded)
  2679.       2Bh-30h unused??? I see 0 always
  2680.       31h-32h PSP segment of file's owner
  2681.       33h-34h unused??? I see 0 always
  2682. 08h-0Bh pointer to CLOCK$ device driver, whether installable or resident
  2683. 0Ch-0Fh pointer to actual CON: device driver, whether installable or resident
  2684. -----DOS 2.x
  2685. 10h    number of logical drives in system
  2686. 11h-12h maximum bytes/block of any block device
  2687. 13h-16h pointer to first disk buffer
  2688.     10h bytes control info followed by the 512-byte buffer
  2689.          DWORD pointer to next disk buffer, FFFFh if last
  2690.        4 BYTEs ???
  2691.          WORD  logical sector number
  2692.        2 BYTEs ???
  2693.          DWORD pointer to DOS Device Control Block (see function 32h)
  2694. 17h    Beginning (not a pointer--the real beginning!) of NUL device driver.
  2695.     This is the first device on DOS's linked list of device drivers.
  2696. -----DOS 3.x
  2697. 10h-11h maximum bytes/block of any block device
  2698. 12h-15h pointer to first disk buffer
  2699.     10h bytes control info per disk buffer, followed by 512-byte buffer
  2700.        DWORD pointer to next disk buffer, FFFFh if last
  2701.        BYTE  drive (0=A:)
  2702.        BYTE  flags
  2703.         bit 7: ???
  2704.         bit 6: ???
  2705.         bit 5: contents may be overwritten if set (buffer not dirty)
  2706.         bit 4: ???
  2707.         bit 3: sector in data area
  2708.         bit 2: sector in root directory
  2709.         bit 1: sector in FAT
  2710.         bit 0: ???
  2711.         WORD  logical sector number
  2712.        BYTE  ???
  2713.        BYTE  ???
  2714.        DWORD pointer to DOS Device Control Block (see function 32h)
  2715.        WORD  unused??? (almost always 0)
  2716. 16h-19h pointer to array of drive info:
  2717.     51h bytes per drive, starting with A: ...
  2718.       00h-42h current path as ASCIZ, starting with 'x:\'
  2719.       43h     ??? I see zero always
  2720.       44h      ??? I see 40h always
  2721.       45h-48h pointer to DOS Disk Block for this drive
  2722.       49h-4Ah starting cluster of current dir, 0 = root, -1 never accessed
  2723.       4Bh-4Ch ??? I see FFFFh always
  2724.       4Dh-4Eh ??? I see FFFFh always
  2725.       4Fh-50h ??? I see 2 always
  2726. 1Ah-1Dh pointer to FCB table (if CONFIG.SYS contains FCBS=)
  2727. 1Eh-1Fh size of FCB table
  2728. 20h    number of block devices
  2729. 21h    value of LASTDRIVE command in CONFIG.SYS (default 5)
  2730. 22h    Beginning (not a pointer--the real beginning!) of NUL device driver.
  2731.     This is the first device on DOS's linked list of device drivers.
  2732.     device driver header format:
  2733.       DWORD pointer to next driver or -1 if last driver
  2734.       WORD    device attributes
  2735.         bit 15    character device if set, block if clear
  2736.         bit 14    IOCTL supported
  2737.         bit 13    output until busy (character device)
  2738.             non-IBM format (block devices)
  2739.         bit 12    reserved
  2740.         bit 11    OPEN/CLOSE/RM calls supported
  2741.         bit 10-5 reserved
  2742.         bit 4    device is special (uses INT 29 for fast console output)
  2743.         bit 3    device is CLOCK
  2744.         bit 2    device is NUL
  2745.         bit 1    device is standard output
  2746.         bit 0    device is standard input
  2747.       WORD    device strategy entry point
  2748.       WORD    device interrupt entry point
  2749.     8 BYTEs blank-padded character device name
  2750.       WORD    (CD-ROM driver) 0
  2751.       BYTE    (CD-ROM driver) drive letter
  2752.       BYTE    (CD-ROM driver) number of units
  2753. ---------------------------------------------
  2754. INT 21 - DOS 2+ internal - TRANSLATE BPB
  2755.     AH = 53h
  2756.  
  2757. ---------------------------------------------
  2758. INT 21 - DOS 2+ - GET VERIFY FLAG
  2759.     AH = 54h
  2760. Return: AL = 0 if flag OFF
  2761.     AL = 1 if flag ON
  2762. ---------------------------------------------
  2763. INT 21 - DOS 2+ internal - CREATE PSP
  2764.     AH = 55h
  2765.     DX = segment number at which to set up PSP
  2766. Note: Like func 26h but creates "child" PSP rather than copying existing one.
  2767. ---------------------------------------------
  2768. INT 21 - DOS 2+ - RENAME A FILE
  2769.     AH = 56h
  2770.     DS:DX -> ASCIZ old name
  2771.     ES:DI -> ASCIZ new name
  2772. Return: CF set on error
  2773.         AX = error code (02h,03h,05h,11h
  2774. Note: allows move between directories on same logical volume
  2775.       (DOS 3.x) allows renaming of directories
  2776. ---------------------------------------------
  2777. INT 21 - DOS 2+ - GET FILE'S DATE/TIME
  2778.     AX = 5700h
  2779.     BX = file handle
  2780. Return: CF set on error
  2781.         AX = error code (01h,06h)
  2782.     CF clear if successful
  2783.         CX = time of last write
  2784.         DX = date of last write
  2785. ---------------------------------------------
  2786. INT 21 - DOS 2+ - SET FILE'S DATE/TIME
  2787.     AX = 5701h
  2788.     BX = file handle
  2789.     CX = time to be set
  2790.     DX = date to be set
  2791. Return: CF set on error
  2792.         AX = error code (01h,06h)
  2793. ---------------------------------------------
  2794. INT 21 - DOS 3.x - GET/SET MEMORY ALLOCATION STRATEGY
  2795.     AH = 58h
  2796.     AL = function code
  2797.         0 = get allocation strategy
  2798.         1 = set allocation strategy
  2799.            BL = strategy code
  2800.            0 first fit (use first memory block large enough)
  2801.            1 best fit (use smallest memory block large enough)
  2802.            2 last fit (use high part of last usable memory block)
  2803. Return: CF set on error
  2804.         AX = error code (01h)
  2805.     CF clear if successful
  2806.         AX = strategy code
  2807. Note: the Set subfunction accepts any value in BL; 2 or greater means last fit.
  2808.       the Get subfunction returns the last value set, so programs should check
  2809.       whether the value is >= 2, not just equal to 2.
  2810. ---------------------------------------------
  2811. INT 21 - DOS 3.x - GET EXTENDED ERROR CODE
  2812.     AH = 59h
  2813.     BX = version code (0000 for DOS 3.x)
  2814. Return: AX = extended error code
  2815.     BH = class of error
  2816.     BL = suggested action code
  2817.     CH = locus (where error occurred)
  2818.     CL, DX, SI, DI, BP, DS, and ES destroyed
  2819.  
  2820. Error codes:
  2821.     01h function number invalid
  2822.     02h file not found
  2823.     03h path not found
  2824.     04h too many open files (no handles available)
  2825.     05h access denied
  2826.     06h invalid handle
  2827.     07h memory control block destroyed
  2828.     08h insufficient memory
  2829.     09h memory block address invalid
  2830.     0Ah environment invalid
  2831.     0Bh format invalid
  2832.     0Ch access code invalid
  2833.     0Dh data invalid
  2834.     0Fh invalid drive
  2835.     10h attempted to remove current directory
  2836.     11h not same device
  2837.     12h no more files
  2838.     13h disk write-protected
  2839.     14h unknown unit
  2840.     15h drive not ready
  2841.     16h unknown command
  2842.     17h data error (CRC)
  2843.     18h bad request structure length
  2844.     19h seek error
  2845.     1Ah unknwon media type (non-DOS disk)
  2846.     1Bh sector not found
  2847.     1Ch printer out of paper
  2848.     1Dh write fault
  2849.     1Eh read fault
  2850.     1Fh general failure
  2851.     20h sharing violation
  2852.     21h lock violation
  2853.     22h disk change invalid
  2854.         ES:DI -> ASCIZ volume label of required disk
  2855.     23h FCB unavailable
  2856.     24h sharing buffer overflow
  2857.     25h-31h reserved
  2858.     32h Network request not supported (DOS 3.1 + MS Networks)
  2859.     33h Remote computer not listening
  2860.     34h Duplicate name on network
  2861.     35h Network name not found
  2862.     36h Network busy
  2863.     37h Network device no longer exists
  2864.     38h Network BIOS command limit exceeded
  2865.     39h Network adapter hardware error
  2866.     3Ah Incorrect response from network
  2867.     3Bh Unexpected network error
  2868.     3Ch Incompatible remote adapter
  2869.     3Dh Print queue full
  2870.     3Eh Queue not full
  2871.     3Fh Not enough space to print file
  2872.     40h Network name was deleted
  2873.     41h Network: Access denied
  2874.     42h Network device type incorrect
  2875.     43h Network name not found
  2876.     44h Network name limit exceeded
  2877.     45h Network BIOS session limit exceeded
  2878.     46h Temporarily paused
  2879.     47h Network request not accepted
  2880.     48h Print/disk redirection paused (DOS 3.1 + MS Networks)
  2881.     49h-4Fh reserved
  2882.     50h file exists
  2883.     51h reserved
  2884.     52h cannot make directory
  2885.     53h fail on INT 24h
  2886.     54h (DOS 3.3) too many redirections
  2887.     55h (DOS 3.3) duplicate redirection
  2888.     56h (DOS 3.3) invalid password
  2889.     57h (DOS 3.3) invalid parameter
  2890.     58h (DOS 3.3) network write fault
  2891. Error Classes:
  2892.     01h out of resource (storage space or I/O channels)
  2893.     02h temporary situation (file or record lock)
  2894.     03h authorization (denied access)
  2895.     04h internal (system software bug)
  2896.     05h hardware failure
  2897.     06h system failure (configuration file missing or incorrect)
  2898.     07h application program error
  2899.     08h not found
  2900.     09h bad format
  2901.     0Ah locked
  2902.     0Bh media error
  2903.     0Ch already exists
  2904.     0Dh unknown
  2905. Suggested Action:
  2906.     01h retry
  2907.     02h delayed retry
  2908.     03h prompt user to reenter input
  2909.     04h abort after cleanup
  2910.     05h immediate abort
  2911.     06h ignore
  2912.     07h retry after user intervention
  2913. Error Locus:
  2914.     01h unknown or not appropriate
  2915.     02h block device (disk error)
  2916.     03h network related
  2917.     04h serial device (timeout)
  2918.     05h memory related
  2919. ---------------------------------------------
  2920. INT 21 - DOS 3.x - CREATE UNIQUE FILE
  2921.     AH = 5Ah
  2922.     DS:DX -> ASCIZ directory path name ending with a '\' + 13 bytes to
  2923.          receive generated filename
  2924.     CX = file attribute
  2925. Return: CF set on error
  2926.         AX = error code (03h,05h)
  2927.     CF clear if successful
  2928.         AX = file handle
  2929.     DS:DX -> path name
  2930. Note: The file created is not truly "temporary".  It MUST be removed by the
  2931.       user.
  2932. ---------------------------------------------
  2933. INT 21 - DOS 3.x - CREATE NEW FILE
  2934.     AH = 5Bh
  2935.     DS:DX -> ASCIZ directory path name
  2936.     CX = file attribute
  2937. Return: CF set on error
  2938.         AX = error code (03h,04h,05h,50h)
  2939.     CF clear if successful
  2940.     DS:DX -> path name
  2941. Note: Unlike function 3Ch, function 5Bh will fail if the file already exists.
  2942. ---------------------------------------------
  2943. INT 21 - DOS 3.x - LOCK/UNLOCK FILE ACCESS
  2944.     AH = 5Ch
  2945.     AL = 00h lock
  2946.          01h unlock
  2947.     BX = file handle
  2948.     CX:DX = starting offset of region to lock
  2949.     SI:DI = size of region to lock
  2950. Return: CF set on error
  2951.         AX = error code (01h,06h,21h)
  2952. ---------------------------------------------
  2953. INT 21 - DOS 3.1 internal - INDIRECT FUNCTION CALL
  2954.     AX = 5D00h
  2955.     DS:DX -> buffer containing register values
  2956.                  AX, BX, CX, DX, SI, DI, DS, ES 
  2957.          for a call to INT 21h
  2958. Return: as appropriate for function being called
  2959. Notes:  does not check AH.  Out of range values will crash the system
  2960. ---------------------------------------------
  2961. INT 21 - DOS 3.1 internal - SYNC???
  2962.     AX = 5D01h
  2963.     ???
  2964. Return: ???
  2965. Note: does something to each disk file in the System File Table which has been
  2966.     written to; if remote file, calls INT 2F/AX=1107h
  2967.       seems to update the time stamp of all open files which have been written
  2968. ---------------------------------------------
  2969. INT 21 - DOS 3.1 internal - network - ???
  2970.     AX = 5D02h
  2971.     ???
  2972. Return: ???
  2973. Note: error unless network is loaded
  2974. ---------------------------------------------
  2975. INT 21 - DOS 3.1 internal - network - ???
  2976.     AX = 5D03h
  2977.     ???
  2978. Return: ???
  2979. Note: error unless network is loaded
  2980. ---------------------------------------------
  2981. INT 21 - DOS 3.1 internal - network - ???
  2982.     AX = 5D04h
  2983.     ???
  2984. Return: ???
  2985. Note: error unless network is loaded
  2986. ---------------------------------------------
  2987. INT 21 - DOS 3.1 internal - network - ???
  2988.     AX = 5D05h
  2989.     ???
  2990. Return: ES:DI = ???
  2991.     BX = ???
  2992.     CX = ???
  2993. Note: error unless network is loaded
  2994. ---------------------------------------------
  2995. INT 21 - DOS 3.x internal - GET ADDRESS OF CRITICAL ERROR FLAG
  2996.     AX = 5D06h
  2997. Return: DS:SI -> critical error flag
  2998.     BX = ???
  2999.     CX = ???
  3000. Notes:    this call does a lot of other work in addition to returning the    pointer
  3001.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  3002.     DOS 2.x by forcing use of correct stack
  3003. ---------------------------------------------
  3004. INT 21 - DOS 3.x internal - ???
  3005.     AH = 5Dh
  3006.     AL = subfunction
  3007.          07h: ???
  3008.          08h: ??? (used by COMMAND.COM)
  3009.          09h: ??? (used by COMMAND.COM)
  3010. Return: ???
  3011. Note: in DOS 3.10, these are identical, and call INT 2F/AX=1125h
  3012. ---------------------------------------------
  3013. INT 21 - DOS 3.1+ internal - SET EXTENDED ERROR INFORMATION
  3014.     AX = 5D0Ah
  3015.     DS:DX = address of 11-word error information
  3016.            words 0 to 7: values of AX,BX,CX,DX,SI,DI,DS,ES that func 59h
  3017.                  will return
  3018.            words 8 to 10: zero (reserved)
  3019. ---------------------------------------------
  3020. INT 21 - DOS 3.1 + Microsoft Networks - GET MACHINE NAME
  3021.     AX = 5E00h
  3022.     DS:DX -> buffer for ASCIZ name (16 bytes)
  3023. Return: CF set on error
  3024.         AX = error code (01h)
  3025.     CH = 0 if name not defined
  3026.           <> 0 defined
  3027.         CL = NETBIOS name number
  3028.         DS:DX -> ASCIZ machine name
  3029. ---------------------------------------------
  3030. INT 21 - DOS 3.1 + Microsoft Networks - SET MACHINE NAME
  3031.     AX = 5E01h
  3032.     DS:DX -> ASCIZ name
  3033.     CL = name number
  3034.     CH = ???
  3035. ---------------------------------------------
  3036. INT 21 - DOS 3.1 + Microsoft Networks - SET PRINTER SETUP
  3037.     AX = 5E02h
  3038.     BX = Redirection list index
  3039.     CX = length of setup string (<= 64)
  3040.     DS:SI -> string buffer
  3041. Return: CF set on error
  3042.         AX = error code (01h)
  3043. ---------------------------------------------
  3044. INT 21 - DOS 3.1 + Microsoft Networks - GET PRINTER SETUP
  3045.     AX = 5E03h
  3046.     BX = Redirection list index
  3047.     ES:DI -> string buffer
  3048. Return: CF set on error
  3049.         AX = error code (01h)
  3050.     CX = length of setup string (<= 64)
  3051. ---------------------------------------------
  3052. INT 21 - DOS 3.1 + Microsoft Networks - GET REDIRECTION LIST ENTRY
  3053.     AX = 5F02h
  3054.     BX = Redirection list index
  3055.     DS:SI -> 16 char local device name buffer
  3056.     ES:DI -> 128 char network name buffer
  3057. Return: CF set on error
  3058.         AX = error code (01h,12h)
  3059.     BH = Device status flag (BIT 0 = 0 if valid)
  3060.     BL = device type (03 if printer, 04 if drive)
  3061.     CX = stored parameter value (user data)
  3062. Note: DX and BP are destroyed by this call!
  3063. ---------------------------------------------
  3064. INT 21 - DOS 3.1 + Microsoft Networks - REDIRECT DEVICE
  3065.     AX = 5F03h
  3066.     BL = device type
  3067.         03 = printer device
  3068.         04 = file device
  3069.     CX = stored parameter value
  3070.     DS:SI -> ASCIZ source device name
  3071.     ES:DI -> destination ASCIZ network path + ASCIZ password
  3072. Return: CF set on error
  3073.         AX = error code (01h,03h,05h,08h)
  3074. ---------------------------------------------
  3075. INT 21 - DOS 3.1 + Microsoft Networks - CANCEL REDIRECTION
  3076.     AX = 5F04h
  3077.     DS:SI -> ASCIZ device name or network path
  3078. Return: CF set on error
  3079.         AX = error code (01h,0Fh)
  3080. ---------------------------------------------
  3081. INT 21 - DOS 3.x internal - RESOLVE PATH STRING TO FULLY QUALIFIED PATH STRING
  3082.     AH = 60h
  3083.     DS:SI = relative path string
  3084.     ES:DI = buffer for fully qualified name
  3085. Return: buffer filled with qualified name; may return error code, unknown.
  3086. ---------------------------------------------
  3087. INT 21 - DOS 3.x internal - UNUSED
  3088.     AH = 61h
  3089. Return: AL = 0
  3090. ---------------------------------------------
  3091. INT 21 - DOS 3.x - GET PSP ADDRESS
  3092.     AH = 62h
  3093. Return: BX = segment address of PSP
  3094. ---------------------------------------------
  3095. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE
  3096.     AH = 63h
  3097.     AL = subfunction
  3098.          0 = get system lead byte table
  3099.          1 = set/clear interim console flag
  3100.         DL = 1/0 to set/clear interim console flag
  3101.          2 = get interim console flag
  3102. Return: CF set on error
  3103.         AX = error code
  3104.     DS:SI -> lead byte table (AL = 0)
  3105.     DL = interim console flag (AL = 2)
  3106. Note: does not preserve any registers other than SS:SP
  3107. ---------------------------------------------
  3108. INT 21 - DOS 3.2 internal - ???
  3109.     AH = 64h
  3110.     AL = subfunction
  3111.         00h get ???
  3112.         Return: DL = ???
  3113.         01h set ???
  3114.         DL = ???
  3115.         02h get and set ???
  3116.         DL = new ???
  3117.         Return: DL = old ???
  3118. ---------------------------------------------
  3119. INT 21 - DOS 3.3 internal - ???
  3120.     AH = 64h
  3121.     AL = flag
  3122.         0  ??? 
  3123.         non-0  ??? 
  3124. Return: nothing
  3125. Note: seems to have something to do with the network
  3126. ---------------------------------------------
  3127. INT 21 - DOS 3.3 - GET EXTENDED COUNTRY INFORMATION
  3128.     AH = 65h
  3129.     AL = info ID
  3130.         01h get general internationalization info
  3131.         02h get pointer to uppercase table
  3132.         04h get pointer to filename uppercase table
  3133.         06h get pointer to collating sequence table
  3134.     BX = code page (-1=global code page)
  3135.     DX = country ID (-1=current country)
  3136.     ES:DI -> country information buffer
  3137.     CX = size of buffer (>= 5)
  3138. Return: CF set on error
  3139.         AX = error code
  3140.     CF clear if succesful
  3141.         CX = size of country information returned
  3142.         ES:DI -> country information:
  3143.         BYTE  info ID
  3144.         if info ID == 1
  3145.             WORD  size
  3146.             WORD  country ID
  3147.             WORD  code page
  3148.          34 BYTEs see function 38h
  3149.         if info ID == 2
  3150.             DWORD pointer to uppercase table
  3151.               WORD    table size
  3152.               128 BYTEs uppercase equivalents (if any) of chars 80h-FFh
  3153.         if info ID == 4
  3154.             DWORD pointer to collating table
  3155.                 WORD    table size
  3156.               256 BYTEs values used to sort characters 00h-FFh
  3157.         if info ID == 6
  3158.             DWORD pointer to filename uppercase table
  3159.               WORD    table size
  3160.               128 BYTEs uppercase equivalents (if any) of chars 80h-FFh
  3161. ---------------------------------------------
  3162. INT 21 - DOS 3.3 - GET GLOBAL CODE PAGE TABLE
  3163.     AH = 6601h
  3164. Return: CF set on error
  3165.         AX = error code
  3166.     CF clear if successful
  3167.         BX = active code page
  3168.         DX = system code page
  3169. ---------------------------------------------
  3170. INT 21 - DOS 3.3 - SET GLOBAL CODE PAGE TABLE
  3171.     AX = 6602h
  3172.     BX = active code page
  3173.         437  US
  3174.         850  Multilingual
  3175.         860  Portugal
  3176.         863  Canada (French)
  3177.         865  Norway/Denmark
  3178.     DX = system code page (active page at boot time)
  3179. Return: CF set on error
  3180.         AX = error code
  3181. ---------------------------------------------
  3182. INT 21 - DOS 3.3 - SET HANDLE COUNT
  3183.     AH = 67h
  3184.     BX = desired number of handles (max 255)
  3185. Return: CF set if error (and error code in AX)
  3186. ---------------------------------------------
  3187. INT 21 - DOS 3.3 - COMMIT FILE, WRITE ALL BUFFERED DATA TO DISK
  3188.     AH = 68h
  3189.     BX = file handle
  3190. Return: CF set on error (and error code in AX)
  3191. Note: if BX <= 20, no action is taken
  3192. ---------------------------------------------
  3193. INT 21 - DOS 4.0 internal - GET DISK SERIAL NUMBER
  3194.     AH = 69h
  3195.     AL = subfunction???
  3196.         0
  3197.     DS:DX -> buffer
  3198.         WORD  ??? (zero)
  3199.         DWORD  disk serial number (binary)
  3200.          11 BYTEs volume label or "NO NAME      " if none present
  3201.           8 BYTEs FAT type--string "FAT12    " or "FAT16  "
  3202. Return: buffer filled with appropriate values
  3203. ---------------------------------------------
  3204. INT 21 - DOS 4.0 internal - ???
  3205.     AH = 6Ah
  3206.     ???
  3207. Return: ???
  3208. ---------------------------------------------
  3209. INT 21 - DOS 4.0 internal - ???
  3210.     AH = 6Bh
  3211.     ???
  3212. Return: ???
  3213. ---------------------------------------------
  3214. INT 21 - DOS 4.0 - EXTENDED OPEN/CREATE
  3215.     AX = 6C00h
  3216.     BL = open mode as in AL for normal open
  3217.     BH = 0WF00000
  3218.         W = auto commit on write
  3219.         F = return error rather than doing INT 24h
  3220.     CX = create attribute
  3221.     DL = action if file exists/does not exists
  3222.         bits 7-4 action if file does not exist
  3223.             0000 fail
  3224.             0001 create
  3225.         bits 3-0 action if file exists
  3226.             0000 fail
  3227.             0001 open
  3228.             0010 replace/open
  3229.     DH = 0
  3230.     DS:SI -> ASCIZ file name
  3231. Return: CF set on error
  3232.        AX = error code
  3233.     CF clear if successful
  3234.        AX = file handle
  3235.        CX = 1 file opened
  3236.         2 file created
  3237.         3 file replaced
  3238. ---------------------------------------------
  3239. INT 21 - ???
  3240.     AH = 89h
  3241.     ???
  3242. Note: called by Microsoft C 4.0 startup code
  3243. ---------------------------------------------
  3244.  
  3245. INT 22 - DOS - TERMINATE ADDRESS
  3246.    FAR (DWORD) address of routine to be executed when program "returns to DOS".
  3247.    Should NEVER be called directly.
  3248. ---------------------------------------------
  3249. INT 23 - DOS - CONTROL "C" EXIT ADDRESS
  3250.    Automatically called from keyboard scanner when CTRL-C or CTRL-BREAK is
  3251.    detected. Normally aborts program and returns to DOS, but may be changed.
  3252. ---------------------------------------------
  3253. INT 24 - DOS - FATAL ERROR HANDLER ADDRESS
  3254.    Automatically called upon detection of unrecoverable I/O error.
  3255.    Normally points to routine in resident part of COMMAND.COM that prints
  3256.    "Abort, Retry, Ignore?" message and takes the reply, but may be overridden
  3257.    if desired.
  3258.  
  3259. Provides the following values in registers on entry to interrupt handler:
  3260.     AH: bit 7 = 0 disk I/O error
  3261.           = 1 other error -- if block device, bad FAT
  3262.                   -- if char device, code in DI
  3263.         bit 6  unused
  3264.         bit 5 = 1 if Ignore allowed, 0 if not (DOS 3.x)
  3265.         bit 4 = 1 if Retry allowed, 0 if not (DOS 3.x)
  3266.         bit 3 = 1 if Fail allowed, 0 if not (DOS 3.x)
  3267.         bit 2 \ disk area of error    00 = DOS area  01 = FAT
  3268.         bit 1 /            10 = root dir  11 = data area
  3269.         bit 0 = 1 if write, 0 if read
  3270.     AL = drive number if AH bit 7 = 1, otherwise undefined
  3271.     BP:SI = address of device header for which error occurred
  3272.         block device if high bit of BP:[SI+4] set
  3273.     low byte of DI:
  3274.        00h write-protect error
  3275.        01h unknown unit
  3276.        02h drive not ready
  3277.        03h unknown command
  3278.        04h data error (bad CRC)
  3279.        05h bad request structure length
  3280.        06h seek error
  3281.        07h unknown media type
  3282.        08h sector not found
  3283.        09h printer out of paper
  3284.        0Ah write fault
  3285.        0Bh read fault
  3286.        0Ch general failure
  3287.        0Dh (DOS 3.x) sharing violation
  3288.        0Eh (DOS 3.x) lock violation
  3289.        0Fh (DOS 3.x) invalid disk change
  3290.        10h (DOS 3.x) FCB unavailable
  3291.        11h (DOS 3.x) sharing buffer overflow
  3292. Handler must return
  3293.     AL = 00 ignore error
  3294.        = 01 retry operation
  3295.        = 02 terminate program through INT 22h
  3296.        = 03 fail system call in progress (DOS 3.x)
  3297. ---------------------------------------------
  3298. INT 25 - DOS - ABSOLUTE DISK READ (except DOS 4.0/COMPAQ DOS 3.31 >32M partitn)
  3299.     AL = Drive number (0=A, 1=B, etc)
  3300.     DS:BX = Disk Transfer Address (buffer)
  3301.     CX = Number of sectors to read
  3302.     DX = First relative sector to read
  3303. Return: CF set on error
  3304.         AL = error code issued to INT 24h in low half of DI
  3305.         AH = 80h if attachment failed to respond
  3306.          40h if seek operation failed
  3307.          20h if controller failed
  3308.          10h if data error (bad CRC)
  3309.          08h if DMA failure
  3310.          04h if requested sector not found
  3311.          03h if write-protected disk
  3312.          02h if bad address mark
  3313.          01h if bad command
  3314. Note: ORIGINAL FLAGS ON STACK!    May destroy all registers except segment regs
  3315. ---------------------------------------------
  3316. INT 25 - DOS 4.0/COMPAQ DOS 3.31 - ABSOLUTE DISK READ (>32M hard-disk partitn)
  3317.     AL = Drive number (0=A, 1=B, etc)
  3318.     CX = FFFFh
  3319.     DS:BX = Packet address
  3320.           DWORD sector number
  3321.           WORD    number of sectors to read
  3322.           DWORD transfer address
  3323. Return: same as above???
  3324. Note: partition is potentially >32M (and requires this form of the call) if
  3325.       bit 1 of device attribute word in device driver is set
  3326. ---------------------------------------------
  3327. INT 26 - DOS - ABSOLUTE DISK WRITE (except DOS 4.0/COMPAQ DOS 3.31 >32M partn)
  3328.     AL = Drive number (0=A, 1=B, etc)
  3329.     DS:BX = Disk Transfer Address (buffer)
  3330.     CX = Number of sectors to write
  3331.     DX = First relative sector to write
  3332. Return: CF set on error
  3333.         AL = error code issued to INT 24h in low half of DI
  3334.         AH = same error codes as for INT 25h
  3335. Note: ORIGINAL FLAGS ON STACK!
  3336. ---------------------------------------------
  3337. INT 26 - DOS 4.0/COMPAQ DOS 3.31 - ABSOLUTE DISK WRITE (>32M hard-disk partitn)
  3338.     AL = Drive number (0=A, 1=B, etc)
  3339.     CX = FFFFh
  3340.     DS:BX = Packet address
  3341.           DWORD sector number
  3342.           WORD    number of sectors to write
  3343.           DWORD transfer address
  3344. Return: same as above???
  3345. Note: partition is potentially >32M (and requires this form of the call) if
  3346.       bit 1 of device attribute word in device driver is set
  3347. ---------------------------------------------
  3348. INT 27 - DOS - TERMINATE BUT STAY RESIDENT
  3349.     CS = current program segment
  3350.     DX = last program byte + 1
  3351. Return: never
  3352. ---------------------------------------------
  3353. INT 28 - DOS 2+ internal - KEYBOARD BUSY LOOP
  3354.    This interrupt is called from inside the "get input from keyboard" routine
  3355.    in DOS, if and only if it is safe to use INT 21 to access the disk at that
  3356.    time.  It is used primarily by the PRINT.COM routines and TSR programs, but
  3357.    any number of other routines could be chained to it by saving the original
  3358.    vector, and calling it with a FAR call (or just JMPing to it) at the end of
  3359.    the new routine.
  3360.  
  3361.    The INT 28h handler may invoke any INT 21h function except functions 00h
  3362.    through 0Ch (and 50h/51h under DOS 2.xx unless DOS CritErr flag is set).
  3363.  
  3364.    Until some program installs its own routine, this interrupt vector simply
  3365.    points to an IRET opcode.
  3366. ---------------------------------------------
  3367. INT 29 - DOS 2+ internal - FAST PUTCHAR
  3368.    This interrupt is called from the DOS output routines if output is going to
  3369.    a device rather than a file, and the device driver's attribute word has
  3370.    bit 3 (04h) set to "1".
  3371. ---------------------------------------------
  3372. INT 2E - DOS 2+ internal - EXECUTE COMMAND
  3373.     DS:SI -> counted CR-terminated command string
  3374.  
  3375. The top-level command.com executes the command; all registers are destroyed
  3376. as in EXEC (INT 21/AH=4Bh).
  3377. ---------------------------------------------
  3378. INT 2F - notes
  3379.     AH identifies which program is to handle the interrupt
  3380.        00h-7Fh reserved for DOS
  3381.        C0h-FFh reserved for applications
  3382.     AL is the function code
  3383. This is a general mechanism for verifying the presence of a TSR and 
  3384. communicating with it.
  3385. ---------------------------------------------
  3386. INT 2F - BMB Compuscience Canada Utilities Interface
  3387.     AH = xx (dynamically assigned based upon a search for a multiplex
  3388.          number which doesn't answer installed)
  3389.     AL = 00h install check
  3390.     ES:DI = EBEB:BEBE
  3391. Return: AL = 00h - not installed
  3392.          01h - not installed, no ok to install
  3393.          FFh - installed and is ES:DI=EBEB:BEBE then ES:DI will point
  3394.            to a string 'BMB xxxx' where xxxx is a product name and
  3395.            version
  3396. ---------------------------------------------
  3397. INT 32 - reserved
  3398. ---------------------------------------------
  3399. INT 33 - MS MOUSE - RESET DRIVER AND READ STATUS
  3400.     AX = 0000h
  3401. Return: AX = status
  3402.         0  hardware/driver not installed
  3403.         -1 hardware/driver installed
  3404.     BX = number of buttons
  3405.         -1 two buttons
  3406.         0  other than two
  3407.         3  Mouse Systems mouse
  3408. ---------------------------------------------
  3409. INT 33 - MS MOUSE - SHOW MOUSE CURSOR
  3410.     AX = 0001h
  3411. ---------------------------------------------
  3412. INT 33 - MS MOUSE - HIDE MOUSE CURSOR
  3413.     AX = 0002h
  3414. Note: multiple calls to hide the cursor will require multiple calls to
  3415.       function 01h to unhide it.
  3416. ---------------------------------------------
  3417. INT 33 - MS MOUSE - RETURN POSITION AND BUTTON STATUS
  3418.     AX = 0003h
  3419. Return: BX = button status
  3420.        bit 0  left button pressed if 1
  3421.        bit 1  right button pressed if 1
  3422.        bit 2  middle button pressed if 1 (Mouse Systems mouse)
  3423.     CX = column
  3424.     DX = row
  3425. ---------------------------------------------
  3426. INT 33 - MS MOUSE - POSITION MOUSE CURSOR
  3427.     AX = 0004h
  3428.     CX = column
  3429.     DX = row
  3430. ---------------------------------------------
  3431. INT 33 - MS MOUSE - RETURN BUTTON PRESS DATA
  3432.     AX = 0005h
  3433.     BX = button
  3434.         0 left
  3435.         1 right
  3436.         2 middle (Mouse Systems mouse)
  3437. Return: AX = button states
  3438.         bit 0 left button pressed if 1
  3439.         bit 1 right button pressed if 1
  3440.         bit 2 middle button pressed if 1 (Mouse Systems mouse)
  3441.     BX = number of times specified button has been pressed since last call
  3442.     CX = column at time specified button was last pressed
  3443.     DX = row at time specified button was last pressed
  3444. ---------------------------------------------
  3445. INT 33 - MS MOUSE - RETURN BUTTON RELEASE DATA
  3446.     AX = 0006h
  3447.     BX = button
  3448.         0 left
  3449.         1 right
  3450.         2 middle (Mouse Systems mouse)
  3451. Return: AX = button states
  3452.         bit 0 left button pressed if 1
  3453.         bit 1 right button pressed if 1
  3454.         bit 2 middle button pressed if 1 (Mouse Systems mouse)
  3455.     BX = number of times specified button has been released since last call
  3456.     CX = column at time specified button was last released
  3457.     DX = row at time specified button was last released
  3458. ---------------------------------------------
  3459. INT 33 - MS MOUSE - DEFINE HORIZONTAL CURSOR RANGE
  3460.     AX = 0007h
  3461.     CX = minimum column
  3462.     DX = maximum column
  3463. ---------------------------------------------
  3464. INT 33 - MS MOUSE - DEFINE VERTICAL CURSOR RANGE
  3465.     AX = 0008h
  3466.     CX = minimum row
  3467.     DX = maximum row
  3468. ---------------------------------------------
  3469. INT 33 - MS MOUSE - DEFINE GRAPHICS CURSOR
  3470.     AX = 0009h
  3471.     BX = column of cursor hot spot in bitmap (-16 to 16)
  3472.     CX = row of cursor hot spot (-16 to 16)
  3473.     ES:DX -> bitmap
  3474.         16 words screen mask
  3475.         16 words cursor mask
  3476.             each word defines the sixteen pixels of a row, low bit
  3477.             rightmost
  3478. ---------------------------------------------
  3479. INT 33 - MS MOUSE - DEFINE TEXT CURSOR
  3480.     AX = 000Ah
  3481.     BX = hardware/software text cursor
  3482.         0 software
  3483.         CX = screen mask
  3484.         DX = cursor mask
  3485.         1 hardware
  3486.         CX = start scan line
  3487.         DX = end scan line
  3488. Note: when the software cursor is selected, the char/attribute data at the
  3489.       current screen position is ANDed with the screen mask and then XORed
  3490.       with the cursor mask
  3491. ---------------------------------------------
  3492. INT 33 - MS MOUSE - READ MOTION COUNTERS
  3493.     AX = 000Bh
  3494. Return: CX = number of mickeys mouse moved horizontally since last call
  3495.     DX = number of mickeys mouse moved vertically
  3496. Notes: a mickey is the smallest increment the mouse can sense
  3497.        positive values indicate up/right
  3498. ---------------------------------------------
  3499. INT 33 - MS MOUSE - DEFINE INTERRUPT SUBROUTINE PARAMETERS
  3500.     AX = 000Ch
  3501.     CX = call mask
  3502.          bit 0 call if mouse moves
  3503.          bit 1 call if left button pressed
  3504.          bit 2 call if left button released
  3505.          bit 3 call if right button pressed
  3506.          bit 4 call if right button released
  3507.          bit 5 call if middle button pressed (Mouse Systems mouse)
  3508.          bit 6 call if middle button released (Mouse Systems mouse)
  3509.     ES:DX = address of FAR routine
  3510. Note: when the subroutine is called, it is passed the following values:
  3511.     AX = condition mask (same bit assignments as call mask)
  3512.     BX = button state
  3513.     CX = cursor column
  3514.     DX = cursor row
  3515.     DI = horizontal mickey count
  3516.     SI = vertical mickey count
  3517. ---------------------------------------------
  3518. INT 33 - MS MOUSE - LIGHT PEN EMULATION ON
  3519.     AX = 000Dh
  3520. ---------------------------------------------
  3521. INT 33 - MS MOUSE - LIGHT PEN EMULATION OFF
  3522.     AX = 000Eh
  3523. ---------------------------------------------
  3524. INT 33 - MS MOUSE - DEFINE MICKEY/PIXEL RATIO
  3525.     AX = 000Fh
  3526.     CX = number of mickeys per 8 pixels horizontally
  3527.     DX = number of mickeys per 8 pixels vertically
  3528. ---------------------------------------------
  3529. INT 33 - MS MOUSE - DEFINE SCREEN REGION FOR UPDATING
  3530.     AX = 0010h
  3531.     CX,DX = X,Y coordinates of upper left corner
  3532.     SI,DI = X,Y coordinates of lower right corner
  3533. Note: mouse cursor is hidden during updating, and needs to be explicitly turned
  3534.     on again
  3535. ---------------------------------------------
  3536. INT 33 - PCMOUSE - SET LARGE GRAPHICS CURSOR BLOCK
  3537.     AX = 0012h
  3538.     BH = cursor width in words
  3539.     CH = rows in cursor
  3540.     BL = horizontal hot spot (-16 to 16)
  3541.     CL = vertical hot spot (-16 to 16)
  3542.     ES:DX -> bit map of screen and cursor maps
  3543. Return: AX = -1 if successful
  3544. ---------------------------------------------
  3545. INT 33 - MS MOUSE - DEFINE DOUBLE-SPEED THRESHOLD
  3546.     AX = 0013h
  3547.     DX = threshold speed in mickeys/second, 0 = default of 64/second
  3548. Note:    if speed exceeds threshold, the cursor's on-screen motion is doubled
  3549. ---------------------------------------------
  3550. INT 33 - MS MOUSE - EXCHANGE INTERRUPT SUBROUTINES
  3551.     AX = 0014h
  3552.     ???
  3553. ---------------------------------------------
  3554. INT 33 - MS MOUSE - RETURN DRIVER STORAGE REQUIREMENTS
  3555.     AX = 0015h
  3556. Return: BX = size of buffer needed to store driver state
  3557. ---------------------------------------------
  3558. INT 33 - MS MOUSE - SAVE DRIVER STATE
  3559.     AX = 0016h
  3560.     ES:DX -> buffer for driver state
  3561. ---------------------------------------------
  3562. INT 33 - MS MOUSE - RESTORE DRIVER STATE
  3563.     AX = 0017h
  3564.     ES:DX -> buffer containing saved state
  3565. ---------------------------------------------
  3566. INT 33 - MS MOUSE - DEFINE DISPLAY PAGE NUMBER
  3567.     AX = 001Dh
  3568.     ???
  3569. ---------------------------------------------
  3570. INT 33 - MS MOUSE - RETURN DISPLAY PAGE NUMBER
  3571.     AX = 001Eh
  3572. Return: ???
  3573. ---------------------------------------------
  3574. INT 33 - PCMOUSE - GET MSMOUSE STORAGE REQUIREMENTS
  3575.     AX = 0042h
  3576. Return: AX = FFFFh successful
  3577.         BX = buffer size in bytes for functions 50h and 52h
  3578.        = 0     MSMOUSE not installed
  3579.        = 42h functions 42h, 50h, and 52h not supported
  3580. ---------------------------------------------
  3581. INT 33 - PCMOUSE - SAVE MSMOUSE STATE
  3582.     AX = 0050h
  3583.     BX = buffer size
  3584.     ES:DX -> buffer
  3585. Return: AX = FFFFh if successful
  3586. ---------------------------------------------
  3587. INT 33 - PCMOUSE - RESTORE MSMOUSE STATE
  3588.     AX = 0052h
  3589.     BX = buffer size
  3590.     ES:DX -> buffer
  3591. Return: AX = FFFFh if successful
  3592. ---------------------------------------------
  3593. INT 40 - Hard disk - Relocated Floppy Handler (original INT 13h)
  3594. ---------------------------------------------
  3595. INT 41 - FIXED DISK PARAMETERS (XT,AT,XT2,XT286,PS except ESDI disks)
  3596.     WORD    cylinders
  3597.     BYTE    heads
  3598.     WORD    starting reduced write current cylinder (XT only, 0 for others)
  3599.     WORD    starting write pre-comp cylinder
  3600.     BYTE    maximum ECC burst length
  3601.     BYTE    control byte
  3602.            bits 0-2: drive option (XT only, 0 for others)
  3603.            bit 3:    set if more than 8 heads
  3604.            bit 4:    always 0
  3605.            bit 5:    set if manufacturer's defect map on max cylinder+1
  3606.            bit 6:    disable ECC retries
  3607.            bit 7:    disable access retries
  3608.     BYTE    standard timeout (XT only, 0 for others)
  3609.     BYTE    formatting timeout (XT only, 0 for others)
  3610.     BYTE    timeout for checking drive (XT only, 0 for others)
  3611.     WORD    landing zone (AT/PS2)
  3612.     BYTE    sectors/track (AT/PS2)
  3613.     BYTE    0
  3614. ---------------------------------------------
  3615. INT 42 - EGA/VGA/PS - Relocated (by EGA) Video Handler (original INT 10h)
  3616. ---------------------------------------------
  3617. INT 42 - Z100 - ???
  3618. ---------------------------------------------
  3619. INT 43 - EGA/VGA/PS - User font table
  3620. ---------------------------------------------
  3621. INT 44 - EGA/VGA/CONV/PS - EGA/PCjr fonts, characters 00h to 7Fh
  3622. ---------------------------------------------
  3623. INT 44 - Novell NetWare - HIGH-LEVEL LANGUAGE API
  3624. ---------------------------------------------
  3625. INT 44 - Z100 - ???
  3626. ---------------------------------------------
  3627. INT 45 - Z100 - ???
  3628. ---------------------------------------------
  3629. INT 46 - Secondary Fixed Disk Params (see INT 41h) (AT,XT286,PS except ESDI)
  3630. ---------------------------------------------
  3631. INT 46 - Z100 - ???
  3632. ---------------------------------------------
  3633. INT 47 - reserved
  3634. ---------------------------------------------
  3635. INT 48 - PCjr - Cordless Keyboard Translation
  3636. ---------------------------------------------
  3637. INT 49 - PCjr - Non-keyboard Scan Code Translation Table
  3638. ---------------------------------------------
  3639. INT 4A - AT/CONV/PS - User Alarm
  3640.     Invoked by BIOS when real-time clock alarm occurs
  3641. ---------------------------------------------
  3642. INT 4B - reserved
  3643. ---------------------------------------------
  3644. INT 4C - reserved
  3645. ---------------------------------------------
  3646. INT 4D - reserved
  3647. ---------------------------------------------
  3648. INT 4E - reserved
  3649. ---------------------------------------------
  3650. INT 4F - reserved
  3651. ---------------------------------------------
  3652. INT 50 to 57 - IRQ0-IRQ7 relocated by DESQview
  3653. ---------------------------------------------
  3654. INT 50 to 57 - IRQ0-IRQ7 relocated by IBM 3278 emulation control program     
  3655. ---------------------------------------------
  3656. INT 58 - reserved
  3657. ---------------------------------------------
  3658. INT 59 - GSS Computer Graphics Interface (GSS*CGI)
  3659.     DS:DX -> block of 5 array pointers
  3660. Return:    CF set on error
  3661.         AX = error code
  3662.     CF clear if successful
  3663.         AX = return code
  3664. Note: INT 59 is the means by which GSS*CGI language bindings communicate with
  3665.       GSS*CGI device drivers and the GSS*CGI device driver controller.    also
  3666.       used by the IBM Graphic Development Toolkit
  3667. ---------------------------------------------
  3668. INT 5A - Cluster adapter BIOS entry address
  3669.     ???
  3670. ---------------------------------------------
  3671. INT 61 - reserved for user interrupt
  3672. ---------------------------------------------
  3673. INT 62 - reserved for user interrupt
  3674. ---------------------------------------------
  3675. INT 63 - reserved for user interrupt
  3676. ---------------------------------------------
  3677. INT 64 - reserved for user interrupt
  3678. ---------------------------------------------
  3679. INT 65 - reserved for user interrupt
  3680. ---------------------------------------------
  3681. INT 66 - reserved for user interrupt
  3682. ---------------------------------------------
  3683. INT 67 - LIM EMS - GET MANAGER STATUS
  3684.     AH = 40h
  3685. Return: AH = status
  3686.         00h successful
  3687.         80h internal error
  3688.         81h hardware malfunction
  3689.         84h undefined function requested by application
  3690. Note: this call can be used only after establishing that the EMS driver
  3691.       is in fact present
  3692. ---------------------------------------------
  3693. INT 67 - LIM EMS - GET PAGE FRAME SEGMENT
  3694.     AH = 41h
  3695. Return: AH = 00h function successful
  3696.         BX = segment of page frame
  3697.     AH = error code (see AH=40h above)
  3698. ---------------------------------------------
  3699. INT 67 - LIM EMS - GET NUMBER OF PAGES
  3700.     AH = 42h
  3701. Return: AH = 00h function successful
  3702.         BX = number of unallocated pages
  3703.         DX = total number of pages
  3704.     AH = error code (see AH=40h above)
  3705. ---------------------------------------------
  3706. INT 67 - LIM EMS - GET HANDLE AND ALLOCATE MEMORY
  3707.     AH = 43h
  3708.     BX = number of logical pages to allocate
  3709. Return: AH = status
  3710.         00h function successful
  3711.         DX = handle
  3712.         80h internal error
  3713.         81h hardware malfunction
  3714.         84h undefined function requested
  3715.         85h no more handles available
  3716.         87h more pages requested than physically exist
  3717.         88h more pages requested than currently available
  3718.         89h zero pages requested
  3719. ---------------------------------------------
  3720. INT 67 - LIM EMS - MAP MEMORY
  3721.     AH = 44h
  3722.     AL = physical page number (0-3)
  3723.     BX = logical page number
  3724.     DX = handle
  3725. Return: AH = status
  3726.         00h function successful
  3727.         80h internal error
  3728.         81h hardware malfunction
  3729.         83h invalid handle
  3730.         84h undefined function requested
  3731.         8Ah invalid logical page number
  3732.         8Bh illegal physical-page number
  3733. ---------------------------------------------
  3734. INT 67 - LIM EMS - RELEASE HANDLE AND MEMORY
  3735.     AH = 45h
  3736.     DX = EMM handle
  3737. Return: AH = status
  3738.         00h successful
  3739.         80h internal error
  3740.         81h hardware malfunction
  3741.         83h invalid handle
  3742.         84h undefined function requested
  3743.         86h error in save or restore of mapping context
  3744. ---------------------------------------------
  3745. INT 67 - LIM EMS - GET EMM VERSION
  3746.     AH = 46h
  3747. Return: AH = status
  3748.         00h successful
  3749.         AL = EMM version number
  3750.         80h internal error
  3751.         81h hardware malfunction
  3752.         84h undefined function requested
  3753. ---------------------------------------------
  3754. INT 67 - LIM EMS - SAVE MAPPING CONTEXT
  3755.     AH = 47h
  3756.     DX = handle
  3757. Return: AH = status
  3758.         00h successful
  3759.         80h internal error
  3760.         81h hardware malfunction
  3761.         83h invalid handle
  3762.         84h undefined function requested
  3763.         8Ch page-mapping hardware state save area is full
  3764.         8Dh save of mapping context failed
  3765. ---------------------------------------------
  3766. INT 67 - LIM EMS - RESTORE MAPPING CONTEXT
  3767.     AH = 48h
  3768.     DX = handle
  3769. Return: AH = status
  3770.         00h successful
  3771.         80h internal error
  3772.         81h hardware malfunction
  3773.         83h invalid handle
  3774.         84h undefined function requested
  3775.         8Eh restore of mapping context failed
  3776. ---------------------------------------------
  3777. INT 67 - LIM EMS - reserved - GET I/O PORT ADDRESSES
  3778.     AH = 49h
  3779. Note: defined in EMS 3.0, but undocumented in EMS 3.2
  3780. ---------------------------------------------
  3781. INT 67 - LIM EMS - reserved - GET TRANSLATION ARRAY
  3782.     AH = 4Ah
  3783. Note: defined in EMS 3.0, but undocumented in EMS 3.2
  3784. ---------------------------------------------
  3785. INT 67 - LIM EMS - GET NUMBER OF EMM HANDLES
  3786.     AH = 4Bh
  3787. Return: AH = status
  3788.         00h successful
  3789.         BX = number of EMM handles
  3790.         80h internal error
  3791.         81h hardware malfunction
  3792.         83h invalid handle
  3793.         84h undefined function requested
  3794. ---------------------------------------------
  3795. INT 67 - LIM EMS - GET PAGES OWNED BY HANDLE
  3796.     AH = 4Ch
  3797.     DX = EMM handle
  3798. Return: AH = status
  3799.         00h successful
  3800.         BX = number of logical pages
  3801.         80h internal error
  3802.         81h hardware malfunction
  3803.         83h invalid handle
  3804.         84h undefined function requested
  3805. ---------------------------------------------
  3806. INT 67 - LIM EMS - GET PAGES FOR ALL HANDLES
  3807.     AH = 4Dh
  3808.     ES:DI -> array to receive information
  3809. Return: AH = status
  3810.         00h successful
  3811.         BX = number of active EMM handles
  3812.         array filled with 2-word entries, consisting of a handle
  3813.           and the number of pages allocated to that handle
  3814.         80h internal error
  3815.         81h hardware malfunction
  3816.         84h undefined function requested
  3817. ---------------------------------------------
  3818. INT 67 - LIM EMS - GET OR SET PAGE MAP
  3819.     AH = 4Eh
  3820.     AL = 00h if getting mapping registers
  3821.          01h if setting mapping registers
  3822.          02h if getting and setting mapping registers at once
  3823.          03h if getting size of page-mapping array
  3824.     DS:SI -> array holding information (AL=01/02)
  3825.     ES:DI -> array to receive information (AL=00/02)
  3826. Return: AH = status
  3827.         00h successful
  3828.         AL = bytes in page-mapping array (subfunction 03h only)
  3829.         array pointed to by ES:DI receives mapping info (AL=00/02)
  3830.         80h internal error
  3831.         81h hardware malfunction
  3832.         84h undefined function requested
  3833.         8Fh undefined subfunction parameter
  3834.         A3h contents of source array corrupted (EMS 4.0?)
  3835. Note: this function was designed to be used by multitasking operating systems
  3836.       and should not ordinarily be used by appplication software.
  3837. ---------------------------------------------
  3838. INT 67 - LIM EMS 4.0 - GET/SET PARTIAL PAGE MAP
  3839.     AH = 4Fh
  3840.     AL = subfunction
  3841.         00h get partial page map
  3842.            DS:SI -> structure containing list of segments whose mapping
  3843.             contexts are to be saved
  3844.            ES:DI -> array to receive page map
  3845.         01h set partial page map
  3846.            DS:SI -> structure containing saved partial page map
  3847.         02h get size of partial page map
  3848.            BX = number of mappable segments in the partial map to be saved
  3849. Return: AH = status
  3850.         00h successful
  3851.         80h internal error
  3852.         81h hardware malfunction
  3853.         84h undefined function requested
  3854.         8Bh one of specified segments is not mappable
  3855.         8Fh undefined subfunction parameter
  3856.         A3h contents of partial page map corrupted or count of mappable
  3857.         segments exceeds total number of mappable segments in system
  3858.     AL = size of partial page map for subfunction 02h
  3859. ---------------------------------------------
  3860. INT 67 - LIM EMS 4.0 - MAP/UNMAP MULTIPLE HANDLE PAGES
  3861.     AH = 50h
  3862.     AL = subfunction
  3863.         00h
  3864.         01h
  3865.     DX = handle
  3866.     CX = number of entries in array
  3867.     DS:SI -> mapping array
  3868. Return: AH = status
  3869.         00h successful
  3870.         80h internal error
  3871.         81h hardware malfunction
  3872.         83h invalid handle
  3873.         84h undefined function requested
  3874.         8Ah one or more logical pages are invalid
  3875.         8Bh one or more physical pages are invalid
  3876.         8Fh invalid subfunction
  3877. ---------------------------------------------
  3878. INT 67 - LIM EMS 4.0 - REALLOCATE PAGES
  3879.     AH = 51h
  3880.     DX = handle
  3881.     BX = number of pages to be allocated to handle
  3882. Return: BX = actual number of pages allocated to handle
  3883.     AH = status
  3884.         00h successful
  3885.         80h internal error
  3886.         81h hardware malfunction
  3887.         83h invalid handle
  3888.         84h undefined function requested
  3889.         87h more pages requested than present in system
  3890.         88h more pages requested than currently available
  3891. ---------------------------------------------
  3892. INT 67 - LIM EMS 4.0 - GET/SET HANDLE ATTRIBUTES
  3893.     AH = 52h
  3894.     AL = subfunction
  3895.         00h get handle attributes
  3896.         01h set handle attributes
  3897.            BL = new attribute (see returned AL)
  3898.         02h get attribute capability
  3899.     DX = handle
  3900. Return: AL = attribute (for subfunction 00h)
  3901.         00h handle is volatile
  3902.         01h handle is nonvolatile
  3903.     AL = attribute capability (for subfunction 02h)
  3904.         00h only volatile handles supported
  3905.         01h both volatile and non-volatile supported
  3906.     AH = status
  3907.         00h successful
  3908.         80h internal error
  3909.         81h hardware malfunction
  3910.         83h invalid handle
  3911.         84h undefined function requested
  3912.         8Fh undefined subfunction
  3913.         90h undefined attribute type
  3914.         91h feature not supported
  3915. ---------------------------------------------
  3916. INT 67 - LIM EMS 4.0 - GET/SET HANDLE NAME
  3917.     AH = 53h
  3918.     AL = subfunction
  3919.         00h get handle name
  3920.            ES:DI -> 8-byte handle name array
  3921.         01h set handle name
  3922.            DS:SI -> 8-byte handle name
  3923.     DX = handle
  3924. Return: AH = status
  3925.         00h successful
  3926.         80h internal error
  3927.         81h hardware malfunction
  3928.         83h invalid handle
  3929.         84h undefined function requested
  3930.         8Fh undefined subfunction
  3931.         A1h duplicate handle name
  3932. ---------------------------------------------
  3933. INT 67 - LIM EMS 4.0 - GET HANDLE DIRECTORY
  3934.     AH = 54h
  3935.     AL = subfunction
  3936.         00h get handle directory
  3937.            ES:DI -> buffer for handle directory
  3938.         01h search for named handle
  3939.            DS:SI -> 8-byte name
  3940.         02h get total number of handles
  3941. Return: AL = number of entries in handle directory (subfunction 00h)
  3942.     DX = value of named handle (subfunction 01h)
  3943.     BX = total number of handles (subfunction 02h)
  3944.     AH = status
  3945.         00h successful
  3946.         80h internal error
  3947.         81h hardware malfunction
  3948.         84h undefined function requested
  3949.         8Fh undefined subfunction
  3950.         A0h no such handle name
  3951.         A1h a handle found had no name
  3952. ---------------------------------------------
  3953. INT 67 - LIM EMS 4.0 - ALTER PAGE MAP AND JUMP
  3954.     AH = 55h
  3955.     AL = subfunction
  3956.         00h physical page numbers provided by caller
  3957.         01h segment addresses provided by caller
  3958.     DX = handle
  3959.     DS:SI -> structure containing map and jump address
  3960. Return: (at target address unless error)
  3961.     AH = status
  3962.         00h successful
  3963.         80h internal error
  3964.         81h hardware failure
  3965.         83h invalid handle
  3966.         84h undefined function requested
  3967.         8Ah invalid logical page number encountered
  3968.         8Bh invalid physical page number encountered
  3969.         8Fh invalid subfunction
  3970. ---------------------------------------------
  3971. INT 67 - LIM EMS 4.0 - ALTER PAGE MAP AND CALL
  3972.     AH = 56h
  3973.     AL = subfunction
  3974.         00h physical page numbers provided by caller
  3975.            DX = handle
  3976.            DS:SI -> structure containing page map and call address
  3977.         01h segment addresses provided by caller
  3978.            DX = handle
  3979.            DS:SI -> structure containing page map and call address
  3980.         02h get page map stack space required
  3981. Return: (if successful, the target address is called.  Use a RETF to return and
  3982.      restore mapping context)
  3983.     BX = stack space required (subfunction 02h)
  3984.     AH = status
  3985.         00h successful
  3986.         80h internal error
  3987.         81h hardware failure
  3988.         83h invalid handle
  3989.         84h undefined function requested
  3990.         8Ah invalid logical page number encountered
  3991.         8Bh invalid physical page number encountered
  3992.         8Fh undefined subfunction
  3993. ---------------------------------------------
  3994. INT 67 - LIM EMS 4.0 - MOVE/EXCHANGE MEMORY REGION
  3995.     AH = 57h
  3996.     AL = subfunction
  3997.         00h move memory region
  3998.         01h exchange memory region
  3999.     DS:SI -> structure describing source and destination
  4000. Return: AH = status
  4001.         00h successful
  4002.         80h internal error
  4003.         81h hardware failure
  4004.         83h invalid handle
  4005.         84h undefined function requested
  4006.         8Ah invalid logical page number encountered
  4007.         8Fh undefined subfunction
  4008.         92h successful, but a portion of the source region has been
  4009.         overwritten
  4010.         93h length of source or destination region exceeds length of region
  4011.         allocated to either source or destination handle
  4012.         94h conventional and expanded memory regions overlap
  4013.         95h offset within logical page exceeds size of logical page
  4014.         96h region length exceeds 1M
  4015.         97h source and destination EMS regions have same handle and overlap
  4016.         98h memory source or destination type undefined
  4017.         A2h attempted to wrap around 1M conventional address space
  4018. ---------------------------------------------
  4019. INT 67 - LIM EMS 4.0 - GET MAPPABLE PHYSICAL ADDRESS ARRAY
  4020.     AH = 58h
  4021.     AL = subfunction
  4022.         00h get mappable physical address array
  4023.            ES:DI -> buffer to be filled with array
  4024.         01h get number of entries in m.p.a. array
  4025. Return: CX = number of entries in array
  4026.     AH = status
  4027.         00h successful
  4028.         80h internal error
  4029.         81h hardware failure
  4030.         84h undefined function requested
  4031.         8Fh undefined subfunction
  4032. ---------------------------------------------
  4033. INT 67 - LIM EMS 4.0 - GET EXPANDED MEMORY HARDWARE INFORMATION
  4034.     AH = 59h
  4035.     AL = subfunction
  4036.         00h get hardware configuration array
  4037.            ES:DI -> buffer to be filled with array
  4038.         01h get unallocated raw page count
  4039. Return: BX = unallocated raw pages (subfunction 01h)
  4040.     DX = total raw pages (subfunction 01h)
  4041.     AH = status
  4042.         00h successful
  4043.         80h internal error
  4044.         81h hardware failure
  4045.         84h undefined function requested
  4046.         8Fh undefined subfunction
  4047.         A4h access denied by operating system
  4048. Note: subfunction 00h is for use by operating systems only, and can be
  4049.       enabled or disabled at any time by the operating system
  4050. ---------------------------------------------
  4051. INT 67 - LIM EMS 4.0 - ALLOCATE STANDARD/RAW PAGES
  4052.     AH = 5Ah
  4053.     AL = subfunction
  4054.         00h allocate standard pages
  4055.         01h allocate raw pages
  4056.     BX = number of pages to allocate
  4057. Return: DX = handle
  4058.     AH = status
  4059.         00h successful
  4060.         80h internal error
  4061.         81h hardware failure
  4062.         84h undefined function requested
  4063.         85h no more handles available
  4064.         87h insufficient memory pages in system
  4065.         88h insufficient memory pages available
  4066.         8Fh undefined subfunction
  4067. ---------------------------------------------
  4068. INT 67 - LIM EMS 4.0 - ALTERNATE MAP REGISTER SET
  4069.     AH = 5Bh
  4070.     AL = subfunction
  4071.         00h get alternate map register set
  4072.         01h set alternate map register set
  4073.            BL = new alternate map register set number
  4074.            ES:DI -> map register context save area if BL=0
  4075.         02h get alternate map save array size
  4076.         03h allocate alternate map register set
  4077.         04h deallocate alternate map register set
  4078.            BL = number of alternate map register set
  4079. Return: BL = current active alternate map register set number if nonzero (AL=0)
  4080.     ES:DI -> map register context save area if BL=0 (AL=0)
  4081.     DX = array size in bytes (subfunction 02h)
  4082.     BL = number of alternate map register set; zero if not supported (AL=3)
  4083.     AH = status
  4084.         00h successful
  4085.         80h internal error
  4086.         81h hardware malfunction
  4087.         84h undefined function requested
  4088.         8Fh undefined subfunction
  4089.         9Ah specified alternate map register set not supported
  4090.         9Bh all alternate map register sets currently allocated
  4091.         9Ch alternate map register sets not supported
  4092.         9Dh undefined or unallocated alternate map register set
  4093.         A3h source array corrupted
  4094.         A4h operating system denied access
  4095. Note: this function is for use by operating systems only, and can be
  4096.       enabled or disabled at any time by the operating system
  4097. ---------------------------------------------
  4098. INT 67 - LIM EMS 4.0 - ALTERNATE MAP REGISTER SET - DMA REGISTERS
  4099.     AH = 5Bh
  4100.     AL = subfunction
  4101.         05h allocate DMA register set
  4102.         06h enable DMA on alternate map register set
  4103.            BL = DMA register set number
  4104.            DL = DMA channel number
  4105.         07h disable DMA on alternate map register set
  4106.            BL = DMA register set number
  4107.         08h deallocate DMA register set
  4108.            BL = DMA register set number
  4109. Return: BL = DMA register set number; zero if not supported (subfunction 05h)
  4110.     AH = status
  4111.         00h successful
  4112.         80h internal error
  4113.         81h hardware malfunction
  4114.         84h undefined function requested
  4115.         8Fh undefined subfunction
  4116.         9Ah specified DMA register set not supported
  4117.         9Bh all DMA register sets currently allocated
  4118.         9Ch alternate DMA sets not supported
  4119.         9Dh undefined or unallocated DMA register set
  4120.         9Eh dedicated DMA channels not supported
  4121.         9Fh specified dedicated DMA channel not supported
  4122.         A3h source array corrupted
  4123.         A4h operating system denied access
  4124. Note: this function is for use by operating systems only, and can be
  4125.       enabled or disabled at any time by the operating system
  4126. ---------------------------------------------
  4127. INT 67 - LIM EMS 4.0 - PREPARE EXPANDED MEMORY HARDWARE FOR WARM BOOT
  4128.     AH = 5Ch
  4129. Return: AH = status
  4130.         00h successful
  4131.         80h internal error
  4132.         81h hardware malfunction
  4133.         84h undefined function requested
  4134. ---------------------------------------------
  4135. INT 67 - LIM EMS 4.0 - ENABLE/DISABLE OS FUNCTION SET FUNCTIONS
  4136.     AH = 5Dh
  4137.     AL = subfunction
  4138.         00h enable OS Function Set
  4139.         01h disable OS Function Set
  4140.         02h return access key (resets memory manager, returns access key at
  4141.         next invocation)
  4142.     BX,CX = access key returned by first invocation
  4143. Return: BX,CX = access key, returned only on first invocation of function
  4144.     AH = status
  4145.         00h successful
  4146.         80h internal error
  4147.         81h hardware malfunction
  4148.         84h undefined function requested
  4149.         8Fh undefined subfunction
  4150.         A4h operating system denied access
  4151. ---------------------------------------------
  4152. INT 67 - EEMS - GET PHYSICAL WINDOW ARRAY
  4153.     AH = 60h
  4154.     ES:DI -> buffer
  4155. Return: AH = status
  4156.     AL = number of entries
  4157.     buffer at ES:DI filled
  4158. ---------------------------------------------
  4159. INT 67 - EEMS - GENERIC ACCELERATOR CARD SUPPORT
  4160.     AH = 61h
  4161.     ???
  4162. Return: ???
  4163. Note: can be used by accelerator card manufacturer to flush RAM cache, ensuring
  4164.       that the cache accurately reflects what the processor would see without
  4165.       the cache.
  4166. ---------------------------------------------
  4167. INT 67 - EEMS - GET ADDRESSES OF ALL PAGE FRAMES IN SYSTEM
  4168.     AH = 68h
  4169.     ES:DI -> buffer
  4170. Return: AH = status
  4171.     AL = number of entries
  4172.     buffer at ES:DI filled
  4173. Note: equivalent to LIM 4.0 function 58h
  4174. ---------------------------------------------
  4175. INT 67 - EEMS - MAP PAGE INTO FRAME
  4176.     AH = 69h
  4177.     AL = frame number
  4178.     BX = page number
  4179.     DX = handle
  4180. Return: AH = status
  4181. Note: similar to EMS function 44h
  4182. ---------------------------------------------
  4183. INT 67 - EEMS - PAGE MAPPING
  4184.     AH = 6Ah
  4185.     AL = subfunction
  4186.         00h save partial page map
  4187.         CH = first page frame
  4188.         CL = number of frames
  4189.         ES:DI -> buffer which is to be filled
  4190.         01h restore partial page map
  4191.         CH = first page frame
  4192.         CL = number of frames
  4193.         DI:SI -> previously saved page map
  4194.         02h save and restore partial page map
  4195.         CH = first page frame
  4196.         CL = number of frames
  4197.         ES:DI = buffer for current page map
  4198.         DI:SI = new page map
  4199.         03h get size of save array
  4200.         CH = first page frame
  4201.         CL = number of frames
  4202.         Return: AL = size of array in bytes
  4203.         04h switch to standard map register setting
  4204.         05h switch to alternate map register setting
  4205.         06h deallocate pages mapped to frames in conventional memory
  4206.         CH = first page frame
  4207.         CL = number of frames
  4208. Return: AH = status
  4209. Note: similar to EMS function 4Eh, except that a subrange of pages can
  4210.       be specified
  4211. ---------------------------------------------
  4212.  
  4213. ---------------------------------------------
  4214. INT 80 - reserved for BASIC
  4215. ---------------------------------------------
  4216. INT 81 - reserved for BASIC
  4217. ---------------------------------------------
  4218. INT 82 - reserved for BASIC
  4219. ---------------------------------------------
  4220. INT 83 - reserved for BASIC
  4221. ---------------------------------------------
  4222. INT 84 - reserved for BASIC
  4223. ---------------------------------------------
  4224. INT 85 - reserved for BASIC
  4225. ---------------------------------------------
  4226. INT 86 - Relocated (by NETBIOS) INT 18
  4227. ---------------------------------------------
  4228. INT 86 to F0 - used by BASIC while in interpreter
  4229. ---------------------------------------------
  4230. INT E0 - CP/M-86 function calls
  4231. ---------------------------------------------
  4232. INT EF - GEM - INTERFACE
  4233.     CX = 0473h
  4234.     DS:DX -> GEM parameter block
  4235. ---------------------------------------------
  4236. INT F0 - used by BASIC while in interpreter
  4237. ---------------------------------------------
  4238. INT F1 - reserved for user interrupt
  4239. ---------------------------------------------
  4240. INT F2 - reserved for user interrupt
  4241. ---------------------------------------------
  4242. INT F3 - reserved for user interrupt
  4243. ---------------------------------------------
  4244. INT F4 - reserved for user interrupt
  4245. ---------------------------------------------
  4246. INT F5 - reserved for user interrupt
  4247. ---------------------------------------------
  4248. INT F6 - reserved for user interrupt
  4249. ---------------------------------------------
  4250. INT F7 - reserved for user interrupt
  4251. ---------------------------------------------
  4252. INT F8 - 10 ms INTERVAL TIMER (TANDY???)
  4253. ---------------------------------------------
  4254. INT F9 - reserved for user interrupt
  4255. ---------------------------------------------
  4256. INT FA - USART READY (RS-232C) (TANDY???)
  4257. ---------------------------------------------
  4258. INT FB - USART Rx READY (keyboard) (TANDY???)
  4259. ---------------------------------------------
  4260. INT FC - reserved for user interrupt
  4261. ---------------------------------------------
  4262. INT FD - reserved for user interrupt
  4263. ---------------------------------------------
  4264. INT FE - AT/XT286/PS50+ - destroyed by return from protected mode
  4265. ---------------------------------------------
  4266. INT FF - AT/XT286/PS50+ - destroyed by return from protected mode
  4267. ---------------------------------------------
  4268. INT FF - Z100 - WARM BOOT
  4269. ---------------------------------------------
  4270.  
  4271.  
  4272.  
  4273.  
  4274.