home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / INTERUP2.ZIP / INTERRUP.LST next >
Encoding:
File List  |  1988-01-30  |  147.6 KB  |  4,071 lines

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