home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / INTER34A.ZIP / INTERRUP.C < prev    next >
Encoding:
Text File  |  1993-04-03  |  308.7 KB  |  8,229 lines

  1. Interrupt List, part 3 of 8
  2. This compilation is Copyright (c) 1989,1990,1991,1992,1993 Ralf Brown
  3. --------B-1B---------------------------------
  4. INT 1B C - KEYBOARD - CONTROL-BREAK HANDLER
  5. Desc:    this interrupt is automatically called when INT 09 determines that
  6.       Control-Break has been pressed
  7. Note:    normally points to a short routine in DOS which sets the Ctrl-C flag,
  8.       thus invoking INT 23h the next time DOS checks for Ctrl-C.
  9. SeeAlso: INT 23
  10. --------B-1C---------------------------------
  11. INT 1C - TIME - SYSTEM TIMER TICK
  12. Desc:    this interrupt is automatically called on each clock tick by the INT 08
  13.       handler
  14. Notes:    this is the preferred interrupt to chain when a program needs to be
  15.       invoked regularly
  16.     not available on NEC 9800-series PCs
  17. SeeAlso: INT 08
  18. --------B-1D---------------------------------
  19. INT 1D - SYSTEM DATA - VIDEO PARAMETER TABLES
  20. Note:    default parameter table at F000h:F0A4h for 100% compatible BIOSes
  21. SeeAlso: INT 10/AH=00h
  22.  
  23. Format of video parameters:
  24. Offset    Size    Description
  25.  00h 16 BYTEs    6845 register values for modes 00h and 01h
  26.  10h 16 BYTEs    6845 register values for modes 02h and 03h
  27.  20h 16 BYTEs    6845 register values for modes 04h and 05h
  28.  30h 16 BYTEs    6845 register values for modes 06h and 07h
  29.  40h    WORD    bytes in video buffer for modes 00h and 01h
  30.  42h    WORD    bytes in video buffer for modes 02h and 03h
  31.  44h    WORD    bytes in video buffer for modes 04h and 05h
  32.  46h    WORD    bytes in video buffer for modes 06h and 07h
  33.  48h  8 BYTEs    columns on screen for each of modes 00h through 07h
  34.  50h  8 BYTEs    CRT controller mode bytes for each of modes 00h through 07h
  35. --------B-1E---------------------------------
  36. INT 1E - SYSTEM DATA - DISKETTE PARAMETERS
  37. Note:    default parameter table at F000h:EFC7h for 100% compatible BIOSes
  38. SeeAlso: INT 13/AH=0Fh,INT 41
  39.  
  40. Format of diskette parameter table:
  41. Offset    Size    Description
  42.  00h    BYTE    first specify byte
  43.         bits 7-4: step rate
  44.         bits 3-0: head unload time (0Fh = 240 ms)
  45.  01h    BYTE    second specify byte
  46.         bits 7-1: head load time (01h = 4 ms)
  47.         bit    0: non-DMA mode (always 0)
  48.  02h    BYTE    delay until motor turned off (in clock ticks)
  49.  03h    BYTE    bytes per sector (00h = 128, 01h = 256, 02h = 512, 03h = 1024)
  50.  04h    BYTE    sectors per track
  51.  05h    BYTE    length of gap between sectors (2Ah for 5.25", 1Bh for 3.5")
  52.  06h    BYTE    data length (ignored if bytes-per-sector field nonzero)
  53.  07h    BYTE    gap length when formatting (50h for 5.25", 6Ch for 3.5")
  54.  08h    BYTE    format filler byte (default F6h)
  55.  09h    BYTE    head settle time in milliseconds
  56.  0Ah    BYTE    motor start time in 1/8 seconds
  57. --------B-1F---------------------------------
  58. INT 1F - SYSTEM DATA - 8x8 GRAPHICS FONT
  59. Desc:    this vector points at 1024 bytes of graphics data, 8 bytes for each
  60.       character 80h-FFh
  61. Note:    graphics data for characters 00h-7Fh stored at F000h:FA6Eh in 100%
  62.       compatible BIOSes
  63. SeeAlso: INT 10/AX=5000h,INT 43
  64. --------O-20---------------------------------
  65. INT 20 - Minix - SEND/RECEIVE MESSAGE
  66.     AX = process ID of other process
  67.     BX -> message
  68.     CX = 1 send
  69.          2 receive
  70.          3 send&receive
  71. Note:    the message contains the system call number (numbered as in V7 
  72.       Unix(tm)) and the call parameters
  73. --------D-20---------------------------------
  74. INT 20 - DOS 1+ - TERMINATE PROGRAM
  75.     CS = PSP segment
  76. Return: never
  77. Note:    (see INT 21/AH=00h)
  78. SeeAlso: INT 21/AH=00h,INT 21/AH=4Ch
  79. --------G-20---------------------------------
  80. INT 20 - COMTROL HOSTESS i/ISA DEBUGGER - INVOKE FIRMWARE DEBUGGER
  81.     ???
  82. Return: ???
  83. SeeAlso: INT 21"COMTROL HOSTESS"
  84. --------G-21---------------------------------
  85. INT 21 - COMTROL HOSTESS i/ISA DEBUGGER - GET SEGMENT FOR CONTROL PROGRAM USE
  86.     ???
  87. Return: AX = first segment available for control program use
  88. SeeAlso: INT 20"COMTROL HOSTESS",INT 22"COMTROL HOSTESS"
  89. --------D-2100-------------------------------
  90. INT 21 - DOS 1+ - TERMINATE PROGRAM
  91.     AH = 00h
  92.     CS = PSP segment
  93. Notes:    Microsoft recomments using INT 21/AH=4Ch for DOS 2+
  94.     execution continues at address stored in INT 22 after DOS performs
  95.       whatever cleanup it needs to do
  96.     if the PSP is its own parent, the process's memory is not freed; if
  97.       INT 22 additionally points into the terminating program, the
  98.       process is effectively NOT terminated
  99.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  100. SeeAlso: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22
  101. --------D-2101-------------------------------
  102. INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
  103.     AH = 01h
  104. Return: AL = character read
  105. Notes:    ^C/^Break are checked, and INT 23 executed if read
  106.     character is echoed to standard output
  107.     standard input is always the keyboard and standard output the screen
  108.       under DOS 1.x, but they may be redirected under DOS 2+
  109. SeeAlso: AH=06h,AH=07h,AH=08h,AH=0Ah
  110. --------D-2102-------------------------------
  111. INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
  112.     AH = 02h
  113.     DL = character to write
  114. Return: AL = last character output (despite the official docs which state
  115.         nothing is returned) (at least DOS 3.3-5.0)
  116. Notes:    ^C/^Break are checked, and INT 23 executed if pressed
  117.     standard output is always the screen under DOS 1.x, but may be
  118.       redirected under DOS 2+
  119.     the last character output will be the character in DL unless DL=09h
  120.       on entry, in which case AL=20h as tabs are expanded to blanks
  121. SeeAlso: AH=06h,AH=09h
  122. --------D-2103-------------------------------
  123. INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
  124.     AH = 03h
  125. Return: AL = character read
  126. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  127.     STDAUX is usually the first serial port
  128. SeeAlso: AH=04h,INT 14/AH=02h,INT E0/CL=03h
  129. --------D-2104-------------------------------
  130. INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
  131.     AH = 04h
  132.     DL = character to write
  133. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  134.     STDAUX is usually the first serial port
  135.     if STDAUX is busy, this function will wait until it becomes free
  136. SeeAlso: AH=03h,INT 14/AH=01h,INT E0/CL=04h
  137. --------D-2105-------------------------------
  138. INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
  139.     AH = 05h
  140.     DL = character to print
  141. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  142.     STDPRN is usually the first parallel port, but may be redirected under
  143.       DOS 2+
  144.     if the printer is busy, this function will wait
  145. SeeAlso: INT 17/AH=00h
  146. --------D-2106-------------------------------
  147. INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
  148.     AH = 06h
  149.     DL = character (except FFh)
  150. Return: AL = character output (despite official docs which state nothing is
  151.         returned) (at least DOS 3.3-5.0)
  152. Notes:    does not check ^C/^Break
  153.     writes to standard output, which is always the screen under DOS 1.x,
  154.       but may be redirected under DOS 2+
  155. SeeAlso: AH=02h,AH=09h
  156. --------D-2106--DLFF-------------------------
  157. INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
  158.     AH = 06h
  159.     DL = FFh
  160. Return: ZF set if no character available
  161.     ZF clear if character available
  162.         AL = character read
  163. Notes:    ^C/^Break are NOT checked
  164.     if the returned character is 00h, the user pressed a key with an
  165.       extended keycode, which will be returned by the next call of this
  166.       function
  167.     reads from standard input, which is always the keyboard under DOS 1.x,
  168.       but may be redirected under DOS 2+
  169. SeeAlso: AH=0Bh
  170. --------D-2107-------------------------------
  171. INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
  172.     AH = 07h
  173. Return: AL = character read from standard input
  174. Notes:    does not check ^C/^Break
  175.     standard input is always the keyboard under DOS 1.x, but may be
  176.       redirected under DOS 2+
  177.     if the interim console flag is set (see AX=6301h), partially-formed
  178.       double-byte characters may be returned
  179. SeeAlso: AH=01h,AH=06h,AH=08h,AH=0Ah
  180. --------D-2108-------------------------------
  181. INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
  182.     AH = 08h
  183. Return: AL = character read from standard input
  184. Notes:    ^C/^Break are checked, and INT 23 executed if detected
  185.     standard input is always the keyboard under DOS 1.x, but may be
  186.       redirected under DOS 2+
  187.     if the interim console flag is set (see AX=6301h), partially-formed
  188.       double-byte characters may be returned
  189. SeeAlso: AH=01h,AH=06h,AH=07h,AH=0Ah,AH=64h
  190. --------D-2109-------------------------------
  191. INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
  192.     AH = 09h
  193.     DS:DX -> '$'-terminated string
  194. Return: AL = 24h (the '$' terminating the string, despite official docs which
  195.         state that nothing is returned) (at least DOS 3.3-5.0)
  196. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  197.     standard output is always the screen under DOS 1.x, but may be
  198.       redirected under DOS 2+
  199.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  200. SeeAlso: AH=02h,AH=06h"OUTPUT"
  201. --------D-210A-------------------------------
  202. INT 21 - DOS 1+ - BUFFERED INPUT
  203.     AH = 0Ah
  204.     DS:DX -> buffer (see below)
  205. Return: buffer filled with user input
  206. Notes:    ^C/^Break are checked, and INT 23 is called if either detected
  207.     reads from standard input, which may be redirected under DOS 2+
  208.     if the maximum buffer size (see below) is set to 00h, this call returns
  209.       immediately without reading any input
  210. SeeAlso: AH=0Ch,INT 2F/AX=4810h
  211.  
  212. Format of input buffer:
  213. Offset    Size    Description
  214.  00h    BYTE    maximum characters buffer can hold
  215.  01h    BYTE    (input) number of chars from last input which may be recalled
  216.         (return) number of characters actually read, excluding CR
  217.  02h  N BYTEs    actual characters read, including the final carriage return
  218. --------K-210A00-----------------------------
  219. INT 21 - WCED v1.6 - INSTALLATION CHECK
  220.     AX = 0A00h
  221.     DS:DX -> 6-byte buffer whose first two bytes must be 00h
  222. Return: buffer offset 02h-05h filled with "Wced" if installed
  223. Program: WCED is a free command-line editor and history utility by Stuart
  224.       Russell
  225. SeeAlso: AH=FFh"CED"
  226. --------D-210B-------------------------------
  227. INT 21 - DOS 1+ - GET STDIN STATUS
  228.     AH = 0Bh
  229. Return: AL = 00h if no character available
  230.        = FFh if character is available
  231. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  232.     standard input is always the keyboard under DOS 1.x, but may be
  233.       redirected under DOS 2+
  234.     if the interim console flag is set (see AX=6301h), this function
  235.       returns AL=FFh if a partially-formed double-byte character is
  236.       available
  237. SeeAlso: AH=06h"INPUT",AX=4406h
  238. --------v-210B56-----------------------------
  239. INT 21 - VIRUS - "Perfume" - INSTALLATION CHECK
  240.     AX = 0B56h
  241. Return: AX = 4952h if resident
  242. SeeAlso: AX=0D20h
  243. --------D-210C-------------------------------
  244. INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
  245.     AH = 0Ch
  246.     AL = STDIN input function to execute after flushing buffer
  247.     other registers as appropriate for the input function
  248. Return: as appropriate for the specified input function
  249. Note:    if AL is not one of 01h,06h,07h,08h, or 0Ah, the buffer is flushed but
  250.       no input is attempted
  251. SeeAlso: AH=01h,AH=06h"INPUT",AH=07h,AH=08h,AH=0Ah
  252. --------D-210D-------------------------------
  253. INT 21 - DOS 1+ - DISK RESET
  254.     AH = 0Dh
  255. Notes:    writes all modified disk buffers to disk, but does not update directory
  256.       information (that is only done when files are closed or a SYNC call
  257.       is issued)
  258. SeeAlso: AX=5D01h,INT 13/AH=00h,INT 2F/AX=1120h
  259. --------v-210D20-----------------------------
  260. INT 21 - VIRUS - "Crazy Imp" - INSTALLATION CHECK
  261.     AX = 0D20h
  262. Return: AX = 1971h if resident
  263. SeeAlso: AX=0B56h,AH=30h/DX=ABCDh
  264. --------D-210E-------------------------------
  265. INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
  266.     AH = 0Eh
  267.     DL = new default drive (00h = A:, 01h = B:, etc)
  268. Return: AL = number of potentially valid drive letters
  269. Notes:    under Novell NetWare, the return value is always 32, the number of
  270.       drives that NetWare supports
  271.     under DOS 3+, the return value is the greatest of 5, the value of
  272.       LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
  273.     on a DOS 1.x/2.x single-floppy system, AL returns 2 since the floppy
  274.       may be accessed as either A: or B:
  275.     otherwise, the return value is the highest drive actually present
  276.     DOS 1.x supports a maximum of 16 drives, 2.x a maximum of 63 drives,
  277.       and 3+ a maximum of 26 drives
  278. SeeAlso: AH=19h,AH=3Bh,AH=DBh
  279. --------D-210F-------------------------------
  280. INT 21 - DOS 1+ - OPEN FILE USING FCB
  281.     AH = 0Fh
  282.     DS:DX -> unopened File Control Block (see below)
  283. Return: AL = status
  284.         00h successful
  285.         FFh file not found or access denied
  286. Notes:    (DOS 3.1+) file opened for read/write in compatibility mode
  287.     an unopened FCB has the drive, filename, and extension fields filled
  288.       in and all other bytes cleared
  289.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  290. SeeAlso: AH=10h,AH=16h,AH=3Dh
  291.  
  292. Format of File Control Block:
  293. Offset    Size    Description
  294.  -7    BYTE    extended FCB if FFh
  295.  -6   5 BYTEs    reserved
  296.  -1    BYTE    file attribute if extended FCB
  297.  00h    BYTE    drive number (0 = default, 1 = A, etc)
  298.  01h  8 BYTEs    blank-padded file name 
  299.  09h  3 BYTEs    blank-padded file extension
  300.  0Ch    WORD    current block number
  301.  0Eh    WORD    logical record size
  302.  10h    DWORD    file size
  303.  14h    WORD    date of last write (see AX=5700h)
  304.  16h    WORD    time of last write (see AX=5700h) (DOS 1.1+)
  305.  18h  8 BYTEs    reserved (see below)
  306.  20h    BYTE    record within current block
  307.  21h    DWORD    random access record number (if record size is > 64 bytes, high
  308.         byte is omitted)
  309. Note:    to use an extended FCB, you must specify the address of the FFh flag at
  310.       offset -7, rather than the address of the drive number field
  311.  
  312. Format of reserved field for DOS 1.0:
  313. Offset    Size    Description
  314.  16h    WORD    location in directory (if high byte = FFh, low byte is device
  315.         ID)
  316.  18h    WORD    number of first cluster in file
  317.  1Ah    WORD    current absolute cluster number on disk
  318.  1Ch    WORD    current relative cluster number within file
  319.         (0 = first cluster of file, 1 = second cluster, etc.)
  320.  1Eh    BYTE    dirty flag (00h = not dirty)
  321.  1Fh    BYTE    unused
  322.  
  323. Format of reserved field for DOS 1.10-1.25:
  324. Offset    Size    Description
  325.  18h    BYTE    bit 7: set if logical device
  326.         bit 6: not dirty
  327.         bits 5-0: disk number or logical device ID
  328.  19h    WORD    starting cluster number on disk
  329.  1Bh    WORD    current absolute cluster number on disk
  330.  1Dh    WORD    current relative cluster number within file
  331.  1Fh    BYTE    unused
  332.  
  333. Format of reserved field for DOS 2.x:
  334. Offset    Size    Description
  335.  18h    BYTE    bit 7: set if logical device
  336.         bit 6: set if open???
  337.         bits 5-0: ???
  338.  19h    WORD    starting cluster number on disk
  339.  1Bh    WORD    ???
  340.  1Dh    BYTE    ???
  341.  1Eh    BYTE    ???
  342.  1Fh    BYTE    ???
  343.  
  344. Format of reserved field for DOS 3.x:
  345. Offset    Size    Description
  346.  18h    BYTE    number of system file table entry for file
  347.  19h    BYTE    attributes
  348.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  349.               01 = SHARE.EXE not loaded, character device
  350.               10 = SHARE.EXE loaded, remote file
  351.               11 = SHARE.EXE loaded, local file
  352.         bits 5-0: low six bits of device attribute word
  353. ---SHARE.EXE loaded, local file (DOS 3.x and 5.0)---
  354.  1Ah    WORD    starting cluster of file on disk
  355.  1Ch    WORD    (DOS 3.x) offset within SHARE of sharing record (see AH=52h)
  356.         (DOS 5.0) unique sequence number of sharing record
  357.  1Eh    BYTE    file attribute
  358.  1Fh    BYTE    ???
  359. ---SHARE.EXE loaded, remote file---
  360.  1Ah    WORD    number of sector containing directory entry
  361.  1Ch    WORD    relative cluster within file of last cluster accessed
  362.  1Eh    BYTE    absolute cluster number of last cluster accessed
  363.  1Fh    BYTE    ???
  364. ---SHARE.EXE not loaded---
  365.  1Ah    BYTE    (low byte of device attribute word AND 0Ch) OR open mode
  366.  1Bh    WORD    starting cluster of file
  367.  1Dh    WORD    number of sector containing directory entry
  368.  1Fh    BYTE    number of directory entry within sector
  369. Note:    if FCB opened on character device, DWORD at 1Ah is set to the address
  370.       of the device driver header, then the BYTE at 1Ah is overwritten.
  371. --------D-2110-------------------------------
  372. INT 21 - DOS 1+ - CLOSE FILE USING FCB
  373.     AH = 10h
  374.     DS:DX -> File Control Block (see AH=0Fh)
  375. Return: AL = status
  376.         00h successful
  377.         FFh failed
  378. Notes:    a successful close forces all disk buffers used by the file to be
  379.       written and the directory entry to be updated
  380.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  381. SeeAlso: AH=0Fh,AH=16h,AH=3Eh
  382. --------D-2111-------------------------------
  383. INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
  384.     AH = 11h
  385.     DS:DX -> unopened FCB (see AH=0Fh), may contain '?' wildcards
  386. Return: AL = status
  387.         00h successful
  388.         [DTA] unopened FCB for first matching file
  389.         FFh no matching filename, or bad FCB
  390. Notes:    the type of the returned FCB depends on whether the input FCB was a
  391.       normal or an extended FCB
  392.     the data returned in the DTA is actually the drive number (or extended
  393.       FCB header and drive number) followed by the file's directory entry
  394.       (see below); this format happens to be compatible with an unopened
  395.       FCB
  396.     for extended FCBs with search attribute 08h, the volume label (if any)
  397.       will be returned even if the current directory is not the root dir.
  398.     DOS 3+ also allows the '*' wildcard
  399.     the search FCB must not be modified if AH=12h will be used to continue
  400.       searching; DOS 3.3 has set the following parts of the FCB:
  401.          0Ch    BYTE    ???
  402.          0Dh    WORD    directory entry number of matching file
  403.          0Fh    WORD    cluster number of current directory
  404.          11h  4 BYTEs    ???
  405.          15h    BYTE    drive number (1=A:)
  406. SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh
  407.  
  408. Format of directory entry:
  409. Offset    Size    Description
  410.  00h  8 BYTEs    blank-padded filename
  411.  08h  3 BYTEs    blank-padded file extension
  412.  0Bh    BYTE    attributes
  413.  0Ch 10 BYTEs    reserved
  414.  16h    WORD    time of creation or last update (see AX=5700h)
  415.  18h    WORD    date of creation or last update (see AX=5700h)
  416.  1Ah    WORD    starting cluster number
  417.  1Ch    DWORD    file size
  418. --------D-2112-------------------------------
  419. INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
  420.     AH = 12h
  421.     DS:DX -> unopened FCB (see AH=0Fh)
  422. Return: AL = status
  423.         00h successful
  424.         [DTA] = unopened FCB
  425.         FFh no more matching filenames
  426. Note:    (see AH=11h)
  427.     assumes that successful FindFirst executed on search FCB before call
  428. SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch
  429. --------D-2113-------------------------------
  430. INT 21 - DOS 1+ - DELETE FILE USING FCB
  431.     AH = 13h
  432.     DS:DX -> unopened FCB (see AH=0Fh), filename filled with template for
  433.         deletion ('?' wildcards allowed)
  434. Return: AL = status
  435.         00h one or more files successfully deleted
  436.         FFh no matching files or all were read-only or locked
  437. Notes:    DOS 1.25+ deletes everything in the current directory (including
  438.       subdirectories) and sets the first byte of the name to 00h (entry
  439.       never used) instead of E5h if called on an extended FCB with
  440.       filename '???????????' and bits 0-4 of the attribute set (bits 1 and
  441.       2 for DOS 1.x).  This may have originally been an optimization to
  442.       minimize directory searching after a mass deletion (DOS 1.25+ stop
  443.       the directory search upon encountering a never-used entry), but can
  444.       corrupt the filesystem under DOS 2+ because subdirectories are
  445.       removed without deleting the files they contain.
  446.     currently-open files should not be deleted
  447.     MS-DOS allows deletion of read-only files with an extended FCB, whereas
  448.       Novell NetWare does not
  449. SeeAlso: AH=41h,INT 2F/AX=1113h
  450. --------D-2114-------------------------------
  451. INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
  452.     AH = 14h
  453.     DS:DX -> opened FCB (see AH=0Fh)
  454. Return: AL = status
  455.         00h successful
  456.         01h end of file (no data)
  457.         02h segment wrap in DTA
  458.         03h end of file, partial record read
  459.     [DTA] = record read from file
  460. Notes:    reads a record of the size specified in the FCB beginning at the
  461.       current file position, then updates the current block and current
  462.       record fields in the FCB
  463.     if a partial record was read, it is zero-padded to the full size
  464.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  465. SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh,INT 2F/AX=1108h
  466. --------D-2115-------------------------------
  467. INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
  468.     AH = 15h
  469.     DS:DX -> opened FCB (see AH=0Fh)
  470.     [DTA] = record to write
  471. Return: AL = status
  472.         00h successful
  473.         01h disk full
  474.         02h segment wrap in DTA
  475. Notes:    writes a record of the size specified in the FCB beginning at the
  476.       current file position, then updates the current block and current
  477.       record fields in the FCB
  478.     if less than a full sector is written, the data is placed in a DOS
  479.       buffer to be written out at a later time
  480.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  481. SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h
  482. --------D-2116-------------------------------
  483. INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
  484.     AH = 16h
  485.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  486. Return: AL = status
  487.         00h successful
  488.         FFh directory full or file exists and is read-only or locked
  489. Notes:    if file already exists, it is truncated to zero length
  490.     if an extended FCB is used, the file is given the attribute in the
  491.       FCB; this is how to create a volume label in the disk's root dir
  492.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  493. SeeAlso: AH=0Fh,AH=10h,AH=3Ch
  494. --------D-2117-------------------------------
  495. INT 21 - DOS 1+ - RENAME FILE USING FCB
  496.     AH = 17h
  497.     DS:DX -> modified FCB (see also AH=0Fh)
  498.         the old filename ('?' wildcards OK) is in the standard location
  499.         while the new filename ('?' wildcards OK) is stored in the 11
  500.         bytes beginning at offset 11h
  501. Return:    AL = status
  502.         00h successfully renamed
  503.         FFh no matching files,file is read-only, or new name already exists
  504. Note:    subdirectories may be renamed using an extended FCB with the
  505.       appropriate attribute, as may volume labels
  506. SeeAlso: AH=0Fh,AH=13h,AH=56h,INT 2F/AX=1111h
  507. --------D-2118-------------------------------
  508. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  509.     AH = 18h
  510. Return: AL = 00h
  511. Note:    corresponds to the CP/M BDOS function "get bit map of logged drives",
  512.       which is meaningless under MS-DOS
  513. SeeAlso: AH=1Dh,AH=1Eh,AH=20h,AX=4459h
  514. --------D-2119-------------------------------
  515. INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
  516.     AH = 19h
  517. Return: AL = drive (00h = A:, 01h = B:, etc)
  518. Note:    Novell NetWare uses the fact that DOS 2.x COMMAND.COM issues this call
  519.       from a particular location every time it starts a command to
  520.       determine when to issue an automatic EOJ
  521. SeeAlso: AH=0Eh,AH=47h,AH=BBh
  522. --------D-211A-------------------------------
  523. INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
  524.     AH = 1Ah
  525.     DS:DX -> Disk Transfer Area (DTA)
  526. Notes:    the DTA is set to PSP:0080h when a program is started
  527.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  528. SeeAlso: AH=11h,AH=12h,AH=2Fh,AH=4Eh,AH=4Fh
  529. --------D-211B-------------------------------
  530. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
  531.     AH = 1Bh
  532. Return: AL = sectors per cluster (allocation unit)
  533.     CX = bytes per sector
  534.     DX = total number of clusters
  535.     DS:BX -> media ID byte (see below)
  536. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  537.       versions return a pointer to a copy of the FAT's ID byte
  538. SeeAlso: AH=1Ch,AH=36h
  539.  
  540. Values for media ID byte:
  541.  FFh    floppy, double-sided, 8 sectors per track (320K)
  542.  FEh    floppy, single-sided, 8 sectors per track (160K)
  543.  FDh    floppy, double-sided, 9 sectors per track (360K)
  544.  FCh    floppy, single-sided, 9 sectors per track (180K)
  545.  F9h    floppy, double-sided, 15 sectors per track (1.2M)
  546.  F8h    hard disk
  547.  F0h    other
  548. --------D-211C-------------------------------
  549. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
  550.     AH = 1Ch
  551.     DL = drive (00h = default, 01h = A:, etc)
  552. Return: AL = sectors per cluster (allocation unit)
  553.     CX = bytes per sector
  554.     DX = total number of clusters
  555.     DS:BX -> media ID byte (see AH=1Bh)
  556. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  557.       versions return a pointer to a copy of the FAT's ID byte
  558. SeeAlso: AH=1Bh,AH=36h
  559. --------D-211D-------------------------------
  560. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  561.     AH = 1Dh
  562. Return: AL = 00h
  563. Note:    corresponds to the CP/M BDOS function "get bit map of read-only
  564.       drives", which is meaningless under MS-DOS
  565. SeeAlso: AH=18h,AH=1Eh,AH=20h,AX=4459h
  566. --------D-211E-------------------------------
  567. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  568.     AH = 1Eh
  569. Return: AL = 00h
  570. Note:    corresponds to the CP/M BDOS function "set file attributes" which was
  571.      meaningless under MS-DOS 1.x
  572. SeeAlso: AH=18h,AH=1Dh,AH=20h
  573. --------D-211F-------------------------------
  574. INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
  575.     AH = 1Fh
  576. Return: AL = status
  577.         00h successful
  578.         DS:BX -> Drive Parameter Block (DPB) (see below for DOS 1.x,
  579.             AH=32h for DOS 2+)
  580.         FFh invalid drive
  581. Note:    this call was undocumented prior to the release of DOS 5.0; however,
  582.       only the DOS 4+ version of the DPB has been documented
  583. SeeAlso: AH=32h
  584.  
  585. Format of DOS 1.1 and MS-DOS 1.25 drive parameter block:
  586. Offset    Size    Description
  587.  00h    BYTE    sequential device ID
  588.  01h    BYTE    logical drive number (0=A:)
  589.  02h    WORD    bytes per sector
  590.  04h    BYTE    highest sector number within a cluster
  591.  05h    BYTE    shift count to convert clusters into sectors
  592.  06h    WORD    starting sector number of first FAT
  593.  08h    BYTE    number of copies of FAT
  594.  09h    WORD    number of directory entries
  595.  0Bh    WORD    number of first data sector
  596.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  597.  0Fh    BYTE    sectors per FAT
  598.  10h    WORD    starting sector of directory
  599.  12h    WORD    address of allocation table
  600. Note:    the DOS 1.0 table is the same except that the first and last fields
  601.       are missing; see INT 21/AH=32h for the DOS 2+ version
  602. --------D-2120-------------------------------
  603. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  604.     AH = 20h
  605. Return: AL = 00h
  606. Note:    corresponds to the CP/M BDOS function "get/set default user
  607.       (sublibrary) number", which is meaningless under MS-DOS
  608. SeeAlso: AH=18h,AH=1Dh,AH=1Eh,AX=4459h
  609. --------D-2121-------------------------------
  610. INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
  611.     AH = 21h
  612.     DS:DX -> opened FCB (see AH=0Fh)
  613. Return: AL = status
  614.         00h successful    
  615.         01h end of file, no data read
  616.         02h segment wrap in DTA, no data read
  617.         03h end of file, partial record read
  618.     [DTA] = record read from file
  619. Notes:    the record is read from the current file position as specified by the
  620.       random record and record size fields of the FCB
  621.     the file position is not updated after reading the record
  622.     if a partial record is read, it is zero-padded to the full size
  623.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  624. SeeAlso: AH=14h,AH=22h,AH=27h,AH=3Fh
  625. --------D-2122-------------------------------
  626. INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
  627.     AH = 22h
  628.     DS:DX -> opened FCB (see AH=0Fh)
  629.     [DTA] = record to write
  630. Return: AL = status
  631.         00h successful
  632.         01h disk full
  633.         02h segment wrap in DTA
  634. Notes:    the record is written to the current file position as specified by the
  635.       random record and record size fields of the FCB
  636.     the file position is not updated after writing the record
  637.     if the record is located beyond the end of the file, the file is
  638.       extended but the intervening data remains uninitialized
  639.     if the record only partially fills a disk sector, it is copied to a
  640.       DOS disk buffer to be written out to disk at a later time
  641.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  642. SeeAlso: AH=15h,AH=21h,AH=28h,AH=40h
  643. --------D-2123-------------------------------
  644. INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
  645.     AH = 23h
  646.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  647. Return: AL = status
  648.         00h successful (matching file found)
  649.         FCB random record field filled with size in records, rounded up
  650.         to next full record
  651.         FFh failed (no matching file found)
  652. Note:    not supported by MS Windows 3.0 DOSX.EXE DOS extender
  653. SeeAlso: AH=42h
  654. --------D-2124-------------------------------
  655. INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
  656.     AH = 24h
  657.     DS:DX -> opened FCB (see AH=0Fh)
  658. Notes:    computes the random record number corresponding to the current record
  659.       number and record size, then stores the result in the FCB
  660.     normally used when switching from sequential to random access
  661.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  662. SeeAlso: AH=21h,AH=27h,AH=42h
  663. --------D-2125-------------------------------
  664. INT 21 - DOS 1+ - SET INTERRUPT VECTOR
  665.     AH = 25h
  666.     AL = interrupt number
  667.     DS:DX -> new interrupt handler
  668. Notes:    this function is preferred over direct modification of the interrupt
  669.       vector table
  670.     some DOS extenders place an API on this function, as it is not
  671.       directly meaningful in protected mode
  672.     under DR-DOS 5.0, this function does not use any of the DOS-internal
  673.       stacks and may thus be called at any time
  674.     Novell NetWare (except the new DOS Requester) monitors the offset of
  675.       any INT 24 set, and if equal to the value at startup, substitutes
  676.       its own handler to allow handling of network errors; this introduces
  677.       the potential bug that any program whose INT 24 handler offset
  678.       happens to be the same as COMMAND.COM's will not have its INT 24
  679.       handler installed
  680. SeeAlso: AX=2501h,AH=35h
  681. --------E-212501-----------------------------
  682. INT 21 P - Phar Lap 386/DOS-Extender - RESET DOS EXTENDER DATA STRUCTURES 
  683.     AX = 2501h
  684.     SS = application's original SS or DS (FlashTek X-32VM)
  685. Return: CF clear if successful
  686.     CF set on error
  687.         caller is operating on X-32 stack (FlashTek X-32VM)
  688. Notes:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  689.       system calls.     Only available when directly using 386/DOS-Extender or
  690.       a compatible DOS extender, or when using a product that was created
  691.       using 386-DOS/Extender or a compatible
  692.     this function is also supported by FlashTek X-32VM
  693. SeeAlso: AH=30h"Phar Lap"
  694. --------E-212502-----------------------------
  695. INT 21 - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  696.     AX = 2502h
  697.     CL = interrupt number
  698. Return:    CF clear
  699.     ES:EBX = CS:EIP of protected-mode interrupt handler
  700. Note:    this function is also supported by FlashTek X-32VM
  701. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0204h
  702. --------E-212503-----------------------------
  703. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  704.     AX = 2503h
  705.     CL = interrupt number
  706. Return: CF clear
  707.     EBX = CS:IP of real-mode interrupt handler
  708. Note:    this function is also supported by FlashTek X-32VM
  709. SeeAlso: AX=2502h,AX=2504h,AH=35h,INT 31/AX=0200h
  710. --------E-212504-----------------------------
  711. INT 21 - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  712.     AX = 2504h
  713.     CL = interrupt number
  714.     DS:EDX = CS:EIP of protected-mode interrupt handler
  715. Return: CF clear
  716. Note:    this function is also supported by FlashTek X-32VM
  717. SeeAlso: AX=2502h,AX=2505h,INT 31/AX=0205h
  718. --------E-212505-----------------------------
  719. INT 21 - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  720.     AX = 2505h
  721.     CL = interrupt number
  722.     EBX = CS:IP of real-mode interrupt handler
  723. Return: CF clear
  724. Note:    this function is also supported by FlashTek X-32VM
  725. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0201h
  726. --------E-212506-----------------------------
  727. INT 21 - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CONTRL IN PROT MODE
  728.     AX = 2506h
  729.     CL = interrupt number
  730.     DS:EDX = CS:EIP of protected-mode interrupt handler
  731. Return: CF clear
  732. Notes:    this function modifies both the real-mode low-memory interrupt
  733.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  734.     interrupts occurring in real mode are resignaled in protected mode
  735.     this function is also supported by FlashTek X-32VM
  736. --------E-212507-----------------------------
  737. INT 21 - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  738.     AX = 2507h
  739.     CL = interrupt numbern
  740.     DS:EDX = CS:EIP of protected-mode interrupt handler
  741.     EBX = CS:IP of real-mode interrupt handler
  742. Return: CF clear
  743. Notes:    interrupts are disabled until both vectors have been modified
  744.     this function is also supported by FlashTek X-32VM
  745. SeeAlso: AX=2504h,AX=2505h
  746. --------E-212508-----------------------------
  747. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  748.     AX = 2508h
  749.     BX = segment selector
  750. Return: CF clear if successful
  751.         ECX = linear base address of segment
  752.     CF set if invalid segment selector
  753. Note:    this function is also supported by FlashTek X-32VM
  754. SeeAlso: AX=2509h
  755. --------E-212509-----------------------------
  756. INT 21 - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  757.     AX = 2509h
  758.     EBX = linear address to convert
  759. Return: CF clear if successful
  760.         ECX = physical address (carry flag clear)
  761.     CF set if linear address not mapped in page tables
  762. SeeAlso: AX=2508h
  763. --------E-212509-----------------------------
  764. INT 21 - FlashTek X-32VM - GET SYSTEM SEGMENTS AND SELECTORS
  765.     AX = 2509h
  766. Return: CF clear
  767.     EAX high word = default DS
  768.     AX = alias for 16-bit data segment
  769.     BX = real mode code segment
  770.     EDX high word = selector covering full 4GB address space
  771.     DX = default SS
  772.     ESI high word = PSP selector
  773.     SI = environment selector
  774. --------E-21250A-----------------------------
  775. INT 21 - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  776.     AX = 250Ah
  777.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  778.          to modify
  779.     EBX = physical base address of memory to map (multiple of 4K)
  780.     ECX = number of physical 4K pages to map
  781. Return: CF clear if successful
  782.         EAX = 32-bit offset in segment of mapped memory
  783.     CF set on error
  784.         EAX = error code
  785.         08h insufficient memory to create page tables
  786.         09h invalid segment selector
  787. SeeAlso: INT 31/AX=0800h
  788. --------E-21250C-----------------------------
  789. INT 21 - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  790.     AX = 250Ch
  791. Return: CF clear
  792.     AL = base interrupt vector for IRQ0-IRQ7
  793.     AH = base interrupt vector for IRQ8-IRQ15
  794.     BL = interrupt vector for BIOS print screen function (Phar Lap only)
  795. Note:    this function is also supported by FlashTek X-32VM
  796. SeeAlso: INT 31/AX=0400h,INT 67/AX=DE0Ah
  797. --------E-21250D-----------------------------
  798. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  799.     AX = 250Dh
  800. Return: CF clear
  801.     EAX = CS:IP of real-mode callback procedure that will call through
  802.         from real mode to a protected-mode routine
  803.     EBX = 32-bit real-mode address of intermode call data buffer
  804.     ECX = size in bytes of intermode call data buffer
  805.     ES:EDX = protected-mode address of intermode call data buffer
  806. Notes:    this function is also supported by FlashTek X-32VM
  807.     X-32VM guarantees the intermode buffer to be at least 4 KB
  808. SeeAlso: AX=250Eh
  809.  
  810. Call real-mode callback with:
  811.     STACK:    DWORD    offset to protected-mode code
  812.         WORD    placeholder for protected-mode CS
  813.         DWORD    pointer to selector structure (see below)
  814.             or 0000h:0000h for defaults
  815.         var    parameters for protected-mode procedure
  816. Return: via FAR return
  817.  
  818. Format of selector structure:
  819. Offset    Size    Description
  820.  00h    WORD    protected-mode GS selector
  821.  02h    WORD    protected-mode FS selector
  822.  04h    WORD    protected-mode ES selector
  823.  06h    WORD    protected-mode DS selector
  824. --------E-21250E-----------------------------
  825. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  826.     AX = 250Eh
  827.     EBX = CS:IP of real-mode procedure to call
  828.     ECX = number of two-byte words to copy from protected-mode stack
  829.           to real-mode stack
  830. Return: CF clear if successful
  831.         all segment registers unchanged
  832.         all general registers contain values set by real-mode procedure
  833.         all other flags set as they were left by real-mode procedure
  834.         stack unchanged
  835.     CF set on error
  836.         EAX = error code
  837.         01h not enough real-mode stack space
  838. Note:    this function is also supported by FlashTek X-32VM; under X-32VM, the
  839.       call will fail if ECX > 0000003Fh
  840. SeeAlso: AX=250Dh,AX=2510h,AH=E1h"OS/286",INT 31/AX=0301h
  841. --------E-21250F-----------------------------
  842. INT 21 - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  843.     AX = 250Fh
  844.     ES:EBX = 48-bit protected-mode address to convert
  845. Return: CF clear if successful (address < 1MB)
  846.         ECX = 32-bit real-mode MS-DOS address
  847.     CF set on error (address >= 1MB)
  848.         ECX = linear address
  849. Note:    this function is also supported by FlashTek X-32VM
  850. SeeAlso: AX=2510h
  851. --------E-212510-----------------------------
  852. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  853.     AX = 2510h
  854.     EBX = CS:IP of real-mode procedure to call
  855.     ECX = number of two-byte words to copy to protected-mode stack to
  856.           real-mode stack
  857.     DS:EDX -> pointer to parameter block (see below)
  858. Return: CF clear if successful
  859.         all segment registers unchanged,
  860.         EDX unchanged
  861.         all other general registers contain values set by real-mode proc
  862.         all other flags are set as they were left by real-mode procedure
  863.         real-mode register values are returned in the parameter block
  864.     CF set on error
  865.         EAX = error code
  866.         01h not enough real-mode stack space
  867. Note:    unlike most of the preceding 25xxh functions, this one is not
  868.       supported by FlashTek X-32VM
  869. SeeAlso: AX=250Eh,AX=250Fh
  870.  
  871. Format of parameter block:
  872. Offset    Size    Description
  873.  00h    WORD    real-mode DS value
  874.  02h    WORD    real-mode ES value
  875.  04h    WORD    real-mode FS value
  876.  06h    WORD    real-mode GS value
  877.  08h    DWORD    real-mode EAX value
  878.  0Ch    DWORD    real-mode EBX value
  879.  10h    DWORD    real-mode ECX value
  880.  14h    DWORD    real-mode EDX value
  881. --------E-212511-----------------------------
  882. INT 21 - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  883.     AX = 2511h
  884.     DS:EDX -> parameter block (see below)
  885. Return: all segment registers unchanged
  886.     EDX unchanged
  887.     all other registers contain values set by the real-mode int handler
  888.     the flags are set as they were left by the real-mode interrupt handler
  889.     real-mode register values are returned in the parameter block
  890. Note:    this function is also supported by FlashTek X-32VM
  891. SeeAlso: AX=2503h,AX=2505h,AX=250Eh,AH=E3h"OS/286",INT 31/AX=0300h
  892.  
  893. Format of parameter block:
  894. Offset    Size    Description
  895.  00h    WORD    interrupt number
  896.  02h    WORD    real-mode DS value
  897.  04h    WORD    real-mode ES value
  898.  06h    WORD    real-mode FS value
  899.  08h    WORD    real-mode GS value
  900.  0Ah    DWORD    real-mode EAX value
  901.  0Eh    DWORD    real-mode EDX value
  902. Note: all other real-mode values set from protected-mode registers
  903. --------E-212512-----------------------------
  904. INT 21 - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  905.     AX = 2512h
  906.     DS:EDX -> pointer to ASCIIZ program name
  907.     ES:EBX -> pointer to parameter block (see below)
  908.     ECX = size in bytes of LDT buffer
  909. Return: CF clear if successful
  910.         EAX = number of segment descriptors in LDT
  911.     CF set on error
  912.         EAX = error code
  913.         02h file not found or path invalid
  914.         05h access denied
  915.         08h insufficient memory
  916.         0Ah environment invalid
  917.         0Bh invalid file format
  918.         80h LDT too small
  919.  
  920. Format of parameter block:
  921. Offset    Size    Description
  922. Input:
  923.  00h    DWORD    32-bit offset of environment string
  924.  04h    WORD    segment of environment string
  925.  06h    DWORD    32-bit offset of command-tail string
  926.  0Ah    WORD    segment of command-tail string
  927.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  928.  10h    WORD    segment of LDT buffer
  929. Output:
  930.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  931.  14h    WORD    real/protected mode flag
  932.         0000h  real mode
  933.         0001h  protected mode
  934.  16h    DWORD    initial EIP value
  935.  1Ah    WORD    initial CS value
  936.  1Ch    DWORD    initial ESP value
  937.  20h    WORD    initial SS value
  938.  22h    WORD    initial DS value
  939.  24h    WORD    initial ES value
  940.  26h    WORD    initial FS value
  941.  28h    WORD    initial GS value
  942. --------E-212513-----------------------------
  943. INT 21 - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  944.     AX = 2513h
  945.     BX = segment selector of descriptor in GDT or LDT
  946.     CL = access-rights byte for alias descriptor
  947.     CH = use-type bit (USE16 or USE32) for alias descriptor
  948. Return: CF clear if successful
  949.         AX = segment selector for created alias
  950.     CF set on error
  951.         EAX = error code
  952.         08h insufficient memory (can't grow LDT)
  953.         09h invalid segment selector in BX
  954. --------E-212514-----------------------------
  955. INT 21 - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  956.     AX = 2514h
  957.     BX = segment selector of descriptor in GDT or LDT
  958.     CL = new access-rights byte 
  959.     CH = new use-type bit (USE16 or USE32)
  960. Return: CF clear if successful
  961.     CF set on error
  962.         EAX = error code
  963.         09h invalid selector in BX
  964. SeeAlso: AX=2515h,INT 31/AX=0009h
  965. --------E-212515-----------------------------
  966. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  967.     AX = 2515h
  968.     BX = segment selector of descriptor in GDT or LDT
  969. Return: CF clear if successful
  970.         CL = access-rights byte for segment
  971.         CH = use-type bit (USE16 or USE32)
  972.     ECX<16-31> destroyed
  973.     CF set on error
  974.         EAX = error code
  975.         09h invalid segment selector in BX
  976. SeeAlso: AX=2514h
  977. --------E-212516-----------------------------
  978. INT 21 - Phar Lap 386/DOS-Extender - FREE ALL MEMORY OWNED BY LDT
  979.     AX = 2516h
  980.     ???
  981. Return: ???
  982. --------E-212517-----------------------------
  983. INT 21 - Phar Lap 386/DOS-Extender - GET INFO ON DOS DATA BUFFER
  984.     AX = 2517h
  985.     ???
  986. Return: ???
  987. --------E-212518-----------------------------
  988. INT 21 - Phar Lap 386/DOS-Extender - SPECIFY HANDLER FOR MOVED SEGMENTS
  989.     AX = 2518h
  990.     ???
  991. Return: ???
  992. --------E-212519-----------------------------
  993. INT 21 - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  994.     AX = 2519h
  995. Return: CF clear
  996.     EAX = error code
  997.         0000h  no error
  998.         0001h  out of physical memory
  999.         0002h  out of swap space (unable to grow swap file)
  1000.         0003h  out of LDT entries and unable to grow LDT
  1001.         0004h  unable to change extended memory allocation mark
  1002.         FFFFFFFFh    paging disabled
  1003. Note:    VMM is the Virtual Memory Manager option
  1004. --------E-21251A-----------------------------
  1005. INT 21 - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  1006.     AX = 251Ah
  1007.     EDX = number of 4k pages to lock
  1008.     if BL = 00h
  1009.         ECX = linear address of first page to lock
  1010.     if BL = 01h
  1011.         ES:ECX -> pointer to first page to lock
  1012. Return: CF clear if successful
  1013.     CF set on error
  1014.         EAX = error code
  1015.         08h insufficient memory
  1016.         09h invalid address range
  1017. SeeAlso: AX=251Bh,AX=EB06h,INT 31/AX=0600h
  1018. --------E-21251B-----------------------------
  1019. INT 21 - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  1020.     AX = 251Bh
  1021.     EDX = number of pages to unlock
  1022.     if BL = 00h
  1023.         ECX = linear address of first page to unlock
  1024.     if BL = 01h
  1025.         ES:ECX -> pointer to first page to unlock
  1026. Return: CF clear if successful
  1027.     CF set on error
  1028.         EAX = error code
  1029.         09h invalid address range
  1030. SeeAlso: AX=251Ah,AX=EB07h,INT 31/AX=0601h
  1031. --------E-21251D-----------------------------
  1032. INT 21 - Phar Lap 386/DOS-Extender VMM - READ PAGE-TABLE ENTRY
  1033.     AX = 251Dh
  1034.     ???
  1035. Return: ???
  1036. SeeAlso: AX=251Eh,AX=EB00h,INT 31/AX=0506h
  1037. --------E-21251E-----------------------------
  1038. INT 21 - Phar Lap 386/DOS-Extender VMM - WRITE PAGE-TABLE ENTRY
  1039.     AX = 251Eh
  1040.     ???
  1041. Return: ???
  1042. SeeAlso: AX=251Dh,INT 31/AX=0507h
  1043. --------E-21251F-----------------------------
  1044. INT 21 - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  1045.     AX = 251Fh
  1046.     ???
  1047. Return: ???
  1048. SeeAlso: AX=251Dh,AX=251Eh
  1049. --------E-212520-----------------------------
  1050. INT 21 - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  1051.     AX = 2520h
  1052.     DS:EDX -> pointer to buffer at least 100 bytes in size (see below)
  1053.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  1054. Return: carry flag clear    
  1055.  
  1056. Format of VM stats buffer:
  1057. Offset    Size    Description
  1058.  00h    DWORD    VM status
  1059.         0001h VM subsystem is present
  1060.         0000h VM not present
  1061.  04h    DWORD    "nconvpg" number of conventional memory pages available
  1062.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  1063.  0Ch    DWORD    "nextpg" total number of extended memory pages
  1064.  10h    DWORD    "extlim" extender memory pages limit
  1065.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  1066.  18h    DWORD    "alockpg" number of locked pages owned by application
  1067.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  1068.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  1069.  24h    DWORD    linear address of beginning of application address space
  1070.  28h    DWORD    linear address of end of application address space
  1071.  2Ch    DWORD    number of seconds since last time VM stats were reset
  1072.  30h    DWORD    number of page faults since last time
  1073.  34h    DWORD    number of pages written to swap file since last time
  1074.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  1075.  3Ch    DWORD    number of virtual pages allocated to the application
  1076.  40h    DWORD    size in pages of swap file
  1077.  44h    DWORD    number of system pages allocated with EMS calls
  1078.  48h    DWORD    minimum number of conventional memory pages
  1079.  4Ch    DWORD    maximum size in bytes to which swap file can be increased
  1080.  50h    DWORD    "vmflags" bit 0 = 1 if page fault in progress
  1081.  54h 16 BYTEs    reserved for future expansion (set to zero)
  1082. --------E-212521-----------------------------
  1083. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEMORY USAGE
  1084.     AX = 2521h
  1085.     EBX = max 4k pages of physical extended memory which program may use
  1086. Return: CF clear if successful
  1087.        EBX = maximum limit in pages
  1088.        ECX = minimum limit in pages
  1089.     CF set on error
  1090.         EAX = error code
  1091.         08h insufficient memory or -nopage switch used
  1092. SeeAlso: AX=2522h
  1093. --------E-212522-----------------------------
  1094. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY ALTERNATE PAGE-FAULT HANDLER
  1095.     AX = 2522h
  1096.     ???
  1097. Return: ???
  1098. SeeAlso: AX=2523h
  1099. --------E-212523-----------------------------
  1100. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  1101.     AX = 2523h
  1102.     ???
  1103. Return: ???
  1104. SeeAlso: AX=2522h
  1105. --------E-212524-----------------------------
  1106. INT 21 - Phar Lap 386/DOS-Extender VMM - INSTALL PAGE-REPLACEMENT HANDLERS
  1107.     AX = 2524h
  1108.     ???
  1109. Return: ???
  1110. --------E-212525-----------------------------
  1111. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENTIONAL MEM USAGE
  1112.     AX = 2525h
  1113.     EBX = limit in 4k pages of physical conventional memory which program 
  1114.           may use
  1115. Return: CF clear if successful
  1116.         EBX = maximum limit in pages
  1117.         ECX = minimum limit in pages
  1118.     CF set on error
  1119.         EAX = error code
  1120.         08h insufficient memory or -nopage switch used
  1121. SeeAlso: AX=2521h
  1122. --------E-212526-----------------------------
  1123. INT 21 - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  1124.     AX = 2526h
  1125.     ???
  1126. Return: ???
  1127. --------E-21252B-----------------------------
  1128. INT 21 - FlashTek X-32VM - VIRTUAL MEMORY MANAGEMENT - PAGE LOCKING
  1129.     AX = 252Bh
  1130.     BH = function
  1131.         05h lock pages
  1132.         06h unlock pages
  1133.     BL = address type
  1134.         00h linear address
  1135.         ECX = linear start address of memory region
  1136.         01h segmented address
  1137.         ES:ECX -> start of memory region
  1138.     EDX = size of memory region in bytes
  1139. Return: CF clear if successful
  1140.     CF set on error
  1141. Note:    if X-32 is not using virtual memory, this function always succeeds
  1142. --------E-212532-----------------------------
  1143. INT 21 - FlashTek X-32VM - GET EXCEPTION HANDLER VECTOR
  1144.     AX = 2532h
  1145.     CL = exception number (00h-0Fh)
  1146. Return: CF clear if successful
  1147.         ES:EBX = CS:EIP of current exception handler
  1148.     CF set on error (CL > 0Fh)
  1149. SeeAlso: AX=2533h
  1150. --------E-212533-----------------------------
  1151. INT 21 - FlashTek X-32VM - SET EXCEPTION HANDLER VECTOR
  1152.     AX = 2533h
  1153.     CL = exception number (00h-0Fh)
  1154.     DS:EDX = CS:EIP of new exception handler
  1155. Return: CF clear if successful
  1156.     CF set on error (CL > 0Fh)
  1157. SeeAlso: AX=2532h
  1158. --------E-2125C0-----------------------------
  1159. INT 21 - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  1160.     AX = 25C0h
  1161.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  1162. Return: CF clear if successful
  1163.         AX = real-mode paragraph address of memory
  1164.     CF set on error
  1165.         AX = error code
  1166.         07h MS-DOS memory control blocks destroyed
  1167.         08h insufficient memory
  1168.         BX = size in paragraphs of largest available memory block
  1169. SeeAlso: AX=25C1h,AX=25C2h
  1170. --------E-2125C1-----------------------------
  1171. INT 21 - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  1172.     AX = 25C1h
  1173.     CX = real-mode paragraph address of memory block to free
  1174. Return: CF clear if successful
  1175.         EAX destroyed
  1176.     CF set on error
  1177.         AX = error code
  1178.         07h MS-DOS memory control blocks destroyed
  1179.         09h invalid memory block address in CX
  1180. SeeAlso: AX=25C0h,AX=25C2h
  1181. --------E-2125C2-----------------------------
  1182. INT 21 - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  1183.     AX = 25C2h
  1184.     BX = new requested block size in paragraphs
  1185.     CX = real-mode paragraph address of memory block to modify
  1186. Return: CF clear if successful
  1187.         EAX destroyed
  1188.     CF set on error
  1189.         AX = error code
  1190.         07h MS-DOS memory control blocks destroyed
  1191.         08h insufficient memory
  1192.         09h invalid memory block address in CX
  1193.         BX = size in paragraphs of largest available memory block
  1194. SeeAlso: AX=25C0h,AX=25C1h
  1195. --------E-2125C3-----------------------------
  1196. INT 21 - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  1197.     AX = 25C3h
  1198.     ES:EBX -> pointer to parameter block (see below)
  1199.     DS:EDX -> pointer to ASCIIZ program filename
  1200. Return: CF clear if successful
  1201.         all registers unchanged
  1202.     CF set on error
  1203.         EAX = error code
  1204.         01h function code in AL is invalid ???
  1205.         02h file not found or path invalid
  1206.         05h access denied
  1207.         08h insufficient memory to load program
  1208.         0Ah environment invalid
  1209.         0Bh invalid file format
  1210.  
  1211. Format of parameter block:
  1212. Offset    Size    Description
  1213.  00h    DWORD    32-bit offset of environment string
  1214.  04h    WORD    segment selector of environment string
  1215.  06h    DWORD    32-bit offset of command-tail string
  1216.  0Ah    WORD    segment selector of command-tail string
  1217. --------D-2126-------------------------------
  1218. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  1219.     AH = 26h
  1220.     DX = segment at which to create PSP (see below)
  1221. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1222.       taken from interrupt vector table
  1223.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  1224.       copy
  1225. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  1226.  
  1227. Format of PSP:
  1228. Offset    Size    Description
  1229.  00h  2 BYTEs    INT 20 instruction for CP/M CALL 0 program termination
  1230.         the CDh 20h here is often used as a signature for a valid PSP
  1231.  02h    WORD    segment of first byte beyond memory allocated to program
  1232.  04h    BYTE    unused filler
  1233.  05h    BYTE    CP/M CALL 5 service request (FAR JMP to 000C0h)
  1234.         BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  1235.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  1236.  08h  2 BYTEs    remainder of FAR JMP at 05h
  1237.  0Ah    DWORD    stored INT 22 termination address
  1238.  0Eh    DWORD    stored INT 23 control-Break handler address
  1239.  12h    DWORD    DOS 1.1+ stored INT 24 critical error handler address
  1240.  16h    WORD    segment of parent PSP
  1241.  18h 20 BYTEs    DOS 2+ Job File Table, one byte per file handle, FFh = closed
  1242.  2Ch    WORD    DOS 2+ segment of environment for process
  1243.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  1244.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  1245.  34h    DWORD    DOS 3+ pointer to JFT (default PSP:0018h)
  1246.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  1247.         used by SHARE in DOS 3.3
  1248.  3Ch  4 BYTEs    unused by DOS versions <= 6.00
  1249.         reportedly used by Novell NetWare shell 3.x
  1250.  40h  2 BYTEs    DOS 5+ version to return on INT 21/AH=30h
  1251.  42h    WORD    (MSWin3) selector of next PSP (PDB) in linked list
  1252.          Windows keeps a linked list of Windows programs only
  1253.  44h  4 BYTEs    unused by DOS versions <= 6.00
  1254.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  1255.  49h  7 BYTEs    unused by DOS versions <= 6.00
  1256.  50h  3 BYTEs    DOS 2+ service request (INT 21/RETF instructions)
  1257.  53h  9 BYTEs    unused in DOS versions <= 6.00
  1258.  5Ch 16 BYTEs    first default FCB, filled in from first commandline argument
  1259.         overwrites second FCB if opened
  1260.  6Ch 16 BYTEs    second default FCB, filled in from second commandline argument
  1261.         overwrites beginning of commandline if opened
  1262.  7Ch  4 BYTEs    unused
  1263.  80h 128 BYTEs    commandline / default DTA
  1264.         command tail is BYTE for length of tail, N BYTEs for the tail,
  1265.         followed by a BYTE containing 0Dh
  1266. Notes:    in DOS v3+, the limit on simultaneously open files may be increased by
  1267.       allocating memory for a new open file table, filling it with FFh,
  1268.       copying the first 20 bytes from the default table, and adjusting the
  1269.       pointer and count at 34h and 32h.  However, DOS will only copy the
  1270.       first 20 file handles into a child PSP (including the one created on
  1271.       EXEC).
  1272.     network redirectors based on the original MS-Net implementation use
  1273.       values of 80h-FEh in the open file table to indicate remote files;
  1274.       Novell NetWare reportedly also uses values of 80h-FEh
  1275.     MS-DOS 5.00 incorrectly fills the FCB fields when loading a program
  1276.       high; the first FCB is empty and the second contains the first
  1277.       parameter
  1278.     some DOS extenders place protected-mode values in various PSP fields
  1279.       such as the "parent" field, which can confuse PSP walkers.  Always
  1280.       check either for the CDh 20h signature or that the suspected PSP is
  1281.       at the beginning of a memory block which owns itself (the preceding
  1282.       paragraph should be a valid MCB with "owner" the same as the
  1283.       suspected PSP).
  1284.  
  1285. Format of environment block:
  1286. Offset    Size    Description
  1287.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  1288.       N BYTEs    second environment variable, ASCIZ string
  1289.     ...
  1290.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  1291.     BYTE    00h
  1292. ---DOS 3+---
  1293.     WORD    number of strings following environment (normally 1)
  1294.       N BYTEs    ASCIZ full pathname of program owning this environment
  1295.         other strings may follow
  1296. --------D-2127-------------------------------
  1297. INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
  1298.     AH = 27h
  1299.     CX = number of records to read
  1300.     DS:DX -> opened FCB (see AH=0Fh)
  1301. Return: AL = status
  1302.         00h successful, all records read
  1303.         01h end of file, no data read
  1304.         02h segment wrap in DTA, no data read
  1305.         03h end of file, partial read
  1306.     [DTA] = records read from file
  1307.     CX = number of records read (return AL = 00h or 03h)
  1308. Notes:    read begins at current file position as specified in FCB; the file
  1309.       position is updated after reading
  1310.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1311. SeeAlso: AH=21h,AH=28h,AH=3Fh
  1312. --------D-2128-------------------------------
  1313. INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
  1314.     AH = 28h
  1315.     CX = number of records to write
  1316.     DS:DX -> opened FCB (see AH=0Fh)
  1317.     [DTA] = records to write
  1318. Return: AL = status
  1319.         00h successful
  1320.         01h disk full or file read-only
  1321.         02h segment wrap in DTA
  1322.     CX = number of records written
  1323. Notes:    write begins at current file position as specified in FCB; the file
  1324.       position is updated after writing
  1325.     if CX = 0000h on entry, no data is written; instead the file size is
  1326.       adjusted to be the same as the file position specified by the random
  1327.       record and record size fields of the FCB
  1328.     if the data to be written is less than a disk sector, it is copied into
  1329.       a DOS disk buffer, to be written out to disk at a later time
  1330.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1331. SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h
  1332. --------D-2129-------------------------------
  1333. INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
  1334.     AH = 29h
  1335.     AL = parsing options (see below)
  1336.     DS:SI -> filename string (both '*' and '?' wildcards OK)
  1337.     ES:DI -> buffer for unopened FCB
  1338. Return: AL = result code
  1339.         00h successful parse, no wildcards encountered
  1340.         01h successful parse, wildcards present
  1341.         FFh failed (invalid drive specifier)
  1342.     DS:SI -> first unparsed character
  1343.     ES:DI buffer filled with unopened FCB (see AH=0Fh)
  1344. Notes:    asterisks expanded to question marks in the FCB
  1345.     all processing stops when a filename terminator is encountered
  1346.     cannot be used with filespecs which include a path (DOS 2+)
  1347.     Novell NetWare monitors the result code since an 'invalid drive' may
  1348.       signal an attempt to reconnect a network drive; if there are no
  1349.       connections to the specified drive, NetWare attempts to build a
  1350.       connection and map the drive to the SYS:LOGIN directory
  1351. SeeAlso: AH=0Fh,AH=16h,AH=26h
  1352.  
  1353. Bitfields for parsing options:
  1354.  bit 0    skip leading separators
  1355.  bit 1    use existing drive number in FCB if no drive is specified, instead of
  1356.          setting field to zero
  1357.  bit 2    use existing filename in FCB if no base name is specified, instead of
  1358.          filling field with blanks
  1359.  bit 3    use existing extension in FCB if no extension is specified, instead of
  1360.          filling field with blanks
  1361.  bits 4-7 reserved (0)
  1362. --------D-212A-------------------------------
  1363. INT 21 - DOS 1+ - GET SYSTEM DATE
  1364.     AH = 2Ah
  1365. Return: CX = year (1980-2099)
  1366.     DH = month
  1367.     DL = day
  1368. ---DOS 1.10+---
  1369.     AL = day of week (00h=Sunday)
  1370. SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h,INT 1A/AH=04h,INT 2F/AX=120Dh
  1371. --------D-212B-------------------------------
  1372. INT 21 - DOS 1+ - SET SYSTEM DATE
  1373.     AH = 2Bh
  1374.     CX = year (1980-2099)
  1375.     DH = month
  1376.     DL = day
  1377. Return: AL = status
  1378.         00h successful
  1379.         FFh invalid date, system date unchanged
  1380. Note:    DOS 3.3+ also sets CMOS clock
  1381. SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h
  1382. --------E-212B--CX4149-----------------------
  1383. INT 21 - AI Architects - ??? - INSTALLATION CHECK
  1384.     AH = 2Bh
  1385.     CX = 4149h ('AI')
  1386.     DX = 413Fh ('A?')
  1387. Return: AL <> FFh if installed
  1388. Note:    Borland's TKERNEL makes this call
  1389. --------c-212B--CX4358-----------------------
  1390. INT 21 - PC Tools v5.x PC-Cache - INSTALLATION CHECK
  1391.     AH = 2Bh
  1392.     CX = 4358h ('CX')
  1393. Return: AL = FFh if PC-Cache not installed
  1394.     AL = 00h if installed
  1395.         CX = 6378h ('cx')
  1396.         BX = ???
  1397.         DX = ???
  1398. SeeAlso: INT 16/AX=FFA5h/CX=1111h
  1399. --------Q-212B--CX4445-----------------------
  1400. INT 21 - DESQview - INSTALLATION CHECK
  1401.     AH = 2Bh
  1402.     CX = 4445h ('DE')
  1403.     DX = 5351h ('SQ')
  1404.     AL = subfunction (DV v2.00+)
  1405.         01h get version
  1406.         Return: BX = version (BH = major, BL = minor)
  1407.         Note: early copies of v2.00 return 0002h
  1408.         02h get shadow buffer info, and start shadowing
  1409.         Return: BH = rows in shadow buffer
  1410.             BL = columns in shadow buffer
  1411.             DX = segment of shadow buffer
  1412.         04h get shadow buffer info
  1413.         Return: BH = rows in shadow buffer
  1414.             BL = columns in shadow buffer
  1415.             DX = segment of shadow buffer
  1416.         05h stop shadowing
  1417. Return: AL = FFh if DESQview not installed
  1418. Notes:    in DESQview v1.x, there were no subfunctions; this call only identified
  1419.       whether or not DESQview was loaded.  DESQview v2.52 performs function
  1420.       01h for all subfunction requests 0Ch and higher and appears to ignore
  1421.       all lower-numbered functions not listed here.
  1422.     DESQview versions 2.5x are part of DESQview/X v1.0x.
  1423. BUG:    subfunction 05h does not appear to work correctly in DESQview 2.52
  1424. SeeAlso: INT 10/AH=FEh,INT 10/AH=FFh,INT 15/AX=1024h,INT 15/AX=DE30h
  1425. --------U-212B--CX454C-----------------------
  1426. INT 21 - ELRES v1.1 - INSTALLATION CHECK
  1427.     AH = 2Bh
  1428.     CX = 454Ch ('EL')
  1429.     DX = 5253h ('RS')
  1430. Return: ES:BX -> ELRES history structure (see below)
  1431.     DX = DABEh (signature, DAve BEnnett)
  1432. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  1433.       Bennett which stores recent errorlevel values, allows them to be
  1434.       retrieved for use in batch files, and can place them in an
  1435.       environment variable
  1436. SeeAlso: AH=4Bh"ELRES",AH=4Dh
  1437.  
  1438. Format of ELRES history structure:
  1439. Offset    Size    Description
  1440.  00h    WORD    number of return codes which can be stored by following buffer
  1441.  02h    WORD    current position in buffer (treated as a ring)
  1442.  04h  N BYTEs    ELRES buffer
  1443. --------T-212B01CX5441-----------------------
  1444. INT 21 - TAME v2.10+ - INSTALLATION CHECK
  1445.     AX = 2B01h
  1446.     CX = 5441h ('TA')
  1447.     DX = 4D45h ('ME')
  1448. ---v2.60---
  1449.     BH = ???
  1450.         00h skip ???, else do
  1451. Return: AL = 02h if installed
  1452.     ES:DX -> data area in TAME-RES (see below)
  1453. Program: TAME is a shareware program by David G. Thomas which gives up CPU time
  1454.       to other partitions under a multitasker when the current partition's
  1455.       program incessantly polls the keyboard or system time
  1456.  
  1457. Format of TAME 2.10-2.20 data area:
  1458. Offset    Size    Description
  1459.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  1460.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  1461.  02h    DWORD    number of task switches
  1462.  06h    DWORD    number of keyboard polls
  1463.  0Ah    DWORD    number of time polls
  1464.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1465.  12h    DWORD    original INT 10h
  1466.  16h    DWORD    original INT 14h
  1467.  1Ah    DWORD    original INT 15h
  1468.  1Eh    DWORD    original INT 16h
  1469.  22h    DWORD    original INT 17h
  1470.  26h    DWORD    original INT 21h
  1471.  2Ah    DWORD    original INT 28h
  1472.  2Eh    WORD    offset of TAME INT 10h handler
  1473.  30h    WORD    offset of TAME INT 14h handler
  1474.  32h    WORD    offset of TAME INT 15h handler
  1475.  34h    WORD    offset of TAME INT 16h handler
  1476.  36h    WORD    offset of TAME INT 17h handler
  1477.  38h    WORD    offset of TAME INT 21h handler
  1478.  3Ah    WORD    offset of TAME INT 28h handler
  1479.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  1480.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1481.  40h    WORD    number of polls remaining before next task switch
  1482.  42h    WORD    /KEYIDLE value
  1483.  44h    BYTE    interrupts already grabbed by TAME (see below)
  1484.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1485.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  1486.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  1487.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  1488.  49h    BYTE    window or task number for this task
  1489.  4Ah    BYTE    multitasker type ???
  1490.         01h DESQview
  1491.         02h DoubleDOS
  1492.         03h TopView
  1493.         ???
  1494.  4Bh    BYTE    type of task switching selected
  1495.         bit 0: DESQview???
  1496.         bit 1: DoubleDOS???
  1497.         bit 2: TopView???
  1498.         bit 3: KeySwitch
  1499.         bit 4: HLT instruction
  1500.  4Ch    BYTE    ???
  1501.  4Dh    BYTE    flags
  1502.         bit 1: /FREQ instead of /MAX
  1503.  4Eh    BYTE    /FG: value
  1504.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  1505.  50h    BYTE    ???
  1506.  
  1507. Bitfields for interrupts already grabbed by TAME:
  1508.  bit 0    INT 10h
  1509.  bit 1    INT 14h
  1510.  bit 2    INT 15h
  1511.  bit 3    INT 16h
  1512.  bit 4    INT 17h
  1513.  bit 5    INT 21h
  1514.  bit 6    INT 28h
  1515.  
  1516. Format of TAME 2.30 data area:
  1517. Offset    Size    Description
  1518.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  1519.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  1520.  02h    DWORD    number of task switches
  1521.  06h    DWORD    number of keyboard polls
  1522.  0Ah    DWORD    number of time polls
  1523.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1524.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1525.  16h    DWORD    time yielded
  1526.  1Ah    DWORD    time spent polling
  1527.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1528.  22h    DWORD    original INT 10h
  1529.  26h    DWORD    original INT 14h
  1530.  2Ah    DWORD    original INT 15h
  1531.  2Eh    DWORD    original INT 16h
  1532.  32h    DWORD    original INT 17h
  1533.  36h    DWORD    original INT 21h
  1534.  3Ah    DWORD    original INT 28h
  1535.  3Eh    WORD    offset of TAME INT 10h handler
  1536.  40h    WORD    offset of TAME INT 14h handler
  1537.  42h    WORD    offset of TAME INT 15h handler
  1538.  44h    WORD    offset of TAME INT 16h handler
  1539.  46h    WORD    offset of TAME INT 17h handler
  1540.  48h    WORD    offset of TAME INT 21h handler
  1541.  4Ah    WORD    offset of TAME INT 28h handler
  1542.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  1543.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1544.  50h    WORD    number of polls remaining before next task switch
  1545.  52h    WORD    /KEYIDLE value
  1546.  54h    WORD    /FG: value
  1547.  56h    WORD    task switches left until next FGONLY DESQview API call
  1548.  58h    WORD    multitasker version
  1549.  5Ah    WORD    virtual screen segment
  1550.  5Ch    BYTE    interrupts already grabbed by TAME (see above)
  1551.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  1552.  5Eh    BYTE    window or task number for this task
  1553.  5Fh    BYTE    multitasker type
  1554.         01h DESQview
  1555.         02h DoubleDOS
  1556.         03h TopView
  1557.         04h OmniView
  1558.         05h VM/386
  1559.  60h    BYTE    type of task switching selected (bit flags)
  1560.         bit 0: DESQview
  1561.         bit 1: DoubleDOS
  1562.         bit 2: TopView
  1563.         bit 3: OmniView
  1564.         bit 4: KeySwitch
  1565.         bit 5: HLT instruction
  1566.  61h    BYTE    watch_DOS
  1567.  62h    BYTE    bit flags
  1568.         bit 0: TAME enabled
  1569.         bit 1: /FREQ instead of /MAX (counts in 3Ch and 3Eh per tick)
  1570.         bit 2: /TIMEPOLL
  1571.         bit 3: /KEYPOLL
  1572.         bit 4: inhibit timer
  1573.         bit 5: enable status monitoring
  1574.  63h    BYTE    old status
  1575.  64h    WORD    signature DA34h
  1576.  
  1577. Format of TAME 2.60 data area:
  1578. Offset    Size    Description
  1579.  00h    BYTE    data structure minor version number (02h in TAME 2.60)
  1580.  01h    BYTE    data structure major version number (0Bh in TAME 2.60)
  1581.  02h    DWORD    number of task switches
  1582.  06h    DWORD    number of keyboard polls
  1583.  0Ah    DWORD    number of time polls
  1584.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1585.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1586.  16h    DWORD    time yielded
  1587.  1Ah    DWORD    time spent polling
  1588.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1589.  22h  4 BYTEs    ???
  1590.  26h    DWORD    original INT 10h
  1591.  2Ah    DWORD    original INT 14h
  1592.  2Eh    DWORD    original INT 15h
  1593.  32h    DWORD    original INT 16h
  1594.  36h    DWORD    original INT 17h
  1595.  3Ah    DWORD    original INT 21h
  1596.  3Eh    DWORD    original INT 28h
  1597.  42h    WORD    offset of TAME INT 10h handler
  1598.  44h    WORD    offset of TAME INT 14h handler
  1599.  46h    WORD    offset of TAME INT 15h handler
  1600.  48h    WORD    offset of TAME INT 16h handler
  1601.  4Ah    WORD    offset of TAME INT 17h handler
  1602.  4Ch    WORD    offset of TAME INT 21h handler
  1603.  4Eh    WORD    offset of TAME INT 28h handler
  1604.  50h    WORD    X in /max:X,Y or /freq:X,Y
  1605.  52h    WORD    Y in /max:X,Y or /freq:X,Y
  1606.  54h    WORD    number of polls remaining before next task switch
  1607.  56h    WORD    /KEYIDLE value
  1608.  58h  4 BYTEs    ???
  1609.  5Ch    WORD    X in /boost:X,Y
  1610.  5Eh    WORD    Y in /boost:X,Y
  1611.  60h    WORD    /FG: value
  1612.  62h    WORD    task switches left until next FGONLY DESQview API call
  1613.  64h    WORD    multitasker version ???
  1614.  66h    WORD    virtual screen segment
  1615.  68h    BYTE    interrupts already grabbed by TAME (see above)
  1616.  69h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1617.  6Ah    BYTE    window or task number for this task
  1618.  6Bh    BYTE    multitasker type
  1619.         01h DESQview
  1620.         02h DoubleDOS
  1621.         03h TopView
  1622.         04h OmniView
  1623.         05h VM/386
  1624.  6Ch    BYTE    type of task switching selected (bit flags)
  1625.         bit 0: DESQview
  1626.         bit 1: DoubleDOS
  1627.         bit 2: TopView
  1628.         bit 3: OmniView
  1629.         bit 4: KeySwitch
  1630.         bit 5: HLT instruction
  1631.  6Dh    BYTE    watch_DOS
  1632.  6Eh    BYTE    bit flags
  1633.         bit 0: TAME enabled
  1634.         bit 1: /FREQ instead of /MAX (counts in 50h and 52h per tick)
  1635.         bit 2: /TIMEPOLL
  1636.         bit 3: /KEYPOLL
  1637.         bit 4: inhibit timer
  1638.         bit 5: enable status monitoring
  1639.  6Fh    BYTE    old status
  1640.  70h    WORD    signature DA34h
  1641. --------R-212B44BX4D41-----------------------
  1642. INT 21 - pcANYWHERE IV/LAN - INSTALLATION CHECK
  1643.     AX = 2B44h ('D')
  1644.     BX = 4D41h ('MA')
  1645.     CX = 7063h ('pc')
  1646.     DX = 4157h ('AW')
  1647. Return: AX = 4F4Bh ('OK') if large host resident
  1648.        = 6F6Bh ('ok') if small host resident
  1649.     CX:DX -> API entry point
  1650. SeeAlso: INT 16/AH=79h
  1651.  
  1652. Call API entry point with:
  1653.     AX = 0000h get pcANYWHERE IV version
  1654.         DS:SI -> BYTE buffer for host type code
  1655.         Return: AH = version number
  1656.             AL = revision number
  1657.             DS:DI buffer byte filled with
  1658.             00h full-featured host
  1659.             01h limited-feature LAN host
  1660.             other API may not be supported
  1661.     AX = 0001h initialize operation
  1662.         DS:SI -> initialization request structure (see below)
  1663.         Return: AX = function status (see below)
  1664.     AX = 0002h get status
  1665.         Return: AH = current operating mode (see init req structure below)
  1666.             AL = current connection status
  1667.             bit 0: a physical connection is active
  1668.             bit 1: remove screen updating is active
  1669.             bit 2: connection checking is active
  1670.             bit 3: hot key detection is active
  1671.             bit 4: background file transfer is active
  1672.     AX = 0003h suspend remote screen updates
  1673.         Return: AX = function status (see below)
  1674.     AX = 0004h resume screen updates
  1675.         Return: AX = function status (see below)
  1676.     AX = 0005h end current remote access session
  1677.         DS:SI -> termination request structure (see below)
  1678.         Return: AX = function status (see below)
  1679.     AX = 0006h remove pcANYWHERE IV from memory
  1680.         Return: AX = status
  1681.             0000h successful
  1682.             FFD2h unable to release allocated memory
  1683.             FFD1h unable to release interrupt vectors
  1684.     AX = 8000h read data from communications channel
  1685.         DS:BX -> buffer
  1686.         CX = buffer size
  1687.         Return: AX >= number of characters read/available
  1688.             AX < 0 on error
  1689.     AX = 8001h write data to communications channel
  1690.         DS:BX -> buffer
  1691.         CX = buffer size
  1692.         Return: AX >= number of characters written
  1693.             AX < 0 on error
  1694.     AX = 8002h get connection status
  1695.         Return: AX = status
  1696.             > 0000h if connection active
  1697.             = 0000h if connection lost
  1698.             < 0000h on error
  1699.  
  1700. Format of initialization request structure:
  1701. Offset    Size    Description
  1702.  00h    BYTE    operating mode
  1703.         00h wait for a call
  1704.         01h hot key activates
  1705.         02h incoming call activates
  1706.         03h initiate a call
  1707.  01h  3 BYTEs    user ID to append to config file names
  1708.  04h    WORD    DS-relative pointer to path for config files
  1709.  06h    WORD    DS-relative pointer to path for program files
  1710.  
  1711. Format of termination request structure:
  1712. Offset    Size    Description
  1713.  00h    BYTE    operating mode after termination
  1714.         00h wait for a call
  1715.         01h hot key activates
  1716.         02h incoming call activates
  1717.         80h use current mode
  1718.         FFh remove from memory
  1719.  
  1720. Values for function status:
  1721.  0000h function completed successfully
  1722.  FFF2h unable to establish a connection when operating mode is
  1723.     "Initiate a call"
  1724.  FFF3h modem configuration is invalid (corrupt config)
  1725.  FFF4h modem initialization failed (no modem response)
  1726.  FFF5h the communications device could not be initialized
  1727.  FFF6h the host operator aborted the function
  1728.  FFF7h the communications driver type specified in the configuration file is
  1729.     different than the one loaded when pcANYWHERE IV was initially started
  1730.  FFF9h the configuration file is invalid
  1731.  FFFAh the configuration file could not be found
  1732.  FFFBh no session is active
  1733.  FFFCh a remote access session is active
  1734.  FFFDh the specified operating mode is invalid
  1735. --------D-212C-------------------------------
  1736. INT 21 - DOS 1+ - GET SYSTEM TIME
  1737.     AH = 2Ch
  1738. Return: CH = hour
  1739.     CL = minute
  1740.     DH = second
  1741.     DL = 1/100 seconds
  1742. Note:    on most systems, the resolution of the system clock is about 5/100sec,
  1743.       so returned times generally do not increment by 1
  1744.     on some systems, DL may always return 00h
  1745. SeeAlso: AH=2Ah,AH=2Dh,AH=E7h,INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
  1746. SeeAlso: INT 2F/AX=120Dh
  1747. --------D-212D-------------------------------
  1748. INT 21 - DOS 1+ - SET SYSTEM TIME
  1749.     AH = 2Dh
  1750.     CH = hour
  1751.     CL = minute
  1752.     DH = second
  1753.     DL = 1/100 seconds
  1754. Return: AL = result
  1755.         00h successful
  1756.         FFh invalid time, system time unchanged
  1757. Note:    DOS 3.3+ also sets CMOS clock
  1758. SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"
  1759. --------T-212D01CX7820-----------------------
  1760. INT 21 - PC-Mix - INSTALLATION CHECK
  1761.     AX = 2D01h
  1762.     CX = 7820h ('X ')
  1763.     DX = 6D69h ('MI')
  1764. Return: AL = 00h if installed
  1765. --------D-212E--DL00-------------------------
  1766. INT 21 - DOS 1+ - SET VERIFY FLAG
  1767.     AH = 2Eh
  1768.     DL = 00h (DOS 1.x/2.x only)
  1769.     AL = new state of verify flag
  1770.         00h off
  1771.         01h on
  1772. Notes:    default state at system boot is OFF
  1773.     when ON, all disk writes are verified provided the device driver
  1774.       supports read-after-write verification
  1775. SeeAlso: AH=54h
  1776. --------D-212F-------------------------------
  1777. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1778.     AH = 2Fh
  1779. Return: ES:BX -> current DTA
  1780. Note:    under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
  1781. SeeAlso: AH=1Ah
  1782. --------D-2130-------------------------------
  1783. INT 21 - DOS 2+ - GET DOS VERSION
  1784.     AH = 30h
  1785. ---DOS 5+ ---
  1786.     AL = what to return in BH
  1787.         00h OEM number (as for DOS 2.0-4.0x)
  1788.         01h version flag
  1789. Return: AL = major version number (00h if DOS 1.x)
  1790.     AH = minor version number
  1791.     BL:CX = 24-bit user serial number (most versions do not use this)
  1792. ---if DOS <5 or AL=00h---
  1793.     BH = MSDOS OEM number (see below)
  1794. ---if DOS 5+ and AL=01h---
  1795.     BH = version flag
  1796.         bit 3: DOS is in ROM
  1797.         other: reserved (0)
  1798. Notes:    the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
  1799.     the OS/2 v2.x Compatibility Box returns major version 14h (20)
  1800.     the Windows/NT DOS box returns version 5.00, subjet to SETVER
  1801.     DOS 4.01 and 4.02 identify themselves as version 4.00; use
  1802.       INT 21/AH=87h to distinguish between the original European MS-DOS 4.0
  1803.       and the later PC-DOS 4.0x and MS-DOS 4.0x
  1804.     generic MS-DOS 3.30, Compaq MS-DOS 3.31, and others identify themselves
  1805.       as PC-DOS by returning OEM number 00h
  1806.     the version returned under DOS 4.0x may be modified by entries in
  1807.       the special program list (see AH=52h)
  1808.     the version returned under DOS 5+ may be modified by SETVER; use
  1809.       AX=3306h to get the true version number
  1810. SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
  1811. SeeAlso: INT 2F/AX=122Fh,INT 2F/AX=E002h
  1812.  
  1813. Values for MSDOS OEM number:
  1814.  00h    IBM
  1815.  01h    Compaq???
  1816.  04h    AT&T???
  1817.  05h    Zenith
  1818.  16h    DEC
  1819.  23h    Olivetti
  1820.  29h    Toshiba
  1821.  4Dh    Hewlett-Packard
  1822.  99h    STARLITE architecture (OEM DOS, NETWORK DOS, SMP DOS)
  1823.  FFh    Microsoft, Phoenix
  1824. --------E-2130-------------------------------
  1825. INT 21 - Phar Lap 386/DOS-Extender, Intel Code Builder - INSTALLATION CHECK
  1826.     AH = 30h
  1827.     EAX = 00003000h
  1828.     EBX = 50484152h ("PHAR")
  1829. Return: AL = major DOS version
  1830.     AH = minor DOS version
  1831.     EAX bits 31-16 = 4458h ('DX') if 386/DOS-extender installed
  1832.         BL = ASCII major version number
  1833.     EAX bits 31-16 = 4243h ('BC') if Intel Code Builder installed
  1834.         EDX = address of GDA
  1835. SeeAlso: AX=2501h,AX=FF00h,INT 2F/AX=F100h
  1836. --------v-2130--DXABCD-----------------------
  1837. INT 21 - VIRUS - "Possessed" - INSTALLATION CHECK
  1838.     AH = 30h
  1839.     DX = ABCDh
  1840. Return: DX = DCBAh if installed
  1841. SeeAlso: AX=0D20h,AX=30F1h
  1842. --------T-213000BX1234-----------------------
  1843. INT 21 - CTask 2.0+ - INSTALLATION CHECK
  1844.     AX = 3000h
  1845.     BX = 1234h
  1846.     DS:DX -> 8-byte version string (DX < FFF0h) "CTask21",00h for v2.1-2.2
  1847. Return: AL = DOS major version
  1848.     AH = DOS minor version
  1849.     CX:BX -> Ctask global data block
  1850. Program: CTask is a multitasking kernel for C written by Thomas Wagner
  1851. Note:    if first eight bytes of returned data block equal eight bytes passed
  1852.       in, CTask is resident
  1853. --------O-213000BX3000-----------------------
  1854. INT 21 - PC-MOS/386 v3.0 - INSTALLATION CHECK/GET VERSION
  1855.     AX = 3000h
  1856.     BX = 3000h
  1857.     CX = DX = 3000h
  1858. Return: AX = PC-MOS version
  1859. Program: PC-MOS/386 is a multitasking/multiuser MS-DOS-compatible operating
  1860.       system by Software Links, Inc.
  1861. SeeAlso: AH=30h,INT 38/AH=02h,INT 38/AH=10h
  1862. --------v-2130F1-----------------------------
  1863. INT 21 - VIRUS - "Dutch-555"/"Quit 1992" - INSTALLATION CHECK
  1864.     AX = 30F1h
  1865. Return: AL = 00h if resident
  1866. SeeAlso: AH=30h/DX=ABCDh,AX=330Fh
  1867. ----------2130FFCX4445-----------------------
  1868. INT 21 - DESQ??? - INSTALLATION CHECK
  1869.     AX = 30FFh
  1870.     CX = 4445h ("DE")
  1871.     DX = 5351h ("SQ")
  1872. Return: BH = 05h if installed
  1873.     ???
  1874. Note:    called by DUBLDISK.COM v2.6; this function is not supported by
  1875.       DESQview, so it may be for DESQview's precursor DESQ.
  1876. SeeAlso: AX=4404h"DUBLDISK"
  1877. --------D-2131-------------------------------
  1878. INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
  1879.     AH = 31h
  1880.     AL = return code
  1881.     DX = number of paragraphs to keep resident
  1882. Return: never
  1883. Notes:    the value in DX only affects the memory block containing the PSP;
  1884.       additional memory allocated via AH=48h is not affected
  1885.     the minimum number of paragraphs which will remain resident is 11h
  1886.       for DOS 2.x and 06h for DOS 3+
  1887.     most TSRs can save some memory by releasing their environment block
  1888.       before terminating (see AH=26h,AH=49h)
  1889. SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27
  1890. --------D-2132-------------------------------
  1891. INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
  1892.     AH = 32h
  1893.     DL = drive number (00h = default, 01h = A:, etc)
  1894. Return: AL = status
  1895.         00h successful
  1896.         DS:BX -> Drive Parameter Block (DPB) for specified drive
  1897.         FFh invalid or network drive
  1898. Notes:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  1899.       except for the DWORD at offset 12h
  1900.     this call updates the DPB by reading the disk; the DPB may be accessed
  1901.       via the DOS list of lists (see AH=52h) if disk access is not
  1902.       desirable.
  1903.     undocumented prior to the release of DOS 5.0; only the DOS 4+ version
  1904.       of the DPB has been documented, however
  1905. SeeAlso: AH=1Fh,AH=52h
  1906.  
  1907. Format of DOS Drive Parameter Block:
  1908. Offset    Size    Description
  1909.  00h    BYTE    drive number (00h = A:, 01h = B:, etc)
  1910.  01h    BYTE    unit number within device driver
  1911.  02h    WORD    bytes per sector
  1912.  04h    BYTE    highest sector number within a cluster
  1913.  05h    BYTE    shift count to convert clusters into sectors
  1914.  06h    WORD    number of reserved sectors at beginning of drive
  1915.  08h    BYTE    number of FATs
  1916.  09h    WORD    number of root directory entries
  1917.  0Bh    WORD    number of first sector containing user data
  1918.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  1919.         16-bit FAT if greater than 0FF6h, else 12-bit FAT
  1920.  0Fh    BYTE    number of sectors per FAT
  1921.  10h    WORD    sector number of first directory sector
  1922.  12h    DWORD    address of device driver header
  1923.  16h    BYTE    media ID byte
  1924.  17h    BYTE    00h if disk accessed, FFh if not
  1925.  18h    DWORD    pointer to next DPB
  1926. ---DOS 2.x---
  1927.  1Ch    WORD    cluster containing start of current directory, 0000h=root,
  1928.         FFFFh = unknown
  1929.  1Eh 64 BYTEs    ASCIZ pathname of current directory for drive
  1930. ---DOS 3.x---
  1931.  1Ch    WORD    cluster at which to start search for free space when writing
  1932.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  1933. ---DOS 4.0-6.0---
  1934.  0Fh    WORD    number of sectors per FAT
  1935.  11h    WORD    sector number of first directory sector
  1936.  13h    DWORD    address of device driver header
  1937.  17h    BYTE    media ID byte
  1938.  18h    BYTE    00h if disk accessed, FFh if not
  1939.  19h    DWORD    pointer to next DPB
  1940.  1Dh    WORD    cluster at which to start search for free space when writing,
  1941.         usually the last cluster allocated
  1942.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  1943. --------D-2133-------------------------------
  1944. INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
  1945.     AH = 33h
  1946.     AL = subfunction
  1947.         00h get current extended break state
  1948.         Return: DL = current state, 00h = off, 01h = on
  1949.         01h set state of extended ^C/^Break checking
  1950.         DL = 00h off, check only on character I/O functions
  1951.              01h on, check on all DOS functions
  1952. Note:    under DOS 3.1+, this function does not use any of the DOS-internal and
  1953.       may thus be called at any time
  1954. SeeAlso: AX=3302h
  1955. --------D-213302-----------------------------
  1956. INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  1957.     AX = 3302h
  1958.     DL = new state
  1959.          00h for OFF or 01h for ON
  1960. Return: DL = old state of extended BREAK checking
  1961. Note:    this function does not use any of the DOS-internal stacks and may thus
  1962.       be called at any time; one possible use is modifying Control-Break
  1963.       checking from within an interrupt handler or TSR
  1964. SeeAlso: AH=33h
  1965. --------D-213305-----------------------------
  1966. INT 21 - DOS 4+ - GET BOOT DRIVE
  1967.     AX = 3305h
  1968. Return: DL = boot drive (1=A:,...)
  1969. Notes:    fully reentrant
  1970.     NEC 9800-series PCs always call the boot drive A: and assign the other
  1971.       drive letters sequentially to the other drives in the system
  1972. --------D-213306-----------------------------
  1973. INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
  1974.     AX = 3306h
  1975. Return:    BL = major version
  1976.     BH = minor version
  1977.     DL = revision (bits 2-0, all others 0)
  1978.     DH = version flags
  1979.         bit 3: DOS is in ROM
  1980.         bit 4: DOS in in HMA
  1981. Notes:    this function always returns the true version number, unlike AH=30h,
  1982.       whose return value may be changed with SETVER
  1983.     because of the conflict from the CBIS PowerLAN redirector (see next
  1984.       entry), programs should check whether BH is less than 100 (64h)
  1985.       and BL is at least 5 before accepting the returned BX as the true
  1986.       version number; however, even this is not entirely reliable when
  1987.       that redirector is loaded
  1988.     fully reentrant
  1989.     OS/2 v2.1 will return BX=0A14h (version 20.10)
  1990.     the Windows NT DOS box returns BX=3205h (version 5.50)5
  1991. BUG:    DR-DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
  1992.       subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
  1993.       for invalid subfunctions
  1994. SeeAlso: AH=30h,INT 2F/AX=112Fh
  1995. --------N-213306-----------------------------
  1996. INT 21 - CBIS POWERLAN - NETWORK REDIRECTOR - ???
  1997.     AX = 3306h
  1998. Return: AX = 3306h
  1999.     BL = ??? (usually 00h)
  2000.     BH = ??? (usually 00h or FFh)
  2001. Note:    unknown function, is in conflict with DOS 5+ version call
  2002. SeeAlso: AX=3306h"DOS"
  2003. --------v-21330F-----------------------------
  2004. INT 21 - VIRUS - "Burghofer" - INSTALLATION CHECK
  2005.     AX = 330Fh
  2006. Return: AL = 0Fh if resident (DOS returns AL=FFh)
  2007. SeeAlso: AX=30F1h,AX=33E0h
  2008. --------v-2133E0-----------------------------
  2009. INT 21 - VIRUS - "Oropax" - INSTALLATION CHECK
  2010.     AX = 33E0h
  2011. Return: AL = E0h if resident (DOS returns AL=FFh)
  2012. SeeAlso: AX=330Fh,AX=357Fh
  2013. --------D-2134-------------------------------
  2014. INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
  2015.     AH = 34h
  2016. Return: ES:BX -> one-byte InDOS flag
  2017. Notes:    the value of InDOS is incremented whenever an INT 21 function begins
  2018.       and decremented whenever one completes
  2019.     during an INT 28 call, it is safe to call some INT 21 functions even
  2020.       though InDOS may be 01h instead of zero
  2021.     InDOS alone is not sufficient for determining when it is safe to
  2022.       enter DOS, as the critical error handling decrements InDOS and
  2023.       increments the critical error flag for the duration of the critical
  2024.       error.  Thus, it is possible for InDOS to be zero even if DOS is
  2025.       busy.
  2026.     the critical error flag is the byte immediately following InDOS in
  2027.       DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3+ (except COMPAQ
  2028.       DOS 3.0, where the critical error flag is located 1AAh bytes BEFORE
  2029.       the critical section flag)
  2030.     For DOS 3.1+, an undocumented call exists to get the address of the
  2031.       critical error flag (see AX=5D06h)
  2032.     this function was undocumented prior to the release of DOS 5.0.
  2033. SeeAlso: AX=5D06h,AX=5D0Bh,INT 15/AX=DE1Fh,INT 28
  2034. --------D-2135-------------------------------
  2035. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  2036.     AH = 35h
  2037.     AL = interrupt number
  2038. Return: ES:BX -> current interrupt handler
  2039. Note:    under DR-DOS 5.0, this function does not use any of the DOS-internal
  2040.       stacks and may thus be called at any time
  2041. SeeAlso: AH=25h,AX=2503h
  2042. --------E-213501-----------------------------
  2043. INT 21 P - FlashTek X-32VM - ALLOCATE PROTECTED-MODE SELECTOR
  2044.     AX = 3501h
  2045. Return: CF clear if successful
  2046.         BX = new selector
  2047.     CF set on error (no more selectors available)
  2048. Note:    the new selector will be an expand-up read/write data selector with
  2049.       undefined base and limit
  2050. SeeAlso: AX=3502h,INT 31/AX=0000h
  2051. --------E-213502-----------------------------
  2052. INT 21 P - FlashTek X-32VM - DEALLOCATE PROTECTED-MODE SELECTOR
  2053.     AX = 3502h
  2054.     BX = selector
  2055. Return: CF clear if successful
  2056.     CF set on error (invalid selector)
  2057. Note:    only selectors allocated via AX=3501h should be deallocated
  2058. SeeAlso: AX=3501h,INT 31/AX=0001h
  2059. --------E-213503-----------------------------
  2060. INT 21 P - FlashTek X-32VM - SET SELECTOR BASE ADDRESS
  2061.     AX = 3503h
  2062.     BX = selector
  2063.     ECX = base address
  2064. Return: CF clear if successful
  2065.     CF set on error (invalid selector)
  2066. SeeAlso: AX=3504h,AX=3505h,INT 31/AX=0007h
  2067. --------E-213504-----------------------------
  2068. INT 21 P - FlashTek X-32VM - GET SELECTOR BASE ADDRESS
  2069.     AX = 3504h
  2070.     BX = selector
  2071. Return: CF clear if successful
  2072.         ECX = absolute base address of selector
  2073.     CF set on error (invalid selector)
  2074. SeeAlso: AX=3503h,INT 31/AX=0006h
  2075. --------E-213505-----------------------------
  2076. INT 21 P - FlashTek X-32VM - SET SELECTOR LIMIT
  2077.     AX = 3505h
  2078.     BX = selector
  2079.     ECX = desired limit
  2080. Return: CF clear if successful
  2081.         ECX = actual limit set
  2082.     CF set on error (no more selectors available)
  2083. Note:    the limit will be rounded down to nearest 4K boundary if the requested
  2084.       limit is greater than 1MB
  2085. SeeAlso: AX=3503h,INT 31/AX=0008h
  2086. --------E-21350A-----------------------------
  2087. INT 21 P - FlashTek X-32VM - PHYSICAL ADDRESS MAPPING
  2088.     AX = 350Ah
  2089.     EBX = absolute physical address
  2090.     ECX = size in bytes of area to map
  2091. Return: CF clear if successful
  2092.     CF set on error (insufficient memory or service refused by DPMI host)
  2093. Notes:    should not make repeated calls for the same physical address
  2094.     there is no provision for unmapping memory
  2095. --------E-21350B-----------------------------
  2096. INT 21 P - FlashTek X-32VM - UPDATE AND RETURN AVAILABLE FREE MEMORY
  2097.     AX = 350Bh
  2098.     DS = default selector for DS
  2099. Return: CF clear
  2100.     EAX = maximum amount of memory which can be allocated via AX=350Ch
  2101. SeeAlso: AX=350Ch
  2102. --------E-21350C-----------------------------
  2103. INT 21 P - FlashTek X-32VM - ALLOCATE A BLOCK OF MEMORY
  2104.     AX = 350Ch
  2105.     ECX = size of block in bytes
  2106.     DS = default DS
  2107. Return: CF clear if successful
  2108.         EAX = near pointer to new block
  2109.         EDX = new lowest legal value for stack
  2110.     CF set on error (requested size not multiple of 4K)
  2111. SeeAlso: AX=350Bh,AX=350Dh
  2112. --------E-21350D-----------------------------
  2113. INT 21 P - FlashTek X-32VM - RESERVE BLOCK OF MEMORY FOR 32-BIT STACK
  2114.     AX = 350Dh
  2115.     EBX = current ESP value
  2116.     ECX = size of block in bytes
  2117.     DS = default DS
  2118. Return: CF clear if successful
  2119.         EBX = new value for ESP
  2120.         EDX = suggested new limit for SS
  2121.     CF set on error
  2122. Note:    this function should only be called once during initialization
  2123. SeeAlso: AX=350Bh,AX=350Ch
  2124. --------v-21357F-----------------------------
  2125. INT 21 - VIRUS - "Agiplan"/"Month 4-6" - INSTALLATION CHECK
  2126.     AX = 357Fh
  2127. Return: DX = FFFFh if installed
  2128. SeeAlso: AX=33E0h,AX=3DFFh
  2129. --------D-2136-------------------------------
  2130. INT 21 - DOS 2+ - GET FREE DISK SPACE
  2131.     AH = 36h
  2132.     DL = drive number (00h = default, 01h = A:, etc)
  2133. Return: AX = FFFFh if invalid drive
  2134.     else
  2135.         AX = sectors per cluster
  2136.         BX = number of free clusters
  2137.         CX = bytes per sector
  2138.         DX = total clusters on drive
  2139. Notes:    free space on drive in bytes is AX * BX * CX
  2140.     total space on drive in bytes is AX * CX * DX
  2141.     "lost clusters" are considered to be in use
  2142.     according to Dave Williams' MS-DOS reference, the value in DX is
  2143.       incorrect for non-default drives after ASSIGN is run
  2144. SeeAlso: AH=1Bh,AH=1Ch
  2145. --------D-213700-----------------------------
  2146. INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
  2147.     AX = 3700h
  2148. Return: AL = status
  2149.         00h successful
  2150.         DL = current switch character
  2151.         FFh unsupported subfunction
  2152. Desc:    Determine the character which is used to introduce command switches.
  2153.       This setting is ignored by DOS commands in version 4.0 and higher,
  2154.       but is honored by many third-party programs.
  2155. Notes:    documented in some OEM versions of some releases of DOS
  2156.     supported by OS/2 compatibility box
  2157.     always returns DL=2Fh for DOS 5+
  2158. SeeAlso: AX=3701h
  2159. --------D-213701-----------------------------
  2160. INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
  2161.     AX = 3701h
  2162.     DL = new switch character
  2163. Return: AL = status
  2164.         00h successful
  2165.         FFh unsupported subfunction
  2166. Notes:    documented in some OEM versions of some releases of DOS
  2167.     supported by OS/2 compatibility box
  2168.     ignored by DOS 5+
  2169. SeeAlso: AX=3700h
  2170. --------D-2137-------------------------------
  2171. INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
  2172.     AH = 37h
  2173.     AL = subfunction
  2174.         02h get availdev flag
  2175.         Return: DL = 00h \DEV\ must precede character device names
  2176.                = nonzero \DEV\ is optional
  2177.         03h set availdev flag
  2178.         DL = 00h    \DEV\ is mandatory
  2179.            = nonzero    \DEV\ is optional
  2180. Return: AL = status
  2181.         00h successful
  2182.         FFh unsupported subfunction
  2183. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  2184.       names without generating an error even if the directory \DEV does
  2185.       not actually exist (other paths generate an error if they do not
  2186.       exist).
  2187.     although DOS 3.3+ accepts these calls, they have no effect, and
  2188.       AL=02h always returns DL=FFh
  2189. --------D-2138-------------------------------
  2190. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  2191.     AH = 38h
  2192. --DOS 2.x--
  2193.     AL = 00h get current-country info
  2194.     DS:DX -> buffer for returned info (see below)
  2195. Return: CF set on error
  2196.         AX = error code (02h)
  2197.     CF clear if successful
  2198.         AX = country code (MS-DOS 2.11 only)
  2199.         buffer at DS:DX filled
  2200. --DOS 3+--
  2201.     AL = 00h for current country
  2202.     AL = 01h thru 0FEh for specific country with code <255
  2203.     AL = 0FFh for specific country with code >= 255
  2204.        BX = 16-bit country code
  2205.     DS:DX -> buffer for returned info (see below)
  2206. Return:    CF set on error
  2207.         AX = error code (02h)
  2208.     CF clear if successful
  2209.         BX = country code
  2210.         DS:DX buffer filled
  2211. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  2212.  
  2213. Format of PC-DOS 2.x country info:
  2214. Offset    Size    Description
  2215.  00h    WORD    date format  0 = USA    mm dd yy
  2216.                  1 = Europe dd mm yy
  2217.                  2 = Japan    yy mm dd
  2218.  02h    BYTE    currency symbol
  2219.  03h    BYTE    00h
  2220.  04h    BYTE    thousands separator char
  2221.  05h    BYTE    00h
  2222.  06h    BYTE    decimal separator char
  2223.  07h    BYTE    00h
  2224.  08h 24 BYTEs    reserved
  2225.  
  2226. Format of MS-DOS 2.x,DOS 3+ country info:
  2227. Offset    Size    Description
  2228.  00h    WORD    date format (see above)
  2229.  02h  5 BYTEs    ASCIZ currency symbol string
  2230.  07h  2 BYTEs    ASCIZ thousands separator
  2231.  09h  2 BYTEs    ASCIZ decimal separator
  2232.  0Bh  2 BYTEs    ASCIZ date separator
  2233.  0Dh  2 BYTEs    ASCIZ time separator
  2234.  0Fh    BYTE    currency format
  2235.         bit 2 = set if currency symbol replaces decimal point
  2236.         bit 1 = number of spaces between value and currency symbol
  2237.         bit 0 = 0 if currency symbol precedes value
  2238.             1 if currency symbol follows value
  2239.  10h    BYTE    number of digits after decimal in currency
  2240.  11h    BYTE    time format
  2241.         bit 0 = 0 if 12-hour clock
  2242.             1 if 24-hour clock
  2243.  12h    DWORD    address of case map routine
  2244.         (FAR CALL, AL = character to map to upper case [>= 80h])
  2245.  16h  2 BYTEs    ASCIZ data-list separator
  2246.  18h 10 BYTEs    reserved
  2247.  
  2248. Values for country code:
  2249.  001h    United States
  2250.  002h    Canadian-French
  2251.  003h    Latin America
  2252.  01Fh    Netherlands
  2253.  020h    Belgium
  2254.  021h    France
  2255.  022h    Spain
  2256.  024h    Hungary (not supported by DR-DOS 5.0)
  2257.  026h    Yugoslavia (not supported by DR-DOS 5.0)
  2258.  027h    Italy
  2259.  029h    Switzerland
  2260.  02Ah    Czechoslovakia (not supported by DR-DOS 5.0)
  2261.  02Bh    Austria (DR-DOS 5.0)
  2262.  02Ch    United Kingdom
  2263.  02Dh    Denmark
  2264.  02Eh    Sweden
  2265.  02Fh    Norway
  2266.  030h    Poland (not supported by DR-DOS 5.0)
  2267.  031h    Germany
  2268.  037h    Brazil (not supported by DR-DOS 5.0)
  2269.  03Dh    International English [Australia in DR-DOS 5.0]
  2270.  051h    Japan (DR-DOS 5.0)
  2271.  052h    Korea (DR-DOS 5.0)
  2272.  15Fh    Portugal
  2273.  166h    Finland
  2274.  311h    Middle East (DR-DOS 5.0)
  2275.  3CCh    Israel (DR-DOS 5.0)
  2276. --------D-2138--DXFFFF-----------------------
  2277. INT 21 - DOS 3+ - SET COUNTRY CODE
  2278.     AH = 38h
  2279.     DX = FFFFh
  2280.     AL = 01h thru FEh for specific country with code <255
  2281.     AL = FFh for specific country with code >= 255
  2282.        BX = 16-bit country code (see AH=38h)
  2283. Return: CF set on error
  2284.         AX = error code (see AH=59h)
  2285.     CF clear if successful
  2286. Note:    not supported by OS/2
  2287. SeeAlso: INT 2F/AX=1403h
  2288. --------D-2139-------------------------------
  2289. INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
  2290.     AH = 39h
  2291.     DS:DX -> ASCIZ pathname
  2292. Return: CF clear if successful
  2293.         AX destroyed
  2294.     CF set on error
  2295.         AX = error code (03h,05h) (see AH=59h)
  2296. Notes:    all directories in the given path except the last must exist
  2297.     fails if the parent directory is the root and is full
  2298.     DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
  2299.       it is not possible to make that directory the current directory
  2300.       because the path would exceed 64 characters
  2301.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2302. SeeAlso: AH=3Ah,AH=3Bh,AH=6Dh,AH=E2h/SF=0Ah,INT 2F/AX=1103h
  2303. --------D-213A-------------------------------
  2304. INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
  2305.     AH = 3Ah
  2306.     DS:DX -> ASCIZ pathname of directory to be removed
  2307. Return: CF clear if successful
  2308.         AX destroyed
  2309.     CF set on error
  2310.         AX = error code (03h,05h,06h,10h) (see AH=59h)
  2311. Notes:    directory must be empty (contain only '.' and '..' entries)
  2312.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2313. SeeAlso: AH=39h,AH=3Bh,AH=E2h/SF=0Bh,INT 2F/AX=1101h
  2314. --------D-213B-------------------------------
  2315. INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
  2316.     AH = 3Bh
  2317.     DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
  2318. Return: CF clear if successful
  2319.         AX destroyed
  2320.     CF set on error
  2321.         AX = error code (03h) (see AH=59h)
  2322. Notes:    if new directory name includes a drive letter, the default drive is
  2323.       not changed, only the current directory on that drive
  2324.     changing the current directory also changes the directory in which
  2325.       FCB file calls operate
  2326.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2327. SeeAlso: AH=47h,INT 2F/AX=1105h
  2328. --------D-213C-------------------------------
  2329. INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
  2330.     AH = 3CH
  2331.     CX = file attributes (see below)
  2332.     DS:DX -> ASCIZ filename
  2333. Return: CF clear if successful
  2334.         AX = file handle
  2335.     CF set on error
  2336.         AX = error code (03h,04h,05h) (see AH=59h)
  2337. Notes:    if a file with the given name exists, it is truncated to zero length
  2338.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2339. SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h,INT 2F/AX=1117h
  2340.  
  2341. Bitfields for file attributes:
  2342.  bit 0    read-only
  2343.  bit 1    hidden
  2344.  bit 2    system
  2345.  bit 3    volume label (ignored)
  2346.  bit 4    reserved, must be zero (directory)
  2347.  bit 5    archive bit
  2348.  bit 7    if set, file is shareable under Novell NetWare
  2349. --------D-213D-------------------------------
  2350. INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
  2351.     AH = 3Dh
  2352.     AL = access and sharing modes (see below)
  2353.     DS:DX -> ASCIZ filename
  2354.     CL = attribute mask of files to look for (server call only)
  2355. Return: CF clear if successful
  2356.         AX = file handle
  2357.     CF set on error
  2358.         AX = error code (01h,02h,03h,04h,05h,0Ch) (see AH=59h)
  2359. Notes:    file pointer is set to start of file
  2360.     file handles which are inherited from a parent also inherit sharing
  2361.       and access restrictions
  2362.     files may be opened even if given the hidden or system attributes
  2363.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2364. SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1116h,INT 2F/AX=1226h
  2365.  
  2366. Bitfields for access and sharing modes:
  2367.  bits 2-0 access mode
  2368.     000 read only
  2369.     001 write only
  2370.     010 read/write
  2371.     011 (DOS 5+ internal) passed to redirector on EXEC to allow
  2372.         case-sensitive filenames
  2373.  bit 3    reserved (0)
  2374.  bits 6-4 sharing mode (DOS 3+)
  2375.     000 compatibility mode
  2376.     001 "DENYALL" prohibit both read and write access by others
  2377.     010 "DENYWRITE" prohibit write access by others
  2378.     011 "DENYREAD" prohibit read access by others
  2379.     100 "DENYNONE" allow full access by others
  2380.  bit 7    inheritance
  2381.     if set, file is private to current process and will not be inherited
  2382.       by child processes
  2383.  
  2384. File sharing behavior:
  2385.       |    Second and subsequent Opens
  2386.  First      |Compat  Deny      Deny     Deny    Deny
  2387.  Open      |       All      Write     Read    None
  2388.       |R W RW R W RW R W RW R W RW R W RW
  2389.  - - - - -| - - - - - - - - - - - - - - - - -
  2390.  Compat    R |Y Y Y  N N N     1 N N    N N N  1 N N
  2391.     W |Y Y Y  N N N     N N N    N N N  N N N
  2392.     RW|Y Y Y  N N N     N N N    N N N  N N N
  2393.  - - - - -|
  2394.  Deny    R |C C C  N N N     N N N    N N N  N N N
  2395.  All    W |C C C  N N N     N N N    N N N  N N N
  2396.     RW|C C C  N N N     N N N    N N N  N N N
  2397.  - - - - -|
  2398.  Deny    R |2 C C  N N N     Y N N    N N N  Y N N 
  2399.  Write    W |C C C  N N N     N N N    Y N N  Y N N 
  2400.     RW|C C C  N N N     N N N    N N N  Y N N
  2401.  - - - - -|
  2402.  Deny    R |C C C  N N N     N Y N    N N N  N Y N
  2403.  Read    W |C C C  N N N     N N N    N Y N  N Y N
  2404.     RW|C C C  N N N     N N N    N N N  N Y N
  2405.  - - - - -|
  2406.  Deny    R |2 C C  N N N     Y Y Y    N N N  Y Y Y
  2407.  None    W |C C C  N N N     N N N    Y Y Y  Y Y Y
  2408.     RW|C C C  N N N     N N N    N N N  Y Y Y
  2409. Legend: Y = open succeeds, N = open fails with error code 05h
  2410.     C = open fails, INT 24 generated
  2411.     1 = open succeeds if file read-only, else fails with error code
  2412.     2 = open succeeds if file read-only, else fails with INT 24
  2413. --------v-213DFF-----------------------------
  2414. INT 21 - VIRUS - "JD-448" - INSTALLATION CHECK
  2415.     AX = 3DFFh
  2416. Return: AX = 4A44h if resident
  2417. SeeAlso: AX=357Fh,AX=4203h
  2418. --------D-213E-------------------------------
  2419. INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
  2420.     AH = 3Eh
  2421.     BX = file handle
  2422. Return: CF clear if successful
  2423.         AX destroyed
  2424.     CF set on error
  2425.         AX = error code (06h) (see AH=59h)
  2426. Note:    if the file was written to, any pending disk writes are performed, the
  2427.       time and date stamps are set to the current time, and the directory
  2428.       entry is updated
  2429. SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
  2430. --------D-213F-------------------------------
  2431. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  2432.     AH = 3Fh
  2433.     BX = file handle
  2434.     CX = number of bytes to read
  2435.     DS:DX -> buffer for data
  2436. Return: CF clear if successful
  2437.         AX = number of bytes actually read (0 if at EOF before call)
  2438.     CF set on error
  2439.         AX = error code (05h,06h) (see AH=59h)
  2440. Notes:    data is read beginning at current file position, and the file position
  2441.       is updated after a successful read
  2442.     the returned AX may be smaller than the request in CX if a partial
  2443.       read occurred
  2444.     if reading from CON, read stops at first CR
  2445.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2446. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  2447. --------G-213F-------------------------------
  2448. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  2449.     AH = 3Fh
  2450.     BX = handle for character device "TDHDEBUG"
  2451.     CX = number of bytes to read
  2452.     DS:DX -> buffer for status block (see below)
  2453. Return: CF clear if successful
  2454.         AX = number of bytes actually read
  2455.     CF set on error
  2456.         AX = error code (05h,06h) (see AH=59h)
  2457. SeeAlso: AH=40h"Turbo Debug"
  2458.  
  2459. Format of status block:
  2460. Offset    Size    Description
  2461.  00h    BYTE    status of command
  2462.         00h successful
  2463.         01h invalid handle
  2464.         02h no more breakpoints available
  2465.         03h hardware does not support specified breakpoint type
  2466.         04h previous command prevents execution
  2467.         05h debugger hardware not found
  2468.         06h hardware failure
  2469.         07h invalid command
  2470.         08h driver not initialized yet
  2471.         FEh recursive entry (hardware breakpoint inside hw bp handler)
  2472. ---status for command 01h---
  2473.  01h    WORD    device driver interface version number (currently 1)
  2474.  03h    WORD    device driver software version
  2475.  05h    BYTE    maximum simultaneous hardware breakpoints
  2476.  06h    BYTE    configuration bits
  2477.         bit 0: CPU and DMA accesses are distinct
  2478.         bit 1: can detect DMA transfers
  2479.         bit 2: supports data mask
  2480.         bit 3: hardware pass counter on breakpoints
  2481.         bit 4: can match on data as well as addresses
  2482.  07h    BYTE    supported breakpoint types (see below)
  2483.  08h    WORD    supported addressing match modes (see below)
  2484.  0Ah    WORD    supported data matches (see below)
  2485.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  2486.  0Dh    WORD    size of onboard memory (in K)
  2487.  0Fh    WORD    maximum number of trace-back events
  2488.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  2489.         supported)
  2490. ---status for command 04h---
  2491.  01h    BYTE    handle to use when referring to the just-set breakpoint
  2492.  
  2493. Bitfields for supported breakpoint types:
  2494.  bit 0    memory read
  2495.  bit 1    memory write
  2496.  bit 2    memory read/write
  2497.  bit 3    I/O read
  2498.  bit 4    I/O write
  2499.  bit 5    I/O read/write
  2500.  bit 6    instruction fetch
  2501.  
  2502. Bitfields for supported addressing match modes:
  2503.  bit 0    any address
  2504.  bit 1    equal to test value
  2505.  bit 2    not equal
  2506.  bit 3    above test value
  2507.  bit 4    below test value
  2508.  bit 5    below or equal
  2509.  bit 6    above or equal
  2510.  bit 7    within range
  2511.  bit 8    outside range
  2512.  
  2513. Bitfields for supported data matches:
  2514.  bit 0    any data
  2515.  bit 1    equal to test value
  2516.  bit 2    not equal
  2517.  bit 3    above test value
  2518.  bit 4    below test value
  2519.  bit 5    below or equal
  2520.  bit 6    above or equal
  2521.  bit 7    within range
  2522.  bit 8    outside range
  2523. --------N-213F-------------------------------
  2524. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  2525.     AH = 3Fh
  2526.     BX = handle for character device "$IPCUST"
  2527.     CX = number of bytes to read
  2528.     DS:DX -> buffer for configuration data (see below)
  2529. Return: CF clear if successful
  2530.         AX = number of bytes actually read
  2531.     CF set on error
  2532.         AX = error code (05h,06h) (see AH=59h)
  2533. Notes:    if less than the entire data is read or written, the next read/write
  2534.       continues where the previous one ended; IOCTL calls AX=4402h and
  2535.       AX=4403h both reset the location at which the next operation starts
  2536.       to zero
  2537.     the data pointer is also reset to zero if the previous read or write
  2538.       reached or exceeded the end of the data, when the current function
  2539.       is read and the previous was write, or vice versa
  2540.     v2.1+ uses a new configuration method, but allows the installation
  2541.       of IPCUST.SYS for backward compatibility with other software which
  2542.       must read the PC/TCP configuration
  2543. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST"
  2544.  
  2545. Format of configuration data:
  2546. Offset    Size    Description
  2547.  00h 12 BYTEs    IPCUST.SYS device driver header
  2548.  12h    BYTE    ???
  2549.  13h    BYTE    ???
  2550.  14h    WORD    ???
  2551.  16h    BYTE    bit flags
  2552.         bit 0: send BS rather than DEL for BackSpace key
  2553.         bit 1: wrap long lines
  2554.  17h    BYTE    ???
  2555.  18h 64 BYTEs    ASCIZ hostname
  2556.  58h 64 BYTEs    ASCIZ domain name
  2557.         (fully qualified domain name is hostname.domain-name)
  2558.  98h 16 BYTEs    ASCIZ username
  2559.  A8h 64 BYTEs    ASCIZ full name
  2560.  E8h 64 BYTEs    ASCIZ office address
  2561. 128h 32 BYTEs    ASCIZ phone number
  2562. 148h    WORD    offset from GMT in minutes
  2563. 14Ah  4 BYTEs    ASCIZ timezone name
  2564. 14Eh    WORD    number of time servers
  2565. 150h  ? DWORDs    IP addresses for time servers (big-endian)
  2566.     ???
  2567. 164h    WORD    number of old-style name servers
  2568. 166h  3 DWORDs    IP addresses for name servers (big-endian)
  2569. 172h    WORD    number of domain name servers
  2570. 174h  3 DWORDs    IP addresses for domain name servers (big-endian)
  2571. 180h    DWORD    IP address of default gateway (big-endian)
  2572. 184h    DWORD    IP address of log server (big-endian)
  2573. 188h    DWORD    IP address of cookie server (big-endian)
  2574. 18Ch    DWORD    IP address of lpr server (big-endian)
  2575. 190h    DWORD    IP address of imagen print server
  2576. 194h 54 BYTEs    ???
  2577. 1E8h    WORD    TCP default window size in bytes
  2578. 1EAh    WORD    TCP low window size
  2579. 1ECh 64 BYTEs    ASCIZ host tabel filename
  2580. 22Ch  2 BYTEs    ???
  2581. 22Eh 80 BYTEs    ASCIZ mail relay host name
  2582. 27Eh    BYTE    ???
  2583. 27Fh    BYTE    ??? bit flags
  2584. 280h 44 BYTEs    ???
  2585. 2ACh    WORD    ???
  2586. 2AEh 202 BYTEs    ???
  2587. --------N-213F-------------------------------
  2588. INT 21 - WORKGRP.SYS - GET ENTRY POINT
  2589.     AH = 3Fh
  2590.     BX = file handle for device "NET$HLP$"
  2591.     CX = 0008h
  2592.     DS:DX -> buffer for entry point record (see AX=4402h"WORKGRP.SYS")
  2593. Return: CF clear if successful
  2594.         AX = number of bytes actually read (0 if at EOF before call)
  2595.     CF set on error
  2596.         AX = error code (05h,06h) (see AH=59h)
  2597. Program: WORKGRP.SYS is distributed with MS-DOS 6.0 to permit communication
  2598.       with PCs running Windows for Workgroups or LAN Manager
  2599. SeeAlso: AX=4402h"WORKGRP.SYS",INT 2F/AX=9400h
  2600. --------D-2140-------------------------------
  2601. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  2602.     AH = 40h
  2603.     BX = file handle
  2604.     CX = number of bytes to write
  2605.     DS:DX -> data to write
  2606. Return: CF clear if successful
  2607.         AX = number of bytes actually written
  2608.     CF set on error
  2609.         AX = error code (05h,06h) (see AH=59h)
  2610. Notes:    if CX is zero, no data is written, and the file is truncated or
  2611.       extended to the current position
  2612.     data is written beginning at the current file position, and the file
  2613.       position is updated after a successful write
  2614.     the usual cause for AX < CX on return is a full disk
  2615. BUG:    a write of zero bytes will appear to succeed when it actually failed
  2616.       if the write is extending the file and there is not enough disk
  2617.       space for the expanded file (DOS 5.0-6.0); one should therefore check
  2618.       whether the file was in fact extended by seeking to 0 bytes from
  2619.       the end of the file (INT 21/AX=4202h/CX=0/DX=0)
  2620.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2621. SeeAlso: AH=28h,AH=3Fh,AH=93h,INT 2F/AX=1109h
  2622. --------G-2140-------------------------------
  2623. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  2624.     AH = 40h
  2625.     BX = handle for character device "TDHDEBUG"
  2626.     CX = number of bytes to write
  2627.     DS:DX -> hardware breakpoint command (see below)
  2628. Return: CF clear if successful
  2629.         AX = number of bytes actually written
  2630.     CF set on error
  2631.         AX = error code (05h,06h) (see AH=59h)
  2632. Note:    results are retrieved by reading from the device
  2633. SeeAlso: AH=3Fh"Turbo Debug"
  2634.  
  2635. Format of hardware breakpoint commands:
  2636. Offset    Size    Description
  2637.  00h    BYTE    command code
  2638.         00h install interrupt vectors
  2639.         01h get hardware capabilities
  2640.         02h enable hardware breakpoints
  2641.         03h disable hardware breakpoints
  2642.         04h set hardware breakpoint
  2643.         05h clear hardware breakpoint
  2644.         06h set I/O base address and reset hardware
  2645.         07h restore interrupt vectors
  2646. ---command code 00h---
  2647.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  2648.         hardware breakpoint; call with CPU state the same as on
  2649.         the breakpoint except for pushing AX and placing an entry
  2650.         code (FFh if breakout button or breakpoint handle) in AH
  2651. ---command code 04h---
  2652.  01h    BYTE    breakpoint type
  2653.         00h memory read
  2654.         01h memory write
  2655.         02h memory read/write
  2656.         03h I/O read
  2657.         04h I/O write
  2658.         05h I/O read/write
  2659.         06h instruction fetch
  2660.  02h    BYTE    address matching mode
  2661.         00h any address
  2662.         01h equal to test value
  2663.         02h different from test value
  2664.         03h above test value
  2665.         04h below test value
  2666.         05h below or equal to test value
  2667.         06h above or equal to test value
  2668.         07h within inclusive range
  2669.         08h outside specified range
  2670.  03h    DWORD    32-bit linear low address
  2671.  07h    DWORD    32-bit linear high address
  2672.  0Bh    WORD    pass count
  2673.  0Dh    BYTE    data size (01h, 02h, or 04h)
  2674.  0Eh    BYTE    source of matched bus cycle
  2675.         01h CPU
  2676.         02h DMA
  2677.         03h either
  2678.  0Fh    BYTE    data-matching mode
  2679.         00h match any
  2680.         01h equal to test value
  2681.         02h different from test value
  2682.         03h above test value
  2683.         04h below test value
  2684.         05h below or equal to test value
  2685.         06h above or equal to test value
  2686.         07h within specified range
  2687.         08h outside specified range
  2688.  10h    DWORD    low data value
  2689.  14h    DWORD    high data value
  2690.  18h    DWORD    data mask specifying which bits of the data are tested
  2691. ---command code 05h---
  2692.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  2693.         04h)
  2694. ---command code 06h---
  2695.  01h    WORD    base address of hardware debugger board
  2696. --------N-2140-------------------------------
  2697. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  2698.     AH = 40h
  2699.     BX = handle for character device "$IPCUST"
  2700.     CX = number of bytes to write
  2701.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  2702. Return: CF clear if successful
  2703.         AX = number of bytes actually written
  2704.     CF set on error
  2705.         AX = error code (05h,06h) (see AH=59h)
  2706. Notes:    if less than the entire data is read or written, the next read/write
  2707.       continues where the previous one ended; IOCTL calls AX=4402h and
  2708.       AX=4403h both reset the location at which the next operation starts
  2709.       to zero
  2710.     the data pointer is also reset to zero if the previous read or write
  2711.       reached or exceeded the end of the data, when the current function
  2712.       is read and the previous was write, or vice versa
  2713.     v2.1+ uses a new configuration method, but allows the installation
  2714.       of IPCUST.SYS for backward compatibility with other software which
  2715.       must read the PC/TCP configuration
  2716. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  2717. --------j-214000BX0002-----------------------
  2718. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  2719.     AX = 4000h
  2720.     BX = 0002h
  2721.     CX = 0000h
  2722.     DS:DX = 0000h:0000h
  2723. Return: CF clear if installed
  2724.         AX = CS of resident code
  2725. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  2726.       noises when programs output a bell
  2727. SeeAlso: AX=4001h
  2728. --------j-214001BX0002-----------------------
  2729. INT 21 - FARTBELL.EXE - FORCE NOISE
  2730.     AX = 4001h
  2731.     BX = 0002h
  2732.     CX = 0000h
  2733.     DS:DX = 0000h:0000h
  2734. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  2735.       noises when programs output a bell
  2736. SeeAlso: AX=4000h
  2737. --------D-2141-------------------------------
  2738. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  2739.     AH = 41h
  2740.     DS:DX -> ASCIZ filename (no wildcards, but see below)
  2741.     CL = attribute mask for deletion (server call only, see below)
  2742. Return: CF clear if successful
  2743.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  2744.     CF set on error
  2745.         AX = error code (02h,03h,05h) (see AH=59h)
  2746. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  2747.       the filespec must be canonical (as returned by AH=60h), and only
  2748.       files matching the attribute mask in CL are deleted
  2749.     DOS does not erase the file's data; it merely becomes inaccessible
  2750.       because the FAT chain for the file is cleared
  2751.     deleting a file which is currently open may lead to filesystem
  2752.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  2753.       referencing the deleted file, thus allowing writes to a nonexistant
  2754.       file.
  2755.     under DRDOS and DR Multiuser DOS, this function will fail if the file
  2756.       is currently open
  2757.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2758. SeeAlso: AH=13h,AX=4301h,AX=5D00h,AH=60h,AX=F244h,INT 2F/AX=1113h
  2759. --------y-214101DXFFFE-----------------------
  2760. INT 21 - SoftLogic Data Guardian - ???
  2761.     AX = 4101h
  2762.     DX = FFFEh
  2763. Return: AX = 0000h if installed
  2764. Note:    resident code sets several internal variables on this call
  2765. --------D-2142-------------------------------
  2766. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  2767.     AH = 42h
  2768.     AL = origin of move
  2769.         00h start of file
  2770.         01h current file position
  2771.         02h end of file
  2772.     BX = file handle
  2773.     CX:DX = offset from origin of new file position
  2774. Return: CF clear if successful
  2775.         DX:AX = new file position in bytes from start of file
  2776.     CF set on error
  2777.         AX = error code (01h,06h) (see AH=59h)
  2778. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  2779.       start of the file; no error is returned in that case, but subsequent
  2780.       attempts at I/O will produce errors
  2781.     if the new position is beyond the current end of file, the file will
  2782.       be extended by the next write (see AH=40h)
  2783. BUG:    using this method to grow a file from zero bytes to a very large size
  2784.       can corrupt the FAT in some versions of DOS; the file should first
  2785.       be grown from zero to one byte and then to the desired large size
  2786. SeeAlso: AH=24h,INT 2F/AX=1228h
  2787. --------v-214203-----------------------------
  2788. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  2789.     AX = 4203h
  2790. Return: AX = 1234h if resident
  2791. SeeAlso: AX=3DFFh,AX=4243h
  2792. --------v-214243-----------------------------
  2793. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  2794.     AX = 4243h
  2795. Return: AX = 5678h if resident
  2796. SeeAlso: AX=4203h,AX=4B04h
  2797. --------D-214300-----------------------------
  2798. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  2799.     AX = 4300h
  2800.     DS:DX -> ASCIZ filename
  2801. Return: CF clear if successful
  2802.         CX = file attributes (see AX=4301h)
  2803.         AX = CX (DR-DOS 5.0)
  2804.     CF set on error
  2805.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2806. Note:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2807. SeeAlso: AX=4301h,AX=4310h,AH=B6h,INT 2F/AX=110Fh
  2808. --------D-214301-----------------------------
  2809. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  2810.     AX = 4301h
  2811.     CX = new file attributes (see below)
  2812.     DS:DX -> ASCIZ filename
  2813. Return: CF clear if successful
  2814.         AX destroyed
  2815.     CF set on error
  2816.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2817. Notes:    will not change volume label or directory attribute bits, but will
  2818.       change the other attribute bits of a directory (the directory
  2819.       bit must be cleared to successfully change the other attributes of a
  2820.       directory, but the directory will not be changed to a normal file as
  2821.       a result)
  2822.     MS-DOS 4.01 reportedly closes the file if it is currently open
  2823.     for security reasons, the Novell NetWare execute-only bit can never
  2824.       be cleared; the file must be deleted and recreated
  2825.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2826.     DOS 5.0 SHARE will close the file if it is currently open in sharing-
  2827.       compatibility mode, otherwise a sharing violation critical error is
  2828.       generated if the file is currently open
  2829. SeeAlso: AX=4300h,AX=4311h,INT 2F/AX=110Eh
  2830.  
  2831. Bitfields for file attributes:
  2832.  bit 7    shareable (Novell NetWare)
  2833.  bit 6    unused
  2834.  bit 5    archive
  2835.  bit 4    directory
  2836.  bit 3    volume label
  2837.      execute-only (Novell NetWare)
  2838.  bit 2    system
  2839.  bit 1    hidden
  2840.  bit 0    read-only
  2841. --------O-214302-----------------------------
  2842. INT 21 - DR-DOS 3.41+ internal - GET ACCESS RIGHTS
  2843.     AX = 4302h
  2844.     DS:DX -> ASCIZ pathname
  2845. Return: CF clear if successful
  2846.         CX = access rights (see below)
  2847.         AX = CX (DR-DOS 5.0)
  2848.     CF set on error
  2849.         AX = error code
  2850. Desc:    Determine which operations the calling program may perform on a
  2851.       specified file without being required to provide a password.
  2852. Notes:    this protection scheme has been coordinated on all current Digital
  2853.       Research/Novell operating systems (DR-DOS 3.41+, DRMDOS 5.x, and
  2854.       FlexOS 2+)
  2855.     this function is documented in DR-DOS 6.0 and corresponds to the
  2856.       "Get/Set File Attributes" function, subfunction 2, documented in
  2857.       Concurrent DOS.
  2858.     only FlexOS actually uses the "execution" bits; DR-DOS 3.41+ treats
  2859.       them as "read" bits.
  2860.     DR-DOS 3.41-5.x only use bits 0-3.  Only DR-DOS 6.0 using a
  2861.       DRMDOS 5.x security system allowing for users and groups uses bits
  2862.       4-11.
  2863. SeeAlso: AX=4303h
  2864.  
  2865. Bitfields for access rights:
  2866.  bit 0    owner delete requires password
  2867.  bit 1    owner execution requires password (FlexOS)
  2868.  bit 2    owner write requires password
  2869.  bit 3    owner read requires password
  2870.  bit 4    group delete requires password
  2871.  bit 5    group execution requires password (FlexOS)
  2872.  bit 6    group write requires password
  2873.  bit 7    group read requires password
  2874.  bit 8    world delete requires password
  2875.  bit 9    world execution requires password (FlexOS)
  2876.  bit 10 world write requires password
  2877.  bit 11 world read requires password
  2878. --------O-214303-----------------------------
  2879. INT 21 - DR-DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  2880.     AX = 4303h
  2881.     CX = access rights
  2882.          bits 11-0: access rights (see AX=4302h)
  2883.          bit 15: new password is to be set
  2884.     DS:DX -> ASCIZ pathname
  2885.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  2886. Return: CF clear if successful
  2887.     CF set on error
  2888.         AX = error code
  2889. Notes:    if the file is already protected, the old password must be added after
  2890.       the pathname, separated by a ";"
  2891.     this function is documented in DR-DOS 6.0 and corresponds to the
  2892.       "Get/Set File Attributes" function, subfunction 3, documented in
  2893.       Concurrent DOS.
  2894. SeeAlso: AX=4302h,AX=4305h,AX=4454h
  2895. --------O-214304-----------------------------
  2896. INT 21 - DR-DOS 5.0-6.0 internal - GET ENCRYPTED PASSWORD
  2897.     AX = 4304h
  2898.     ???
  2899. Return: CF clear if successful
  2900.         CX = AX = ???
  2901.     CF set on error
  2902.         AX = error code (see AH=59h)
  2903. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  2904. SeeAlso: AX=4303h,AX=4305h
  2905. --------O-214305-----------------------------
  2906. INT 21 - DR-DOS 5.0-6.0 internal - SET EXTENDED FILE ATTRIBUTES
  2907.     AX = 4305h
  2908.     ???
  2909. Return: CF clear if successful
  2910.     CF set on error
  2911.         AX = error code (see AH=59h)
  2912. Desc:    this function allows the extended attributes, and optionally the
  2913.       encrypted password, of a file to be set.
  2914. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  2915. SeeAlso: AX=4304h,AX=4311h
  2916. --------O-214306-----------------------------
  2917. INT 21 - DR-DOS 6.0 - GET FILE OWNER
  2918.     AX = 4306h
  2919.     ???
  2920. Return: ???
  2921. SeeAlso: AX=4307h
  2922. --------O-214307-----------------------------
  2923. INT 21 - DR-DOS 6.0 - SET FILE OWNER
  2924.     AX = 4307h
  2925.     ???
  2926. Return: ???
  2927. SeeAlso: AX=4306h
  2928. --------N-214310-----------------------------
  2929. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  2930.     AX = 4310h
  2931.     DS:DX -> ASCIZ filename
  2932. Return: CF clear if successful
  2933.         CH = attributes (see AX=4311h)
  2934.     CF set on error
  2935.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2936. Note:    the filename may be a directory but must be on a VINES file service
  2937. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  2938. --------N-214311-----------------------------
  2939. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  2940.     AX = 4311h
  2941.     CH = new attributes
  2942.         bit 7: unused
  2943.         bit 6: shareable
  2944.         bit 5: execute-only
  2945.         bits 4-0: unused
  2946.     DS:DX -> ASCIZ filename
  2947. Return: CF clear if successful
  2948.     CF set on error
  2949.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2950. Note:    the filename may be a directory but must be on a VINES file service
  2951. SeeAlso: AX=4301h,AX=4305h,AX=4310h,INT 2F/AX=110Eh
  2952. --------D-214400-----------------------------
  2953. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  2954.     AX = 4400h
  2955.     BX = handle
  2956. Return: CF clear if successful
  2957.         DX = device information word (see below)
  2958.         AX destroyed
  2959.     CF set on error
  2960.         AX = error code (01h,05h,06h) (see AH=59h)
  2961. Notes:    value in DH corresponds to high byte of device driver's attribute word
  2962.       if handle refers to a character device
  2963.     Novell NetWare reportedly does not return a drive number in bits 5-0
  2964.       for a disk file
  2965. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  2966.  
  2967. Bitfields for device information word:
  2968.  character device
  2969.   bit 14: device driver can process IOCTL requests (see AX=4402h)
  2970.   bit 13: output until busy supported
  2971.   bit 11: driver supports OPEN/CLOSE calls
  2972.   bit  7: set (indicates device)
  2973.   bit  6: EOF on input
  2974.   bit  5: raw (binary) mode
  2975.   bit  4: device is special (uses INT 29)
  2976.   bit  3: clock device
  2977.   bit  2: NUL device
  2978.   bit  1: standard output
  2979.   bit  0: standard input
  2980.  disk file
  2981.   bit 15: file is remote (DOS 3+)
  2982.   bit 14: don't set file date/time on closing (DOS 3+)
  2983.   bit 11: media not removable
  2984.   bit  8: (DOS 4 only) generate INT 24 if no disk space on write or read past
  2985.         end of file
  2986.   bit  7: clear (indicates file)
  2987.   bit  6: file has not been written
  2988.   bits 5-0: drive number (0 = A:)
  2989. --------D-214401-----------------------------
  2990. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  2991.     AX = 4401h
  2992.     BX = handle (must refer to character device)
  2993.     DX = device information word (see AX=4400h)
  2994.         (DH must be zero)
  2995. Return: CF clear if successful
  2996.     CF set on error
  2997.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2998. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  2999. --------D-214402-----------------------------
  3000. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  3001.     AX = 4402h
  3002.     BX = file handle referencing character device
  3003.     CX = number of bytes to read
  3004.     DS:DX -> buffer
  3005. Return: CF clear if successful
  3006.         AX = number of bytes actually read
  3007.     CF set on error
  3008.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3009. Note:    format of data is driver-specific (see below for some specific cases)
  3010. SeeAlso: AX=4400h,AX=4403h,AX=4404h,INT 2F/AX=122Bh
  3011. --------N-214402-----------------------------
  3012. INT 21 - Network Driver Interface Spec 2.0.1 - PROTOCOL MANAGER
  3013.     AX = 4402h
  3014.     BX = file handle for device "PROTMAN$"
  3015.     DS:DX -> request block (see below)
  3016.     CX = 000Eh (size of request block)
  3017.  
  3018. Format of request block for GetProtocolManagerInfo:
  3019. Offset    Size    Description
  3020.  00h    WORD    01h
  3021.  02h    WORD    returned status (see below)
  3022.  04h    DWORD    returned pointer to structure representing parsed user config
  3023.  08h    DWORD    unused
  3024.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  3025.  
  3026. Format of request block for RegisterModule:
  3027. Offset    Size    Description
  3028.  00h    WORD    02h
  3029.  02h    WORD    returned status (see below)
  3030.  04h    DWORD    pointer to module's common characteristics table (see below)
  3031.  08h    DWORD    pointer to list of modules to which the module is to be bound
  3032.  0Ch    WORD    unused
  3033.  
  3034. Format of request block for BindAndStart:
  3035. Offset    Size    Description
  3036.  00h    WORD    03h
  3037.  02h    WORD    returned status (see below)
  3038.  04h    DWORD    caller's virtual address in FailingModules structure
  3039.  08h    DWORD    unused
  3040.  0Ch    WORD    unused
  3041.  
  3042. Format of request block for GetProtocolManagerLinkage:
  3043. Offset    Size    Description
  3044.  00h    WORD    04h
  3045.  02h    WORD    returned status (see below)
  3046.  04h    DWORD    returned dispatch point
  3047.  08h    DWORD    unused
  3048.  0Ch    WORD    returned protocol manager DS
  3049. Note:    the dispatch point may be called as follows instead of using this IOCTL
  3050.     STACK: WORD  protocol manager DS
  3051.            DWORD pointer to request block
  3052.     Return: AX = returned status
  3053.         STACK popped
  3054.  
  3055. Format of request block for GetProtocolIniPath:
  3056. Offset    Size    Description
  3057.  00h    WORD    05h
  3058.  02h    WORD    returned status (see below)
  3059.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  3060.  08h    DWORD    unused
  3061.  0Ch    WORD    buffer length
  3062.  
  3063. Format of request block for RegisterProtocolManagerInfo:
  3064. Offset    Size    Description
  3065.  00h    WORD    06h
  3066.  02h    WORD    returned status (see below)
  3067.  04h    DWORD    pointer to structure containing parsed user config file
  3068.  08h    DWORD    unused
  3069.  0Ch    WORD    length of structure
  3070.  
  3071. Format of request block for InitAndRegister:
  3072. Offset    Size    Description
  3073.  00h    WORD    07h
  3074.  02h    WORD    returned status (see below)
  3075.  04h    DWORD    unused
  3076.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  3077.  0Ch    WORD    unused
  3078.  
  3079. Format of request block for UnbindAndStop:
  3080. Offset    Size    Description
  3081.  00h    WORD    08h
  3082.  02h    WORD    returned status (see below)
  3083.  04h    DWORD    failing modules as for BindAndStart
  3084.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  3085.         if 0000h:0000h, terminate a set of previously dynamically
  3086.           bound protocol modules
  3087.  0Ch    WORD    unused
  3088.  
  3089. Format of request block for BindStatus:
  3090. Offset    Size    Description
  3091.  00h    WORD    09h
  3092.  02h    WORD    returned status (see below)
  3093.  04h    DWORD    must be 0000h:0000h
  3094.         on return, points to root tree
  3095.  08h    DWORD    0000h:0000h
  3096.  0Ch    WORD    unused under DOS
  3097.  
  3098. Format of request block for RegisterStatus:
  3099. Offset    Size    Description
  3100.  00h    WORD    0Ah
  3101.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see below)
  3102.  04h    DWORD    0000h:0000h
  3103.  08h    DWORD    pointer to 16-byte ASCIZ module name
  3104.  0Ch    WORD    0000h
  3105. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  3106.  
  3107. Values of status code:
  3108.  0000h success
  3109.  0001h wait for release--protocol has retained control of the data buffer
  3110.  0002h request queued
  3111.  0003h frame not recognized
  3112.  0004h frame rejected
  3113.  0005h frame should be forwarded
  3114.  0006h out of resource
  3115.  0007h invalid parameter
  3116.  0008h invalid function
  3117.  0009h not supported
  3118.  000Ah hardware error
  3119.  000Bh transmit error
  3120.  000Ch unrecognized destination
  3121.  000Dh buffer too small
  3122.  0020h already started
  3123.  0021h binding incomplete
  3124.  0022h driver not initialized
  3125.  0023h hardware not found
  3126.  0024h hardware failure
  3127.  0025h configuration failure
  3128.  0026h interrupt conflict
  3129.  0027h MAC incompatible
  3130.  0028h initialization failed
  3131.  0029h no binding
  3132.  002Ah network may be disconnected
  3133.  002Bh incompatible OS version
  3134.  002Ch already registered
  3135.  002Dh path not found
  3136.  002Eh insufficient memory
  3137.  002Fh info not found
  3138.  00FFh general failure
  3139.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  3140.  
  3141. Format of common characteristics table:
  3142. Offset    Size    Description
  3143.  00h    WORD    size of table in bytes
  3144.  02h    BYTE    NDIS major version
  3145.  03h    BYTE    NDIS minor version
  3146.  04h    WORD    reserved
  3147.  06h    BYTE    module major version
  3148.  07h    BYTE    module minor version
  3149.  08h    DWORD    module function flag bits
  3150.         bit 0: binding at upper boundary supported
  3151.         bit 1: binding at lower boundary supported
  3152.         bit 2: dynamically bound
  3153.         bits 3-31 reserved, must be 0
  3154.  0Ch 16 BYTEs    ASCIZ module name
  3155.  1Ch    BYTE    upper boundary protocol level
  3156.         01h Media Access Control
  3157.         02h Data link
  3158.         03h network
  3159.         04h transport
  3160.         05h session
  3161.         FFh not specified
  3162.  1Dh    BYTE    upper boundary interface type
  3163.         for MACs: 1 = MAC
  3164.         for data links and transports: to be defined
  3165.         for session: 1 = NCB
  3166.         any level: 0 = private (ISV-defined)
  3167.  1Eh    BYTE    lower boundary protocol level
  3168.         00h physical
  3169.         01h Media Access Control
  3170.         02h Data link
  3171.         03h network
  3172.         04h transport
  3173.         05h session
  3174.         FFh not specified
  3175.  1Fh    BYTE    lower boundary interface type
  3176.         same as offset 1Dh
  3177.  20h    WORD    module ID filled in by protocol manager
  3178.  22h    WORD    module DS
  3179.  24h    DWORD    system request entry point
  3180.  28h    DWORD    pointer to service-specific characteristics
  3181.         0000h:0000h if none
  3182.  2Ch    DWORD    pointer to service-specific status
  3183.         0000h:0000h if none
  3184.  30h    DWORD    pointer to upper dispatch table (see below)
  3185.         0000h:0000h if none
  3186.  34h    DWORD    pointer to lower dispatch table (see below)
  3187.         0000h:0000h if none
  3188.  38h    DWORD    reserved, must be 0
  3189.  3Ch    DWORD    reserved, must be 0
  3190. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  3191.       interpreted as 01h
  3192.  
  3193. Format of MAC Service-Specific Characteristics Table:
  3194. Offset    Size    Description
  3195.  00h    WORD    length of table in bytes
  3196.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  3197.         "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  3198.         "HDLC", or "ISDN"
  3199.  12h    WORD    length of station addresses in bytes
  3200.  14h 16 BYTEs    permanent station address
  3201.  24h 16 BYTEs    current station address
  3202.  34h    DWORD    current functional adapter address (00000000h if none)
  3203.  38h    DWORD    pointer to multicast address list
  3204.  3Ch    DWORD    link speed in bits/sec
  3205.  40h    DWORD    service flags (see below)
  3206.  44h    WORD    maximum frame size which may be both sent and received
  3207.  46h    DWORD    total transmit buffer capacity in bytes
  3208.  4Ah    WORD    transmit buffer allocation block size in bytes
  3209.  4Ch    DWORD    total receive buffer capacity in bytes
  3210.  50h    WORD    receive buffer allocation block size in bytes
  3211.  52h  3 BYTEs    IEEE vendor code
  3212.  55h    BYTE    vendor adapter code
  3213.  56h    DWORD    pointer to ASCIZ vendor adapter description
  3214.  5Ah    WORD    IRQ used by adapter
  3215.  5Ch    WORD    transmit queue depth
  3216.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  3217.  60h  N BYTEs    vendor-specific info
  3218.  
  3219. Bitfields for service flags:
  3220.  bit 0    supports broadcast
  3221.  bit 1    supports multicast
  3222.  bit 2    supports functional/group addressing
  3223.  bit 3    supports promiscuous mode
  3224.  bit 4    station address software settable
  3225.  bit 5    statistics always current
  3226.  bit 6    supports InitiateDiagnostics
  3227.  bit 7    supports loopback
  3228.  bit 8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  3229.      indications
  3230.  bit 9    supports IBM source routing
  3231.  bit 10    supports MAC reset
  3232.  bit 11    supports Open/Close adapter
  3233.  bit 12    supports interrupt request
  3234.  bit 13    supports source routing bridge
  3235.  bit 14    supports GDT virtual addresses (OS/2 version)
  3236.  bit 15    multiple TransferDatas allowed durign a single indication
  3237.  bit 16    MAC normally sets FrameSize = 0 in ReceiveLookahead
  3238.  bit 17-31 reserved, must be 0
  3239.  
  3240. Format of NetBIOS Service-Specific Characteristics Table
  3241. Offset    Size    Description
  3242.  00h    WORD    length of table in bytes
  3243.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  3244.  12h    WORD    NetBIOS module code
  3245.  14h  N BYTEs    vendor-specific info
  3246.  
  3247. Format of MAC Service-Specific Status Table:
  3248. Offset    Size    Description
  3249.  00h    WORD    length of table in bytes
  3250.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  3251.         (FFFFFFFFh = never)
  3252.  06h    DWORD    MAC status bits
  3253.         bits 0-2: operational status
  3254.             000 hardware not installed
  3255.             001 hardware failed startup diagnostics
  3256.             010 hardware configuration problem
  3257.             011 hardware fault
  3258.             100 operating marginally due to soft faults
  3259.             101 reserved
  3260.             110 reserved
  3261.             111 hardware fully operational
  3262.         bit 3: MAC bound
  3263.         bit 4: MAC open
  3264.         bit 5: diagnostics in progress
  3265.         bits 6-31: reserved
  3266.  0Ah    WORD    current packet filter flags
  3267.         bit 0: directed/multicast or group/functional
  3268.         bit 1: broadcast
  3269.         bit 2: promiscuous
  3270.         bit 3: all source routing
  3271.         bits 4-15: reserved, must be zero
  3272.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  3273.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  3274.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  3275.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  3276.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  3277.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  3278.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  3279.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  3280.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  3281.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  3282.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  3283.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  3284.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  3285.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  3286.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  3287.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  3288.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  3289.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  3290.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  3291.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  3292.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  3293.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  3294.  64h  N BYTEs    vendor-specific info
  3295. --------I-214402-----------------------------
  3296. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  3297.     AX = 4402h
  3298.     BX = handle for character device "GDMS"
  3299.     CX = number of bytes to read (>= 4)
  3300.     DS:DX -> buffer (see below)
  3301. Return: CF set on error
  3302.         AX = error code (see AH=59h)
  3303.     CF clear if successful
  3304.         AX = number of bytes read
  3305.  
  3306. Format of returned data:
  3307. Offset    Size    Description
  3308.  00h  4 BYTEs    ???
  3309.  04h    DWORD    pointer to ???
  3310.  08h  4 BYTEs    ???
  3311. --------m-214402-----------------------------
  3312. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  3313.     AX = 4402h
  3314.     BX = handle for device "LA$TBYTE"
  3315.     CX = 0004h
  3316.     DS:DX -> DWORD to hold address of 39-byte table of ???
  3317. Return: CF set on error
  3318.         AX = error code (see AH=59h)
  3319.     CF clear if successful
  3320.         AX = number of bytes read
  3321. Note:    LASTBYTE.SYS is part of "The Last Byte" by Key Software Products
  3322. SeeAlso: AX=4402h"HIGHUMM"
  3323. --------m-214402-----------------------------
  3324. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  3325.     AX = 4402h
  3326.     BX = handle for device "KSP$UMM"
  3327.     CX = 0004h
  3328.     DS:DX -> DWORD to hold entry point
  3329. Return: CF set on error
  3330.         AX = error code (see AH=59h)
  3331.     CF clear if successful
  3332.         AX = number of bytes read
  3333. Note:    HIGHUMM.SYS is part of "The Last Byte" by Key Software Products
  3334. SeeAlso: AX=4402h"LASTBYTE"
  3335.  
  3336. Call HIGHUMM.SYS entry point with:
  3337.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  3338.         DX = size in paragraphs
  3339.         Return: BX = segment number (if successful)
  3340.             DX = size of requested block/size of largest block
  3341.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  3342.         DX = segment number of UMB
  3343.     AH = 02h request a bank-switched memory block
  3344.         DX = size in paragraphs
  3345.         Return: BX = segment number (if successful)
  3346.             DX = size of requested block/size of largest block
  3347.     AH = 03h release a bank-switched memory block
  3348.         DX = segment number
  3349.     AH = 04h transfer data to/from high memory
  3350.         DS:SI -> source
  3351.         ES:DI -> destination
  3352.         CX = length in bytes
  3353.         Note: enables bank-switched memory, does the copy, then disables
  3354.         bank-switched memory
  3355.     AH = 05h get a word from bank-switched memory
  3356.         ES:DI -> word to read
  3357.         Return: DX = word
  3358.     AH = 06h put a word to bank-switched memory
  3359.         ES:DI -> word to write
  3360.         DX = word
  3361.     AH = 07h put a byte to bank-switched memory
  3362.         ES:DI -> byte to write
  3363.         DL = byte
  3364.     AH = 08h enable bank-switched memory
  3365.         DS:SI -> 6-byte status save area
  3366.     AH = 09h disable bank-switched memory
  3367.         DS:SI -> 6-byte save area from enable call (AH=08h)
  3368.     AH = 0Ah assign name to UMB or high bank-switched block
  3369.         DX = segment number
  3370.         DS:SI -> 8-byte blank-padded name
  3371.     AH = 0Bh locate UMB block by name
  3372.         DS:SI -> 8-byte blank-padded name
  3373.         Return: BX = segment number (if successful)
  3374.             DX = size of block
  3375.     AH = 0Ch locate bank-switched block by name
  3376.         DS:SI -> 8-byte blank-padded name
  3377.         Return: BX = segment number (if successful)
  3378.             DX = size of block
  3379. Return: AX = status code
  3380.         0001h successful
  3381.         0000h failed
  3382.         BL = error code
  3383.             80h not implemented
  3384.             B0h insufficient memory, smaller block available
  3385.             B1h insufficient memory, no blocks available
  3386.             B2h invalid segment number
  3387. Note:    only functions 00h and 01h are always available; the remaining
  3388.       functions are only enabled if the proper commandline switch is given
  3389. --------c-214402-----------------------------
  3390. INT 21 - SMARTDRV.SYS - IOCTL - GET CACHE STATUS
  3391.     AX = 4402h
  3392.     BX = file handle for device "SMARTAAR"
  3393.     CX = number of bytes to read (min 28h)
  3394.     DS:DX -> buffer for status record (see below)
  3395. Return: CF clear if successful
  3396.         AX = number of bytes actually read
  3397.     CF set on error
  3398.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3399. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  3400.  
  3401. Format of SMARTDRV status record:
  3402. Offset    Size    Description
  3403.  00h    BYTE    write-through flag (always 01h)
  3404.  01h    BYTE    writes should be buffered (always 00h)
  3405.  02h    BYTE    cache enabled if 01h
  3406.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  3407.  04h    WORD    clock ticks between cache flushes (currently unused)
  3408.  06h    BYTE    cache contains locked tracks if nonzero
  3409.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  3410.  08h    BYTE    cache full track writes if nonzero
  3411.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  3412.  0Ah    DWORD    original INT 13 vector
  3413.  0Eh    BYTE    minor version number
  3414.  0Fh    BYTE    major version number
  3415.  10h    WORD    unused
  3416.  12h    WORD    sectors read            \
  3417.  14h    WORD    sectors already in cache     > may be scaled rather than
  3418.  16h    WORD    sectors already in track buffer /  absolute counts
  3419.  18h    BYTE    cache hit rate in percent
  3420.  19h    BYTE    track buffer hit rate in percent
  3421.  1Ah    WORD    total tracks in cache
  3422.  1Ch    WORD    number of tracks in use
  3423.  1Eh    WORD    number of locked tracks
  3424.  20h    WORD    number of dirty tracks
  3425.  22h    WORD    current cache size in 16K pages
  3426.  24h    WORD    original (maximum) cache size in 16K pages
  3427.  26h    WORD    minimum cache size in 16K pages
  3428.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  3429. --------d-214402-----------------------------
  3430. INT 21 - CD-ROM device driver - IOCTL INPUT
  3431.     AX = 4402h
  3432.     BX = file handle referencing character device for CD-ROM driver
  3433.     CX = number of bytes to read
  3434.     DS:DX -> control block (see below)
  3435. Return: CF clear if successful
  3436.         AX = number of bytes actually read
  3437.     CF set on error
  3438.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3439. Note:    the data returned depends on the first byte of the control block; the
  3440.       remainder of the control block is filled by the driver
  3441. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  3442.  
  3443. Format of control block:
  3444. Offset    Size    Description
  3445.  00h    BYTE    data being requested
  3446.         00h device driver header address
  3447.         01h drive head location
  3448.         02h reserved
  3449.         03h error statistics
  3450.         04h audio channel info
  3451.         05h raw drive bytes (uninterpreted and device-specific)
  3452.         06h device status
  3453.         07h sector size
  3454.         08h volume size
  3455.         09h media change status
  3456.         0Ah audio disk info
  3457.         0Bh audio track info
  3458.         0Ch audio Q-Channel info
  3459.         0Dh audio sub-channel info
  3460.         0Eh UPC code
  3461. ---function 00h---
  3462.  01h    DWORD    device driver header address (see also AH=52h)
  3463. ---function 01h---
  3464.  01h    BYTE    addressing mode
  3465.         00h HSG
  3466.         01h Red Book
  3467.  02h    DWORD    current location of drive's head
  3468.         logical sector number in HSG mode
  3469.         frame/second/minute/unused in Red Book mode
  3470.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  3471. ---function 03h---
  3472.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  3473. ---function 04h---
  3474.  01h    BYTE    input channel (0-3) for output channel 0
  3475.  02h    BYTE    volume for output channel 0
  3476.  03h    BYTE    input channel (0-3) for output channel 1
  3477.  04h    BYTE    volume for output channel 1
  3478.  05h    BYTE    input channel (0-3) for output channel 2
  3479.  06h    BYTE    volume for output channel 2
  3480.  07h    BYTE    input channel (0-3) for output channel 3
  3481.  08h    BYTE    volume for output channel 3
  3482. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  3483.       right prime; a volume of 00h is off
  3484.     the default setting is for each input channel to be assigned to the
  3485.       same-numbered output channel at full (FFh) volume
  3486. ---function 05h---
  3487.  01h    BYTE    number of bytes read
  3488.  02h 128 BYTEs    buffer for drive bytes
  3489. ---function 06h---
  3490.  01h    DWORD    device parameters
  3491.         bit 0: door open
  3492.         bit 1: door unlocked
  3493.         bit 2: supports raw reading in addition to cooked
  3494.         bit 3: writable
  3495.         bit 4: can play audio/video tracks
  3496.         bit 5: supports interleaving
  3497.         bit 6: reserved
  3498.         bit 7: supports prefetch requests
  3499.         bit 8: supports audio channel control
  3500.         bit 9: supports Red Book addressing in addition to HSG
  3501.         bit 10: audio is playing
  3502. ---function 07h---
  3503.  01h    BYTE    read mode
  3504.         00h cooked
  3505.         01h raw
  3506.  02h    WORD    sector size in bytes
  3507. ---function 08h---
  3508.  01h    DWORD    volume size in sectors
  3509. ---function 09h---
  3510.  01h    BYTE    media change status
  3511.         00h don't know
  3512.         01h media unchanged
  3513.         FFh media has been changed
  3514. ---function 0Ah---
  3515.  01h    BYTE    lowest audio track number
  3516.  02h    BYTE    highest audio track number
  3517.  03h    DWORD    start address of lead-out track (Red Book format)
  3518. --function 0Bh---
  3519.  01h    BYTE    track number (set by caller)
  3520.  02h    DWORD    starting point of track (Red Book format)
  3521.  06h    BYTE    track control info
  3522.         bits 15,14,12: track type (notice: bits not contiguous!)
  3523.             000 two audio channels, no pre-emphasis
  3524.             001 two audio channels with pre-emphasis
  3525.             010 data track
  3526.             100 four audio channels, no pre-emphasis
  3527.             101 four audio channels with pre-emphasis
  3528.             other reserved
  3529.         bit 13: digital copy permitted
  3530. ---function 0Ch---
  3531.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  3532.  02h    BYTE    track number
  3533.  03h    BYTE    point or index
  3534.  04h    BYTE    minute    \
  3535.  05h    BYTE    second     > running time within track
  3536.  06h    BYTE    frame    /
  3537.  07h    BYTE    zero
  3538.  08h    BYTE    "AMIN" or "PMIN"     \
  3539.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  3540.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  3541. ---function 0Dh---
  3542.  01h    DWORD    starting frame address (Red Book format)
  3543.  05h    DWORD    transfer address
  3544.  09h    DWORD    number of sectors to read
  3545. Note:    copies 96 bytes of sub-channel info per sector into buffer
  3546. ---function 0Eh---
  3547.  01h    BYTE    CONTROL and ADR byte
  3548.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  3549.  09h    BYTE    zero
  3550.  0Ah    BYTE    "AFRAME"
  3551. --------m-214402-----------------------------
  3552. INT 21 U - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  3553.     AX = 4402h
  3554.     BX = file handle for device "QEMM386$"
  3555.     CX = 0004h
  3556.     DS:DX -> DWORD buffer for API entry point
  3557. Return: CF clear if successful
  3558.         buffer filled (see INT 67/AH=3Fh for entry point parameters)
  3559.     CF set on error
  3560.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3561. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3562. --------m-214402-----------------------------
  3563. INT 21 U - Quarterdeck - QEMM-386 v6+ - GET EMM IMPORT STRUCTURE ADDRESS
  3564.     AX = 4402h
  3565.     BX = file handle for device "EMMXXXX0"
  3566.     CX = 0006h (size of buffer in bytes)
  3567.     DS:DX -> buffer for import structure address (see below)
  3568.         first byte must be 01h on entry
  3569. Return: CF clear if successful
  3570.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  3571.     CF set on error
  3572.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3573. Note:    this call always returns an error if Windows3 support has been disabled
  3574.       with the NW3 switch to QEMM386.SYS
  3575. SeeAlso: INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3576.  
  3577. Format of import structure address:
  3578. Offset    Size    Description
  3579.  00h    DWORD    physical address of EMM import structure
  3580.  04h    BYTE    major version
  3581.  05h    BYTE    minor version
  3582. --------Q-214402-----------------------------
  3583. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  3584.     AX = 4402h
  3585.     BX = file handle for device "HOOKROM$"
  3586.     CX = 0004h
  3587.     DS:DX -> DWORD buffer for address of hooked vector table (see below)
  3588. Return: CF clear if successful
  3589.         DS:DX buffer filled
  3590.     CF set on error
  3591.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3592. SeeAlso: AX=4402h"QEMM"
  3593.  
  3594. Format of hooked vector table entry:
  3595. Offset    Size    Description
  3596.  00h  5 BYTEs    FAR jump to actual interrupt handler
  3597.         (end of table if first byte is not EAh)
  3598.  05h    BYTE    interrupt vector number
  3599. --------m-214402-----------------------------
  3600. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  3601.     AX = 4402h
  3602.     BX = file handle for device "EMMXXXX0"
  3603.     CX = size of buffer in bytes (varies, see below)
  3604.     DS:DX -> buffer for returned data (see below)
  3605.         first byte must be set on entry to indicate desired data
  3606. Return: CF clear if successful
  3607.         buffer filled
  3608.     CF set on error
  3609.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3610. Note:    an error is returned if the number of bytes to be read does not match
  3611.       the number of bytes returned for the specified data item
  3612. SeeAlso: INT 67/AX=FFA5h
  3613.  
  3614. Format of data buffer:
  3615. Offset    Size    Description
  3616.  00h    BYTE    (call) function
  3617.          00h get ???
  3618.         01h get EMM import structure???
  3619.         02h get ???
  3620.         03h get ???
  3621.         04h get ???
  3622. ---function 00h---
  3623.  00h    WORD    ??? (0025h)
  3624.  02h    DWORD    API entry point (see INT 67/AX=FFA5h)
  3625. ---function 01h---
  3626.  00h    DWORD    physical address of EMM import structure???
  3627.  04h    BYTE    major version???
  3628.  05h    BYTE    minor version???
  3629. ---function 02h---
  3630.  00h    WORD    ???
  3631. ---function 03h---
  3632.  00h    WORD    ???
  3633.  02h    WORD    ???
  3634. ---function 04h---
  3635.  00h    WORD    ???
  3636.  02h    WORD    number of paragraphs of ???
  3637.  04h    WORD    ???
  3638. --------d-214402-----------------------------
  3639. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  3640.     AX = 4402h
  3641.     BX = file handle for device "SCSIMGR$"
  3642.     CX = 0004h
  3643.     DS:DX -> buffer for function address
  3644. Return: CF clear if successful
  3645.         AX = 0004h
  3646.     CF set on error
  3647.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3648. Note:    the function address is called with the address of a SCSI Request
  3649.       Block on the stack and the caller must clean up the stack
  3650. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  3651.  
  3652. Format of SCSI Request Block (64 bytes):
  3653. Offset    Size    Description
  3654.  00h    BYTE    request number
  3655.         00h "HA_INQ"     host adapter inquiry
  3656.         01h "GET_TYPE"     get device type
  3657.         02h "EXEC_SIO"     execute SCSI I/O
  3658.         03h "ABORT_SRB"     abort SRB
  3659.         04h "RESET_DEV"     reset SCSI device
  3660.         05h "SET_HAPRMS" set host adapter parameters
  3661.  01h    BYTE    request status
  3662.         00h not done yet
  3663.         02h aborted
  3664.         04h SCSI I/O error
  3665.         80h invalid
  3666.         81h no adapter
  3667.         82h no device attached
  3668.         else status
  3669.  02h    BYTE    host adapter ID
  3670.  03h    BYTE    request flags
  3671.         bit 3: ???
  3672.  04h    DWORD    reserved
  3673. ---request 00h---
  3674.  08h    BYTE    (returned) number of host adapters
  3675.  09h    BYTE    (returned) target adapter ID
  3676.  0Ah 16 BYTEs    (returned) manager ID
  3677.  1Ah 16 BYTEs    (returned) adapter ID
  3678.  2Ah 16 BYTEs    (returned) parameters
  3679. ---request 01h---
  3680.  08h    BYTE    target ID
  3681.  09h    BYTE    logical unit number
  3682.  0Ah    BYTE    (returned) device type
  3683.         01h streamer
  3684. ---request 02h---
  3685.  08h    BYTE    target ID
  3686.  09h    BYTE    logical unit number
  3687.  0Ah    DWORD    data allocation length
  3688.  0Eh    BYTE    sense allocation length
  3689.  0Fh    DWORD    data buffer pointer
  3690.  13h    DWORD    next request pointer (for linking)
  3691.  17h    BYTE    CDB length
  3692.  18h    BYTE    (returned) host adapter status
  3693.         11h select timeout
  3694.         12h data overrun
  3695.         13h bus error
  3696.         14h bus failure
  3697.  19h    BYTE    (returned) target status
  3698.         02h sense data stored in SRB
  3699.         08h target busy
  3700.         18h reservation error
  3701.  1Ah    DWORD    post routine address
  3702.  1Eh    WORD    real mode Post DS
  3703.  20h    DWORD    SRB pointer
  3704.  24h    WORD    reserved
  3705.  26h    DWORD    SRB physical address
  3706.  2Ah 22 BYTEs    SCSIMGR$ workspace
  3707.  40h  N BYTEs    CCB (20-24 bytes)
  3708. ---request 04h---
  3709.  08h    BYTE    target ID
  3710.  09h    BYTE    logical unit number
  3711.  0Ah 14 BYTEs    reserved
  3712.  18h    BYTE    (returned) host adapter status (see above)
  3713.  19h    BYTE    (returned) target status (see above)
  3714.  1Ah    DWORD    post routine address
  3715.  1Eh 34 BYTEs    workspace
  3716.  
  3717. Format of CCB:
  3718. Offset    Size    Description
  3719.  00h    BYTE    command code
  3720.         01h rewind
  3721.         05h get block size limits
  3722.         08h read
  3723.         0Ah write
  3724.         10h write file marks
  3725.         11h SCSI Space (set position?)
  3726.         12h SCSI Inquire
  3727.         19h erase
  3728.         1Bh load/unload media
  3729.  01h    BYTE    flags
  3730.         bits 4-0: vary by function
  3731.         bits 7-5: logical unit number
  3732.  02h    BYTE    "adr_1"
  3733.  03h    BYTE    "adr_0"
  3734.  04h    BYTE    length
  3735.  05h    BYTE    control
  3736.     ...
  3737.  06h/0Ah 14 BYTEs buffer for sense data
  3738. --------m-214402-----------------------------
  3739. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  3740.     AX = 4402h
  3741.     BX = file handle for device "386MAX$$"
  3742.     CX = 005Ah
  3743.     DS:DX -> version byte followed by 386MAX state buffer (see below)
  3744.         version byte must be 03h for 386MAX v6.01
  3745. Return: CF clear if successful
  3746.         buffer at DS:DX+1 filled
  3747.         AX = number of bytes actually copied
  3748.     CF set on error
  3749.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3750. Notes:    if the value given in CX is less than 5Ah, only a partial state record
  3751.       will be returned
  3752.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  3753.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  3754.       56h bytes for v5.11.
  3755.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  3756.       the word at offset 25h in the returned state, load all other
  3757.       registers as needed for the desired function, and execute an
  3758.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  3759.       if it is not otherwise modified by the API function.    For safety,
  3760.       in case a function is not supported or 386MAX is not present, SP
  3761.       should be saved and restored around the API call.
  3762.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  3763.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  3764.       make some calls incorrectly
  3765. SeeAlso: AX=4403h"386MAX",INT 67/AH=3Fh
  3766.  
  3767. Format of 386MAX v6.01 state:
  3768. Offset    Size    Description
  3769.  00h  6 BYTEs    signature "386MAX"
  3770.  06h  4 BYTEs    version string "N;NN" (i.e. "6;01" for v6.01)
  3771.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  3772.  0Ch  2 BYTEs    ???
  3773.  0Eh    WORD    segment of ??? memory block or 0000h
  3774.  10h    WORD    bit flags
  3775.         bit 1: ???
  3776.         bit 2: ???
  3777.         bit 3: ??? (cleared by calling INT 67 functions)
  3778.         bit 4: high RAM present???
  3779.         bit 5: ???
  3780.         bit 6: 386MAX active???
  3781.         bit 7: 386MAX is providing EMS services
  3782.         bit 8: ???
  3783.         bit 9: ??? (see INT 15/AX=2402h)
  3784.         bit 10: ???
  3785.         bit 11: ???
  3786.         bit 12: ???
  3787.         bit 13: QPMS has been used
  3788.         bit 14: ???
  3789.         bit 15: ???
  3790.  12h    WORD    starting address of video memory in K
  3791.  14h  2 BYTEs    ???
  3792.  16h    WORD    total high DOS memory in KB
  3793.  18h  2 BYTEs    ???
  3794.  1Ah    WORD    available shared memory in KB
  3795.  1Ch    WORD    KBytes extended memory used by 386MAX
  3796.  1Eh  2 BYTEs    ???
  3797.  20h    WORD    total extended memory in KB
  3798.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  3799.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  3800.  26h    WORD    ???
  3801.  28h  2 BYTEs    ???
  3802.  2Ah    DWORD    ???
  3803.  2Eh  4 BYTEs    ???
  3804.  32h    WORD    system configuration??? flags
  3805.         bit 1: ROM compressed???
  3806.         bit 3: ???
  3807.         bit 5: 386MAX loaded into high memory
  3808.         bit 11: PC/XT (thus only single 8259 interrupt controller
  3809.                 present, DMA only in 1st megabyte, etc)
  3810.  34h    WORD    ??? bit flags
  3811.  36h  4 BYTEs    ???
  3812.  3Ah    WORD    segment of first MCB in high memory chain???
  3813.  3Ch    WORD    flags
  3814.         bit 2: no DPMI services
  3815.         bit 11: don't backfill holes in video memory area
  3816.         bit 12: don't backfill below video memory???
  3817.  3Eh    WORD    flags
  3818.         bit 7: ???
  3819.  40h    WORD    flags
  3820.         bit 0: Windows3 support enabled
  3821.         bit 8: ???
  3822.  42h    WORD    segment of first 386MAX control block??? (see below)
  3823.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  3824.  46h  4 BYTEs    ???
  3825.  4Ah    WORD    ???
  3826.  4Ch  2 BYTEs    ???
  3827.  4Eh    WORD    ???
  3828.  50h    WORD    bit flags
  3829.         bit 12: ???
  3830.  52h    DWORD    old INT 21h
  3831.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  3832.  
  3833. Format of 386MAX control block:
  3834. Offset    Size    Description
  3835.  00h    WORD    segment of next block (FFFFh if last)
  3836.  02h    WORD    segment of previous block (FFFFh if first)
  3837.  04h 12 BYTEs    filename
  3838.  10h    WORD    resident size in paragraphs
  3839.  12h    WORD    environment size???
  3840.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  3841.  16h  2 BYTEs    ???
  3842.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  3843.  1Ch    DWORD    SIZE=-1 ???
  3844.  20h    DWORD    SIZE= ???
  3845.  24h    BYTE    PRGREG= if specified, else FFh
  3846.  25h    BYTE    ENVREG= if specified, else FFh
  3847.  26h    BYTE    FlexFrame (00h not present, 01h present)
  3848.  27h  3 BYTEs    ???
  3849.  2Ah    BYTE    GROUP= or 00h if not present
  3850.  2Bh    BYTE    ???
  3851.  2Ch    WORD    PSP
  3852.  
  3853. Format of high memory info record:
  3854. Offset    Size    Description
  3855.  00h    WORD    segment address of memory region
  3856.  02h    WORD    size of memory region in paragraphs
  3857.  04h    BYTE    type or flags???
  3858.         00h if locked out
  3859.         02h if EMS page frame
  3860.         04h if high RAM
  3861.         42h if ROM
  3862.  05h    BYTE    ???
  3863.  
  3864. Format of ROM shadowing record:
  3865. Offset    Size    Description
  3866.  00h    WORD    segment of ROM???
  3867.  02h    WORD    segment of ROM???
  3868.  04h  2 BYTEs    ???
  3869.  06h    WORD    size of shadowed ROM in paragraphs
  3870.  08h  4 BYTEs    ???
  3871.  
  3872. Values for memory type:
  3873.  00h unused by EMS
  3874.  01h DOS
  3875.  04h page frame overlapping ROM???
  3876.  80h high memory
  3877.  84h page frame???
  3878.  87h video ROM???
  3879. Note:    the type may be 00h (unused) if the 16K page is split among different
  3880.       uses (such as ROM and high RAM)
  3881.  
  3882. Call 386MAX API (via OUT DX,AL) with:
  3883.     STACK: WORD value for DX
  3884.     AH = 01h get high memory information
  3885.         ES:DI -> buffer for array of high memory info records
  3886.             (see above)
  3887.         Return: CX = number of records placed in buffer
  3888.     AH = 02h get shadowed ROM info???
  3889.         ES:DI -> buffer for array of ROM shadowing records (see above)
  3890.         Return: CX = number of records placed in buffer
  3891.     AH = 03h get 386MAX state
  3892.         ES:DI -> 90-byte buffer for state (see above)
  3893.         Return: AH = 00h (successful)
  3894.             buffer filled
  3895.         Note:    unlike INT 21/AX=4402h"386MAX", this function omits
  3896.               the first byte specifying the state buffer version
  3897.     AH = 04h get memory types???
  3898.         ES:DI -> buffer for memory type info (array of bytes, one per
  3899.             16K page) (see above)
  3900.         Return:    CX = number of bytes placed in buffer
  3901.     AH = 05h get ???
  3902.         AL = subfunction
  3903.             00h invoke INT 15/AX=2401h first
  3904.             01h don't invoke INT 15/AX=2401h first
  3905.         CX = number of bytes to copy (0000h for default)
  3906.         SI = ???
  3907.         ES:DI -> buffer for ???
  3908.         Return: CX = number of bytes actually copied
  3909.             ???
  3910.     AH = 06h get memory speed info
  3911.         ES:DI -> buffer for memory speed records (see below)
  3912.         Return: AH = 00h (successful)
  3913.             CX = number of bytes placed in buffer
  3914.         Note:    this function can take over a second to execute
  3915.     AH = 07h ???
  3916.         ???
  3917.         Return:    ???
  3918.     AH = 08h ???
  3919.         AL = ??? (00h or nonzero)
  3920.     AH = 09h toggle ??? flags
  3921.         BX = bitmask of bits of ??? flags (word at state+10h) to toggle
  3922.         Return: AH = 00h (successful)
  3923.         Note: invokes INT 15/AX=2401h first
  3924.     AH = 0Ah toggle ??? flags
  3925.         BX = bitmask of bits of ??? (word at state+32h) to toggle
  3926.         Return: AH = 00h (successful)
  3927.         Notes:    invokes INT 15/AX=2401h first
  3928.             does ??? if bit 3 on after specified bits are toggled
  3929.     AH = 0Bh toggle ??? flags
  3930.         BX = bitmask of bits of ??? (word at state+34h) to toggle
  3931.         Return: AH = 00h (successful)
  3932.         Note: invokes INT 15/AX=2401h first
  3933.     AH = 0Ch toggle ??? flags
  3934.         BX = bitmask of bits of ??? (word at state+40h) to toggle
  3935.         Return: AH = 00h (successful)
  3936.         Note: invokes INT 15/AX=2401h first
  3937.     AH = 0Dh specify 386MAX high-memory location
  3938.         BX = segment address of high-memory real-mode portion of 386MAX
  3939.         ???
  3940.         Return: AH = status (00h successful)
  3941.             ???
  3942.     AH = 0Eh CRT controller register virtualization
  3943.         AL = subfunction
  3944.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  3945.             01h trap accesses to CRTC I/O ports
  3946.     AH = 0Fh reboot system
  3947.         Return: never
  3948.     AH = 11h get high memory information
  3949.         ES:DI -> 96-byte buffer for high memory info
  3950.         Return: AH = 00h (successful)
  3951.             ES:DI buffer filled
  3952.         Notes:    each byte in buffer contains bit flags for a 4K page in
  3953.               the A000h-FFFFh region
  3954.                 bit 0: ???
  3955.                 bit 1: physical address same as linear address
  3956.                 bit 2: EMS page frame
  3957.                 bit 6: ???
  3958.             this function can take over a second to execute
  3959.     AH = 12h ???
  3960.         AL = subfunction
  3961.             00h ???
  3962.             01h ???
  3963.         ???
  3964.         Return: AH = 00h (successful) if AL=00h or 01h
  3965.             AH = 8Fh otherwise
  3966.     AH = 13h page protection???
  3967.         AL = subfunction
  3968.             00h set all ??? 4K pages to read-only???
  3969.             01h set all ??? 4K pages to read-write???
  3970.         ???
  3971.         Return: AH = 00h (successful) if AL=00h or 01h
  3972.             AH = 8Fh otherwise
  3973.     AH = 15h ???
  3974.         ???
  3975.         Return: ???
  3976.     AH = 16h get 386MAX memory usage screen
  3977.         ES:DI -> buffer for memory info display
  3978.         CX = size of buffer in bytes
  3979.         Return:    ES:DI buffer filled with '$'-terminated string (if
  3980.                 large enough to hold entire usage screen)
  3981.     AH = 17h Windows 3 startup/termination
  3982.         AL = subfunction
  3983.             00h Windows3 initializing
  3984.             DX (on stack) = Windows startup flags
  3985.             DI = Windows version number (major in upper byte)
  3986.             ES:BX = 0000h:0000h
  3987.             DS:SI = 0000h:0000h
  3988.             Return: CX = 0000h if OK for Windows to load
  3989.                    <> 0 if Windows should not load
  3990.                 ES:BX -> startup info structure
  3991.                 DS:SI -> Virtual86 mode enable/disable callback
  3992.             01h Windows3 terminating
  3993.             ES:BX -> ???
  3994.             DX (on stack) = Windows exit flags
  3995.             Return: ???
  3996.     AH = 18h QPMS (Qualitas Protected Memory Services)
  3997.         AL = subfunction
  3998.             00h get QPMS configuration
  3999.             Return: BX = starting segment of QPMS memory window
  4000.                 CX = number of 4K pages reserved for QPMS???
  4001.                 DX = number of 4K pages in QPMS window???
  4002.             01h map QPMS memory page???
  4003.             BX = 4K page number within memory reserved for QPMS???
  4004.             CL = 4K page number within QPMS memory window???
  4005.             02h mark all QPMS memory read-only
  4006.             03h mark all QPMS memory read-write
  4007.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  4008.     AH = 19h get linear address for physical address
  4009.         EDX = physical address (low word on stack)
  4010.         Return: AH = status
  4011.                 00h successful
  4012.                 EDX = linear address at which physical address
  4013.                     may be accessed
  4014.                 8Bh physical address currently not addressable
  4015.         Note: calls INT 15/AX=2401h first
  4016.     AH = 1Ah set page table entry???
  4017.         EDX = new page table entry??? (low word on stack)
  4018.         ESI = linear address of page???
  4019.         Return: AH = status (00h,8Bh)
  4020.         Note: calls INT 15/AX=2401h first
  4021.     AH = 1Bh get ???
  4022.         Return: AH = status
  4023.             BX = ???
  4024.             CX = ???
  4025.             EDX = physical address of ???
  4026.     AH = 1Ch get original interrupt vector
  4027.         AL = interrupt vector (00h-7Fh)
  4028.         Return: AH = 00h (successful)
  4029.             EDX = original vector before 386MAX loaded (segment in
  4030.                 high word, offset in low word)
  4031.         Note:    no range checking is performed; requests for INTs 80h-
  4032.               FFh will return random values
  4033.     AH = 1Dh display string???
  4034.         SI = ???
  4035.         Return: AH = 00h (successful)
  4036.             ???
  4037.     AH = 1Eh ???
  4038.         ES:DI -> ???
  4039.         ???
  4040.         Return: ???
  4041.     AH = 1Fh ???
  4042.         ???
  4043.         Return: AX = 0000h if successful
  4044.             BX = ??? (0001h for 386MAX v6.01)
  4045.             CL = ???
  4046.             DL = state buffer size??? (5Ah for 386MAX v6.01)
  4047.             DH = ??? (00h for 386MAX v6.01)
  4048.             SI = ???
  4049.             ES???:DI -> ???
  4050.     AH = 40h-5Dh EMS services (see INT 67/AH=40h etc)
  4051.     AH = DEh VCPI services (see INT 67/AX=DE00h etc)
  4052. Return: AH = status (as for EMS INT 67 calls)
  4053.         00h successful
  4054.         80h internal error
  4055.         81h hardware malfunction
  4056.         83h invalid handle
  4057.         84h    undefined function
  4058.         8Ah invalid logical page nuber
  4059.         8Bh illegal physical page number
  4060.         8Fh undefined subfunction
  4061.         A4h access denied
  4062.         etc.
  4063.     STACK popped (value placed in DX if no specific return value for DX)
  4064.  
  4065. Format of memory speed record:
  4066. Offset    Size    Description
  4067.  00h    DWORD    page table entry for 4K page
  4068.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  4069.         entire 4K page
  4070. --------V-214402-----------------------------
  4071. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  4072.     AX = 4402h
  4073.     BX = file handle for device "PGS1600$"
  4074.     CX = 0018h (size of buffer)
  4075.     DS:DX -> configuration buffer (see below)
  4076. Return: CF clear if successful
  4077.         buffer filled
  4078.         AX = number of bytes actually copied
  4079.     CF set on error
  4080.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4081. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  4082.       display adapter, which provides a 1600x1200 monochrome display as
  4083.       well as one of two emulations, MDA or CGA.
  4084. SeeAlso: AX=4403h"PGS1600"
  4085.  
  4086. Format of configuration information:
  4087. Offset    Size    Description
  4088.  00h    WORD    version (high byte = major, low byte = minor)
  4089.  02h    WORD    board initialisation mode
  4090.  04h    WORD    board I/O address
  4091.         03D0h CGA emulation
  4092.         03B0h MDA emulation
  4093.         0390h no emulation
  4094.         0350h no emulation, alternate
  4095.  06h    WORD    emulation buffer segment
  4096.         B800h    CGA emulation
  4097.         B000h    MDA emulation
  4098.         0000h    no emulation
  4099.  08h    WORD    PG1600 graphics buffer segment
  4100.  0Ah    WORD    number of bytes between consecutive graphic rows
  4101.  0Ch    WORD    horizontal pixel size
  4102.  0Eh    WORD    vertical pixel size
  4103.  10h    WORD    horizontal dots per inch
  4104.  12h    WORD    vertical dots per inch
  4105.  14h    WORD    graphics buffer bits per pixel
  4106.  16h    WORD    monitor bits per pixel
  4107. --------N-214402-----------------------------
  4108. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  4109.     AX = 4402h
  4110.     BX = file handle referencing device "$IPCUST"
  4111.     CX, DS:DX ignored
  4112. Return: CF clear if successful
  4113.         AX destroyed
  4114.     CF set on error
  4115.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4116. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  4117.       version 2.05.     If less than the entire data is read or written,
  4118.       the next read/write continues where the previous one ended; this
  4119.       call and AX=4403h both reset the location at which the next
  4120.       operation starts to zero
  4121.     v2.1+ uses a new configuration method, but allows the installation
  4122.       of IPCUST.SYS for backward compatibility with other software which
  4123.       must read the PC/TCP configuration
  4124. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  4125. --------N-214402-----------------------------
  4126. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  4127.     AX = 4402h
  4128.     BX = file handle for device "NET$HLP$"
  4129.     CX = 0008h
  4130.     DS:DX -> buffer for entry point record
  4131. Return: CF clear if successful
  4132.         AX = number of bytes actually read
  4133.     CF set on error
  4134.         AX = error code
  4135. Program: WORKGRP.SYS is distributed with MS-DOS 6.0 to permit communication
  4136.       with PCs running Windows for Workgroups or LAN Manager
  4137. SeeAlso: AH=3Fh"WORKGRP.SYS"
  4138.  
  4139. Format of entry point record:
  4140. Offset    Size    Description
  4141.  00h    WORD    3633h  \ signature???
  4142.  02h    WORD    EF6Fh  /
  4143.  04h    DWORD    address of entry point
  4144. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  4145.       IOCTL rather than READ to get the entry point record
  4146.  
  4147. Call WORKGRP entry point with:
  4148.     STACK:    WORD    function number (0000h-0009h)
  4149. Return: STACK unchanged
  4150.  
  4151. Call WORKGRP function 00h with:
  4152.     STACK:    WORD    0000h (function "get ???")
  4153. Return: DX:AX -> data table
  4154.  
  4155. Call WORKGRP function 01h with:
  4156.     STACK:    WORD    0001h (function "hook ???")
  4157. Return: STACK:    DWORD    pointer to ???
  4158.         WORD    0001h (function number)
  4159.  
  4160. Call WORKGRP function 02h with:
  4161.     STACK:    WORD    0002h (function "unhook ???")
  4162.     ???
  4163. Return: ???
  4164.  
  4165. Call WORKGRP function 03h with:
  4166.     STACK:    WORD    0003h (function "reenable printer port")
  4167.         WORD    LPT port number
  4168. Return: ???
  4169.  
  4170. Call WORKGRP function 04h with:
  4171.     STACK:    WORD    0004h (function "disable printer port")
  4172.         WORD    LPT port number
  4173. Return: ???
  4174.  
  4175. Call WORKGRP function 05h with:
  4176.     STACK:    WORD    0005h (function "???")
  4177.         ???
  4178. Return: ???
  4179.  
  4180. Call WORKGRP function 06h with:
  4181.     STACK:    WORD    0006h (function "???")
  4182. Return: STACK unchanged
  4183.     AX = 0000h
  4184.     DX = 0000h
  4185.  
  4186. Call WORKGRP functions 07h-09h with:
  4187.     STACK:    WORD    0007h-0009h (NOP functions)
  4188. Return: STACK unchanged
  4189.     AX = 0001h
  4190.     DX = 0000h
  4191. --------N-214402-----------------------------
  4192. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  4193.     AX = 4402h
  4194.     BX = file handle referencing device "10BEUI$"
  4195.     DS:DX -> parameter record (see below)
  4196.     CX ignored
  4197. Return: CF clear if successful
  4198.         AX destroyed
  4199.     CF set on error
  4200.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4201. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  4202.  
  4203. Format of parameter record:
  4204. Offset    Size    Description
  4205.  00h    WORD    000Ah (function number???)
  4206.  02h    WORD    ???
  4207.  04h    DWORD    pointer to buffer for ???
  4208.  08h  4 BYTEs    ???
  4209.  0Ch    WORD    transfer size
  4210. --------N-214402-----------------------------
  4211. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  4212.     AX = 4402h
  4213.     BX = file handle referencing device "MEMMGR0$"
  4214.     DS:DX -> 6-byte buffer for interface info (see below)
  4215.     CX ignored
  4216. Return: CF clear if successful
  4217.         AX destroyed
  4218.     CF set on error
  4219.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4220. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  4221.  
  4222. Format of interface info:
  4223. Offset    Size    Description
  4224.  00h    DWORD    address of entry point (see below)
  4225.  04h    WORD    version (0500h for v5.00)
  4226.  
  4227. Call entry point with:
  4228.     AL = 01h ???
  4229.         BX = ???
  4230.         Return: CF clear if successful
  4231.             CF set on error
  4232.             AX = error code
  4233.     AL = 02h ???
  4234.         ???
  4235.     AL = 03h ???
  4236.         ???
  4237.     AL = 04h set/restore memory allocation strategy
  4238.         BX = subfunction
  4239.         0000h set strategy
  4240.         0001h restore strategy
  4241.         Return: CF clear if successful
  4242.             CF set on error (if function disabled)
  4243.             various registers destroyed
  4244.     AL = other
  4245.         Return: CF set
  4246.             AX = 0000h
  4247.             BL = 01h
  4248. --------D-214403-----------------------------
  4249. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  4250.     AX = 4403h
  4251.     BX = file handle referencing character device
  4252.     CX = number of bytes to write
  4253.     DS:DX -> data to write
  4254. Return: CF clear if successful
  4255.         AX = number of bytes actually written
  4256.     CF set on error
  4257.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4258. Notes:    format of data is driver-specific (see below for some specific cases)
  4259.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  4260.       KEYSTACK.SYS driver will push the specified characters on the
  4261.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  4262.       driver will push the characters onto the keyboard stack
  4263. SeeAlso: AX=4400h,AX=4402h,AX=4405h,INT 2F/AX=122Bh,INT 2F/AX=D44Dh
  4264. SeeAlso: INT 2F/AX=D44Fh
  4265. --------c-214403-----------------------------
  4266. INT 21 - SMARTDRV.SYS - IOCTL - CACHE CONTROL
  4267.     AX = 4403h
  4268.     BX = handle for device "SMARTAAR"
  4269.     CX = number of bytes to write
  4270.     DS:DX -> SMARTDRV control block (see below)
  4271. Return: CF clear if successful
  4272.         AX = number of bytes actually written
  4273.            = 0000h if control block too small for given command
  4274.     CF set on error
  4275.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4276. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  4277.  
  4278. Format of SMARTDRV control block:
  4279. Offset    Size    Description
  4280.  00h    BYTE    function code
  4281.         00h flush cache
  4282.         01h flush and discard cache
  4283.         02h disable caching (flushes and discards cache first)
  4284.         03h enable caching
  4285.         04h control write caching
  4286.         05h set flushing tick count
  4287.         06h lock cache contents
  4288.         07h unlock cache contents
  4289.         08h set flush-on-reboot flag
  4290.         09h unused
  4291.         0Ah control full-track caching
  4292.         0Bh reduce cache size
  4293.         0Ch increase cache size
  4294.         0Dh set INT 13 chain address
  4295. ---function 04h---
  4296.  01h    BYTE    write caching control action
  4297.         00h turn off write-through
  4298.         01h turn on write-through
  4299.         02h turn off write buffering (also flushes cache)
  4300.         03h turn on write buffering (also flushes cache)
  4301. ---function 05h---
  4302.  01h    WORD    number of timer ticks between cache flushes
  4303. ---function 08h---
  4304.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  4305. ---function 0Ah---
  4306.  01h    BYTE    full-track writes are
  4307.         00h not cached
  4308.         01h cached
  4309. ---functions 0Bh,0Ch---
  4310.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  4311. ---function 0Dh---
  4312.  01h    DWORD    new address to which to chain on INT 13
  4313. Note:    the previous address is not preserved
  4314. --------d-214403-----------------------------
  4315. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  4316.     AX = 4403h
  4317.     BX = file handle referencing character device for CD-ROM driver
  4318.     CX = number of bytes to write
  4319.     DS:DX -> control block (see below)
  4320. Return: CF clear if successful
  4321.         AX = number of bytes actually written
  4322.     CF set on error
  4323.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4324. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  4325.  
  4326. Format of control block:
  4327. Offset    Size    Description
  4328.  00h    BYTE    function code
  4329.         00h eject disk
  4330.         01h lock/unlock door
  4331.         02h reset drive
  4332.         03h control audio channel
  4333.         04h write device control string
  4334.         05h close tray
  4335. ---functions 00h,02h,05h---
  4336.  no further fields
  4337. ---function 01h---
  4338.  01h    BYTE    lock function
  4339.         00h unlock door
  4340.         01h lock door
  4341. ---function 03h---
  4342.  01h    BYTE    input channel (0-3) for output channel 0
  4343.  02h    BYTE    volume for output channel 0
  4344.  03h    BYTE    input channel (0-3) for output channel 1
  4345.  04h    BYTE    volume for output channel 1
  4346.  05h    BYTE    input channel (0-3) for output channel 2
  4347.  06h    BYTE    volume for output channel 2
  4348.  07h    BYTE    input channel (0-3) for output channel 3
  4349.  08h    BYTE    volume for output channel 3
  4350. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  4351.       right prime; a volume of 00h is off
  4352. ---function 04h---
  4353.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  4354.         interpretation
  4355. --------d-214403-----------------------------
  4356. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  4357.     AX = 4403h
  4358.     BX = handle for device "SCSITAPE"
  4359.     CX = number of bytes to write
  4360.     DS:DX -> SCSITAPE control block (see below)
  4361. Return: CF clear if successful
  4362.         AX = number of bytes actually written
  4363.     CF set on error
  4364.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4365. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  4366.  
  4367. Format of SCSITAPE control block:
  4368. Offset    Size    Description
  4369.  00h    WORD    command type
  4370.         'F' Format (argument 1 = interleave, argument 2 = format type)
  4371.         'E' Erase
  4372.         'R' Rewind
  4373.         'L' Load
  4374.         'N' No Load
  4375.         'S' Space (argument 1 = count, argument 2 = type)
  4376.         'M' File Mark (argument 1 = count)
  4377.         'A' Reassign 
  4378.  02h    WORD    argument 1
  4379.  04h    WORD    argument 2
  4380.  06h    WORD    segment of command buffer
  4381.  08h    WORD    offset of command buffer
  4382.  0Ah    WORD    length of command buffer
  4383. --------E-214403-----------------------------
  4384. INT 21 U - AI Architects - OS/x86??? - API
  4385.     AX = 4403h
  4386.     BX = handle for device "AIA_OS"
  4387.     CX = number of bytes to write (ignored)
  4388.     DS:DX -> 12-byte buffer, first byte is command:
  4389.             81h installation check
  4390.             82h get API entry point
  4391.             84h uninstall
  4392. Return: CF clear if successful
  4393.         AX = number of bytes actually written
  4394.     CF set on error
  4395.         AX = error code (01h,05h,06h,0Ch,0Dh) (see AH=59h)
  4396. Notes:    these functions are only available if the DOS extender was loaded as a
  4397.       device driver in CONFIG.SYS
  4398.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  4399. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  4400. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  4401.  
  4402. Format of buffer on return:
  4403. Offset    Size    Description
  4404.  00h  4 BYTEs    signature "IABH"
  4405. ---if func 81h---
  4406.  (no additional fields)
  4407. ---if func 82h---
  4408.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  4409. ---if func 84h---
  4410.  04h    WORD    success indicator
  4411.  06h    WORD    segment of ???
  4412.  08h    WORD    segment of ??? memory block to free if nonzero
  4413.  0Ah    WORD    segment of ??? memory block to free if nonzero
  4414. --------m-214403-----------------------------
  4415. INT 21 U - Qualitas 386MAX v6.01 - SET STATE
  4416.     AX = 4403h
  4417.     BX = handle for device "386MAX$$"
  4418.     CX = number of bytes to copy (up to 5Ah)
  4419.     DS:DX -> 386MAX state buffer (see AX=4402h"386MAX")
  4420. Return: CF clear if successful
  4421.         AX = number of bytes actually written
  4422.     CF set on error
  4423.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4424. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  4425.       (specifying the version of the state record) and the buffer must
  4426.       contain CX bytes AFTER the initial byte
  4427. SeeAlso: AX=4402h"386MAX"
  4428. --------V-214403-----------------------------
  4429. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  4430.     AX = 4403h
  4431.     BX = file handle for device "PGS1600$"
  4432.     CX = 0018h (size of buffer)
  4433.     DS:DX -> configuration buffer (see AX=4402h"PGS1600")
  4434. Return: CF clear if successful
  4435.         AX = number of bytes actually written
  4436.     CF set on error
  4437.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4438. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  4439.       display adapter, which provides a 1600x1200 monochrome display as
  4440.       well as one of two emulations, MDA or CGA.
  4441. SeeAlso: AX=4402h"PGS1600"
  4442. --------N-214403-----------------------------
  4443. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  4444.     AX = 4403h
  4445.     BX = file handle referencing device "$IPCUST"
  4446.     CX, DS:DX ignored
  4447. Return: CF clear if successful
  4448.         AX destroyed
  4449.     CF set on error
  4450.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4451. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  4452.       version 2.05.     If less than the entire data is read or written,
  4453.       the next read/write continues where the previous one ended; this
  4454.       call and AX=4402h both reset the location at which the next
  4455.       operation starts to zero
  4456.     v2.1+ uses a new configuration method, but allows the installation
  4457.       of IPCUST.SYS for backward compatibility with other software which
  4458.       must read the PC/TCP configuration
  4459. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  4460. --------D-214404-----------------------------
  4461. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  4462.     AX = 4404h
  4463.     BL = drive number (00h = default, 01h = A:, etc.)
  4464.     CX = number of bytes to read
  4465.     DS:DX -> buffer
  4466. Return: CF clear if successful
  4467.         AX = number of bytes actually read
  4468.     CF set on error
  4469.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4470. Note:    format of data is driver-specific
  4471. SeeAlso: AX=4402h,AX=4405h,INT 2F/AX=122Bh
  4472. --------d-214404CX0004-----------------------
  4473. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  4474.     AX = 4404h
  4475.     CX = 0004h
  4476.     BL = drive number (00h = default, 01h = A:, etc.)
  4477.     DS:DX -> DWORD buffer to receive device driver address
  4478. Note:    In addition to returning the address of the Stacker device driver,
  4479.       this call also sets the volume number at offset 3Eh in the device
  4480.       driver (see INT 25/AX=CDCDh)
  4481. SeeAlso: INT 25/AX=CDCDh
  4482. --------d-214404-----------------------------
  4483. INT 21 - Stacker - GET STACVOL FILE SECTORS
  4484.     AX = 4404h
  4485.     BL = drive number (0 is current drive)
  4486.     CX = byte count (i.e., 200h = 1 sector)
  4487.     DS:DX -> buffer (see below)
  4488. Return:    Data Buffer contains the number of sectors requested from the
  4489.       STACVOL physical file for the drive specified.
  4490.  
  4491. Format of stacker buffer:
  4492. Offset    Size    Description
  4493.  00h    WORD    01CDh
  4494.  02h    WORD    sector count
  4495.  04h    DWORD    number of starting sector
  4496.  08h    DWORD    far pointer to Data Buffer
  4497. --------d-214404-----------------------------
  4498. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  4499.     AX = 4404h
  4500.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  4501.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  4502.     DS:DX -> data record (see below)
  4503. Return: CF clear if successful
  4504.         AX = number of bytes read
  4505.     CF set on error
  4506.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4507. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  4508.       expander by Vertisoft Systems, Inc.
  4509. Note:    the installation check consists of scanning memory for the signature
  4510.       "FAT 2.6  byte:", which is immediately followed by a data table
  4511. SeeAlso: AX=440Dh
  4512. Index:    installation check;DUBLDISK.SYS
  4513.  
  4514. Format of data record:
  4515. Offset    Size    Description
  4516.  00h    WORD    (call) signature 4444h
  4517.  02h    BYTE    (call) function
  4518.             00h ???
  4519.             01h ???
  4520. ---function 00h---
  4521.  02h    BYTE    (return) ???
  4522.  03h    BYTE    (return) ???
  4523. ---function 01h---
  4524.  02h    WORD    (return) 4444h
  4525.  04h    WORD    allocation unit size???
  4526.  06h    WORD    ???
  4527.  08h    WORD    ???
  4528.  0Ah    BYTE    ???
  4529.  
  4530. Format of signature data table:
  4531. Offset    Size    Description
  4532.  00h  5 BYTEs    ???
  4533.  05h    BYTE    first drive number
  4534.  06h    BYTE    number of drives
  4535.  07h    ???
  4536. --------d-214404-----------------------------
  4537. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  4538.     AX = 4404h
  4539.     BL = drive number (00h = default, 01h = A:, etc)
  4540.     CX = 000Ah (size of DSPACKET structure)
  4541.     DS:DX -> DSPACKET structure (see below)
  4542. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  4543.         AX = number of bytes actually transferred
  4544.     CF set on error
  4545.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4546. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  4547.  
  4548. Format of DSPACKET structure:
  4549. Offset    Size    Description
  4550.  00h    WORD    signature 444Dh ("DM")
  4551.  02h    BYTE    command code
  4552.          46h ('F') flush internal caches
  4553.         49h ('I') flush and invalidate internal caches
  4554.  03h    WORD    result code
  4555.          (return) 4F4Bh ("OK") if successful, else unchanged
  4556.  05h  5 BYTEs    padding
  4557. --------D-214405-----------------------------
  4558. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  4559.     AX = 4405h
  4560.     BL = drive number (00h = default, 01h = A:, etc)
  4561.     CX = number of bytes to write
  4562.     DS:DX -> data to write
  4563. Return: CF clear if successful
  4564.         AX = number of bytes actually written
  4565.     CF set on error
  4566.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4567. Note:    format of data is driver-specific
  4568. SeeAlso: AX=4403h,AX=4404h,INT 2F/AX=122Bh
  4569. --------d-214405-----------------------------
  4570. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  4571.     AX = 4405h
  4572.     BX = drive number (00h = default, 01h = A:, etc)
  4573.     CX = number of bytes to write
  4574.     DS:DX -> SCSIDISK control block (see AX=4403h"ST-01")
  4575. Return: CF clear if successful
  4576.         AX = number of bytes actually written
  4577.     CF set on error
  4578.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4579. SeeAlso: AX=4403h"ST-01"
  4580. --------d-214405-----------------------------
  4581. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  4582.     AX = 4405h
  4583.     BL = drive number (00h = default, 01h = A:, etc)
  4584.     CX = 000Ah (size of DSPACKET structure)
  4585.     DS:DX -> DSPACKET structure (see below)
  4586. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  4587.         AX = number of bytes actually transferred
  4588.     CF set on error
  4589.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4590. Note:    this call is identical to the documented AX=4404h
  4591. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  4592.  
  4593. Format of DSPACKET structure:
  4594. Offset    Size    Description
  4595.  00h    WORD    signature 444Dh ("DM")
  4596.  02h    BYTE    command code
  4597.          46h ('F') flush internal caches
  4598.         49h ('I') flush and invalidate internal caches
  4599.  03h    WORD    result code
  4600.          (return) 4F4Bh ("OK") if successful, else unchanged
  4601.  05h  5 BYTEs    padding
  4602. --------D-214406-----------------------------
  4603. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  4604.     AX = 4406h
  4605.     BX = file handle
  4606. Return: CF clear if successful
  4607.         AL = input status
  4608.         00h not ready (device) or at EOF (file)
  4609.         FFh ready
  4610.     CF set on error
  4611.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4612. Note:    files may not register as being at EOF if positioned there by AH=42h
  4613. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  4614. --------D-214407-----------------------------
  4615. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  4616.     AX = 4407h
  4617.     BX = file handle
  4618. Return: CF clear if successful
  4619.         AL = input status
  4620.         00h not ready
  4621.         FFh ready
  4622.     CF set on error
  4623.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4624. Note:    for DOS 2+, files are always ready for output, even if the disk is
  4625.       full or no media is in the drive
  4626. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  4627. --------D-214408-----------------------------
  4628. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  4629.     AX = 4408h
  4630.     BL = drive number (00h = default, 01h = A:, etc)
  4631. Return: CF clear if successful
  4632.         AX = 0000h if removable
  4633.            = 0001h if fixed
  4634.     CF set on error
  4635.         AX = error code (01h,0Fh) (see AH=59h)
  4636. SeeAlso: AX=4400h,AX=4409h,INT 2F/AX=122Bh
  4637. --------D-214409-----------------------------
  4638. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  4639.     AX = 4409h
  4640.     BL = drive number (00h = default, 01h = A:, etc)
  4641. Return: CF clear if successful
  4642.         DX = device attribute word
  4643.         bit 15: drive is SUBSTituted
  4644.         bit 12: drive is remote
  4645.         bit  9: direct I/O not allowed
  4646.     CF set on error
  4647.         AX = error code (01h,0Fh) (see AH=59h)
  4648. Note:    on local drives, DX bits not listed above are the attribute word from
  4649.       the device driver header (see AH=52h); for remote drives, the other
  4650.       bits appear to be undefined for DOS versions prior to 5.0 (they are
  4651.       all cleared in DOS 5+)
  4652. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  4653. --------D-21440A-----------------------------
  4654. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  4655.     AX = 440Ah
  4656.     BX = handle
  4657. Return: CF clear if successful
  4658.         DX = attribute word (as stored in SFT)
  4659.         bit 15: set if remote
  4660.         bit 14: date/time not set on close
  4661.     CF set on error
  4662.         AX = error code (01h,06h) (see AH=59h)
  4663. Note:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  4664.       the file server on which the handle is located in CX
  4665. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  4666. --------D-21440B-----------------------------
  4667. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  4668.     AX = 440Bh
  4669.     CX = pause between retries (default 1)
  4670.     DX = number of retries (default 3)
  4671. Return: CF clear if successful
  4672.     CF set on error
  4673.         AX = error code (01h) (see AH=59h)
  4674. Notes:    delay is dependent on processor speed (value in CX specifies number of
  4675.       64K-iteration empty loops to execute)
  4676.     if DX=0000h on entry, the retry count is left unchanged
  4677. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  4678. --------D-21440C-----------------------------
  4679. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  4680.     AX = 440Ch
  4681.     BX = device handle
  4682.     CH = category code
  4683.         00h unknown (DOS 3.3+)
  4684.         01h COMn: (DOS 3.3+)
  4685.         03h CON (DOS 3.3+)
  4686.         05h LPTn:
  4687.         9Eh Media Access Control driver (STARLITE)
  4688.         00h-7Fh reserved for Microsoft
  4689.         80h-FFh reserved for OEM/user-defined
  4690.     CL = function
  4691.         00h MAC driver Bind (STARLITE)
  4692.         45h set iteration count
  4693.         4Ah select code page
  4694.         4Ch start code-page preparation
  4695.         4Dh end code-page preparation
  4696.         5Fh set display information (DOS 4+)
  4697.         65h get iteration count
  4698.         6Ah query selected code page
  4699.         6Bh query prepare list
  4700.         7Fh get display information (DOS 4+)
  4701.     DS:DX -> (DOS) parameter block (see below)
  4702.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  4703.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  4704. Return: CF set on error
  4705.         AX = error code (see AH=59h)
  4706.     CF clear if successful
  4707.         DS:DX -> iteration count if CL=65h
  4708.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  4709.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  4710.     DS:DX -> (OS/2 comp box) data block
  4711. Note:    bit assignments for function code in CL:
  4712.         bit 7: set to ignore if unsupported, clear to return error
  4713.         bit 6: set if passed to driver, clear if intercepted by DOS
  4714.         bit 5: set if queries data from device, clear if sends command
  4715.         bits 4-0: subfunction
  4716. SeeAlso: AX=440Dh,INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  4717. SeeAlso: INT 2F/AX=1A01h
  4718.  
  4719. Format of parameter block for function 00h:
  4720. Offset    Size    Description
  4721.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  4722.  08h    WORD    version
  4723.  0Ah    WORD    flags
  4724.         bit 0: media requires connect or listen request before use
  4725.         bit 1: network is a LAN (broadcast/multicast supported)
  4726.         bit 2: point-to-point network
  4727.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  4728.         by MAC driver)
  4729.  0Eh    WORD    context
  4730.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  4731.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  4732.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  4733.  16h    WORD    addressing format (filled in by MAC driver)
  4734.         0000h general addressing
  4735.         0001h Ethernet addressing
  4736.         0002h Token Ring addressing
  4737.         0003h Token Bus addressing
  4738.  18h    DWORD    Send entry point (filled in by MAC driver)
  4739.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  4740.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  4741.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  4742.  
  4743. Format of parameter block for function 45h:
  4744. Offset    Size    Description
  4745.  00h    WORD    number of times output is attempted before driver assumes
  4746.         device is busy
  4747.  
  4748. Format of parameter block for functions 4Ah and 6Ah:
  4749. Offset    Size    Description
  4750.  00h    WORD    length of data
  4751.  02h    WORD    code page ID
  4752.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  4753.           start/end for each of N ranges (DOS 4.0)
  4754.     WORD    0000h  end of data (DOS 4.0)
  4755.  
  4756. Format of parameter block for function 4Ch:
  4757. Offset    Size    Description
  4758.  00h    WORD    flags
  4759.         DISPLAY.SYS = 0000h
  4760.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  4761.             prepare cartridge selection
  4762.  02h    WORD    length of remainder of parameter block
  4763.  04h    WORD    number of code pages following
  4764.  06h  N WORDs    code page 1,...,N
  4765.  
  4766. Format of parameter block for function 4Dh:
  4767. Offset    Size    Description
  4768.  00h    WORD    length of data
  4769.  02h    WORD    code page ID
  4770.  
  4771. Format of parameter block for functions 5Fh and 7Fh:
  4772. Offset    Size    Description
  4773.  00h    BYTE    level (0 for DOS 4.x-6.0)
  4774.  01h    BYTE    reserved (0)
  4775.  02h    WORD    length of following data (14)
  4776.  04h    WORD    control flags
  4777.           bit 0 set for blink, clear for intensity
  4778.           bits 1 to 15 reserved
  4779.  06h    BYTE    mode type (1=text, 2=graphics)
  4780.  07h    BYTE    reserved (0)
  4781.  08h    WORD    colors
  4782.            0 = monochrome
  4783.            else N bits per pixel
  4784.  0Ah    WORD    pixel columns
  4785.  0Ch    WORD    pixel rows
  4786.  0Eh    WORD    character columns
  4787.  10h    WORD    character rows
  4788.  
  4789. Format of parameter block for function 6Bh:
  4790. Offset    Size    Description
  4791.  00h    WORD    length of following data
  4792.  02h    WORD    number of hardware code pages
  4793.  04h  N WORDs    hardware code pages 1,...,N
  4794.     WORD    number of prepared code pages
  4795.       N WORDs    prepared code pages 1,...,N
  4796. --------d-21440C-----------------------------
  4797. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  4798.     AX = 440Ch
  4799.     BX = device handle
  4800.     CH = category code
  4801.         07h tape (ASPITAPE.SYS)
  4802.     CL = function
  4803.         01h "mtop" - perform tape operation
  4804.         02h "mtget" - get tape status
  4805.         03h ignore end-of-tape errors
  4806.         04h enable end-of-tape errors
  4807.     DS:DX -> parameter block (see below)
  4808. Return: CF set on error
  4809.         AX = error code (see AH=59h)
  4810.     CF clear if successful
  4811.         DS:DX -> data block
  4812. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  4813.       SCSI Programming Interface (ASPI).  It provides the following device
  4814.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  4815.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  4816.       also be the following names 'MTx' and 'NMTx' which default to 1024
  4817.       byte blocks.    The names may also have a '$' appended to try and make
  4818.       them unique from file names of 'RMT0' etc.
  4819.     once opend these devices must be put into RAW mode
  4820. SeeAlso: AX=4402h"ASPI"
  4821.  
  4822. Format of mtop parameter block:
  4823. Offset    Size    Description
  4824.  00h    WORD    operation code
  4825.         00h "MTWEOF" - write an end-of-file record
  4826.         01h "MTFSF" - forward space file
  4827.         02h "MTBSF" - backward space file
  4828.         03h "MTFSR" - forward space record
  4829.         04h "MTBSR" - backward space record
  4830.         05h "MTREW" - rewind
  4831.         06h "MTOFFL" - rewind and unload
  4832.         07h "MTNOP" - perform TEST UNIT READY
  4833.  02h    DWORD    repetition count
  4834.  
  4835. Format of mtget parameter block:
  4836. Offset    Size    Description
  4837.  00h    BYTE    ASPI host ID
  4838.  01h    BYTE    SCSI target ID
  4839.  02h    BYTE    SCSI logical unit number
  4840.  03h    BYTE    device parameters
  4841.         bit 0: drive must use fixed-block read and write
  4842.         bit 7: drive is an ASPI device
  4843.  04h    BYTE    current device state (see below)
  4844.  05h    BYTE    unit number within driver
  4845.  06h    WORD    fixed block blocksize
  4846.  08h    BYTE    last SCSI status
  4847.  09h    BYTE    last SCSI sense key
  4848.  0Ah    WORD    last SCSI opcode (packed)
  4849.         bits 0-7: SCSI operation (SCSI packet byte 0)
  4850.         bits 8-10: SCSI flags (SCSI packet byte 1)
  4851.         bits 11-12: ASPI "Direction Bits" (ASPI SRB byte 3)
  4852.  0Ch    WORD    residual bytes from SCSI opcode
  4853.  
  4854. Bitfields for current device state:
  4855.  bit 0    device currently opened in buffered mode
  4856.  bit 1    drive currently opened in nonbuffered mode
  4857.  bit 2    rewind drive on last close
  4858.  bit 3    drive has been written on
  4859.  bit 4    drive has been read from
  4860.  bit 5    next read will return 0 bytes
  4861.  bit 6    EOM will resemble EOF
  4862.  bit 7    drive may be busy rewinding
  4863. --------D-21440D-----------------------------
  4864. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  4865.     AX = 440Dh
  4866.     BL = drive number (00h=default,01h=A:,etc)
  4867.     CH = category code
  4868.         08h disk drive
  4869.         00h-7Fh reserved for Microsoft
  4870.         80h-FFh reserved for OEM/user-defined
  4871.     CL = function
  4872.         00h (OS/2)    \ used to lock/unlock a drive
  4873.         01h (OS/2)    /
  4874.         40h set device parameters
  4875.         41h write logical device track
  4876.         42h format and verify logical device track
  4877.         46h (DOS 4+) set volume serial number (see also AH=69h)
  4878.         47h (DOS 4+) set access flag
  4879.         60h get device parameters
  4880.         61h read logical device track
  4881.         62h verify logical device track
  4882.         66h (DOS 4+) get volume serial number (see also AH=69h)
  4883.         67h (DOS 4+) get access flag
  4884.         68h (DOS 5+) sense media type
  4885.     DS:DX -> (DOS) parameter block (see below)
  4886.     SI:DI -> (OS/2 comp box) parameter block (see below)
  4887. Return: CF set on error
  4888.         AX = error code (01h,02h) (see AH=59h)
  4889.     CF clear if successful
  4890.         DS:DX -> data block if CL=60h or CL=61h
  4891. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  4892.       entries in the BPB for diskettes.
  4893.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  4894.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  4895. SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
  4896.  
  4897. Format of parameter block for functions 40h, 60h:
  4898. Offset    Size    Description
  4899.  00h    BYTE    special functions
  4900.         bit 0 set if function to use current BPB, clear if Device
  4901.             BIOS Parameter Block field contains new default BPB
  4902.         bit 1 set if function to use track layout fields only
  4903.             must be clear if CL=60h
  4904.         bit 2 set if all sectors in track same size (should be set)
  4905.         bits 3-7 reserved
  4906.  01h    BYTE    device type
  4907.         00h  320K/360K disk
  4908.         01h  1.2M disk
  4909.         02h  720K disk
  4910.         03h  single-density 8-inch disk
  4911.         04h  double-density 8-inch disk
  4912.         05h  fixed disk
  4913.         06h  tape drive
  4914.         07h  (DOS 3.3+) 1.44M floppy
  4915.         08h  read/write optical disk
  4916.         09h  (DOS 5+) 2.88M floppy
  4917.         0Ah  other type of block device
  4918.  02h    WORD    device attributes
  4919.         bit 0 set if nonremovable medium
  4920.         bit 1 set if door lock ("changeline") supported
  4921.         bits 2-15 reserved
  4922.  04h    WORD    number of cylinders
  4923.  06h    BYTE    media type
  4924.         for 1.2M drive
  4925.             00h 1.2M disk (default)
  4926.             01h 320K/360K disk
  4927.         F8h for DUBLDISK.SYS v2.6 expanded drives
  4928.         always 00h for other drive types
  4929.  07h 31 BYTEs    device BPB (see AH=53h), bytes after BPB offset 1Eh omitted
  4930. ---function 40h only---
  4931.  26h    WORD    number of sectors per track (start of track layout field)
  4932.          max 63
  4933.  28h  N word pairs: number,size of each sector in track
  4934.  
  4935. Format of parameter block for functions 41h, 61h:
  4936. Offset    Size    Description
  4937.  00h    BYTE    special functions (reserved, must be zero)
  4938.  01h    WORD    number of disk head
  4939.  03h    WORD    number of disk cylinder
  4940.  05h    WORD    number of first sector to read/write
  4941.  07h    WORD    number of sectors
  4942.  09h    DWORD    transfer address
  4943.  
  4944. Format of parameter block for function 42h:
  4945. Offset    Size    Description
  4946.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4947.           bit 0=0: format/verify track
  4948.             1: format status call (DOS 3.2+), don't actually format
  4949.           bits 1-7 reserved, must be zero
  4950.         on return (DOS 4.x):
  4951.           bit 0: set if specified tracks, sectors/track supported
  4952.           bit 1: set if function not supported by BIOS
  4953.           bit 2: set if specified tracks, sectors/track not supported
  4954.           bit 3: set if no disk in drive
  4955.  01h    WORD    number of disk head
  4956.  03h    WORD    number of disk cylinder
  4957.  
  4958. Format of parameter block for function 62h:
  4959. Offset    Size    Description
  4960.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4961.           bit 0=0: verify single track
  4962.             1: verify multiple tracks
  4963.           bits 1-7 reserved, must be zero
  4964.         on return (DOS 4.x):
  4965.           bit 0: set if specified tracks, sectors/track supported
  4966.           bit 1: set if function not supported by BIOS
  4967.           bit 2: set if specified tracks, sectors/track not supported
  4968.           bit 3: set if no disk in drive
  4969.  01h    WORD    number of disk head
  4970.  03h    WORD    number of disk cylinder
  4971.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  4972.  
  4973. Format of parameter block for functions 46h, 66h:
  4974. Offset    Size    Description
  4975.  00h    WORD    (call) info level (should be 0000h)
  4976.  02h    DWORD    disk serial number (binary)
  4977.  06h 11 BYTEs    volume label or "NO NAME    "
  4978.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   " (CL=66h only)
  4979.  
  4980. Format of parameter block for functions 47h, 67h:
  4981. Offset    Size    Description
  4982.  00h    BYTE    special-function field (must be zero)
  4983.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  4984.  
  4985. Format of parameter block for function 68h:
  4986. Offset    Size    Description
  4987.  00h    BYTE    01h for default media type, 00h for any other media type
  4988.          (see also INT 13/AH=20h)
  4989.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  4990. --------D-21440E-----------------------------
  4991. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  4992.     AX = 440Eh
  4993.     BL = drive number (00h=default,01h=A:,etc)
  4994. Return: CF set on error
  4995.         AX = error code (01h,0Fh) (see AH=59h)
  4996.     CF clear if successful
  4997.         AL = 00h block device has only one logical drive assigned
  4998.          1..26 the last letter used to reference the drive (1=A:,etc)
  4999. SeeAlso: AX=440Fh,INT 2F/AX=122Bh
  5000. --------D-21440F-----------------------------
  5001. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  5002.     AX = 440Fh
  5003.     BL = physical drive number (00h=default,01h=A:,etc))
  5004. Return: CF set on error
  5005.         AX = error code (01h,0Fh) (see AH=59h)
  5006.     CF clear if successful
  5007.         drive now responds to next logical drive number
  5008. Note:    maps logical drives to physical drives, similar to DOS's treatment of
  5009.       a single physical floppy drive as both A: and B:
  5010. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  5011. --------D-214410-----------------------------
  5012. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  5013.     AX = 4410h
  5014.     BX = handle for device
  5015.     CH = category code (see AX=440Ch)
  5016.     CL = function code
  5017. Return: CF clear if successful
  5018.         AX = 0000h    specified IOCTL function is supported
  5019.     CF set on error
  5020.         AL = 01h    IOCTL capability not available
  5021. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  5022.       standard DOS 3.2 set may use this call first to see whether a
  5023.       particular call is supported
  5024. SeeAlso: AX=440Ch,AX=440Dh,AX=4411h
  5025. --------d-214410BXFFFF-----------------------
  5026. INT 21 U - NewSpace - ENABLE DRIVER
  5027.     AX = 4410h
  5028.     BX = FFFFh
  5029. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  5030.       all files as they are written and decompresses them as they are read
  5031. Note:    compressed files are not accessible unless the driver is enabled
  5032. SeeAlso: AX=4411h/BX=FFFFh
  5033. --------D-214411-----------------------------
  5034. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  5035.     AX = 4411h
  5036.     BL = drive number
  5037.     CH = category code (see AX=440Dh)
  5038.     CL = function code
  5039. Return: CF clear if successful
  5040.         AX = 0000h    specified IOCTL function is supported
  5041.     CF set on error
  5042.         AL = 01h    IOCTL capability not available
  5043. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  5044.       standard DOS 3.2 set may use this call first to see whether a
  5045.       particular call is supported
  5046. SeeAlso: AX=440Ch,AX=440Dh,AX=4410h
  5047. --------d-214411BXFFFF-----------------------
  5048. INT 21 U - NewSpace - DISABLE DRIVER
  5049.     AX = 4411h
  5050.     BX = FFFFh
  5051. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  5052.       all files as they are written and decompresses them as they are read
  5053. Note:    compressed files are not accessible unless the driver is enabled
  5054. SeeAlso: AX=4410h/BX=FFFFh
  5055. --------O-214412-----------------------------
  5056. INT 21 - DR-DOS 5+ - DETERMINE DOS TYPE
  5057.     AX = 4412h
  5058.     CF set
  5059. Return: CF set if not DR-DOS
  5060.         AX = error code (see AH=59h)
  5061.     CF clear if DR-DOS
  5062.         DX = AX = version code (see AX=4452h)
  5063. Note:    this obsolete call which will not be supported in future versions of
  5064.       DR-DOS is identical to AX=4452h
  5065. SeeAlso: AX=4452h
  5066. --------d-214412BXFFFF-----------------------
  5067. INT 21 U - NewSpace - INSTALLATION CHECK???
  5068.     AX = 4412h
  5069.     BX = FFFFh
  5070. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  5071.     BX:DX -> ???
  5072.     CX = ???
  5073. SeeAlso: AX=4411h/BX=FFFFh
  5074. --------d-214413BXFFFF-----------------------
  5075. INT 21 U - NewSpace - GET ???
  5076.     AX = 4413h
  5077.     BX = FFFFh
  5078. Return: AX = code segment of NewRes (resident driver for NewSpace)
  5079.     BX = offset of ???
  5080. SeeAlso: AX=4412h/BX=FFFFh
  5081. --------O-214414-----------------------------
  5082. INT 21 U - DR-DOS 5.0 - SET GLOBAL PASSWORD
  5083.     AX = 4414h
  5084.     DS:DX -> password string (blank-padded to 8 characters)
  5085. Desc:    Specify the master password for accessing files.
  5086. Note:    this obsolete call which will not be supported in future versions of
  5087.       DR-DOS is identical to AX=4452h
  5088. SeeAlso: AX=4454h
  5089. --------d-214414BXFFFF-----------------------
  5090. INT 21 U - NewSpace - DEBUGGING DUMP
  5091.     AX = 4414h
  5092.     BX = FFFFh
  5093. Return:    debugging dump written to X:\NEWSPACE.SMP
  5094. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  5095. --------O-2144-------------------------------
  5096. INT 21 U - DR-DOS 5.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  5097.     AH = 44h
  5098.     AL = 16h to 18h
  5099. Note:    these obsolete subfunctions (which will not be supported in future
  5100.       versions of DR-DOS) are identical to AX=4456h through 4458h
  5101. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  5102. --------O-214451-----------------------------
  5103. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  5104.     AX = 4451h
  5105. Return: CF set if not Concurrent DOS
  5106.         AX = error code (see AH=59h)
  5107.     CF clear if successful
  5108.         AH = single-tasking/multitasking nature
  5109.         10h single-tasking
  5110.             AL = operating system version ID (see AX=4452h)
  5111.         14h multitasking
  5112.             AL = operating system version ID (see below)
  5113. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  5114.       in the environment variable VER
  5115.     use this function if you are looking for multitasking capabilities,
  5116.       AX=4452h for single-tasking
  5117.     this function should never return the single-tasking values
  5118. SeeAlso: AX=4452h,AX=4459h
  5119.  
  5120. Values for operating system version ID:
  5121.  32h Concurrent PC DOS 3.2
  5122.  41h Concurrent DOS 4.1
  5123.  50h Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  5124.  60h Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  5125.  62h Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  5126.  66h DR Multiuser DOS 5.1
  5127. --------O-214452-----------------------------
  5128. INT 21 - DR-DOS 3.41+ - DETERMINE DOS TYPE/GET DR-DOS VERSION
  5129.     AX = 4452h
  5130.     CF set
  5131. Return: CF set if not DR-DOS
  5132.         AX = error code (see AH=59h)
  5133.     CF clear if DR-DOS
  5134.         DX = AX = version code
  5135.         AH = single-tasking/multitasking
  5136.         10h single-tasking
  5137.             AL = operating system version ID (see below)
  5138.         14h multitasking
  5139.             AL = operating system version ID (see AX=4451h)
  5140. Notes:    the DR-DOS version is stored in the environment variable VER
  5141.     use this function if looking for single-tasking capabilities, AX=4451h
  5142.       if looking for multitasking; this call should never return multi-
  5143.       tasking values
  5144. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  5145.  
  5146. Values for operating system version ID:
  5147.  60h DOS Plus
  5148.  63h DR-DOS 3.41
  5149.  64h DR-DOS 3.42
  5150.  65h DR-DOS 5.00
  5151.  67h DR-DOS 6.00
  5152.  70h PalmDOS
  5153. --------O-214454-----------------------------
  5154. INT 21 U - DR-DOS 3.41+ - SET GLOBAL PASSWORD
  5155.     AX = 4454h
  5156.     DS:DX -> password string (blank-padded to 8 characters)
  5157. Desc:    Specify the master password for accessing files.
  5158. SeeAlso: AX=4303h,AX=4414h
  5159. --------O-214456-----------------------------
  5160. INT 21 U - DR-DOS 5.0+ - HISTORY BUFFER CONTROL
  5161.     AX = 4456h
  5162.     DL = flag
  5163.         bit 0: 1 = COMMAND.COM history buffers
  5164.            0 = set to application
  5165. Return: AL = ??? (20h if DL bit 0 set, A0h if clear (DR-DOS 6.0))
  5166. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  5167. --------O-214457-----------------------------
  5168. INT 21 U - DR-DOS 5.0+ - SHARE/HILOAD CONTROL
  5169.     AX = 4457h
  5170.     DH = subfunction
  5171.         00h enable/disable SHARE
  5172.         DL = 00h disable
  5173.            = 01h enable
  5174.            else Return: AX = ???
  5175.         01h get HILOAD status
  5176.         Return: AX = status
  5177.                 0000h off
  5178.                 0001h on
  5179.         02h set HILOAD status
  5180.         DL = new state (00h off, 01h on)
  5181.         Return: AX = ???
  5182.         other
  5183.         Return: AX = ???
  5184. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  5185. SeeAlso: AX=4457h/DX=FFFFh
  5186. --------O-214457DXFFFF-----------------------
  5187. INT 21 U - DR-DOS 6.0 - GET SHARE STATUS
  5188.     AX = 4457h
  5189.     DX = FFFFh
  5190. Return: AX = SHARE status
  5191. SeeAlso: INT 2F/AX=1000h
  5192. --------O-214458-----------------------------
  5193. INT 21 U - DR-DOS 5.0+ internal - GET POINTER TO TABLE OF ???
  5194.     AX = 4458h
  5195. Return: ES:BX -> internal table (see below)
  5196.     AX = ??? (0B50h for DR-DOS 5.0, 0A56h for DR-DOS 6.0)
  5197. SeeAlso: AX=4452h
  5198.  
  5199. Format of internal table:
  5200. Offset    Size    Description
  5201.  00h    DWORD    pointer to ???
  5202.  04h  7 BYTEs    ???
  5203.  0Bh    WORD    K of extended memory at startup
  5204.  0Dh    BYTE    number of far jump entry points
  5205.  0Eh    WORD    segment containing far jumps to DR-DOS entry points (see below)
  5206. ---DR-DOS 6.0---
  5207.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  5208.         memory block (see below) or 0000h if none; segment is FFFFh
  5209.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  5210.         or 0000h if already used
  5211.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  5212.         memory block (see below) or 0000h if none; segment is FFFFh
  5213. Note:    the segment used for the DR-DOS 6.0 CONFIG environment variables
  5214.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  5215.       called from CONFIG.SYS. The word is set to zero later and the area
  5216.       lost.
  5217.  
  5218. Format of kernel entry jump table for DR-DOS 5.0-6.0:
  5219. Offset    Size    Description
  5220.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  5221.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  5222.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  5223.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22??? (RETF)
  5224.  14h  5 BYTEs    far jump to kernel entry point for INT 23??? (RETF)
  5225.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  5226.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  5227.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  5228.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  5229.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  5230.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  5231.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  5232.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  5233.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  5234.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  5235.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  5236. Note:    all of these entry points are indirected through this jump table
  5237.       to allow the kernel to be relocated into high memory while leaving
  5238.       the actual entry addresses in low memory for maximum compatibility
  5239.  
  5240. Format of HMA Memory Block (DR-DOS 6.0 kernel loaded in HMA):
  5241. Offset    Size    Description
  5242.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  5243.  02h    WORD    size of this block in bytes (at least 10h)
  5244.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  5245.         00h system
  5246.         01h KEYB
  5247.         02h NLSFUNC
  5248.         03h SHARE
  5249.         04h TaskMAX
  5250.         05h COMMAND
  5251.  05h    var    TSR (or system) code and data. DR-DOS TSR's, such as KEYB,
  5252.         hooks interrupts using segment FFFEh instead FFFFh.
  5253. --------O-214459-----------------------------
  5254. INT 21 - DR MultiUser DOS 5.0 - API
  5255.     AX = 4459h
  5256.     CL = function (see INT E0"CP/M")
  5257.     DS,DX = parameters
  5258. Notes:    DR-DOS 5.0 returns CF set and AX=0001h
  5259.     this API is also available on INT E0
  5260. SeeAlso: AX=4452h,INT E0"CP/M"
  5261. --------d-2144FFBXFFFF-----------------------
  5262. INT 21 U - NewSpace - ???
  5263.     AX = 44FFh
  5264.     BX = FFFFh
  5265.     DX = ???
  5266. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  5267.       all files as they are written and decompresses them as they are read
  5268. SeeAlso: AX=4414h/BX=FFFFh
  5269. --------D-2145-------------------------------
  5270. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  5271.     AH = 45h
  5272.     BX = file handle
  5273. Return: CF clear if successful
  5274.         AX = new handle
  5275.     CF set on error
  5276.         AX = error code (04h,06h) (see AH=59h)
  5277. Notes:    moving file pointer for either handle will also move it for the other,
  5278.       because both will refer to the same system file table
  5279.     for DOS versions prior to 3.3, file writes may be forced to disk by
  5280.       duplicating the file handle and closing the duplicate
  5281. SeeAlso: AH=3Dh,AH=46h
  5282. --------D-2146-------------------------------
  5283. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  5284.     AH = 46h
  5285.     BX = file handle
  5286.     CX = file handle to become duplicate of first handle
  5287. Return: CF clear if successful
  5288.     CF set on error
  5289.         AX = error code (04h,06h) (see AH=59h)
  5290. Notes:    closes file with handle CX if it is still open
  5291.     DOS 3.30 hangs if BX=CX on entry
  5292.     moving file pointer for either handle will also move it for the other,
  5293.       because both will refer to the same system file table
  5294. SeeAlso: AH=3Dh,AH=45h
  5295. --------D-2147-------------------------------
  5296. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  5297.     AH = 47h
  5298.     DL = drive number (00h = default, 01h = A:, etc)
  5299.     DS:SI -> 64-byte buffer for ASCIZ pathname
  5300. Return: CF clear if successful
  5301.         AX = 0100h (undocumented)
  5302.     CF set on error
  5303.         AX = error code (0Fh) (see AH=59h)
  5304. Notes:    the returned path does not include a drive or the initial backslash
  5305.     many Microsoft products for Windows rely on AX being 0100h on success
  5306.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  5307. SeeAlso: AH=19h,AH=3Bh,INT 15/AX=DE25h
  5308. --------D-2148-------------------------------
  5309. INT 21 - DOS 2+ - ALLOCATE MEMORY
  5310.     AH = 48h
  5311.     BX = number of paragraphs to allocate
  5312. Return: CF clear if successful
  5313.         AX = segment of allocated block
  5314.     CF set on error
  5315.         AX = error code (07h,08h) (see AH=59h)
  5316.         BX = size of largest available block
  5317. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  5318.       allocate
  5319.     .COM programs are initially allocated the largest available memory
  5320.       block, and should free some memory with AH=49h before attempting any
  5321.       allocations
  5322.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  5323.       near pointer to the allocated block on a successful return
  5324. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  5325. --------D-2149-------------------------------
  5326. INT 21 - DOS 2+ - FREE MEMORY
  5327.     AH = 49h
  5328.     ES = segment of block to free
  5329. Return: CF clear if successful
  5330.     CF set on error
  5331.         AX = error code (07h,09h) (see AH=59h)
  5332. Notes:    apparently never returns an error 07h, despite official docs; DOS 3.30
  5333.       code contains only an error 09h exit
  5334.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  5335.       freed, only when a block is allocated or resized
  5336. SeeAlso: AH=48h,AH=4Ah
  5337. --------D-214A-------------------------------
  5338. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  5339.     AH = 4Ah
  5340.     BX = new size in paragraphs
  5341.     ES = segment of block to resize
  5342. Return: CF clear if successful
  5343.     CF set on error
  5344.         AX = error code (07h,08h,09h) (see AH=59h)
  5345.         BX = maximum paragraphs available for specified memory block
  5346. Notes:    under DOS 2.1-5.0, if there is insufficient memory to expand the block
  5347.       as much as requested, the block will be made as large as possible
  5348.     DOS 2.1-5.0 coalesces any free blocks immediately following the block
  5349.       to be resized
  5350. SeeAlso: AH=48h,AH=49h,AH=83h
  5351. --------D-214B-------------------------------
  5352. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  5353.     AH = 4Bh
  5354.     AL = type of load
  5355.         00h load and execute
  5356.         01h load but do not execute
  5357.         03h load overlay
  5358.         04h load and execute in background (European MS-DOS 4.0 only)
  5359.         "Exec & Go" (see also AH=80h)
  5360.     DS:DX -> ASCIZ program name (must include extension)
  5361.     ES:BX -> parameter block (see below)
  5362.     CX = mode (subfunction 04h only)
  5363.         0000h child placed in zombie mode after termination
  5364.         0001h child's return code discarded on termination
  5365. Return: CF clear if successful
  5366.         BX,DX destroyed
  5367.         if subfunction 01h, process ID set to new program's PSP; get with
  5368.         INT 21/AH=62h
  5369.     CF set on error
  5370.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  5371. Notes:    DOS 2.x destroys all registers, including SS:SP
  5372.     for functions 00h and 01h, the calling process must ensure that there
  5373.       is enough unallocated memory available; if necessary, by releasing
  5374.       memory with AH=49h or AH=4Ah
  5375.     for function 01h, the AX value to be passed to the child program is put
  5376.       on top of the child's stack
  5377.     for function 03h, DOS assumes that the overlay is being loaded into
  5378.       memory allocated by the caller
  5379.     function 01h was undocumented prior to the release of DOS 5.0
  5380.     some versions (such as DR-DOS 6.0) check the parameters and parameter
  5381.       block and return an error if an invalid value (such as an offset of
  5382.       FFFFh) is found
  5383.     background programs under European MS-DOS 4.0 must use the new
  5384.       executable format
  5385.     new executables begin running with the following register values
  5386.         AX = environment segment
  5387.         BX = offset of command tail in environment segment
  5388.         CX = size of automatic data segment (0000h = 64K)
  5389.         ES,BP = 0000h
  5390.         DS = automatic data segment
  5391.         SS:SP = initial stack
  5392.       the command tail corresponds to an old executable's PSP:0081h and
  5393.       following, except that the 0Dh is turned into a NUL (00h); new
  5394.       format executables have no PSP
  5395.     under the FlashTek X-32 DOS extender, only function 00h is supported
  5396.       and the pointers are passed in DS:EDX and ES:EBX
  5397.     names for the various executable type understood by various
  5398.       environments:
  5399.           MZ  old-style DOS executable
  5400.         NE  Windows or OS/2 1.x segmented ("new") executable
  5401.         LE  Windows virtual device driver (VxD) linear executable
  5402.         LX  variant of LE used in OS/2 2.x
  5403.         W3  Windows WIN386.EXE file; a collection of LE files
  5404.         PE  Win32 (Windows NT and Win32s) portable executable based on
  5405.             Unix COFF
  5406. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  5407.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  5408.       file contains additional data after the actual overlay
  5409. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  5410.  
  5411. Format of EXEC parameter block for AL=00h,01h,04h:
  5412. Offset    Size    Description
  5413.  00h    WORD    segment of environment to copy for child process (copy caller's
  5414.         environment if 0000h)
  5415.  02h    DWORD    pointer to command tail to be copied into child's PSP
  5416.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  5417.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  5418.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  5419.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  5420.  
  5421. Format of EXEC parameter block for AL=03h:
  5422. Offset    Size    Description
  5423.  00h    WORD    segment at which to load overlay
  5424.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  5425.  
  5426. Format of EXEC parameter block for FlashTek X-32:
  5427. Offset    Size    Description
  5428.  00h    PWORD    48-bit far pointer to environment string
  5429.  06h    PWORD    48-bit far pointer to command tail string
  5430.  
  5431. Format of .EXE file header:
  5432. Offset    Size    Description
  5433.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  5434.  02h    WORD    number of bytes in last 512-byte page of executable
  5435.  04h    WORD    total number of 512-byte pages in executable (includes any
  5436.         partial last page)
  5437.  06h    WORD    number of relocation entries
  5438.  08h    WORD    header size in paragraphs
  5439.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  5440.         executable's size
  5441.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  5442.  0Eh    WORD    initial SS relative to start of executable
  5443.  10h    WORD    initial SP
  5444.  12h    WORD    checksum (one's complement of sum of all words in executable)
  5445.  14h    DWORD    initial CS:IP relative to start of executable
  5446.  18h    WORD    offset within header of relocation table
  5447.          40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  5448.  1Ah    WORD    overlay number (normally 0000h = main program)
  5449. ---new executable---
  5450.  1Ch  4 BYTEs    ???
  5451.  20h    WORD    behavior bits
  5452.  22h 26    BYTEs    reserved for additional behavior info
  5453.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  5454.          or 00000000h if plain MZ executable
  5455. ---Borland TLINK---
  5456.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  5457.  1Eh    BYTE    signature FBh
  5458.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  5459.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  5460. ---ARJ self-extracting archive---
  5461.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  5462.         the first 1000 bytes of the file)
  5463. ---LZEXE 0.90 compressed executable---
  5464.  1Ch  4 BYTEs    signature "LZ09"
  5465. ---LZEXE 0.91 compressed executable---
  5466.  1Ch  4 BYTEs    signature "LZ91"
  5467. ---PKLITE compressed executable---
  5468.  1Ch    BYTE    minor version number
  5469.  1Dh    BYTE    bits 0-3: major version
  5470.          bit 4: extra compression
  5471.         bit 5: huge (multi-segment) file
  5472.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  5473. ---LHarc 1.x self-extracting archive---
  5474.  1Ch  4 BYTEs    unused???
  5475.  20h  3 BYTEs    jump to start of extraction code
  5476.  23h  2 BYTEs    ???
  5477.  25h 12 BYTEs    signature "LHarc's SFX "
  5478. ---LHA 2.x self-extracting archive---
  5479.  1Ch  8 BYTEs    ???
  5480.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  5481. ---TopSpeed C 3.0 CRUNCH compressed file---
  5482.  1Ch    DWORD    018A0001h
  5483.  20h    WORD    1565h
  5484. ---PKARCK 3.5 self-extracting archive---
  5485.  1Ch    DWORD    00020001h
  5486.  20h    WORD    0700h
  5487. ---BSA (Soviet archiver) self-extracting archive---
  5488.  1Ch    WORD    000Fh
  5489.  1Eh    BYTE    A7h
  5490. ---LARC self-extracting archive---
  5491.  1Ch  4 BYTEs    ???
  5492.  20h 11 BYTEs    "SFX by LARC "
  5493. ---LH self-extracting archive---
  5494.  1Ch  8 BYTEs    ???
  5495.  24h  8 BYTEs    "LH's SFX "
  5496. ---other linkers---
  5497.  1Ch    var    optional information
  5498. ---
  5499.   N   N DWORDs    relocation items
  5500. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  5501.       versions of the MS linker set it that way
  5502.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  5503.       program is loaded as high in memory as possible
  5504.     the maximum allocation is set to FFFFh by default
  5505.  
  5506. Format of new executable header:
  5507. Offset    Size    Description
  5508.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  5509.  02h  2 BYTEs    linker version (major, then minor)
  5510.  04h    WORD    offset from start of this header to entry table (see below)
  5511.  06h    WORD    length of entry table in bytes
  5512.  08h    DWORD    file load CRC (0 in Borland's TPW)
  5513.  0Ch    BYTE    program flags
  5514.         bits 0-1 DGROUP type
  5515.           0 = none
  5516.           1 = single shared
  5517.           2 = multiple (unshared)
  5518.           3 = (null)
  5519.         bit 2:    global initialization
  5520.         bit 3:    protected mode only
  5521.         bit 4:    8086 instructions
  5522.         bit 5:    80286 instructions
  5523.         bit 6:    80386 instructions
  5524.         bit 7:    80x87 instructions
  5525.  0Dh    BYTE    application flags
  5526.         bits 0-2: application type
  5527.             001 full screen (not aware of Windows/P.M. API)
  5528.             010 compatible with Windows/P.M. API
  5529.             011 uses Windows/P.M. API
  5530.         bit 3: is a Family Application (OS/2)
  5531.         bit 5: 0=executable, 1=errors in image
  5532.         bit 6: non-conforming program (valid stack is not maintained)
  5533.         bit 7: DLL or driver rather than application
  5534.             (SS:SP info invalid, CS:IP points at FAR init routine 
  5535.              called with AX=module handle which returns AX=0000h
  5536.              on failure, AX nonzero on successful initialization)
  5537.  0Eh    WORD    auto data segment index
  5538.  10h    WORD    initial local heap size
  5539.  12h    WORD    initial stack size (added to data seg, 0000h if SS != DS)
  5540.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  5541.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  5542.         if SS=automatic data segment and SP=0000h, the stack pointer is
  5543.           set to the top of the automatic data segment, just below the
  5544.           local heap
  5545.  1Ch    WORD    segment count
  5546.  1Eh    WORD    module reference count
  5547.  20h    WORD    length of nonresident names table in bytes
  5548.  22h    WORD    offset from start of this header to segment table (see below)
  5549.  24h    WORD    offset from start of this header to resource table
  5550.  26h    WORD    offset from start of this header to resident names table
  5551.  28h    WORD    offset from start of this header to module reference table
  5552.  2Ah    WORD    offset from start of this header to imported names table
  5553.         (array of counted strings, terminated with a string of length
  5554.          00h)
  5555.  2Ch    DWORD    offset from start of file to nonresident names table
  5556.  30h    WORD    count of moveable entry point listed in entry table
  5557.  32h    WORD    file alignment size shift count
  5558.         0 is equivalent to 9 (default 512-byte pages)
  5559.  34h    WORD    number of resource table entries
  5560.  36h    BYTE    target operating system
  5561.         00h unknown
  5562.         01h OS/2
  5563.         02h Windows
  5564.         03h European MS-DOS 4.x
  5565.         04h Windows 386
  5566.         05h BOSS (Borland Operating System Services)
  5567.  37h    BYTE    other EXE flags
  5568.         bit 0: supports long filenames
  5569.         bit 1: 2.X protected mode
  5570.         bit 2: 2.X proportional font
  5571.         bit 3: gangload area
  5572.  38h    WORD    offset to return thunks or start of gangload area
  5573.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  5574.  3Ch    WORD    minimum code swap area size
  5575.  3Eh  2 BYTEs    expected Windows version (minor version first)
  5576. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  5577.       Reference, Vol 4.
  5578.  
  5579. Format of Codeview trailer (at end of executable):
  5580. Offset    Size    Description
  5581.  00h    WORD    signature 4E42h ('NB')
  5582.  02h    WORD    Microsoft debug info version number
  5583.  04h    DWORD    Codeview header offset
  5584.  
  5585. Format of new executable segment table record:
  5586.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  5587.  02h    WORD    length of image in file (0000h = 64K)
  5588.  04h    WORD    segment attributes (see below)
  5589.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  5590. Note:    the first segment table entry is entry number 1
  5591.  
  5592. Bitfields for segment attributes:
  5593.  bit 0    data segment rather than code segment
  5594.  bit 1    unused???
  5595.  bit 2    real mode
  5596.  bit 3    iterated
  5597.  bit 4    movable
  5598.  bit 5    sharable
  5599.  bit 6    preloaded rather than demand-loaded
  5600.  bit 7    execute-only (code) or read-only (data)
  5601.  bit 8    relocations (directly following code for this segment)
  5602.  bit 9    debug info present
  5603.  bits 10,11    80286 DPL bits
  5604.  bit 12        discardable
  5605.  bits 13-15    discard priority
  5606.  
  5607. Format of new executable entry table item (list):
  5608. Offset    Size    Description
  5609.  00h    BYTE    number of entry points (00h if end of entry table list)
  5610.  01h    BYTE    segment number (00h if end of entry table list)
  5611.  02h 3N BYTEs    entry records
  5612.         Offset    Size    Description
  5613.          00h    BYTE    flags
  5614.                 bit 0: exported
  5615.                 bit 1: single data
  5616.                 bits 2-7: unused???
  5617.          01h    WORD    offset within segment
  5618.  
  5619. Format of new executable relocation data (immediately follows segment image):
  5620. Offset    Size    Description
  5621.  00h    WORD    number of relocation items
  5622.  02h 8N BYTEs    relocation items
  5623.         Offset    Size    Description
  5624.          00h    BYTE    relocation type
  5625.                 00h LOBYTE
  5626.                 02h BASE
  5627.                 03h PTR
  5628.                 05h OFFS
  5629.                 0Bh PTR48
  5630.                 0Dh OFFS32
  5631.          01h    BYTE    flags
  5632.                 bit 2: additive
  5633.          02h    WORD    offset within segment
  5634.          04h    WORD    target address segment
  5635.          06h    WORD    target address offset
  5636.          
  5637. Format of new executable resource data:
  5638. Offset    Size    Description
  5639.  00h    WORD    alignment shift count for resource data
  5640.  02h  N RECORDs resources
  5641.     Format of resource record:
  5642.     Offset    Size    Description
  5643.      00h    WORD    type ID
  5644.             0000h if end of resource records
  5645.             >= 8000h if integer type
  5646.             else offset from start of resource table to type string
  5647.      02h    WORD    number of resources of this type
  5648.      04h    DWORD    reserved for runtime use
  5649.      08h  N Resources (see below)
  5650. Note:    resource type and name strings are stored immediately following the
  5651.       resource table, and are not null-terminated
  5652.  
  5653. Format of new executable resource entry:
  5654. Offset    Size    Description
  5655.  00h    WORD    offset in alignment units from start of file to contents of
  5656.         the resource data
  5657.  02h    WORD    length of resource image in bytes
  5658.  04h    WORD    flags
  5659.         bit 4: moveable
  5660.         bit 5: shareable
  5661.         bit 6: preloaded
  5662.  06h    WORD    resource ID
  5663.         >= 8000h if integer resource
  5664.         else offset from start of resource table to resource string
  5665.  08h    DWORD    reserved for runtime use
  5666. Notes:    resource type and name strings are stored immediately following the
  5667.       resource table, and are not null-terminated
  5668.     strings are counted strings, with a string of length 0 indicating the
  5669.       end of the resource table
  5670.  
  5671. Format of new executable module reference table [one bundle of entries]:
  5672. Offset    Size    Description
  5673.  00h    BYTE    number of records in this bundle (00h if end of table)
  5674.  01h    BYTE    segment indicator
  5675.         00h unused
  5676.         FFh movable segment, segment number is in entry
  5677.         else segment number of fixed segment
  5678.  02h  N RECORDs
  5679.     Format of segment record
  5680.     Offset    Size    Description
  5681.      00h    BYTE    flags
  5682.             bit 0: entry is exported
  5683.             bit 1: entry uses global (shared) data
  5684.             bits 7-3: number of parameter words
  5685.     ---fixed segment---
  5686.      01h    WORD    offset
  5687.     ---moveable segment---
  5688.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  5689.      03h    BYTE    segment number
  5690.      05h    WORD    offset
  5691. Note:    table entries are numbered starting from 1
  5692.  
  5693. Format of new executable resident/nonresident name table entry:
  5694. Offset    Size    Description
  5695.  00h    BYTE    length of string (00h if end of table)
  5696.  01h  N BYTEs    ASCII text of string
  5697.  N+1    WORD    ordinal number (index into entry table)
  5698. Notes:    the first string in the resident name table is the module name; the
  5699.       first entry in the nonresident name table is the module description
  5700.     the strings are case-sensitive; if the executable was linked with
  5701.       /IGNORECASE, all strings are in uppercase
  5702.  
  5703. Format of Linear Executable (enhanced mode executable) header:
  5704. Offset    Size    Description
  5705.  00h  2 BYTEs    "LE" (4Ch 45h) signature
  5706.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  5707.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  5708.  04h    DWORD    executable format level
  5709.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  5710.         01h Intel 80286 or upwardly compatible
  5711.         02h Intel 80386 or upwardly compatible            
  5712.         03h Intel 80486 or upwardly compatible            
  5713.         04h Intel 80586 or upwardly compatible
  5714.         20h Intel i860 (N10) or compatible
  5715.         21h Intel "N11" or compatible
  5716.         40h MIPS Mark I (R2000, R3000) or compatible
  5717.         41h MIPS Mark II (R6000) or compatible
  5718.         42h MIPS Mark III (R4000) or compatible
  5719.  0Ah    WORD    target operating system
  5720.         01h OS/2
  5721.         02h Windows
  5722.         03h European DOS 4.0
  5723.         04h Windows 386
  5724.  0Ch    DWORD    module version
  5725.  10h    DWORD    module type
  5726.         bit 2: initialization (only for DLLs)
  5727.             0 = global
  5728.             1 = per-process
  5729.         bit 4: no internal fixups in executable image
  5730.         bit 5: no external fixups in executable image
  5731.         bits 8,9,10:
  5732.             0 = unknown
  5733.             1 = incompatible with PM windowing \
  5734.             2 = compatible with PM windowing    > (only for
  5735.             3 = uses PM windowing API       /    programs)
  5736.         bit 13: module not loadable (only for programs)
  5737.         bit 15: module is DLL rather than program
  5738.  14h    DWORD    number of memory pages
  5739.  18h    Initial CS:EIP
  5740.     DWORD    object number
  5741.     DWORD    offset
  5742.  20h    Initial SS:ESP
  5743.     DWORD    object number
  5744.     DWORD    offset
  5745.  28h    DWORD    memory page size
  5746.  2Ch    DWORD    bytes on last page
  5747.  30h    DWORD    fixup section size
  5748.  34h    DWORD    fixup section checksum
  5749.  38h    DWORD    loader section size
  5750.  3Ch    DWORD    loader section checksum
  5751.  40h    DWORD    offset of object table (see below)
  5752.  44h    DWORD    object table entries
  5753.  48h    DWORD    object page map table offset
  5754.  4CH    DWORD    object iterate data map offset
  5755.  50h    DWORD    resource table offset
  5756.  54h    DWORD    resource table entries
  5757.  58h    DWORD    resident names table offset
  5758.  5Ch    DWORD    entry table offset
  5759.  60h    DWORD    module directives table offset
  5760.  64h    DWORD    Module Directives entries
  5761.  68h    DWORD    Fixup page table offset
  5762.  6Ch    DWORD    Fixup record table offset
  5763.  70h    DWORD    imported modules name table offset
  5764.  74h    DWORD    imported modules count
  5765.  78h    DWORD    imported procedures name table offset
  5766.  7Ch    DWORD    per-page checksum table offset
  5767.  80h    DWORD    data pages offset
  5768.  84h    DWORD    preload page count
  5769.  88h    DWORD    non-resident names table offset
  5770.  8Ch    DWORD    non-resident names table length
  5771.  90h    DWORD    non-resident names checksum
  5772.  94h    DWORD    automatic data object
  5773.  98h    DWORD    debug information offset
  5774.  9Ch    DWORD    debug information length
  5775.  A0h    DWORD    preload instance pages number
  5776.  A4h    DWORD    demand instance pages number
  5777.  A8h    DWORD    extra heap allocation
  5778.  ACh 20 BYTEs    reserved
  5779.  C0h    WORD    device ID (MS-Windows VxD only)
  5780.  C2h    WORD    DDK version (MS-Windows VxD only)
  5781. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  5782.  
  5783. Format of object table entry:
  5784. Offset    Size    Description
  5785.  00h    DWORD    virtual size in bytes
  5786.  04h    DWORD    relocation base address
  5787.  08h    DWORD    object flags (see below)
  5788.  0Ch    DWORD    page map index
  5789.  10h    DWORD    page map entries
  5790.  14h  4 BYTEs    reserved??? (apparently always zeros)
  5791.  
  5792. Bitfields for object flags:
  5793.  bit 0    readable
  5794.  bit 1    writable
  5795.  bit 2    executable
  5796.  bit 3    resource
  5797.  bit 4    discardable
  5798.  bit 5    shared
  5799.  bit 6    preloaded
  5800.  bit 7    invalid
  5801.  bit 8-9 type
  5802.     00 normal
  5803.     01 zero-filled
  5804.     10 resident
  5805.     11 resident/contiguous
  5806.  bit 10    "RESIDENT/LONG_LOCKABLE"
  5807.  bit 11    reserved
  5808.  bit 12    "16:16_ALIAS"
  5809.  bit 13    "BIG" (Huge: 32-bit)
  5810.  bit 14    conforming
  5811.  bit 15    "OBJECT_I/O_PRIVILEGE_LEVEL"
  5812.  bits 16-31 reserved
  5813.  
  5814. Format of object page map table entry:
  5815. Offset    Size    Description
  5816.  00h    BYTE    ??? (usually 00h)
  5817.  01h    WORD    index to fixup table (big-endian)
  5818.         0000h if no relocation info
  5819.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  5820.  
  5821. Format of resident names table entry:
  5822. Offset    Size    Description
  5823.  00h    BYTE    length of name
  5824.  01h  N BYTEs    name
  5825.  N+1  3 BYTEs    ???
  5826.  
  5827. Format of linear executable entry table:
  5828. Offset    Size    Description
  5829.  00h    BYTE    number of entries in table
  5830.  01h 10 BYTEs per entry
  5831.         Offset    Size    Description
  5832.          00h    BYTE    bit flags
  5833.                 bit 0: non-empty bundle
  5834.                 bit 1: 32-bit entry
  5835.          01h    WORD    object number
  5836.          03h    BYTE    entry type flags
  5837.                 bit 0: exported
  5838.                 bit 1: uses single data rather than instance
  5839.                 bit 2: reserved
  5840.                 bits 3-7: number of stack parameters
  5841.          04h    DWORD    offset of entry point
  5842.          08h  2 BYTEs    ???
  5843. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  5844.       and do not contain the remaining nine bytes
  5845.  
  5846. Format of linear executable fixup record:
  5847. Offset    Size    Description
  5848.  00h    BYTE    type
  5849.         bits 7-4: modifier (0001 single, 0011 multiple)
  5850.         bits 3-0: type
  5851.             0000 byte offset
  5852.             0010 word segment
  5853.             0011 16-bit far pointer (DWORD)
  5854.             0101 16-bit offset
  5855.             0110 32-bit far pointer (PWORD)
  5856.             0111 32-bit offset
  5857.             1000 near call or jump, WORD/DWORD based on seg attrib
  5858.  01h    BYTE    fixup type
  5859.         bit 7:    ordinal is BYTE rather than WORD
  5860.         bit 5:    addition with DWORD rather than WORD
  5861.         bit 4:    reloation info has size with new two bytes at end
  5862.         bit 2:    set of add to destination, clear to replace destination
  5863.         bits 1-0: type
  5864.             00 internal fixup
  5865.             01 external fixup, imported by ordinal
  5866.             10 external fixup, imported by name
  5867. ---if single type---
  5868.  02h    WORD    offset within page
  5869.  04h    relocation information
  5870.     ---internal fixup---
  5871.     BYTE    object number
  5872.     ---external,ordinal---
  5873.     BYTE    one-based module number in Import Module table
  5874.     BYTE/WORD ordinal number
  5875.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5876.     ---external,name---
  5877.     BYTE    one-based module number in Import Module table
  5878.     WORD    offset in Import Procedure names
  5879.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5880. ---if multiple type---
  5881.  02h    BYTE    number of items
  5882.  03h    var    relocation info as for "single" type (see above)
  5883.       N WORDs    offsets of items to relocate
  5884.  
  5885. Format of Borland debugging information header (following load image):
  5886. Offset    Size    Description
  5887.  00h    WORD    signature 52FBh
  5888.  02h    WORD    version ID
  5889.  04h    DWORD    size of name pool in bytes
  5890.  08h    WORD    number of names in namem pool
  5891.  0Ah    WORD    number of type entries
  5892.  0Ch    WORD    number of structure members
  5893.  0Eh    WORD    number of symbols
  5894.  10h    WORD    number of global symbols
  5895.  12h    WORD    number of modules
  5896.  14h    WORD    number of locals (optional)
  5897.  16h    WORD    number of scopes in table
  5898.  18h    WORD    number of line-number entries
  5899.  1Ah    WORD    number of include files
  5900.  1Ch    WORD    number of segment records
  5901.  1Eh    WORD    number of segment/file correlations
  5902.  20h    DWORD    size of load image after removing uninitialized data and debug
  5903.         info
  5904.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  5905.         depends on program flags
  5906.  28h    BYTE    program flags
  5907.         bit 0: case-sensitive link
  5908.         bit 1: pascal overlay program
  5909.  29h    WORD    no longer used
  5910.  2Bh    WORD    size of data pool in bytes
  5911.  2Dh    BYTE    padding
  5912.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  5913.  30h    WORD    number of classes
  5914.  32h    WORD    number of parents
  5915.  34h    WORD    number of global classes (currently unused)
  5916.  36h    WORD    number of overloads (currently unused)
  5917.  38h    WORD    number of scope classes
  5918.  3Ah    WORD    number of module classes
  5919.  3Ch    WORD    number of coverage offsets
  5920.  3Eh    DWORD    offset relative to symbol base of name pool
  5921.  42h    WORD    number of browser information records
  5922.  44h    WORD    number of optimized symbol records
  5923.  46h    WORD    debugging flags
  5924.  48h  8 BYTEs    padding
  5925. Note:    additional information on the Borland debugging info may be found in
  5926.       Borland's Open Architecture Handbook
  5927. --------U-214B-------------------------------
  5928. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  5929.     AH = 4Bh
  5930.     DS:DX = 0000h:0000h
  5931. Return: ES:BX -> ELRES history structure (see AH=2Bh/CX=454Ch)
  5932.     DX = DABEh (signature, DAve BEnnett)
  5933. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  5934.       Bennett
  5935. SeeAlso: AH=2Bh/CX=454Ch
  5936. --------v-214B04-----------------------------
  5937. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  5938.     AX = 4B04h
  5939. Return: CF clear if "MG" resident
  5940.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  5941. SeeAlso: AX=4243h,AX=4B25h
  5942. --------D-214B05-----------------------------
  5943. INT 21 - DOS 5+ - SET EXECUTION STATE
  5944.     AX = 4B05h
  5945.     DS:DX -> execution state structure (see below)
  5946. Return: CF clear if successful
  5947.         AX = 0000h
  5948.     CF set on error
  5949.         AX = error code (see AH=59h)
  5950. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  5951.       execution (including setting the DOS version number).     No DOS, BIOS
  5952.       or other software interrupt may be called after return from this call
  5953.       before commencement of the child process.  If DOS is running in the
  5954.       HMA, A20 is turned off on return from this call.
  5955. SeeAlso: AH=4Bh
  5956.  
  5957. Format of execution state structure:
  5958. Offset    Size    Description
  5959.  00h    WORD    reserved (00h)
  5960.  02h    WORD    type flags
  5961.         bit 0: program is an .EXE
  5962.         bit 1: program is an overlay
  5963.  04h    DWORD    pointer to ASCIZ name of program file
  5964.  08h    WORD    PSP segment of new program
  5965.  0Ah    DWORD    starting CS:IP of new program
  5966.  0Eh    DWORD    program size including PSP
  5967. --------v-214B25-----------------------------
  5968. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  5969.     AX = 4B25h
  5970. Return: DI = 1234h if resident
  5971. SeeAlso: AX=4B04h,AX=4B40h
  5972. --------v-214B40-----------------------------
  5973. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  5974.     AX = 4B40h
  5975. Return: AX = 5678h if resident
  5976. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  5977. --------v-214B41-----------------------------
  5978. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  5979.     AX = 4B41h
  5980.     ???
  5981. Return: ???
  5982. SeeAlso: AX=4B40h
  5983. --------v-214B4A-----------------------------
  5984. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  5985.     AX = 4B4Ah
  5986. Return: AL = 57h if resident
  5987. SeeAlso: AX=4B40h,AX=4B4Bh
  5988. --------v-214B4B-----------------------------
  5989. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  5990.     AX = 4B4Bh
  5991. Return: CF clear if resident
  5992. SeeAlso: AX=4B4Ah,AX=4B4Dh
  5993. --------v-214B4D-----------------------------
  5994. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  5995.     AX = 4B4Dh
  5996. Return: CF clear if resident
  5997. SeeAlso: AX=4B4Ah,AX=4B50h
  5998. --------v-214B50-----------------------------
  5999. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  6000.     AX = 4B50h
  6001. Return: AX = 1234h if resident
  6002. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  6003. --------v-214B53-----------------------------
  6004. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  6005.     AX = 4B53h
  6006. Return: CF clear if resident
  6007. SeeAlso: AX=4B50h,AX=4B55h
  6008. --------v-214B55-----------------------------
  6009. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  6010.     AX = 4B55h
  6011. Return: AX = 1231h if resident
  6012. SeeAlso: AX=4B53h,AX=4B59h
  6013. --------v-214B59-----------------------------
  6014. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  6015.     AX = 4B59h
  6016. Return: CF clear if resident
  6017. SeeAlso: AX=4B50h,AX=4B5Eh
  6018. --------v-214B5E-----------------------------
  6019. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  6020.     AX = 4B5Eh
  6021. Return: CF clear if resident
  6022. SeeAlso: AX=4B59h,AX=4B87h
  6023. --------v-214B60-----------------------------
  6024. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  6025.     AX = 4B60h
  6026.     ???
  6027. Return: ???
  6028. SeeAlso: AX=4B50h
  6029. --------v-214B87-----------------------------
  6030. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  6031.     AX = 4B87h
  6032. Return: AX = 6663h if resident
  6033. SeeAlso: AX=4B5Eh,AX=4B95h
  6034. --------v-214B95-----------------------------
  6035. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  6036.     AX = 4B95h
  6037. Return: AX = 1973h if resident
  6038. SeeAlso: AX=4B87h,AX=4BA7h
  6039. --------v-214BA7-----------------------------
  6040. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  6041.     AX = 4BA7h
  6042. Return: AX = B459h if resident
  6043. SeeAlso: AX=4B95h,AX=4BAAh
  6044. --------v-214BAA-----------------------------
  6045. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  6046.     AX = 4BAAh
  6047. Return: CF clear if resident
  6048. SeeAlso: AX=4BA7h,AX=4BAFh
  6049. --------v-214BAF-----------------------------
  6050. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  6051.     AX = 4BAFh
  6052. Return: AL = AFh if "Magnitogorsk" resident
  6053.     AL = FAh if "948"/"Screenplus1" resident
  6054. SeeAlso: AX=4BAAh,AX=4BDDh
  6055. --------v-214BDD-----------------------------
  6056. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  6057.     AX = 4BDDh
  6058. Return: AX = 1234h
  6059. SeeAlso: AX=4BAFh,AX=4BFEh
  6060. --------v-214BEE-----------------------------
  6061. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  6062.     AX = 4BEEh
  6063. Return: AX = 1234h if grab successful
  6064.        = 2345h if failed (INT 21 grabbed previously)
  6065. Notes:    F-DRIVER.SYS is part of the F-PROT virus/trojan protection package by
  6066.       Fridrik Skulason
  6067.     when called the first time, this function moves the INT 21 monitoring
  6068.       code from its original location in the INT 21 chain to be the first
  6069.       thing called by INT 21.  This is the mechanism used by F-NET.
  6070. SeeAlso: INT 2F/AX=4653h
  6071. ----------214BF0-----------------------------
  6072. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  6073.     AX = 4BF0h
  6074. Return: CF clear if installed
  6075.         AX = 899Dh
  6076. Program: DIET is an executable-compression program
  6077. SeeAlso: AX=4BF1h
  6078. ----------214BF1-----------------------------
  6079. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  6080.     AX = 4BF1h
  6081. Return: ???
  6082. SeeAlso: AX=4BF0h
  6083. --------v-214BFE-----------------------------
  6084. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  6085.     AX = 4BFEh
  6086. Return: AX = 1234h if "Hitchcock" resident
  6087.     AX = ABCDh if "1193"/"Copyright" resident
  6088.     DI = 55BBh if "Dark Avenger-1028" resident
  6089. SeeAlso: AX=4BDDh,AX=4BFFh"Justice"
  6090. --------v-214BFF-----------------------------
  6091. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  6092.     AX = 4BFFh
  6093. Return: BL = FFh if "USSR-707" resident
  6094.     DI = 55AAh if "Justice" resident
  6095.     CF clear if "Europe 92" resident
  6096. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  6097. --------v-214BFFSI0000-----------------------
  6098. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  6099.     AX = 4BFFh
  6100.     SI = 0000h
  6101.     DI = 0000h
  6102. Return: DI = 55AAh if installed
  6103. SeeAlso: AX=4BFFh"Justice",AX=5252h
  6104. --------D-214C-------------------------------
  6105. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  6106.     AH = 4Ch
  6107.     AL = return code
  6108. Return: never returns
  6109. Notes:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  6110.       all open files are closed and all memory belonging to the process
  6111.       is freed
  6112.     all network file locks should be removed before calling this function
  6113. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  6114. SeeAlso: INT 60/DI=0601h
  6115. --------D-214D-------------------------------
  6116. INT 21 - DOS 2+ - GET RETURN CODE
  6117.     AH = 4Dh
  6118. Return: AH = termination type
  6119.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  6120.         01h control-C abort
  6121.         02h critical error abort
  6122.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  6123.     AL = return code
  6124. Notes:    the word in which DOS stores the return code is cleared after being
  6125.       read by this function, so the return code can only be retrieved once
  6126.     this call should not be used if the child was started with AX=4B04h;
  6127.       use AH=8Ah instead
  6128.     the following sequence will close a Virtual DOS Machine under OS/2 2.0:
  6129.       MOV    AH,4Dh
  6130.       INT    21h
  6131.       HLT
  6132.       DB    02h,0FDh
  6133.       This sequence is the only way to close a specific VDM which was
  6134.       booted from floppy or a disk image.
  6135. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  6136. --------D-214E-------------------------------
  6137. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  6138.     AH = 4Eh
  6139.     AL = special flag for use by APPEND (see note below)
  6140.     CX = file attribute mask (see AX=4301h) (bits 0 and 5 ignored)
  6141.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  6142. Return: CF clear if successful
  6143.         [DTA] = FindFirst data block (see below)
  6144.     CF set on error
  6145.         AX = error code (02h,03h,12h) (see AH=59h)
  6146. Notes:    for search attributes other than 08h, all files with at MOST the
  6147.       specified combination of hidden, system, and directory attributes
  6148.       will be returned.  Under DOS 2.x, searching for attribute 08h
  6149.       (volume label) will also return normal files, while under DOS 3+
  6150.       only the volume label (if any) will be returned.
  6151.     this call also returns successfully if given the name of a character
  6152.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  6153.       and the current date and time.  DOS 3+ returns attribute 40h and the
  6154.       current date and time.
  6155.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  6156.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  6157.       found pathname will be stored, otherwise, the actual found path
  6158.       will be prepended to the original filespec without a path.
  6159.     under LANtastic, this call may be used to obtain a list of a server's
  6160.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  6161.       resources may be obtained by searching for "\\SERVER\@*.*"
  6162.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  6163. BUG:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  6164.       with a character device name (no wildcards) and search attributes
  6165.       which include the volume-label bit (08h) will fail unless there is
  6166.       an intervening DOS call which implicitly or explicity performs a
  6167.       directory search without the volume-label bit.  Such implicit
  6168.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  6169.       (AH=41h), and RENAME (AH=56h)
  6170. SeeAlso: AH=11h,AH=4Fh,AX=4301h,INT 2F/AX=111Bh,INT 2F/AX=B711h
  6171.  
  6172. Format of FindFirst data block:
  6173. Offset    Size    Description
  6174. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  6175.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  6176.  01h 11 BYTEs    search template
  6177.  0Ch    BYTE    search attributes
  6178. ---DOS 2.x (and some DOS 3.x???)---
  6179.  00h    BYTE    search attributes
  6180.  01h    BYTE    drive letter
  6181.  02h 11 BYTEs    search template
  6182. ---WILDUNIX.COM---
  6183.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  6184.  0Ch    BYTE    search attributes
  6185. ---DOS 2.x and most 3.x---
  6186.  0Dh    WORD    entry count within directory
  6187.  0Fh    DWORD    pointer to DTA???
  6188.  13h    WORD    cluster number of start of parent directory
  6189. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  6190.  0Dh    WORD    entry count within directory
  6191.  0Fh    WORD    cluster number of start of parent directory
  6192.  11h  4 BYTEs    reserved
  6193. ---all versions, documented fields---
  6194.  15h    BYTE    attribute of file found
  6195.  16h    WORD    file time
  6196.             bits 11-15: hour
  6197.             bits 5-10:    minute
  6198.             bits 0-4:    seconds/2
  6199.  18h    WORD    file date
  6200.             bits 9-15:    year-1980
  6201.             bits 5-8:    month
  6202.             bits 0-4:    day
  6203.  1Ah    DWORD    file size
  6204.  1Eh 13 BYTEs    ASCIZ filename+extension
  6205. --------f-214E-------------------------------
  6206. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  6207.     AH = 4Eh
  6208.     DS:DX = 0000h:0000h
  6209. Return:    AH = 99h if installed
  6210. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  6211.       Hosgood and Terry Barnaby
  6212. --------D-214F-------------------------------
  6213. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  6214.     AH = 4Fh
  6215.     [DTA] = data block from previous FindFirst or FindNext call
  6216. Return: CF clear if successful
  6217.     CF set on error
  6218.         AX = error code (12h) (see AH=59h)
  6219. SeeAlso: AH=12h,AH=4Eh
  6220. --------D-2150-------------------------------
  6221. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  6222.     AH = 50h
  6223.     BX = segment of PSP for new process
  6224. Notes:    DOS uses the current PSP address to determine which processes own files
  6225.       and memory; it corresponds to process identifiers used by other OSs
  6226.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  6227.       handler without setting the Critical Error flag
  6228.     under DOS 3+, this function does not use any of the DOS-internal stacks
  6229.       and may thus be called at any time, even during another INT 21h call
  6230.     some Microsoft applications use segments of 0000h and FFFFh; although
  6231.       one should only call this function with valid PSP addresses, any
  6232.       program hooking it should be prepared to handle invalid addresses
  6233.     supported by OS/2 compatibility box
  6234.     this call was undocumented prior to the release of DOS 5.0
  6235. SeeAlso: AH=26h,AH=51h,AH=62h
  6236. --------D-2151-------------------------------
  6237. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  6238.     AH = 51h
  6239. Return: BX = segment of PSP for current process
  6240. Notes:    DOS uses the current PSP address to determine which processes own files
  6241.       and memory; it corresponds to process identifiers used by other OSs
  6242.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  6243.       handler without setting the Critical Error flag
  6244.     under DOS 3+, this function does not use any of the DOS-internal stacks
  6245.       and may thus be called at any time, even during another INT 21h call
  6246.     supported by OS/2 compatibility box
  6247.     identical to the documented AH=62h
  6248.     this call was undocumented prior to the release of DOS 5.0
  6249. SeeAlso: AH=26h,AH=50h,AH=62h
  6250. --------D-2152-------------------------------
  6251. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  6252.     AH = 52h
  6253. Return: ES:BX -> DOS list of lists
  6254. Notes:    partially supported by OS/2 v1.1 compatibility box (however, most
  6255.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  6256.       pointer is FFFFh:FFFFh).
  6257.     on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
  6258. SeeAlso: INT 2F/AX=1203h
  6259.  
  6260. Format of List of Lists:
  6261. Offset    Size    Description
  6262.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  6263.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  6264.  -8    DWORD    (DOS 3+) pointer to current disk buffer
  6265.  -4    WORD    (DOS 3+) pointer in DOS code segment of unread CON input
  6266.         when CON is read via a handle, DOS reads an entire line,
  6267.           and returns the requested portion, buffering the rest
  6268.           for the next read.  0000h indicates no unread input
  6269.  -2    WORD    segment of first memory control block
  6270.  00h    DWORD    pointer to first Drive Parameter Block (see AH=32h)
  6271.  04h    DWORD    pointer to first System File Table (see below)
  6272.  08h    DWORD    pointer to active CLOCK$ device's header (most recently loaded
  6273.          driver with CLOCK bit set)
  6274.  0Ch    DWORD    pointer to active CON device's header (most recently loaded
  6275.          driver with STDIN bit set)
  6276. ---DOS 2.x---
  6277.  10h    BYTE    number of logical drives in system
  6278.  11h    WORD    maximum bytes/block of any block device
  6279.  13h    DWORD    pointer to first disk buffer (see below)
  6280.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6281.         NUL is always the first device on DOS's linked list of device 
  6282.         drivers. (see below)
  6283. ---DOS 3.0---
  6284.  10h    BYTE    number of block devices
  6285.  11h    WORD    maximum bytes/block of any block device
  6286.  13h    DWORD    pointer to first disk buffer (see below)
  6287.  17h    DWORD    pointer to array of current directory structures (see below)
  6288.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  6289.  1Ch    DWORD    pointer to STRING= workspace area
  6290.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  6291.  22h    DWORD    pointer to FCB table
  6292.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  6293.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6294.         NUL is always the first device on DOS's linked list of device 
  6295.         drivers. (see below)
  6296. ---DOS 3.1-3.3---
  6297.  10h    WORD    maximum bytes per sector of any block device
  6298.  12h    DWORD    pointer to first disk buffer in buffer chain (see below)
  6299.  16h    DWORD    pointer to array of current directory structures (see below)
  6300.  1Ah    DWORD    pointer to system FCB tables (see below)
  6301.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  6302.  20h    BYTE    number of block devices installed
  6303.  21h    BYTE    number of available drive letters (largest of 5, installed
  6304.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  6305.         current directory structure array.
  6306.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6307.         NUL is always the first device on DOS's linked list of device
  6308.         drivers. (see below)
  6309.  34h    BYTE    number of JOIN'ed drives
  6310. ---DOS 4.x---
  6311.  10h    WORD    maximum bytes per sector of any block device
  6312.  12h    DWORD    pointer to disk buffer info record (see below)
  6313.  16h    DWORD    pointer to array of current directory structures (see below)
  6314.  1Ah    DWORD    pointer to system FCB tables (see below)
  6315.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  6316.         (always 00h for DOS 5.0)
  6317.  20h    BYTE    number of block devices installed
  6318.  21h    BYTE    number of available drive letters (largest of 5, installed
  6319.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  6320.         current directory structure array.
  6321.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6322.         NUL is always the first device on DOS's linked list of device
  6323.         drivers. (see below)
  6324.  34h    BYTE    number of JOIN'ed drives???
  6325.  35h    WORD    pointer within IBMDOS code segment to list of special program
  6326.         names (see below)
  6327.         (always 0000h for DOS 5.0)
  6328.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  6329.         (see below)
  6330.         may be called by any IFS driver which does not wish to
  6331.         service functions 20h or 24h-28h itself
  6332.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  6333.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  6334.  41h    WORD    number of lookahead buffers (the y in BUFFERS x,y)
  6335.  43h    BYTE    boot drive (1=A:)
  6336.  44h    BYTE    01h if 80386+, 00h otherwise???
  6337.  45h    WORD    extended memory size in K
  6338. ---DOS 5.0-6.0---
  6339.  10h 39 BYTEs    as for DOS 4.x (see above)
  6340.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  6341.  3Bh    WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
  6342.          when executing special .COM format
  6343.  3Dh    WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
  6344.  3Fh  8 BYTEs    as for DOS 4.x (see above)
  6345.  
  6346. Format of memory control block (see also below):
  6347. Offset    Size    Description
  6348.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  6349.  01h    WORD    PSP segment of owner or
  6350.         0000h if free
  6351.         0006h if DR-DOS XMS UMB
  6352.         0007h if DR-DOS excluded upper memory ("hole")
  6353.         0008h if belongs to DOS
  6354.         FFFAh if 386MAX UMB control block (see AX=4402h"386MAX")
  6355.         FFFDh if 386MAX locked-out memory
  6356.         FFFEh if 386MAX UMB (immediately follows its control block)
  6357.         FFFFh if 386MAX 6.01 device driver
  6358.  03h    WORD    size of memory block in paragraphs
  6359.  05h  3 BYTEs    unused by MS-DOS
  6360.          (386MAX) if locked-out block, region start/prev region end
  6361. ---DOS 2.x,3.x---
  6362.  08h  8 BYTEs    unused
  6363. ---DOS 4+ ---
  6364.  08h  8 BYTEs    ASCII program name if PSP memory block or DR-DOS UMB,
  6365.           else garbage
  6366.         null-terminated if less than 8 characters
  6367. Notes:    the next MCB is at segment (current + size + 1)
  6368.     under DOS 3.1+, the first memory block is the DOS data segment,
  6369.       containing installable drivers, buffers, etc.     Under DOS 4+ it is
  6370.       divided into subsegments, each with its own memory control block
  6371.       (see below), the first of which is at offset 0000h.
  6372.     for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
  6373.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  6374.       "SD" is system data, device drivers, etc.
  6375.     Some versions of DR-DOS use only seven characters of the program name,
  6376.       placing a NUL in the eighth byte.
  6377.  
  6378. Format of MS-DOS 5+ UMB control block:
  6379. Offset    Size    Description
  6380.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  6381.  01h    WORD    first available paragraph in UMB if control block at start
  6382.         of UMB, 000Ah if control block at end of UMB
  6383.  03h    WORD    length in paragraphs of following UMB or locked-out region
  6384.  05h  3 BYTEs    unused
  6385.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  6386.  
  6387. Format of STARLITE (General Software's Embedded DOS) memory control block:
  6388. Offset    Size    Description
  6389.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  6390.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  6391.  03h    WORD    size of memory block in paragraphs
  6392.  05h    BYTE    unused
  6393.  06h    WORD    segment address of next memory control block (0000h if last)
  6394.  08h    WORD    segment address of previous memory control block or 0000h
  6395.  0Ah  6 BYTEs    reserved
  6396.  
  6397. Format of DOS 4+ data segment subsegment control blocks:
  6398. Offset    Size    Description
  6399.  00h    BYTE    subsegment type (blocks typically appear in this order)
  6400.         "D"  device driver
  6401.         "E"  device driver appendage
  6402.         "I"  IFS (Installable File System) driver
  6403.         "F"  FILES=  control block storage area (for FILES>5)
  6404.         "X"  FCBS=   control block storage area, if present
  6405.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  6406.         "B"  BUFFERS=  storage area
  6407.         "L"  LASTDRIVE=     current directory structure array storage area
  6408.         "S"  STACKS=  code and data area, if present (see below)
  6409.         "T"  INSTALL= transient code
  6410.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  6411.  03h    WORD    size of subsegment in paragraphs
  6412.  05h  3 BYTEs    unused
  6413.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  6414.           was loaded (unused for other types)
  6415.  
  6416. Format of data at start of STACKS code segment (if present):
  6417. Offset    Size    Description
  6418.  00h    WORD    ???
  6419.  02h    WORD    number of stacks (the x in STACKS=x,y)
  6420.  04h    WORD    size of stack control block array (should be 8*x)
  6421.  06h    WORD    size of each stack (the y in STACKS=x,y)
  6422.  08h    DWORD    pointer to STACKS data segment
  6423.  0Ch    WORD    offset in STACKS data segment of stack control block array
  6424.  0Eh    WORD    offset in STACKS data segment of last element of that array
  6425.  10h    WORD    offset in STACKS data segment of the entry in that array for
  6426.         the next stack to be allocated (initially same as value in 0Eh
  6427.         and works its way down in steps of 8 to the value in 0Ch as
  6428.         hardware interrupts pre-empt each other)
  6429. Note:    the STACKS code segment data may, if present, be located as follows:
  6430.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  6431.         in the IBMBIO segment (seen at 0070:0190h)
  6432.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  6433.         segment, which may be determined by inspecting the segment
  6434.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  6435.         70h, 72-77h which have not been redirected by device drivers or
  6436.         TSRs.
  6437.     DOS 4+    Identified by sub-segment control block type "S" within the DOS
  6438.         data segment.
  6439. SeeAlso: INT B4"STACKMAN"
  6440.  
  6441. Format of array elements in STACKS data segment:
  6442. Offset    Size    Description
  6443.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  6444.         higher stack.
  6445.  01h    BYTE    not used
  6446.  02h    WORD    previous SP
  6447.  04h    WORD    previous SS
  6448.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  6449.         top of the stack is preset to point back to this control block.
  6450.  
  6451. SHARE.EXE hooks (DOS 3.1-6.00):
  6452. (offsets from first system file table--pointed at by ListOfLists+04h)
  6453. Offset    Size    Description
  6454. -3Ch    DWORD    pointer to FAR routine for ???
  6455.         Note: not called by MS-DOS 3.3, set to 0000h:0000h by
  6456.             SHARE 3.3+
  6457. -38h    DWORD    pointer to FAR routine called on opening file
  6458.         on call, internal DOS location points at filename(see AX=5D06h)
  6459.         Return: CF clear if successful
  6460.             CF set on error
  6461.                 AX = DOS error code (24h) (see AH=59h)
  6462.         Note: SHARE directly accesses DOS-internal data    to get name of
  6463.             file just opened
  6464. -34h    DWORD    pointer to FAR routine called on closing file
  6465.         ES:DI -> system file table
  6466.         Note: does something to every lock record for file
  6467. -30h    DWORD    pointer to FAR routine to close all files for given computer
  6468.         (called by AX=5D03h)
  6469. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  6470.         (called by AX=5D04h)
  6471. -28h    DWORD    pointer to FAR routine to close file by name
  6472.         (called by AX=5D02h)
  6473.         DS:SI -> DOS parameter list (see AX=5D00h)
  6474.            DPL's DS:DX -> name of file to close
  6475.         Return: CF clear if successful
  6476.             CF set on error
  6477.                 AX = DOS error code (03h) (see AH=59h)
  6478. -24h    DWORD    pointer to FAR routine to lock region of file
  6479.         call with BX = file handle
  6480.               CX:DX = starting offset
  6481.               SI:AX = size
  6482.         Return: CF set on error
  6483.                 AL = DOS error code (21h) (see AH=59h)
  6484.         Note: not called if file is marked as remote
  6485. -20h    DWORD    pointer to FAR routine to unlock region of file
  6486.         call with BX = file handle
  6487.               CX:DX = starting offset
  6488.               SI:AX = size
  6489.         Return: CF set on error
  6490.                 AL = DOS error code (21h) (see AH=59h)
  6491.         Note: not called if file is marked as remote
  6492. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  6493.         call with ES:DI -> system file table entry for file
  6494.             CX = length of region from current position in file
  6495.         Return: CF set if any portion of region locked
  6496.                 AX = 0021h
  6497. -18h    DWORD    pointer to FAR routine to get open file list entry
  6498.         (called by AX=5D05h)
  6499.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  6500.             DPL's BX = index of sharing record
  6501.             DPL's CX = index of SFT in SFT chain of sharing rec
  6502.         Return: CF set on error or not loaded
  6503.                 AX = DOS error code (12h) (see AH=59h)
  6504.             CF clear if successful
  6505.                 ES:DI -> filename
  6506.                 CX = number of locks owned by specified SFT
  6507.                 BX = network machine number
  6508.                 DX destroyed
  6509. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  6510.         call with DS:SI -> unopened FCB
  6511.               ES:DI -> system file table entry
  6512.         Return: BL = C0h???
  6513.         Note: copies following fields from SFT to FCB:
  6514.            starting cluster of file      0Bh     1Ah
  6515.            sharing record offset      33h     1Ch
  6516.            file attribute          04h     1Eh
  6517. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  6518.         call with ES:DI -> system file table entry
  6519.               DS:SI -> FCB
  6520.         Return: CF set if SFT closed or sharing record offsets
  6521.                 mismatched
  6522.             CF clear if successful
  6523.                 BX = starting cluster number from FCB
  6524. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  6525.         DS:SI -> system file table
  6526.         Return: AX = number of handle in JFT which already uses SFT
  6527.         Note: called during open/create of a file
  6528.         Note: if SFT was opened with inheritance enabled and sharing
  6529.             mode 111, does something to all other SFTs owned by
  6530.             same process which have the same file open mode and
  6531.             sharing record
  6532. -08h    DWORD    pointer to FAR routine for ???
  6533.         Note: closes various handles referring to file most-recently
  6534.             opened
  6535. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  6536.           entries
  6537.         call with ES:DI -> system file table entry for file (see below)
  6538.               AX = subfunction (apply to each related SFT)
  6539.                 00h: update time stamp (offset 0Dh) and date
  6540.                      stamp (offset 0Fh)
  6541.                 01h: update file size (offset 11h) and starting
  6542.                      cluster (offset 0Bh).  Sets last-accessed
  6543.                      cluster fields to start of file if file
  6544.                      never accessed
  6545.                 02h: as function 01h, but last-accessed fields
  6546.                      always changed
  6547.                 03h: do both functions 00h and 02h
  6548.         Note: follows ptr at offset 2Bh in system file table entries
  6549.         Note: NOP if opened with no-inherit or via FCB
  6550. Note:    most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
  6551.       either that SS=DOS DS or SS=DS=DOS DS and directly access
  6552.       DOS-internal data
  6553.  
  6554. Format of sharing record:
  6555. Offset    Size    Description
  6556.  00h    BYTE    flag
  6557.         00h free block
  6558.         01h allocated block
  6559.         FFh end marker
  6560.  01h    WORD    size of block
  6561.  03h    BYTE    checksum of pathname (including NUL)
  6562.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  6563.  04h    WORD    offset in SHARE's DS of lock record (see below)
  6564.  06h    DWORD    pointer to start of system file table chain for file
  6565.  0Ah    WORD    unique sequence number
  6566.  0Ch    var    ASCIZ full pathname
  6567.  
  6568. Format of SHARE.EXE lock record:
  6569. Offset    Size    Description
  6570.  00h    WORD    offset in SHARE's DS of next lock table in list
  6571.  02h    DWORD    offset in file of start of locked region
  6572.  06h    DWORD    offset in file of end of locked region
  6573.  0Ah    DWORD    pointer to System File Table entry for this file
  6574.  0Eh    WORD    PSP segment of lock's owner
  6575.  
  6576. Format of DOS 2.x system file tables:
  6577. Offset    Size    Description
  6578.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6579.  04h    WORD    number of files in this table
  6580.  06h  28h bytes per file
  6581.     Offset    Size    Description
  6582.      00h    BYTE    number of file handles referring to this file
  6583.      01h    BYTE    file open mode (see AH=3Dh)
  6584.      02h    BYTE    file attribute
  6585.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  6586.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  6587.      0Fh    WORD    ???
  6588.      11h    WORD    ???
  6589.      13h    DWORD    file size???
  6590.      17h    WORD    file date in packed format (see AX=5700h)
  6591.      19h    WORD    file time in packed format (see AX=5700h)
  6592.      1Bh    BYTE    device attribute (see AX=4400h)
  6593.     ---character device---
  6594.      1Ch    DWORD    pointer to device driver
  6595.     ---block device---
  6596.      1Ch    WORD    starting cluster of file
  6597.      1Eh    WORD    relative cluster in file of last cluster accessed
  6598.     ------
  6599.      20h    WORD    absolute cluster number of current cluster
  6600.      22h    WORD    ???
  6601.      24h    DWORD    current file position???
  6602.  
  6603. Format of DOS 3.0 system file tables and FCB tables:
  6604. Offset    Size    Description
  6605.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6606.  04h    WORD    number of files in this table
  6607.  06h  38h bytes per file
  6608.     Offset    Size    Description
  6609.      00h-1Eh as for DOS 3.1+ (see below)
  6610.      1Fh    WORD    byte offset of directory entry within sector
  6611.      21h 11 BYTES    filename in FCB format (no path/period, blank-padded)
  6612.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6613.      30h    WORD    (SHARE.EXE) network machine number which opened file
  6614.              (Windows Enhanced mode DOSMGR uses the virtual machine
  6615.             ID as the machine number; see INT 2F/AX=1683h)
  6616.      32h    WORD    PSP segment of file's owner (first three entries for
  6617.             AUX/CON/PRN contain segment of IO.SYS startup code)
  6618.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  6619.      36h    WORD    ??? apparently always 0000h
  6620.  
  6621. Format of DOS 3.1-3.3x system file tables and FCB tables:
  6622. Offset    Size    Description
  6623.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6624.  04h    WORD    number of files in this table
  6625.  06h  35h bytes per file
  6626.     Offset    Size    Description
  6627.      00h    WORD    number of file handles referring to this file
  6628.      02h    WORD    file open mode (see AH=3Dh)
  6629.             bit 15 set if this file opened via FCB
  6630.      04h    BYTE    file attribute (see AX=4301h)
  6631.      05h    WORD    device info word (see AX=4400h)
  6632.             bit 15 set if remote file
  6633.             bit 14 set means do not set file date/time on closing
  6634.             bit 12 set means don't inherit on EXEC
  6635.             bits 5-0 drive number for disk files
  6636.      07h    DWORD    pointer to device driver header if character device
  6637.             else pointer to DOS Drive Parameter Block (see AH=32h)
  6638.      0Bh    WORD    starting cluster of file
  6639.      0Dh    WORD    file time in packed format (see AX=5700h)
  6640.      0Fh    WORD    file date in packed format (see AX=5700h)
  6641.      11h    DWORD    file size
  6642.     ---system file table---
  6643.      15h    DWORD    current offset in file (may be larger than size of
  6644.             file; INT 21/AH=42h does not check new position)
  6645.     ---FCB table---
  6646.      15h    WORD    counter for last I/O to FCB
  6647.      17h    WORD    counter for last open of FCB
  6648.             (these are separate to determine the times of the
  6649.             latest I/O and open)
  6650.     ---
  6651.      19h    WORD    relative cluster within file of last cluster accessed
  6652.      1Bh    WORD    absolute cluster number of last cluster accessed
  6653.             0000h if file never read or written???
  6654.      1Dh    WORD    number of sector containing directory entry
  6655.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6656.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6657.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6658.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6659.              (Windows Enhanced mode DOSMGR uses the virtual machine
  6660.             ID as the machine number; see INT 2F/AX=1683h)
  6661.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  6662.             entries for AUX/CON/PRN contain segment of IO.SYS
  6663.             startup code)
  6664.      33h    WORD    offset within SHARE.EXE code segment of 
  6665.             sharing record (see above)  0000h = none
  6666.  
  6667. Format of DOS 4.0-6.0 system file tables and FCB tables:
  6668. Offset    Size    Description
  6669.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6670.  04h    WORD    number of files in this table
  6671.  06h  3Bh bytes per file
  6672.     Offset    Size    Description
  6673.      00h    WORD    number of file handles referring to this file
  6674.      02h    WORD    file open mode (see AH=3Dh)
  6675.             bit 15 set if this file opened via FCB
  6676.      04h    BYTE    file attribute (see AX=4301h)
  6677.      05h    WORD    device info word (see AX=4400h)
  6678.             bit 15 set if remote file
  6679.             bit 14 set means do not set file date/time on closing
  6680.             bit 13 set if named pipe
  6681.             bit 12 set if no inherit
  6682.             bit 11 set if network spooler
  6683.      07h    DWORD    pointer to device driver header if character device
  6684.             else pointer to DOS Drive Parameter Block (see AH=32h)
  6685.             or REDIR data
  6686.      0Bh    WORD    starting cluster of file
  6687.      0Dh    WORD    file time in packed format (see AX=5700h)
  6688.      0Fh    WORD    file date in packed format (see AX=5700h)
  6689.      11h    DWORD    file size
  6690.      15h    DWORD    current offset in file
  6691.     ---local file---
  6692.      19h    WORD    relative cluster within file of last cluster accessed
  6693.      1Bh    DWORD    number of sector containing directory entry
  6694.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6695.     ---network redirector---
  6696.      19h    DWORD    pointer to REDIRIFS record
  6697.      1Dh  3 BYTEs    ???
  6698.     ------
  6699.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6700.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6701.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6702.              (Windows Enhanced mode DOSMGR uses the virtual machine
  6703.             ID as the machine number; see INT 2F/AX=1683h)
  6704.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  6705.             entries for AUX/CON/PRN contain segment of IO.SYS
  6706.             startup code)
  6707.      33h    WORD    offset within SHARE.EXE code segment of 
  6708.             sharing record (see above)  0000h = none
  6709.      35h    WORD    (local) absolute cluster number of last clustr accessed
  6710.             (redirector) ???
  6711.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  6712.  
  6713. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  6714. Offset    Size    Description
  6715.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or \\MACH\PATH (network)
  6716.  43h    WORD    drive attributes (see also note below and AX=5F07h)
  6717.         bit 15: uses network redirector     \ invalid if 00, installable
  6718.         bit 14: physical drive         / file system if 11
  6719.         bit 13: JOIN'ed      \ path above is true path that would be
  6720.         bit 12: SUBST'ed  / needed if not under SUBST or JOIN
  6721.         bit  7: remote drive hidden from redirector's assign-list and
  6722.                    exempt from network connection make/break commands;
  6723.                    set for CD-ROM drives
  6724.  45h    DWORD    pointer to Drive Parameter Block for drive (see AH=32h)
  6725. ---local drives---
  6726.  49h    WORD    starting cluster of current directory
  6727.         0000h = root, FFFFh = never accessed
  6728.  4Bh    WORD    ??? seems to be FFFFh always
  6729.  4Dh    WORD    ??? seems to be FFFFh always
  6730. ---network drives---
  6731.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  6732.          (DOS 4 only) available for use by IFS driver
  6733.  4Dh    WORD    stored user data from INT 21/AX=5F03h
  6734. ------
  6735.  4Fh    WORD    offset in current directory path of backslash corresponding to
  6736.           root directory for drive
  6737.         this value specifies how many characters to hide from the
  6738.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  6739.           drive letter and colon, SUBST, JOIN, and networks change it
  6740.           so that only the appropriate portion of the true path is
  6741.           visible to the user
  6742. ---DOS 4+ ---
  6743.  51h    BYTE    (DOS 4 only, remote drives) device type
  6744.          04h network drive
  6745.  52h    DWORD    pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
  6746.          this drive, 00000000h if native DOS
  6747.  56h    WORD    available for use by IFS driver
  6748. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  6749.       after JOIN x: /D in DR-DOS 5.0 or NET USE x: /D in older LAN versions
  6750.     normally, only one of bits 13&12 may be set together with bit 14, but
  6751.       DR-DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  6752.       0001 SUBST, 0101 ASSIGN (see below)
  6753.  
  6754. Format of DR-DOS 5.0-6.0 current directory structure entry (array):
  6755. Offset    Size    Description
  6756.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  6757.  43h    WORD    drive attributes
  6758.         1000h SUBSTed drive
  6759.         3000h??? JOINed drive
  6760.         4000h physical drive
  6761.         5000h ASSIGNed drive
  6762.         7000h JOINed drive
  6763.         8000h network drive
  6764.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  6765.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  6766.  47h    WORD    cluster number of start of parent directory (0000h = root)
  6767.  49h    WORD    entry number of current directory in parent directory
  6768.  4Bh    WORD    cluster number of start of current directory
  6769.  4Dh    WORD    used for media change detection (details not available)
  6770.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  6771.         0000h if physical root directory
  6772.  
  6773. Format of device driver header:
  6774. Offset    Size    Description
  6775.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  6776.  04h    WORD    device attributes
  6777.         Character device:
  6778.            bit 15 set (indicates character device)
  6779.            bit 14 IOCTL supported (see AH=44h)
  6780.            bit 13 (DOS 3+) output until busy supported
  6781.            bit 12 reserved
  6782.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6783.            bits 10-8 reserved
  6784.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6785.                 (see AX=4410h,AX=4411h)
  6786.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6787.                 (see AX=440Ch,AX=440Dh)
  6788.            bit 5  reserved
  6789.            bit 4  device is special (use INT 29 "fast console output")
  6790.            bit 3  device is CLOCK$ (all reads/writes use transfer
  6791.                 record described below)
  6792.            bit 2  device is NUL
  6793.            bit 1  device is standard output
  6794.            bit 0  device is standard input
  6795.         Block device:
  6796.            bit 15 clear (indicates block device)
  6797.            bit 14 IOCTL supported
  6798.            bit 13 non-IBM format
  6799.            bit 12 reserved
  6800.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6801.            bit 10 reserved
  6802.            bit 9  direct I/O not allowed???
  6803.               (set by DOS 3.3 DRIVER.SYS for "new" drives)
  6804.            bit 8  ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  6805.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6806.                 (see AX=4410h,AX=4411h)
  6807.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6808.                 implies support for commands 17h and 18h
  6809.                 (see AX=440Ch,AX=440Dh,AX=440Eh,AX=440Fh)
  6810.            bits 5-2 reserved
  6811.            bit 1   driver supports 32-bit sector addressing (DOS 3.31+)
  6812.            bit 0   reserved
  6813.         Note: for European MS-DOS 4.0, bit 11 also indicates that bits
  6814.             8-6 contain a version code (000 = DOS 3.0,3.1;
  6815.             001 = DOS 3.2, 010 = European DOS 4.0)
  6816.  06h    WORD    device strategy entry point
  6817.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  6818.  08h    WORD    device interrupt entry point
  6819. ---character device---
  6820.  0Ah  8 BYTEs    blank-padded character device name
  6821. ---block device---
  6822.  0Ah    BYTE    number of subunits (drives) supported by driver
  6823.  0Bh  7 BYTEs    unused
  6824. ---
  6825.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  6826.          appears to be another device chain
  6827.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  6828.  15h    BYTE    (CD-ROM driver) number of units
  6829.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version 
  6830.             (currently '00')
  6831.  
  6832. Format of CLOCK$ transfer record:
  6833. Offset    Size    Description
  6834.  00h    WORD    number of days since 1-Jan-1980
  6835.  02h    BYTE    minutes
  6836.  03h    BYTE    hours
  6837.  04h    BYTE    hundredths of second
  6838.  05h    BYTE    seconds
  6839.  
  6840. Format of DOS 2.x disk buffer:
  6841. Offset    Size    Description
  6842.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6843.         least-recently used buffer is first in chain
  6844.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  6845.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  6846.  08h    WORD    logical sector number
  6847.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  6848.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  6849.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6850.  10h        buffered data
  6851.  
  6852. Format of DOS 3.x disk buffer:
  6853. Offset    Size    Description
  6854.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6855.         least-recently used buffer is first in chain
  6856.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6857.  05h    BYTE    flags
  6858.         bit 7: ???
  6859.         bit 6: buffer dirty
  6860.         bit 5: buffer has been referenced
  6861.         bit 4: ???
  6862.         bit 3: sector in data area
  6863.         bit 2: sector in a directory, either root or subdirectory
  6864.         bit 1: sector in FAT
  6865.         bit 0: boot sector??? (guess)
  6866.  06h    WORD    logical sector number
  6867.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  6868.  09h    BYTE    sector offset between copies if multiple copies to be written
  6869.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6870.  0Eh    WORD    unused??? (almost always 0)
  6871.  10h        buffered data
  6872.  
  6873. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  6874. Offset    Size    Description
  6875.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6876.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6877.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6878.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6879.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  6880.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  6881.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  6882.  11h    WORD    ??? seems always to be 0001h
  6883.  13h    WORD    segment of EMS physical page frame
  6884.  15h    WORD    ??? seems always to be zero
  6885.  17h  4 WORDs    EMS partial page mapping information???
  6886.  
  6887. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  6888. Offset    Size    Description
  6889.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6890.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6891.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6892.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6893.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  6894.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  6895.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  6896.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  6897.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  6898.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  6899.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  6900.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  6901.           into EMS
  6902.  18h    WORD    EMS handle for buffers, zero if not in EMS
  6903.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  6904.  1Ch    WORD    ??? appears always to be 0001h
  6905.  1Eh    WORD    segment of EMS physical page frame
  6906.  20h    WORD    ??? appears always to be zero
  6907.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  6908.  
  6909. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  6910. Offset    Size    Description
  6911.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  6912.         in EMS
  6913.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  6914.         this chain are in the same segment.
  6915.  06h    BYTE    number of dirty buffers on this chain
  6916.  07h    BYTE    reserved (00h)
  6917. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  6918.       address modulo NDBCH,     0 <= N <= NDBCH-1
  6919.     each chain resides completely within one EMS page
  6920.     this structure is in main memory even if buffers are in EMS
  6921.  
  6922. Format of DOS 4.0-6.0 disk buffer:
  6923. Offset    Size    Description
  6924.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  6925.  02h    WORD    backward ptr, offset only
  6926.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6927.  05h    BYTE    flags
  6928.         bit 7: remote buffer
  6929.         bit 6: buffer dirty
  6930.         bit 5: buffer has been referenced
  6931.         bit 4: search data buffer (only valid if remote buffer)
  6932.         bit 3: sector in data area
  6933.         bit 2: sector in a directory, either root or subdirectory
  6934.         bit 1: sector in FAT
  6935.         bit 0: reserved
  6936.  06h    DWORD    logical sector number
  6937.  0Ah    BYTE    number of copies to write
  6938.         for FAT sectors, same as number of FATs
  6939.         for data and directory sectors, usually 1
  6940.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  6941.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6942.  11h    WORD    buffer use count if remote buffer (see flags above)
  6943.  13h    BYTE    reserved
  6944.  14h        buffered data
  6945. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  6946.       (computed as the sum of high and low words of the logical sector
  6947.       number divided by NDBCH) are on the same doubly-linked circular
  6948.       chain; for DOS 5+, only a single circular chain exists.
  6949.     the links consist of offset addresses only, the segment being the same
  6950.       for all buffers in the chain.
  6951.  
  6952. Format of DOS 5.0-6.0 disk buffer info:
  6953. Offset    Size    Description
  6954.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  6955.         (see above)
  6956.  04h    WORD    0000h (DOS 5 does not hash disk buffers, so offset 00h points
  6957.             directly at the only buffer chain)
  6958.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6959.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6960.  0Ch    BYTE    buffer location
  6961.         00h base memory, no workspace buffer
  6962.         01h HMA, workspace buffer in base memory
  6963.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  6964.  11h  3 BYTEs    unused???
  6965.  14h    WORD    ???
  6966.  16h    BYTE    ??? counter or flag
  6967.  17h    BYTE    temp storage for user memory allocation strategy during EXEC
  6968.  18h    BYTE    ??? counter
  6969.  19h    BYTE    bit flags
  6970.          bit 0: ???
  6971.         bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
  6972.             WINA20.SYS when MS Windows 3.0 starts)
  6973.         bit 2: in EXEC state (INT 21/AX=4B05h)
  6974.  1Ah    WORD    ??? offset of ??? (used only during INT 21/AX=4B05h)
  6975.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  6976.  1Dh    WORD    minimum paragraphs of memory required by program being EXECed
  6977.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  6978.         memory chain in base 640K only (first UMB MCB usually at 9FFFh,
  6979.         locking out video memory with a DOS-owned memory block)
  6980.  21h    WORD    paragraph of start of most recent MCB chain search
  6981.  
  6982. Format of IFS driver list:
  6983. Offset    Size    Description
  6984.  00h    DWORD    pointer to next driver header
  6985.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  6986.  0Ch  4 BYTEs    ???
  6987.  10h    DWORD    pointer to IFS utility function entry point (see below)
  6988.         call with ES:BX -> IFS request (see below)
  6989.  14h    WORD    offset in header's segment of driver entry point
  6990.     ???
  6991.  
  6992. Call IFS utility function entry point with:
  6993.     AH = 20h miscellaneous functions
  6994.         AL = 00h get date
  6995.         Return: CX = year
  6996.             DH = month
  6997.             DL = day
  6998.         AL = 01h get process ID and computer ID
  6999.         Return: BX = current PSP segment
  7000.             DX = active network machine number
  7001.         AL = 05h get file system info
  7002.         ES:DI -> 16-byte info buffer
  7003.         Return: buffer filled
  7004.             Offset    Size    Description
  7005.              00h  2 BYTEs    unused
  7006.              02h    WORD    number of SFTs (actually counts only
  7007.                     the first two file table arrays)
  7008.              04h    WORD    number of FCB table entries
  7009.              06h    WORD    number of proctected FCBs
  7010.              08h  6 BYTEs    unused
  7011.              0Eh    WORD    largest sector size supported
  7012.         AL = 06h get machine name
  7013.         ES:DI -> 18-byte buffer for name
  7014.         Return: buffer filled with name starting at offset 02h
  7015.         AL = 08h get sharing retry count
  7016.         Return: BX = sharing retry count
  7017.         AL = other
  7018.         Return: CF set
  7019.     AH = 21h get redirection state
  7020.         BH = type (03h disk, 04h printer)
  7021.         Return: BH = state (00h off, 01h on)
  7022.     AH = 22h ??? some sort of time calculation
  7023.         AL = 00h ???
  7024.             nonzero ???
  7025.     AH = 23h ??? some sort of time calculation
  7026.     AH = 24h compare filenames
  7027.         DS:SI -> first ASCIZ filename
  7028.         ES:DI -> second ASCIZ filename
  7029.         Return: ZF set if files are same ignoring case and / vs \
  7030.     AH = 25h normalize filename
  7031.         DS:SI -> ASCIZ filename
  7032.         ES:DI -> buffer for result
  7033.         Return: filename uppercased, forward slashes changed to backslashes
  7034.     AH = 26h get DOS stack
  7035.         Return: DS:SI -> top of stack
  7036.             CX = size of stack in bytes
  7037.     AH = 27h increment InDOS flag
  7038.     AH = 28h decrement InDOS flag
  7039. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  7040.       pass them on to the default handler pointed at by [LoL+37h]
  7041.  
  7042. Format of IFS request block:
  7043. Offset    Size    Description
  7044.  00h    WORD    total size in bytes of request
  7045.  02h    BYTE    class of request
  7046.         02h ???
  7047.         03h redirection
  7048.         04h ???
  7049.         05h file access
  7050.         06h convert error code to string
  7051.         07h ???
  7052.  03h    WORD    returned DOS error code
  7053.  05h    BYTE    IFS driver exit status
  7054.         00h success
  7055.         01h ???
  7056.         02h ???
  7057.         03h ???
  7058.         04h ???
  7059.         FFh internal failure
  7060.  06h 16 BYTEs    ???
  7061. ---request class 02h---
  7062.  16h    BYTE    function code
  7063.         04h ???
  7064.  17h    BYTE    unused???
  7065.  18h    DWORD    pointer to ???
  7066.  1Ch    DWORD    pointer to ???
  7067.  20h  2 BYTEs    ???
  7068. ---request class 03h---
  7069.  16h    BYTE    function code
  7070.  17h    BYTE    ???
  7071.  18h    DWORD    pointer to ???
  7072.  1Ch    DWORD    pointer to ???
  7073.  22h    WORD    returned ???
  7074.  24h    WORD    returned ???
  7075.  26h    WORD    returned ???
  7076.  28h    BYTE    returned ???
  7077.  29h    BYTE    unused???
  7078. ---request class 04h---
  7079.  16h    DWORD    pointer to ???
  7080.  1Ah    DWORD    pointer to ???
  7081. ---request class 05h---
  7082.  16h    BYTE    function code
  7083.         01h flush disk buffers
  7084.         02h get disk space
  7085.         03h MKDIR
  7086.         04h RMDIR
  7087.         05h CHDIR
  7088.         06h delete file
  7089.         07h rename file
  7090.         08h search directory
  7091.         09h file open/create
  7092.         0Ah LSEEK
  7093.         0Bh read from file
  7094.         0Ch write to file
  7095.         0Dh lock region of file
  7096.         0Eh commit/close file
  7097.         0Fh get/set file attributes
  7098.         10h printer control
  7099.         11h ???
  7100.         12h process termination
  7101.         13h ???
  7102.     ---class 05h function 01h---
  7103.      17h  7    BYTEs    ???
  7104.      1Eh    DWORD    pointer to ???
  7105.      22h  4 BYTEs    ???
  7106.      26h    BYTE    ???
  7107.      27h    BYTE    ???
  7108.     ---class 05h function 02h---
  7109.      17h  7 BYTEs    ???
  7110.      1Eh    DWORD    pointer to ???
  7111.      22h  4 BYTEs    ???
  7112.      26h    WORD    returned total clusters
  7113.      28h    WORD    returned sectors per cluster
  7114.      2Ah    WORD    returned bytes per sector
  7115.      2Ch    WORD    returned available clusters
  7116.      2Eh    BYTE    returned ???
  7117.      2Fh    BYTE    ???
  7118.     ---class 05h functions 03h,04h,05h---
  7119.      17h  7 BYTEs    ???
  7120.      1Eh    DWORD    pointer to ???
  7121.      22h  4 BYTEs    ???
  7122.      26h    DWORD    pointer to directory name
  7123.     ---class 05h function 06h---
  7124.      17h  7 BYTEs    ???
  7125.      1Eh    DWORD    pointer to ???
  7126.      22h  4 BYTEs    ???
  7127.      26h    WORD    attribute mask
  7128.      28h    DWORD    pointer to filename
  7129.     ---class 05h function 07h---
  7130.      17h  7 BYTEs    ???
  7131.      1Eh    DWORD    pointer to ???
  7132.      22h  4 BYTEs    ???
  7133.      26h    WORD    attribute mask
  7134.      28h    DWORD    pointer to source filespec
  7135.      2Ch    DWORD    pointer to destination filespec
  7136.     ---class 05h function 08h---
  7137.      17h  7 BYTEs    ???
  7138.      1Eh    DWORD    pointer to ???
  7139.      22h  4 BYTEs    ???
  7140.      26h    BYTE    00h FINDFIRST
  7141.             01h FINDNEXT
  7142.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  7143.      2Ch    WORD    search attribute if FINDFIRST
  7144.      2Eh    DWORD    pointer to filespec if FINDFIRST
  7145.     ---class 05h function 09h---
  7146.      17h  7 BYTEs    ???
  7147.      1Eh    DWORD    pointer to ???
  7148.      22h    DWORD    pointer to IFS open file structure (see below)
  7149.      26h    WORD    ???  \ together, specify open vs. create, whether or
  7150.      28h    WORD    ???  / not to truncate
  7151.      2Ah  4 BYTEs    ???
  7152.      2Eh    DWORD    pointer to filename
  7153.      32h  4 BYTEs    ???
  7154.      36h    WORD    file attributes on call
  7155.             returned ???
  7156.      38h    WORD    returned ???
  7157.     ---class 05h function 0Ah---
  7158.      17h  7 BYTEs    ???
  7159.      1Eh    DWORD    pointer to ???
  7160.      22h    DWORD    pointer to IFS open file structure (see below)
  7161.      26h    BYTE    seek type (02h = from end)
  7162.      28h    DWORD    offset on call
  7163.             returned new absolute position
  7164.     ---class 05h functions 0Bh,0Ch---
  7165.      17h  7 BYTEs    ???
  7166.      1Eh    DWORD    pointer to ???
  7167.      22h    DWORD    pointer to IFS open file structure (see below)
  7168.      28h    WORD    number of bytes to transfer
  7169.             returned bytes actually transferred
  7170.      2Ah    DWORD    transfer address
  7171.     ---class 05h function 0Dh---
  7172.      17h  7 BYTEs    ???
  7173.      1Eh    DWORD    pointer to ???
  7174.      22h    DWORD    pointer to IFS open file structure (see below)
  7175.      26h    BYTE    file handle???
  7176.      27h    BYTE    unused???
  7177.      28h    WORD    ???
  7178.      2Ah    WORD    ???
  7179.      2Ch    WORD    ???
  7180.      2Eh    WORD    ???
  7181.     ---class 05h function 0Eh---
  7182.      17h  7 BYTEs    ???
  7183.      1Eh    DWORD    pointer to ???
  7184.      22h    DWORD    pointer to IFS open file structure (see below)
  7185.      26h    BYTE    00h commit file
  7186.             01h close file
  7187.      27h    BYTE    unused???
  7188.     ---class 05h function 0Fh---
  7189.      17h  7 BYTEs    ???
  7190.      1Eh    DWORD    pointer to ???
  7191.      22h  4 BYTEs    ???
  7192.      26h    BYTE    02h GET attributes
  7193.             03h PUT attributes
  7194.      27h    BYTE    unused???
  7195.      28h 12 BYTEs    ???
  7196.      34h    WORD    search attributes???
  7197.      36h    DWORD    pointer to filename
  7198.      3Ah    WORD    (GET) returned ??? 
  7199.      3Ch    WORD    (GET) returned ???
  7200.      3Eh    WORD    (GET) returned ???
  7201.      40h    WORD    (GET) returned ???
  7202.      42h    WORD    (PUT) new attributes
  7203.             (GET) returned attributes
  7204.     ---class 05h function 10h---
  7205.      17h  7 BYTEs    ???
  7206.      1Eh    DWORD    pointer to ???
  7207.      22h    DWORD    pointer to IFS open file structure (see below)
  7208.      26h    WORD    ???
  7209.      28h    DWORD    pointer to ???
  7210.      2Ch    WORD    ???
  7211.      2Eh    BYTE    ???
  7212.      2Fh    BYTE    subfunction
  7213.             01h get printer setup
  7214.             03h ???
  7215.             04h ???
  7216.             05h ???
  7217.             06h ???
  7218.             07h ???
  7219.             21h set printer setup
  7220.     ---class 05h function 11h---
  7221.      17h  7 BYTEs    ???
  7222.      1Eh    DWORD    pointer to ???
  7223.      22h    DWORD    pointer to IFS open file structure (see below)
  7224.      26h    BYTE    subfunction
  7225.      27h    BYTE    unused???
  7226.      28h    WORD    ???
  7227.      2Ah    WORD    ???
  7228.      2Ch    WORD    ???
  7229.      2Eh    BYTE    ???
  7230.      2Fh    BYTE    ???
  7231.     ---class 05h function 12h---
  7232.      17h 15 BYTEs    unused???
  7233.      26h    WORD    PSP segment
  7234.      28h    BYTE    type of process termination
  7235.      29h    BYTE    unused???
  7236.     ---class 05h function 13h---
  7237.      17h 15 BYTEs    unused???
  7238.      26h    WORD    PSP segment
  7239. ---request class 06h---
  7240.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  7241.  1Ah    BYTE    returned ???
  7242.  1Bh    BYTE    unused
  7243. ---request class 07h---
  7244.  16h    DWORD    pointer to IFS open file structure (see below)
  7245.  1Ah    BYTE    ???
  7246.  1Bh    BYTE    unused???
  7247.  
  7248. Format of IFS open file structure:
  7249. Offset    Size    Description
  7250.  00h    WORD    ???
  7251.  02h    WORD    device info word
  7252.  04h    WORD    file open mode
  7253.  06h    WORD    ???
  7254.  08h    WORD    file attributes
  7255.  0Ah    WORD    owner's network machine number
  7256.  0Ch    WORD    owner's PSP segment
  7257.  0Eh    DWORD    file size
  7258.  12h    DWORD    current offset in file
  7259.  16h    WORD    file time
  7260.  18h    WORD    file date
  7261.  1Ah 11 BYTEs    filename in FCB format
  7262.  25h    WORD    ???
  7263.  27h    WORD    hash value of SFT address
  7264.         (low word of linear address + segment&F000h)
  7265.  29h  3 WORDs    network info from SFT
  7266.  2Fh    WORD    ???
  7267.  
  7268. Format of one item in DOS 4+ list of special program names:
  7269. Offset    Size    Description
  7270.  00h    BYTE    length of name (00h = end of list)
  7271.  01h  N BYTEs    name in format name.ext
  7272.  N    2 BYTEs    DOS version to return for program (major,minor)
  7273.         (see AH=30h,INT 2F/AX=122Fh)
  7274. ---DOS 4 only---
  7275.  N+2    BYTE    number of times to return fake version number (FFh = always)
  7276. Note:    if the name of the executable for the program making the DOS "get
  7277.       version" call matches one of the names in this list, DOS returns the
  7278.       specified version rather than the true version number
  7279. --------v-215252-----------------------------
  7280. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  7281.     AX = 5252h
  7282. Return: BX = FFEEh if resident
  7283. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  7284. --------D-2153-------------------------------
  7285. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  7286.     AH = 53h
  7287.     DS:SI -> BIOS Parameter Block (see below)
  7288.     ES:BP -> buffer for Drive Parameter Block (see AH=32h for format)
  7289. Return: ES:BP buffer filled
  7290. Note:    for DOS 3+, the cluster at which to start searching is set to 0000h
  7291.       and the number of free clusters is set to FFFFh (unknown)
  7292.  
  7293. Format of BIOS Parameter Block:
  7294. Offset    Size    Description
  7295.  00h    WORD    number of bytes per sector
  7296.  02h    BYTE    number of sectors per cluster
  7297.  03h    WORD    number of reserved sectors at start of disk
  7298.  05h    BYTE    number of FATs
  7299.  06h    WORD    number of entries in root directory
  7300.  08h    WORD    total number of sectors
  7301.         for DOS 4+, set to zero if partition >32M, then set DWORD at
  7302.           15h to actual number of sectors
  7303.  0Ah    BYTE    media ID byte
  7304.  0Bh    WORD    number of sectors per FAT
  7305. ---DOS 3+---
  7306.  0Dh    WORD    number of sectors per track
  7307.  0Fh    WORD    number of heads
  7308.  11h    DWORD    number of hidden sectors
  7309.  15h 11 BYTEs    reserved    
  7310. ---DOS 4+ ---
  7311.  15h    DWORD    total number of sectors if word at 08h contains zero
  7312.  19h  6 BYTEs    ???
  7313.  1Fh    WORD    number of cylinders
  7314.  21h    BYTE    device type
  7315.  22h    WORD    device attributes (removable or not, etc)
  7316. ---European MS-DOS 4.00---
  7317.  15h    DWORD    total number of sectors if word at 08h contains zero
  7318.         (however, this DOS does not actually implement >32M partitions)
  7319. --------D-2154-------------------------------
  7320. INT 21 - DOS 2+ - GET VERIFY FLAG
  7321.     AH = 54h
  7322. Return: AL = verify flag
  7323.         00h off
  7324.         01h on (all disk writes verified after writing)
  7325. SeeAlso: AH=2Eh
  7326. --------D-2155-------------------------------
  7327. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  7328.     AH = 55h
  7329.     DX = segment at which to create new PSP
  7330.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  7331. Return: CF clear if successful
  7332.  
  7333. Notes:    creates a "child" PSP rather than making an exact copy of the current
  7334.       PSP; the new PSP's parent pointer is set to the current PSP and the
  7335.       reference count for each inherited file is incremented
  7336.     (DOS 2+) sets current PSP to DX
  7337.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  7338. SeeAlso: AH=26h,AH=50h
  7339. --------D-2156-------------------------------
  7340. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  7341.     AH = 56h
  7342.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  7343.     ES:DI -> ASCIZ new filename (no wildcards)
  7344.     CL = attribute mask (server call only, see below)
  7345. Return: CF clear if successful
  7346.     CF set on error
  7347.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  7348. Notes:    allows move between directories on same logical volume
  7349.     does not set the archive attribute (see AX=4300h), which results in
  7350.       incremental backups not backing up the file under its new name
  7351.     open files should not be renamed
  7352.     (DOS 3+) allows renaming of directories
  7353.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  7354.       error 12h (no more files) is returned on success, and both source and
  7355.       destination specs must be canonical (as returned by AH=60h).
  7356.       Wildcards in the destination are replaced by the corresponding char
  7357.       of each source file being renamed.  Under DOS 3.x, the call will fail
  7358.       if the destination wildcard is *.* or equivalent.  When invoked via
  7359.       AX=5D00h, only those files matching the attribute mask in CL are
  7360.       renamed.
  7361.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  7362.       and the new-name pointer is in ES:EDI (DS must equal ES)
  7363. SeeAlso: AH=17h,AX=4301h,AH=60h,AX=5D00h
  7364. --------D-215700-----------------------------
  7365. INT 21 - DOS 2+ - GET FILE'S DATE AND TIME
  7366.     AX = 5700h
  7367.     BX = file handle
  7368. Return: CF clear if successful
  7369.         CX = file's time
  7370.         bits 15-11: hours (0-23)
  7371.              10-5:  minutes
  7372.               4-0:  seconds/2
  7373.         DX = file's date
  7374.         bits 15-9: year - 1980
  7375.               8-5: month
  7376.               4-0: day
  7377.     CF set on error
  7378.         AX = error code (01h,06h) (see AH=59h)
  7379. SeeAlso: AX=5701h
  7380. --------D-215701-----------------------------
  7381. INT 21 - DOS 2+ - SET FILE'S DATE AND TIME
  7382.     AX = 5701h
  7383.     BX = file handle
  7384.     CX = new time (see AX=5700h)
  7385.     DX = new date (see AX=5700h)
  7386. Return: CF clear if successful
  7387.     CF set on error
  7388.         AX = error code (01h,06h) (see AH=59h)
  7389. SeeAlso: AX=5700h
  7390. --------D-215702-----------------------------
  7391. INT 21 - DOS 4.x only - GET ???
  7392.     AX = 5702h
  7393.     BX = ??? (0000h through 0004h)
  7394.     DS:SI -> ???
  7395.     ES:DI -> result buffer
  7396.     CX = size of result buffer
  7397. Return: CX = size of returned data
  7398. SeeAlso: AX=5703h,AX=5704h
  7399. --------D-215703-----------------------------
  7400. INT 21 - DOS 4.x only - GET ???
  7401.     AX = 5703h
  7402.     BX = file handle (only 0000h through 0004h valid)
  7403.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  7404.     ES:DI -> result buffer
  7405.     CX = size of result buffer
  7406. Return: CX = size of returned data
  7407.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  7408. SeeAlso: AX=5702h,AX=5704h,INT 2F/AX=112Dh
  7409. --------D-215704-----------------------------
  7410. INT 21 - DOS 4.x only - TRUNCATE OPEN FILE TO ZERO LENGTH
  7411.     AX = 5704h
  7412.     BX = file handle (only 0000h through 0004h valid)
  7413.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  7414.     ES:DI -> result buffer
  7415.     CX = size of result buffer
  7416. Return: CX = size of returned data
  7417.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  7418. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  7419. --------D-2158-------------------------------
  7420. INT 21 - DOS 3+ - GET OR SET MEMORY ALLOCATION STRATEGY
  7421.     AH = 58h
  7422.     AL = subfunction
  7423.         00h get allocation strategy
  7424.         Return: AX = current strategy
  7425.                 00h low memory first fit
  7426.                 01h low memory best fit
  7427.                 02h low memory last fit
  7428.              ---DOS 5+ ---
  7429.                 40h high memory first fit
  7430.                 41h high memory best fit
  7431.                 42h high memory last fit
  7432.                 80h first fit, try high then low memory
  7433.                 81h best fit, try high then low memory
  7434.                 82h last fit, try high then low memory
  7435.         01h set allocation strategy
  7436.         BL = new allocation strategy (see above)
  7437.         BH = 00h (DOS 5+)
  7438. Return: CF clear if successful
  7439.     CF set on error
  7440.         AX = error code (01h) (see AH=59h)
  7441. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  7442.       2 or greater means last fit
  7443.     the Get subfunction returns the last value set
  7444.     setting an allocation strategy involving high memory does not
  7445.       automatically link in the UMB memory chain; this must be done
  7446.       explicitly with AX=5803h in order to actually allocate high memory
  7447.     a program which changes the allocation strategy should restore it
  7448.       before terminating
  7449.     Toshiba MS-DOS 2.11 supports subfunctions 00h and 01h
  7450.     DR-DOS 3.41 reportedly reverses subfunctions 00h and 01h
  7451. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  7452. --------D-2158-------------------------------
  7453. INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
  7454.     AH = 58h
  7455.     AL = subfunction
  7456.         02h get UMB link state
  7457.         Return: AL = 00h UMBs not part of DOS memory chain
  7458.                = 01h UMBs in DOS memory chain
  7459.         03h set UMB link state
  7460.         BX = 0000h remove UMBs from DOS memory chain
  7461.            = 0001h add UMBs to DOS memory chain
  7462. Return: CF clear if successful
  7463.     CF set on error
  7464.         AX = error code (01h) (see AH=59h)
  7465. Note:    a program which changes the UMB link state should restore it before
  7466.       terminating
  7467. --------v-2158CC-----------------------------
  7468. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  7469.     AX = 58CCh
  7470. Return: CF clear if resident
  7471. SeeAlso: AX=5252h,AX=6969h
  7472. --------D-2159--BX0000-----------------------
  7473. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  7474.     AH = 59h
  7475.     BX = 0000h
  7476. Return: AX = extended error code (see below)
  7477.     BH = error class (see below)
  7478.     BL = recommended action (see below)
  7479.     CH = error locus (see below)
  7480.     ES:DI may be pointer (see error code list below)
  7481.     CL, DX, SI, BP, and DS destroyed
  7482. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  7483.       one supported under DOS 2.x
  7484.     you should call this function to retrieve the true error code when an
  7485.       FCB or DOS 2.x call returns an error
  7486.     under DR-DOS 5.0, this function does not use any of the DOS-internal
  7487.       stacks and may thus be called at any time
  7488. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  7489.  
  7490. Values for extended error code:
  7491.  00h no error
  7492.  01h function number invalid
  7493.  02h file not found
  7494.  03h path not found
  7495.  04h too many open files (no handles available)
  7496.  05h access denied
  7497.  06h invalid handle
  7498.  07h memory control block destroyed
  7499.  08h insufficient memory
  7500.  09h memory block address invalid
  7501.  0Ah environment invalid (usually >32K in length)
  7502.  0Bh format invalid
  7503.  0Ch access code invalid
  7504.  0Dh data invalid
  7505.  0Eh reserved
  7506.  0Fh invalid drive
  7507.  10h attempted to remove current directory
  7508.  11h not same device
  7509.  12h no more files
  7510. ---DOS 3+---
  7511.  13h disk write-protected
  7512.  14h unknown unit
  7513.  15h drive not ready
  7514.  16h unknown command
  7515.  17h data error (CRC)
  7516.  18h bad request structure length
  7517.  19h seek error
  7518.  1Ah unknown media type (non-DOS disk)
  7519.  1Bh sector not found
  7520.  1Ch printer out of paper
  7521.  1Dh write fault
  7522.  1Eh read fault
  7523.  1Fh general failure
  7524.  20h sharing violation
  7525.  21h lock violation
  7526.  22h disk change invalid
  7527.     ES:DI -> ASCIZ volume label of required disk
  7528.  23h FCB unavailable
  7529.  24h sharing buffer overflow
  7530.  25h (DOS 4+) code page mismatch
  7531.  26h (DOS 4+) cannot complete file operation (out of input)
  7532.  27h (DOS 4+) insufficient disk space
  7533.  28h-31h reserved
  7534.  32h network request not supported
  7535.  33h remote computer not listening
  7536.  34h duplicate name on network
  7537.  35h network name not found
  7538.  36h network busy
  7539.  37h network device no longer exists
  7540.  38h network BIOS command limit exceeded
  7541.  39h network adapter hardware error
  7542.  3Ah incorrect response from network
  7543.  3Bh unexpected network error
  7544.  3Ch incompatible remote adapter
  7545.  3Dh print queue full
  7546.  3Eh queue not full
  7547.  3Fh not enough space to print file
  7548.  40h network name was deleted
  7549.  41h network: Access denied
  7550.  42h network device type incorrect
  7551.  43h network name not found
  7552.  44h network name limit exceeded
  7553.  45h network BIOS session limit exceeded
  7554.  46h temporarily paused
  7555.  47h network request not accepted
  7556.  48h network print/disk redirection paused
  7557.  49h network software not installed
  7558.      (LANtastic) invalid network version
  7559.  4Ah unexpected adapter close
  7560.      (LANtastic) account expired
  7561.  4Bh (LANtastic) password expired
  7562.  4Ch (LANtastic) login attempt invalid at this time
  7563.  4Dh (LANtastic v3+) disk limit exceeded on network node
  7564.  4Eh (LANtastic v3+) not logged in to network node
  7565.  4Fh reserved
  7566.  50h file exists
  7567.  51h reserved
  7568.  52h cannot make directory
  7569.  53h fail on INT 24h
  7570.  54h (DOS 3.3+) too many redirections
  7571.  55h (DOS 3.3+) duplicate redirection
  7572.  56h (DOS 3.3+) invalid password
  7573.  57h (DOS 3.3+) invalid parameter
  7574.  58h (DOS 3.3+) network write fault
  7575.  59h (DOS 4+) function not supported on network
  7576.  5Ah (DOS 4+) required system component not installed
  7577.  64h (MSCDEX) unknown error
  7578.  65h (MSCDEX) not ready
  7579.  66h (MSCDEX) EMS memory no longer valid
  7580.  67h (MSCDEX) not High Sierra or ISO-9660 format
  7581.  68h (MSCDEX) door open
  7582.  
  7583. Values for Error Class:
  7584.  01h out of resource (storage space or I/O channels)
  7585.  02h temporary situation (file or record lock)
  7586.  03h authorization (denied access)
  7587.  04h internal (system software bug)
  7588.  05h hardware failure
  7589.  06h system failure (configuration file missing or incorrect)
  7590.  07h application program error
  7591.  08h not found
  7592.  09h bad format
  7593.  0Ah locked
  7594.  0Bh media error
  7595.  0Ch already exists
  7596.  0Dh unknown
  7597.  
  7598. Values for Suggested Action:
  7599.  01h retry
  7600.  02h delayed retry
  7601.  03h prompt user to reenter input
  7602.  04h abort after cleanup
  7603.  05h immediate abort
  7604.  06h ignore
  7605.  07h retry after user intervention
  7606.  
  7607. Values for Error Locus:
  7608.  01h unknown or not appropriate
  7609.  02h block device (disk error)
  7610.  03h network related
  7611.  04h serial device (timeout)
  7612.  05h memory related
  7613. --------D-2159--BX0001-----------------------
  7614. INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
  7615.     AH = 59h
  7616.     BX = 0001h
  7617. Return: ES:DI -> hard error information packet (see below) for most recent
  7618.         hard (critical) error
  7619. SeeAlso: AH=95h,INT 24
  7620.  
  7621. Format of hard error information packet:
  7622. Offset    Size    Description
  7623.  00h    WORD    contents of AX at system entry
  7624.  02h    WORD    Process ID which encountered error
  7625.  04h    WORD    contents of AX at time of error
  7626.  06h    BYTE    error type
  7627.         00h physical I/O error
  7628.         01h disk change request
  7629.         02h file sharing violation
  7630.         03h FCB problem
  7631.         04h file locking violation
  7632.         05h bad FAT
  7633.         06h network detected error
  7634.  07h    BYTE    INT 24 error code
  7635.  08h    WORD    extended error code (see AH=59h/BX=0000h)
  7636.  0Ah    DWORD    pointer to associated device
  7637. --------D-215A-------------------------------
  7638. INT 21 - DOS 3+ - CREATE TEMPORARY FILE
  7639.     AH = 5Ah
  7640.     CX = file attribute (see AX=4301h)
  7641.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  7642.         generated filename
  7643. Return: CF clear if successful
  7644.         AX = file handle opened for read/write in compatibility mode
  7645.         DS:DX pathname extended with generated name for temporary file
  7646.     CF set on error
  7647.         AX = error code (03h,04h,05h) (see AH=59h)
  7648. Desc:    creates a file with a unique name which must be explicitly deleted
  7649. Notes:    COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  7650.       wraps around to the end of the segment
  7651.     under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  7652. SeeAlso: AH=3Ch,AH=5Bh
  7653. --------D-215B-------------------------------
  7654. INT 21 - DOS 3+ - CREATE NEW FILE
  7655.     AH = 5Bh
  7656.     CX = file attribute (see AX=4301h)
  7657.     DS:DX -> ASCIZ filename
  7658. Return: CF clear if successful
  7659.         AX = file handle opened for read/write in compatibility mode
  7660.     CF set on error
  7661.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  7662. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  7663.       rather than truncating it; this permits its use in creating semaphore
  7664.       files because it is an atomic "test and set" operation
  7665.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  7666. SeeAlso: AH=3Ch,AH=5Ah
  7667. --------D-215C-------------------------------
  7668. INT 21 - DOS 3+ - "FLOCK" - RECORD LOCKING
  7669.     AH = 5Ch
  7670.     AL = subfunction
  7671.         00h lock region of file
  7672.         01h unlock region of file
  7673.     BX = file handle
  7674.     CX:DX = start offset of region within file
  7675.     SI:DI = length of region in bytes
  7676. Return: CF clear if successful
  7677.     CF set on error
  7678.         AX = error code (01h,06h,21h,24h) (see AH=59h)
  7679. Notes:    error returned unless SHARE or network installed
  7680.     an unlock call must specify the same region as some prior lock call
  7681.     locked regions become entirely inaccessible to other processes
  7682.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  7683.       handles inherited by child processes (see AH=4Bh) do not
  7684. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  7685. --------D-215D00-----------------------------
  7686. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  7687.     AX = 5D00h
  7688.     DS:DX -> DOS parameter list (see below)
  7689.     DPL contains all register values for a call to INT 21h
  7690. Return: as appropriate for function being called
  7691. Notes:    does not check AH.  Out of range values will crash the system
  7692.     executes using specified computer ID and process ID
  7693.     sharing delay loops skipped
  7694.     a special sharing mode is enabled
  7695.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h)
  7696.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  7697.       DELETE (AH=41h), and RENAME (AH=56h)
  7698.     functions which take filenames require canonical names (as returned
  7699.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  7700. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  7701.  
  7702. Format of DOS parameter list:
  7703. Offset    Size    Description
  7704.  00h    WORD    AX 
  7705.  02h    WORD    BX
  7706.  04h    WORD    CX
  7707.  06h    WORD    DX
  7708.  08h    WORD    SI
  7709.  0Ah    WORD    DI
  7710.  0Ch    WORD    DS
  7711.  0Eh    WORD    ES
  7712.  10h    WORD    reserved (0)
  7713.  12h    WORD    computer ID (0 = current system)
  7714.  14h    WORD    process ID (PSP segment on specified computer)
  7715. Note:    under Windows Enhanced mode, the computer ID is normally the virtual
  7716.       machine ID (see INT 2F/AX=1683h), though this can reportedly be
  7717.       changed by setting UniqueDOSPSP= in SYSTEM.INI
  7718. --------D-215D01-----------------------------
  7719. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  7720.     AX = 5D01h
  7721.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7722.         process ID fields used
  7723. Return: CF set on error
  7724.         AX = error code (see AH=59h)
  7725.     CF clear if successful
  7726. Notes:    flushes buffers and updates directory entries for each file which has
  7727.       been written to; if remote file, calls INT 2F/AX=1107h
  7728.     the computer ID and process ID are stored but ignored under DOS 3.3
  7729. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  7730. --------D-215D02-----------------------------
  7731. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  7732.     AX = 5D02h
  7733.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  7734.         computer ID, and process ID used
  7735.     DPL's DS:DX -> ASCIZ name of file to close
  7736. Return: CF set on error
  7737.         AX = error code (see AH=59h)
  7738.     CF clear if successful
  7739. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  7740.     name must be canonical fully-qualified, such as returned by AH=60h
  7741. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  7742. --------D-215D03-----------------------------
  7743. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  7744.     AX = 5D03h
  7745.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  7746. Return: CF set on error
  7747.         AX = error code (see AH=59h)
  7748.     CF clear if successful
  7749. Note:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  7750. SeeAlso: AX=5D02h,AX=5D04h
  7751. --------D-215D04-----------------------------
  7752. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  7753.     AX = 5D04h
  7754.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7755.         process ID fields used
  7756. Return: CF set on error
  7757.         AX = error code (see AH=59h)
  7758.     CF clear if successful
  7759. Note:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  7760. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  7761. --------D-215D05-----------------------------
  7762. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  7763.     AX = 5D05h
  7764.     DS:DX -> DOS parameter list (see AX=5D00h)
  7765.     DPL's BX = index of sharing record (see AH=52h)
  7766.     DPL's CX = index of SFT in sharing record's SFT list
  7767. Return: CF clear if successful
  7768.         ES:DI -> ASCIZ filename
  7769.         BX = network machine number of SFT's owner
  7770.         CX = number of locks held by SFT's owner
  7771.     CF set if either index out of range
  7772.         AX = 0012h (no more files)
  7773. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  7774.     names are always canonical fully-qualified, such as returned by AH=60h
  7775. SeeAlso: AH=5Ch,AH=60h 
  7776. --------D-215D06-----------------------------
  7777. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  7778.     AX = 5D06h
  7779. Return: CF set on error
  7780.        AX = error code (see AH=59h)
  7781.     CF clear if successful
  7782.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  7783.         (critical error flag is first byte)
  7784.         CX = size in bytes of area which must be swapped while in DOS
  7785.         DX = size in bytes of area which must always be swapped
  7786. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  7787.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  7788.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  7789.       DOS 2.x by forcing use of correct stack
  7790.     swapping the data area allows reentering DOS unless DOS is in a
  7791.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  7792.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  7793.     SHARE and other DOS utilities consult the byte at offset 04h in the
  7794.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  7795.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  7796. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7797.  
  7798. Format of DOS 3.10-3.30 Swappable Data Area:
  7799. Offset    Size    Description
  7800.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  7801.          enabled critical-section calls (see INT 2A/AH=80h)
  7802.         (not actually part of the SDA)
  7803.  00h    BYTE    critical error flag
  7804.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7805.  02h    BYTE    drive on which current critical error occurred, or FFh
  7806.  03h    BYTE    locus of last error
  7807.  04h    WORD    extended error code of last error
  7808.  06h    BYTE    suggested action for last error
  7809.  07h    BYTE    class of last error
  7810.  08h    DWORD    ES:DI pointer for last error
  7811.  0Ch    DWORD    current DTA
  7812.  10h    WORD    current PSP
  7813.  12h    WORD    stores SP across an INT 23
  7814.  14h    WORD    return code from last process termination (zerod after reading
  7815.         with AH=4Dh)
  7816.  16h    BYTE    current drive
  7817.  17h    BYTE    extended break flag
  7818. ---remainder need only be swapped if in DOS---
  7819.  18h    WORD    value of AX on call to INT 21
  7820.  1Ah    WORD    PSP segment for sharing/network
  7821.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  7822.  1Eh    WORD    first usable memory block found when allocating memory
  7823.  20h    WORD    best usable memory block found when allocating memory
  7824.  22h    WORD    last usable memory block found when allocating memory
  7825.  24h    WORD    memory size in paragraphs (used only during initialization)
  7826.  26h    WORD    ???
  7827.  28h    BYTE    INT 24 returned Fail
  7828.  29h    BYTE    bit flags for allowable actions on INT 24
  7829.  2Ah    BYTE    ??? flag
  7830.  2Bh    BYTE    FFh if Ctrl-Break termination, 00h otherwise
  7831.  2Ch    BYTE    ??? flag of some kind
  7832.  2Dh    BYTE    ??? (doesn't seem to be referenced)
  7833.  2Eh    BYTE    day of month
  7834.  2Fh    BYTE    month
  7835.  30h    WORD    year - 1980
  7836.  32h    WORD    number of days since 1-1-1980
  7837.  34h    BYTE    day of week (0 = Sunday)
  7838.  35h    BYTE    working SFT pointer at SDA+2AAh is valid ???
  7839.  36h    BYTE    safe to call INT 28 if nonzero
  7840.  37h    BYTE    flag: if nonzero, INT 24 abort turned into INT 24 fail
  7841.         (set only during process termination)
  7842.  38h 26 BYTEs    device driver request header (see INT 2F/AX=0802h)
  7843.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  7844.  56h 22 BYTEs    device driver request header
  7845.  6Ch 22 BYTEs    device driver request header
  7846.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  7847.  83h    BYTE    ??? apparently not referenced by kernel
  7848.  84h  3 BYTEs    24-bit user number (see AH=30h)
  7849.  87h    BYTE    OEM number (see AH=30h)
  7850.  88h  2 BYTEs    ???
  7851.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  7852.  90h    BYTE    ??? buffer for single-byte I/O functions
  7853.  91h    BYTE    ??? apparently not referenced by kernel
  7854.  92h 128 BYTEs    buffer for filename
  7855. 112h 128 BYTEs    buffer for filename
  7856. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  7857. 1A7h 32 BYTEs    directory entry for found file (see AH=11h)
  7858. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  7859. 218h 11 BYTEs    FCB-format filename for device name comparison
  7860. 223h    BYTE    unused???
  7861. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7862. 22Fh  2 BYTEs    ???
  7863. 231h    WORD    ???
  7864. 233h  5 BYTEs    ???
  7865. 238h    BYTE    extended FCB file attribute
  7866. 239h    BYTE    type of FCB (00h regular, FFh extended)
  7867. 23Ah    BYTE    directory search attributes
  7868. 23Bh    BYTE    file open mode???
  7869. 23Ch    BYTE    ??? flag bits 0 and 4
  7870. 23Dh    BYTE    ??? flag or counter
  7871. 23Eh    BYTE    ??? flag
  7872. 23Fh    BYTE    flag indicating how DOS function was invoked
  7873.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7874. 240h    BYTE    ???
  7875. 241h    BYTE    ??? flag
  7876. 242h    BYTE    flag: 00h if read, 01h if write
  7877. 243h    BYTE    drive number for ???
  7878. 244h    BYTE    ???
  7879. 245h    BYTE    ??? flag or counter
  7880. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  7881. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  7882. 248h    BYTE    ??? flag or counter
  7883. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  7884. 24Ah    BYTE    ??? flag
  7885. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  7886.         (normally E5h, but 00h as described under INT 21/AH=13h)
  7887. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  7888. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  7889. 254h    WORD    stores SP across INT 24
  7890. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  7891. 25Ah    WORD    ???
  7892. 25Ch    WORD    ??? temp
  7893. 25Eh    WORD    ??? flag (only low byte referenced)
  7894. 260h    WORD    ??? temp
  7895. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7896. 263h    BYTE    ??? (doesn't seem to be referenced)
  7897. 264h    DWORD    pointer to device header
  7898. 268h    DWORD    pointer to current SFT
  7899. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  7900. 270h    DWORD    pointer to caller's FCB
  7901. 274h    WORD    number of SFT to which file being opened will refer
  7902. 276h    WORD    temporary storage for file handle
  7903. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  7904. 27Ch    WORD    offset in DOS DS of first filename argument
  7905. 27Eh    WORD    offset in DOS DS of second filename argument
  7906. 280h    WORD    offset of last component in pathname or FFFFh
  7907. 282h    WORD    ??? offset of transfer address???
  7908. 284h    WORD    ??? relative cluster within file being accessed ???
  7909. 286h    WORD    ??? absolute cluster number being accessed ???
  7910. 288h    WORD    ??? current sector number
  7911. 28Ah    WORD    ??? current cluster number
  7912. 28Ch    WORD    ??? current offset in file DIV bytes per sector
  7913. 28Eh  2 BYTEs    ??? 
  7914. 290h    WORD    ??? current offset in file MOD bytes per sector
  7915. 292h    DWORD    current offset in file
  7916. 296h    WORD    ???
  7917. 298h    WORD    ???
  7918. 29Ah    WORD    ???
  7919. 29Ch    WORD    ???
  7920. 29Eh    WORD    ???
  7921. 2A0h    WORD    ???
  7922. 2A2h    DWORD    number of bytes appended to file
  7923. 2A6h    DWORD    pointer to ??? disk buffer
  7924. 2AAh    DWORD    pointer to working SFT
  7925. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  7926. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  7927. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  7928. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  7929.         also switched to for duration of INT 24
  7930. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7931.         (see AH=4Eh)
  7932. 2CDh 32 BYTEs    directory entry for file being renamed (see AH=11h for format)
  7933. 2EDh 331 BYTEs    critical error stack
  7934.    403h     35 BYTEs scratch SFT
  7935. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7936. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7937. ---DOS 3.2,3.3 only---
  7938. 738h    BYTE    device driver lookahead flag (see AH=64h)
  7939. 739h    BYTE    ??? looks like a drive number
  7940. 73Ah    BYTE    ??? flag of some kind
  7941. 73Ah    BYTE    ???
  7942. --------D-215D07-----------------------------
  7943. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  7944.     AX = 5D07h
  7945. Return: DL = mode
  7946.         00h redirected output is combined
  7947.         01h redirected output in separate print jobs
  7948. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  7949. --------D-215D08-----------------------------
  7950. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  7951.     AX = 5D08h
  7952.     DL = mode
  7953.         00h redirected output is combined
  7954.         01h redirected output placed in separate jobs, start new print job
  7955.         now
  7956. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  7957. --------D-215D09-----------------------------
  7958. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  7959.     AX = 5D09h
  7960. Note:    forces redirected printer output to be printed, and starts a new print
  7961.       job
  7962. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  7963. --------D-215D0A-----------------------------
  7964. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  7965.     AX = 5D0Ah
  7966.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  7967. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  7968.       DX,DI, and ES in corresponding registers
  7969. Notes:    documented for DOS 5+, but undocumented in earlier versions
  7970.     the MS-DOS Programmer's Reference incorrectly states that this call was
  7971.       introduced in DOS 4, and fails to mention that the ERROR structure
  7972.       passed to this function is a DOS parameter list.
  7973. SeeAlso: AH=59h
  7974. --------D-215D0B-----------------------------
  7975. INT 21 U - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  7976.     AX = 5D0Bh
  7977. Return: CF set on error
  7978.         AX = error code (see AH=59h)
  7979.     CF clear if successful
  7980.         DS:SI -> swappable data area list (see below)
  7981. Notes:    copying and restoring the swappable data areas allows DOS to be
  7982.       reentered unless it is in a critical section delimited by calls to
  7983.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  7984.     SHARE and other DOS utilities consult the byte at offset 04h in the
  7985.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  7986.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  7987. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h
  7988.  
  7989. Format of DOS 4.x swappable data area list:
  7990. Offset    Size    Description
  7991.  00h    WORD    count of data areas
  7992.  02h  N BYTEs    "count" copies of data area record
  7993.         Offset    Size    Description
  7994.          00h    DWORD    address
  7995.          04h    WORD    length and type
  7996.                 bit 15 set if swap always, clear if swap in DOS
  7997.                 bits 14-0: length in bytes
  7998.  
  7999. Format of DOS 4.0-6.0 swappable data area:
  8000. Offset    Size    Description
  8001.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  8002.          enabled critical-section calls (see INT 2A/AH=80h)
  8003.         (not actually part of the SDA; all offsets are 0D0Ch, but this
  8004.         list is still present for DOS 3.x compatibility)
  8005.  00h    BYTE    critical error flag
  8006.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  8007.  02h    BYTE    drive on which current critical error occurred or FFh
  8008.  03h    BYTE    locus of last error
  8009.  04h    WORD    extended error code of last error
  8010.  06h    BYTE    suggested action for last error
  8011.  07h    BYTE    class of last error
  8012.  08h    DWORD    ES:DI pointer for last error
  8013.  0Ch    DWORD    current DTA
  8014.  10h    WORD    current PSP
  8015.  12h    WORD    stores SP across an INT 23
  8016.  14h    WORD    return code from last process termination (zerod after reading
  8017.         with AH=4Dh)
  8018.  16h    BYTE    current drive
  8019.  17h    BYTE    extended break flag
  8020.  18h  2 BYTEs    ???
  8021. ---remainder need only be swapped if in DOS---
  8022.  1Ah    WORD    value of AX on call to INT 21
  8023.  1Ch    WORD    PSP segment for sharing/network
  8024.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  8025.  20h    WORD    first usable memory block found when allocating memory
  8026.  22h    WORD    best usable memory block found when allocating memory
  8027.  24h    WORD    last usable memory block found when allocating memory
  8028.  26h    WORD    memory size in paragraphs (used only during initialization)
  8029.  28h    WORD    ???
  8030.  2Ah    BYTE    ???
  8031.  2Bh    BYTE    ???
  8032.  2Ch    BYTE    ???
  8033.  2Dh    BYTE    ???
  8034.  2Eh    BYTE    ???
  8035.  2Fh    BYTE    ??? (doesn't seem to be referenced)
  8036.  30h    BYTE    day of month
  8037.  31h    BYTE    month
  8038.  32h    WORD    year - 1980
  8039.  34h    WORD    number of days since 1-1-1980
  8040.  36h    BYTE    day of week (0 = Sunday)
  8041.  37h    BYTE    ???
  8042.  38h    BYTE    ???
  8043.  39h    BYTE    ???
  8044.  3Ah 30 BYTEs    device driver request header (see INT 2F/AX=0802h)
  8045.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  8046.  5Ch 22 BYTEs    device driver request header
  8047.  72h 30 BYTEs    device driver request header
  8048.  90h  6    BYTEs    ???
  8049.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  8050.  9Ch  2 BYTEs    ???
  8051.  9Eh 128 BYTEs    buffer for filename
  8052. 11Eh 128 BYTEs    buffer for filename
  8053. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  8054. 1B3h 32 BYTEs    directory entry for found file (see AH=11h)
  8055. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  8056. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  8057. 236h    BYTE    ???
  8058. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  8059. 242h  2 BYTEs    ???
  8060. 244h    WORD    ???
  8061. 246h  5 BYTEs    ???
  8062. 24Bh    BYTE    extended FCB file attributes
  8063. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  8064. 24Dh    BYTE    directory search attributes
  8065. 24Eh    BYTE    file open mode
  8066. 24Fh    BYTE    ??? flag bits
  8067. 250h    BYTE    ??? flag or counter
  8068. 251h    BYTE    ??? flag
  8069. 252h    BYTE    flag indicating how DOS function was invoked
  8070.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  8071. 253h    BYTE    ???
  8072. 254h    BYTE    ???
  8073. 255h    BYTE    ???
  8074. 256h    BYTE    ???
  8075. 257h    BYTE    ???
  8076. 258h    BYTE    ???
  8077. 259h    BYTE    ???
  8078. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  8079. 25Bh    BYTE    ???
  8080. 25Ch    BYTE    type of process termination (00h-03h)
  8081. 25Dh    BYTE    ???
  8082. 25Eh    BYTE    ???
  8083. 25Fh    BYTE    ???
  8084. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  8085. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  8086. 268h    WORD    stores SP???
  8087. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  8088. 26Eh    WORD    segment of disk buffer
  8089. 270h    WORD    ???
  8090. 272h    WORD    ???
  8091. 274h    WORD    ???
  8092. 276h    WORD    ???
  8093. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  8094. 279h    BYTE    ??? (doesn't seem to be referenced)
  8095. 27Ah    DWORD    pointer to ???
  8096. 27Eh    DWORD    pointer to current SFT
  8097. 282h    DWORD    pointer to current directory structure for drive being accessed
  8098. 286h    DWORD    pointer to caller's FCB
  8099. 28Ah    WORD    SFT index to which file being opened will refer
  8100. 28Ch    WORD    temporary storage for file handle
  8101. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  8102. 292h    WORD    offset in DOS DS of first filename argument
  8103. 294h    WORD    offset in DOS DS of second filename argument
  8104. 296h    WORD    ???
  8105. 298h    WORD    ???
  8106. 29Ah    WORD    ???
  8107. 29Ch    WORD    ???
  8108. 29Eh    WORD    ???
  8109. 2A0h    WORD    ???
  8110. 2A2h    WORD    ??? directory cluster number???
  8111. 2A4h    DWORD    ???
  8112. 2A8h    DWORD    ???
  8113. 2ACh    WORD    ???
  8114. 2AEh    DWORD    offset in file???
  8115. 2B2h    WORD    ???
  8116. 2B4h    WORD    bytes in partial sector
  8117. 2B6h    WORD    number of sectors
  8118. 2B8h    WORD    ???
  8119. 2BAh    WORD    ???
  8120. 2BCh    WORD    ???
  8121. 2BEh    DWORD    number of bytes appended to file
  8122. 2C2h    DWORD    pointer to ??? disk buffer
  8123. 2C6h    DWORD    pointer to ??? SFT
  8124. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  8125. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  8126. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  8127. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  8128.         also switched to for duration of INT 24
  8129. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  8130. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  8131.         performed, and 01h or 03h by INT 21/AX=6C00h)
  8132. 2D7h    WORD    ??? apparently unused
  8133. 2D9h    DWORD    stored ES:DI for AX=6C00h
  8134. 2DDh    WORD    extended file open action code (see AX=6C00h)
  8135. 2DFh    WORD    extended file open attributes (see AX=6C00h)
  8136. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  8137. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  8138. 2E7h    WORD    ???
  8139. 2E9h    WORD    ???
  8140. 2EBh    BYTE    ???
  8141. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  8142. 2EEh    WORD    ???
  8143. 2F0h    BYTE    ???
  8144. 2F1h    WORD    ??? bit flags
  8145. 2F3h    DWORD    pointer to user-supplied filename
  8146. 2F7h    DWORD    pointer to ???
  8147. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  8148. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  8149. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  8150. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  8151.         (see AH=4Eh)
  8152. 315h 32 BYTEs    directory entry for file being renamed (see AH=11h)
  8153. 335h 331 BYTEs    critical error stack
  8154. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  8155. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  8156. 780h    BYTE    device driver lookahead flag (see AH=64h)
  8157. 781h    BYTE    ??? looks like a drive number
  8158. 782h    BYTE    ??? flag of some kind
  8159. 783h    BYTE    ???
  8160. 784h    WORD    ???
  8161. 786h    WORD    ???
  8162. 788h    WORD    ???
  8163. 78Ah    WORD    ???
  8164. --------D-215E00-----------------------------
  8165. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  8166.     AX = 5E00h
  8167.     DS:DX -> 16-byte buffer for ASCIZ machine name
  8168. Return: CF clear if successful
  8169.         CH = validity
  8170.         00h name invalid
  8171.         nonzero valid
  8172.             CL = NetBIOS number for machine name
  8173.             DS:DX buffer filled with blank-paded name
  8174.     CF set on error
  8175.         AX = error code (01h) (see AH=59h)
  8176. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  8177. SeeAlso: AX=5E01h
  8178. --------D-215E01CH00-------------------------
  8179. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  8180.     AX = 5E01h
  8181.     CH = 00h undefine name (make it invalid)
  8182.        <> 0     define name
  8183.     CL = name number
  8184.     DS:DX -> 15-character blank-padded ASCIZ name
  8185. SeeAlso: AX=5E00h
  8186. --------D-215E02-----------------------------
  8187. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  8188.     AX = 5E02h
  8189.     BX = redirection list index (see AX=5F02h)
  8190.     CX = length of setup string
  8191.     DS:SI -> setup string
  8192. Return: CF clear if successful
  8193.     CF set on error
  8194.         AX = error code (01h) (see AH=59h)
  8195. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  8196. --------D-215E03-----------------------------
  8197. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  8198.     AX = 5E03h
  8199.     BX = redirection list index (see AX=5F02h)
  8200.     ES:DI -> 64-byte buffer for setup string
  8201. Return: CF clear if successful
  8202.         CX = length of setup string
  8203.         ES:DI buffer filled
  8204.     CF set on error
  8205.         AX = error code (01h) (see AH=59h)
  8206. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  8207. --------D-215E04-----------------------------
  8208. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  8209.     AX = 5E04h
  8210.     BX = redirection list index (see AX=5F02h)
  8211.     DX = mode
  8212.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  8213. Return: CF set on error
  8214.         AX = error code (see AH=59h)
  8215.     CF clear if successful
  8216. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  8217. SeeAlso: AX=5E05h,INT 2F/AX=111Fh
  8218. --------D-215E05-----------------------------
  8219. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  8220.     AX = 5E05h
  8221.     BX = redirection list index (see AX=5F02h)
  8222. Return: CF set on error
  8223.         AX = error code (see AH=59h)
  8224.     CF clear if successful
  8225.         DX = printer mode (see AX=5E04h)
  8226. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  8227. SeeAlso: AX=5E04h,INT 2F/AX=111Fh
  8228. ---------------------------------------------
  8229.