home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / INTER32A.ZIP / INTERRUP.C < prev    next >
Encoding:
Text File  |  1992-09-13  |  336.1 KB  |  9,084 lines

  1. Interrupt List, part 3 of 8
  2. This compilation is Copyright (c) 1989,1990,1991,1992 Ralf Brown
  3. ----------20---------------------------------
  4. INT 20 - Minix - SEND/RECEIVE MESSAGE
  5.     AX = process ID of other process
  6.     BX -> message
  7.     CX = 1 send
  8.          2 receive
  9.          3 send&receive
  10. Note:    the message contains the system call number (numbered as in V7 
  11.       Unix(tm)) and the call parameters
  12. ----------20---------------------------------
  13. INT 20 - DOS 1+ - TERMINATE PROGRAM
  14.     CS = PSP segment
  15. Return: never
  16. Note:    (see INT 21/AH=00h)
  17. SeeAlso: INT 21/AH=00h,INT 21/AH=4Ch
  18. ----------2100-------------------------------
  19. INT 21 - DOS 1+ - TERMINATE PROGRAM
  20.     AH = 00h
  21.     CS = PSP segment
  22. Notes:    Microsoft recomments using INT 21/AH=4Ch for DOS 2+
  23.     execution continues at address stored in INT 22 after DOS performs
  24.       whatever cleanup it needs to do
  25.     if the PSP is its own parent, the process's memory is not freed; if
  26.       INT 22 additionally points into the terminating program, the
  27.       process is effectively NOT terminated
  28.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  29. SeeAlso: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22
  30. ----------2101-------------------------------
  31. INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
  32.     AH = 01h
  33. Return: AL = character read
  34. Notes:    ^C/^Break are checked, and INT 23 executed if read
  35.     character is echoed to standard output
  36.     standard input is always the keyboard and standard output the screen
  37.       under DOS 1.x, but they may be redirected under DOS 2+
  38. SeeAlso: AH=06h,AH=07h,AH=08h,AH=0Ah
  39. ----------2102-------------------------------
  40. INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
  41.     AH = 02h
  42.     DL = character to write
  43. Return: AL = last character output (despite the official docs which state
  44.         nothing is returned) (at least DOS 3.3-5.0)
  45. Notes:    ^C/^Break are checked, and INT 23 executed if pressed
  46.     standard output is always the screen under DOS 1.x, but may be
  47.       redirected under DOS 2+
  48.     the last character output will be the character in DL unless DL=09h
  49.       on entry, in which case AL=20h as tabs are expanded to blanks
  50. SeeAlso: AH=06h,AH=09h
  51. ----------2103-------------------------------
  52. INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
  53.     AH = 03h
  54. Return: AL = character read
  55. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  56.     STDAUX is usually the first serial port
  57. SeeAlso: AH=04h,INT 14/AH=02h,INT E0/CL=03h
  58. ----------2104-------------------------------
  59. INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
  60.     AH = 04h
  61.     DL = character to write
  62. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  63.     STDAUX is usually the first serial port
  64.     if STDAUX is busy, this function will wait until it becomes free
  65. SeeAlso: AH=03h,INT 14/AH=01h,INT E0/CL=04h
  66. ----------2105-------------------------------
  67. INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
  68.     AH = 05h
  69.     DL = character to print
  70. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  71.     STDPRN is usually the first parallel port, but may be redirected under
  72.       DOS 2+
  73.     if the printer is busy, this function will wait
  74. SeeAlso: INT 17/AH=00h
  75. ----------2106-------------------------------
  76. INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
  77.     AH = 06h
  78.     DL = character (except FFh)
  79. Return: AL = character output (despite official docs which state nothing is
  80.         returned) (at least DOS 3.3-5.0)
  81. Notes:    does not check ^C/^Break
  82.     writes to standard output, which is always the screen under DOS 1.x,
  83.       but may be redirected under DOS 2+
  84. SeeAlso: AH=02h,AH=09h
  85. ----------2106--DLFF-------------------------
  86. INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
  87.     AH = 06h
  88.     DL = FFh
  89. Return: ZF set if no character available
  90.     ZF clear if character available
  91.         AL = character read
  92. Notes:    ^C/^Break are NOT checked
  93.     if the returned character is 00h, the user pressed a key with an
  94.       extended keycode, which will be returned by the next call of this
  95.       function
  96.     reads from standard input, which is always the keyboard under DOS 1.x,
  97.       but may be redirected under DOS 2+
  98. SeeAlso: AH=0Bh
  99. ----------2107-------------------------------
  100. INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
  101.     AH = 07h
  102. Return: AL = character read from standard input
  103. Notes:    does not check ^C/^Break
  104.     standard input is always the keyboard under DOS 1.x, but may be
  105.       redirected under DOS 2+
  106.     if the interim console flag is set (see AX=6301h), partially-formed
  107.       double-byte characters may be returned
  108. SeeAlso: AH=01h,AH=06h,AH=08h,AH=0Ah
  109. ----------2108-------------------------------
  110. INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
  111.     AH = 08h
  112. Return: AL = character read from standard input
  113. Notes:    ^C/^Break are checked, and INT 23 executed if detected
  114.     standard input is always the keyboard under DOS 1.x, but may be
  115.       redirected under DOS 2+
  116.     if the interim console flag is set (see AX=6301h), partially-formed
  117.       double-byte characters may be returned
  118. SeeAlso: AH=01h,AH=06h,AH=07h,AH=0Ah,AH=64h
  119. ----------2109-------------------------------
  120. INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
  121.     AH = 09h
  122.     DS:DX -> '$'-terminated string
  123. Return: AL = 24h (the '$' terminating the string, despite official docs which
  124.         state that nothing is returned) (at least DOS 3.3-5.0)
  125. Notes:    ^C/^Break checked, and INT 23 called if pressed
  126.     standard output is always the screen under DOS 1.x, but may be
  127.       redirected under DOS 2+
  128.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  129. SeeAlso: AH=02h,AH=06h"OUTPUT"
  130. ----------210A-------------------------------
  131. INT 21 - DOS 1+ - BUFFERED INPUT
  132.     AH = 0Ah
  133.     DS:DX -> buffer (see below)
  134. Return: buffer filled with user input
  135. Notes:    ^C/^Break checked, and INT 23 called if detected
  136.     reads from standard input, which may be redirected under DOS 2+
  137.     if the maximum buffer size (see below) is set to 00h, this call returns
  138.       immediately without reading any input
  139. SeeAlso: AH=0Ch,INT 2F/AX=4810h
  140.  
  141. Format of input buffer:
  142. Offset    Size    Description
  143.  00h    BYTE    maximum characters buffer can hold
  144.  01h    BYTE    (input) number of chars from last input which may be recalled
  145.         (return) number of characters actually read, excluding CR
  146.  02h  N BYTEs    actual characters read, including the final carriage return
  147. ----------210A00-----------------------------
  148. INT 21 - WCED v1.6 - INSTALLATION CHECK
  149.     AX = 0A00h
  150.     DS:DX -> 6-byte buffer whose first two bytes must be 00h
  151. Return: buffer offset 02h-05h filled with "Wced" if installed
  152. Note:    WCED is a free command-line editor and history utility by Stuart
  153.       Russell
  154. SeeAlso: AH=FFh"CED"
  155. ----------210B-------------------------------
  156. INT 21 - DOS 1+ - GET STDIN STATUS
  157.     AH = 0Bh
  158. Return: AL = 00h if no character available
  159.        = FFh if character is available
  160. Notes:    ^C/^Break checked, and INT 23 called if pressed
  161.     standard input is always the keyboard under DOS 1.x, but may be
  162.       redirected under DOS 2+
  163.     if the interim console flag is set (see AX=6301h), this function
  164.       returns AL=FFh if a partially-formed double-byte character is
  165.       available
  166. SeeAlso: AH=06h"INPUT",AX=4406h
  167. ----------210B56-----------------------------
  168. INT 21 - VIRUS - "Perfume" - INSTALLATION CHECK
  169.     AX = 0B56h
  170. Return: AX = 4952h if resident
  171. SeeAlso: AX=0D20h
  172. ----------210C-------------------------------
  173. INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
  174.     AH = 0Ch
  175.     AL = STDIN input function to execute after flushing buffer
  176.     other registers as appropriate for the input function
  177. Return: as appropriate for the specified input function
  178. Note:    if AL is not one of 01h,06h,07h,08h, or 0Ah, the buffer is flushed but
  179.       no input is attempted
  180. SeeAlso: AH=01h,AH=06h"INPUT",AH=07h,AH=08h,AH=0Ah
  181. ----------210D-------------------------------
  182. INT 21 - DOS 1+ - DISK RESET
  183.     AH = 0Dh
  184. Notes:    writes all modified disk buffers to disk, but does not update directory
  185.       information (that is only done when files are closed or a SYNC call
  186.       is issued)
  187. SeeAlso: AX=5D01h,INT 13/AH=00h,INT 2F/AX=1120h
  188. ----------210D20-----------------------------
  189. INT 21 - VIRUS - "Crazy Imp" - INSTALLATION CHECK
  190.     AX = 0D20h
  191. Return: AX = 1971h if resident
  192. SeeAlso: AX=0B56h,AH=30h/DX=ABCDh
  193. ----------210E-------------------------------
  194. INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
  195.     AH = 0Eh
  196.     DL = new default drive (00h = A:, 01h = B:, etc)
  197. Return: AL = number of potentially valid drive letters
  198. Notes:    under Novell NetWare, the return value is always 32, the number of
  199.       drives that NetWare supports
  200.     under DOS 3+, the return value is the greatest of 5, the value of
  201.       LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
  202.     on a DOS 1.x/2.x single-floppy system, AL returns 2 since the floppy
  203.       may be accessed as either A: or B:
  204.     otherwise, the return value is the highest drive actually present
  205.     DOS 1.x supports a maximum of 16 drives, 2.x a maximum of 63 drives,
  206.       and 3+ a maximum of 26 drives
  207. SeeAlso: AH=19h,AH=3Bh,AH=DBh
  208. ----------210F-------------------------------
  209. INT 21 - DOS 1+ - OPEN FILE USING FCB
  210.     AH = 0Fh
  211.     DS:DX -> unopened File Control Block (see below)
  212. Return: AL = status
  213.         00h successful
  214.         FFh file not found or access denied
  215. Notes:    (DOS 3.1+) file opened for read/write in compatibility mode
  216.     an unopened FCB has the drive, filename, and extension fields filled
  217.       in and all other bytes cleared
  218.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  219. SeeAlso: AH=10h,AH=16h,AH=3Dh
  220.  
  221. Format of File Control Block:
  222. Offset    Size    Description
  223.  -7    BYTE    extended FCB if FFh
  224.  -6   5 BYTEs    reserved
  225.  -1    BYTE    file attribute if extended FCB
  226.  00h    BYTE    drive number (0 = default, 1 = A, etc)
  227.  01h  8 BYTEs    blank-padded file name 
  228.  09h  3 BYTEs    blank-padded file extension
  229.  0Ch    WORD    current block number
  230.  0Eh    WORD    logical record size
  231.  10h    DWORD    file size
  232.  14h    WORD    date of last write (see AX=5700h)
  233.  16h    WORD    time of last write (see AX=5700h) (DOS 1.1+)
  234.  18h  8 BYTEs    reserved (see below)
  235.  20h    BYTE    record within current block
  236.  21h    DWORD    random access record number (if record size is > 64 bytes, high
  237.         byte is omitted)
  238. Note:    to use an extended FCB, you must specify the address of the FFh flag at
  239.       offset -7, rather than the address of the drive number field
  240.  
  241. Format of reserved field for DOS 1.0:
  242. Offset    Size    Description
  243.  16h    WORD    location in directory (if high byte = FFh, low byte is device
  244.         ID)
  245.  18h    WORD    number of first cluster in file
  246.  1Ah    WORD    current absolute cluster number on disk
  247.  1Ch    WORD    current relative cluster number within file
  248.          (0 = first cluster of file, 1 = second cluster, etc.)
  249.  1Eh    BYTE    dirty flag (00h = not dirty)
  250.  1Fh    BYTE    unused
  251.  
  252. Format of reserved field for DOS 1.10-1.25:
  253. Offset    Size    Description
  254.  18h    BYTE    bit 7: set if logical device
  255.         bit 6: not dirty
  256.         bits 5-0: disk number or logical device ID
  257.  19h    WORD    starting cluster number on disk
  258.  1Bh    WORD    current absolute cluster number on disk
  259.  1Dh    WORD    current relative cluster number within file
  260.  1Fh    BYTE    unused
  261.  
  262. Format of reserved field for DOS 2.x:
  263. Offset    Size    Description
  264.  18h    BYTE    bit 7: set if logical device
  265.         bit 6: set if open???
  266.         bits 5-0: ???
  267.  19h    WORD    starting cluster number on disk
  268.  1Bh    WORD    ???
  269.  1Dh    BYTE    ???
  270.  1Eh    BYTE    ???
  271.  1Fh    BYTE    ???
  272.  
  273. Format of reserved field for DOS 3.x:
  274. Offset    Size    Description
  275.  18h    BYTE    number of system file table entry for file
  276.  19h    BYTE    attributes
  277.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  278.               01 = SHARE.EXE not loaded, character device
  279.               10 = SHARE.EXE loaded, remote file
  280.               11 = SHARE.EXE loaded, local file
  281.         bits 5-0: low six bits of device attribute word
  282. ---SHARE.EXE loaded, local file (DOS 3.x and 5.0)---
  283.  1Ah    WORD    starting cluster of file on disk
  284.  1Ch    WORD    (DOS 3.x) offset within SHARE of sharing record (see AH=52h)
  285.          (DOS 5.0) unique sequence number of sharing record
  286.  1Eh    BYTE    file attribute
  287.  1Fh    BYTE    ???
  288. ---SHARE.EXE loaded, remote file---
  289.  1Ah    WORD    number of sector containing directory entry
  290.  1Ch    WORD    relative cluster within file of last cluster accessed
  291.  1Eh    BYTE    absolute cluster number of last cluster accessed
  292.  1Fh    BYTE    ???
  293. ---SHARE.EXE not loaded---
  294.  1Ah    BYTE    (low byte of device attribute word AND 0Ch) OR open mode
  295.  1Bh    WORD    starting cluster of file
  296.  1Dh    WORD    number of sector containing directory entry
  297.  1Fh    BYTE    number of directory entry within sector
  298. Note:    if FCB opened on character device, DWORD at 1Ah is set to the address
  299.       of the device driver header, then the BYTE at 1Ah is overwritten.
  300. ----------2110-------------------------------
  301. INT 21 - DOS 1+ - CLOSE FILE USING FCB
  302.     AH = 10h
  303.     DS:DX -> File Control Block (see AH=0Fh)
  304. Return: AL = status
  305.         00h successful
  306.         FFh failed
  307. Notes:    a successful close forces all disk buffers used by the file to be
  308.       written and the directory entry to be updated
  309.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  310. SeeAlso: AH=0Fh,AH=16h,AH=3Eh
  311. ----------2111-------------------------------
  312. INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
  313.     AH = 11h
  314.     DS:DX -> unopened FCB (see AH=0Fh), may contain '?' wildcards
  315. Return: AL = status
  316.         00h successful
  317.         [DTA] unopened FCB for first matching file
  318.         FFh no matching filename, or bad FCB
  319. Notes:    the type of the returned FCB depends on whether the input FCB was a
  320.       normal or an extended FCB
  321.     for extended FCBs with search attribute 08h, the volume label (if any)
  322.       will be returned even if the current directory is not the root dir.
  323.     DOS 3+ also allows the '*' wildcard
  324.     the search FCB must not be modified if AH=12h will be used to continue
  325.       searching; DOS 3.3 has set the following parts of the FCB:
  326.          0Ch    BYTE    ???
  327.          0Dh    WORD    directory entry number of matching file
  328.          0Fh    WORD    cluster number of current directory
  329.          11h  4 BYTEs    ???
  330.          15h    BYTE    drive number (1=A:)
  331.     at least for DOS 3.3, the unopened FCB in the DTA is actually the drive
  332.       number followed by the file's directory entry
  333. SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh
  334. ----------2112-------------------------------
  335. INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
  336.     AH = 12h
  337.     DS:DX -> unopened FCB (see AH=0Fh)
  338. Return: AL = status
  339.         00h successful
  340.         [DTA] = unopened FCB
  341.         FFh no more matching filenames
  342. Note:    (see AH=11h)
  343.     assumes that successful FindFirst executed on search FCB before call
  344. SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch
  345. ----------2113-------------------------------
  346. INT 21 - DOS 1+ - DELETE FILE USING FCB
  347.     AH = 13h
  348.     DS:DX -> unopened FCB (see AH=0Fh), filename filled with template for
  349.         deletion ('?' wildcards allowed)
  350. Return: AL = status
  351.         00h one or more files successfully deleted
  352.         FFh no matching files or all were read-only or locked
  353. Notes:    DOS 1.25+ deletes everything in the current directory (including
  354.       subdirectories) and sets the first byte of the name to 00h (entry
  355.       never used) instead of E5h if called on an extended FCB with
  356.       filename '???????????' and bits 0-4 of the attribute set (bits 1 and
  357.       2 for DOS 1.x).  This may have originally been an optimization to
  358.       minimize directory searching after a mass deletion (DOS 1.25+ stop
  359.       the directory search upon encountering a never-used entry), but can
  360.       corrupt the filesystem under DOS 2+ because subdirectories are
  361.       removed without deleting the files they contain.
  362.     currently-open files should not be deleted
  363. SeeAlso: AH=41h,INT 2F/AX=1113h
  364. ----------2114-------------------------------
  365. INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
  366.     AH = 14h
  367.     DS:DX -> opened FCB (see AH=0Fh)
  368. Return: AL = status
  369.         00h successful
  370.         01h end of file (no data)
  371.         02h segment wrap in DTA
  372.         03h end of file, partial record read
  373.     [DTA] = record read from file
  374. Notes:    reads a record of the size specified in the FCB beginning at the
  375.       current file position, then updates the current block and current
  376.       record fields in the FCB
  377.     if a partial record was read, it is zero-padded to the full size
  378.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  379. SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh,INT 2F/AX=1108h
  380. ----------2115-------------------------------
  381. INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
  382.     AH = 15h
  383.     DS:DX -> opened FCB (see AH=0Fh)
  384.     [DTA] = record to write
  385. Return: AL = status
  386.         00h successful
  387.         01h disk full
  388.         02h segment wrap in DTA
  389. Notes:    writes a record of the size specified in the FCB beginning at the
  390.       current file position, then updates the current block and current
  391.       record fields in the FCB
  392.     if less than a full sector is written, the data is placed in a DOS
  393.       buffer to be written out at a later time
  394.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  395. SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h
  396. ----------2116-------------------------------
  397. INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
  398.     AH = 16h
  399.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  400. Return: AL = status
  401.         00h successful
  402.         FFh directory full or file exists and is read-only or locked
  403. Notes:    if file already exists, it is truncated to zero length
  404.     if an extended FCB is used, the file is given the attribute in the
  405.       FCB
  406.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  407. SeeAlso: AH=0Fh,AH=10h,AH=3Ch
  408. ----------2117-------------------------------
  409. INT 21 - DOS 1+ - RENAME FILE USING FCB
  410.     AH = 17h
  411.     DS:DX -> modified FCB (see also AH=0Fh)
  412.         the old filename ('?' wildcards OK) is in the standard location
  413.         while the new filename ('?' wildcards OK) is stored in the 11
  414.         bytes beginning at offset 11h
  415. Return:    AL = status
  416.         00h successfully renamed
  417.         FFh no matching files,file is read-only, or new name already exists
  418. Note:    subdirectories may be renamed using an extended FCB with the
  419.       appropriate attribute
  420. SeeAlso: AH=0Fh,AH=13h,AH=56h,INT 2F/AX=1111h
  421. ----------2118-------------------------------
  422. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  423.     AH = 18h
  424. Return: AL = 00h
  425. Note:    corresponds to the CP/M BDOS function "get bit map of logged drives",
  426.       which is meaningless under MSDOS
  427. SeeAlso: AH=1Dh,AH=1Eh,AH=20h,AX=4459h
  428. ----------2119-------------------------------
  429. INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
  430.     AH = 19h
  431. Return: AL = drive (00h = A:, 01h = B:, etc)
  432. SeeAlo: AH=0Eh,AH=47h
  433. ----------211A-------------------------------
  434. INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
  435.     AH = 1Ah
  436.     DS:DX -> Disk Transfer Area (DTA)
  437. Notes:    the DTA is set to PSP:0080h when a program is started
  438.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  439. SeeAlso: AH=11h,AH=12h,AH=2Fh,AH=4Eh,AH=4Fh
  440. ----------211B-------------------------------
  441. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
  442.     AH = 1Bh
  443. Return: AL = sectors per cluster (allocation unit)
  444.     CX = bytes per sector
  445.     DX = total number of clusters
  446.     DS:BX -> media ID byte (see below)
  447. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  448.       versions return a pointer to a copy of the FAT's ID byte
  449. SeeAlso: AH=1Ch,AH=36h
  450.  
  451. Values for media ID byte:
  452.  FFh    floppy, double-sided, 8 sectors per track (320K)
  453.  FEh    floppy, single-sided, 8 sectors per track (160K)
  454.  FDh    floppy, double-sided, 9 sectors per track (360K)
  455.  FCh    floppy, single-sided, 9 sectors per track (180K)
  456.  F9h    floppy, double-sided, 15 sectors per track (1.2M)
  457.  F8h    hard disk
  458.  F0h    other
  459. ----------211C-------------------------------
  460. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
  461.     AH = 1Ch
  462.     DL = drive (00h = default, 01h = A:, etc)
  463. Return: AL = sectors per cluster (allocation unit)
  464.     CX = bytes per sector
  465.     DX = total number of clusters
  466.     DS:BX -> media ID byte (see AH=1Bh)
  467. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  468.       versions return a pointer to a copy of the FAT's ID byte
  469. SeeAlso: AH=1Bh,AH=36h
  470. ----------211D-------------------------------
  471. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  472.     AH = 1Dh
  473. Return: AL = 00h
  474. Note:    corresponds to the CP/M BDOS function "get bit map of read-only
  475.       drives", which is meaningless under MSDOS
  476. SeeAlso: AH=18h,AH=1Eh,AH=20h,AX=4459h
  477. ----------211E-------------------------------
  478. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  479.     AH = 1Eh
  480. Return: AL = 00h
  481. Note:    corresponds to the CP/M BDOS function "set file attributes" which was
  482.      meaningless under MSDOS 1.x
  483. SeeAlso: AH=18h,AH=1Dh,AH=20h
  484. ----------211F-------------------------------
  485. INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
  486.     AH = 1Fh
  487. Return: AL = status
  488.         00h successful
  489.         DS:BX -> Drive Parameter Block (DPB) (see below for DOS 1.x,
  490.             AH=32h for DOS 2+)
  491.         FFh invalid drive
  492. Note:    this call was undocumented prior to the release of DOS 5.0; however,
  493.       only the DOS 4+ version of the DPB has been documented
  494. SeeAlso: AH=32h
  495.  
  496. Format of DOS 1.1 and MSDOS 1.25 drive parameter block:
  497. Offset    Size    Description
  498.  00h    BYTE    sequential device ID
  499.  01h    BYTE    logical drive number (0=A:)
  500.  02h    WORD    bytes per sector
  501.  04h    BYTE    highest sector number within a cluster
  502.  05h    BYTE    shift count to convert clusters into sectors
  503.  06h    WORD    starting sector number of first FAT
  504.  08h    BYTE    number of copies of FAT
  505.  09h    WORD    number of directory entries
  506.  0Bh    WORD    number of first data sector
  507.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  508.  0Fh    BYTE    sectors per FAT
  509.  10h    WORD    starting sector of directory
  510.  12h    WORD    address of allocation table
  511. Note:    the DOS 1.0 table is the same except that the first and last fields
  512.       are missing; see INT 21/AH=32h for the DOS 2+ version
  513. ----------2120-------------------------------
  514. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  515.     AH = 20h
  516. Return: AL = 00h
  517. Note:    corresponds to the CP/M BDOS function "get/set default user
  518.       (sublibrary) number", which is meaningless under MSDOS
  519. SeeAlso: AH=18h,AH=1Dh,AH=1Eh,AX=4459h
  520. ----------2121-------------------------------
  521. INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
  522.     AH = 21h
  523.     DS:DX -> opened FCB (see AH=0Fh)
  524. Return: AL = status
  525.         00h successful    
  526.         01h end of file, no data read
  527.         02h segment wrap in DTA, no data read
  528.         03h end of file, partial record read
  529.     [DTA] = record read from file
  530. Notes:    the record is read from the current file position as specified by the
  531.       random record and record size fields of the FCB
  532.     the file position is not updated after reading the record
  533.     if a partial record is read, it is zero-padded to the full size
  534.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  535. SeeAlso: AH=14h,AH=22h,AH=27h,AH=3Fh
  536. ----------2122-------------------------------
  537. INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
  538.     AH = 22h
  539.     DS:DX -> opened FCB (see AH=0Fh)
  540.     [DTA] = record to write
  541. Return: AL = status
  542.         00h successful
  543.         01h disk full
  544.         02h segment wrap in DTA
  545. Notes:    the record is written to the current file position as specified by the
  546.       random record and record size fields of the FCB
  547.     the file position is not updated after writing the record
  548.     if the record is located beyond the end of the file, the file is
  549.       extended but the intervening data remains uninitialized
  550.     if the record only partially fills a disk sector, it is copied to a
  551.       DOS disk buffer to be written out to disk at a later time
  552.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  553. SeeAlso: AH=15h,AH=21h,AH=28h,AH=40h
  554. ----------2123-------------------------------
  555. INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
  556.     AH = 23h
  557.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  558. Return: AL = status
  559.         00h successful (matching file found)
  560.         FCB random record field filled with size in records, rounded up
  561.         to next full record
  562.         FFh failed (no matching file found)
  563. Note:    not supported by MS Windows 3.0 DOSX.EXE DOS extender
  564. SeeAlso: AH=42h
  565. ----------2124-------------------------------
  566. INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
  567.     AH = 24h
  568.     DS:DX -> opened FCB (see AH=0Fh)
  569. Notes:    computes the random record number corresponding to the current record
  570.       number and record size, then stores the result in the FCB
  571.     normally used when switching from sequential to random access
  572.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  573. SeeAlso: AH=21h,AH=27h,AH=42h
  574. ----------2125-------------------------------
  575. INT 21 - DOS 1+ - SET INTERRUPT VECTOR
  576.     AH = 25h
  577.     AL = interrupt number
  578.     DS:DX -> new interrupt handler
  579. Notes:    this function is preferred over direct modification of the interrupt
  580.       vector table
  581.     some DOS extenders place an API on this function, as it is not
  582.       directly meaningful in protected mode
  583. SeeAlso: AX=2501h,AH=35h
  584. ----------212501-----------------------------
  585. INT 21 P - Phar Lap 386/DOS-Extender - RESET DOS EXTENDER DATA STRUCTURES 
  586.     AX = 2501h
  587.     SS = application's original SS or DS (FlashTek X-32VM)
  588. Return: CF clear if successful
  589.     CF set on error
  590.         caller is operating on X-32 stack (FlashTek X-32VM)
  591. Notes:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  592.       system calls.     Only available when directly using 386/DOS-Extender or
  593.       a compatible DOS extender, or when using a product that was created
  594.       using 386-DOS/Extender or a compatible
  595.     this function is also supported by FlashTek X-32VM
  596. SeeAlso: AH=30h"Phar Lap"
  597. ----------212502-----------------------------
  598. INT 21 - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  599.     AX = 2502h
  600.     CL = interrupt number
  601. Return:    CF clear
  602.     ES:EBX = CS:EIP of protected-mode interrupt handler
  603. Note:    this function is also supported by FlashTek X-32VM
  604. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0204h
  605. ----------212503-----------------------------
  606. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  607.     AX = 2503h
  608.     CL = interrupt number
  609. Return: CF clear
  610.     EBX = CS:IP of real-mode interrupt handler
  611. Note:    this function is also supported by FlashTek X-32VM
  612. SeeAlso: AX=2502h,AX=2504h,AH=35h,INT 31/AX=0200h
  613. ----------212504-----------------------------
  614. INT 21 - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  615.     AX = 2504h
  616.     CL = interrupt number
  617.     DS:EDX = CS:EIP of protected-mode interrupt handler
  618. Return: CF clear
  619. Note:    this function is also supported by FlashTek X-32VM
  620. SeeAlso: AX=2502h,AX=2505h,INT 31/AX=0205h
  621. ----------212505-----------------------------
  622. INT 21 - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  623.     AX = 2505h
  624.     CL = interrupt number
  625.     EBX = CS:IP of real-mode interrupt handler
  626. Return: CF clear
  627. Note:    this function is also supported by FlashTek X-32VM
  628. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0201h
  629. ----------212506-----------------------------
  630. INT 21 - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CONTRL IN PROT MODE
  631.     AX = 2506h
  632.     CL = interrupt number
  633.     DS:EDX = CS:EIP of protected-mode interrupt handler
  634. Return: CF clear
  635. Notes:    this function modifies both the real-mode low-memory interrupt
  636.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  637.     interrupts occurring in real mode are resignaled in protected mode
  638.     this function is also supported by FlashTek X-32VM
  639. ----------212507-----------------------------
  640. INT 21 - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  641.     AX = 2507h
  642.     CL = interrupt numbern
  643.     DS:EDX = CS:EIP of protected-mode interrupt handler
  644.     EBX = CS:IP of real-mode interrupt handler
  645. Return: CF clear
  646. Notes:    interrupts are disabled until both vectors have been modified
  647.     this function is also supported by FlashTek X-32VM
  648. SeeAlso: AX=2504h,AX=2505h
  649. ----------212508-----------------------------
  650. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  651.     AX = 2508h
  652.     BX = segment selector
  653. Return: CF clear if successful
  654.         ECX = linear base address of segment
  655.     CF set if invalid segment selector
  656. Note:    this function is also supported by FlashTek X-32VM
  657. SeeAlso: AX=2509h
  658. ----------212509-----------------------------
  659. INT 21 - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  660.     AX = 2509h
  661.     EBX = linear address to convert
  662. Return: CF clear if successful
  663.         ECX = physical address (carry flag clear)
  664.     CF set if linear address not mapped in page tables
  665. SeeAlso: AX=2508h
  666. ----------212509-----------------------------
  667. INT 21 - FlashTek X-32VM - GET SYSTEM SEGMENTS AND SELECTORS
  668.     AX = 2509h
  669. Return: CF clear
  670.     EAX high word = default DS
  671.     AX = alias for 16-bit data segment
  672.     BX = real mode code segment
  673.     EDX high word = selector covering full 4GB address space
  674.     DX = default SS
  675.     ESI high word = PSP selector
  676.     SI = environment selector
  677. ----------21250A-----------------------------
  678. INT 21 - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  679.     AX = 250Ah
  680.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  681.          to modify
  682.     EBX = physical base address of memory to map (multiple of 4K)
  683.     ECX = number of physical 4K pages to map
  684. Return: CF clear if successful
  685.         EAX = 32-bit offset in segment of mapped memory
  686.     CF set on error
  687.         EAX = error code
  688.         08h insufficient memory to create page tables
  689.         09h invalid segment selector
  690. SeeAlso: INT 31/AX=0800h
  691. ----------21250C-----------------------------
  692. INT 21 - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  693.     AX = 250Ch
  694. Return: CF clear
  695.     AL = base interrupt vector for IRQ0-IRQ7
  696.     AH = base interrupt vector for IRQ8-IRQ15
  697.     BL = interrupt vector for BIOS print screen function (Phar Lap only)
  698. Note:    this function is also supported by FlashTek X-32VM
  699. SeeAlso: INT 31/AX=0400h,INT 67/AX=DE0Ah
  700. ----------21250D-----------------------------
  701. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  702.     AX = 250Dh
  703. Return: CF clear
  704.     EAX = CS:IP of real-mode callback procedure that will call through
  705.         from real mode to a protected-mode routine
  706.     EBX = 32-bit real-mode address of intermode call data buffer
  707.     ECX = size in bytes of intermode call data buffer
  708.     ES:EDX = protected-mode address of intermode call data buffer
  709. Notes:    this function is also supported by FlashTek X-32VM
  710.     X-32VM guarantees the intermode buffer to be at least 4 KB
  711. SeeAlso: AX=250Eh
  712.  
  713. Call real-mode callback with:
  714.     STACK:    DWORD    offset to protected-mode code
  715.         WORD    placeholder for protected-mode CS
  716.         DWORD    pointer to selector structure (see below)
  717.             or 0000h:0000h for defaults
  718.         var    parameters for protected-mode procedure
  719. Return: via FAR return
  720.  
  721. Format of selector structure:
  722. Offset    Size    Description
  723.  00h    WORD    protected-mode GS selector
  724.  02h    WORD    protected-mode FS selector
  725.  04h    WORD    protected-mode ES selector
  726.  06h    WORD    protected-mode DS selector
  727. ----------21250E-----------------------------
  728. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  729.     AX = 250Eh
  730.     EBX = CS:IP of real-mode procedure to call
  731.     ECX = number of two-byte words to copy from protected-mode stack
  732.           to real-mode stack
  733. Return: CF clear if successful
  734.         all segment registers unchanged
  735.         all general registers contain values set by real-mode procedure
  736.         all other flags set as they were left by real-mode procedure
  737.         stack unchanged
  738.     CF set on error
  739.         EAX = error code
  740.         01h not enough real-mode stack space
  741. Note:    this function is also supported by FlashTek X-32VM; under X-32VM, the
  742.       call will fail if ECX > 0000003Fh
  743. SeeAlso: AX=250Dh,AX=2510h,AH=E1h"OS/286",INT 31/AX=0301h
  744. ----------21250F-----------------------------
  745. INT 21 - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  746.     AX = 250Fh
  747.     ES:EBX = 48-bit protected-mode address to convert
  748. Return: CF clear if successful (address < 1MB)
  749.         ECX = 32-bit real-mode MS-DOS address
  750.     CF set on error (address >= 1MB)
  751.         ECX = linear address
  752. Note:    this function is also supported by FlashTek X-32VM
  753. SeeAlso: AX=2510h
  754. ----------212510-----------------------------
  755. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  756.     AX = 2510h
  757.     EBX = CS:IP of real-mode procedure to call
  758.     ECX = number of two-byte words to copy to protected-mode stack to
  759.           real-mode stack
  760.     DS:EDX -> pointer to parameter block (see below)
  761. Return: CF clear if successful
  762.         all segment registers unchanged,
  763.         EDX unchanged
  764.         all other general registers contain values set by real-mode proc
  765.         all other flags are set as they were left by real-mode procedure
  766.         real-mode register values are returned in the parameter block
  767.     CF set on error
  768.         EAX = error code
  769.         01h not enough real-mode stack space
  770. Note:    unlike most of the preceding 25xxh functions, this one is not
  771.       supported by FlashTek X-32VM
  772. SeeAlso: AX=250Eh,AX=250Fh
  773.  
  774. Format of parameter block:
  775. Offset    Size    Description
  776.  00h    WORD    real-mode DS value
  777.  02h    WORD    real-mode ES value
  778.  04h    WORD    real-mode FS value
  779.  06h    WORD    real-mode GS value
  780.  08h    DWORD    real-mode EAX value
  781.  0Ch    DWORD    real-mode EBX value
  782.  10h    DWORD    real-mode ECX value
  783.  14h    DWORD    real-mode EDX value
  784. ----------212511-----------------------------
  785. INT 21 - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  786.     AX = 2511h
  787.     DS:EDX -> parameter block (see below)
  788. Return: all segment registers unchanged
  789.     EDX unchanged
  790.     all other registers contain values set by the real-mode int handler
  791.     the flags are set as they were left by the real-mode interrupt handler
  792.     real-mode register values are returned in the parameter block
  793. Note:    this function is also supported by FlashTek X-32VM
  794. SeeAlso: AX=2503h,AX=2505h,AX=250Eh,AH=E3h"OS/286",INT 31/AX=0300h
  795.  
  796. Format of parameter block:
  797. Offset    Size    Description
  798.  00h    WORD    interrupt number
  799.  02h    WORD    real-mode DS value
  800.  04h    WORD    real-mode ES value
  801.  06h    WORD    real-mode FS value
  802.  08h    WORD    real-mode GS value
  803.  0Ah    DWORD    real-mode EAX value
  804.  0Eh    DWORD    real-mode EDX value
  805. Note: all other real-mode values set from protected-mode registers
  806. ----------212512-----------------------------
  807. INT 21 - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  808.     AX = 2512h
  809.     DS:EDX -> pointer to ASCIIZ program name
  810.     ES:EBX -> pointer to parameter block (see below)
  811.     ECX = size in bytes of LDT buffer
  812. Return: CF clear if successful
  813.         EAX = number of segment descriptors in LDT
  814.     CF set on error
  815.         EAX = error code
  816.         02h file not found or path invalid
  817.         05h access denied
  818.         08h insufficient memory
  819.         0Ah environment invalid
  820.         0Bh invalid file format
  821.         80h LDT too small
  822.  
  823. Format of parameter block:
  824. Offset    Size    Description
  825. Input:
  826.  00h    DWORD    32-bit offset of environment string
  827.  04h    WORD    segment of environment string
  828.  06h    DWORD    32-bit offset of command-tail string
  829.  0Ah    WORD    segment of command-tail string
  830.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  831.  10h    WORD    segment of LDT buffer
  832. Output:
  833.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  834.  14h    WORD    real/protected mode flag
  835.         0000h  real mode
  836.         0001h  protected mode
  837.  16h    DWORD    initial EIP value
  838.  1Ah    WORD    initial CS value
  839.  1Ch    DWORD    initial ESP value
  840.  20h    WORD    initial SS value
  841.  22h    WORD    initial DS value
  842.  24h    WORD    initial ES value
  843.  26h    WORD    initial FS value
  844.  28h    WORD    initial GS value
  845. ----------212513-----------------------------
  846. INT 21 - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  847.     AX = 2513h
  848.     BX = segment selector of descriptor in GDT or LDT
  849.     CL = access-rights byte for alias descriptor
  850.     CH = use-type bit (USE16 or USE32) for alias descriptor
  851. Return: CF clear if successful
  852.         AX = segment selector for created alias
  853.     CF set on error
  854.         EAX = error code
  855.         08h insufficient memory (can't grow LDT)
  856.         09h invalid segment selector in BX
  857. ----------212514-----------------------------
  858. INT 21 - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  859.     AX = 2514h
  860.     BX = segment selector of descriptor in GDT or LDT
  861.     CL = new access-rights byte 
  862.     CH = new use-type bit (USE16 or USE32)
  863. Return: CF clear if successful
  864.     CF set on error
  865.         EAX = error code
  866.         09h invalid selector in BX
  867. SeeAlso: AX=2515h,INT 31/AX=0009h
  868. ----------212515-----------------------------
  869. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  870.     AX = 2515h
  871.     BX = segment selector of descriptor in GDT or LDT
  872. Return: CF clear if successful
  873.         CL = access-rights byte for segment
  874.         CH = use-type bit (USE16 or USE32)
  875.     ECX<16-31> destroyed
  876.     CF set on error
  877.         EAX = error code
  878.         09h invalid segment selector in BX
  879. SeeAlso: AX=2514h
  880. ----------212516-----------------------------
  881. INT 21 - Phar Lap 386/DOS-Extender - FREE ALL MEMORY OWNED BY LDT
  882.     AX = 2516h
  883.     ???
  884. Return: ???
  885. ----------212517-----------------------------
  886. INT 21 - Phar Lap 386/DOS-Extender - GET INFO ON DOS DATA BUFFER
  887.     AX = 2517h
  888.     ???
  889. Return: ???
  890. ----------212518-----------------------------
  891. INT 21 - Phar Lap 386/DOS-Extender - SPECIFY HANDLER FOR MOVED SEGMENTS
  892.     AX = 2518h
  893.     ???
  894. Return: ???
  895. ----------212519-----------------------------
  896. INT 21 - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  897.     AX = 2519h
  898. Return: CF clear
  899.     EAX = error code
  900.         0000h  no error
  901.         0001h  out of physical memory
  902.         0002h  out of swap space (unable to grow swap file)
  903.         0003h  out of LDT entries and unable to grow LDT
  904.         0004h  unable to change extended memory allocation mark
  905.         FFFFFFFFh    paging disabled
  906. Note:    VMM is the Virtual Memory Manager option
  907. ----------21251A-----------------------------
  908. INT 21 - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  909.     AX = 251Ah
  910.     EDX = number of 4k pages to lock
  911.     if BL = 00h
  912.         ECX = linear address of first page to lock
  913.     if BL = 01h
  914.         ES:ECX -> pointer to first page to lock
  915. Return: CF clear if successful
  916.     CF set on error
  917.         EAX = error code
  918.         08h insufficient memory
  919.         09h invalid address range
  920. SeeAlso: AX=251Bh,AX=EB06h,INT 31/AX=0600h
  921. ----------21251B-----------------------------
  922. INT 21 - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  923.     AX = 251Bh
  924.     EDX = number of pages to unlock
  925.     if BL = 00h
  926.         ECX = linear address of first page to unlock
  927.     if BL = 01h
  928.         ES:ECX -> pointer to first page to unlock
  929. Return: CF clear if successful
  930.     CF set on error
  931.         EAX = error code
  932.         09h invalid address range
  933. SeeAlso: AX=251Ah,AX=EB07h,INT 31/AX=0601h
  934. ----------21251D-----------------------------
  935. INT 21 - Phar Lap 386/DOS-Extender VMM - READ PAGE-TABLE ENTRY
  936.     AX = 251Dh
  937.     ???
  938. Return: ???
  939. SeeAlso: AX=251Eh,AX=EB00h,INT 31/AX=0506h
  940. ----------21251E-----------------------------
  941. INT 21 - Phar Lap 386/DOS-Extender VMM - WRITE PAGE-TABLE ENTRY
  942.     AX = 251Eh
  943.     ???
  944. Return: ???
  945. SeeAlso: AX=251Dh,INT 31/AX=0507h
  946. ----------21251F-----------------------------
  947. INT 21 - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  948.     AX = 251Fh
  949.     ???
  950. Return: ???
  951. SeeAlso: AX=251Dh,AX=251Eh
  952. ----------212520-----------------------------
  953. INT 21 - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  954.     AX = 2520h
  955.     DS:EDX -> pointer to buffer at least 100 bytes in size (see below)
  956.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  957. Return: carry flag clear    
  958.  
  959. Format of VM stats buffer:
  960. Offset    Size    Description
  961.  00h    DWORD    VM status
  962.         0001h VM subsystem is present
  963.         0000h VM not present
  964.  04h    DWORD    "nconvpg" number of conventional memory pages available
  965.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  966.  0Ch    DWORD    "nextpg" total number of extended memory pages
  967.  10h    DWORD    "extlim" extender memory pages limit
  968.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  969.  18h    DWORD    "alockpg" number of locked pages owned by application
  970.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  971.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  972.  24h    DWORD    linear address of beginning of application address space
  973.  28h    DWORD    linear address of end of application address space
  974.  2Ch    DWORD    number of seconds since last time VM stats were reset
  975.  30h    DWORD    number of page faults since last time
  976.  34h    DWORD    number of pages written to swap file since last time
  977.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  978.  3Ch    DWORD    number of virtual pages allocated to the application
  979.  40h    DWORD    size in pages of swap file
  980.  44h    DWORD    number of system pages allocated with EMS calls
  981.  48h    DWORD    minimum number of conventional memory pages
  982.  4Ch    DWORD    maximum size in bytes to which swap file can be increased
  983.  50h    DWORD    "vmflags" bit 0 = 1 if page fault in progress
  984.  54h 16 BYTEs    reserved for future expansion (set to zero)
  985. ----------212521-----------------------------
  986. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEMORY USAGE
  987.     AX = 2521h
  988.     EBX = max 4k pages of physical extended memory which program may use
  989. Return: CF clear if successful
  990.        EBX = maximum limit in pages
  991.        ECX = minimum limit in pages
  992.     CF set on error
  993.         EAX = error code
  994.         08h insufficient memory or -nopage switch used
  995. SeeAlso: AX=2522h
  996. ----------212522-----------------------------
  997. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY ALTERNATE PAGE-FAULT HANDLER
  998.     AX = 2522h
  999.     ???
  1000. Return: ???
  1001. SeeAlso: AX=2523h
  1002. ----------212523-----------------------------
  1003. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  1004.     AX = 2523h
  1005.     ???
  1006. Return: ???
  1007. SeeAlso: AX=2522h
  1008. ----------212524-----------------------------
  1009. INT 21 - Phar Lap 386/DOS-Extender VMM - INSTALL PAGE-REPLACEMENT HANDLERS
  1010.     AX = 2524h
  1011.     ???
  1012. Return: ???
  1013. ----------212525-----------------------------
  1014. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENTIONAL MEM USAGE
  1015.     AX = 2525h
  1016.     EBX = limit in 4k pages of physical conventional memory which program 
  1017.           may use
  1018. Return: CF clear if successful
  1019.         EBX = maximum limit in pages
  1020.         ECX = minimum limit in pages
  1021.     CF set on error
  1022.         EAX = error code
  1023.         08h insufficient memory or -nopage switch used
  1024. SeeAlso: AX=2521h
  1025. ----------212526-----------------------------
  1026. INT 21 - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  1027.     AX = 2526h
  1028.     ???
  1029. Return: ???
  1030. ----------21252B-----------------------------
  1031. INT 21 - FlashTek X-32VM - VIRTUAL MEMORY MANAGEMENT - PAGE LOCKING
  1032.     AX = 252Bh
  1033.     BH = function
  1034.         05h lock pages
  1035.         06h unlock pages
  1036.     BL = address type
  1037.         00h linear address
  1038.             ECX = linear start address of memory region
  1039.         01h segmented address
  1040.             ES:ECX -> start of memory region
  1041.     EDX = size of memory region in bytes
  1042. Return: CF clear if successful
  1043.     CF set on error
  1044. Note:    if X-32 is not using virtual memory, this function always succeeds
  1045. ----------212532-----------------------------
  1046. INT 21 - FlashTek X-32VM - GET EXCEPTION HANDLER VECTOR
  1047.     AX = 2532h
  1048.     CL = exception number (00h-0Fh)
  1049. Return: CF clear if successful
  1050.         ES:EBX = CS:EIP of current exception handler
  1051.     CF set on error (CL > 0Fh)
  1052. SeeAlso: AX=2533h
  1053. ----------212533-----------------------------
  1054. INT 21 - FlashTek X-32VM - SET EXCEPTION HANDLER VECTOR
  1055.     AX = 2533h
  1056.     CL = exception number (00h-0Fh)
  1057.     DS:EDX = CS:EIP of new exception handler
  1058. Return: CF clear if successful
  1059.     CF set on error (CL > 0Fh)
  1060. SeeAlso: AX=2532h
  1061. ----------2125C0-----------------------------
  1062. INT 21 - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  1063.     AX = 25C0h
  1064.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  1065. Return: CF clear if successful
  1066.         AX = real-mode paragraph address of memory
  1067.     CF set on error
  1068.         AX = error code
  1069.         07h MS-DOS memory control blocks destroyed
  1070.         08h insufficient memory
  1071.         BX = size in paragraphs of largest available memory block
  1072. SeeAlso: AX=25C1h,AX=25C2h
  1073. ----------2125C1-----------------------------
  1074. INT 21 - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  1075.     AX = 25C1h
  1076.     CX = real-mode paragraph address of memory block to free
  1077. Return: CF clear if successful
  1078.         EAX destroyed
  1079.     CF set on error
  1080.         AX = error code
  1081.         07h MS-DOS memory control blocks destroyed
  1082.         09h invalid memory block address in CX
  1083. SeeAlso: AX=25C0h,AX=25C2h
  1084. ----------2125C2-----------------------------
  1085. INT 21 - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  1086.     AX = 25C2h
  1087.     BX = new requested block size in paragraphs
  1088.     CX = real-mode paragraph address of memory block to modify
  1089. Return: CF clear if successful
  1090.         EAX destroyed
  1091.     CF set on error
  1092.         AX = error code
  1093.         07h MS-DOS memory control blocks destroyed
  1094.         08h insufficient memory
  1095.         09h invalid memory block address in CX
  1096.         BX = size in paragraphs of largest available memory block
  1097. SeeAlso: AX=25C0h,AX=25C1h
  1098. ----------2125C3-----------------------------
  1099. INT 21 - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  1100.     AX = 25C3h
  1101.     ES:EBX -> pointer to parameter block (see below)
  1102.     DS:EDX -> pointer to ASCIIZ program filename
  1103. Return: CF clear if successful
  1104.         all registers unchanged
  1105.     CF set on error
  1106.         EAX = error code
  1107.         01h function code in AL is invalid ???
  1108.         02h file not found or path invalid
  1109.         05h access denied
  1110.         08h insufficient memory to load program
  1111.         0Ah environment invalid
  1112.         0Bh invalid file format
  1113.  
  1114. Format of parameter block:
  1115. Offset    Size    Description
  1116.  00h    DWORD    32-bit offset of environment string
  1117.  04h    WORD    segment selector of environment string
  1118.  06h    DWORD    32-bit offset of command-tail string
  1119.  0Ah    WORD    segment selector of command-tail string
  1120. ----------2126-------------------------------
  1121. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  1122.     AH = 26h
  1123.     DX = segment at which to create PSP (see below)
  1124. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1125.       taken from interrupt vector table
  1126.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  1127.       copy
  1128. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  1129.  
  1130. Format of PSP:
  1131. Offset    Size    Description
  1132.  00h  2 BYTEs    INT 20 instruction for CP/M CALL 0 program termination
  1133.          the CDh 20h here is often used as a signature for a valid PSP
  1134.  02h    WORD    segment of first byte beyond memory allocated to program
  1135.  04h    BYTE    unused filler
  1136.  05h    BYTE    CP/M CALL 5 service request (FAR JMP to 000C0h)
  1137.         BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  1138.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  1139.  08h  2 BYTEs    remainder of FAR JMP at 05h
  1140.  0Ah    DWORD    stored INT 22 termination address
  1141.  0Eh    DWORD    stored INT 23 control-Break handler address
  1142.  12h    DWORD    DOS 1.1+ stored INT 24 critical error handler address
  1143.  16h    WORD    segment of parent PSP
  1144.  18h 20 BYTEs    DOS 2+ Job File Table, one byte per file handle, FFh = closed
  1145.  2Ch    WORD    DOS 2+ segment of environment for process
  1146.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  1147.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  1148.  34h    DWORD    DOS 3+ pointer to JFT (default PSP:0018h)
  1149.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  1150.         used by SHARE in DOS 3.3
  1151.  3Ch  4 BYTEs    unused by DOS versions <= 5.00
  1152.          reportedly used by Novell NetWare shell 3.x
  1153.  40h  2 BYTEs    DOS 5.0 version to return on INT 21/AH=30h
  1154.  42h  6 BYTEs    unused by DOS versions <= 5.00
  1155.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  1156.  49h  7 BYTEs    unused by DOS versions <= 5.00
  1157.  50h  3 BYTEs    DOS 2+ service request (INT 21/RETF instructions)
  1158.  53h  9 BYTEs    unused in DOS versions <= 5.00
  1159.  5Ch 16 BYTEs    first default FCB, filled in from first commandline argument
  1160.         overwrites second FCB if opened
  1161.  6Ch 16 BYTEs    second default FCB, filled in from second commandline argument
  1162.         overwrites beginning of commandline if opened
  1163.  7Ch  4 BYTEs    unused
  1164.  80h 128 BYTEs    commandline / default DTA
  1165.         command tail is BYTE for length of tail, N BYTEs for the tail,
  1166.         followed by a BYTE containing 0Dh
  1167. Notes:    in DOS versions 3.0 and up, the limit on simultaneously open files may
  1168.       be increased by allocating memory for a new open file table, filling
  1169.       it with FFh, copying the first 20 bytes from the default table, and
  1170.       adjusting the pointer and count at 34h and 32h.  However, DOS
  1171.       versions through  at least 3.30 will only copy the first 20 file
  1172.       handles into a child PSP (including the one created on EXEC).
  1173.     network redirectors based on the original MS-Net implementation use
  1174.       values of 80h-FEh in the open file table to indicate remote files;
  1175.       Novell NetWare reportedly also uses values of 80h-FEh
  1176.     MSDOS 5.00 incorrectly fills the FCB fields when loading a program
  1177.       high; the first FCB is empty and the second contains the first
  1178.       parameter
  1179.     some DOS extenders place protected-mode values in various PSP fields
  1180.       such as the "parent" field, which can confuse PSP walkers.  Always
  1181.       check either for the CDh 20h signature or that the suspected PSP is
  1182.       at the beginning of a memory block which owns itself (the preceding
  1183.       paragraph should be a valid MCB with "owner" the same as the
  1184.       suspected PSP).
  1185.  
  1186. Format of environment block:
  1187. Offset    Size    Description
  1188.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  1189.       N BYTEs    second environment variable, ASCIZ string
  1190.     ...
  1191.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  1192.     BYTE    00h
  1193. ---DOS 3+---
  1194.     WORD    number of strings following environment (normally 1)
  1195.       N BYTEs    ASCIZ full pathname of program owning this environment
  1196.         other strings may follow
  1197. ----------2127-------------------------------
  1198. INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
  1199.     AH = 27h
  1200.     CX = number of records to read
  1201.     DS:DX -> opened FCB (see AH=0Fh)
  1202. Return: AL = status
  1203.         00h successful, all records read
  1204.         01h end of file, no data read
  1205.         02h segment wrap in DTA, no data read
  1206.         03h end of file, partial read
  1207.     [DTA] = records read from file
  1208.     CX = number of records read (return AL = 00h or 03h)
  1209. Notes:    read begins at current file position as specified in FCB; the file
  1210.       position is updated after reading
  1211.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1212. SeeAlso: AH=21h,AH=28h,AH=3Fh
  1213. ----------2128-------------------------------
  1214. INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
  1215.     AH = 28h
  1216.     CX = number of records to write
  1217.     DS:DX -> opened FCB (see AH=0Fh)
  1218.     [DTA] = records to write
  1219. Return: AL = status
  1220.         00h successful
  1221.         01h disk full or file read-only
  1222.         02h segment wrap in DTA
  1223.     CX = number of records written
  1224. Notes:    write begins at current file position as specified in FCB; the file
  1225.       position is updated after writing
  1226.     if CX = 0000h on entry, no data is written; instead the file size is
  1227.       adjusted to be the same as the file position specified by the random
  1228.       record and record size fields of the FCB
  1229.     if the data to be written is less than a disk sector, it is copied into
  1230.       a DOS disk buffer, to be written out to disk at a later time
  1231.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1232. SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h
  1233. ----------2129-------------------------------
  1234. INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
  1235.     AH = 29h
  1236.     AL = parsing options
  1237.         bit 0: skip leading separators
  1238.         bit 1: use existing drive number in FCB if no drive is specified,
  1239.            instead of setting field to zero
  1240.         bit 2: use existing filename in FCB if no base name is specified,
  1241.            instead of filling field with blanks
  1242.         bit 3: use existing extension in FCB if no extension is specified,
  1243.            instead of filling field with blanks
  1244.         bits 4-7: reserved (0)
  1245.     DS:SI -> filename string (both '*' and '?' wildcards OK)
  1246.     ES:DI -> buffer for unopened FCB
  1247. Return: AL = result code
  1248.         00h successful parse, no wildcards encountered
  1249.         01h successful parse, wildcards present
  1250.         FFh failed (invalid drive specifier)
  1251.     DS:SI -> first unparsed character
  1252.     ES:DI buffer filled with unopened FCB (see AH=0Fh)
  1253. Notes:    asterisks expanded to question marks in the FCB
  1254.     all processing stops when a filename terminator is encountered
  1255.     cannot be used with filespecs which include a path (DOS 2+)
  1256. SeeAlso: AH=0Fh,AH=16h,AH=26h
  1257. ----------212A-------------------------------
  1258. INT 21 - DOS 1+ - GET SYSTEM DATE
  1259.     AH = 2Ah
  1260. Return: CX = year (1980-2099)
  1261.     DH = month
  1262.     DL = day
  1263. ---DOS 1.10+---
  1264.     AL = day of week (00h=Sunday)
  1265. SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h,INT 1A/AH=04h,INT 2F/AX=120Dh
  1266. ----------212B-------------------------------
  1267. INT 21 - DOS 1+ - SET SYSTEM DATE
  1268.     AH = 2Bh
  1269.     CX = year (1980-2099)
  1270.     DH = month
  1271.     DL = day
  1272. Return: AL = status
  1273.         00h successful
  1274.         FFh invalid date, system date unchanged
  1275. Note:    DOS 3.3+ also sets CMOS clock
  1276. SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h
  1277. ----------212B--CX4149-----------------------
  1278. INT 21 - AI Architects - ??? - INSTALLATION CHECK
  1279.     AH = 2Bh
  1280.     CX = 4149h ('AI')
  1281.     DX = 413Fh ('A?')
  1282. Return: AL <> FFh if installed
  1283. Note:    Borland's TKERNEL makes this call
  1284. ----------212B--CX4358-----------------------
  1285. INT 21 - PC Tools v5.x PC-Cache - INSTALLATION CHECK
  1286.     AH = 2Bh
  1287.     CX = 4358h ('CX')
  1288. Return: AL = FFh if PC-Cache not installed
  1289.     AL = 00h if installed
  1290.         CX = 6378h ('cx')
  1291.         BX = ???
  1292.         DX = ???
  1293. SeeAlso: INT 16/AX=FFA5h/CX=1111h
  1294. ----------212B--CX4445-----------------------
  1295. INT 21 - DESQview - INSTALLATION CHECK
  1296.     AH = 2Bh
  1297.     CX = 4445h ('DE')
  1298.     DX = 5351h ('SQ')
  1299.     AL = subfunction (DV v2.00+)
  1300.         01h get version
  1301.         Return: BX = version (BH = major, BL = minor)
  1302.         Note: early copies of v2.00 return 0002h
  1303.         02h get shadow buffer info, and start shadowing
  1304.         Return: BH = rows in shadow buffer
  1305.             BL = columns in shadow buffer
  1306.             DX = segment of shadow buffer
  1307.         04h get shadow buffer info
  1308.         Return: BH = rows in shadow buffer
  1309.             BL = columns in shadow buffer
  1310.             DX = segment of shadow buffer
  1311.         05h stop shadowing
  1312. Return: AL = FFh if DESQview not installed
  1313. Notes:    in DESQview v1.x, there were no subfunctions; this call only identified
  1314.       whether or not DESQview was loaded.  DESQview v2.52 performs function
  1315.       01h for all subfunction requests 0Ch and higher and appears to ignore
  1316.       all lower-numbered functions not listed here.
  1317.     DESQview versions 2.5x are part of DESQview/X v1.0x.
  1318. BUG:    subfunction 05h does not appear to work correctly in DESQview 2.52
  1319. SeeAlso: INT 10/AH=FEh,INT 10/AH=FFh,INT 15/AX=1024h,INT 15/AX=DE30h
  1320. ----------212B--CX454C-----------------------
  1321. INT 21 - ELRES v1.1 - INSTALLATION CHECK
  1322.     AH = 2Bh
  1323.     CX = 454Ch ('EL')
  1324.     DX = 5253h ('RS')
  1325. Return: ES:BX -> ELRES history structure (see below)
  1326.     DX = DABEh (signature, DAve BEnnett)
  1327. Note:    ELRES is an MSDOS return code (errorlevel) recorder by David H. Bennett
  1328.       which stores recent errorlevel values, allows them to be retrieved
  1329.       for use in batch files, and can place them in an environment variable
  1330. SeeAlso: AH=4Bh"ELRES",AH=4Dh
  1331.  
  1332. Format of ELRES history structure:
  1333. Offset    Size    Description
  1334.  00h    WORD    number of return codes which can be stored by following buffer
  1335.  02h    WORD    current position in buffer (treated as a ring)
  1336.  04h  N BYTEs    ELRES buffer
  1337. ----------212B01CX5441-----------------------
  1338. INT 21 - TAME v2.10+ - INSTALLATION CHECK
  1339.     AX = 2B01h
  1340.     CX = 5441h ('TA')
  1341.     DX = 4D45h ('ME')
  1342. ---v2.60---
  1343.     BH = ???
  1344.         00h skip ???, else do
  1345. Return: AL = 02h if installed
  1346.     ES:DX -> data area in TAME-RES (see below)
  1347. Note:    TAME is a shareware program by David G. Thomas which gives up CPU time
  1348.       to other partitions under a multitasker when the current partition's
  1349.       program incessantly polls the keyboard or system time
  1350.  
  1351. Format of TAME 2.10-2.20 data area:
  1352. Offset    Size    Description
  1353.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  1354.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  1355.  02h    DWORD    number of task switches
  1356.  06h    DWORD    number of keyboard polls
  1357.  0Ah    DWORD    number of time polls
  1358.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1359.  12h    DWORD    original INT 10h
  1360.  16h    DWORD    original INT 14h
  1361.  1Ah    DWORD    original INT 15h
  1362.  1Eh    DWORD    original INT 16h
  1363.  22h    DWORD    original INT 17h
  1364.  26h    DWORD    original INT 21h
  1365.  2Ah    DWORD    original INT 28h
  1366.  2Eh    WORD    offset of TAME INT 10h handler
  1367.  30h    WORD    offset of TAME INT 14h handler
  1368.  32h    WORD    offset of TAME INT 15h handler
  1369.  34h    WORD    offset of TAME INT 16h handler
  1370.  36h    WORD    offset of TAME INT 17h handler
  1371.  38h    WORD    offset of TAME INT 21h handler
  1372.  3Ah    WORD    offset of TAME INT 28h handler
  1373.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  1374.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1375.  40h    WORD    number of polls remaining before next task switch
  1376.  42h    WORD    /KEYIDLE value
  1377.  44h    BYTE    flags for interrupts already grabbed by TAME
  1378.         bit 0: INT 10h
  1379.             1: INT 14h
  1380.             2: INT 15h
  1381.             3: INT 16h
  1382.             4: INT 17h
  1383.             5: INT 21h
  1384.             6: INT 28h
  1385.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1386.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  1387.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  1388.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  1389.  49h    BYTE    window or task number for this task
  1390.  4Ah    BYTE    multitasker type ???
  1391.         01h DESQview
  1392.         02h DoubleDOS
  1393.         03h TopView
  1394.         ???
  1395.  4Bh    BYTE    type of task switching selected
  1396.         bit 0: DESQview???
  1397.             1: DoubleDOS???
  1398.             2: TopView???
  1399.             3: KeySwitch
  1400.             4: HLT instruction
  1401.  4Ch    BYTE    ???
  1402.  4Dh    BYTE    flags
  1403.         bit 1: /FREQ instead of /MAX
  1404.  4Eh    BYTE    /FG: value
  1405.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  1406.  50h    BYTE    ???
  1407.  
  1408. Format of TAME 2.30 data area:
  1409. Offset    Size    Description
  1410.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  1411.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  1412.  02h    DWORD    number of task switches
  1413.  06h    DWORD    number of keyboard polls
  1414.  0Ah    DWORD    number of time polls
  1415.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1416.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1417.  16h    DWORD    time yielded
  1418.  1Ah    DWORD    time spent polling
  1419.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1420.  22h    DWORD    original INT 10h
  1421.  26h    DWORD    original INT 14h
  1422.  2Ah    DWORD    original INT 15h
  1423.  2Eh    DWORD    original INT 16h
  1424.  32h    DWORD    original INT 17h
  1425.  36h    DWORD    original INT 21h
  1426.  3Ah    DWORD    original INT 28h
  1427.  3Eh    WORD    offset of TAME INT 10h handler
  1428.  40h    WORD    offset of TAME INT 14h handler
  1429.  42h    WORD    offset of TAME INT 15h handler
  1430.  44h    WORD    offset of TAME INT 16h handler
  1431.  46h    WORD    offset of TAME INT 17h handler
  1432.  48h    WORD    offset of TAME INT 21h handler
  1433.  4Ah    WORD    offset of TAME INT 28h handler
  1434.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  1435.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1436.  50h    WORD    number of polls remaining before next task switch
  1437.  52h    WORD    /KEYIDLE value
  1438.  54h    WORD    /FG: value
  1439.  56h    WORD    task switches left until next FGONLY DESQview API call
  1440.  58h    WORD    multitasker version
  1441.  5Ah    WORD    virtual screen segment
  1442.  5Ch    BYTE    flags for interrupts already grabbed by TAME
  1443.         bit 0: INT 10h
  1444.             1: INT 14h
  1445.             2: INT 15h
  1446.             3: INT 16h
  1447.             4: INT 17h
  1448.             5: INT 21h
  1449.             6: INT 28h
  1450.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  1451.  5Eh    BYTE    window or task number for this task
  1452.  5Fh    BYTE    multitasker type
  1453.         01h DESQview
  1454.         02h DoubleDOS
  1455.         03h TopView
  1456.         04h OmniView
  1457.         05h VM/386
  1458.  60h    BYTE    type of task switching selected (bit flags)
  1459.         bit 0: DESQview
  1460.             1: DoubleDOS
  1461.             2: TopView
  1462.             3: OmniView
  1463.             4: KeySwitch
  1464.             5: HLT instruction
  1465.  61h    BYTE    watch_DOS
  1466.  62h    BYTE    bit flags
  1467.         bit 0: TAME enabled
  1468.             1: /FREQ instead of /MAX (counts in 3Ch and 3Eh per tick)
  1469.             2: /TIMEPOLL
  1470.             3: /KEYPOLL
  1471.             4: inhibit timer
  1472.             5: enable status monitoring
  1473.  63h    BYTE    old status
  1474.  64h    WORD    signature DA34h
  1475.  
  1476. Format of TAME 2.60 data area:
  1477. Offset    Size    Description
  1478.  00h    BYTE    data structure minor version number (02h in TAME 2.60)
  1479.  01h    BYTE    data structure major version number (0Bh in TAME 2.60)
  1480.  02h    DWORD    number of task switches
  1481.  06h    DWORD    number of keyboard polls
  1482.  0Ah    DWORD    number of time polls
  1483.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1484.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1485.  16h    DWORD    time yielded
  1486.  1Ah    DWORD    time spent polling
  1487.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1488.  22h  4 BYTEs    ???
  1489.  26h    DWORD    original INT 10h
  1490.  2Ah    DWORD    original INT 14h
  1491.  2Eh    DWORD    original INT 15h
  1492.  32h    DWORD    original INT 16h
  1493.  36h    DWORD    original INT 17h
  1494.  3Ah    DWORD    original INT 21h
  1495.  3Eh    DWORD    original INT 28h
  1496.  42h    WORD    offset of TAME INT 10h handler
  1497.  44h    WORD    offset of TAME INT 14h handler
  1498.  46h    WORD    offset of TAME INT 15h handler
  1499.  48h    WORD    offset of TAME INT 16h handler
  1500.  4Ah    WORD    offset of TAME INT 17h handler
  1501.  4Ch    WORD    offset of TAME INT 21h handler
  1502.  4Eh    WORD    offset of TAME INT 28h handler
  1503.  50h    WORD    X in /max:X,Y or /freq:X,Y
  1504.  52h    WORD    Y in /max:X,Y or /freq:X,Y
  1505.  54h    WORD    number of polls remaining before next task switch
  1506.  56h    WORD    /KEYIDLE value
  1507.  58h  4 BYTEs    ???
  1508.  5Ch    WORD    X in /boost:X,Y
  1509.  5Eh    WORD    Y in /boost:X,Y
  1510.  60h    WORD    /FG: value
  1511.  62h    WORD    task switches left until next FGONLY DESQview API call
  1512.  64h    WORD    multitasker version ???
  1513.  66h    WORD    virtual screen segment
  1514.  68h    BYTE    flags for interrupts already grabbed by TAME
  1515.         bit 0: INT 10h
  1516.             1: INT 14h
  1517.             2: INT 15h
  1518.             3: INT 16h
  1519.             4: INT 17h
  1520.             5: INT 21h
  1521.             6: INT 28h
  1522.  69h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1523.  6Ah    BYTE    window or task number for this task
  1524.  6Bh    BYTE    multitasker type
  1525.         01h DESQview
  1526.         02h DoubleDOS
  1527.         03h TopView
  1528.         04h OmniView
  1529.         05h VM/386
  1530.  6Ch    BYTE    type of task switching selected (bit flags)
  1531.         bit 0: DESQview
  1532.             1: DoubleDOS
  1533.             2: TopView
  1534.             3: OmniView
  1535.             4: KeySwitch
  1536.             5: HLT instruction
  1537.  6Dh    BYTE    watch_DOS
  1538.  6Eh    BYTE    bit flags
  1539.         bit 0: TAME enabled
  1540.             1: /FREQ instead of /MAX (counts in 50h and 52h per tick)
  1541.             2: /TIMEPOLL
  1542.             3: /KEYPOLL
  1543.             4: inhibit timer
  1544.             5: enable status monitoring
  1545.  6Fh    BYTE    old status
  1546.  70h    WORD    signature DA34h
  1547. ----------212B44BX4D41-----------------------
  1548. INT 21 - pcANYWHERE IV/LAN - INSTALLATION CHECK
  1549.     AX = 2B44h ('D')
  1550.     BX = 4D41h ('MA')
  1551.     CX = 7063h ('pc')
  1552.     DX = 4157h ('AW')
  1553. Return: AX = 4F4Bh ('OK') if large host resident
  1554.        = 6F6Bh ('ok') if small host resident
  1555.     CX:DX -> API entry point
  1556. SeeAlso: INT 16/AH=79h
  1557.  
  1558. Call API entry point with:
  1559.     AX = 0000h get pcANYWHERE IV version
  1560.         DS:SI -> BYTE buffer for host type code
  1561.         Return: AH = version number
  1562.             AL = revision number
  1563.             DS:DI buffer byte filled with
  1564.             00h full-featured host
  1565.             01h limited-feature LAN host
  1566.             other API may not be supported
  1567.     AX = 0001h initialize operation
  1568.         DS:SI -> initialization request structure (see below)
  1569.         Return: AX = function status (see below)
  1570.     AX = 0002h get status
  1571.         Return: AH = current operating mode (see init req structure below)
  1572.             AL = current connection status
  1573.             bit 0: a physical connection is active
  1574.             bit 1: remove screen updating is active
  1575.             bit 2: connection checking is active
  1576.             bit 3: hot key detection is active
  1577.             bit 4: background file transfer is active
  1578.     AX = 0003h suspend remote screen updates
  1579.         Return: AX = function status (see below)
  1580.     AX = 0004h resume screen updates
  1581.         Return: AX = function status (see below)
  1582.     AX = 0005h end current remote access session
  1583.         DS:SI -> termination request structure (see below)
  1584.         Return: AX = function status (see below)
  1585.     AX = 0006h remove pcANYWHERE IV from memory
  1586.         Return: AX = status
  1587.             0000h successful
  1588.             FFD2h unable to release allocated memory
  1589.             FFD1h unable to release interrupt vectors
  1590.     AX = 8000h read data from communications channel
  1591.         DS:BX -> buffer
  1592.         CX = buffer size
  1593.         Return: AX >= number of characters read/available
  1594.             AX < 0 on error
  1595.     AX = 8001h write data to communications channel
  1596.         DS:BX -> buffer
  1597.         CX = buffer size
  1598.         Return: AX >= number of characters written
  1599.             AX < 0 on error
  1600.     AX = 8002h get connection status
  1601.         Return: AX = status
  1602.             > 0000h if connection active
  1603.             = 0000h if connection lost
  1604.             < 0000h on error
  1605.  
  1606. Format of initialization request structure:
  1607. Offset    Size    Description
  1608.  00h    BYTE    operating mode
  1609.         00h wait for a call
  1610.         01h hot key activates
  1611.         02h incoming call activates
  1612.         03h initiate a call
  1613.  01h  3 BYTEs    user ID to append to config file names
  1614.  04h    WORD    DS-relative pointer to path for config files
  1615.  06h    WORD    DS-relative pointer to path for program files
  1616.  
  1617. Format of termination request structure:
  1618. Offset    Size    Description
  1619.  00h    BYTE    operating mode after termination
  1620.         00h wait for a call
  1621.         01h hot key activates
  1622.         02h incoming call activates
  1623.         80h use current mode
  1624.         FFh remove from memory
  1625.  
  1626. Values for function status:
  1627.  0000h function completed successfully
  1628.  FFF2h unable to establish a connection when operating mode is
  1629.     "Initiate a call"
  1630.  FFF3h modem configuration is invalid (corrupt config)
  1631.  FFF4h modem initialization failed (no modem response)
  1632.  FFF5h the communications device could not be initialized
  1633.  FFF6h the host operator aborted the function
  1634.  FFF7h the communications driver type specified in the configuration file is
  1635.     different than the one loaded when pcANYWHERE IV was initially started
  1636.  FFF9h the configuration file is invalid
  1637.  FFFAh the configuration file could not be found
  1638.  FFFBh no session is active
  1639.  FFFCh a remote access session is active
  1640.  FFFDh the specified operating mode is invalid
  1641. ----------212C-------------------------------
  1642. INT 21 - DOS 1+ - GET SYSTEM TIME
  1643.     AH = 2Ch
  1644. Return: CH = hour
  1645.     CL = minute
  1646.     DH = second
  1647.     DL = 1/100 seconds
  1648. Note:    on most systems, the resolution of the system clock is about 5/100sec,
  1649.       so returned times generally do not increment by 1
  1650.     on some systems, DL may always return 00h
  1651. SeeAlso: AH=2Ah,AH=2Dh,AH=E7h,INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
  1652. SeeAlso: INT 2F/AX=120Dh
  1653. ----------212D-------------------------------
  1654. INT 21 - DOS 1+ - SET SYSTEM TIME
  1655.     AH = 2Dh
  1656.     CH = hour
  1657.     CL = minute
  1658.     DH = second
  1659.     DL = 1/100 seconds
  1660. Return: AL = result
  1661.         00h successful
  1662.         FFh invalid time, system time unchanged
  1663. Note:    DOS 3.3+ also sets CMOS clock
  1664. SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"
  1665. ----------212E--DL00-------------------------
  1666. INT 21 - DOS 1+ - SET VERIFY FLAG
  1667.     AH = 2Eh
  1668.     DL = 00h (DOS 1.x/2.x only)
  1669.     AL = new state of verify flag
  1670.         00h off
  1671.         01h on
  1672. Notes:    default state at system boot is OFF
  1673.     when ON, all disk writes are verified provided the device driver
  1674.       supports read-after-write verification
  1675. SeeAlso: AH=54h
  1676. ----------212F-------------------------------
  1677. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1678.     AH = 2Fh
  1679. Return: ES:BX -> current DTA
  1680. Note:    under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
  1681. SeeAlso: AH=1Ah
  1682. ----------2130-------------------------------
  1683. INT 21 - DOS 2+ - GET DOS VERSION
  1684.     AH = 30h
  1685. ---DOS 5.0---
  1686.     AL = what to return in BH
  1687.         00h OEM number (as for DOS 2.0-4.0x)
  1688.         01h version flag
  1689. Return: AL = major version number (00h if DOS 1.x)
  1690.     AH = minor version number
  1691.     BL:CX = 24-bit user serial number (most versions do not use this)
  1692. ---if DOS <5 or AL=00h---
  1693.     BH = OEM number
  1694.         00h IBM
  1695.         05h Zenith
  1696.         16h DEC
  1697.         23h Olivetti
  1698.         29h Toshiba
  1699.         4Dh    Hewlett-Packard
  1700.         99h    STARLITE architecture (OEM DOS, NETWORK DOS, SMP DOS)
  1701.         FFh Microsoft, Phoenix
  1702. ---if DOS 5.0 and AL=01h---
  1703.     BH = version flag
  1704.         08h DOS is in ROM
  1705.         10h DOS is in HMA
  1706. Notes:    the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
  1707.     the OS/2 v2.x Compatibility Box returns major version 14h (20)
  1708.     the Windows/NT DOS box returns major version 1Eh (30)
  1709.     DOS 4.01 and 4.02 identify themselves as version 4.00; use
  1710.       INT 21/AH=87h to distinguish between the original European MSDOS 4.00
  1711.       and the later PCDOS 4.0x and MSDOS 4.0x
  1712.     generic MSDOS 3.30, Compaq MSDOS 3.31, and others identify themselves
  1713.       as PC-DOS by returning OEM number 00h
  1714.     the version returned under DOS 4.0x may be modified by entries in
  1715.       the special program list (see AH=52h)
  1716.     the version returned under DOS 5.0 may be modified by SETVER; use
  1717.       AX=3306h to get the true version number
  1718. SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
  1719. SeeAlso: INT 2F/AX=122Fh,INT 2F/AX=E002h
  1720. ----------2130-------------------------------
  1721. INT 21 - Phar Lap 386/DOS-Extender, Intel Code Builder - INSTALLATION CHECK
  1722.     AH = 30h
  1723.     EAX = 00003000h
  1724.     EBX = 50484152h ("PHAR")
  1725. Return: AL = major DOS version
  1726.     AH = minor DOS version
  1727.     EAX bits 31-16 = 4458h ('DX') if 386/DOS-extender installed
  1728.         BL = ASCII major version number
  1729.     EAX bits 31-16 = 4243h ('BC') if Intel Code Builder installed
  1730.         EDX = address of GDA
  1731. SeeAlso: AX=2501h,AX=FF00h,INT 2F/AX=F100h
  1732. ----------2130--DXABCD-----------------------
  1733. INT 21 - VIRUS - "Possessed" - INSTALLATION CHECK
  1734.     AH = 30h
  1735.     DX = ABCDh
  1736. Return: DX = DCBAh if installed
  1737. SeeAlso: AX=0D20h,AX=30F1h
  1738. ----------213000-----------------------------
  1739. INT 21 - Btrieve Multi-User - INSTALLATION CHECK
  1740.     AX = 3000h
  1741. Return: AL >= 03h if INT 2F handler installed
  1742. SeeAlso: INT 2F/AX=AB00h,INT 7B"Btrieve",INT 7F/AX=0200h
  1743. ----------213000BX1234-----------------------
  1744. INT 21 - CTask 2.0+ - INSTALLATION CHECK
  1745.     AX = 3000h
  1746.     BX = 1234h
  1747.     DS:DX -> 8-byte version string (DX < FFF0h) "CTask21",00h for v2.1-2.2
  1748. Return: AL = DOS major version
  1749.     AH = DOS minor version
  1750.     CX:BX -> Ctask global data block
  1751. Notes:    if first eight bytes of returned data block equal eight bytes passed
  1752.       in, CTask is resident
  1753.     CTask is a multitasking kernel for C written by Thomas Wagner
  1754. ----------213000BX3000-----------------------
  1755. INT 21 - PC-MOS/386 v3.0 - INSTALLATION CHECK/GET VERSION
  1756.     AX = 3000h
  1757.     BX = 3000h
  1758.     CX = DX = 3000h
  1759. Return: AX = PC-MOS version
  1760. Program: PC-MOS/386 is a multitasking/multiuser MSDOS-compatible operating
  1761.       system by Software Links, Inc.
  1762. SeeAlso: AH=30h,INT 38/AH=02h,INT 38/AH=10h
  1763. ----------2130F1-----------------------------
  1764. INT 21 - VIRUS - "Dutch-555"/"Quit 1992" - INSTALLATION CHECK
  1765.     AX = 30F1h
  1766. Return: AL = 00h if resident
  1767. SeeAlso: AH=30h/DX=ABCDh,AX=330Fh
  1768. ----------2131-------------------------------
  1769. INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
  1770.     AH = 31h
  1771.     AL = return code
  1772.     DX = number of paragraphs to keep resident
  1773. Return: never
  1774. Notes:    the value in DX only affects the memory block containing the PSP;
  1775.       additional memory allocated via AH=48h is not affected
  1776.     the minimum number of paragraphs which will remain resident is 11h
  1777.       for DOS 2.x and 06h for DOS 3+
  1778.     most TSRs can save some memory by releasing their environment block
  1779.       before terminating (see AH=26h,AH=49h)
  1780. SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27
  1781. ----------2132-------------------------------
  1782. INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
  1783.     AH = 32h
  1784.     DL = drive number (00h = default, 01h = A:, etc)
  1785. Return: AL = status
  1786.         00h successful
  1787.         DS:BX -> Drive Parameter Block (DPB) for specified drive
  1788.         FFh invalid or network drive
  1789. Notes:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  1790.       except for the DWORD at offset 12h
  1791.     this call updates the DPB by reading the disk; the DPB may be accessed
  1792.       via the DOS list of lists (see AH=52h) if disk access is not
  1793.       desirable.
  1794.     undocumented prior to the release of DOS 5.0; only the DOS 4+ version
  1795.       of the DPB has been documented, however
  1796. SeeAlso: AH=1Fh,AH=52h
  1797.  
  1798. Format of DOS Drive Parameter Block:
  1799. Offset    Size    Description
  1800.  00h    BYTE    drive number (00h = A:, 01h = B:, etc)
  1801.  01h    BYTE    unit number within device driver
  1802.  02h    WORD    bytes per sector
  1803.  04h    BYTE    highest sector number within a cluster
  1804.  05h    BYTE    shift count to convert clusters into sectors
  1805.  06h    WORD    number of reserved sectors at beginning of drive
  1806.  08h    BYTE    number of FATs
  1807.  09h    WORD    number of root directory entries
  1808.  0Bh    WORD    number of first sector containing user data
  1809.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  1810.         16-bit FAT if greater than 0FF6h, else 12-bit FAT
  1811.  0Fh    BYTE    number of sectors per FAT
  1812.  10h    WORD    sector number of first directory sector
  1813.  12h    DWORD    address of device driver header
  1814.  16h    BYTE    media ID byte
  1815.  17h    BYTE    00h if disk accessed, FFh if not
  1816.  18h    DWORD    pointer to next DPB
  1817. ---DOS 2.x---
  1818.  1Ch    WORD    cluster containing start of current directory, 0000h=root,
  1819.         FFFFh = unknown
  1820.  1Eh 64 BYTEs    ASCIZ pathname of current directory for drive
  1821. ---DOS 3.x---
  1822.  1Ch    WORD    cluster at which to start search for free space when writing
  1823.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  1824. ---DOS 4.0-5.0---
  1825.  0Fh    WORD    number of sectors per FAT
  1826.  11h    WORD    sector number of first directory sector
  1827.  13h    DWORD    address of device driver header
  1828.  17h    BYTE    media ID byte
  1829.  18h    BYTE    00h if disk accessed, FFh if not
  1830.  19h    DWORD    pointer to next DPB
  1831.  1Dh    WORD    cluster at which to start search for free space when writing,
  1832.          usually the last cluster allocated
  1833.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  1834. ----------2133-------------------------------
  1835. INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
  1836.     AH = 33h
  1837.     AL = subfunction
  1838.         00h get current extended break state
  1839.         Return: DL = current state, 00h = off, 01h = on
  1840.         01h set state of extended ^C/^Break checking
  1841.         DL = 00h off, check only on character I/O functions
  1842.              01h on, check on all DOS functions
  1843. Note:    under DOS 3.1+, this function does not use any of the DOS-internal and
  1844.       may thus be called at any time
  1845. SeeAlso: AX=3302h
  1846. ----------213302-----------------------------
  1847. INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  1848.     AX = 3302h
  1849.     DL = new state
  1850.          00h for OFF or 01h for ON
  1851. Return: DL = old state of extended BREAK checking
  1852. Note:    this function does not use any of the DOS-internal stacks and may thus
  1853.       be called at any time; one possible use is modifying Control-Break
  1854.       checking from within an interrupt handler or TSR
  1855. SeeAlso: AH=33h
  1856. ----------213305-----------------------------
  1857. INT 21 - DOS 4+ - GET BOOT DRIVE
  1858.     AX = 3305h
  1859. Return: DL = boot drive (1=A:,...)
  1860. Notes:    fully reentrant
  1861.     NEC 9800-series PCs always call the boot drive A: and assign the other
  1862.       drive letters sequentially to the other drives in the system
  1863. ----------213306-----------------------------
  1864. INT 21 - DOS 5.0 - GET TRUE VERSION NUMBER
  1865.     AX = 3306h
  1866. Return:    BL = major version
  1867.     BH = minor version
  1868.     DL = revision (bits 2-0, all others 0)
  1869.     DH = version flags
  1870.         bit 3: DOS is in ROM
  1871.         bit 4: DOS in in HMA
  1872. Notes:    this function always returns the true version number, unlike AH=30h,
  1873.       whose return value may be changed with SETVER
  1874.     because of the conflict from the CBIS PowerLAN redirector (see next
  1875.       entry), programs should check whether BH is less than 100 (64h)
  1876.       and BL is at least 5 before accepting the returned BX as the true
  1877.       version number; however, even this is not entirely reliable when
  1878.       that redirector is loaded
  1879.     fully reentrant
  1880. BUG:    DR-DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
  1881.       subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
  1882.       for invalid subfunctions
  1883. SeeAlso: AH=30h,INT 2F/AX=112Fh
  1884. ----------213306-----------------------------
  1885. INT 21 - CBIS POWERLAN - NETWORK REDIRECTOR - ???
  1886.     AX = 3306h
  1887. Return: AX = 3306h
  1888.     BL = ??? (usually 00h)
  1889.     BH = ??? (usually 00h or FFh)
  1890. Note:    unknown function, is in conflict with DOS 5.0 version call
  1891. SeeAlso: AX=3306h"DOS"
  1892. ----------21330F-----------------------------
  1893. INT 21 - VIRUS - "Burghofer" - INSTALLATION CHECK
  1894.     AX = 330Fh
  1895. Return: AL = 0Fh if resident (DOS returns AL=FFh)
  1896. SeeAlso: AX=30F1h,AX=33E0h
  1897. ----------2133E0-----------------------------
  1898. INT 21 - VIRUS - "Oropax" - INSTALLATION CHECK
  1899.     AX = 33E0h
  1900. Return: AL = E0h if resident (DOS returns AL=FFh)
  1901. SeeAlso: AX=330Fh,AX=357Fh
  1902. ----------2134-------------------------------
  1903. INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
  1904.     AH = 34h
  1905. Return: ES:BX -> one-byte InDOS flag
  1906. Notes:    the value of InDOS is incremented whenever an INT 21 function begins
  1907.       and decremented whenever one completes
  1908.     during an INT 28 call, it is safe to call some INT 21 functions even
  1909.       though InDOS may be 01h instead of zero
  1910.     InDOS alone is not sufficient for determining when it is safe to
  1911.       enter DOS, as the critical error handling decrements InDOS and
  1912.       increments the critical error flag for the duration of the critical
  1913.       error.  Thus, it is possible for InDOS to be zero even if DOS is
  1914.       busy.
  1915.     the critical error flag is the byte immediately following InDOS in
  1916.       DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3+ (except COMPAQ
  1917.       DOS 3.0, where the critical error flag is located 1AAh bytes BEFORE
  1918.       the critical section flag)
  1919.     For DOS 3.1+, an undocumented call exists to get the address of the
  1920.       critical error flag (see AX=5D06h)
  1921.     this function was undocumented prior to the release of DOS 5.0.
  1922. SeeAlso: AX=5D06h,AX=5D0Bh,INT 28
  1923. ----------2135-------------------------------
  1924. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  1925.     AH = 35h
  1926.     AL = interrupt number
  1927. Return: ES:BX -> current interrupt handler
  1928. SeeAlso: AH=25h,AX=2503h
  1929. ----------213501-----------------------------
  1930. INT 21 P - FlashTek X-32VM - ALLOCATE PROTECTED-MODE SELECTOR
  1931.     AX = 3501h
  1932. Return: CF clear if successful
  1933.         BX = new selector
  1934.     CF set on error (no more selectors available)
  1935. Note:    the new selector will be an expand-up read/write data selector with
  1936.       undefined base and limit
  1937. SeeAlso: AX=3502h,INT 31/AX=0000h
  1938. ----------213502-----------------------------
  1939. INT 21 P - FlashTek X-32VM - DEALLOCATE PROTECTED-MODE SELECTOR
  1940.     AX = 3502h
  1941.     BX = selector
  1942. Return: CF clear if successful
  1943.     CF set on error (invalid selector)
  1944. Note:    only selectors allocated via AX=3501h should be deallocated
  1945. SeeAlso: AX=3501h,INT 31/AX=0001h
  1946. ----------213503-----------------------------
  1947. INT 21 P - FlashTek X-32VM - SET SELECTOR BASE ADDRESS
  1948.     AX = 3503h
  1949.     BX = selector
  1950.     ECX = base address
  1951. Return: CF clear if successful
  1952.     CF set on error (invalid selector)
  1953. Note:    there are probably additional 35xxh functions, but the message
  1954.       containing the FlashTek calls was truncated in transit and the
  1955.       remaining information did not arrive prior to release
  1956. SeeAlso: INT 31/AX=0007h
  1957. ----------21357F-----------------------------
  1958. INT 21 - VIRUS - "Agiplan"/"Month 4-6" - INSTALLATION CHECK
  1959.     AX = 357Fh
  1960. Return: DX = FFFFh if installed
  1961. SeeAlso: AX=33E0h,AX=3DFFh
  1962. ----------2136-------------------------------
  1963. INT 21 - DOS 2+ - GET FREE DISK SPACE
  1964.     AH = 36h
  1965.     DL = drive number (00h = default, 01h = A:, etc)
  1966. Return: AX = FFFFh if invalid drive
  1967.     else
  1968.         AX = sectors per cluster
  1969.         BX = number of free clusters
  1970.         CX = bytes per sector
  1971.         DX = total clusters on drive
  1972. Notes:    free space on drive in bytes is AX * BX * CX
  1973.     total space on drive in bytes is AX * CX * DX
  1974.     "lost clusters" are considered to be in use
  1975.     according to Dave Williams' MSDOS reference, the value in DX is
  1976.       incorrect for non-default drives after ASSIGN is run
  1977. SeeAlso: AH=1Bh,AH=1Ch
  1978. ----------213700-----------------------------
  1979. INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
  1980.     AX = 3700h
  1981. Return: AL = status
  1982.         00h successful
  1983.         DL = current switch character
  1984.         FFh unsupported subfunction
  1985. Desc:    Determine the character which is used to introduce command switches.
  1986.       This setting is ignored by DOS commands in version 4.0 and higher,
  1987.       but is honored by many third-party programs.
  1988. Notes:    documented in some OEM versions of some releases of DOS
  1989.     supported by OS/2 compatibility box
  1990.     always returns DL=2Fh for DOS 5.0
  1991. SeeAlso: AX=3701h
  1992. ----------213701-----------------------------
  1993. INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
  1994.     AX = 3701h
  1995.     DL = new switch character
  1996. Return: AL = status
  1997.         00h successful
  1998.         FFh unsupported subfunction
  1999. Notes:    documented in some OEM versions of some releases of DOS
  2000.     supported by OS/2 compatibility box
  2001.     ignored by DOS 5.0
  2002. SeeAlso: AX=3700h
  2003. ----------2137-------------------------------
  2004. INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
  2005.     AH = 37h
  2006.     AL = subfunction
  2007.         02h get availdev flag
  2008.         Return: DL = 00h \DEV\ must precede character device names
  2009.                = nonzero \DEV\ is optional
  2010.         03h set availdev flag
  2011.         DL = 00h    \DEV\ is mandatory
  2012.            = nonzero    \DEV\ is optional
  2013. Return: AL = status
  2014.         00h successful
  2015.         FFh unsupported subfunction
  2016. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  2017.       names without generating an error even if the directory \DEV does
  2018.       not actually exist (other paths generate an error if they do not
  2019.       exist).
  2020.     although DOS 3.3+ accepts these calls, they have no effect, and
  2021.       AL=02h always returns DL=FFh
  2022. ----------2138-------------------------------
  2023. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  2024.     AH = 38h
  2025. --DOS 2.x--
  2026.     AL = 00h get current-country info
  2027.     DS:DX -> buffer for returned info (see below)
  2028. Return: CF set on error
  2029.         AX = error code (02h)
  2030.     CF clear if successful
  2031.         AX = country code (MSDOS 2.11 only)
  2032.         buffer at DS:DX filled
  2033. --DOS 3+--
  2034.     AL = 00h for current country
  2035.     AL = 01h thru 0FEh for specific country with code <255
  2036.     AL = 0FFh for specific country with code >= 255
  2037.        BX = 16-bit country code
  2038.     DS:DX -> buffer for returned info (see below)
  2039. Return:    CF set on error
  2040.         AX = error code (02h)
  2041.     CF clear if successful
  2042.         BX = country code
  2043.         DS:DX buffer filled
  2044. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  2045.  
  2046. Format of PCDOS 2.x country info:
  2047. Offset    Size    Description
  2048.  00h    WORD    date format  0 = USA    mm dd yy
  2049.                  1 = Europe dd mm yy
  2050.                  2 = Japan    yy mm dd
  2051.  02h    BYTE    currency symbol
  2052.  03h    BYTE    00h
  2053.  04h    BYTE    thousands separator char
  2054.  05h    BYTE    00h
  2055.  06h    BYTE    decimal separator char
  2056.  07h    BYTE    00h
  2057.  08h 24 BYTEs    reserved
  2058.  
  2059. Format of MSDOS 2.x,DOS 3+ country info:
  2060. Offset    Size    Description
  2061.  00h    WORD    date format (see above)
  2062.  02h  5 BYTEs    ASCIZ currency symbol string
  2063.  07h  2 BYTEs    ASCIZ thousands separator
  2064.  09h  2 BYTEs    ASCIZ decimal separator
  2065.  0Bh  2 BYTEs    ASCIZ date separator
  2066.  0Dh  2 BYTEs    ASCIZ time separator
  2067.  0Fh    BYTE    currency format
  2068.         bit 2 = set if currency symbol replaces decimal point
  2069.         bit 1 = number of spaces between value and currency symbol
  2070.         bit 0 = 0 if currency symbol precedes value
  2071.             1 if currency symbol follows value
  2072.  10h    BYTE    number of digits after decimal in currency
  2073.  11h    BYTE    time format
  2074.         bit 0 = 0 if 12-hour clock
  2075.             1 if 24-hour clock
  2076.  12h    DWORD    address of case map routine
  2077.         (FAR CALL, AL = character to map to upper case [>= 80h])
  2078.  16h  2 BYTEs    ASCIZ data-list separator
  2079.  18h 10 BYTEs    reserved
  2080.  
  2081. Values for country code:
  2082.  001h    United States
  2083.  002h    Canadian-French
  2084.  003h    Latin America
  2085.  01Fh    Netherlands
  2086.  020h    Belgium
  2087.  021h    France
  2088.  022h    Spain
  2089.  024h    Hungary (not supported by DR-DOS 5.0)
  2090.  026h    Yugoslavia (not supported by DR-DOS 5.0)
  2091.  027h    Italy
  2092.  029h    Switzerland
  2093.  02Ah    Czechoslovakia (not supported by DR-DOS 5.0)
  2094.  02Bh    Austria (DR-DOS 5.0)
  2095.  02Ch    United Kingdom
  2096.  02Dh    Denmark
  2097.  02Eh    Sweden
  2098.  02Fh    Norway
  2099.  030h    Poland (not supported by DR-DOS 5.0)
  2100.  031h    Germany
  2101.  037h    Brazil (not supported by DR-DOS 5.0)
  2102.  03Dh    International English [Australia in DR-DOS 5.0]
  2103.  051h    Japan (DR-DOS 5.0)
  2104.  052h    Korea (DR-DOS 5.0)
  2105.  15Fh    Portugal
  2106.  166h    Finland
  2107.  311h    Middle East (DR-DOS 5.0)
  2108.  3CCh    Israel (DR-DOS 5.0)
  2109. ----------2138-------------------------------
  2110. INT 21 - DOS 3+ - SET COUNTRY CODE
  2111.     AH = 38h
  2112.     AL = 01h thru 0FEh for specific country with code <255
  2113.     AL = FFh for specific country with code >= 255
  2114.        BX = 16-bit country code
  2115.     DX = FFFFh
  2116. Return: CF set on error
  2117.         AX = error code (see AH=59h)
  2118.     CF clear if successful
  2119. Note:    not supported by OS/2
  2120. SeeAlso: INT 2F/AX=1403h
  2121. ----------2139-------------------------------
  2122. INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
  2123.     AH = 39h
  2124.     DS:DX -> ASCIZ pathname
  2125. Return: CF clear if successful
  2126.         AX destroyed
  2127.     CF set on error
  2128.         AX = error code (03h,05h) (see AH=59h)
  2129. Notes:    all directories in the given path except the last must exist
  2130.     fails if the parent directory is the root and is full
  2131.     DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
  2132.       it is not possible to make that directory the current directory
  2133.       because the path would exceed 64 characters
  2134.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2135. SeeAlso: AH=3Ah,AH=3Bh,AH=E2h/SF=0Ah,INT 2F/AX=1103h
  2136. ----------213A-------------------------------
  2137. INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
  2138.     AH = 3Ah
  2139.     DS:DX -> ASCIZ pathname of directory to be removed
  2140. Return: CF clear if successful
  2141.         AX destroyed
  2142.     CF set on error
  2143.         AX = error code (03h,05h,06h,10h) (see AH=59h)
  2144. Notes:    directory must be empty (contain only '.' and '..' entries)
  2145.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2146. SeeAlso: AH=39h,AH=3Bh,AH=E2h/SF=0Bh,INT 2F/AX=1101h
  2147. ----------213B-------------------------------
  2148. INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
  2149.     AH = 3Bh
  2150.     DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
  2151. Return: CF clear if successful
  2152.         AX destroyed
  2153.     CF set on error
  2154.         AX = error code (03h) (see AH=59h)
  2155. Notes:    if new directory name includes a drive letter, the default drive is
  2156.       not changed, only the current directory on that drive
  2157.     changing the current directory also changes the directory in which
  2158.       FCB file calls operate
  2159.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2160. SeeAlso: AH=47h,INT 2F/AX=1105h
  2161. ----------213C-------------------------------
  2162. INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
  2163.     AH = 3CH
  2164.     CX = file attribute
  2165.         bit 0: read-only
  2166.         1: hidden
  2167.         2: system
  2168.         3: volume label (ignored)
  2169.         4: reserved, must be zero (directory)
  2170.         5: archive bit
  2171.         7: if set, file is shareable under Novell NetWare
  2172.     DS:DX -> ASCIZ filename
  2173. Return: CF clear if successful
  2174.         AX = file handle
  2175.     CF set on error
  2176.         AX = error code (03h,04h,05h) (see AH=59h)
  2177. Notes:    if a file with the given name exists, it is truncated to zero length
  2178.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2179. SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h
  2180. ----------213D-------------------------------
  2181. INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
  2182.     AH = 3Dh
  2183.     AL = access and sharing modes
  2184.         bits 2-0: access mode
  2185.         000 read only
  2186.         001 write only
  2187.         010 read/write
  2188.         bit 3: reserved (0)
  2189.         bits 6-4: sharing mode (DOS 3+)
  2190.         000 compatibility mode
  2191.         001 "DENYALL" prohibit both read and write access by others
  2192.         010 "DENYWRITE" prohibit write access by others
  2193.         011 "DENYREAD" prohibit read access by others
  2194.         100 "DENYNONE" allow full access by others
  2195.         bit 7: inheritance
  2196.         if set, file is private to current process and will not be
  2197.           inherited by child processes
  2198.     DS:DX -> ASCIZ filename
  2199.     CL = attribute mask of files to look for (server call only)
  2200. Return: CF clear if successful
  2201.         AX = file handle
  2202.     CF set on error
  2203.         AX = error code (01h,02h,03h,04h,05h,0Ch) (see AH=59h)
  2204. Notes:    file pointer is set to start of file
  2205.     file handles which are inherited from a parent also inherit sharing
  2206.       and access restrictions
  2207.     files may be opened even if given the hidden or system attributes
  2208.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2209. SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1226h
  2210.  
  2211. File sharing behavior:
  2212.       |    Second and subsequent Opens
  2213.  First      |Compat  Deny      Deny     Deny    Deny
  2214.  Open      |       All      Write     Read    None
  2215.       |R W RW R W RW R W RW R W RW R W RW
  2216.  - - - - -| - - - - - - - - - - - - - - - - -
  2217.  Compat    R |Y Y Y  N N N     1 N N    N N N  1 N N
  2218.     W |Y Y Y  N N N     N N N    N N N  N N N
  2219.     RW|Y Y Y  N N N     N N N    N N N  N N N
  2220.  - - - - -|
  2221.  Deny    R |C C C  N N N     N N N    N N N  N N N
  2222.  All    W |C C C  N N N     N N N    N N N  N N N
  2223.     RW|C C C  N N N     N N N    N N N  N N N
  2224.  - - - - -|
  2225.  Deny    R |2 C C  N N N     Y N N    N N N  Y N N 
  2226.  Write    W |C C C  N N N     N N N    Y N N  Y N N 
  2227.     RW|C C C  N N N     N N N    N N N  Y N N
  2228.  - - - - -|
  2229.  Deny    R |C C C  N N N     N Y N    N N N  N Y N
  2230.  Read    W |C C C  N N N     N N N    N Y N  N Y N
  2231.     RW|C C C  N N N     N N N    N N N  N Y N
  2232.  - - - - -|
  2233.  Deny    R |2 C C  N N N     Y Y Y    N N N  Y Y Y
  2234.  None    W |C C C  N N N     N N N    Y Y Y  Y Y Y
  2235.     RW|C C C  N N N     N N N    N N N  Y Y Y
  2236. Legend: Y = open succeeds, N = open fails with error code 05h
  2237.     C = open fails, INT 24 generated
  2238.     1 = open succeeds if file read-only, else fails with error code
  2239.     2 = open succeeds if file read-only, else fails with INT 24
  2240. ----------213DFF-----------------------------
  2241. INT 21 - VIRUS - "JD-448" - INSTALLATION CHECK
  2242.     AX = 3DFFh
  2243. Return: AX = 4A44h if resident
  2244. SeeAlso: AX=357Fh,AX=4203h
  2245. ----------213E-------------------------------
  2246. INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
  2247.     AH = 3Eh
  2248.     BX = file handle
  2249. Return: CF clear if successful
  2250.         AX destroyed
  2251.     CF set on error
  2252.         AX = error code (06h) (see AH=59h)
  2253. Note:    if the file was written to, any pending disk writes are performed, the
  2254.       time and date stamps are set to the current time, and the directory
  2255.       entry is updated
  2256. SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
  2257. ----------213F-------------------------------
  2258. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  2259.     AH = 3Fh
  2260.     BX = file handle
  2261.     CX = number of bytes to read
  2262.     DS:DX -> buffer for data
  2263. Return: CF clear if successful
  2264.         AX = number of bytes actually read (0 if at EOF before call)
  2265.     CF set on error
  2266.         AX = error code (05h,06h) (see AH=59h)
  2267. Notes:    data is read beginning at current file position, and the file position
  2268.       is updated after a successful read
  2269.     the returned AX may be smaller than the request in CX if a partial
  2270.       read occurred
  2271.     if reading from CON, read stops at first CR
  2272.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2273. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  2274. ----------213F-------------------------------
  2275. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  2276.     AH = 3Fh
  2277.     BX = handle for character device "TDHDEBUG"
  2278.     CX = number of bytes to read
  2279.     DS:DX -> buffer for status block (see below)
  2280. Return: CF clear if successful
  2281.         AX = number of bytes actually read
  2282.     CF set on error
  2283.         AX = error code (05h,06h) (see AH=59h)
  2284. SeeAlso: AH=40h"Turbo Debug"
  2285.  
  2286. Format of status block:
  2287. Offset    Size    Description
  2288.  00h    BYTE    status of command
  2289.         00h successful
  2290.         01h invalid handle
  2291.         02h no more breakpoints available
  2292.         03h hardware does not support specified breakpoint type
  2293.         04h previous command prevents execution
  2294.         05h debugger hardware not found
  2295.         06h hardware failure
  2296.         07h invalid command
  2297.         08h driver not initialized yet
  2298.         FEh recursive entry (hardware breakpoint inside hw bp handler)
  2299. ---status for command 01h---
  2300.  01h    WORD    device driver interface version number (currently 1)
  2301.  03h    WORD    device driver software version
  2302.  05h    BYTE    maximum simultaneous hardware breakpoints
  2303.  06h    BYTE    configuration bits
  2304.         bit 0: CPU and DMA accesses are distinct
  2305.             1: can detect DMA transfers
  2306.             2: supports data mask
  2307.             3: hardware pass counter on breakpoints
  2308.             4: can match on data as well as addresses
  2309.  07h    BYTE    supported breakpoint types
  2310.         bit 0: memory read
  2311.             1: memory write
  2312.             2: memory read/write
  2313.             3: I/O read
  2314.             4: I/O write
  2315.             5: I/O read/write
  2316.             6: instruction fetch
  2317.  08h    WORD    supported addressing match modes
  2318.         bit 0: any address
  2319.             1: equal to test value
  2320.             2: not equal
  2321.             3: above test value
  2322.             4: below test value
  2323.             5: below or equal
  2324.             6: above or equal
  2325.             7: within range
  2326.             8: outside range
  2327.  0Ah    WORD    supported data matches
  2328.         bit 0: any data
  2329.             1: equal to test value
  2330.             2: not equal
  2331.             3: above test value
  2332.             4: below test value
  2333.             5: below or equal
  2334.             6: above or equal
  2335.             7: within range
  2336.             8: outside range
  2337.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  2338.  0Dh    WORD    size of onboard memory (in K)
  2339.  0Fh    WORD    maximum number of trace-back events
  2340.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  2341.         supported)
  2342. ---status for command 04h---
  2343.  01h    BYTE    handle to use when referring to the just-set breakpoint
  2344. ----------213F-------------------------------
  2345. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  2346.     AH = 3Fh
  2347.     BX = handle for character device "$IPCUST"
  2348.     CX = number of bytes to read
  2349.     DS:DX -> buffer for configuration data (see below)
  2350. Return: CF clear if successful
  2351.         AX = number of bytes actually read
  2352.     CF set on error
  2353.         AX = error code (05h,06h) (see AH=59h)
  2354. Notes:    if less than the entire data is read or written, the next read/write
  2355.       continues where the previous one ended; IOCTL calls AX=4402h and
  2356.       AX=4403h both reset the location at which the next operation starts
  2357.       to zero
  2358.     the data pointer is also reset to zero if the previous read or write
  2359.       reached or exceeded the end of the data, when the current function
  2360.       is read and the previous was write, or vice versa
  2361. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST"
  2362.  
  2363. Format of configuration data:
  2364. Offset    Size    Description
  2365.  00h 12 BYTEs    IPCUST.SYS device driver header
  2366.  12h    BYTE    ???
  2367.  13h    BYTE    ???
  2368.  14h    WORD    ???
  2369.  16h    BYTE    bit flags
  2370.          bit 0: send BS rather than DEL for BackSpace key
  2371.         bit 1: wrap long lines
  2372.  17h    BYTE    ???
  2373.  18h 64 BYTEs    ASCIZ hostname
  2374.  58h 64 BYTEs    ASCIZ domain name
  2375.          (fully qualified domain name is hostname.domain-name)
  2376.  98h 16 BYTEs    ASCIZ username
  2377.  A8h 64 BYTEs    ASCIZ full name
  2378.  E8h 64 BYTEs    ASCIZ office address
  2379. 128h 32 BYTEs    ASCIZ phone number
  2380. 148h    WORD    offset from GMT in minutes
  2381. 14Ah  4 BYTEs    ASCIZ timezone name
  2382. 14Eh    WORD    number of time servers
  2383. 150h  ? DWORDs    IP addresses for time servers (big-endian)
  2384.     ???
  2385. 164h    WORD    number of old-style name servers
  2386. 166h  3 DWORDs    IP addresses for name servers (big-endian)
  2387. 172h    WORD    number of domain name servers
  2388. 174h  3 DWORDs    IP addresses for domain name servers (big-endian)
  2389. 180h    DWORD    IP address of default gateway (big-endian)
  2390. 184h    DWORD    IP address of log server (big-endian)
  2391. 188h    DWORD    IP address of cookie server (big-endian)
  2392. 18Ch    DWORD    IP address of lpr server (big-endian)
  2393. 190h    DWORD    IP address of imagen print server
  2394. 194h 54 BYTEs    ???
  2395. 1E8h    WORD    TCP default window size in bytes
  2396. 1EAh    WORD    TCP low window size
  2397. 1ECh 64 BYTEs    ASCIZ host tabel filename
  2398. 22Ch  2 BYTEs    ???
  2399. 22Eh 80 BYTEs    ASCIZ mail relay host name
  2400. 27Eh    BYTE    ???
  2401. 27Fh    BYTE    ??? bit flags
  2402. 280h 44 BYTEs    ???
  2403. 2ACh    WORD    ???
  2404. 2AEh 202 BYTEs    ???
  2405. ----------2140-------------------------------
  2406. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  2407.     AH = 40h
  2408.     BX = file handle
  2409.     CX = number of bytes to write
  2410.     DS:DX -> data to write
  2411. Return: CF clear if successful
  2412.         AX = number of bytes actually written
  2413.     CF set on error
  2414.         AX = error code (05h,06h) (see AH=59h)
  2415. Notes:    if CX is zero, no data is written, and the file is truncated or
  2416.       extended to the current position
  2417.     data is written beginning at the current file position, and the file
  2418.       position is updated after a successful write
  2419.     the usual cause for AX < CX on return is a full disk
  2420. BUG:    a write of zero bytes will appear to succeed when it actually failed
  2421.       if the write is extending the file and there is not enough disk
  2422.       space for the expanded file (DOS 5.0); one should therefore check
  2423.       whether the file was in fact extended by seeking to 0 bytes from
  2424.       the end of the file (INT 21/AX=4202h/CX=0/DX=0)
  2425.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2426. SeeAlso: AH=28h,AH=3Fh,AH=93h,INT 2F/AX=1109h
  2427. ----------2140-------------------------------
  2428. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  2429.     AH = 40h
  2430.     BX = handle for character device "TDHDEBUG"
  2431.     CX = number of bytes to write
  2432.     DS:DX -> hardware breakpoint command (see below)
  2433. Return: CF clear if successful
  2434.         AX = number of bytes actually written
  2435.     CF set on error
  2436.         AX = error code (05h,06h) (see AH=59h)
  2437. Note:    results are retrieved by reading from the device
  2438. SeeAlso: AH=3Fh"Turbo Debug"
  2439.  
  2440. Format of hardware breakpoint commands:
  2441. Offset    Size    Description
  2442.  00h    BYTE    command code
  2443.         00h install interrupt vectors
  2444.         01h get hardware capabilities
  2445.         02h enable hardware breakpoints
  2446.         03h disable hardware breakpoints
  2447.         04h set hardware breakpoint
  2448.         05h clear hardware breakpoint
  2449.         06h set I/O base address and reset hardware
  2450.         07h restore interrupt vectors
  2451. ---command code 00h---
  2452.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  2453.         hardware breakpoint; call with CPU state the same as on
  2454.         the breakpoint except for pushing AX and placing an entry
  2455.         code (FFh if breakout button or breakpoint handle) in AH
  2456. ---command code 04h---
  2457.  01h    BYTE    breakpoint type
  2458.         00h memory read
  2459.         01h memory write
  2460.         02h memory read/write
  2461.         03h I/O read
  2462.         04h I/O write
  2463.         05h I/O read/write
  2464.         06h instruction fetch
  2465.  02h    BYTE    address matching mode
  2466.         00h any address
  2467.         01h equal to test value
  2468.         02h different from test value
  2469.         03h above test value
  2470.         04h below test value
  2471.         05h below or equal to test value
  2472.         06h above or equal to test value
  2473.         07h within inclusive range
  2474.         08h outside specified range
  2475.  03h    DWORD    32-bit linear low address
  2476.  07h    DWORD    32-bit linear high address
  2477.  0Bh    WORD    pass count
  2478.  0Dh    BYTE    data size (01h, 02h, or 04h)
  2479.  0Eh    BYTE    source of matched bus cycle
  2480.         01h CPU
  2481.         02h DMA
  2482.         03h either
  2483.  0Fh    BYTE    data-matching mode
  2484.         00h match any
  2485.         01h equal to test value
  2486.         02h different from test value
  2487.         03h above test value
  2488.         04h below test value
  2489.         05h below or equal to test value
  2490.         06h above or equal to test value
  2491.         07h within specified range
  2492.         08h outside specified range
  2493.  10h    DWORD    low data value
  2494.  14h    DWORD    high data value
  2495.  18h    DWORD    data mask specifying which bits of the data are tested
  2496. ---command code 05h---
  2497.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  2498.         04h)
  2499. ---command code 06h---
  2500.  01h    WORD    base address of hardware debugger board
  2501. ----------2140-------------------------------
  2502. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  2503.     AH = 40h
  2504.     BX = handle for character device "$IPCUST"
  2505.     CX = number of bytes to write
  2506.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  2507. Return: CF clear if successful
  2508.         AX = number of bytes actually written
  2509.     CF set on error
  2510.         AX = error code (05h,06h) (see AH=59h)
  2511. Notes:    if less than the entire data is read or written, the next read/write
  2512.       continues where the previous one ended; IOCTL calls AX=4402h and
  2513.       AX=4403h both reset the location at which the next operation starts
  2514.       to zero
  2515.     the data pointer is also reset to zero if the previous read or write
  2516.       reached or exceeded the end of the data, when the current function
  2517.       is read and the previous was write, or vice versa
  2518. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  2519. ----------214000BX0002-----------------------
  2520. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  2521.     AX = 4000h
  2522.     BX = 0002h
  2523.     CX = 0000h
  2524.     DS:DX = 0000h:0000h
  2525. Return: CF clear if installed
  2526.         AX = CS of resident code
  2527. Note:    FARTBELL is a joke program by Guenther Thiele which makes various
  2528.       noises when programs output a bell
  2529. SeeAlso: AX=4001h
  2530. ----------214001BX0002-----------------------
  2531. INT 21 - FARTBELL.EXE - FORCE NOISE
  2532.     AX = 4001h
  2533.     BX = 0002h
  2534.     CX = 0000h
  2535.     DS:DX = 0000h:0000h
  2536. Note:    FARTBELL is a joke program by Guenther Thiele which makes various
  2537.       noises when programs output a bell
  2538. SeeAlso: AX=4000h
  2539. ----------2141-------------------------------
  2540. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  2541.     AH = 41h
  2542.     DS:DX -> ASCIZ filename (no wildcards, but see below)
  2543.     CL = attribute mask for deletion (server call only, see below)
  2544. Return: CF clear if successful
  2545.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  2546.     CF set on error
  2547.         AX = error code (02h,03h,05h) (see AH=59h)
  2548. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  2549.       the filespec must be canonical (as returned by AH=60h), and only
  2550.       files matching the attribute mask in CL are deleted
  2551.     DOS does not erase the file's data; it merely becomes inaccessible
  2552.       because the FAT chain for the file is cleared
  2553.     deleting a file which is currently open may lead to filesystem
  2554.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  2555.       referencing the deleted file, thus allowing writes to a nonexistant
  2556.       file.
  2557.     under DRDOS and DR Multiuser DOS, this function will fail if the file
  2558.       is currently open
  2559.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2560. SeeAlso: AH=13h,AX=4301h,AX=5D00h,AH=60h,AX=F244h,INT 2F/AX=1113h
  2561. ----------214101DXFFFE-----------------------
  2562. INT 21 - SoftLogic Data Guardian - ???
  2563.     AX = 4101h
  2564.     DX = FFFEh
  2565. Return: AX = 0000h if installed
  2566. Note:    resident code sets several internal variables on this call
  2567. ----------2142-------------------------------
  2568. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  2569.     AH = 42h
  2570.     AL = origin of move
  2571.         00h start of file
  2572.         01h current file position
  2573.         02h end of file
  2574.     BX = file handle
  2575.     CX:DX = offset from origin of new file position
  2576. Return: CF clear if successful
  2577.         DX:AX = new file position in bytes from start of file
  2578.     CF set on error
  2579.         AX = error code (01h,06h) (see AH=59h)
  2580. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  2581.       start of the file; no error is returned in that case, but subsequent
  2582.       attempts at I/O will produce errors
  2583.     if the new position is beyond the current end of file, the file will
  2584.       be extended by the next write (see AH=40h)
  2585. SeeAlso: AH=24h,INT 2F/AX=1228h
  2586. ----------214203-----------------------------
  2587. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  2588.     AX = 4203h
  2589. Return: AX = 1234h if resident
  2590. SeeAlso: AX=3DFFh,AX=4243h
  2591. ----------214243-----------------------------
  2592. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  2593.     AX = 4243h
  2594. Return: AX = 5678h if resident
  2595. SeeAlso: AX=4203h,AX=4B04h
  2596. ----------214300-----------------------------
  2597. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  2598.     AX = 4300h
  2599.     DS:DX -> ASCIZ filename
  2600. Return: CF clear if successful
  2601.         CX = attributes (see AX=4301h)
  2602.         AX = CX (DR-DOS 5.0)
  2603.     CF set on error
  2604.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2605. Note:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2606. SeeAlso: AX=4301h,AX=4310h,AH=B6h,INT 2F/AX=110Fh
  2607. ----------214301-----------------------------
  2608. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  2609.     AX = 4301h
  2610.     CX = new attributes
  2611.         bit 7: shareable (Novell NetWare)
  2612.         6: unused
  2613.         5: archive
  2614.         4: directory
  2615.         3: volume label
  2616.            execute-only (Novell NetWare)
  2617.         2: system
  2618.         1: hidden
  2619.         0: read-only
  2620.     DS:DX -> ASCIZ filename
  2621. Return: CF clear if successful
  2622.         AX destroyed
  2623.     CF set on error
  2624.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2625. Notes:    will not change volume label or directory attribute bits, but will
  2626.       change the other attribute bits of a directory (the directory
  2627.       bit must be cleared to successfully change the other attributes of a
  2628.       directory, but the directory will not be changed to a normal file as
  2629.       a result)
  2630.     MSDOS 4.01 reportedly closes the file if it is currently open
  2631.     for security reasons, the Novell NetWare execute-only bit can never
  2632.       be cleared; the file must be deleted and recreated
  2633.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2634. SeeAlso: AX=4300h,AX=4311h,INT 2F/AX=110Eh
  2635. ----------214302-----------------------------
  2636. INT 21 - DR-DOS 3.41+ internal - GET ACCESS RIGHTS
  2637.     AX = 4302h
  2638.     DS:DX -> ASCIZ pathname
  2639. Return: CF clear if successful
  2640.         CX = access rights
  2641.         bit 0 owner delete requires password
  2642.         bit 1 owner execution requires password (FlexOS)
  2643.         bit 2 owner write requires password
  2644.         bit 3 owner read requires password
  2645.         bit 4 group delete requires password
  2646.         bit 5 group execution requires password (FlexOS)
  2647.         bit 6 group write requires password
  2648.         bit 7 group read requires password
  2649.         bit 8 world delete requires password
  2650.         bit 9 world execution requires password (FlexOS)
  2651.         bit 10 world write requires password
  2652.         bit 11 world read requires password
  2653.         AX = CX (DR-DOS 5.0)
  2654.     CF set on error
  2655.         AX = error code
  2656. Desc:    Determine which operations the calling program may perform on a
  2657.       specified file without being required to provide a password.
  2658. Notes:    this protection scheme has been coordinated on all current Digital
  2659.       Research/Novell operating systems (DR-DOS 3.41+, DRMDOS 5.x, and
  2660.       FlexOS 2+)
  2661.     only FlexOS actually uses the "execution" bits; DR-DOS 3.41+ treats
  2662.       them as "read" bits.
  2663.     DR-DOS 3.41-5.x only use bits 0-3.  Only DR-DOS 6.0 using a
  2664.       DRMDOS 5.x security system allowing for users and groups uses bits
  2665.       4-11.
  2666. SeeAlso: AX=4303h
  2667. ----------214303-----------------------------
  2668. INT 21 - DR-DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  2669.     AX = 4303h
  2670.     CX = access rights
  2671.          bits 11-0: access rights (see AX=4302h)
  2672.          bit 15: new password is to be set
  2673.     DS:DX -> ASCIZ pathname
  2674.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  2675. Return: CF clear if successful
  2676.     CF set on error
  2677.         AX = error code
  2678. Note:    if the file is already protected, the old password must be added after
  2679.       the pathname, separated by a ";"
  2680. SeeAlso: AX=4302h,AX=4454h
  2681. ----------214304-----------------------------
  2682. INT 21 - DR-DOS 5.0 internal - GET ???
  2683.     AX = 4304h
  2684.     ???
  2685. Return: CF clear if successful
  2686.         CX = AX = ???
  2687.     CF set on error
  2688.         AX = error code (see AH=59h)
  2689. SeeAlso: AX=4305h
  2690. ----------214305-----------------------------
  2691. INT 21 - DR-DOS 5.0 internal - SET ???
  2692.     AX = 4305h
  2693.     ???
  2694. Return: CF clear if successful
  2695.     CF set on error
  2696.         AX = error code (see AH=59h)
  2697. SeeAlso: AX=4304h
  2698. ----------214310-----------------------------
  2699. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  2700.     AX = 4310h
  2701.     DS:DX -> ASCIZ filename
  2702. Return: CF clear if successful
  2703.         CH = attributes (see AX=4311h)
  2704.     CF set on error
  2705.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2706. Note:    the filename may be a directory but must be on a VINES file service
  2707. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  2708. ----------214310-----------------------------
  2709. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  2710.     AX = 43100h
  2711.     CH = new attributes
  2712.         bit 7: unused
  2713.         bit 6: shareable
  2714.         bit 5: execute-only
  2715.         bits 4-0: unused
  2716.     DS:DX -> ASCIZ filename
  2717. Return: CF clear if successful
  2718.     CF set on error
  2719.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2720. Note:    the filename may be a directory but must be on a VINES file service
  2721. SeeAlso: AX=4301h,AX=4310h,INT 2F/AX=110Eh
  2722. ----------214400-----------------------------
  2723. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  2724.     AX = 4400h
  2725.     BX = handle
  2726. Return: CF clear if successful
  2727.         DX = device information word
  2728.         character device
  2729.           14: device driver can process IOCTL requests (see AX=4402h)
  2730.           13: output until busy supported
  2731.           11: driver supports OPEN/CLOSE calls
  2732.            7: set (indicates device)
  2733.            6: EOF on input
  2734.            5: raw (binary) mode
  2735.            4: device is special (uses INT 29)
  2736.            3: clock device
  2737.            2: NUL device
  2738.            1: standard output
  2739.            0: standard input
  2740.         disk file
  2741.           15: file is remote (DOS 3+)
  2742.           14: don't set file date/time on closing (DOS 3+)
  2743.           11: media not removable
  2744.            8: (DOS 4+) generate INT 24 if no disk space on write
  2745.            7: clear (indicates file)
  2746.            6: file has not been written
  2747.          5-0: drive number (0 = A:)
  2748.         AX destroyed
  2749.     CF set on error
  2750.         AX = error code (01h,05h,06h) (see AH=59h)
  2751. Note:    value in DH corresponds to high byte of device driver's attribute word
  2752.       if handle refers to a character device
  2753. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  2754. ----------214401-----------------------------
  2755. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  2756.     AX = 4401h
  2757.     BX = handle (must refer to character device)
  2758.     DX = device information word (see AX=4400h)
  2759.         (DH must be zero)
  2760. Return: CF clear if successful
  2761.     CF set on error
  2762.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2763. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  2764. ----------214402-----------------------------
  2765. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  2766.     AX = 4402h
  2767.     BX = file handle referencing character device
  2768.     CX = number of bytes to read
  2769.     DS:DX -> buffer
  2770. Return: CF clear if successful
  2771.         AX = number of bytes actually read
  2772.     CF set on error
  2773.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2774. Note:    format of data is driver-specific (see below for some specific cases)
  2775. SeeAlso: AX=4400h,AX=4403h,AX=4404h,INT 2F/AX=122Bh
  2776. ----------214402-----------------------------
  2777. INT 21 - Network Driver Interface Spec 2.0.1 - PROTOCOL MANAGER
  2778.     AX = 4402h
  2779.     BX = file handle for device "PROTMAN$"
  2780.     DS:DX -> request block (see below)
  2781.     CX = 000Eh (size of request block)
  2782.  
  2783. Format of request block for GetProtocolManagerInfo:
  2784. Offset    Size    Description
  2785.  00h    WORD    01h
  2786.  02h    WORD    returned status (see below)
  2787.  04h    DWORD    returned pointer to structure representing parsed user config
  2788.  08h    DWORD    unused
  2789.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  2790.  
  2791. Format of request block for RegisterModule:
  2792. Offset    Size    Description
  2793.  00h    WORD    02h
  2794.  02h    WORD    returned status (see below)
  2795.  04h    DWORD    pointer to module's common characteristics table (see below)
  2796.  08h    DWORD    pointer to list of modules to which the module is to be bound
  2797.  0Ch    WORD    unused
  2798.  
  2799. Format of request block for BindAndStart:
  2800. Offset    Size    Description
  2801.  00h    WORD    03h
  2802.  02h    WORD    returned status (see below)
  2803.  04h    DWORD    caller's virtual address in FailingModules structure
  2804.  08h    DWORD    unused
  2805.  0Ch    WORD    unused
  2806.  
  2807. Format of request block for GetProtocolManagerLinkage:
  2808. Offset    Size    Description
  2809.  00h    WORD    04h
  2810.  02h    WORD    returned status (see below)
  2811.  04h    DWORD    returned dispatch point
  2812.  08h    DWORD    unused
  2813.  0Ch    WORD    returned protocol manager DS
  2814. Note:    the dispatch point may be called as follows instead of using this IOCTL
  2815.     STACK: WORD  protocol manager DS
  2816.            DWORD pointer to request block
  2817.     Return: AX = returned status
  2818.         STACK popped
  2819.  
  2820. Format of request block for GetProtocolIniPath:
  2821. Offset    Size    Description
  2822.  00h    WORD    05h
  2823.  02h    WORD    returned status (see below)
  2824.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  2825.  08h    DWORD    unused
  2826.  0Ch    WORD    buffer length
  2827.  
  2828. Format of request block for RegisterProtocolManagerInfo:
  2829. Offset    Size    Description
  2830.  00h    WORD    06h
  2831.  02h    WORD    returned status (see below)
  2832.  04h    DWORD    pointer to structure containing parsed user config file
  2833.  08h    DWORD    unused
  2834.  0Ch    WORD    length of structure
  2835.  
  2836. Format of request block for InitAndRegister:
  2837. Offset    Size    Description
  2838.  00h    WORD    07h
  2839.  02h    WORD    returned status (see below)
  2840.  04h    DWORD    unused
  2841.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  2842.  0Ch    WORD    unused
  2843.  
  2844. Format of request block for UnbindAndStop:
  2845. Offset    Size    Description
  2846.  00h    WORD    08h
  2847.  02h    WORD    returned status (see below)
  2848.  04h    DWORD    failing modules as for BindAndStart
  2849.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  2850.         if 0000h:0000h, terminate a set of previously dynamically
  2851.           bound protocol modules
  2852.  0Ch    WORD    unused
  2853.  
  2854. Format of request block for BindStatus:
  2855. Offset    Size    Description
  2856.  00h    WORD    09h
  2857.  02h    WORD    returned status (see below)
  2858.  04h    DWORD    must be 0000h:0000h
  2859.         on return, points to root tree
  2860.  08h    DWORD    0000h:0000h
  2861.  0Ch    WORD    unused under DOS
  2862.  
  2863. Format of request block for RegisterStatus:
  2864. Offset    Size    Description
  2865.  00h    WORD    0Ah
  2866.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see below)
  2867.  04h    DWORD    0000h:0000h
  2868.  08h    DWORD    pointer to 16-byte ASCIZ module name
  2869.  0Ch    WORD    0000h
  2870.  
  2871. Values of status code:
  2872.  0000h success
  2873.  0001h wait for release--protocol has retained control of the data buffer
  2874.  0002h request queued
  2875.  0003h frame not recognized
  2876.  0004h frame rejected
  2877.  0005h frame should be forwarded
  2878.  0006h out of resource
  2879.  0007h invalid parameter
  2880.  0008h invalid function
  2881.  0009h not supported
  2882.  000Ah hardware error
  2883.  000Bh transmit error
  2884.  000Ch unrecognized destination
  2885.  000Dh buffer too small
  2886.  0020h already started
  2887.  0021h binding incomplete
  2888.  0022h driver not initialized
  2889.  0023h hardware not found
  2890.  0024h hardware failure
  2891.  0025h configuration failure
  2892.  0026h interrupt conflict
  2893.  0027h MAC incompatible
  2894.  0028h initialization failed
  2895.  0029h no binding
  2896.  002Ah network may be disconnected
  2897.  002Bh incompatible OS version
  2898.  002Ch already registered
  2899.  002Dh path not found
  2900.  002Eh insufficient memory
  2901.  002Fh info not found
  2902.  00FFh general failure
  2903.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  2904.  
  2905. Format of common characteristics table:
  2906. Offset    Size    Description
  2907.  00h    WORD    size of table in bytes
  2908.  02h    BYTE    NDIS major version
  2909.  03h    BYTE    NDIS minor version
  2910.  04h    WORD    reserved
  2911.  06h    BYTE    module major version
  2912.  07h    BYTE    module minor version
  2913.  08h    DWORD    module function flag bits
  2914.         bit 0: binding at upper boundary supported
  2915.         bit 1: binding at lower boundary supported
  2916.         bit 2: dynamically bound
  2917.         bits 3-31 reserved, must be 0
  2918.  0Ch 16 BYTEs    ASCIZ module name
  2919.  1Ch    BYTE    upper boundary protocol level
  2920.         01h Media Access Control
  2921.         02h Data link
  2922.         03h network
  2923.         04h transport
  2924.         05h session
  2925.         FFh not specified
  2926.  1Dh    BYTE    upper boundary interface type
  2927.         for MACs: 1 = MAC
  2928.         for data links and transports: to be defined
  2929.         for session: 1 = NCB
  2930.         any level: 0 = private (ISV-defined)
  2931.  1Eh    BYTE    lower boundary protocol level
  2932.         00h physical
  2933.         01h Media Access Control
  2934.         02h Data link
  2935.         03h network
  2936.         04h transport
  2937.         05h session
  2938.         FFh not specified
  2939.  1Fh    BYTE    lower boundary interface type
  2940.         same as offset 1Dh
  2941.  20h    WORD    module ID filled in by protocol manager
  2942.  22h    WORD    module DS
  2943.  24h    DWORD    system request entry point
  2944.  28h    DWORD    pointer to service-specific characteristics
  2945.         0000h:0000h if none
  2946.  2Ch    DWORD    pointer to service-specific status
  2947.         0000h:0000h if none
  2948.  30h    DWORD    pointer to upper dispatch table (see below)
  2949.         0000h:0000h if none
  2950.  34h    DWORD    pointer to lower dispatch table (see below)
  2951.         0000h:0000h if none
  2952.  38h    DWORD    reserved, must be 0
  2953.  3Ch    DWORD    reserved, must be 0
  2954. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  2955.       interpreted as 01h
  2956.  
  2957. Format of MAC Service-Specific Characteristics Table:
  2958. Offset    Size    Description
  2959.  00h    WORD    length of table in bytes
  2960.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  2961.         "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  2962.         "HDLC", or "ISDN"
  2963.  12h    WORD    length of station addresses in bytes
  2964.  14h 16 BYTEs    permanent station address
  2965.  24h 16 BYTEs    current station address
  2966.  34h    DWORD    current functional adapter address (00000000h if none)
  2967.  38h    DWORD    pointer to multicast address list
  2968.  3Ch    DWORD    link speed in bits/sec
  2969.  40h    DWORD    service flags
  2970.         bit 0: supports broadcast
  2971.             1: supports multicast
  2972.             2: supports functional/group addressing
  2973.             3: supports promiscuous mode
  2974.             4: station address software settable
  2975.             5: statistics always current
  2976.             6: supports InitiateDiagnostics
  2977.             7: supports loopback
  2978.             8: MAC does primarily ReceiveChain indications instead of
  2979.                ReceiveLookahead indications
  2980.             9: supports IBM source routing
  2981.            10: supports MAC reset
  2982.            11: supports Open/Close adapter
  2983.            12: supports interrupt request
  2984.            13: supports source routing bridge
  2985.            14: supports GDT virtual addresses (OS/2 version)
  2986.            15: multiple TransferDatas allowed durign a single
  2987.                indication
  2988.            16: MAC normally sets FrameSize = 0 in ReceiveLookahead
  2989.            17-31: reserved, must be 0
  2990.  44h    WORD    maximum frame size which may be both sent and received
  2991.  46h    DWORD    total transmit buffer capacity in bytes
  2992.  4Ah    WORD    transmit buffer allocation block size in bytes
  2993.  4Ch    DWORD    total receive buffer capacity in bytes
  2994.  50h    WORD    receive buffer allocation block size in bytes
  2995.  52h  3 BYTEs    IEEE vendor code
  2996.  55h    BYTE    vendor adapter code
  2997.  56h    DWORD    pointer to ASCIZ vendor adapter description
  2998.  5Ah    WORD    IRQ used by adapter
  2999.  5Ch    WORD    transmit queue depth
  3000.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  3001.  60h  N BYTEs    vendor-specific info
  3002.  
  3003. Format of NetBIOS Service-Specific Characteristics Table
  3004. Offset    Size    Description
  3005.  00h    WORD    length of table in bytes
  3006.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  3007.  12h    WORD    NetBIOS module code
  3008.  14h  N BYTEs    vendor-specific info
  3009.  
  3010. Format of MAC Service-Specific Status Table:
  3011. Offset    Size    Description
  3012.  00h    WORD    length of table in bytes
  3013.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  3014.         (FFFFFFFFh = never)
  3015.  06h    DWORD    MAC status bits
  3016.         bits 0-2: 000 hardware not installed
  3017.               001 hardware failed startup diagnostics
  3018.               010 hardware configuration problem
  3019.               011 hardware fault
  3020.               100 operating marginally due to soft faults
  3021.               101 reserved
  3022.               110 reserved
  3023.               111 hardware fully operational
  3024.         bit 3:      MAC bound
  3025.             4:      MAC open
  3026.             5:      diagnostics in progress
  3027.             6-31: reserved
  3028.  0Ah    WORD    current packet filter flags
  3029.         bit 0: directed/multicast or group/functional
  3030.             1: broadcast
  3031.             2: promiscuous
  3032.             3: all source routing
  3033.             4-15: reserved, must be zero
  3034.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  3035.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  3036.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  3037.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  3038.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  3039.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  3040.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  3041.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  3042.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  3043.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  3044.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  3045.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  3046.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  3047.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  3048.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  3049.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  3050.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  3051.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  3052.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  3053.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  3054.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  3055.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  3056.  64h  N BYTEs    vendor-specific info
  3057. ----------214402-----------------------------
  3058. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  3059.     AX = 4402h
  3060.     BX = handle for character device "GDMS"
  3061.     CX = number of bytes to read (>= 4)
  3062.     DS:DX -> buffer (see below)
  3063. Return: CF set on error
  3064.         AX = error code (see AH=59h)
  3065.     CF clear if successful
  3066.         AX = number of bytes read
  3067.  
  3068. Format of returned data:
  3069. Offset    Size    Description
  3070.  00h  4 BYTEs    ???
  3071.  04h    DWORD    pointer to ???
  3072.  08h  4 BYTEs    ???
  3073. ----------214402-----------------------------
  3074. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  3075.     AX = 4402h
  3076.     BX = handle for device "LA$TBYTE"
  3077.     CX = 0004h
  3078.     DS:DX -> DWORD to hold address of 39-byte table of ???
  3079. Return: CF set on error
  3080.         AX = error code (see AH=59h)
  3081.     CF clear if successful
  3082.         AX = number of bytes read
  3083. Note:    LASTBYTE.SYS is part of "The Last Byte" by Key Software Products
  3084. SeeAlso: AX=4402h"HIGHUMM"
  3085. ----------214402-----------------------------
  3086. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  3087.     AX = 4402h
  3088.     BX = handle for device "KSP$UMM"
  3089.     CX = 0004h
  3090.     DS:DX -> DWORD to hold entry point
  3091. Return: CF set on error
  3092.         AX = error code (see AH=59h)
  3093.     CF clear if successful
  3094.         AX = number of bytes read
  3095. Note:    HIGHUMM.SYS is part of "The Last Byte" by Key Software Products
  3096. SeeAlso: AX=4402h"LASTBYTE"
  3097.  
  3098. Call HIGHUMM.SYS entry point with:
  3099.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  3100.         DX = size in paragraphs
  3101.         Return: BX = segment number (if successful)
  3102.             DX = size of requested block/size of largest block
  3103.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  3104.         DX = segment number of UMB
  3105.     AH = 02h request a bank-switched memory block
  3106.         DX = size in paragraphs
  3107.         Return: BX = segment number (if successful)
  3108.             DX = size of requested block/size of largest block
  3109.     AH = 03h release a bank-switched memory block
  3110.         DX = segment number
  3111.     AH = 04h transfer data to/from high memory
  3112.         DS:SI -> source
  3113.         ES:DI -> destination
  3114.         CX = length in bytes
  3115.         Note: enables bank-switched memory, does the copy, then disables
  3116.         bank-switched memory
  3117.     AH = 05h get a word from bank-switched memory
  3118.         ES:DI -> word to read
  3119.         Return: DX = word
  3120.     AH = 06h put a word to bank-switched memory
  3121.         ES:DI -> word to write
  3122.         DX = word
  3123.     AH = 07h put a byte to bank-switched memory
  3124.         ES:DI -> byte to write
  3125.         DL = byte
  3126.     AH = 08h enable bank-switched memory
  3127.         DS:SI -> 6-byte status save area
  3128.     AH = 09h disable bank-switched memory
  3129.         DS:SI -> 6-byte save area from enable call (AH=08h)
  3130.     AH = 0Ah assign name to UMB or high bank-switched block
  3131.         DX = segment number
  3132.         DS:SI -> 8-byte blank-padded name
  3133.     AH = 0Bh locate UMB block by name
  3134.         DS:SI -> 8-byte blank-padded name
  3135.         Return: BX = segment number (if successful)
  3136.             DX = size of block
  3137.     AH = 0Ch locate bank-switched block by name
  3138.         DS:SI -> 8-byte blank-padded name
  3139.         Return: BX = segment number (if successful)
  3140.             DX = size of block
  3141. Return: AX = status code
  3142.         0001h successful
  3143.         0000h failed
  3144.         BL = error code
  3145.             80h not implemented
  3146.             B0h insufficient memory, smaller block available
  3147.             B1h insufficient memory, no blocks available
  3148.             B2h invalid segment number
  3149. Note:    only functions 00h and 01h are always available; the remaining
  3150.       functions are only enabled if the proper commandline switch is given
  3151. ----------214402-----------------------------
  3152. INT 21 - SMARTDRV.SYS - IOCTL - GET CACHE STATUS
  3153.     AX = 4402h
  3154.     BX = file handle for device "SMARTAAR"
  3155.     CX = number of bytes to read (min 28h)
  3156.     DS:DX -> buffer for status record (see below)
  3157. Return: CF clear if successful
  3158.         AX = number of bytes actually read
  3159.     CF set on error
  3160.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3161. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h
  3162.  
  3163. Format of SMARTDRV status record:
  3164. Offset    Size    Description
  3165.  00h    BYTE    write-through flag (always 01h)
  3166.  01h    BYTE    writes should be buffered (always 00h)
  3167.  02h    BYTE    cache enabled if 01h
  3168.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  3169.  04h    WORD    clock ticks between cache flushes (currently unused)
  3170.  06h    BYTE    cache contains locked tracks if nonzero
  3171.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  3172.  08h    BYTE    cache full track writes if nonzero
  3173.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  3174.  0Ah    DWORD    original INT 13 vector
  3175.  0Eh    BYTE    minor version number
  3176.  0Fh    BYTE    major version number
  3177.  10h    WORD    unused
  3178.  12h    WORD    sectors read            \
  3179.  14h    WORD    sectors already in cache     > may be scaled rather than
  3180.  16h    WORD    sectors already in track buffer /  absolute counts
  3181.  18h    BYTE    cache hit rate in percent
  3182.  19h    BYTE    track buffer hit rate in percent
  3183.  1Ah    WORD    total tracks in cache
  3184.  1Ch    WORD    number of tracks in use
  3185.  1Eh    WORD    number of locked tracks
  3186.  20h    WORD    number of dirty tracks
  3187.  22h    WORD    current cache size in 16K pages
  3188.  24h    WORD    original (maximum) cache size in 16K pages
  3189.  26h    WORD    minimum cache size in 16K pages
  3190.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  3191. ----------214402-----------------------------
  3192. INT 21 - CD-ROM device driver - IOCTL INPUT
  3193.     AX = 4402h
  3194.     BX = file handle referencing character device for CD-ROM driver
  3195.     CX = number of bytes to read
  3196.     DS:DX -> control block (see below)
  3197. Return: CF clear if successful
  3198.         AX = number of bytes actually read
  3199.     CF set on error
  3200.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3201. Note:    the data returned depends on the first byte of the control block; the
  3202.       remainder of the control block is filled by the driver
  3203. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  3204.  
  3205. Format of control block:
  3206. Offset    Size    Description
  3207.  00h    BYTE    data being requested
  3208.         00h device driver header address
  3209.         01h drive head location
  3210.         02h reserved
  3211.         03h error statistics
  3212.         04h audio channel info
  3213.         05h raw drive bytes (uninterpreted and device-specific)
  3214.         06h device status
  3215.         07h sector size
  3216.         08h volume size
  3217.         09h media change status
  3218.         0Ah audio disk info
  3219.         0Bh audio track info
  3220.         0Ch audio Q-Channel info
  3221.         0Dh audio sub-channel info
  3222.         0Eh UPC code
  3223. ---function 00h---
  3224.  01h    DWORD    device driver header address (see also AH=52h)
  3225. ---function 01h---
  3226.  01h    BYTE    addressing mode
  3227.         00h HSG
  3228.         01h Red Book
  3229.  02h    DWORD    current location of drive's head
  3230.         logical sector number in HSG mode
  3231.         frame/second/minute/unused in Red Book mode
  3232.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  3233. ---function 03h---
  3234.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  3235. ---function 04h---
  3236.  01h    BYTE    input channel (0-3) for output channel 0
  3237.  02h    BYTE    volume for output channel 0
  3238.  03h    BYTE    input channel (0-3) for output channel 1
  3239.  04h    BYTE    volume for output channel 1
  3240.  05h    BYTE    input channel (0-3) for output channel 2
  3241.  06h    BYTE    volume for output channel 2
  3242.  07h    BYTE    input channel (0-3) for output channel 3
  3243.  08h    BYTE    volume for output channel 3
  3244. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  3245.       right prime; a volume of 00h is off
  3246.     the default setting is for each input channel to be assigned to the
  3247.       same-numbered output channel at full (FFh) volume
  3248. ---function 05h---
  3249.  01h    BYTE    number of bytes read
  3250.  02h 128 BYTEs    buffer for drive bytes
  3251. ---function 06h---
  3252.  01h    DWORD    device parameters
  3253.         bit 0: door open
  3254.             1: door unlocked
  3255.             2: supports raw reading in addition to cooked
  3256.             3: writable
  3257.             4: can play audio/video tracks
  3258.             5: supports interleaving
  3259.             6: reserved
  3260.             7: supports prefetch requests
  3261.             8: supports audio channel control
  3262.             9: supports Red Book addressing in addition to HSG
  3263.            10: audio is playing
  3264. ---function 07h---
  3265.  01h    BYTE    read mode
  3266.         00h cooked
  3267.         01h raw
  3268.  02h    WORD    sector size in bytes
  3269. ---function 08h---
  3270.  01h    DWORD    volume size in sectors
  3271. ---function 09h---
  3272.  01h    BYTE    media change status
  3273.         00h don't know
  3274.         01h media unchanged
  3275.         FFh media has been changed
  3276. ---function 0Ah---
  3277.  01h    BYTE    lowest audio track number
  3278.  02h    BYTE    highest audio track number
  3279.  03h    DWORD    start address of lead-out track (Red Book format)
  3280. --function 0Bh---
  3281.  01h    BYTE    track number (set by caller)
  3282.  02h    DWORD    starting point of track (Red Book format)
  3283.  06h    BYTE    track control info
  3284.         bits 15,14,12: track type (notice: bits not contiguous!)
  3285.             000 two audio channels, no pre-emphasis
  3286.             001 two audio channels with pre-emphasis
  3287.             010 data track
  3288.             100 four audio channels, no pre-emphasis
  3289.             101 four audio channels with pre-emphasis
  3290.             other reserved
  3291.         bit 13: digital copy permitted
  3292. ---function 0Ch---
  3293.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  3294.  02h    BYTE    track number
  3295.  03h    BYTE    point or index
  3296.  04h    BYTE    minute    \
  3297.  05h    BYTE    second     > running time within track
  3298.  06h    BYTE    frame    /
  3299.  07h    BYTE    zero
  3300.  08h    BYTE    "AMIN" or "PMIN"     \
  3301.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  3302.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  3303. ---function 0Dh---
  3304.  01h    DWORD    starting frame address (Red Book format)
  3305.  05h    DWORD    transfer address
  3306.  09h    DWORD    number of sectors to read
  3307. Note:    copies 96 bytes of sub-channel info per sector into buffer
  3308. ---function 0Eh---
  3309.  01h    BYTE    CONTROL and ADR byte
  3310.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  3311.  09h    BYTE    zero
  3312.  0Ah    BYTE    "AFRAME"
  3313. ----------214402-----------------------------
  3314. INT 21 U - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  3315.     AX = 4402h
  3316.     BX = file handle for device "QEMM386$"
  3317.     CX = 0004h
  3318.     DS:DX -> DWORD buffer for API entry point
  3319. Return: CF clear if successful
  3320.         buffer filled (see INT 67/AH=3Fh for entry point parameters)
  3321.     CF set on error
  3322.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3323. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3324. ----------214402-----------------------------
  3325. INT 21 U - Quarterdeck - QEMM-386 v6+ - GET ???
  3326.     AX = 4402h
  3327.     BX = file handle for device "EMMXXXX0"
  3328.     CX = 0006h (size of buffer in bytes)
  3329.     DS:DX -> buffer for ???
  3330.         first byte must be 01h on entry
  3331. Return: CF clear if successful
  3332.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  3333.     CF set on error
  3334.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3335. Note:    this call always returns an error if Windows3 support has been disabled
  3336.       with the NW3 switch to QEMM386.SYS
  3337. SeeAlso: INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3338. ----------214402-----------------------------
  3339. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  3340.     AX = 4402h
  3341.     BX = file handle for device "HOOKROM$"
  3342.     CX = 0004h
  3343.     DS:DX -> DWORD buffer for address of hooked vector table (see below)
  3344. Return: CF clear if successful
  3345.         DS:DX buffer filled
  3346.     CF set on error
  3347.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3348. SeeAlso: AX=4402h"QEMM"
  3349.  
  3350. Format of hooked vector table entry:
  3351. Offset    Size    Description
  3352.  00h  5 BYTEs    FAR jump to actual interrupt handler
  3353.          (end of table if first byte is not EAh)
  3354.  05h    BYTE    interrupt vector number
  3355. ----------214402-----------------------------
  3356. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  3357.     AX = 4402h
  3358.     BX = file handle for device "SCSIMGR$"
  3359.     CX = 0004h
  3360.     DS:DX -> buffer for function address
  3361. Return: CF clear if successful
  3362.         AX = 0004h
  3363.     CF set on error
  3364.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3365. Note:    the function address is called with the address of a SCSI Request
  3366.       Block on the stack and the caller must clean up the stack
  3367. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  3368.  
  3369. Format of SCSI Request Block (64 bytes):
  3370. Offset    Size    Description
  3371.  00h    BYTE    request number
  3372.         00h "HA_INQ"     host adapter inquiry
  3373.         01h "GET_TYPE"     get device type
  3374.         02h "EXEC_SIO"     execute SCSI I/O
  3375.         03h "ABORT_SRB"  abort SRB
  3376.         04h "RESET_DEV"  reset SCSI device
  3377.         05h "SET_HAPRMS" set host adapter parameters
  3378.  01h    BYTE    request status
  3379.         00h not done yet
  3380.         02h aborted
  3381.         04h SCSI I/O error
  3382.         80h invalid
  3383.         81h no adapter
  3384.          82h no device attached
  3385.         else status
  3386.  02h    BYTE    host adapter ID
  3387.  03h    BYTE    request flags
  3388.          bit 3: ???
  3389.  04h    DWORD    reserved
  3390. ---request 00h---
  3391.  08h    BYTE    (returned) number of host adapters
  3392.  09h    BYTE    (returned) target adapter ID
  3393.  0Ah 16 BYTEs    (returned) manager ID
  3394.  1Ah 16 BYTEs    (returned) adapter ID
  3395.  2Ah 16 BYTEs    (returned) parameters
  3396. ---request 01h---
  3397.  08h    BYTE    target ID
  3398.  09h    BYTE    logical unit number
  3399.  0Ah    BYTE    (returned) device type
  3400.          01h streamer
  3401. ---request 02h---
  3402.  08h    BYTE    target ID
  3403.  09h    BYTE    logical unit number
  3404.  0Ah    DWORD    data allocation length
  3405.  0Eh    BYTE    sense allocation length
  3406.  0Fh    DWORD    data buffer pointer
  3407.  13h    DWORD    next request pointer (for linking)
  3408.  17h    BYTE    CDB length
  3409.  18h    BYTE    (returned) host adapter status
  3410.          11h select timeout
  3411.         12h data overrun
  3412.         13h bus error
  3413.         14h bus failure
  3414.  19h    BYTE    (returned) target status
  3415.          02h sense data stored in SRB
  3416.          08h target busy
  3417.         18h reservation error
  3418.  1Ah    DWORD    post routine address
  3419.  1Eh    WORD    real mode Post DS
  3420.  20h    DWORD    SRB pointer
  3421.  24h    WORD    reserved
  3422.  26h    DWORD    SRB physical address
  3423.  2Ah 22 BYTEs    SCSIMGR$ workspace
  3424.  40h  N BYTEs    CCB (20-24 bytes)
  3425. ---request 04h---
  3426.  08h    BYTE    target ID
  3427.  09h    BYTE    logical unit number
  3428.  0Ah 14 BYTEs    reserved
  3429.  18h    BYTE    (returned) host adapter status (see above)
  3430.  19h    BYTE    (returned) target status (see above)
  3431.  1Ah    DWORD    post routine address
  3432.  1Eh 34 BYTEs    workspace
  3433.  
  3434. Format of CCB:
  3435. Offset    Size    Description
  3436.  00h    BYTE    command code
  3437.         01h rewind
  3438.         05h get block size limits
  3439.         08h read
  3440.         0Ah write
  3441.         10h write file marks
  3442.         11h SCSI Space (set position?)
  3443.         12h SCSI Inquire
  3444.         19h erase
  3445.         1Bh load/unload media
  3446.  01h    BYTE    flags
  3447.          bits 4-0: vary by function
  3448.         bits 7-5: logical unit number
  3449.  02h    BYTE    "adr_1"
  3450.  03h    BYTE    "adr_0"
  3451.  04h    BYTE    length
  3452.  05h    BYTE    control
  3453.      ...
  3454.  06h/0Ah 14 BYTEs buffer for sense data
  3455. ----------214402-----------------------------
  3456. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  3457.     AX = 4402h
  3458.     BX = file handle for device "386MAX$$"
  3459.     CX = 005Ah
  3460.     DS:DX -> 386MAX state buffer (see below)
  3461. Return: CF clear if successful
  3462.         buffer filled
  3463.         AX = number of bytes actually copied
  3464.     CF set on error
  3465.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3466. Notes:    the buffer must be one byte larger than the value given in CX; if the
  3467.       value is less than 5Ah, only a partial state record will be returned
  3468.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  3469.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  3470.       56h bytes for v5.11.
  3471.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  3472.       the word at offset 25h in the returned state, load all other
  3473.       registers as needed for the desired function, and execute an
  3474.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  3475.       if it is not otherwise modified by the API function.
  3476. SeeAlso: AX=4403h"386MAX",INT 67/AH=3Fh
  3477.  
  3478. Format of 386MAX v6.01 state:
  3479. Offset    Size    Description
  3480.  00h    BYTE    version number of state structure (must be set on entry;
  3481.           v6.01 returns an error if not 03h)
  3482.  01h  6 BYTEs    signature "386MAX"
  3483.  07h  4 BYTEs    version string "N;NN" (i.e. "6;01" for v6.01)
  3484.  0Bh    WORD    segment of low-memory portion of 386MAX.SYS
  3485.  0Dh  2 BYTEs    ???
  3486.  0Fh    WORD    segment of ??? memory block or 0000h
  3487.  11h    WORD    bit flags
  3488.         bit 1: ???
  3489.         bit 2: ???
  3490.         bit 3: ??? (cleared by calling INT 67 functions)
  3491.         bit 5: ???
  3492.         bit 6: 386MAX active???
  3493.         bit 7: 386MAX is providing EMS services
  3494.         bit 8: ???
  3495.         bit 9: ??? (see INT 15/AX=2402h)
  3496.         bit 10: ???
  3497.         bit 11: ???
  3498.         bit 12: ???
  3499.         bit 13: QPMS has been used
  3500.         bit 14: ???
  3501.         bit 15: ???
  3502.  13h    WORD    starting address of video memory in K
  3503.  15h  8 BYTEs    ???
  3504.  1Dh    WORD    KBytes extended memory used by 386MAX
  3505.  1Fh  2 BYTEs    ???
  3506.  21h    WORD    ???
  3507.  23h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  3508.  25h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  3509.  27h    WORD    ???
  3510.  29h  2 BYTEs    ???
  3511.  2Bh    DWORD    ???
  3512.  2Fh  4 BYTEs    ???
  3513.  33h    WORD    system configuration??? flags
  3514.          bit 1: ROM compressed???
  3515.          bit 3: ???
  3516.         bit 5: 386MAX loaded into high memory
  3517.          bit 11: PC/XT (thus only single 8259 interrupt controller
  3518.                 present, DMA only in 1st megabyte, etc)
  3519.  35h    WORD    ??? bit flags
  3520.  37h  4 BYTEs    ???
  3521.  3Bh    WORD    segment of first MCB in high memory chain???
  3522.  3Dh    WORD    flags
  3523.          bit 2: no DPMI services
  3524.          bit 11: don't backfill holes in video memory area
  3525.         bit 12: don't backfill below video memory???
  3526.  3Fh    WORD    flags
  3527.          bit 7: ???
  3528.  41h    WORD    flags
  3529.          bit 0: Windows3 support enabled
  3530.         bit 8: ???
  3531.  43h  2 BYTEs    ???
  3532.  45h    WORD    amount of memory to report available on INT 15/AH=88h
  3533.  47h  4 BYTEs    ???
  3534.  4Bh    WORD    ???
  3535.  4Dh  2 BYTEs    ???
  3536.  4Fh    WORD    ???
  3537.  51h    WORD    bit flags
  3538.          bit 12: ???
  3539.  53h    DWORD    old INT 21h
  3540.  57h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  3541.  
  3542. Format of high memory info record:
  3543. Offset    Size    Description
  3544.  00h    WORD    segment address of memory region
  3545.  02h    WORD    size of memory region in paragraphs
  3546.  04h    BYTE    type or flags???
  3547.          00h if locked out
  3548.         02h if EMS page frame
  3549.         04h if high RAM
  3550.         42h if ROM
  3551.  05h    BYTE    ???
  3552.  
  3553. Format of ROM shadowing record:
  3554. Offset    Size    Description
  3555.  00h    WORD    segment of ROM???
  3556.  02h    WORD    segment of ROM???
  3557.  04h  2 BYTEs    ???
  3558.  06h    WORD    size of shadowed ROM in paragraphs
  3559.  08h  4 BYTEs    ???
  3560.  
  3561. Values for memory type:
  3562.  00h unused by EMS
  3563.  01h DOS
  3564.  04h page frame overlapping ROM???
  3565.  80h high memory
  3566.  84h page frame???
  3567.  87h video ROM???
  3568. Note:    the type may be 00h (unused) if the 16K page is split among different
  3569.       uses (such as ROM and high RAM)
  3570.  
  3571. Call 386MAX API (via OUT DX,AL) with:
  3572.     STACK: WORD value for DX
  3573.     AH = 01h get high memory information
  3574.         ES:DI -> buffer for array of high memory info records
  3575.             (see above)
  3576.         Return: CX = number of records placed in buffer
  3577.     AH = 02h get shadowed ROM info???
  3578.         ES:DI -> buffer for array of ROM shadowing records (see above)
  3579.         Return: CX = number of records placed in buffer
  3580.     AH = 03h get 386MAX state
  3581.         ES:DI -> 90-byte buffer for state (see above)
  3582.         Return: AH = 00h (successful)
  3583.             buffer filled
  3584.         Note:    unlike INT 21/AX=4402h"386MAX", this function omits
  3585.               the first byte specifying the state buffer version
  3586.     AH = 04h get memory types???
  3587.         ES:DI -> buffer for memory type info (array of bytes, one per
  3588.             16K page) (see above)
  3589.         Return:    CX = number of bytes placed in buffer
  3590.     AH = 05h get ???
  3591.         AL = subfunction
  3592.             00h invoke INT 15/AX=2401h first
  3593.             01h don't invoke INT 15/AX=2401h first
  3594.         CX = number of bytes to copy (0000h for default)
  3595.         SI = ???
  3596.         ES:DI -> buffer for ???
  3597.         Return: CX = number of bytes actually copied
  3598.             ???
  3599.     AH = 06h get memory speed info
  3600.         ES:DI -> buffer for memory speed records (see below)
  3601.         Return: AH = 00h (successful)
  3602.             CX = number of bytes placed in buffer
  3603.         Note:    this function can take over a second to execute
  3604.     AH = 07h ???
  3605.         ???
  3606.         Return:    ???
  3607.     AH = 08h ???
  3608.         AL = ??? (00h or nonzero)
  3609.     AH = 09h toggle ??? flags
  3610.         BX = bitmask of bits of ??? flags (word at state+11h) to toggle
  3611.         Return: AH = 00h (successful)
  3612.         Note: invokes INT 15/AX=2401h first
  3613.     AH = 0Ah toggle ??? flags
  3614.         BX = bitmask of bits of ??? (word at state+33h) to toggle
  3615.         Return: AH = 00h (successful)
  3616.         Notes:    invokes INT 15/AX=2401h first
  3617.             does ??? if bit 3 on after specified bits are toggled
  3618.     AH = 0Bh toggle ??? flags
  3619.         BX = bitmask of bits of ??? (word at state+35h) to toggle
  3620.         Return: AH = 00h (successful)
  3621.         Note: invokes INT 15/AX=2401h first
  3622.     AH = 0Ch toggle ??? flags
  3623.         BX = bitmask of bits of ??? (word at state+41h) to toggle
  3624.         Return: AH = 00h (successful)
  3625.         Note: invokes INT 15/AX=2401h first
  3626.     AH = 0Dh specify 386MAX high-memory location
  3627.         BX = segment address of high-memory real-mode portion of 386MAX
  3628.         ???
  3629.         Return: AH = status (00h successful)
  3630.             ???
  3631.     AH = 0Eh CRT controller register virtualization
  3632.         AL = subfunction
  3633.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  3634.             01h trap accesses to CRTC I/O ports
  3635.     AH = 0Fh reboot system
  3636.         Return: never
  3637.     AH = 11h get high memory information
  3638.         ES:DI -> 96-byte buffer for high memory info
  3639.         Return: AH = 00h (successful)
  3640.             ES:DI buffer filled
  3641.         Notes:    each byte in buffer contains bit flags for a 4K page in
  3642.               the A000h-FFFFh region
  3643.                 bit 0: ???
  3644.                 bit 1: physical address same as linear address
  3645.                 bit 2: EMS page frame
  3646.                 bit 6: ???
  3647.             this function can take over a second to execute
  3648.     AH = 12h ???
  3649.         AL = subfunction
  3650.             00h ???
  3651.             01h ???
  3652.         ???
  3653.         Return: AH = 00h (successful) if AL=00h or 01h
  3654.             AH = 8Fh otherwise
  3655.     AH = 13h page protection???
  3656.         AL = subfunction
  3657.             00h set all ??? 4K pages to read-only???
  3658.             01h set all ??? 4K pages to read-write???
  3659.         ???
  3660.         Return: AH = 00h (successful) if AL=00h or 01h
  3661.             AH = 8Fh otherwise
  3662.     AH = 15h ???
  3663.         ???
  3664.         Return: ???
  3665.     AH = 16h get 386MAX memory usage screen
  3666.         ES:DI -> buffer for memory info display
  3667.         CX = size of buffer in bytes
  3668.         Return:    ES:DI buffer filled with '$'-terminated string (if
  3669.                 large enough to hold entire usage screen)
  3670.     AH = 17h Windows 3 startup/termination
  3671.         AL = subfunction
  3672.             00h Windows3 initializing
  3673.             DX (on stack) = Windows startup flags
  3674.             DI = Windows version number (major in upper byte)
  3675.             ES:BX = 0000h:0000h
  3676.             DS:SI = 0000h:0000h
  3677.             Return: CX = 0000h if OK for Windows to load
  3678.                    <> 0 if Windows should not load
  3679.                 ES:BX -> startup info structure
  3680.                 DS:SI -> Virtual86 mode enable/disable callback
  3681.             01h Windows3 terminating
  3682.                 ES:BX -> ???
  3683.             DX (on stack) = Windows exit flags
  3684.             Return: ???
  3685.     AH = 18h QPMS (Qualitas Protected Memory Services)
  3686.         AL = subfunction
  3687.             00h get QPMS configuration
  3688.                 Return: BX = starting segment of QPMS memory window
  3689.                 CX = number of 4K pages reserved for QPMS???
  3690.                 DX = number of 4K pages in QPMS window???
  3691.             01h map QPMS memory page???
  3692.                 BX = 4K page number within memory reserved for QPMS???
  3693.             CL = 4K page number within QPMS memory window???
  3694.             02h mark all QPMS memory read-only
  3695.             03h mark all QPMS memory read-write
  3696.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  3697.     AH = 19h get linear address for physical address
  3698.         EDX = physical address (low word on stack)
  3699.         Return: AH = status
  3700.                 00h successful
  3701.                     EDX = linear address at which physical address
  3702.                     may be accessed
  3703.                 8Bh physical address currently not addressable
  3704.         Note: calls INT 15/AX=2401h first
  3705.     AH = 1Ah set page table entry???
  3706.         EDX = new page table entry??? (low word on stack)
  3707.         ESI = linear address of page???
  3708.         Return: AH = status (00h,8Bh)
  3709.         Note: calls INT 15/AX=2401h first
  3710.     AH = 1Bh get ???
  3711.         Return: AH = status
  3712.             BX = ???
  3713.             CX = ???
  3714.             EDX = physical address of ???
  3715.     AH = 1Ch get original interrupt vector
  3716.         AL = interrupt vector (00h-7Fh)
  3717.         Return: AH = 00h (successful)
  3718.             EDX = original vector before 386MAX loaded (segment in
  3719.                 high word, offset in low word)
  3720.         Note:    no range checking is performed; requests for INTs 80h-
  3721.               FFh will return random values
  3722.     AH = 1Dh display string???
  3723.         SI = ???
  3724.         Return: AH = 00h (successful)
  3725.             ???
  3726.     AH = 1Eh ???
  3727.         ES:DI -> ???
  3728.         ???
  3729.         Return: ???
  3730.     AH = 1Fh ???
  3731.         ???
  3732.         Return: AX = 0000h if successful
  3733.             BX = ??? (0001h for 386MAX v6.01)
  3734.             CL = ???
  3735.             DL = ??? (5Ah for 386MAX v6.01)
  3736.             DH = ??? (00h for 386MAX v6.01)
  3737.             SI = ???
  3738.             ES???:DI -> ???
  3739.     AH = 40h-5Dh EMS services (see INT 67/AH=40h etc)
  3740.     AH = DEh VCPI services (see INT 67/AX=DE00h etc)
  3741. Return: AH = status (as for EMS INT 67 calls)
  3742.         00h successful
  3743.         80h internal error
  3744.         81h hardware malfunction
  3745.         83h invalid handle
  3746.         84h    undefined function
  3747.         8Ah invalid logical page nuber
  3748.         8Bh illegal physical page number
  3749.         8Fh undefined subfunction
  3750.         A4h access denied
  3751.         etc.
  3752.     STACK popped (value placed in DX if no specific return value for DX)
  3753.  
  3754. Format of memory speed record:
  3755. Offset    Size    Description
  3756.  00h    DWORD    page table entry for 4K page
  3757.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  3758.          entire 4K page
  3759. ----------214402-----------------------------
  3760. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  3761.     AX = 4402h
  3762.     BX = file handle for device "PGS1600$"
  3763.     CX = 0018h (size of buffer)
  3764.     DS:DX -> configuration buffer (see below)
  3765. Return: CF clear if successful
  3766.         buffer filled
  3767.         AX = number of bytes actually copied
  3768.     CF set on error
  3769.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3770. Note:    PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  3771.       display adapter, which provides a 1600x1200 monochrome display as
  3772.       well as one of two emulations, MDA or CGA.
  3773. SeeAlso: AX=4403h"PGS1600"
  3774.  
  3775. Format of configuration information:
  3776. Offset    Size    Description
  3777.  00h    WORD    version (high byte = major, low byte = minor)
  3778.  02h    WORD    board initialisation mode
  3779.  04h    WORD    board I/O address
  3780.          03D0h CGA emulation
  3781.         03B0h MDA emulation
  3782.         0390h no emulation
  3783.         0350h no emulation, alternate
  3784.  06h    WORD    emulation buffer segment
  3785.          B800h    CGA emulation
  3786.         B000h    MDA emulation
  3787.         0000h    no emulation
  3788.  08h    WORD    PG1600 graphics buffer segment
  3789.  0Ah    WORD    number of bytes between consecutive graphic rows
  3790.  0Ch    WORD    horizontal pixel size
  3791.  0Eh    WORD    vertical pixel size
  3792.  10h    WORD    horizontal dots per inch
  3793.  12h    WORD    vertical dots per inch
  3794.  14h    WORD    graphics buffer bits per pixel
  3795.  16h    WORD    monitor bits per pixel
  3796. ----------214402-----------------------------
  3797. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  3798.     AX = 4402h
  3799.     BX = file handle referencing device "$IPCUST"
  3800.     CX, DS:DX ignored
  3801. Return: CF clear if successful
  3802.         AX destroyed
  3803.     CF set on error
  3804.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3805. Note:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  3806.       version 2.05.  If less than the entire data is read or written,
  3807.       the next read/write continues where the previous one ended; this
  3808.       call and AX=4403h both reset the location at which the next
  3809.       operation starts to zero
  3810. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  3811. ----------214403-----------------------------
  3812. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  3813.     AX = 4403h
  3814.     BX = file handle referencing character device
  3815.     CX = number of bytes to write
  3816.     DS:DX -> data to write
  3817. Return: CF clear if successful
  3818.         AX = number of bytes actually written
  3819.     CF set on error
  3820.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3821. Notes:    format of data is driver-specific (see below for some specific cases)
  3822.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  3823.       KEYSTACK.SYS driver will push the specified characters on the
  3824.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  3825.       driver will push the characters onto the keyboard stack
  3826. SeeAlso: AX=4400h,AX=4402h,AX=4405h,INT 2F/AX=122Bh,INT 2F/AX=D44Dh
  3827. SeeAlso: INT 2F/AX=D44Fh
  3828. ----------214403-----------------------------
  3829. INT 21 - SMARTDRV.SYS - IOCTL - CACHE CONTROL
  3830.     AX = 4403h
  3831.     BX = handle for device "SMARTAAR"
  3832.     CX = number of bytes to write
  3833.     DS:DX -> SMARTDRV control block (see below)
  3834. Return: CF clear if successful
  3835.         AX = number of bytes actually written
  3836.            = 0000h if control block too small for given command
  3837.     CF set on error
  3838.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3839. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h
  3840.  
  3841. Format of SMARTDRV control block:
  3842. Offset    Size    Description
  3843.  00h    BYTE    function code
  3844.         00h flush cache
  3845.         01h flush and discard cache
  3846.         02h disable caching (flushes and discards cache first)
  3847.         03h enable caching
  3848.         04h control write caching
  3849.         05h set flushing tick count
  3850.         06h lock cache contents
  3851.         07h unlock cache contents
  3852.         08h set flush-on-reboot flag
  3853.         09h unused
  3854.         0Ah control full-track caching
  3855.         0Bh reduce cache size
  3856.         0Ch increase cache size
  3857.         0Dh set INT 13 chain address
  3858. ---function 04h---
  3859.  01h    BYTE    write caching control action
  3860.         00h turn off write-through
  3861.         01h turn on write-through
  3862.         02h turn off write buffering (also flushes cache)
  3863.         03h turn on write buffering (also flushes cache)
  3864. ---function 05h---
  3865.  01h    WORD    number of timer ticks between cache flushes
  3866. ---function 08h---
  3867.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  3868. ---function 0Ah---
  3869.  01h    BYTE    full-track writes are
  3870.         00h not cached
  3871.         01h cached
  3872. ---functions 0Bh,0Ch---
  3873.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  3874. ---function 0Dh---
  3875.  01h    DWORD    new address to which to chain on INT 13
  3876. Note:    the previous address is not preserved
  3877. ----------214403-----------------------------
  3878. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  3879.     AX = 4403h
  3880.     BX = file handle referencing character device for CD-ROM driver
  3881.     CX = number of bytes to write
  3882.     DS:DX -> control block (see below)
  3883. Return: CF clear if successful
  3884.         AX = number of bytes actually written
  3885.     CF set on error
  3886.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3887. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  3888.  
  3889. Format of control block:
  3890. Offset    Size    Description
  3891.  00h    BYTE    function code
  3892.         00h eject disk
  3893.         01h lock/unlock door
  3894.         02h reset drive
  3895.         03h control audio channel
  3896.         04h write device control string
  3897.         05h close tray
  3898. ---functions 00h,02h,05h---
  3899.  no further fields
  3900. ---function 01h---
  3901.  01h    BYTE    lock function
  3902.         00h unlock door
  3903.         01h lock door
  3904. ---function 03h---
  3905.  01h    BYTE    input channel (0-3) for output channel 0
  3906.  02h    BYTE    volume for output channel 0
  3907.  03h    BYTE    input channel (0-3) for output channel 1
  3908.  04h    BYTE    volume for output channel 1
  3909.  05h    BYTE    input channel (0-3) for output channel 2
  3910.  06h    BYTE    volume for output channel 2
  3911.  07h    BYTE    input channel (0-3) for output channel 3
  3912.  08h    BYTE    volume for output channel 3
  3913. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  3914.       right prime; a volume of 00h is off
  3915. ---function 04h---
  3916.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  3917.         interpretation
  3918. ----------214403-----------------------------
  3919. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  3920.     AX = 4403h
  3921.     BX = handle for device "SCSITAPE"
  3922.     CX = number of bytes to write
  3923.     DS:DX -> SCSITAPE control block (see below)
  3924. Return: CF clear if successful
  3925.         AX = number of bytes actually written
  3926.     CF set on error
  3927.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3928. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  3929.  
  3930. Format of SCSITAPE control block:
  3931. Offset    Size    Description
  3932.  00h    WORD    command type
  3933.         'F' Format (argument 1 = interleave, argument 2 = format type)
  3934.         'E' Erase
  3935.         'R' Rewind
  3936.         'L' Load
  3937.         'N' No Load
  3938.         'S' Space (argument 1 = count, argument 2 = type)
  3939.         'M' File Mark (argument 1 = count)
  3940.         'A' Reassign 
  3941.  02h    WORD    argument 1
  3942.  04h    WORD    argument 2
  3943.  06h    WORD    segment of command buffer
  3944.  08h    WORD    offset of command buffer
  3945.  0Ah    WORD    length of command buffer
  3946. ----------214403-----------------------------
  3947. INT 21 U - AI Architects - OS/x86??? - API
  3948.     AX = 4403h
  3949.     BX = handle for device "AIA_OS"
  3950.     CX = number of bytes to write (ignored)
  3951.     DS:DX -> 12-byte buffer, first byte is command:
  3952.             81h installation check
  3953.             82h get API entry point
  3954.             84h uninstall
  3955. Return: CF clear if successful
  3956.         AX = number of bytes actually written
  3957.     CF set on error
  3958.         AX = error code (01h,05h,06h,0Ch,0Dh) (see AH=59h)
  3959. Notes:    these functions are only available if the DOS extender was loaded as a
  3960.       device driver in CONFIG.SYS
  3961.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  3962. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  3963.  
  3964. Format of buffer on return:
  3965. Offset    Size    Description
  3966.  00h  4 BYTEs    signature "IABH"
  3967. ---if func 81h---
  3968.  (no additional fields)
  3969. ---if func 82h---
  3970.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  3971. ---if func 84h---
  3972.  04h    WORD    success indicator
  3973.  06h    WORD    segment of ???
  3974.  08h    WORD    segment of ??? memory block to free if nonzero
  3975.  0Ah    WORD    segment of ??? memory block to free if nonzero
  3976. ----------214403-----------------------------
  3977. INT 21 U - Qualitas 386MAX v6.01 - SET STATE
  3978.     AX = 4403h
  3979.     BX = handle for device "386MAX$$"
  3980.     CX = number of bytes to copy (up to 5Ah)
  3981.     DS:DX -> 386MAX state buffer (see AX=4402h"386MAX")
  3982. Return: CF clear if successful
  3983.         AX = number of bytes actually written
  3984.     CF set on error
  3985.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3986. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  3987.       (specifying the version of the state record) and the buffer must
  3988.       contain CX bytes AFTER the initial byte
  3989. SeeAlso: AX=4402h"386MAX"
  3990. ----------214403-----------------------------
  3991. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  3992.     AX = 4403h
  3993.     BX = file handle for device "PGS1600$"
  3994.     CX = 0018h (size of buffer)
  3995.     DS:DX -> configuration buffer (see AX=4402h"PGS1600")
  3996. Return: CF clear if successful
  3997.         AX = number of bytes actually written
  3998.     CF set on error
  3999.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4000. Note:    PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  4001.       display adapter, which provides a 1600x1200 monochrome display as
  4002.       well as one of two emulations, MDA or CGA.
  4003. SeeAlso: AX=4402h"PGS1600"
  4004. ----------214403-----------------------------
  4005. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  4006.     AX = 4403h
  4007.     BX = file handle referencing device "$IPCUST"
  4008.     CX, DS:DX ignored
  4009. Return: CF clear if successful
  4010.         AX destroyed
  4011.     CF set on error
  4012.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4013. Note:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  4014.       version 2.05.  If less than the entire data is read or written,
  4015.       the next read/write continues where the previous one ended; this
  4016.       call and AX=4402h both reset the location at which the next
  4017.       operation starts to zero
  4018. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  4019. ----------214404-----------------------------
  4020. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  4021.     AX = 4404h
  4022.     BL = drive number (00h = default, 01h = A:, etc)
  4023.     CX = number of bytes to read
  4024.     DS:DX -> buffer
  4025. Return: CF clear if successful
  4026.         AX = number of bytes actually read
  4027.     CF set on error
  4028.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4029. Note:    format of data is driver-specific
  4030. SeeAlso: AX=4402h,AX=4405h,INT 2F/AX=122Bh
  4031. ----------214404-----------------------------
  4032. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  4033.     AX = 4404h
  4034.     BL = drive number (00h = default, 01h = A:, etc)
  4035.     CX = 0004h
  4036.     DS:DX -> DWORD buffer to receive device driver address
  4037. Note:    In addition to returning the address of the Stacker device driver,
  4038.       this call also sets the volume number at offset 3Eh in the device
  4039.       driver (see INT 25/AX=CDCDh)
  4040. SeeAlso: INT 25/AX=CDCDh
  4041. ----------214404-----------------------------
  4042. INT 21 - Stacker - GET STACVOL FILE SECTORS
  4043.     AX = 4404h
  4044.     BL = drive number (0 is current drive)
  4045.     CX = byte count (i.e., 200h = 1 sector)
  4046.     DS:DX -> buffer (see below)
  4047. Return:    Data Buffer contains the number of sectors requested from the
  4048.       STACVOL physical file for the drive specified.
  4049.  
  4050. Format of stacker buffer:
  4051. Offset    Size    Description
  4052.  00h    WORD    01CDh
  4053.  02h    WORD    sector count
  4054.  04h    DWORD    number of starting sector
  4055.  08h    DWORD    far pointer to Data Buffer
  4056. ----------214405-----------------------------
  4057. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  4058.     AX = 4405h
  4059.     BL = drive number (00h = default, 01h = A:, etc)
  4060.     CX = number of bytes to write
  4061.     DS:DX -> data to write
  4062. Return: CF clear if successful
  4063.         AX = number of bytes actually written
  4064.     CF set on error
  4065.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4066. Note:    format of data is driver-specific
  4067. SeeAlso: AX=4403h,AX=4404h,INT 2F/AX=122Bh
  4068. ----------214405-----------------------------
  4069. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  4070.     AX = 4405h
  4071.     BX = drive number (00h = default, 01h = A:, etc)
  4072.     CX = number of bytes to write
  4073.     DS:DX -> SCSIDISK control block (see AX=4403h"ST-01")
  4074. Return: CF clear if successful
  4075.         AX = number of bytes actually written
  4076.     CF set on error
  4077.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4078. SeeAlso: AX=4403h"ST-01"
  4079. ----------214406-----------------------------
  4080. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  4081.     AX = 4406h
  4082.     BX = file handle
  4083. Return: CF clear if successful
  4084.         AL = input status
  4085.         00h not ready (device) or at EOF (file)
  4086.         FFh ready
  4087.     CF set on error
  4088.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4089. Note:    files may not register as being at EOF if positioned there by AH=42h
  4090. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  4091. ----------214407-----------------------------
  4092. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  4093.     AX = 4407h
  4094.     BX = file handle
  4095. Return: CF clear if successful
  4096.         AL = input status
  4097.         00h not ready
  4098.         FFh ready
  4099.     CF set on error
  4100.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4101. Note:    for DOS 2+, files are always ready for output, even if the disk is
  4102.       full or no media is in the drive
  4103. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  4104. ----------214408-----------------------------
  4105. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  4106.     AX = 4408h
  4107.     BL = drive number (00h = default, 01h = A:, etc)
  4108. Return: CF clear if successful
  4109.         AX = 0000h if removable
  4110.            = 0001h if fixed
  4111.     CF set on error
  4112.         AX = error code (01h,0Fh) (see AH=59h)
  4113. SeeAlso: AX=4400h,AX=4409h,INT 2F/AX=122Bh
  4114. ----------214409-----------------------------
  4115. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  4116.     AX = 4409h
  4117.     BL = drive number (00h = default, 01h = A:, etc)
  4118. Return: CF clear if successful
  4119.         DX = device attribute word
  4120.         bit 15: drive is SUBSTituted
  4121.         bit 12: drive is remote
  4122.         bit  9: direct I/O not allowed
  4123.     CF set on error
  4124.         AX = error code (01h,0Fh) (see AH=59h)
  4125. Note:    on local drives, DX bits not listed above are the attribute word from
  4126.       the device driver header (see AH=52h); for remote drives, the other
  4127.       bits appear to be undefined
  4128. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  4129. ----------21440A-----------------------------
  4130. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  4131.     AX = 440Ah
  4132.     BX = handle
  4133. Return: CF clear if successful
  4134.         DX = attribute word (as stored in SFT)
  4135.         bit 15: set if remote
  4136.         bit 14: date/time not set on close
  4137.     CF set on error
  4138.         AX = error code (01h,06h) (see AH=59h)
  4139. Note:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  4140.       the file server on which the handle is located in CX
  4141. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  4142. ----------21440B-----------------------------
  4143. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  4144.     AX = 440Bh
  4145.     CX = pause between retries (default 1)
  4146.     DX = number of retries (default 3)
  4147. Return: CF clear if successful
  4148.     CF set on error
  4149.         AX = error code (01h) (see AH=59h)
  4150. Notes:    delay is dependent on processor speed (value in CX specifies number of
  4151.       64K-iteration empty loops to execute)
  4152.     if DX=0000h on entry, the retry count is left unchanged
  4153. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  4154. ----------21440C-----------------------------
  4155. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  4156.     AX = 440Ch
  4157.     BX = device handle
  4158.     CH = category code
  4159.         00h unknown (DOS 3.3+)
  4160.         01h COMn: (DOS 3.3+)
  4161.         03h CON (DOS 3.3+)
  4162.         05h LPTn:
  4163.         9Eh Media Access Control driver (STARLITE)
  4164.         00h-7Fh reserved for Microsoft
  4165.         80h-FFh reserved for OEM/user-defined
  4166.     CL = function
  4167.         00h MAC driver Bind (STARLITE)
  4168.         45h set iteration count
  4169.         4Ah select code page
  4170.         4Ch start code-page preparation
  4171.         4Dh end code-page preparation
  4172.         5Fh set display information (DOS 4.0)
  4173.         65h get iteration count
  4174.         6Ah query selected code page
  4175.         6Bh query prepare list
  4176.         7Fh get display information (DOS 4.0)
  4177.     DS:DX -> (DOS) parameter block (see below)
  4178.     SI = parameter to pass to driver (European MSDOS 4.0, OS/2 comp box)
  4179.     DI = parameter to pass to driver (European MSDOS 4.0, OS/2 comp box)
  4180. Return: CF set on error
  4181.         AX = error code (see AH=59h)
  4182.     CF clear if successful
  4183.         DS:DX -> iteration count if CL=65h
  4184.         SI = returned value (European MSDOS 4.0, OS/2 comp box)
  4185.         DI = returned value (European MSDOS 4.0, OS/2 comp box)
  4186.     DS:DX -> (OS/2 comp box) data block
  4187. Note:    bit assignments for function code in CL:
  4188.         bit 7: set to ignore if unsupported, clear to return error
  4189.         bit 6: set if passed to driver, clear if intercepted by DOS
  4190.         bit 5: set if queries data from device, clear if sends command
  4191.         bits 4-0: subfunction
  4192. SeeAlso: AX=440Dh,INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=1A01h
  4193.  
  4194. Format of parameter block for function 00h:
  4195. Offset    Size    Description
  4196.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  4197.  08h    WORD    version
  4198.  0Ah    WORD    flags
  4199.         bit 0: media requires connect or listen request before use
  4200.         bit 1: network is a LAN (broadcast/multicast supported)
  4201.         bit 2: point-to-point network
  4202.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  4203.         by MAC driver)
  4204.  0Eh    WORD    context
  4205.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  4206.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  4207.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  4208.  16h    WORD    addressing format (filled in by MAC driver)
  4209.         0000h general addressing
  4210.         0001h Ethernet addressing
  4211.         0002h Token Ring addressing
  4212.         0003h Token Bus addressing
  4213.  18h    DWORD    Send entry point (filled in by MAC driver)
  4214.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  4215.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  4216.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  4217.  
  4218. Format of parameter block for function 45h:
  4219. Offset    Size    Description
  4220.  00h    WORD    number of times output is attempted before driver assumes
  4221.         device is busy
  4222.  
  4223. Format of parameter block for functions 4Ah and 6Ah:
  4224. Offset    Size    Description
  4225.  00h    WORD    length of data
  4226.  02h    WORD    code page ID
  4227.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  4228.           start/end for each of N ranges (DOS 4.0)
  4229.     WORD    0000h  end of data (DOS 4.0)
  4230.  
  4231. Format of parameter block for function 4Dh:
  4232. Offset    Size    Description
  4233.  00h    WORD    length of data
  4234.  02h    WORD    code page ID
  4235.  
  4236. Format of parameter block for function 4Ch:
  4237. Offset    Size    Description
  4238.  00h    WORD    flags
  4239.         DISPLAY.SYS = 0000h
  4240.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  4241.             prepare cartridge selection
  4242.  02h    WORD    length of remainder of parameter block
  4243.  04h    WORD    number of code pages following
  4244.  06h  N WORDs    code page 1,...,N
  4245.  
  4246. Format of parameter block for functions 5Fh and 7Fh:
  4247. Offset    Size    Description
  4248.  00h    BYTE    level (0 for DOS 4.x and 5.0)
  4249.  01h    BYTE    reserved (0)
  4250.  02h    WORD    length of following data (14)
  4251.  04h    WORD    control flags
  4252.           bit 0 set for blink, clear for intensity
  4253.           bits 1 to 15 reserved
  4254.  06h    BYTE    mode type (1=text, 2=graphics)
  4255.  07h    BYTE    reserved (0)
  4256.  08h    WORD    colors
  4257.            0 = monochrome
  4258.            else N bits per pixel
  4259.  0Ah    WORD    pixel columns
  4260.  0Ch    WORD    pixel rows
  4261.  0Eh    WORD    character columns
  4262.  10h    WORD    character rows
  4263.  
  4264. Format of parameter block for function 6Bh:
  4265. Offset    Size    Description
  4266.  00h    WORD    length of following data
  4267.  02h    WORD    number of hardware code pages
  4268.  04h  N WORDs    hardware code pages 1,...,N
  4269.     WORD    number of prepared code pages
  4270.       N WORDs    prepared code pages 1,...,N
  4271. ----------21440C-----------------------------
  4272. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  4273.     AX = 440Ch
  4274.     BX = device handle
  4275.     CH = category code
  4276.         07h tape (ASPITAPE.SYS)
  4277.     CL = function
  4278.         01h "mtop" - perform tape operation
  4279.         02h "mtget" - get tape status
  4280.         03h ignore end-of-tape errors
  4281.         04h enable end-of-tape errors
  4282.     DS:DX -> parameter block (see below)
  4283. Return: CF set on error
  4284.         AX = error code (see AH=59h)
  4285.     CF clear if successful
  4286.         DS:DX -> data block
  4287. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  4288.       SCSI Programming Interface (ASPI).  It provides the following device
  4289.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  4290.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  4291.       also be the following names 'MTx' and 'NMTx' which default to 1024
  4292.       byte blocks.    The names may also have a '$' appended to try and make
  4293.       them unique from file names of 'RMT0' etc.
  4294.     once opend these devices must be put into RAW mode
  4295. SeeAlso: AX=4402h"ASPI"
  4296.  
  4297. Format of mtop parameter block:
  4298. Offset    Size    Description
  4299.  00h    WORD    operation code
  4300.         00h "MTWEOF" - write an end-of-file record
  4301.         01h "MTFSF" - forward space file
  4302.         02h "MTBSF" - backward space file
  4303.         03h "MTFSR" - forward space record
  4304.         04h "MTBSR" - backward space record
  4305.         05h "MTREW" - rewind
  4306.         06h "MTOFFL" - rewind and unload
  4307.         07h "MTNOP" - perform TEST UNIT READY
  4308.  02h    DWORD    repetition count
  4309.  
  4310. Format of mtget parameter block:
  4311. Offset    Size    Description
  4312.  00h    BYTE    ASPI host ID
  4313.  01h    BYTE    SCSI target ID
  4314.  02h    BYTE    SCSI logical unit number
  4315.  03h    BYTE    device parameters
  4316.         bit 0: drive must use fixed-block read and write
  4317.         bit 7: drive is an ASPI device
  4318.  04h    BYTE    current device state
  4319.         bit 0: device currently opened in buffered mode
  4320.         bit 1: drive currently opened in nonbuffered mode
  4321.         bit 2: rewind drive on last close
  4322.         bit 3: drive has been written on
  4323.         bit 4: drive has been read from
  4324.         bit 5: next read will return 0 bytes
  4325.         bit 6: EOM will resemble EOF
  4326.         bit 7: drive may be busy rewinding
  4327.  05h    BYTE    unit number within driver
  4328.  06h    WORD    fixed block blocksize
  4329.  08h    BYTE    last SCSI status
  4330.  09h    BYTE    last SCSI sense key
  4331.  0Ah    WORD    last SCSI opcode (packed)
  4332.         bits 0-7: SCSI operation (SCSI packet byte 0)
  4333.         bits 8-10: SCSI flags (SCSI packet byte 1)
  4334.         bits 11-12: ASPI "Direction Bits" (ASPI SRB byte 3)
  4335.  0Ch    WORD    residual bytes from SCSI opcode
  4336. ----------21440D-----------------------------
  4337. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  4338.     AX = 440Dh
  4339.     BL = drive number (00h=default,01h=A:,etc)
  4340.     CH = category code
  4341.         08h disk drive
  4342.         00h-7Fh reserved for Microsoft
  4343.         80h-FFh reserved for OEM/user-defined
  4344.     CL = function
  4345.         40h set device parameters
  4346.         41h write logical device track
  4347.         42h format and verify logical device track
  4348.         46h (DOS 4+) set volume serial number (see also AH=69h)
  4349.         47h (DOS 4+) set access flag
  4350.         60h get device parameters
  4351.         61h read logical device track
  4352.         62h verify logical device track
  4353.         66h (DOS 4+) get volume serial number (see also AH=69h)
  4354.         67h (DOS 4+) get access flag
  4355.         68h (DOS 5+) sense media type
  4356.     DS:DX -> (DOS) parameter block (see below)
  4357.     SI:DI -> (OS/2 comp box) parameter block (see below)
  4358. Return: CF set on error
  4359.         AX = error code (01h,02h) (see AH=59h)
  4360.     CF clear if successful
  4361.         DS:DX -> data block if CL=60h or CL=61h
  4362. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  4363.       entries in the BPB for diskettes.
  4364.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5.0
  4365. SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
  4366.  
  4367. Format of parameter block for functions 40h, 60h:
  4368. Offset    Size    Description
  4369.  00h    BYTE    special functions
  4370.         bit 0 set if function to use current BPB, clear if Device
  4371.             BIOS Parameter Block field contains new default BPB
  4372.         bit 1 set if function to use track layout fields only
  4373.             must be clear if CL=60h
  4374.         bit 2 set if all sectors in track same size (should be set)
  4375.         bits 3-7 reserved
  4376.  01h    BYTE    device type
  4377.         00h  320K/360K disk
  4378.         01h  1.2M disk
  4379.         02h  720K disk
  4380.         03h  single-density 8-inch disk
  4381.         04h  double-density 8-inch disk
  4382.         05h  fixed disk
  4383.         06h  tape drive
  4384.         07h  (DOS 3.3+) 1.44M floppy
  4385.         08h  read/write optical disk
  4386.         09h  (DOS 5.0) 2.88M floppy
  4387.         0Ah  other type of block device
  4388.  02h    WORD    device attributes
  4389.         bit 0 set if nonremovable medium
  4390.         bit 1 set if door lock ("changeline") supported
  4391.         bits 2-15 reserved
  4392.  04h    WORD    number of cylinders
  4393.  06h    BYTE    media type
  4394.         for 1.2M drive
  4395.             00h 1.2M disk (default)
  4396.             01h 320K/360K disk
  4397.         always 00h for other drive types
  4398.  07h 31 BYTEs    device BPB (see AH=53h), bytes after BPB offset 1Eh omitted
  4399.  26h    WORD    number of sectors per track (start of track layout field)
  4400.         not used by function 60h
  4401.  28h  N word pairs: number,size of each sector in track
  4402.  
  4403. Format of parameter block for functions 41h, 61h:
  4404. Offset    Size    Description
  4405.  00h    BYTE    special functions (reserved, must be zero)
  4406.  01h    WORD    number of disk head
  4407.  03h    WORD    number of disk cylinder
  4408.  05h    WORD    number of first sector to read/write
  4409.  07h    WORD    number of sectors
  4410.  09h    DWORD    transfer address
  4411.  
  4412. Format of parameter block for functions 42h, 62h:
  4413. Offset    Size    Description
  4414.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4415.           bit 0=0: format/verify track
  4416.             1: format status call (DOS 3.2+)
  4417.           bits 1-7 reserved, must be zero
  4418.         on return (DOS 4.x):
  4419.           bit 0: set if specified tracks, sectors/track supported
  4420.           bit 1: set if function not supported by BIOS
  4421.           bit 2: set if specified tracks, sectors/track not supported
  4422.           bit 3: set if no disk in drive
  4423.  01h    WORD    number of disk head
  4424.  03h    WORD    number of disk cylinder
  4425.  
  4426. Format of parameter block for functions 46h, 66h:
  4427. Offset    Size    Description
  4428.  00h    WORD    info level (00h)
  4429.  02h    DWORD    disk serial number (binary)
  4430.  06h 11 BYTEs    volume label or "NO NAME    "
  4431.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   " (CL=66h only)
  4432.  
  4433. Format of parameter block for functions 47h, 67h:
  4434. Offset    Size    Description
  4435.  00h    BYTE    special-function field (must be zero)
  4436.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  4437.  
  4438. Format of parameter block for function 68h:
  4439. Offset    Size    Description
  4440.  00h    BYTE    01h for default media type, 00h for any other media type
  4441.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  4442. ----------21440E-----------------------------
  4443. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  4444.     AX = 440Eh
  4445.     BL = drive number (00h=default,01h=A:,etc)
  4446. Return: CF set on error
  4447.         AX = error code (01h,0Fh) (see AH=59h)
  4448.     CF clear if successful
  4449.         AL = 00h block device has only one logical drive assigned
  4450.          1..26 the last letter used to reference the drive (1=A:,etc)
  4451. SeeAlso: AX=440Fh,INT 2F/AX=122Bh
  4452. ----------21440F-----------------------------
  4453. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  4454.     AX = 440Fh
  4455.     BL = physical drive number (00h=default,01h=A:,etc))
  4456. Return: CF set on error
  4457.         AX = error code (01h,0Fh) (see AH=59h)
  4458.     CF clear if successful
  4459.         drive now responds to next logical drive number
  4460. Note:    maps logical drives to physical drives, similar to DOS's treatment of
  4461.       a single physical floppy drive as both A: and B:
  4462. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  4463. ----------214410-----------------------------
  4464. INT 21 - DOS 5.0 - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  4465.     AX = 4410h
  4466.     BX = handle for device
  4467.     CH = category code (see AX=440Ch)
  4468.     CL = function code
  4469. Return: CF clear if successful
  4470.         AX = 0000h    specified IOCTL function is supported
  4471.     CF set on error
  4472.         AL = 01h    IOCTL capability not available
  4473. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4474.       standard DOS 3.2 set may use this call first to see whether a
  4475.       particular call is supported
  4476. SeeAlso: AX=440Ch,AX=440Dh,AX=4411h
  4477. ----------214410BXFFFF-----------------------
  4478. INT 21 U - NewSpace - ENABLE DRIVER
  4479.     AX = 4410h
  4480.     BX = FFFFh
  4481. Notes:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4482.       all files as they are written and decompresses them as they are read
  4483.     compressed files are not accessible unless the driver is enabled
  4484. SeeAlso: AX=4411h/BX=FFFFh
  4485. ----------214411-----------------------------
  4486. INT 21 - DOS 5.0 - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  4487.     AX = 4411h
  4488.     BL = drive number
  4489.     CH = category code (see AX=440Dh)
  4490.     CL = function code
  4491. Return: CF clear if successful
  4492.         AX = 0000h    specified IOCTL function is supported
  4493.     CF set on error
  4494.         AL = 01h    IOCTL capability not available
  4495. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4496.       standard DOS 3.2 set may use this call first to see whether a
  4497.       particular call is supported
  4498. SeeAlso: AX=440Ch,AX=440Dh,AX=4410h
  4499. ----------214411BXFFFF-----------------------
  4500. INT 21 U - NewSpace - DISABLE DRIVER
  4501.     AX = 4411h
  4502.     BX = FFFFh
  4503. Notes:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4504.       all files as they are written and decompresses them as they are read
  4505.     compressed files are not accessible unless the driver is enabled
  4506. SeeAlso: AX=4410h/BX=FFFFh
  4507. ----------214412-----------------------------
  4508. INT 21 - DR-DOS 5+ - DETERMINE DOS TYPE
  4509.     AX = 4412h
  4510.     CF set
  4511. Return: CF set if not DR-DOS
  4512.         AX = error code (see AH=59h)
  4513.     CF clear if DR-DOS
  4514.         DX = AX = version code
  4515.         1060h = ???
  4516.         1063h = DR-DOS 3.41 ???
  4517.         1065h = DR-DOS 5.0
  4518.         1067h = DR-DOS 6.0
  4519. Note:    this call is identical to AX=4452h
  4520. SeeAlso: AX=4452h
  4521. ----------214412BXFFFF-----------------------
  4522. INT 21 U - NewSpace - INSTALLATION CHECK???
  4523.     AX = 4412h
  4524.     BX = FFFFh
  4525. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  4526.     BX:DX -> ???
  4527.     CX = ???
  4528. SeeAlso: AX=4411h/BX=FFFFh
  4529. ----------214413BXFFFF-----------------------
  4530. INT 21 U - NewSpace - GET ???
  4531.     AX = 4413h
  4532.     BX = FFFFh
  4533. Return: AX = code segment of NewRes (resident driver for NewSpace)
  4534.     BX = offset of ???
  4535. SeeAlso: AX=4412h/BX=FFFFh
  4536. ----------214414-----------------------------
  4537. INT 21 U - DR-DOS 5.0 - SET GLOBAL PASSWORD
  4538.     AX = 4414h
  4539.     DS:DX -> password string (blank-padded to 8 characters)
  4540. Desc:    Specify the master password for accessing files.
  4541. Note:    this call is identical to AX=4454h
  4542. SeeAlso: AX=4454h
  4543. ----------214414BXFFFF-----------------------
  4544. INT 21 U - NewSpace - DEBUGGING DUMP
  4545.     AX = 4414h
  4546.     BX = FFFFh
  4547. Return:    debugging dump written to X:\NEWSPACE.SMP
  4548. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  4549. ----------2144-------------------------------
  4550. INT 21 U - DR-DOS 5.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  4551.     AH = 44h
  4552.     AL = 16h to 18h
  4553. Note:    these subfunctions are identical to AX=4456h to 4458h
  4554. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  4555. ----------214451-----------------------------
  4556. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  4557.     AX = 4451h
  4558. Return: CF set if not Concurrent DOS
  4559.         AX = error code (see AH=59h)
  4560.     CF clear if successful
  4561.         AH = single-tasking/multitasking nature
  4562.         10h single-tasking
  4563.             AL = operating system version ID (see AX=4452h)
  4564.         14h multitasking
  4565.             AL = operating system version ID
  4566.                 32h Concurrent PC DOS 3.2
  4567.             41h Concurrent DOS 4.1
  4568.             50h Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  4569.             60h Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  4570.             62h Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  4571.             66h DR Multiuser DOS 5.1
  4572. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  4573.       in the environment variable VER
  4574.     use this function if you are looking for multitasking capabilities,
  4575.       AX=4452h for single-tasking
  4576.     this function should never return the single-tasking values
  4577. SeeAlso: AX=4452h,AX=4459h
  4578. ----------214452-----------------------------
  4579. INT 21 - DR-DOS 3.41+ - DETERMINE DOS TYPE/GET DR-DOS VERSION
  4580.     AX = 4452h
  4581.     CF set
  4582. Return: CF set if not DR-DOS
  4583.         AX = error code (see AH=59h)
  4584.     CF clear if DR-DOS
  4585.         DX = AX = version code
  4586.         AH = single-tasking/multitasking
  4587.         10h single-tasking
  4588.             AL = operating system version ID
  4589.                 60h DOS Plus
  4590.             63h DR-DOS 3.41
  4591.             64h DR-DOS 3.42
  4592.             65h DR-DOS 5.00
  4593.             67h DR-DOS 6.00
  4594.         14h multitasking
  4595.             AL = operating system version ID (see AX=4451h)
  4596. Notes:    the DR-DOS version is stored in the environment variable VER
  4597.     use this function if looking for single-tasking capabilities, AX=4451h
  4598.       if looking for multitasking; this call should never return multi-
  4599.       tasking values
  4600. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  4601. ----------214454-----------------------------
  4602. INT 21 U - DR-DOS 3.41+ - SET GLOBAL PASSWORD
  4603.     AX = 4454h
  4604.     DS:DX -> password string (blank-padded to 8 characters)
  4605. Desc:    Specify the master password for accessing files.
  4606. SeeAlso: AX=4303h,AX=4414h
  4607. ----------214456-----------------------------
  4608. INT 21 U - DR-DOS 5.0+ - HISTORY BUFFER CONTROL
  4609.     AX = 4456h
  4610.     DL = flag
  4611.         bit 0: 1 = command history buffers
  4612.                0 = set to application
  4613. Return: AL = ??? (20h if DL bit 0 set, A0h if clear (DR-DOS 6.0))
  4614. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  4615. ----------214457-----------------------------
  4616. INT 21 U - DR-DOS 5.0+ - SHARE/HILOAD CONTROL
  4617.     AX = 4457h
  4618.     DH = subfunction
  4619.         00h enable/disable SHARE
  4620.             DL = 00h disable
  4621.            = 01h enable
  4622.            else Return: AX = ???
  4623.         01h get HILOAD status
  4624.            Return: AX = status
  4625.                 0000h off
  4626.                 0001h on
  4627.         02h set HILOAD status
  4628.            DL = new state (00h off, 01h on)
  4629.         Return: AX = ???
  4630.         other
  4631.            Return: AX = ???
  4632. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  4633. SeeAlso: AX=4457h/DX=FFFFh
  4634. ----------214457DXFFFF-----------------------
  4635. INT 21 U - DR-DOS 6.0 - GET SHARE STATUS
  4636.     AX = 4457h
  4637.     DX = FFFFh
  4638. Return: AX = SHARE status
  4639. SeeAlso: INT 2F/AX=1000h
  4640. ----------214458-----------------------------
  4641. INT 21 U - DR-DOS 5.0+ internal - GET POINTER TO TABLE OF ???
  4642.     AX = 4458h
  4643. Return: ES:BX -> internal table (see below)
  4644.     AX = ??? (0B50h for DR-DOS 5.0, 0A56h for DR-DOS 6.0)
  4645. SeeAlso: AX=4452h
  4646.  
  4647. Format of internal table:
  4648. Offset    Size    Description
  4649.  00h    DWORD    pointer to ???
  4650.  04h  7 BYTEs    ???
  4651.  0Bh    WORD    K of extended memory at startup
  4652.  0Dh    BYTE    number of far jump entry points
  4653.  0Eh    WORD    segment containing far jumps to DR-DOS entry points (see below)
  4654.  10h    WORD    ???
  4655.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  4656.         or 0000h if already used (DR-DOS 6.0 only)
  4657.  14h    ???    ???
  4658. Note:    the segment used for the DR-DOS 6.0 CONFIG environment variables
  4659.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  4660.       called from CONFIG.SYS. The word is set to zero later and the area
  4661.       lost.
  4662.  
  4663. Format of jump table for DR-DOS 5.0-6.0:
  4664. Offset    Size    Description
  4665.  00h  5 BYTEs    far jump to entry point corresponding to CP/M CALL 5
  4666.  05h  5 BYTEs    far jump to entry point corresponding to INT 20
  4667.  0Ah  5 BYTEs    far jump to entry point corresponding to INT 21
  4668.  0Fh  5 BYTEs    far jump to entry point corresponding to ???
  4669.  14h  5 BYTEs    far jump to entry point corresponding to ???
  4670.  19h  5 BYTEs    far jump to entry point corresponding to ???
  4671.  1Eh  5 BYTEs    far jump to entry point corresponding to ???
  4672.  23h  5 BYTEs    far jump to entry point corresponding to ???
  4673.  28h  5 BYTEs    far jump to entry point corresponding to ???
  4674.  2Dh  5 BYTEs    far jump to entry point corresponding to ???
  4675.  32h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4676.  37h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4677.  3Ch  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4678.  41h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4679.  46h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4680.  4Bh  5 BYTEs    far jump to entry point corresponding to ???
  4681. ----------214459-----------------------------
  4682. INT 21 - DR MultiUser DOS 5.0 - API
  4683.     AX = 4459h
  4684.     CL = function (see INT E0"CP/M")
  4685.     DS,DX = parameters
  4686. Notes:    DR-DOS 5.0 returns CF set and AX=0001h
  4687.     this API is also available on INT E0
  4688. SeeAlso: AX=4452h,INT E0"CP/M"
  4689. ----------2144FFBXFFFF-----------------------
  4690. INT 21 U - NewSpace - ???
  4691.     AX = 44FFh
  4692.     BX = FFFFh
  4693.     DX = ???
  4694. Note:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4695.       all files as they are written and decompresses them as they are read
  4696. SeeAlso: AX=4414h/BX=FFFFh
  4697. ----------2145-------------------------------
  4698. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  4699.     AH = 45h
  4700.     BX = file handle
  4701. Return: CF clear if successful
  4702.         AX = new handle
  4703.     CF set on error
  4704.         AX = error code (04h,06h) (see AH=59h)
  4705. Notes:    moving file pointer for either handle will also move it for the other,
  4706.       because both will refer to the same system file table
  4707.     for DOS versions prior to 3.3, file writes may be forced to disk by
  4708.       duplicating the file handle and closing the duplicate
  4709. SeeAlso: AH=3Dh,AH=46h
  4710. ----------2146-------------------------------
  4711. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  4712.     AH = 46h
  4713.     BX = file handle
  4714.     CX = file handle to become duplicate of first handle
  4715. Return: CF clear if successful
  4716.     CF set on error
  4717.         AX = error code (04h,06h) (see AH=59h)
  4718. Notes:    closes file with handle CX if it is still open
  4719.     DOS 3.30 hangs if BX=CX on entry
  4720.     moving file pointer for either handle will also move it for the other,
  4721.       because both will refer to the same system file table
  4722. SeeAlso: AH=3Dh,AH=45h
  4723. ----------2147-------------------------------
  4724. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  4725.     AH = 47h
  4726.     DL = drive number (00h = default, 01h = A:, etc)
  4727.     DS:SI -> 64-byte buffer for ASCIZ pathname
  4728. Return: CF clear if successful
  4729.         AX = 0100h (undocumented)
  4730.     CF set on error
  4731.         AX = error code (0Fh) (see AH=59h)
  4732. Notes:    the returned path does not include a drive or the initial backslash
  4733.     many Microsoft products for Windows rely on AX being 0100h on success
  4734.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  4735. SeeAlso: AH=19h,AH=3Bh,INT 15/AX=DE25h
  4736. ----------2148-------------------------------
  4737. INT 21 - DOS 2+ - ALLOCATE MEMORY
  4738.     AH = 48h
  4739.     BX = number of paragraphs to allocate
  4740. Return: CF clear if successful
  4741.         AX = segment of allocated block
  4742.     CF set on error
  4743.         AX = error code (07h,08h) (see AH=59h)
  4744.         BX = size of largest available block
  4745. Notes:    DOS 2.1-5.0 coalesces free blocks while scanning for a block to
  4746.       allocate
  4747.     .COM programs are initially allocated the largest available memory
  4748.       block, and should free some memory with AH=49h before attempting any
  4749.       allocations
  4750.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  4751.       near pointer to the allocated block on a successful return
  4752. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  4753. ----------2149-------------------------------
  4754. INT 21 - DOS 2+ - FREE MEMORY
  4755.     AH = 49h
  4756.     ES = segment of block to free
  4757. Return: CF clear if successful
  4758.     CF set on error
  4759.         AX = error code (07h,09h) (see AH=59h)
  4760. Notes:    apparently never returns an error 07h, despite official docs; DOS 3.30
  4761.       code contains only an error 09h exit
  4762.     DOS 2.1-5.0 does not coalesce adjacent free blocks when a block is
  4763.       freed, only when a block is allocated or resized
  4764. SeeAlso: AH=48h,AH=4Ah
  4765. ----------214A-------------------------------
  4766. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  4767.     AH = 4Ah
  4768.     BX = new size in paragraphs
  4769.     ES = segment of block to resize
  4770. Return: CF clear if successful
  4771.     CF set on error
  4772.         AX = error code (07h,08h,09h) (see AH=59h)
  4773.         BX = maximum paragraphs available for specified memory block
  4774. Notes:    under DOS 2.1-5.0, if there is insufficient memory to expand the block
  4775.       as much as requested, the block will be made as large as possible
  4776.     DOS 2.1-5.0 coalesces any free blocks immediately following the block
  4777.       to be resized
  4778. SeeAlso: AH=48h,AH=49h,AH=83h
  4779. ----------214B-------------------------------
  4780. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  4781.     AH = 4Bh
  4782.     AL = type of load
  4783.         00h load and execute
  4784.         01h load but do not execute
  4785.         03h load overlay
  4786.         04h load and execute in background (European MSDOS 4.0 only)
  4787.         "Exec & Go" (see also AH=80h)
  4788.     DS:DX -> ASCIZ program name (must include extension)
  4789.     ES:BX -> parameter block (see below)
  4790.     CX = mode (subfunction 04h only)
  4791.         0000h child placed in zombie mode after termination
  4792.         0001h child's return code discarded on termination
  4793. Return: CF clear if successful
  4794.         BX,DX destroyed
  4795.         if subfunction 01h, process ID set to new program's PSP; get with
  4796.         INT 21/AH=62h
  4797.     CF set on error
  4798.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  4799. Notes:    DOS 2.x destroys all registers, including SS:SP
  4800.     for functions 00h and 01h, the calling process must ensure that there
  4801.       is enough unallocated memory available; if necessary, by releasing
  4802.       memory with AH=49h or AH=4Ah
  4803.     for function 01h, the AX value to be passed to the child program is put
  4804.       on top of the child's stack
  4805.     for function 03h, DOS assumes that the overlay is being loaded into
  4806.       memory allocated by the caller
  4807.     function 01h was undocumented prior to the release of DOS 5.0
  4808.     some versions (such as DR-DOS 6.0) check the parameters and parameter
  4809.       block and return an error if an invalid value (such as an offset of
  4810.       FFFFh) is found
  4811.     background programs under European MSDOS 4.0 must use the new
  4812.       executable format
  4813.     new executables begin running with the following register values
  4814.         AX = environment segment
  4815.         BX = offset of command tail in environment segment
  4816.         CX = size of automatic data segment (0000h = 64K)
  4817.         ES,BP = 0000h
  4818.         DS = automatic data segment
  4819.         SS:SP = initial stack
  4820.       the command tail corresponds to an old executable's PSP:0081h and
  4821.       following, except that the 0Dh is turned into a NUL (00h); new
  4822.       format executables have no PSP
  4823.     under the FlashTek X-32 DOS extender, only function 00h is supported
  4824.       and the pointers are passed in DS:EDX and ES:EBX
  4825. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  4826.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  4827.       file contains additional data after the actual overlay
  4828. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  4829.  
  4830. Format of EXEC parameter block for AL=00h,01h,04h:
  4831. Offset    Size    Description
  4832.  00h    WORD    segment of environment to copy for child process (copy caller's
  4833.         environment if 0000h)
  4834.  02h    DWORD    pointer to command tail to be copied into child's PSP
  4835.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  4836.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  4837.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  4838.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  4839.  
  4840. Format of EXEC parameter block for AL=03h:
  4841. Offset    Size    Description
  4842.  00h    WORD    segment at which to load overlay
  4843.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  4844.  
  4845. Format of EXEC parameter block for FlashTek X-32:
  4846. Offset    Size    Description
  4847.  00h    PWORD    48-bit far pointer to environment string
  4848.  06h    PWORD    48-bit far pointer to command tail string
  4849.  
  4850. Format of .EXE file header:
  4851. Offset    Size    Description
  4852.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  4853.  02h    WORD    number of bytes in last 512-byte page of executable
  4854.  04h    WORD    total number of 512-byte pages in executable (includes any
  4855.         partial last page)
  4856.  06h    WORD    number of relocation entries
  4857.  08h    WORD    header size in paragraphs
  4858.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  4859.         executable's size
  4860.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  4861.  0Eh    WORD    initial SS relative to start of executable
  4862.  10h    WORD    initial SP
  4863.  12h    WORD    checksum (one's complement of sum of all words in executable)
  4864.  14h    DWORD    initial CS:IP relative to start of executable
  4865.  18h    WORD    offset within header of relocation table (40h for New EXE)
  4866.  1Ah    WORD    overlay number (normally 0000h = main program)
  4867. ---new executable---
  4868.  1Ch  4 BYTEs    ???
  4869.  20h    WORD    behavior bits
  4870.  22h 26    BYTEs    reserved for additional behavior info
  4871.  3Ch    DWORD    offset of new executable header within disk file
  4872. ---Borland TLINK---
  4873.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  4874.  1Eh    BYTE    signature FBh
  4875.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  4876.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  4877. ---ARJ self-extracting archive---
  4878.  1Ch  4 BYTEs    signature "RJSX"
  4879. ---LZEXE 0.91 compressed executable---
  4880.  1Ch  4 BYTEs    signature "LZ91"
  4881. ---PKLITE compressed executable---
  4882.  1Ch  2 BYTEs    ???
  4883.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  4884. ---LHarc 1.x self-extracting archive---
  4885.  1Ch  4 BYTEs    unused???
  4886.  20h  3 BYTEs    jump to start of extraction code
  4887.  23h  2 BYTEs    ???
  4888.  25h 12 BYTEs    signature "LHarc's SFX "
  4889. ---LHA 2.x self-extracting archive---
  4890.  1Ch  8 BYTEs    ???
  4891.  24h 10 BYTEs    signature "LHA's SFX "
  4892. ---other linkers---
  4893.  1Ch    var    optional information
  4894. ---
  4895.   N   N DWORDs    relocation items
  4896. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  4897.       versions of the MS linker set it that way
  4898.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  4899.       program is loaded as high in memory as possible
  4900.     the maximum allocation is set to FFFFh by default
  4901.  
  4902. Format of new executable header:
  4903. Offset    Size    Description
  4904.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  4905.  02h  2 BYTEs    linker version (major, then minor)
  4906.  04h    WORD    offset from start of this header to entry table (see below)
  4907.  06h    WORD    length of entry table in bytes
  4908.  08h    DWORD    file load CRC (0 in Borland's TPW)
  4909.  0Ch    BYTE    program flags
  4910.         bits 0-1 DGROUP type
  4911.           0 = none
  4912.           1 = single shared
  4913.           2 = multiple (unshared)
  4914.           3 = (null)
  4915.         bit 2:    global initialization
  4916.         bit 3:    protected mode only
  4917.         bit 4:    8086 instructions
  4918.         bit 5:    80286 instructions
  4919.         bit 6:    80386 instructions
  4920.         bit 7:    80x87 instructions
  4921.  0Dh    BYTE    application flags
  4922.         bits 0-2: application type
  4923.             001 full screen (not aware of Windows/P.M. API)
  4924.             010 compatible with Windows/P.M. API
  4925.             011 uses Windows/P.M. API
  4926.         bit 3: is a Family Application (OS/2)
  4927.         bit 5: 0=executable, 1=errors in image
  4928.         bit 6: non-conforming program (valid stack is not maintained)
  4929.         bit 7: DLL or driver rather than application
  4930.             (SS:SP info invalid, CS:IP points at FAR init routine 
  4931.              called with AX=module handle which returns AX=0000h
  4932.              on failure, AX nonzero on successful initialization)
  4933.  0Eh    WORD    auto data segment index
  4934.  10h    WORD    initial local heap size
  4935.  12h    WORD    initial stack size (added to data seg, 0000h if SS != DS)
  4936.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  4937.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  4938.          if SS=automatic data segment and SP=0000h, the stack pointer is
  4939.           set to the top of the automatic data segment, just below the
  4940.           local heap
  4941.  1Ch    WORD    segment count
  4942.  1Eh    WORD    module reference count
  4943.  20h    WORD    length of nonresident names table in bytes
  4944.  22h    WORD    offset from start of this header to segment table (see below)
  4945.  24h    WORD    offset from start of this header to resource table
  4946.  26h    WORD    offset from start of this header to resident names table
  4947.  28h    WORD    offset from start of this header to module reference table
  4948.  2Ah    WORD    offset from start of this header to imported names table
  4949.          (array of counted strings, terminated with a string of length
  4950.          00h)
  4951.  2Ch    DWORD    offset from start of file to nonresident names table
  4952.  30h    WORD    count of moveable entry point listed in entry table
  4953.  32h    WORD    file alignment size shift count
  4954.         0 is equivalent to 9 (default 512-byte pages)
  4955.  34h    WORD    number of resource table entries
  4956.  36h    BYTE    target operating system
  4957.         00h unknown
  4958.         01h OS/2
  4959.         02h Windows
  4960.         03h European MSDOS 4.x
  4961.         04h Windows 386
  4962.         05h BOSS (Borland Operating System Services)
  4963.  37h    BYTE    other EXE flags
  4964.         bit 0: supports long filenames
  4965.         bit 1: 2.X protected mode
  4966.         bit 2: 2.X proportional font
  4967.         bit 3: gangload area
  4968.  38h    WORD    offset to return thunks or start of gangload area
  4969.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  4970.  3Ch    WORD    minimum code swap area size
  4971.  3Eh  2 BYTEs    expected Windows version (minor version first)
  4972.  
  4973. Format of Codeview trailer (at end of executable):
  4974. Offset    Size    Description
  4975.  00h    WORD    signature 4E42h ('NB')
  4976.  02h    WORD    Microsoft debug info version number
  4977.  04h    DWORD    Codeview header offset
  4978.  
  4979. Format of new executable segment table record:
  4980.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  4981.  02h    WORD    length of image in file (0000h = 64K)
  4982.  04h    WORD    attributes
  4983.         bit 0: data segment rather than code segment
  4984.         bit 1: unused???
  4985.         bit 2: real mode
  4986.         bit 3: iterated
  4987.         bit 4: movable
  4988.         bit 5: sharable
  4989.         bit 6: preloaded rather than demand-loaded
  4990.         bit 7: execute-only (code) or read-only (data)
  4991.         bit 8: relocations (directly following code for this segment)
  4992.         bit 9: debug info present
  4993.         bits 10,11: 80286 DPL bits
  4994.         bit 12:        discardable
  4995.         bits 13-15: discard priority
  4996.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  4997. Note:    the first segment table entry is entry number 1
  4998.  
  4999. Format of new executable entry table item (list):
  5000. Offset    Size    Description
  5001.  00h    BYTE    number of entry points (00h if end of entry table list)
  5002.  01h    BYTE    segment number (00h if end of entry table list)
  5003.  02h 3N BYTEs    entry records
  5004.          Offset    Size    Description
  5005.          00h    BYTE    flags
  5006.                  bit 0: exported
  5007.                 bit 1: single data
  5008.                 bits 2-7: unused???
  5009.          01h    WORD    offset within segment
  5010.  
  5011. Format of new executable relocation data (immediately follows segment image):
  5012. Offset    Size    Description
  5013.  00h    WORD    number of relocation items
  5014.  02h 8N BYTEs    relocation items
  5015.          Offset    Size    Description
  5016.          00h    BYTE    relocation type
  5017.                  00h LOBYTE
  5018.                 02h BASE
  5019.                 03h PTR
  5020.                 05h OFFS
  5021.                 0Bh PTR48
  5022.                 0Dh OFFS32
  5023.          01h    BYTE    flags
  5024.                  bit 2: additive
  5025.          02h    WORD    offset within segment
  5026.          04h    WORD    target address segment
  5027.          06h    WORD    target address offset
  5028.          
  5029. Format of new executable resource data:
  5030. Offset    Size    Description
  5031.  00h    WORD    alignment shift count for resource data
  5032.  02h  N RECORDs resources
  5033.      Format of resource record:
  5034.      Offset    Size    Description
  5035.      00h    WORD    type ID
  5036.              0000h if end of resource records
  5037.             >= 8000h if integer type
  5038.             else offset from start of resource table to type string
  5039.      02h    WORD    number of resources of this type
  5040.      04h    DWORD    reserved for runtime use
  5041.      08h  N Resources (see below)
  5042. Note:    resource type and name strings are stored immediately following the
  5043.       resource table, and are not null-terminated
  5044.  
  5045. Format of new executable resource entry:
  5046. Offset    Size    Description
  5047.  00h    WORD    offset in alignment units from start of file to contents of
  5048.          the resource data
  5049.  02h    WORD    length of resource image in bytes
  5050.  04h    WORD    flags
  5051.          bit 4: moveable
  5052.         bit 5: shareable
  5053.         bit 6: preloaded
  5054.  06h    WORD    resource ID
  5055.         >= 8000h if integer resource
  5056.         else offset from start of resource table to resource string
  5057.  08h    DWORD    reserved for runtime use
  5058. Notes:    resource type and name strings are stored immediately following the
  5059.       resource table, and are not null-terminated
  5060.     strings are counted strings, with a string of length 0 indicating the
  5061.       end of the resource table
  5062.  
  5063. Format of new executable module reference table [one bundle of entries]:
  5064. Offset    Size    Description
  5065.  00h    BYTE    number of records in this bundle (00h if end of table)
  5066.  01h    BYTE    segment indicator
  5067.          00h unused
  5068.         FFh movable segment, segment number is in entry
  5069.         else segment number of fixed segment
  5070.  02h  N RECORDs
  5071.     Format of segment record
  5072.     Offset    Size    Description
  5073.      00h    BYTE    flags
  5074.              bit 0: entry is exported
  5075.             bit 1: entry uses global (shared) data
  5076.             bits 7-3: number of parameter words
  5077.     ---fixed segment---
  5078.      01h    WORD    offset
  5079.     ---moveable segment---
  5080.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  5081.      03h    BYTE    segment number
  5082.      05h    WORD    offset
  5083. Note:    table entries are numbered starting from 1
  5084.  
  5085. Format of new executable resident/nonresident name table entry:
  5086. Offset    Size    Description
  5087.  00h    BYTE    length of string (00h if end of table)
  5088.  01h  N BYTEs    ASCII text of string
  5089.  N+1    WORD    ordinal number (index into entry table)
  5090. Notes:    the first string in the resident name table is the module name; the
  5091.       first entry in the nonresident name table is the module description
  5092.     the strings are case-sensitive; if the executable was linked with
  5093.       /IGNORECASE, all strings are in uppercase
  5094.  
  5095. Format of Linear Executable (enhanced mode executable) header:
  5096. Offset    Size    Description
  5097.  00h  2 BYTEs    "LE" (4Ch 45h) signature
  5098.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  5099.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  5100.  04h    DWORD    executable format level
  5101.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  5102.         01h Intel 80286 or upwardly compatible
  5103.         02h Intel 80386 or upwardly compatible            
  5104.         03h Intel 80486 or upwardly compatible            
  5105.         04h Intel 80586 or upwardly compatible
  5106.         20h Intel i860 (N10) or compatible
  5107.         21h Intel "N11" or compatible
  5108.         40h MIPS Mark I (R2000, R3000) or compatible
  5109.         41h MIPS Mark II (R6000) or compatible
  5110.         42h MIPS Mark III (R4000) or compatible
  5111.  0Ah    WORD    target operating system
  5112.         01h OS/2
  5113.         02h Windows
  5114.         03h DOS4.x
  5115.         04h Windows 386
  5116.  0Ch    DWORD    module version
  5117.  10h    DWORD    module type
  5118.         bit 2: initialization (only for DLLs)
  5119.             0 = global
  5120.             1 = per-process
  5121.         bit 4: no internal fixups in executable image
  5122.         bit 5: no external fixups in executable image
  5123.         bits 8,9,10:
  5124.             0 = unknown
  5125.             1 = incompatible with PM windowing \
  5126.             2 = compatible with PM windowing    > (only for
  5127.             3 = uses PM windowing API       /    programs)
  5128.         bit 13: module not loadable (only for programs)
  5129.         bit 15: module is DLL rather than program
  5130.  14h    DWORD    number of memory pages
  5131.  18h    Initial CS:EIP
  5132.     DWORD    object number
  5133.     DWORD    offset
  5134.  20h    Initial SS:ESP
  5135.     DWORD    object number
  5136.     DWORD    offset
  5137.  28h    DWORD    memory page size
  5138.  2Ch    DWORD    bytes on last page
  5139.  30h    DWORD    fixup section size
  5140.  34h    DWORD    fixup section checksum
  5141.  38h    DWORD    loader section size
  5142.  3Ch    DWORD    loader section checksum
  5143.  40h    DWORD    offset of object table (see below)
  5144.  44h    DWORD    object table entries
  5145.  48h    DWORD    object page map table offset
  5146.  4CH    DWORD    object iterate data map offset
  5147.  50h    DWORD    resource table offset
  5148.  54h    DWORD    resource table entries
  5149.  58h    DWORD    resident names table offset
  5150.  5Ch    DWORD    entry table offset
  5151.  60h    DWORD    module directives table offset
  5152.  64h    DWORD    Module Directives entries
  5153.  68h    DWORD    Fixup page table offset
  5154.  6Ch    DWORD    Fixup record table offset
  5155.  70h    DWORD    imported modules name table offset
  5156.  74h    DWORD    imported modules count
  5157.  78h    DWORD    imported procedures name table offset
  5158.  7Ch    DWORD    per-page checksum table offset
  5159.  80h    DWORD    data pages offset
  5160.  84h    DWORD    preload page count
  5161.  88h    DWORD    non-resident names table offset
  5162.  8Ch    DWORD    non-resident names table length
  5163.  90h    DWORD    non-resident names checksum
  5164.  94h    DWORD    automatic data object
  5165.  98h    DWORD    debug information offset
  5166.  9Ch    DWORD    debug information length
  5167.  A0h    DWORD    preload instance pages number
  5168.  A4h    DWORD    demand instance pages number
  5169.  A8h    DWORD    extra heap allocation
  5170.  ACh    ???    (at most 24 additional bytes here)
  5171. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  5172.  
  5173. Format of object table entry:
  5174. Offset    Size    Description
  5175.  00h    DWORD    virtual size in bytes
  5176.  04h    DWORD    relocation base address
  5177.  08h    DWORD    object flags
  5178.          bit 0: readable
  5179.         bit 1: writable
  5180.         bit 2: executable
  5181.         bit 3: resource
  5182.         bit 4: discardable
  5183.         bit 5: shared
  5184.         bit 6: preloaded
  5185.         bit 7: invalid
  5186.         bit 8-9: type
  5187.             00 normal
  5188.             01 zero-filled
  5189.             10 resident
  5190.             11 resident/contiguous
  5191.         bit 10: "RESIDENT/LONG_LOCKABLE"
  5192.         bit 11: reserved???
  5193.         bit 12: "16:16_ALIAS"
  5194.         bit 13: "BIG" (32-bit???)
  5195.         bit 14: conforming
  5196.         bit 15: "OBJECT_I/O_PRIVILEGE_LEVEL"
  5197.         bits 16-31: reserved
  5198.  0Ch    DWORD    page map index
  5199.  10h    DWORD    page map entries
  5200.  10h  4 BYTEs    ??? (apparently always zeros)
  5201.  
  5202. Format of object page map table entry:
  5203. Offset    Size    Description
  5204.  00h  4 BYTEs    ???
  5205.  
  5206. Format of resident names table entry:
  5207. Offset    Size    Description
  5208.  00h    BYTE    length of name
  5209.  01h  N BYTEs    name
  5210.  N+1  3 BYTEs    ???
  5211.  
  5212. Format of linear executable entry table:
  5213. Offset    Size    Description
  5214.  00h    BYTE    number of entries in table
  5215.  01h 10 BYTEs per entry
  5216.          Offset    Size    Description
  5217.          00h    BYTE    bit flags
  5218.                  bit 1: 32-bit entry
  5219.          01h    WORD    object number
  5220.          03h    BYTE    bit flags
  5221.                  bit 0: exported
  5222.                 bit 1: ???
  5223.          04h    DWORD    offset of entry point
  5224.          08h  2 BYTEs    ???
  5225.  
  5226. Format of Borland debugging information header (following load image):
  5227. Offset    Size    Description
  5228.  00h    WORD    signature 52FBh
  5229.  02h    WORD    version ID
  5230.  04h    DWORD    size of name pool in bytes
  5231.  08h    WORD    number of names in namem pool
  5232.  0Ah    WORD    number of type entries
  5233.  0Ch    WORD    number of structure members
  5234.  0Eh    WORD    number of symbols
  5235.  10h    WORD    number of global symbols
  5236.  12h    WORD    number of modules
  5237.  14h    WORD    number of locals (optional)
  5238.  16h    WORD    number of scopes in table
  5239.  18h    WORD    number of line-number entries
  5240.  1Ah    WORD    number of include files
  5241.  1Ch    WORD    number of segment records
  5242.  1Eh    WORD    number of segment/file correlations
  5243.  20h    DWORD    size of load image after removing uninitialized data and debug
  5244.          info
  5245.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  5246.          depends on program flags
  5247.  28h    BYTE    program flags
  5248.          bit 0: case-sensitive link
  5249.         bit 1: pascal overlay program
  5250.  29h    WORD    no longer used
  5251.  2Bh    WORD    size of data pool in bytes
  5252.  2Dh    BYTE    padding
  5253.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  5254.  30h    WORD    number of classes
  5255.  32h    WORD    number of parents
  5256.  34h    WORD    number of global classes (currently unused)
  5257.  36h    WORD    number of overloads (currently unused)
  5258.  38h    WORD    number of scope classes
  5259.  3Ah    WORD    number of module classes
  5260.  3Ch    WORD    number of coverage offsets
  5261.  3Eh    DWORD    offset relative to symbol base of name pool
  5262.  42h    WORD    number of browser information records
  5263.  44h    WORD    number of optimized symbol records
  5264.  46h    WORD    debugging flags
  5265.  48h  8 BYTEs    padding
  5266. Note:    additional information on the Borland debugging info may be found in
  5267.       Borland's Open Architecture Handbook
  5268. ----------214B-------------------------------
  5269. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  5270.     AH = 4Bh
  5271.     DS:DX = 0000h:0000h
  5272. Return: ES:BX -> ELRES history structure (see AH=2Bh/CX=454Ch)
  5273.     DX = DABEh (signature, DAve BEnnett)
  5274. Note:    ELRES is an MSDOS return code (errorlevel) recorder by David H. Bennett
  5275. SeeAlso: AH=2Bh/CX=454Ch
  5276. ----------214B04-----------------------------
  5277. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  5278.     AX = 4B04h
  5279. Return: CF clear if "MG" resident
  5280.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  5281. SeeAlso: AX=4243h,AX=4B25h
  5282. ----------214B05-----------------------------
  5283. INT 21 - DOS 5.0 - SET EXECUTION STATE
  5284.     AX = 4B05h
  5285.     DS:DX -> execution state structure (see below)
  5286. Return: CF clear if successful
  5287.         AX = 0000h
  5288.     CF set on error
  5289.         AX = error code (see AH=59h)
  5290. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  5291.       execution (including setting the DOS version number).     No DOS, BIOS
  5292.       or other software interrupt may be called after return from this call
  5293.       before commencement of the child process.  If DOS is running in the
  5294.       HMA, A20 is turned off on return from this call.
  5295. SeeAlso: AH=4Bh
  5296.  
  5297. Format of execution state structure:
  5298. Offset    Size    Description
  5299.  00h    WORD    reserved (00h)
  5300.  02h    WORD    type flags
  5301.         bit 0: program is an .EXE
  5302.             1: program is an overlay
  5303.  04h    DWORD    pointer to ASCIZ name of program file
  5304.  08h    WORD    PSP segment of new program
  5305.  0Ah    DWORD    starting CS:IP of new program
  5306.  0Eh    DWORD    program size including PSP
  5307. ----------214B25-----------------------------
  5308. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  5309.     AX = 4B25h
  5310. Return: DI = 1234h if resident
  5311. SeeAlso: AX=4B04h,AX=4B40h
  5312. ----------214B40-----------------------------
  5313. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  5314.     AX = 4B40h
  5315. Return: AX = 5678h if resident
  5316. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  5317. ----------214B41-----------------------------
  5318. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  5319.     AX = 4B41h
  5320.     ???
  5321. Return: ???
  5322. SeeAlso: AX=4B40h
  5323. ----------214B4A-----------------------------
  5324. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  5325.     AX = 4B4Ah
  5326. Return: AL = 57h if resident
  5327. SeeAlso: AX=4B40h,AX=4B4Bh
  5328. ----------214B4B-----------------------------
  5329. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  5330.     AX = 4B4Bh
  5331. Return: CF clear if resident
  5332. SeeAlso: AX=4B4Ah,AX=4B4Dh
  5333. ----------214B4D-----------------------------
  5334. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  5335.     AX = 4B4Dh
  5336. Return: CF clear if resident
  5337. SeeAlso: AX=4B4Ah,AX=4B50h
  5338. ----------214B50-----------------------------
  5339. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  5340.     AX = 4B50h
  5341. Return: AX = 1234h if resident
  5342. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  5343. ----------214B53-----------------------------
  5344. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  5345.     AX = 4B53h
  5346. Return: CF clear if resident
  5347. SeeAlso: AX=4B50h,AX=4B55h
  5348. ----------214B55-----------------------------
  5349. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  5350.     AX = 4B55h
  5351. Return: AX = 1231h if resident
  5352. SeeAlso: AX=4B53h,AX=4B59h
  5353. ----------214B59-----------------------------
  5354. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  5355.     AX = 4B59h
  5356. Return: CF clear if resident
  5357. SeeAlso: AX=4B50h,AX=4B5Eh
  5358. ----------214B5E-----------------------------
  5359. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  5360.     AX = 4B5Eh
  5361. Return: CF clear if resident
  5362. SeeAlso: AX=4B59h,AX=4B87h
  5363. ----------214B60-----------------------------
  5364. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  5365.     AX = 4B60h
  5366.     ???
  5367. Return: ???
  5368. SeeAlso: AX=4B50h
  5369. ----------214B87-----------------------------
  5370. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  5371.     AX = 4B87h
  5372. Return: AX = 6663h if resident
  5373. SeeAlso: AX=4B5Eh,AX=4B95h
  5374. ----------214B95-----------------------------
  5375. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  5376.     AX = 4B95h
  5377. Return: AX = 1973h if resident
  5378. SeeAlso: AX=4B87h,AX=4BA7h
  5379. ----------214BA7-----------------------------
  5380. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  5381.     AX = 4BA7h
  5382. Return: AX = B459h if resident
  5383. SeeAlso: AX=4B95h,AX=4BAAh
  5384. ----------214BAA-----------------------------
  5385. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  5386.     AX = 4BAAh
  5387. Return: CF clear if resident
  5388. SeeAlso: AX=4BA7h,AX=4BAFh
  5389. ----------214BAF-----------------------------
  5390. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  5391.     AX = 4BAFh
  5392. Return: AL = AFh if "Magnitogorsk" resident
  5393.     AL = FAh if "948"/"Screenplus1" resident
  5394. SeeAlso: AX=4BAAh,AX=4BDDh
  5395. ----------214BDD-----------------------------
  5396. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  5397.     AX = 4BDDh
  5398. Return: AX = 1234h
  5399. SeeAlso: AX=4BAFh,AX=4BFEh
  5400. ----------214BEE-----------------------------
  5401. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  5402.     AX = 4BEEh
  5403. Return: AX = 1234h if grab successful
  5404.        = 2345h if failed (INT 21 grabbed previously)
  5405. Notes:    F-DRIVER.SYS is part of the F-PROT virus/trojan protection package by
  5406.       Fridrik Skulason
  5407.     when called the first time, this function moves the INT 21 monitoring
  5408.       code from its original location in the INT 21 chain to be the first
  5409.       thing called by INT 21.  This is the mechanism used by F-NET.
  5410. SeeAlso: INT 2F/AX=4653h
  5411. ----------214BF0-----------------------------
  5412. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  5413.     AX = 4BF0h
  5414. Return: CF clear if installed
  5415.         AX = 899Dh
  5416. Note:    DIET is an executable-compression program
  5417. SeeAlso: AX=4BF1h
  5418. ----------214BF1-----------------------------
  5419. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  5420.     AX = 4BF1h
  5421. Return: ???
  5422. SeeAlso: AX=4BF0h
  5423. ----------214BFE-----------------------------
  5424. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  5425.     AX = 4BFEh
  5426. Return: AX = 1234h if "Hitchcock" resident
  5427.     AX = ABCDh if "1193"/"Copyright" resident
  5428.     DI = 55BBh if "Dark Avenger-1028" resident
  5429. SeeAlso: AX=4BDDh,AX=4BFFh"Justice"
  5430. ----------214BFF-----------------------------
  5431. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  5432.     AX = 4BFFh
  5433. Return: BL = FFh if "USSR-707" resident
  5434.     DI = 55AAh if "Justice" resident
  5435.     CF clear if "Europe 92" resident
  5436. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  5437. ----------214BFFSI0000-----------------------
  5438. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  5439.     AX = 4BFFh
  5440.     SI = 0000h
  5441.     DI = 0000h
  5442. Return: DI = 55AAh if installed
  5443. SeeAlso: AX=4BFFh"Justice",AX=5252h
  5444. ----------214C-------------------------------
  5445. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  5446.     AH = 4Ch
  5447.     AL = return code
  5448. Return: never returns
  5449. Notes:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  5450.       all open files are closed and all memory belonging to the process
  5451.       is freed
  5452.     all network file locks should be removed before calling this function
  5453. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  5454. SeeAlso: INT 60/DI=0601h
  5455. ----------214D-------------------------------
  5456. INT 21 - DOS 2+ - GET RETURN CODE
  5457.     AH = 4Dh
  5458. Return: AH = termination type
  5459.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  5460.         01h control-C abort
  5461.         02h critical error abort
  5462.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  5463.     AL = return code
  5464. Notes:    the word in which DOS stores the return code is cleared after being
  5465.       read by this function, so the return code can only be retrieved once
  5466.     this call should not be used if the child was started with AX=4B04h;
  5467.       use AH=8Ah instead
  5468. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  5469. ----------214E-------------------------------
  5470. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  5471.     AH = 4Eh
  5472.     AL = special flag for use by APPEND (see note below)
  5473.     CX = file attribute mask (see AX=4301h) (bits 0 and 5 ignored)
  5474.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  5475. Return: CF clear if successful
  5476.         [DTA] = FindFirst data block (see below)
  5477.     CF set on error
  5478.         AX = error code (02h,03h,12h) (see AH=59h)
  5479. Notes:    for search attributes other than 08h, all files with at MOST the
  5480.       specified combination of hidden, system, and directory attributes
  5481.       will be returned.  Under DOS 2.x, searching for attribute 08h
  5482.       (volume label) will also return normal files, while under DOS 3+
  5483.       only the volume label (if any) will be returned.
  5484.     this call also returns successfully if given the name of a character
  5485.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  5486.       and the current date and time.  DOS 3+ returns attribute 40h and the
  5487.       current date and time.
  5488.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  5489.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  5490.       found pathname will be stored, otherwise, the actual found path
  5491.       will be prepended to the original filespec without a path.
  5492.     under LANtastic, this call may be used to obtain a list of a server's
  5493.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  5494.       resources may be obtained by searching for "\\SERVER\@*.*"
  5495.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  5496. BUG:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  5497.       with a character device name (no wildcards) and search attributes
  5498.       which include the volume-label bit (08h) will fail unless there is
  5499.       an intervening DOS call which implicitly or explicity performs a
  5500.       directory search without the volume-label bit.  Such implicit
  5501.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  5502.       (AH=41h), and RENAME (AH=56h)
  5503. SeeAlso: AH=11h,AH=4Fh,AX=4301h,INT 2F/AX=111Bh,INT 2F/AX=B711h
  5504.  
  5505. Format of FindFirst data block:
  5506. Offset    Size    Description
  5507. ---PCDOS 3.10, PCDOS 4.01, MSDOS 3.2/3.3/5.0---
  5508.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  5509.  01h 11 BYTEs    search template
  5510.  0Ch    BYTE    search attributes
  5511. ---DOS 2.x (and some DOS 3.x???)---
  5512.  00h    BYTE    search attributes
  5513.  01h    BYTE    drive letter
  5514.  02h 11 BYTEs    search template
  5515. ---WILDUNIX.COM---
  5516.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  5517.  0Ch    BYTE    search attributes
  5518. ---DOS 2.x and most 3.x---
  5519.  0Dh    WORD    entry count within directory
  5520.  0Fh    DWORD    pointer to DTA???
  5521.  13h    WORD    cluster number of start of parent directory
  5522. ---PCDOS 4.01, MSDOS 3.2/3.3/5.0---
  5523.  0Dh    WORD    entry count within directory
  5524.  0Fh    WORD    cluster number of start of parent directory
  5525.  11h  4 BYTEs    reserved
  5526. ---all versions, documented fields---
  5527.  15h    BYTE    attribute of file found
  5528.  16h    WORD    file time
  5529.             bits 11-15: hour
  5530.             bits 5-10:    minute
  5531.             bits 0-4:    seconds/2
  5532.  18h    WORD    file date
  5533.             bits 9-15:    year-1980
  5534.             bits 5-8:    month
  5535.             bits 0-4:    day
  5536.  1Ah    DWORD    file size
  5537.  1Eh 13 BYTEs    ASCIZ filename+extension
  5538. ----------214E-------------------------------
  5539. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  5540.     AH = 4Eh
  5541.     DS:DX = 0000h:0000h
  5542. Return:    AH = 99h if installed
  5543. Note:    WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  5544.       Hosgood and Terry Barnaby
  5545. ----------214F-------------------------------
  5546. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  5547.     AH = 4Fh
  5548.     [DTA] = data block from previous FindFirst or FindNext call
  5549. Return: CF clear if successful
  5550.     CF set on error
  5551.         AX = error code (12h) (see AH=59h)
  5552. SeeAlso: AH=12h,AH=4Eh
  5553. ----------2150-------------------------------
  5554. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  5555.     AH = 50h
  5556.     BX = segment of PSP for new process
  5557. Notes:    DOS uses the current PSP address to determine which processes own files
  5558.       and memory; it corresponds to process identifiers used by other OSs
  5559.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5560.       handler without setting the Critical Error flag
  5561.     under DOS 3+, this function does not use any of the DOS-internal stacks
  5562.       and may thus be called at any time, even during another INT 21h call
  5563.     some Microsoft applications use segments of 0000h and FFFFh; although
  5564.       one should only call this function with valid PSP addresses, any
  5565.       program hooking it should be prepared to handle invalid addresses
  5566.     supported by OS/2 compatibility box
  5567.     this call was undocumented prior to the release of DOS 5.0
  5568. SeeAlso: AH=26h,AH=51h,AH=62h
  5569. ----------2151-------------------------------
  5570. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  5571.     AH = 51h
  5572. Return: BX = segment of PSP for current process
  5573. Notes:    DOS uses the current PSP address to determine which processes own files
  5574.       and memory; it corresponds to process identifiers used by other OSs
  5575.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5576.       handler without setting the Critical Error flag
  5577.     under DOS 3+, this function does not use any of the DOS-internal stacks
  5578.       and may thus be called at any time, even during another INT 21h call
  5579.     supported by OS/2 compatibility box
  5580.     identical to the documented AH=62h
  5581.     undocumented for DOS 2.x-4.x, but newly documented for 5.0.
  5582. SeeAlso: AH=26h,AH=50h,AH=62h
  5583. ----------2152-------------------------------
  5584. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  5585.     AH = 52h
  5586. Return: ES:BX -> DOS list of lists
  5587. Note:    partially supported by OS/2 v1.1 compatibility box (however, most
  5588.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  5589.       pointer is FFFFh:FFFFh).
  5590.  
  5591. Format of List of Lists:
  5592. Offset    Size    Description
  5593.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  5594.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  5595.  -8    DWORD    (DOS 3+) pointer to current disk buffer
  5596.  -4    WORD    (DOS 3+) pointer in DOS code segment of unread CON input
  5597.         when CON is read via a handle, DOS reads an entire line,
  5598.           and returns the requested portion, buffering the rest
  5599.           for the next read.  0000h indicates no unread input
  5600.  -2    WORD    segment of first memory control block
  5601.  00h    DWORD    pointer to first Drive Parameter Block (see AH=32h)
  5602.  04h    DWORD    pointer to first System File Table (see below)
  5603.  08h    DWORD    pointer to active CLOCK$ device's header
  5604.  0Ch    DWORD    pointer to active CON device's header
  5605. ---DOS 2.x---
  5606.  10h    BYTE    number of logical drives in system
  5607.  11h    WORD    maximum bytes/block of any block device
  5608.  13h    DWORD    pointer to first disk buffer (see below)
  5609.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5610.         NUL is always the first device on DOS's linked list of device 
  5611.         drivers. (see below)
  5612. ---DOS 3.0---
  5613.  10h    BYTE    number of block devices
  5614.  11h    WORD    maximum bytes/block of any block device
  5615.  13h    DWORD    pointer to first disk buffer (see below)
  5616.  17h    DWORD    pointer to array of current directory structures (see below)
  5617.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  5618.  1Ch    DWORD    pointer to STRING= workspace area
  5619.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  5620.  22h    DWORD    pointer to FCB table
  5621.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  5622.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5623.         NUL is always the first device on DOS's linked list of device 
  5624.         drivers. (see below)
  5625. ---DOS 3.1-3.3---
  5626.  10h    WORD    maximum bytes per sector of any block device
  5627.  12h    DWORD    pointer to first disk buffer in buffer chain (see below)
  5628.  16h    DWORD    pointer to array of current directory structures (see below)
  5629.  1Ah    DWORD    pointer to system FCB tables (see below)
  5630.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5631.  20h    BYTE    number of block devices installed
  5632.  21h    BYTE    number of available drive letters (largest of 5, installed
  5633.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5634.         current directory structure array.
  5635.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5636.         NUL is always the first device on DOS's linked list of device
  5637.         drivers. (see below)
  5638.  34h    BYTE    number of JOIN'ed drives
  5639. ---DOS 4.x---
  5640.  10h    WORD    maximum bytes per sector of any block device
  5641.  12h    DWORD    pointer to disk buffer info record (see below)
  5642.  16h    DWORD    pointer to array of current directory structures (see below)
  5643.  1Ah    DWORD    pointer to system FCB tables (see below)
  5644.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5645.         (always 00h for DOS 5.0)
  5646.  20h    BYTE    number of block devices installed
  5647.  21h    BYTE    number of available drive letters (largest of 5, installed
  5648.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5649.         current directory structure array.
  5650.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5651.         NUL is always the first device on DOS's linked list of device
  5652.         drivers. (see below)
  5653.  34h    BYTE    number of JOIN'ed drives???
  5654.  35h    WORD    pointer within IBMDOS code segment to list of special program
  5655.         names (see below)
  5656.         (always 0000h for DOS 5.0)
  5657.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  5658.         (see below)
  5659.         may be called by any IFS driver which does not wish to
  5660.         service functions 20h or 24h-28h itself
  5661.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  5662.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  5663.  41h    WORD    the y in BUFFERS x,y
  5664.  43h    BYTE    boot drive (1=A:)
  5665.  44h    BYTE    01h if 80386+, 00h otherwise???
  5666.  45h    WORD    extended memory size in K
  5667. ---DOS 5.0---
  5668.  10h 39 BYTEs    as for DOS 4.x (see above)
  5669.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  5670.  3Bh    WORD    ??? pointer to function in DOS CS
  5671.  3Dh    WORD    ??? apparently 0000h if DOS loaded low, PSP of most-recently
  5672.         EXECed program if DOS in HMA
  5673.  3Fh  8 BYTEs    as for DOS 4.x (see above)
  5674.  
  5675. Format of memory control block (see also below):
  5676. Offset    Size    Description
  5677.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5678.  01h    WORD    PSP segment of owner or
  5679.         0000h if free
  5680.         0006h if DR-DOS XMS UMB
  5681.         0007h if DR-DOS excluded upper memory ("hole")
  5682.         0008h if belongs to DOS
  5683.         FFFAh if 386MAX UMB control block
  5684.         FFFDh if 386MAX locked-out memory
  5685.         FFFEh if 386MAX UMB (immediately follows its control block)
  5686.  03h    WORD    size of memory block in paragraphs
  5687.  05h  3 BYTEs    unused
  5688. ---DOS 2.x,3.x---
  5689.  08h  8 BYTEs    unused
  5690. ---DOS 4+ ---
  5691.  08h  8 BYTEs    ASCII program name if PSP memory block or DR-DOS UMB,
  5692.           else garbage
  5693.         null-terminated if less than 8 characters
  5694. Notes:    the next MCB is at segment (current + size + 1)
  5695.     under DOS 3.1+, the first memory block is the DOS data segment,
  5696.       containing installable drivers, buffers, etc.  Under DOS 4+ it is
  5697.       divided into subsegments, each with its own memory control block
  5698.       (see below), the first of which is at offset 0000h.
  5699.     for DOS 5.0, blocks owned by DOS may have either "SC" or "SD" in bytes
  5700.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  5701.       "SD" is system data, device drivers, etc.
  5702.     Some versions of DR-DOS use only seven characters of the program name,
  5703.       placing a NUL in the eighth byte.
  5704.  
  5705. Format of MSDOS 5.0 UMB control block:
  5706. Offset    Size    Description
  5707.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  5708.  01h    WORD    first available paragraph in UMB if control block at start
  5709.         of UMB, 000Ah if control block at end of UMB
  5710.  03h    WORD    length in paragraphs of following UMB or locked-out region
  5711.  05h  3 BYTEs    unused
  5712.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  5713.  
  5714. Format of STARLITE (General Software's Embedded DOS) memory control block:
  5715. Offset    Size    Description
  5716.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5717.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  5718.  03h    WORD    size of memory block in paragraphs
  5719.  05h    BYTE    unused
  5720.  06h    WORD    segment address of next memory control block (0000h if last)
  5721.  08h    WORD    segment address of previous memory control block or 0000h
  5722.  0Ah  6 BYTEs    reserved
  5723.  
  5724. Format of DOS 4.x data segment subsegment control blocks:
  5725. Offset    Size    Description
  5726.  00h    BYTE    subsegment type (blocks typically appear in this order)
  5727.         "D"  device driver
  5728.         "E"  device driver appendage
  5729.         "I"  IFS (Installable File System) driver
  5730.         "F"  FILES=  control block storage area (for FILES>5)
  5731.         "X"  FCBS=   control block storage area, if present
  5732.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  5733.         "B"  BUFFERS=  storage area
  5734.         "L"  LASTDRIVE=     current directory structure array storage area
  5735.         "S"  STACKS=  code and data area, if present (see below)
  5736.         "T"  INSTALL= transient code
  5737.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  5738.  03h    WORD    size of subsegment in paragraphs
  5739.  05h  3 BYTEs    unused
  5740.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  5741.           was loaded (unused for other types)
  5742.  
  5743. Format of data at start of STACKS code segment (if present):
  5744. Offset    Size    Description
  5745.  00h    WORD    ???
  5746.  02h    WORD    number of stacks (the x in STACKS=x,y)
  5747.  04h    WORD    size of stack control block array (should be 8*x)
  5748.  06h    WORD    size of each stack (the y in STACKS=x,y)
  5749.  08h    DWORD    pointer to STACKS data segment
  5750.  0Ch    WORD    offset in STACKS data segment of stack control block array
  5751.  0Eh    WORD    offset in STACKS data segment of last element of that array
  5752.  10h    WORD    offset in STACKS data segment of the entry in that array for
  5753.         the next stack to be allocated (initially same as value in 0Eh
  5754.         and works its way down in steps of 8 to the value in 0Ch as
  5755.         hardware interrupts pre-empt each other)
  5756. Note:    the STACKS code segment data may, if present, be located as follows:
  5757.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  5758.         in the IBMBIO segment (seen at 0070:0190h)
  5759.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  5760.         segment, which may be determined by inspecting the segment
  5761.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  5762.         70h, 72-77h which have not been redirected by device drivers or
  5763.         TSRs.
  5764.     DOS 4.x:    Identified by sub-segment control block type "S" within the DOS
  5765.         data segment.
  5766.  
  5767. Format of array elements in STACKS data segment:
  5768. Offset    Size    Description
  5769.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  5770.         higher stack.
  5771.  01h    BYTE    not used
  5772.  02h    WORD    previous SP
  5773.  04h    WORD    previous SS
  5774.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  5775.         top of the stack is preset to point back to this control block.
  5776.  
  5777. SHARE.EXE hooks (DOS 3.1-5.00):
  5778. (offsets from first system file table--pointed at by ListOfLists+04h)
  5779. Offset    Size    Description
  5780. -3Ch    DWORD    pointer to FAR routine for ???
  5781.         Note: not called by MSDOS 3.3, set to 0000h:0000h by SHARE 3.3
  5782. -38h    DWORD    pointer to FAR routine called on opening file
  5783.         on call, internal DOS location points at filename(see AX=5D06h)
  5784.         Return: CF clear if successful
  5785.             CF set on error
  5786.                 AX = DOS error code (24h) (see AH=59h)
  5787.         Note: SHARE assumes DS=SS=DOS DS, direct-accesses DOS internals
  5788.             to get name of file just opened
  5789. -34h    DWORD    pointer to FAR routine called on closing file
  5790.         ES:DI -> system file table
  5791.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5792.             does something to every lock record for file
  5793. -30h    DWORD    pointer to FAR routine to close all files for given computer
  5794.         (called by AX=5D03h)
  5795.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5796. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  5797.         (called by AX=5D04h)
  5798.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5799. -28h    DWORD    pointer to FAR routine to close file by name
  5800.         (called by AX=5D02h)
  5801.         DS:SI -> DOS parameter list (see AX=5D00h)
  5802.            DPL's DS:DX -> name of file to close
  5803.         Return: CF clear if successful
  5804.             CF set on error
  5805.                 AX = DOS error code (03h) (see AH=59h)
  5806.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5807. -24h    DWORD    pointer to FAR routine to lock region of file
  5808.         call with BX = file handle
  5809.               CX:DX = starting offset
  5810.               SI:AX = size
  5811.         Return: CF set on error
  5812.                 AL = DOS error code (21h) (see AH=59h)
  5813.         Note: not called if file is marked as remote
  5814.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5815. -20h    DWORD    pointer to FAR routine to unlock region of file
  5816.         call with BX = file handle
  5817.               CX:DX = starting offset
  5818.               SI:AX = size
  5819.         Return: CF set on error
  5820.                 AL = DOS error code (21h) (see AH=59h)
  5821.         Note: not called if file is marked as remote
  5822.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5823. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  5824.         call with ES:DI -> system file table entry for file
  5825.             CX = length of region from current position in file
  5826.         Return: CF set if any portion of region locked
  5827.                 AX = 0021h
  5828.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5829. -18h    DWORD    pointer to FAR routine to get open file list entry
  5830.         (called by AX=5D05h)
  5831.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  5832.             DPL's BX = index of sharing record
  5833.             DPL's CX = index of SFT in SFT chain of sharing rec
  5834.         Return: CF set on error or not loaded
  5835.                 AX = DOS error code (12h) (see AH=59h)
  5836.             CF clear if successful
  5837.                 ES:DI -> filename
  5838.                 CX = number of locks owned by specified SFT
  5839.                 BX = network machine number
  5840.                 DX destroyed
  5841.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5842. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  5843.         call with DS:SI -> unopened FCB
  5844.               ES:DI -> system file table entry
  5845.         Return: BL = C0h???
  5846.         Note: copies following fields from SFT to FCB:
  5847.            starting cluster of file      0Bh     1Ah
  5848.            sharing record offset      33h     1Ch
  5849.            file attribute          04h     1Eh
  5850. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  5851.         call with ES:DI -> system file table entry
  5852.               DS:SI -> FCB
  5853.         Return: CF set if SFT closed or sharing record offsets
  5854.                 mismatched
  5855.             CF clear if successful
  5856.                 BX = starting cluster number from FCB
  5857. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  5858.         DS:SI -> system file table
  5859.         Return: AX = number of handle in JFT which already uses SFT
  5860.         Note: called during open/create of a file
  5861.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  5862.         Note: if SFT was opened with inheritance enabled and sharing
  5863.             mode 111, does something to all other SFTs owned by
  5864.             same process which have the same file open mode and
  5865.             sharing record
  5866. -08h    DWORD    pointer to FAR routine for ???
  5867.         Note: SHARE assumes SS=DS=DOS DS, direct-accesses DOS internals
  5868.         Note: closes various handles referring to file most-recently
  5869.             opened
  5870. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  5871.           entries
  5872.         call with ES:DI -> system file table entry for file (see below)
  5873.               AX = subfunction (apply to each related SFT)
  5874.                 00h: update time stamp (offset 0Dh) and date
  5875.                      stamp (offset 0Fh)
  5876.                 01h: update file size (offset 11h) and starting
  5877.                      cluster (offset 0Bh).  Sets last-accessed
  5878.                      cluster fields to start of file if file
  5879.                      never accessed
  5880.                 02h: as function 01h, but last-accessed fields
  5881.                      always changed
  5882.                 03h: do both functions 00h and 02h
  5883.         Note: follows ptr at offset 2Bh in system file table entries
  5884.         Note: NOP if opened with no-inherit or via FCB
  5885.  
  5886. Format of sharing record:
  5887. Offset    Size    Description
  5888.  00h    BYTE    flag
  5889.         00h free block
  5890.         01h allocated block
  5891.         FFh end marker
  5892.  01h    WORD    size of block
  5893.  03h    BYTE    checksum of pathname (including NUL)
  5894.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  5895.  04h    WORD    offset in SHARE's DS of lock record (see below)
  5896.  06h    DWORD    pointer to start of system file table chain for file
  5897.  0Ah    WORD    unique sequence number
  5898.  0Ch    var    ASCIZ full pathname
  5899.  
  5900. Format of SHARE.EXE lock record:
  5901. Offset    Size    Description
  5902.  00h    WORD    offset in SHARE's DS of next lock table in list
  5903.  02h    DWORD    offset in file of start of locked region
  5904.  06h    DWORD    offset in file of end of locked region
  5905.  0Ah    DWORD    pointer to System File Table entry for this file
  5906.  0Eh    WORD    PSP segment of lock's owner
  5907.  
  5908. Format of DOS 2.x system file tables:
  5909. Offset    Size    Description
  5910.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5911.  04h    WORD    number of files in this table
  5912.  06h  28h bytes per file
  5913.     Offset    Size    Description
  5914.      00h    BYTE    number of file handles referring to this file
  5915.      01h    BYTE    file open mode (see AH=3Dh)
  5916.      02h    BYTE    file attribute
  5917.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  5918.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  5919.      0Fh    WORD    ???
  5920.      11h    WORD    ???
  5921.      13h    DWORD    file size???
  5922.      17h    WORD    file date in packed format (see AX=5700h)
  5923.      19h    WORD    file time in packed format (see AX=5700h)
  5924.      1Bh    BYTE    device attribute (see AX=4400h)
  5925.     ---character device---
  5926.      1Ch    DWORD    pointer to device driver
  5927.     ---block device---
  5928.      1Ch    WORD    starting cluster of file
  5929.      1Eh    WORD    relative cluster in file of last cluster accessed
  5930.     ------
  5931.      20h    WORD    absolute cluster number of current cluster
  5932.      22h    WORD    ???
  5933.      24h    DWORD    current file position???
  5934.  
  5935. Format of DOS 3.0 system file tables and FCB tables:
  5936. Offset    Size    Description
  5937.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5938.  04h    WORD    number of files in this table
  5939.  06h  38h bytes per file
  5940.     Offset    Size    Description
  5941.      00h-1Eh as for DOS 3.1+ (see below)
  5942.      1Fh    WORD    byte offset of directory entry within sector
  5943.      21h 11 BYTES    filename in FCB format (no path/period, blank-padded)
  5944.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  5945.      30h    WORD    (SHARE.EXE) ??? network machine number
  5946.      32h    WORD    PSP segment of file's owner (first three entries for
  5947.              AUX/CON/PRN contain segment of IO.SYS startup code)
  5948.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  5949.      36h    WORD    ??? apparently always 0000h
  5950.  
  5951. Format of DOS 3.1-3.3x system file tables and FCB tables:
  5952. Offset    Size    Description
  5953.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5954.  04h    WORD    number of files in this table
  5955.  06h  35h bytes per file
  5956.     Offset    Size    Description
  5957.      00h    WORD    number of file handles referring to this file
  5958.      02h    WORD    file open mode (see AH=3Dh)
  5959.             bit 15 set if this file opened via FCB
  5960.      04h    BYTE    file attribute (see AX=4301h)
  5961.      05h    WORD    device info word (see AX=4400h)
  5962.             bit 15 set if remote file
  5963.             bit 14 set means do not set file date/time on closing
  5964.             bit 12 set means don't inherit on EXEC
  5965.             bits 5-0 drive number for disk files
  5966.      07h    DWORD    pointer to device driver header if character device
  5967.             else pointer to DOS Drive Parameter Block (see AH=32h)
  5968.      0Bh    WORD    starting cluster of file
  5969.      0Dh    WORD    file time in packed format (see AX=5700h)
  5970.      0Fh    WORD    file date in packed format (see AX=5700h)
  5971.      11h    DWORD    file size
  5972.     ---system file table---
  5973.      15h    DWORD    current offset in file (may be larger than size of
  5974.             file; INT 21/AH=42h does not check new position)
  5975.     ---FCB table---
  5976.      15h    WORD    counter for last I/O to FCB
  5977.      17h    WORD    counter for last open of FCB
  5978.             (these are separate to determine the times of the
  5979.             latest I/O and open)
  5980.     ---
  5981.      19h    WORD    relative cluster within file of last cluster accessed
  5982.      1Bh    WORD    absolute cluster number of last cluster accessed
  5983.             0000h if file never read or written???
  5984.      1Dh    WORD    number of sector containing directory entry
  5985.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  5986.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  5987.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  5988.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  5989.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  5990.              entries for AUX/CON/PRN contain segment of IO.SYS
  5991.             startup code)
  5992.      33h    WORD    offset within SHARE.EXE code segment of 
  5993.             sharing record (see above)  0000h = none
  5994.  
  5995. Format of DOS 4.0-5.0 system file tables and FCB tables:
  5996. Offset    Size    Description
  5997.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  5998.  04h    WORD    number of files in this table
  5999.  06h  3Bh bytes per file
  6000.     Offset    Size    Description
  6001.      00h    WORD    number of file handles referring to this file
  6002.      02h    WORD    file open mode (see AH=3Dh)
  6003.             bit 15 set if this file opened via FCB
  6004.      04h    BYTE    file attribute (see AX=4301h)
  6005.      05h    WORD    device info word (see AX=4400h)
  6006.             bit 15 set if remote file
  6007.             bit 14 set means do not set file date/time on closing
  6008.             bit 13 set if named pipe
  6009.             bit 12 set if no inherit
  6010.             bit 11 set if network spooler
  6011.      07h    DWORD    pointer to device driver header if character device
  6012.             else pointer to DOS Drive Parameter Block (see AH=32h)
  6013.             or REDIR data
  6014.      0Bh    WORD    starting cluster of file
  6015.      0Dh    WORD    file time in packed format (see AX=5700h)
  6016.      0Fh    WORD    file date in packed format (see AX=5700h)
  6017.      11h    DWORD    file size
  6018.      15h    DWORD    current offset in file
  6019.     ---local file---
  6020.      19h    WORD    relative cluster within file of last cluster accessed
  6021.      1Bh    DWORD    number of sector containing directory entry
  6022.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6023.     ---network redirector---
  6024.      19h    DWORD    pointer to REDIRIFS record
  6025.      1Dh  3 BYTEs    ???
  6026.     ------
  6027.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6028.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6029.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6030.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  6031.              entries for AUX/CON/PRN contain segment of IO.SYS
  6032.             startup code)
  6033.      33h    WORD    offset within SHARE.EXE code segment of 
  6034.             sharing record (see above)  0000h = none
  6035.      35h    WORD    (local) absolute cluster number of last clustr accessed
  6036.             (redirector) ???
  6037.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  6038.  
  6039. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  6040. Offset    Size    Description
  6041.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or \\MACH\PATH (network)
  6042.  43h    WORD    drive attributes (see also note below and AX=5F07h)
  6043.         bit 15: uses network redirector     \ invalid if 00, installable
  6044.             14: physical drive         / file system if 11
  6045.             13: JOIN'ed      \ path above is true path that would be
  6046.             12: SUBST'ed  / needed if not under SUBST or JOIN
  6047.  45h    DWORD    pointer to Drive Parameter Block for drive (see AH=32h)
  6048. ---local drives---
  6049.  49h    WORD    starting cluster of current directory
  6050.         0000h = root, FFFFh = never accessed
  6051.  4Bh    WORD    ??? seems to be FFFFh always
  6052.  4Dh    WORD    ??? seems to be FFFFh always
  6053. ---network drives---
  6054.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  6055.  4Dh    WORD    stored user data from INT 21/AX=5F03h???
  6056. ------
  6057.  4Fh    WORD    offset in current directory path of backslash corresponding to
  6058.           root directory for drive
  6059.         this value specifies how many characters to hide from the
  6060.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  6061.           drive letter and colon, SUBST, JOIN, and networks change it
  6062.           so that only the appropriate portion of the true path is
  6063.           visible to the user
  6064. ---DOS 4.x---
  6065.  51h    BYTE    ??? used by network
  6066.  52h    DWORD    pointer to IFS driver for this drive, 00000000h if native DOS
  6067.  56h    WORD    ???
  6068. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  6069.       after JOIN x: /D in DR-DOS 5.0 or NET USE x: /D in older LAN versions
  6070.     normally, only one of bits 13&12 may be set together with bit 14, but
  6071.       DR-DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  6072.       0001 SUBST, 0101 ASSIGN
  6073.  
  6074. Format of DR-DOS 5.0-6.0 current directory structure entry (array):
  6075. Offset    Size    Description
  6076.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  6077.  43h    WORD    drive attributes
  6078.         1000h SUBSTed drive
  6079.         3000h??? JOINed drive
  6080.         4000h physical drive
  6081.         5000h ASSIGNed drive
  6082.         7000h JOINed drive
  6083.         8000h network drive
  6084.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  6085.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  6086.  47h    WORD    cluster number of start of parent directory (0000h = root)
  6087.  49h    WORD    entry number of current directory in parent directory
  6088.  4Bh    WORD    cluster number of start of current directory
  6089.  4Dh  2 BYTEs    used for media change detection (details not available)
  6090.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  6091.         0000h if physical root directory
  6092.  
  6093. Format of device driver header:
  6094. Offset    Size    Description
  6095.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  6096.  04h    WORD    device attributes
  6097.         Character device:
  6098.            bit 15 set
  6099.            bit 14 IOCTL supported (see AH=44h)
  6100.            bit 13 (DOS 3+) output until busy supported
  6101.            bit 12 reserved
  6102.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6103.            bits 10-8 reserved
  6104.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6105.                 (see AX=4410h,AX=4411h)
  6106.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6107.                 (see AX=440Ch,AX=440Dh)
  6108.            bit 5  reserved
  6109.            bit 4  device is special (use INT 29 "fast console output")
  6110.            bit 3  device is CLOCK$ (all reads/writes use transfer
  6111.                 record described below)
  6112.            bit 2  device is NUL
  6113.            bit 1  device is standard output
  6114.            bit 0  device is standard input
  6115.         Block device:
  6116.            bit 15 clear
  6117.            bit 14 IOCTL supported
  6118.            bit 13 non-IBM format
  6119.            bit 12 reserved
  6120.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6121.            bit 10 reserved
  6122.            bit 9  direct I/O not allowed???
  6123.               (set by DOS 3.3 DRIVER.SYS for "new" drives)
  6124.            bit 8  ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  6125.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6126.                 (see AX=4410h,AX=4411h)
  6127.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6128.                 implies support for commands 17h and 18h
  6129.                 (see AX=440Ch,AX=440Dh,AX=440Eh,AX=440Fh)
  6130.            bits 5-2 reserved
  6131.            bit 1   driver supports 32-bit sector addressing
  6132.            bit 0   reserved
  6133.         Note: for European MSDOS 4.0, bit 11 also indicates that bits
  6134.             8-6 contain a version code (000 = DOS 3.0,3.1;
  6135.             001 = DOS 3.2, 010 = European DOS 4.0)
  6136.  06h    WORD    device strategy entry point
  6137.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  6138.  08h    WORD    device interrupt entry point
  6139. ---character device---
  6140.  0Ah  8 BYTEs    blank-padded character device name
  6141. ---block device---
  6142.  0Ah    BYTE    number of subunits (drives) supported by driver
  6143.  0Bh  7 BYTEs    unused
  6144. ---
  6145.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  6146.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  6147.  15h    BYTE    (CD-ROM driver) number of units
  6148.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version 
  6149.             (currently '00')
  6150.  
  6151. Format of CLOCK$ transfer record:
  6152. Offset    Size    Description
  6153.  00h    WORD    number of days since 1-Jan-1980
  6154.  02h    BYTE    minutes
  6155.  03h    BYTE    hours
  6156.  04h    BYTE    hundredths of second
  6157.  05h    BYTE    seconds
  6158.  
  6159. Format of DOS 2.x disk buffer:
  6160. Offset    Size    Description
  6161.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6162.         least-recently used buffer is first in chain
  6163.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  6164.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  6165.  08h    WORD    logical sector number
  6166.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  6167.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  6168.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6169.  10h        buffered data
  6170.  
  6171. Format of DOS 3.x disk buffer:
  6172. Offset    Size    Description
  6173.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6174.         least-recently used buffer is first in chain
  6175.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6176.  05h    BYTE    flags
  6177.         bit 7: ???
  6178.         bit 6: buffer dirty
  6179.         bit 5: buffer has been referenced
  6180.         bit 4: ???
  6181.         bit 3: sector in data area
  6182.         bit 2: sector in a directory, either root or subdirectory
  6183.         bit 1: sector in FAT
  6184.         bit 0: boot sector??? (guess)
  6185.  06h    WORD    logical sector number
  6186.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  6187.  09h    BYTE    sector offset between copies if multiple copies to be written
  6188.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6189.  0Eh    WORD    unused??? (almost always 0)
  6190.  10h        buffered data
  6191.  
  6192. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  6193. Offset    Size    Description
  6194.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6195.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6196.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6197.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6198.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  6199.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  6200.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  6201.  11h    WORD    ??? seems always to be 0001h
  6202.  13h    WORD    segment of EMS physical page frame
  6203.  15h    WORD    ??? seems always to be zero
  6204.  17h  4 WORDs    EMS partial page mapping information???
  6205.  
  6206. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  6207. Offset    Size    Description
  6208.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6209.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6210.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6211.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6212.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  6213.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  6214.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  6215.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  6216.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  6217.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  6218.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  6219.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  6220.           into EMS
  6221.  18h    WORD    EMS handle for buffers, zero if not in EMS
  6222.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  6223.  1Ch    WORD    ??? appears always to be 0001h
  6224.  1Eh    WORD    segment of EMS physical page frame
  6225.  20h    WORD    ??? appears always to be zero
  6226.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  6227.  
  6228. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  6229. Offset    Size    Description
  6230.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  6231.         in EMS
  6232.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  6233.         this chain are in the same segment.
  6234.  06h    BYTE    number of dirty buffers on this chain
  6235.  07h    BYTE    reserved (00h)
  6236. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  6237.       address modulo NDBCH,     0 <= N <= NDBCH-1
  6238.     each chain resides completely within one EMS page
  6239.     this structure is in main memory even if buffers are in EMS
  6240.  
  6241. Format of DOS 4.0-5.0 disk buffer:
  6242. Offset    Size    Description
  6243.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  6244.  02h    WORD    backward ptr, offset only
  6245.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6246.  05h    BYTE    flags
  6247.         bit 7: remote buffer
  6248.         bit 6: buffer dirty
  6249.         bit 5: buffer has been referenced
  6250.         bit 4: search data buffer (only valid if remote buffer)
  6251.         bit 3: sector in data area
  6252.         bit 2: sector in a directory, either root or subdirectory
  6253.         bit 1: sector in FAT
  6254.         bit 0: reserved
  6255.  06h    DWORD    logical sector number
  6256.  0Ah    BYTE    number of copies to write
  6257.         for FAT sectors, same as number of FATs
  6258.         for data and directory sectors, usually 1
  6259.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  6260.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6261.  11h    WORD    buffer use count if remote buffer (see flags above)
  6262.  13h    BYTE    reserved
  6263.  14h        buffered data
  6264. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  6265.       (computed as the sum of high and low words of the logical sector
  6266.       number divided by NDBCH) are on the same doubly-linked circular
  6267.       chain; for DOS 5.0, only a single circular chain exists.
  6268.     the links consist of offset addresses only, the segment being the same
  6269.       for all buffers in the chain.
  6270.  
  6271. Format of DOS 5.0 disk buffer info:
  6272. Offset    Size    Description
  6273.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  6274.         (see above)
  6275.  04h    WORD    0000h (DOS 5 does not hash disk buffers, so offset 00h points
  6276.             directly at the only buffer chain)
  6277.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6278.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6279.  0Ch    BYTE    buffer location
  6280.         00h base memory, no workspace buffer
  6281.         01h HMA, workspace buffer in base memory
  6282.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  6283.  11h  3 BYTEs    unused???
  6284.  14h    WORD    ???
  6285.  16h    BYTE    ??? apparently always 00h
  6286.  17h    BYTE    ??? apparently always FFh
  6287.  18h    BYTE    ??? apparently always 00h
  6288.  19h    BYTE    ??? apparently always 00h
  6289.  1Ah    WORD    ??? segment within HIMEM.SYS area when buffers are in HMA and
  6290.           UMBs are enabled???, else 0000h
  6291.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  6292.  1Dh    WORD    ???
  6293.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  6294.         memory chain in base 640K only (first UMB MCB usually at 9FFFh,
  6295.         locking out video memory with a DOS-owned memory block)
  6296.  21h    WORD    paragraph of start of most recent MCB chain search
  6297.  
  6298. Format of IFS driver list:
  6299. Offset    Size    Description
  6300.  00h    DWORD    pointer to next driver header
  6301.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  6302.  0Ch  4 BYTEs    ???
  6303.  10h    DWORD    pointer to IFS utility function entry point (see below)
  6304.         call with ES:BX -> IFS request (see below)
  6305.  14h    WORD    offset in header's segment of driver entry point
  6306.     ???
  6307.  
  6308. Call IFS utility function entry point with:
  6309.     AH = 20h miscellaneous functions
  6310.         AL = 00h get date
  6311.         Return: CX = year
  6312.             DH = month
  6313.             DL = day
  6314.         AL = 01h get process ID and computer ID
  6315.         Return: BX = current PSP segment
  6316.             DX = active network machine number
  6317.         AL = 05h get file system info
  6318.         ES:DI -> 16-byte info buffer
  6319.         Return: buffer filled
  6320.             Offset    Size    Description
  6321.              00h  2 BYTEs    unused
  6322.              02h    WORD    number of SFTs (actually counts only
  6323.                     the first two file table arrays)
  6324.              04h    WORD    number of FCB table entries
  6325.              06h    WORD    number of proctected FCBs
  6326.              08h  6 BYTEs    unused
  6327.              0Eh    WORD    largest sector size supported
  6328.         AL = 06h get machine name
  6329.         ES:DI -> 18-byte buffer for name
  6330.         Return: buffer filled with name starting at offset 02h
  6331.         AL = 08h get sharing retry count
  6332.         Return: BX = sharing retry count
  6333.         AL = other
  6334.         Return: CF set
  6335.     AH = 21h get redirection state
  6336.         BH = type (03h disk, 04h printer)
  6337.         Return: BH = state (00h off, 01h on)
  6338.     AH = 22h ??? some sort of time calculation
  6339.         AL = 00h ???
  6340.             nonzero ???
  6341.     AH = 23h ??? some sort of time calculation
  6342.     AH = 24h compare filenames
  6343.         DS:SI -> first ASCIZ filename
  6344.         ES:DI -> second ASCIZ filename
  6345.         Return: ZF set if files are same ignoring case and / vs \
  6346.     AH = 25h normalize filename
  6347.         DS:SI -> ASCIZ filename
  6348.         ES:DI -> buffer for result
  6349.         Return: filename uppercased, forward slashes changed to backslashes
  6350.     AH = 26h get DOS stack
  6351.         Return: DS:SI -> top of stack
  6352.             CX = size of stack in bytes
  6353.     AH = 27h increment InDOS flag
  6354.     AH = 28h decrement InDOS flag
  6355. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  6356.       pass them on to the default handler pointed at by [LoL+37h]
  6357.  
  6358. Format of IFS request block:
  6359. Offset    Size    Description
  6360.  00h    WORD    total size in bytes of request
  6361.  02h    BYTE    class of request
  6362.         02h ???
  6363.         03h redirection
  6364.         04h ???
  6365.         05h file access
  6366.         06h convert error code to string
  6367.         07h ???
  6368.  03h    WORD    returned DOS error code
  6369.  05h    BYTE    IFS driver exit status
  6370.         00h success
  6371.         01h ???
  6372.         02h ???
  6373.         03h ???
  6374.         04h ???
  6375.         FFh internal failure
  6376.  06h 16 BYTEs    ???
  6377. ---request class 02h---
  6378.  16h    BYTE    function code
  6379.         04h ???
  6380.  17h    BYTE    unused???
  6381.  18h    DWORD    pointer to ???
  6382.  1Ch    DWORD    pointer to ???
  6383.  20h  2 BYTEs    ???
  6384. ---request class 03h---
  6385.  16h    BYTE    function code
  6386.  17h    BYTE    ???
  6387.  18h    DWORD    pointer to ???
  6388.  1Ch    DWORD    pointer to ???
  6389.  22h    WORD    returned ???
  6390.  24h    WORD    returned ???
  6391.  26h    WORD    returned ???
  6392.  28h    BYTE    returned ???
  6393.  29h    BYTE    unused???
  6394. ---request class 04h---
  6395.  16h    DWORD    pointer to ???
  6396.  1Ah    DWORD    pointer to ???
  6397. ---request class 05h---
  6398.  16h    BYTE    function code
  6399.         01h flush disk buffers
  6400.         02h get disk space
  6401.         03h MKDIR
  6402.         04h RMDIR
  6403.         05h CHDIR
  6404.         06h delete file
  6405.         07h rename file
  6406.         08h search directory
  6407.         09h file open/create
  6408.         0Ah LSEEK
  6409.         0Bh read from file
  6410.         0Ch write to file
  6411.         0Dh lock region of file
  6412.         0Eh commit/close file
  6413.         0Fh get/set file attributes
  6414.         10h printer control
  6415.         11h ???
  6416.         12h process termination
  6417.         13h ???
  6418.     ---class 05h function 01h---
  6419.      17h  7    BYTEs    ???
  6420.      1Eh    DWORD    pointer to ???
  6421.      22h  4 BYTEs    ???
  6422.      26h    BYTE    ???
  6423.      27h    BYTE    ???
  6424.     ---class 05h function 02h---
  6425.      17h  7 BYTEs    ???
  6426.      1Eh    DWORD    pointer to ???
  6427.      22h  4 BYTEs    ???
  6428.      26h    WORD    returned total clusters
  6429.      28h    WORD    returned sectors per cluster
  6430.      2Ah    WORD    returned bytes per sector
  6431.      2Ch    WORD    returned available clusters
  6432.      2Eh    BYTE    returned ???
  6433.      2Fh    BYTE    ???
  6434.     ---class 05h functions 03h,04h,05h---
  6435.      17h  7 BYTEs    ???
  6436.      1Eh    DWORD    pointer to ???
  6437.      22h  4 BYTEs    ???
  6438.      26h    DWORD    pointer to directory name
  6439.     ---class 05h function 06h---
  6440.      17h  7 BYTEs    ???
  6441.      1Eh    DWORD    pointer to ???
  6442.      22h  4 BYTEs    ???
  6443.      26h    WORD    attribute mask
  6444.      28h    DWORD    pointer to filename
  6445.     ---class 05h function 07h---
  6446.      17h  7 BYTEs    ???
  6447.      1Eh    DWORD    pointer to ???
  6448.      22h  4 BYTEs    ???
  6449.      26h    WORD    attribute mask
  6450.      28h    DWORD    pointer to source filespec
  6451.      2Ch    DWORD    pointer to destination filespec
  6452.     ---class 05h function 08h---
  6453.      17h  7 BYTEs    ???
  6454.      1Eh    DWORD    pointer to ???
  6455.      22h  4 BYTEs    ???
  6456.      26h    BYTE    00h FINDFIRST
  6457.             01h FINDNEXT
  6458.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  6459.      2Ch    WORD    search attribute if FINDFIRST
  6460.      2Eh    DWORD    pointer to filespec if FINDFIRST
  6461.     ---class 05h function 09h---
  6462.      17h  7 BYTEs    ???
  6463.      1Eh    DWORD    pointer to ???
  6464.      22h    DWORD    pointer to IFS open file structure (see below)
  6465.      26h    WORD    ???  \ together, specify open vs. create, whether or
  6466.      28h    WORD    ???  / not to truncate
  6467.      2Ah  4 BYTEs    ???
  6468.      2Eh    DWORD    pointer to filename
  6469.      32h  4 BYTEs    ???
  6470.      36h    WORD    file attributes on call
  6471.             returned ???
  6472.      38h    WORD    returned ???
  6473.     ---class 05h function 0Ah---
  6474.      17h  7 BYTEs    ???
  6475.      1Eh    DWORD    pointer to ???
  6476.      22h    DWORD    pointer to IFS open file structure (see below)
  6477.      26h    BYTE    seek type (02h = from end)
  6478.      28h    DWORD    offset on call
  6479.             returned new absolute position
  6480.     ---class 05h functions 0Bh,0Ch---
  6481.      17h  7 BYTEs    ???
  6482.      1Eh    DWORD    pointer to ???
  6483.      22h    DWORD    pointer to IFS open file structure (see below)
  6484.      28h    WORD    number of bytes to transfer
  6485.             returned bytes actually transferred
  6486.      2Ah    DWORD    transfer address
  6487.     ---class 05h function 0Dh---
  6488.      17h  7 BYTEs    ???
  6489.      1Eh    DWORD    pointer to ???
  6490.      22h    DWORD    pointer to IFS open file structure (see below)
  6491.      26h    BYTE    file handle???
  6492.      27h    BYTE    unused???
  6493.      28h    WORD    ???
  6494.      2Ah    WORD    ???
  6495.      2Ch    WORD    ???
  6496.      2Eh    WORD    ???
  6497.     ---class 05h function 0Eh---
  6498.      17h  7 BYTEs    ???
  6499.      1Eh    DWORD    pointer to ???
  6500.      22h    DWORD    pointer to IFS open file structure (see below)
  6501.      26h    BYTE    00h commit file
  6502.             01h close file
  6503.      27h    BYTE    unused???
  6504.     ---class 05h function 0Fh---
  6505.      17h  7 BYTEs    ???
  6506.      1Eh    DWORD    pointer to ???
  6507.      22h  4 BYTEs    ???
  6508.      26h    BYTE    02h GET attributes
  6509.             03h PUT attributes
  6510.      27h    BYTE    unused???
  6511.      28h 12 BYTEs    ???
  6512.      34h    WORD    search attributes???
  6513.      36h    DWORD    pointer to filename
  6514.      3Ah    WORD    (GET) returned ??? 
  6515.      3Ch    WORD    (GET) returned ???
  6516.      3Eh    WORD    (GET) returned ???
  6517.      40h    WORD    (GET) returned ???
  6518.      42h    WORD    (PUT) new attributes
  6519.             (GET) returned attributes
  6520.     ---class 05h function 10h---
  6521.      17h  7 BYTEs    ???
  6522.      1Eh    DWORD    pointer to ???
  6523.      22h    DWORD    pointer to IFS open file structure (see below)
  6524.      26h    WORD    ???
  6525.      28h    DWORD    pointer to ???
  6526.      2Ch    WORD    ???
  6527.      2Eh    BYTE    ???
  6528.      2Fh    BYTE    subfunction
  6529.             01h get printer setup
  6530.             03h ???
  6531.             04h ???
  6532.             05h ???
  6533.             06h ???
  6534.             07h ???
  6535.             21h set printer setup
  6536.     ---class 05h function 11h---
  6537.      17h  7 BYTEs    ???
  6538.      1Eh    DWORD    pointer to ???
  6539.      22h    DWORD    pointer to IFS open file structure (see below)
  6540.      26h    BYTE    subfunction
  6541.      27h    BYTE    unused???
  6542.      28h    WORD    ???
  6543.      2Ah    WORD    ???
  6544.      2Ch    WORD    ???
  6545.      2Eh    BYTE    ???
  6546.      2Fh    BYTE    ???
  6547.     ---class 05h function 12h---
  6548.      17h 15 BYTEs    unused???
  6549.      26h    WORD    PSP segment
  6550.      28h    BYTE    type of process termination
  6551.      29h    BYTE    unused???
  6552.     ---class 05h function 13h---
  6553.      17h 15 BYTEs    unused???
  6554.      26h    WORD    PSP segment
  6555. ---request class 06h---
  6556.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  6557.  1Ah    BYTE    returned ???
  6558.  1Bh    BYTE    unused
  6559. ---request class 07h---
  6560.  16h    DWORD    pointer to IFS open file structure (see below)
  6561.  1Ah    BYTE    ???
  6562.  1Bh    BYTE    unused???
  6563.  
  6564. Format of IFS open file structure:
  6565. Offset    Size    Description
  6566.  00h    WORD    ???
  6567.  02h    WORD    device info word
  6568.  04h    WORD    file open mode
  6569.  06h    WORD    ???
  6570.  08h    WORD    file attributes
  6571.  0Ah    WORD    owner's network machine number
  6572.  0Ch    WORD    owner's PSP segment
  6573.  0Eh    DWORD    file size
  6574.  12h    DWORD    current offset in file
  6575.  16h    WORD    file time
  6576.  18h    WORD    file date
  6577.  1Ah 11 BYTEs    filename in FCB format
  6578.  25h    WORD    ???
  6579.  27h    WORD    hash value of SFT address
  6580.         (low word of linear address + segment&F000h)
  6581.  29h  3 WORDs    network info from SFT
  6582.  2Fh    WORD    ???
  6583.  
  6584. Format of one item in DOS 4+ list of special program names:
  6585. Offset    Size    Description
  6586.  00h    BYTE    length of name (00h = end of list)
  6587.  01h  N BYTEs    name in format name.ext
  6588.  N    2 BYTEs    DOS version to return for program (major,minor)
  6589.         (see AH=30h,INT 2F/AX=122Fh)
  6590. ---DOS 4 only---
  6591.  N+2    BYTE    number of times to return fake version number (FFh = always)
  6592. Note:    if the name of the executable for the program making the DOS "get
  6593.       version" call matches one of the names in this list, DOS returns the
  6594.       specified version rather than the true version number
  6595. ----------215252-----------------------------
  6596. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  6597.     AX = 5252h
  6598. Return: BX = FFEEh if resident
  6599. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  6600. ----------2153-------------------------------
  6601. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  6602.     AH = 53h
  6603.     DS:SI -> BIOS Parameter Block (see below)
  6604.     ES:BP -> buffer for Drive Parameter Block (see AH=32h for format)
  6605. Return: ES:BP buffer filled
  6606. Note:    for DOS 3+, the cluster at which to start searching is set to 0000h
  6607.       and the number of free clusters is set to FFFFh (unknown)
  6608.  
  6609. Format of BIOS Parameter Block:
  6610. Offset    Size    Description
  6611.  00h    WORD    number of bytes per sector
  6612.  02h    BYTE    number of sectors per cluster
  6613.  03h    WORD    number of reserved sectors at start of disk
  6614.  05h    BYTE    number of FATs
  6615.  06h    WORD    number of entries in root directory
  6616.  08h    WORD    total number of sectors
  6617.         for DOS 4+, set to zero if partition >32M, then set DWORD at
  6618.           15h to actual number of sectors
  6619.  0Ah    BYTE    media ID byte
  6620.  0Bh    WORD    number of sectors per FAT
  6621. ---DOS 3+---
  6622.  0Dh    WORD    number of sectors per track
  6623.  0Fh    WORD    number of heads
  6624.  11h    DWORD    number of hidden sectors
  6625.  15h 11 BYTEs    reserved    
  6626. ---DOS 4+ ---
  6627.  15h    DWORD    total number of sectors if word at 08h contains zero
  6628.  19h  6 BYTEs    ???
  6629.  1Fh    WORD    number of cylinders
  6630.  21h    BYTE    device type
  6631.  22h    WORD    device attributes (removable or not, etc)
  6632. ---European MSDOS 4.00---
  6633.  15h    DWORD    total number of sectors if word at 08h contains zero
  6634.          (however, this DOS does not actually implement >32M partitions)
  6635. ----------2154-------------------------------
  6636. INT 21 - DOS 2+ - GET VERIFY FLAG
  6637.     AH = 54h
  6638. Return: AL = verify flag
  6639.         00h off
  6640.         01h on (all disk writes verified after writing)
  6641. SeeAlso: AH=2Eh
  6642. ----------2155-------------------------------
  6643. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  6644.     AH = 55h
  6645.     DX = segment at which to create new PSP
  6646.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  6647. Return: CF clear if successful
  6648.  
  6649. Notes:    creates a "child" PSP rather than making an exact copy of the current
  6650.       PSP; the new PSP's parent pointer is set to the current PSP and the
  6651.       reference count for each inherited file is incremented
  6652.     (DOS 2+) sets current PSP to DX
  6653.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  6654. SeeAlso: AH=26h,AH=50h
  6655. ----------2156-------------------------------
  6656. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  6657.     AH = 56h
  6658.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  6659.     ES:DI -> ASCIZ new filename (no wildcards)
  6660.     CL = attribute mask (server call only, see below)
  6661. Return: CF clear if successful
  6662.     CF set on error
  6663.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  6664. Notes:    allows move between directories on same logical volume
  6665.     does not set the archive attribute (see AX=4300h), which results in
  6666.       incremental backups not backing up the file under its new name
  6667.     open files should not be renamed
  6668.     (DOS 3+) allows renaming of directories
  6669.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  6670.       error 12h (no more files) is returned on success, and both source and
  6671.       destination specs must be canonical (as returned by AH=60h).
  6672.       Wildcards in the destination are replaced by the corresponding char
  6673.       of each source file being renamed.  Under DOS 3.x, the call will fail
  6674.       if the destination wildcard is *.* or equivalent.  When invoked via
  6675.       AX=5D00h, only those files matching the attribute mask in CL are
  6676.       renamed.
  6677.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  6678.       and the new-name pointer is in ES:EDI (DS must equal ES)
  6679. SeeAlso: AH=17h,AX=4301h,AH=60h,AX=5D00h
  6680. ----------215700-----------------------------
  6681. INT 21 - DOS 2+ - GET FILE'S DATE AND TIME
  6682.     AX = 5700h
  6683.     BX = file handle
  6684. Return: CF clear if successful
  6685.         CX = file's time
  6686.         bits 15-11: hours (0-23)
  6687.              10-5:  minutes
  6688.               4-0:  seconds/2
  6689.         DX = file's date
  6690.         bits 15-9: year - 1980
  6691.               8-5: month
  6692.               4-0: day
  6693.     CF set on error
  6694.         AX = error code (01h,06h) (see AH=59h)
  6695. SeeAlso: AX=5701h
  6696. ----------215701-----------------------------
  6697. INT 21 - DOS 2+ - SET FILE'S DATE AND TIME
  6698.     AX = 5701h
  6699.     BX = file handle
  6700.     CX = new time (see AX=5700h)
  6701.     DX = new date (see AX=5700h)
  6702. Return: CF clear if successful
  6703.     CF set on error
  6704.         AX = error code (01h,06h) (see AH=59h)
  6705. SeeAlso: AX=5700h
  6706. ----------215702-----------------------------
  6707. INT 21 - DOS 4.x only - GET ???
  6708.     AX = 5702h
  6709.     BX = ??? (0000h through 0004h)
  6710.     DS:SI -> ???
  6711.     ES:DI -> result buffer
  6712.     CX = size of result buffer
  6713. Return: CX = size of returned data
  6714. SeeAlso: AX=5703h,AX=5704h
  6715. ----------215703-----------------------------
  6716. INT 21 - DOS 4.x only - GET ???
  6717.     AX = 5703h
  6718.     BX = file handle (only 0000h through 0004h valid)
  6719.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  6720.     ES:DI -> result buffer
  6721.     CX = size of result buffer
  6722. Return: CX = size of returned data
  6723.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  6724. SeeAlso: AX=5702h,AX=5704h,INT 2F/AX=112Dh
  6725. ----------215704-----------------------------
  6726. INT 21 - DOS 4.x only - TRUNCATE OPEN FILE TO ZERO LENGTH
  6727.     AX = 5704h
  6728.     BX = file handle (only 0000h through 0004h valid)
  6729.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  6730.     ES:DI -> result buffer
  6731.     CX = size of result buffer
  6732. Return: CX = size of returned data
  6733.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  6734. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  6735. ----------2158-------------------------------
  6736. INT 21 - DOS 3+ - GET OR SET MEMORY ALLOCATION STRATEGY
  6737.     AH = 58h
  6738.     AL = subfunction
  6739.         00h get allocation strategy
  6740.         Return: AX = current strategy
  6741.                 00h low memory first fit
  6742.                 01h low memory best fit
  6743.                 02h low memory last fit
  6744.              ---DOS 5.0---
  6745.                 40h high memory first fit
  6746.                 41h high memory best fit
  6747.                 42h high memory last fit
  6748.                 80h first fit, try high then low memory
  6749.                 81h best fit, try high then low memory
  6750.                 82h last fit, try high then low memory
  6751.         01h set allocation strategy
  6752.         BL = new allocation strategy (see above)
  6753.         BH = 00h (DOS 5.0)
  6754. Return: CF clear if successful
  6755.     CF set on error
  6756.         AX = error code (01h) (see AH=59h)
  6757. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  6758.       2 or greater means last fit
  6759.     the Get subfunction returns the last value set
  6760.     a program which changes the allocation strategy should restore it
  6761.       before terminating
  6762.     Toshiba MSDOS 2.11 supports subfunctions 00h and 01h
  6763.     DR-DOS 3.41 reportedly reverses subfunctions 00h and 01h
  6764. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  6765. ----------2158-------------------------------
  6766. INT 21 - DOS 5.0 - GET OR SET UMB LINK STATE
  6767.     AH = 58h
  6768.     AL = subfunction
  6769.         02h get UMB link state
  6770.         Return: AL = 00h UMBs not part of DOS memory chain
  6771.                = 01h UMBs in DOS memory chain
  6772.         03h set UMB link state
  6773.         BX = 0000h remove UMBs from DOS memory chain
  6774.            = 0001h add UMBs to DOS memory chain
  6775. Return: CF clear if successful
  6776.     CF set on error
  6777.         AX = error code (01h) (see AH=59h)
  6778. Note:    a program which changes the UMB link state should restore it before
  6779.       terminating
  6780. ----------2158CC-----------------------------
  6781. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  6782.     AX = 58CCh
  6783. Return: CF clear if resident
  6784. SeeAlso: AX=5252h,AX=6969h
  6785. ----------2159--BX0000-----------------------
  6786. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  6787.     AH = 59h
  6788.     BX = 0000h
  6789. Return: AX = extended error code (see below)
  6790.     BH = error class (see below)
  6791.     BL = recommended action (see below)
  6792.     CH = error locus (see below)
  6793.     ES:DI may be pointer (see error code list below)
  6794.     CL, DX, SI, BP, and DS destroyed
  6795. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  6796.       one supported under DOS 2.x
  6797.     you should call this function to retrieve the true error code when an
  6798.       FCB or DOS 2.x call returns an error
  6799. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  6800.  
  6801. Values for extended error code:
  6802.     00h no error
  6803.     01h function number invalid
  6804.     02h file not found
  6805.     03h path not found
  6806.     04h too many open files (no handles available)
  6807.     05h access denied
  6808.     06h invalid handle
  6809.     07h memory control block destroyed
  6810.     08h insufficient memory
  6811.     09h memory block address invalid
  6812.     0Ah environment invalid (usually >32K in length)
  6813.     0Bh format invalid
  6814.     0Ch access code invalid
  6815.     0Dh data invalid
  6816.     0Eh reserved
  6817.     0Fh invalid drive
  6818.     10h attempted to remove current directory
  6819.     11h not same device
  6820.     12h no more files
  6821. ---DOS 3+---
  6822.     13h disk write-protected
  6823.     14h unknown unit
  6824.     15h drive not ready
  6825.     16h unknown command
  6826.     17h data error (CRC)
  6827.     18h bad request structure length
  6828.     19h seek error
  6829.     1Ah unknown media type (non-DOS disk)
  6830.     1Bh sector not found
  6831.     1Ch printer out of paper
  6832.     1Dh write fault
  6833.     1Eh read fault
  6834.     1Fh general failure
  6835.     20h sharing violation
  6836.     21h lock violation
  6837.     22h disk change invalid
  6838.         ES:DI -> ASCIZ volume label of required disk
  6839.     23h FCB unavailable
  6840.     24h sharing buffer overflow
  6841.     25h (DOS 4+) code page mismatch
  6842.     26h (DOS 4+) cannot complete file operation (out of input)
  6843.     27h (DOS 4+) insufficient disk space
  6844.     28h-31h reserved
  6845.     32h network request not supported
  6846.     33h remote computer not listening
  6847.     34h duplicate name on network
  6848.     35h network name not found
  6849.     36h network busy
  6850.     37h network device no longer exists
  6851.     38h network BIOS command limit exceeded
  6852.     39h network adapter hardware error
  6853.     3Ah incorrect response from network
  6854.     3Bh unexpected network error
  6855.     3Ch incompatible remote adapter
  6856.     3Dh print queue full
  6857.     3Eh queue not full
  6858.     3Fh not enough space to print file
  6859.     40h network name was deleted
  6860.     41h network: Access denied
  6861.     42h network device type incorrect
  6862.     43h network name not found
  6863.     44h network name limit exceeded
  6864.     45h network BIOS session limit exceeded
  6865.     46h temporarily paused
  6866.     47h network request not accepted
  6867.     48h network print/disk redirection paused
  6868.     49h (LANtastic) invalid network version
  6869.     4Ah (LANtastic) account expired
  6870.     4Bh (LANtastic) password expired
  6871.     4Ch (LANtastic) login attempt invalid at this time
  6872.     4Dh (LANtastic v3+) disk limit exceeded on network node
  6873.     4Eh (LANtastic v3+) not logged in to network node
  6874.     4Fh reserved
  6875.     50h file exists
  6876.     51h reserved
  6877.     52h cannot make directory
  6878.     53h fail on INT 24h
  6879.     54h (DOS 3.3+) too many redirections
  6880.     55h (DOS 3.3+) duplicate redirection
  6881.     56h (DOS 3.3+) invalid password
  6882.     57h (DOS 3.3+) invalid parameter
  6883.     58h (DOS 3.3+) network write fault
  6884.     59h (DOS 4+) function not supported on network
  6885.     5Ah (DOS 4+) required system component not installed
  6886.  
  6887. Values for Error Class:
  6888.     01h out of resource (storage space or I/O channels)
  6889.     02h temporary situation (file or record lock)
  6890.     03h authorization (denied access)
  6891.     04h internal (system software bug)
  6892.     05h hardware failure
  6893.     06h system failure (configuration file missing or incorrect)
  6894.     07h application program error
  6895.     08h not found
  6896.     09h bad format
  6897.     0Ah locked
  6898.     0Bh media error
  6899.     0Ch already exists
  6900.     0Dh unknown
  6901.  
  6902. Values for Suggested Action:
  6903.     01h retry
  6904.     02h delayed retry
  6905.     03h prompt user to reenter input
  6906.     04h abort after cleanup
  6907.     05h immediate abort
  6908.     06h ignore
  6909.     07h retry after user intervention
  6910.  
  6911. Values for Error Locus:
  6912.     01h unknown or not appropriate
  6913.     02h block device (disk error)
  6914.     03h network related
  6915.     04h serial device (timeout)
  6916.     05h memory related
  6917. ----------2159--BX0001-----------------------
  6918. INT 21 - European MSDOS 4.0 - GET HARD ERROR INFORMATION
  6919.     AH = 59h
  6920.     BX = 0001h
  6921. Return: ES:DI -> hard error information packet (see below) for most recent
  6922.         hard (critical) error
  6923. SeeAlso: AH=95h,INT 24
  6924.  
  6925. Format of hard error information packet:
  6926. Offset    Size    Description
  6927.  00h    WORD    contents of AX at system entry
  6928.  02h    WORD    Process ID which encountered error
  6929.  04h    WORD    contents of AX at time of error
  6930.  06h    BYTE    error type
  6931.          00h physical I/O error
  6932.         01h disk change request
  6933.         02h file sharing violation
  6934.         03h FCB problem
  6935.         04h file locking violation
  6936.         05h bad FAT
  6937.         06h network detected error
  6938.  07h    BYTE    INT 24 error code
  6939.  08h    WORD    extended error code (see AH=59h/BX=0000h)
  6940.  0Ah    DWORD    pointer to associated device
  6941. ----------215A-------------------------------
  6942. INT 21 - DOS 3+ - CREATE TEMPORARY FILE
  6943.     AH = 5Ah
  6944.     CX = file attribute (see AX=4301h)
  6945.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  6946.         generated filename
  6947. Return: CF clear if successful
  6948.         AX = file handle opened for read/write in compatibility mode
  6949.         DS:DX pathname extended with generated name for temporary file
  6950.     CF set on error
  6951.         AX = error code (03h,04h,05h) (see AH=59h)
  6952. Notes:    creates a file with a unique name which must be explicitly deleted
  6953.     COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  6954.       wraps around to the end of the segment
  6955.     under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  6956. SeeAlso: AH=3Ch,AH=5Bh
  6957. ----------215B-------------------------------
  6958. INT 21 - DOS 3+ - CREATE NEW FILE
  6959.     AH = 5Bh
  6960.     CX = file attribute (see AX=4301h)
  6961.     DS:DX -> ASCIZ filename
  6962. Return: CF clear if successful
  6963.         AX = file handle opened for read/write in compatibility mode
  6964.     CF set on error
  6965.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  6966. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  6967.       rather than truncating it; this permits its use in creating semaphore
  6968.       files because it is an atomic "test and set" operation
  6969.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  6970. SeeAlso: AH=3Ch,AH=5Ah
  6971. ----------215C-------------------------------
  6972. INT 21 - DOS 3+ - "FLOCK" - RECORD LOCKING
  6973.     AH = 5Ch
  6974.     AL = subfunction
  6975.         00h lock region of file
  6976.         01h unlock region of file
  6977.     BX = file handle
  6978.     CX:DX = start offset of region within file
  6979.     SI:DI = length of region in bytes
  6980. Return: CF clear if successful
  6981.     CF set on error
  6982.         AX = error code (01h,06h,21h,24h) (see AH=59h)
  6983. Notes:    error returned unless SHARE or network installed
  6984.     an unlock call must specify the same region as some prior lock call
  6985.     locked regions become entirely inaccessible to other processes
  6986.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  6987.       handles inherited by child processes (see AH=4Bh) do not
  6988. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  6989. ----------215D00-----------------------------
  6990. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  6991.     AX = 5D00h
  6992.     DS:DX -> DOS parameter list (see below)
  6993.     DPL contains all register values for a call to INT 21h
  6994. Return: as appropriate for function being called
  6995. Notes:    does not check AH.  Out of range values will crash the system
  6996.     executes using specified computer ID and process ID
  6997.     sharing delay loops skipped
  6998.     a special sharing mode is enabled
  6999.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h)
  7000.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  7001.       DELETE (AH=41h), and RENAME (AH=56h)
  7002.     functions which take filenames require canonical names (as returned
  7003.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  7004. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  7005.  
  7006. Format of DOS parameter list:
  7007. Offset    Size    Description
  7008.  00h    WORD    AX 
  7009.  02h    WORD    BX
  7010.  04h    WORD    CX
  7011.  06h    WORD    DX
  7012.  08h    WORD    SI
  7013.  0Ah    WORD    DI
  7014.  0Ch    WORD    DS
  7015.  0Eh    WORD    ES
  7016.  10h    WORD    reserved (0)
  7017.  12h    WORD    computer ID (0 = current system)
  7018.  14h    WORD    process ID (PSP segment on specified computer)
  7019. ----------215D01-----------------------------
  7020. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  7021.     AX = 5D01h
  7022.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7023.         process ID fields used
  7024. Return: CF set on error
  7025.         AX = error code (see AH=59h)
  7026.     CF clear if successful
  7027. Notes:    flushes buffers and updates directory entries for each file which has
  7028.       been written to; if remote file, calls INT 2F/AX=1107h
  7029.     the computer ID and process ID are stored but ignored under DOS 3.3
  7030. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  7031. ----------215D02-----------------------------
  7032. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  7033.     AX = 5D02h
  7034.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  7035.         computer ID, and process ID used
  7036.     DPL's DS:DX -> ASCIZ name of file to close
  7037. Return: CF set on error
  7038.         AX = error code (see AH=59h)
  7039.     CF clear if successful
  7040. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  7041.     name must be canonical fully-qualified, such as returned by AH=60h
  7042. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  7043. ----------215D03-----------------------------
  7044. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  7045.     AX = 5D03h
  7046.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  7047. Return: CF set on error
  7048.         AX = error code (see AH=59h)
  7049.     CF clear if successful
  7050. Note:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  7051. SeeAlso: AX=5D02h,AX=5D04h
  7052. ----------215D04-----------------------------
  7053. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  7054.     AX = 5D04h
  7055.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7056.         process ID fields used
  7057. Return: CF set on error
  7058.         AX = error code (see AH=59h)
  7059.     CF clear if successful
  7060. Note:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  7061. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  7062. ----------215D05-----------------------------
  7063. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  7064.     AX = 5D05h
  7065.     DS:DX -> DOS parameter list (see AX=5D00h)
  7066.     DPL's BX = index of sharing record (see AH=52h)
  7067.     DPL's CX = index of SFT in sharing record's SFT list
  7068. Return: CF clear if successful
  7069.         ES:DI -> ASCIZ filename
  7070.         BX = network machine number of SFT's owner
  7071.         CX = number of locks held by SFT's owner
  7072.     CF set if either index out of range
  7073.         AX = 0012h (no more files)
  7074. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  7075.     names are always canonical fully-qualified, such as returned by AH=60h
  7076. SeeAlso: AH=5Ch,AH=60h 
  7077. ----------215D06-----------------------------
  7078. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  7079.     AX = 5D06h
  7080. Return: CF set on error
  7081.        AX = error code (see AH=59h)
  7082.     CF clear if successful
  7083.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  7084.         (critical error flag is first byte)
  7085.         CX = size in bytes of area which must be swapped while in DOS
  7086.         DX = size in bytes of area which must always be swapped
  7087. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  7088.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  7089.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  7090.       DOS 2.x by forcing use of correct stack
  7091.     swapping the data area allows reentering DOS unless DOS is in a
  7092.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  7093.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  7094. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7095.  
  7096. Format of DOS 3.10-3.30 Swappable Data Area:
  7097. Offset    Size    Description
  7098.  00h    BYTE    critical error flag
  7099.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7100.  02h    BYTE    drive on which current critical error occurred, or FFh
  7101.  03h    BYTE    locus of last error
  7102.  04h    WORD    extended error code of last error
  7103.  06h    BYTE    suggested action for last error
  7104.  07h    BYTE    class of last error
  7105.  08h    DWORD    ES:DI pointer for last error
  7106.  0Ch    DWORD    current DTA
  7107.  10h    WORD    current PSP
  7108.  12h    WORD    stores SP across an INT 23
  7109.  14h    WORD    return code from last process termination (zerod after reading
  7110.         with AH=4Dh)
  7111.  16h    BYTE    current drive
  7112.  17h    BYTE    extended break flag
  7113. ---remainder need only be swapped if in DOS---
  7114.  18h    WORD    value of AX on call to INT 21
  7115.  1Ah    WORD    PSP segment for sharing/network
  7116.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  7117.  1Eh    WORD    first usable memory block found when allocating memory
  7118.  20h    WORD    best usable memory block found when allocating memory
  7119.  22h    WORD    last usable memory block found when allocating memory
  7120.  24h    WORD    memory size in paragraphs (used only during initialization)
  7121.  26h    WORD    ???
  7122.  28h    BYTE    INT 24 returned Fail
  7123.  29h    BYTE    bit flags for allowable actions on INT 24
  7124.  2Ah    BYTE    ??? flag
  7125.  2Bh    BYTE    FFh if Ctrl-Break termination, 00h otherwise
  7126.  2Ch    BYTE    ??? flag of some kind
  7127.  2Dh    BYTE    ??? (doesn't seem to be referenced)
  7128.  2Eh    BYTE    day of month
  7129.  2Fh    BYTE    month
  7130.  30h    WORD    year - 1980
  7131.  32h    WORD    number of days since 1-1-1980
  7132.  34h    BYTE    day of week (0 = Sunday)
  7133.  35h    BYTE    working SFT pointer at SDA+2AAh is valid ???
  7134.  36h    BYTE    safe to call INT 28 if nonzero
  7135.  37h    BYTE    flag: if nonzero, INT 24 abort turned into INT 24 fail
  7136.         (set only during process termination)
  7137.  38h 26 BYTEs    device driver request header (see INT 2F/AX=0802h)
  7138.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  7139.  56h 22 BYTEs    device driver request header
  7140.  6Ch 22 BYTEs    device driver request header
  7141.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  7142.  83h    BYTE    ??? apparently not referenced by kernel
  7143.  84h  3 BYTEs    24-bit user number (see AH=30h)
  7144.  87h    BYTE    OEM number (see AH=30h)
  7145.  88h  2 BYTEs    ???
  7146.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  7147.  90h    BYTE    ??? buffer for single-byte I/O functions
  7148.  91h    BYTE    ??? apparently not referenced by kernel
  7149.  92h 128 BYTEs    buffer for filename
  7150. 112h 128 BYTEs    buffer for filename
  7151. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  7152. 1A7h 32 BYTEs    directory entry for found file
  7153. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  7154. 218h 11 BYTEs    FCB-format filename for device name comparison
  7155. 223h    BYTE    unused???
  7156. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7157. 22Fh  2 BYTEs    ???
  7158. 231h    WORD    ???
  7159. 233h  5 BYTEs    ???
  7160. 238h    BYTE    extended FCB file attribute
  7161. 239h    BYTE    type of FCB (00h regular, FFh extended)
  7162. 23Ah    BYTE    directory search attributes
  7163. 23Bh    BYTE    file open mode???
  7164. 23Ch    BYTE    ??? flag bits 0 and 4
  7165. 23Dh    BYTE    ??? flag or counter
  7166. 23Eh    BYTE    ??? flag
  7167. 23Fh    BYTE    flag indicating how DOS function was invoked
  7168.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7169. 240h    BYTE    ???
  7170. 241h    BYTE    ??? flag
  7171. 242h    BYTE    flag: 00h if read, 01h if write
  7172. 243h    BYTE    drive number for ???
  7173. 244h    BYTE    ???
  7174. 245h    BYTE    ??? flag or counter
  7175. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  7176. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  7177. 248h    BYTE    ??? flag or counter
  7178. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  7179. 24Ah    BYTE    ??? flag
  7180. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  7181.         (normally E5h, but 00h as described under INT 21/AH=13h)
  7182. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  7183. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  7184. 254h    WORD    stores SP across INT 24
  7185. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  7186. 25Ah    WORD    ???
  7187. 25Ch    WORD    ??? temp
  7188. 25Eh    WORD    ??? flag (only low byte referenced)
  7189. 260h    WORD    ??? temp
  7190. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7191. 263h    BYTE    ??? (doesn't seem to be referenced)
  7192. 264h    DWORD    pointer to device header
  7193. 268h    DWORD    pointer to current SFT
  7194. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  7195. 270h    DWORD    pointer to caller's FCB
  7196. 274h    WORD    number of SFT to which file being opened will refer
  7197. 276h    WORD    temporary storage for file handle
  7198. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  7199. 27Ch    WORD    offset in DOS DS of first filename argument
  7200. 27Eh    WORD    offset in DOS DS of second filename argument
  7201. 280h    WORD    offset of last component in pathname or FFFFh
  7202. 282h    WORD    ??? offset of transfer address???
  7203. 284h    WORD    ??? relative cluster within file being accessed ???
  7204. 286h    WORD    ??? absolute cluster number being accessed ???
  7205. 288h    WORD    ??? current sector number
  7206. 28Ah    WORD    ??? current cluster number
  7207. 28Ch    WORD    ??? current offset in file DIV bytes per sector
  7208. 28Eh  2 BYTEs    ??? 
  7209. 290h    WORD    ??? current offset in file MOD bytes per sector
  7210. 292h    DWORD    current offset in file
  7211. 296h    WORD    ???
  7212. 298h    WORD    ???
  7213. 29Ah    WORD    ???
  7214. 29Ch    WORD    ???
  7215. 29Eh    WORD    ???
  7216. 2A0h    WORD    ???
  7217. 2A2h    DWORD    number of bytes appended to file
  7218. 2A6h    DWORD    pointer to ??? disk buffer
  7219. 2AAh    DWORD    pointer to working SFT
  7220. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  7221. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  7222. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  7223. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  7224.         also switched to for duration of INT 24
  7225. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7226.         (see AH=4Eh)
  7227. 2CDh 32 BYTEs    directory entry for file being renamed
  7228. 2EDh 331 BYTEs    critical error stack
  7229.    403h     35 BYTEs scratch SFT
  7230. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7231. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7232. ---DOS 3.2,3.3 only---
  7233. 738h    BYTE    device driver lookahead flag (see AH=64h)
  7234. 739h    BYTE    ??? looks like a drive number
  7235. 73Ah    BYTE    ??? flag of some kind
  7236. 73Ah    BYTE    ???
  7237. ----------215D07-----------------------------
  7238. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  7239.     AX = 5D07h
  7240. Return: DL = mode
  7241.         00h redirected output is combined
  7242.         01h redirected output in separate print jobs
  7243. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  7244. ----------215D08-----------------------------
  7245. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  7246.     AX = 5D08h
  7247.     DL = mode
  7248.         00h redirected output is combined
  7249.         01h redirected output placed in separate jobs, start new print job
  7250.         now
  7251. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  7252. ----------215D09-----------------------------
  7253. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  7254.     AX = 5D09h
  7255. Note:    forces redirected printer output to be printed, and starts a new print
  7256.       job
  7257. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  7258. ----------215D0A-----------------------------
  7259. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  7260.     AX = 5D0Ah
  7261.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  7262. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  7263.       DX,DI, and ES in corresponding registers
  7264. Note:    documented for DOS 5+, but undocumented in earlier versions
  7265. SeeAlso: AH=59h
  7266. ----------215D0B-----------------------------
  7267. INT 21 U - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  7268.     AX = 5D0Bh
  7269. Return: CF set on error
  7270.         AX = error code (see AH=59h)
  7271.     CF clear if successful
  7272.         DS:SI -> swappable data area list (see below)
  7273. Note:    copying and restoring the swappable data areas allows DOS to be
  7274.       reentered unless it is in a critical section delimited by calls to
  7275.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  7276. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7277.  
  7278. Format of DOS 4.x swappable data area list:
  7279. Offset    Size    Description
  7280.  00h    WORD    count of data areas
  7281.  02h  N BYTEs    "count" copies of data area record
  7282.         Offset    Size    Description
  7283.          00h    DWORD    address
  7284.          04h    WORD    length and type
  7285.                 bit 15 set if swap always, clear if swap in DOS
  7286.                 bits 14-0: length in bytes
  7287.  
  7288. Format of DOS 4.0-5.0 swappable data area:
  7289. Offset    Size    Description
  7290.  00h    BYTE    critical error flag
  7291.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7292.  02h    BYTE    drive on which current critical error occurred or FFh
  7293.  03h    BYTE    locus of last error
  7294.  04h    WORD    extended error code of last error
  7295.  06h    BYTE    suggested action for last error
  7296.  07h    BYTE    class of last error
  7297.  08h    DWORD    ES:DI pointer for last error
  7298.  0Ch    DWORD    current DTA
  7299.  10h    WORD    current PSP
  7300.  12h    WORD    stores SP across an INT 23
  7301.  14h    WORD    return code from last process termination (zerod after reading
  7302.         with AH=4Dh)
  7303.  16h    BYTE    current drive
  7304.  17h    BYTE    extended break flag
  7305.  18h  2 BYTEs    ???
  7306. ---remainder need only be swapped if in DOS---
  7307.  1Ah    WORD    value of AX on call to INT 21
  7308.  1Ch    WORD    PSP segment for sharing/network
  7309.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  7310.  20h    WORD    first usable memory block found when allocating memory
  7311.  22h    WORD    best usable memory block found when allocating memory
  7312.  24h    WORD    last usable memory block found when allocating memory
  7313.  26h    WORD    memory size in paragraphs (used only during initialization)
  7314.  28h    WORD    ???
  7315.  2Ah    BYTE    ???
  7316.  2Bh    BYTE    ???
  7317.  2Ch    BYTE    ???
  7318.  2Dh    BYTE    ???
  7319.  2Eh    BYTE    ???
  7320.  2Fh    BYTE    ??? (doesn't seem to be referenced)
  7321.  30h    BYTE    day of month
  7322.  31h    BYTE    month
  7323.  32h    WORD    year - 1980
  7324.  34h    WORD    number of days since 1-1-1980
  7325.  36h    BYTE    day of week (0 = Sunday)
  7326.  37h    BYTE    ???
  7327.  38h    BYTE    ???
  7328.  39h    BYTE    ???
  7329.  3Ah 30 BYTEs    device driver request header (see INT 2F/AX=0802h)
  7330.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  7331.  5Ch 22 BYTEs    device driver request header
  7332.  72h 30 BYTEs    device driver request header
  7333.  90h  6    BYTEs    ???
  7334.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  7335.  9Ch  2 BYTEs    ???
  7336.  9Eh 128 BYTEs    buffer for filename
  7337. 11Eh 128 BYTEs    buffer for filename
  7338. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  7339. 1B3h 32 BYTEs    directory entry for found file
  7340. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  7341. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  7342. 236h    BYTE    ???
  7343. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7344. 242h  2 BYTEs    ???
  7345. 244h    WORD    ???
  7346. 246h  5 BYTEs    ???
  7347. 24Bh    BYTE    extended FCB file attributes
  7348. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  7349. 24Dh    BYTE    directory search attributes
  7350. 24Eh    BYTE    file open mode
  7351. 24Fh    BYTE    ??? flag bits
  7352. 250h    BYTE    ??? flag or counter
  7353. 251h    BYTE    ??? flag
  7354. 252h    BYTE    flag indicating how DOS function was invoked
  7355.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7356. 253h    BYTE    ???
  7357. 254h    BYTE    ???
  7358. 255h    BYTE    ???
  7359. 256h    BYTE    ???
  7360. 257h    BYTE    ???
  7361. 258h    BYTE    ???
  7362. 259h    BYTE    ???
  7363. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  7364. 25Bh    BYTE    ???
  7365. 25Ch    BYTE    type of process termination (00h-03h)
  7366. 25Dh    BYTE    ???
  7367. 25Eh    BYTE    ???
  7368. 25Fh    BYTE    ???
  7369. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  7370. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  7371. 268h    WORD    stores SP???
  7372. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  7373. 26Eh    WORD    segment of disk buffer
  7374. 270h    WORD    ???
  7375. 272h    WORD    ???
  7376. 274h    WORD    ???
  7377. 276h    WORD    ???
  7378. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7379. 279h    BYTE    ??? (doesn't seem to be referenced)
  7380. 27Ah    DWORD    pointer to ???
  7381. 27Eh    DWORD    pointer to current SFT
  7382. 282h    DWORD    pointer to current directory structure for drive being accessed
  7383. 286h    DWORD    pointer to caller's FCB
  7384. 28Ah    WORD    SFT index to which file being opened will refer
  7385. 28Ch    WORD    temporary storage for file handle
  7386. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  7387. 292h    WORD    offset in DOS DS of first filename argument
  7388. 294h    WORD    offset in DOS DS of second filename argument
  7389. 296h    WORD    ???
  7390. 298h    WORD    ???
  7391. 29Ah    WORD    ???
  7392. 29Ch    WORD    ???
  7393. 29Eh    WORD    ???
  7394. 2A0h    WORD    ???
  7395. 2A2h    WORD    ??? directory cluster number???
  7396. 2A4h    DWORD    ???
  7397. 2A8h    DWORD    ???
  7398. 2ACh    WORD    ???
  7399. 2AEh    DWORD    offset in file???
  7400. 2B2h    WORD    ???
  7401. 2B4h    WORD    bytes in partial sector
  7402. 2B6h    WORD    number of sectors
  7403. 2B8h    WORD    ???
  7404. 2BAh    WORD    ???
  7405. 2BCh    WORD    ???
  7406. 2BEh    DWORD    number of bytes appended to file
  7407. 2C2h    DWORD    pointer to ??? disk buffer
  7408. 2C6h    DWORD    pointer to ??? SFT
  7409. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  7410. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  7411. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  7412. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  7413.         also switched to for duration of INT 24
  7414. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  7415. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  7416.         performed, and 01h or 03h by INT 21/AX=6C00h)
  7417. 2D7h    WORD    ??? apparently unused
  7418. 2D9h    DWORD    stored ES:DI for AX=6C00h
  7419. 2DDh    WORD    extended file open action code (see AX=6C00h)
  7420. 2DFh    WORD    extended file open attributes (see AX=6C00h)
  7421. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  7422. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  7423. 2E7h    WORD    ???
  7424. 2E9h    WORD    ???
  7425. 2EBh    BYTE    ???
  7426. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  7427. 2EEh    WORD    ???
  7428. 2F0h    BYTE    ???
  7429. 2F1h    WORD    ??? bit flags
  7430. 2F3h    DWORD    pointer to user-supplied filename
  7431. 2F7h    DWORD    pointer to ???
  7432. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  7433. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  7434. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  7435. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7436.         (see AH=4Eh)
  7437. 315h 32 BYTEs    directory entry for file being renamed
  7438. 335h 331 BYTEs    critical error stack
  7439. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7440. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7441. 780h    BYTE    device driver lookahead flag (see AH=64h)
  7442. 781h    BYTE    ??? looks like a drive number
  7443. 782h    BYTE    ??? flag of some kind
  7444. 783h    BYTE    ???
  7445. 784h    WORD    ???
  7446. 786h    WORD    ???
  7447. 788h    WORD    ???
  7448. 78Ah    WORD    ???
  7449. ----------215E00-----------------------------
  7450. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  7451.     AX = 5E00h
  7452.     DS:DX -> 16-byte buffer for ASCIZ machine name
  7453. Return: CF clear if successful
  7454.         CH = validity
  7455.         00h name invalid
  7456.         nonzero valid
  7457.             CL = NetBIOS number for machine name
  7458.             DS:DX buffer filled with blank-paded name
  7459.     CF set on error
  7460.         AX = error code (01h) (see AH=59h)
  7461. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  7462. SeeAlso: AX=5E01h
  7463. ----------215E01CH00-------------------------
  7464. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  7465.     AX = 5E01h
  7466.     CH = 00h undefine name (make it invalid)
  7467.        <> 0     define name
  7468.     CL = name number
  7469.     DS:DX -> 15-character blank-padded ASCIZ name
  7470. SeeAlso: AX=5E00h
  7471. ----------215E02-----------------------------
  7472. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  7473.     AX = 5E02h
  7474.     BX = redirection list index (see AX=5F02h)
  7475.     CX = length of setup string
  7476.     DS:SI -> setup string
  7477. Return: CF clear if successful
  7478.     CF set on error
  7479.         AX = error code (01h) (see AH=59h)
  7480. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  7481. ----------215E03-----------------------------
  7482. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  7483.     AX = 5E03h
  7484.     BX = redirection list index (see AX=5F02h)
  7485.     ES:DI -> 64-byte buffer for setup string
  7486. Return: CF clear if successful
  7487.         CX = length of setup string
  7488.         ES:DI buffer filled
  7489.     CF set on error
  7490.         AX = error code (01h) (see AH=59h)
  7491. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  7492. ----------215E04-----------------------------
  7493. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  7494.     AX = 5E04h
  7495.     BX = redirection list index (see AX=5F02h)
  7496.     DX = mode
  7497.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  7498. Return: CF set on error
  7499.         AX = error code (see AH=59h)
  7500.     CF clear if successful
  7501. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  7502. SeeAlso: AX=5E05h,INT 2F/AX=111Fh
  7503. ----------215E05-----------------------------
  7504. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  7505.     AX = 5E05h
  7506.     BX = redirection list index (see AX=5F02h)
  7507. Return: CF set on error
  7508.         AX = error code (see AH=59h)
  7509.     CF clear if successful
  7510.         DX = printer mode (see AX=5E04h)
  7511. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  7512. SeeAlso: AX=5E04h,INT 2F/AX=111Fh
  7513. ----------215F00-----------------------------
  7514. INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
  7515.     AX = 5F00h
  7516.     BL = redirection type
  7517.         03h printer
  7518.         04h disk drive
  7519. Return: CF set on error
  7520.         AX = error code (see AH=59h)
  7521.     CF clear if successful
  7522.         BH = redirection state
  7523.         00h off
  7524.         01h on
  7525. Note:    calls INT 2F/AX=111Eh with AX on top of the stack
  7526. SeeAlso: AX=5F01h,INT 2F/AX=111Eh
  7527. ----------215F01-----------------------------
  7528. INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
  7529.     AX = 5F01h
  7530.     BL = redirection type
  7531.         03h printer
  7532.         04h disk drive
  7533.     BH = redirection state
  7534.         00h off
  7535.         01h on
  7536. Return: CF set on error
  7537.         AX = error code (see AH=59h)
  7538.     CF clear if successful
  7539. Notes:    when redirection is off, the local device (if any) rather than the
  7540.       remote device is used
  7541.     calls INT 2F/AX=111Eh with AX on top of the stack
  7542. SeeAlso: AX=5F00h,INT 2F/AX=111Eh
  7543. ----------215F02-----------------------------
  7544. INT 21 - DOS 3.1+ network, Banyan VINES, PC-NFS - GET REDIRECTION LIST ENTRY
  7545.     AX = 5F02h
  7546.     BX = redirection list index
  7547.     CX = 0000h (LANtastic)
  7548.     DS:SI -> 16-byte buffer for ASCIZ device name
  7549.     ES:DI -> 128-byte buffer for ASCIZ network name
  7550. Return: CF clear if successful
  7551.         BH = device status
  7552.         00h valid
  7553.         01h invalid
  7554.         BL = device type
  7555.         03h printer
  7556.         04h disk drive
  7557.         CX = user data previously set with AX=5F03h
  7558.         DS:SI and ES:DI buffers filled
  7559.         DX,BP destroyed
  7560.     CF set on error
  7561.         AX = error code (01h,12h) (see AH=59h)
  7562. Notes:    this function is passed through to INT 2F/AX=111Eh
  7563.     error code 12h is returned if BX is greater than the size of the list
  7564.     also supported by Banyan VINES, PC-NFS, and LANtastic
  7565. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  7566. ----------215F03-----------------------------
  7567. INT 21 - DOS 3.1+ network, Banyan VINES, LANtastic - REDIRECT DEVICE
  7568.     AX = 5F03h
  7569.     BL = device type
  7570.         03h printer
  7571.         04h disk drive
  7572.     CX = user data to save
  7573.         0000h for LANtastic
  7574.     DS:SI -> ASCIZ local device name (16 bytes max)
  7575.     ES:DI -> ASCIZ network name + ASCIZ password (128 bytes max total)
  7576. Return: CF clear if successful
  7577.     CF set on error
  7578.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  7579. Notes:    if device type is disk drive, DS:SI must point at either a null string
  7580.       or a string consisting the drive letter followed by a colon; if a
  7581.       null string, the network attempts to access the destination without
  7582.       redirecting a local drive
  7583.     calls INT 2F/AX=111Eh with AX on top of the stack
  7584. SeeAlso: AX=5F02h,AX=5F04h,INT 2F/AX=111Eh
  7585. ----------215F04-----------------------------
  7586. INT 21 - DOS 3.1+ network, Banyan VINES, LANtastic - CANCEL REDIRECTION
  7587.     AX = 5F04h
  7588.     DS:SI -> ASCIZ device name or path
  7589. Return: CF clear if successful
  7590.     CF set on error
  7591.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  7592. Notes:    the DS:SI string must be either a local device name, a drive letter
  7593.       followed by a colon, or a network directory beginning with two
  7594.       backslashes
  7595.     calls INT 2F/AX=111Eh with AX on top of the stack
  7596. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  7597. ----------215F05-----------------------------
  7598. INT 21 - DOS 4.x + Microsoft Networks - GET REDIRECTION LIST EXTENDED ENTRY
  7599.     AX = 5F05h
  7600.     BX = redirection list index
  7601.     DS:SI -> buffer for ASCIZ source device name
  7602.     ES:DI -> buffer for destination ASCIZ network path
  7603. Return: CF set on error
  7604.         AX = error code (see AH=59h)
  7605.     CF clear if successful
  7606.         BH = device status flag (bit 0 clear if valid)
  7607.         BL = device type (03h if printer, 04h if drive)
  7608.         CX = stored parameter value (user data)
  7609.         BP = NETBIOS local session number
  7610.         DS:SI buffer filled
  7611.         ES:DI buffer filled
  7612. Notes:    the local session number allows sharing the redirector's session number
  7613.     if an error is caused on the NETBIOS LSN, the redirector may be unable
  7614.       to correctly recover from errors
  7615.     calls INT 2F/AX=111Eh with AX on top of the stack
  7616. SeeAlso: AX=5F06h"Network",INT 2F/AX=111Eh
  7617. ----------215F05-----------------------------
  7618. INT 21 - STARLITE architecture - MAP LOCAL DRIVE LETTER TO REMOTE FILE SYSTEM
  7619.     AX = 5F05h
  7620.     DL = drive number (0=A:)
  7621.     DS:SI -> ASCIZ name of the object to map the drive to
  7622. Return: CF set on error
  7623.         AX = error code (see AH=59h)
  7624.     CF clear if successful
  7625. SeeAlso: AX=5F06h"STARLITE"
  7626. ----------215F06-----------------------------
  7627. INT 21 U - Network - GET REDIRECTION LIST???
  7628.     AX = 5F06h
  7629.     ???
  7630. Return: ???
  7631. Notes:    appears to be similar to AX=5F02h and AX=5F05h
  7632.     calls INT 2F/AX=111Eh with AX on top of the stack
  7633. SeeAlso: AX=5F05h"DOS",INT 2F/AX=111Eh
  7634. ----------215F06-----------------------------
  7635. INT 21 - STARLITE architecture - UNMAP DRIVE LETTER
  7636.     AX = 5F06h
  7637.     DL = drive to be unmapped (0=A:)
  7638. Return: CF set on error
  7639.         AX = error code (see AH=59h)
  7640.     CF clear if successful
  7641. SeeAlso: AX=5F05h"STARLITE"
  7642. ----------215F07-----------------------------
  7643. INT 21 - DOS 5.0 - ENABLE DRIVE
  7644.     AX = 5F07h
  7645.     DL = drive number (0=A:)
  7646. Return: CF clear if successful
  7647.     CF set on error
  7648.         AX = error code (0Fh) (see AH=59h)
  7649. Note:    simply sets the "valid" bit in the drive's CDS
  7650. SeeAlso: AH=52h,AX=5F08h"DOS"
  7651. ----------215F07-----------------------------
  7652. INT 21 - STARLITE architecture - MAKE NAMED OBJECT AVAILABLE ON NETWORK
  7653.     AX = 5F07h
  7654.     DS:SI -> ASCIZ name of object to offer to network
  7655.     ES:DI -> ASCIZ name under which object will be known on the network
  7656.         MUST begin with three slashes
  7657. Return: CF set on error
  7658.         AX = error code (see AH=59h)
  7659.     CF clear if successful
  7660. SeeAlso: AX=5F08h"STARLITE"
  7661. ----------215F08-----------------------------
  7662. INT 21 - DOS 5.0 - DISABLE DRIVE
  7663.     AX = 5F08h
  7664.     DL = drive number (0=A:)
  7665. Return: CF clear if successful
  7666.     CF set on error
  7667.         AX = error code (0Fh) (see AH=59h)
  7668. Note:    simply clears the "valid" bit in the drive's CDS
  7669. SeeAlso: AH=52h,AX=5F07h"DOS"
  7670. ----------215F08-----------------------------
  7671. INT 21 - STARLITE architecture - REMOVE GLOBAL NETWORK NAME OF OBJECT
  7672.     AX = 5F08h
  7673.     DS:SI -> ASCIZ network name (not local name) of object to unshare
  7674. Return: CF set on error
  7675.         AX = error code (see AH=59h)
  7676.     CF clear if successful
  7677. SeeAlso: AX=5F07h"STARLITE"
  7678. ----------215F09-----------------------------
  7679. INT 21 - STARLITE architecture - BIND TO NETWORK DEVICE
  7680.     AX = 5F09h
  7681.     DS:DX -> ASCIZ name of the device driver to attach to
  7682. Return: CF set on error
  7683.         AX = error code (see AH=59h)
  7684.     CF clear if successful
  7685. Note:    the STARLITE distributed file system can attach to multiple networks
  7686.       simultaneously
  7687. SeeAlso: AX=5F0Ah
  7688. ----------215F0A-----------------------------
  7689. INT 21 - STARLITE architecture - DETACH FROM NETWORK DEVICE
  7690.     AX = 5F0Ah
  7691.     DS:DX -> ASCIZ name of device driver to detach from
  7692. Return: CF set on error
  7693.         AX = error code (see AH=59h)
  7694.     CF clear if successful
  7695. SeeAlso: AX=5F09h
  7696. ----------215F32-----------------------------
  7697. INT 21 - LAN Manager Enhanced DOS API local interface - DosQNmPipeInfo
  7698.     AX = 5F32h
  7699.     ???
  7700. Return: ???
  7701. Note:    supported by Novell DOS Named Pipe Extender
  7702. SeeAlso: AX=5F33h,AX=5F34h
  7703. ----------215F33-----------------------------
  7704. INT 21 - LAN Manager Enhanced DOS API local interface - DosQNmPHandState
  7705.     AX = 5F33h
  7706.     ???
  7707. Return: ???
  7708. Note:    supported by Novell DOS Named Pipe Extender
  7709. SeeAlso: AX=5F32h,AX=5F34h
  7710. ----------215F34-----------------------------
  7711. INT 21 - LAN Manager Enhanced DOS API local interface - DosSetNmPHandState
  7712.     AX = 5F34h
  7713.     ???
  7714. Return: ???
  7715. Note:    supported by Novell DOS Named Pipe Extender
  7716. SeeAlso: AX=5F32h,AX=5F33h,AX=5F36h
  7717. ----------215F35-----------------------------
  7718. INT 21 - LAN Manager Enhanced DOS API local interface - DosPeekNmPipe
  7719.     AX = 5F35h
  7720.     ???
  7721. Note:    supported by Novell DOS Named Pipe Extender
  7722. Return: ???
  7723. SeeAlso: AX=5F38h,AX=5F39h,AX=5F51h
  7724. ----------215F36-----------------------------
  7725. INT 21 - LAN Manager Enhanced DOS API local interface - DosTransactNmPipe
  7726.     AX = 5F36h
  7727.     ???
  7728. Return: ???
  7729. Note:    supported by Novell DOS Named Pipe Extender
  7730. SeeAlso: AX=5F34h,AX=5F37h
  7731. ----------215F37-----------------------------
  7732. INT 21 - LAN Manager Enhanced DOS API local interface - DosCallNmPipe
  7733.     AX = 5F37h
  7734.     ???
  7735. Return: ???
  7736. Note:    supported by Novell DOS Named Pipe Extender
  7737. SeeAlso: AX=5F36h,AX=5F38h
  7738. ----------215F38-----------------------------
  7739. INT 21 - LAN Manager Enhanced DOS API local interface - DosWaitNmPipe
  7740.     AX = 5F38h
  7741.     ???
  7742. Return: ???
  7743. Note:    supported by Novell DOS Named Pipe Extender
  7744. SeeAlso: AX=5F37h,AX=5F39h
  7745. ----------215F39-----------------------------
  7746. INT 21 - LAN Manager Enhanced DOS API local interface - DosRawReadNmPipe
  7747.     AX = 5F39h
  7748.     ???
  7749. Return: ???
  7750. Note:    supported by Novell DOS Named Pipe Extender
  7751. SeeAlso: AX=5F35h,AX=5F3Ah,INT 2F/AX=1186h
  7752. ----------215F3A-----------------------------
  7753. INT 21 - LAN Manager Enhanced DOS API local interface - DosRawWriteNmPipe
  7754.     AX = 5F3Ah
  7755.     ???
  7756. Return: ???
  7757. Note:    supported by Novell DOS Named Pipe Extender
  7758. SeeAlso: AX=5F3Bh,INT 2F/AX=118Fh
  7759. ----------215F3B-----------------------------
  7760. INT 21 - LAN Manager Enhanced DOS API local interface - NetHandleSetInfo
  7761.     AX = 5F3Bh
  7762.     ???
  7763. Return: ???
  7764. SeeAlso: AX=5F3Ch
  7765. ----------215F3C-----------------------------
  7766. INT 21 - LAN Manager Enhanced DOS API local interface - NetHandleGetInfo
  7767.     AX = 5F3Ch
  7768.     ???
  7769. Return: ???
  7770. SeeAlso: AX=5F3Bh
  7771. ----------215F40-----------------------------
  7772. INT 21 - LAN Manager Enhanced DOS API local interface - NetMessageBufferSend
  7773.     AX = 5F40h
  7774.     ???
  7775. Return: ???
  7776. ----------215F42-----------------------------
  7777. INT 21 - LAN Manager Enhanced DOS API local interface - NetServiceControl
  7778.     AX = 5F42h
  7779.     ???
  7780. Return: ???
  7781. ----------215F44-----------------------------
  7782. INT 21 - LAN Manager Enhanced DOS API local interface - NetWkstaGetInfo
  7783.     AX = 5F44h
  7784.     ???
  7785. Return: ???
  7786. SeeAlso: AX=5F45h,AX=5F49h
  7787. ----------215F45-----------------------------
  7788. INT 21 - LAN Manager Enhanced DOS API local interface - NetWkstaSetInfo
  7789.     AX = 5F45h
  7790.     ???
  7791. Return: ???
  7792. SeeAlso: AX=5F44h
  7793. ----------215F46-----------------------------
  7794. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseEnum
  7795.     AX = 5F46h
  7796.     ???
  7797. Return: ???
  7798. SeeAlso: AX=5F47h,AX=5F48h,AX=5F4Ch
  7799. ----------215F47-----------------------------
  7800. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseAdd
  7801.     AX = 5F47h
  7802.     ???
  7803. Return: ???
  7804. SeeAlso: AX=5F46h,AX=5F48h
  7805. ----------215F48-----------------------------
  7806. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseDel
  7807.     AX = 5F48h
  7808.     ???
  7809. Return: ???
  7810. SeeAlso: AX=5F46h,AX=5F48h,AX=5F49h
  7811. ----------215F49-----------------------------
  7812. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseGetInfo
  7813.     AX = 5F49h
  7814.     ???
  7815. Return: ???
  7816. SeeAlso: AX=5F44h,AX=5F47h
  7817. ----------215F4A-----------------------------
  7818. INT 21 - LAN Manager Enhanced DOS API local interface - NetRemoteCopy
  7819.     AX = 5F4Ah
  7820.     ???
  7821. Return: ???
  7822. SeeAlso: AX=5F4Bh
  7823. ----------215F4B-----------------------------
  7824. INT 21 - LAN Manager Enhanced DOS API local interface - NetRemoteMove
  7825.     AX = 5F4Bh
  7826.     ???
  7827. Return: ???
  7828. SeeAlso: AX=5F4Ah
  7829. ----------215F4C-----------------------------
  7830. INT 21 - LAN Manager Enhanced DOS API local interface - NetServerEnum
  7831.     AX = 5F4Ch
  7832.     ???
  7833. Return: ???
  7834. Note:    supported by Novell DOS Named Pipe Extender
  7835. SeeAlso: AX=5F53h
  7836. ----------215F4D-----------------------------
  7837. INT 21 - LAN Manager Enhanced DOS API local interface - DosMakeMailslot
  7838.     AX = 5F4Dh
  7839.     ???
  7840. Return: ???
  7841. SeeAlso: AX=5F4Eh,AX=5F4Fh,AX=5F50h,AX=5F51h
  7842. ----------215F4E-----------------------------
  7843. INT 21 - LAN Manager Enhanced DOS API local interface - DosDeleteMailslot
  7844.     AX = 5F4Eh
  7845.     ???
  7846. Return: ???
  7847. SeeAlso: AX=5F4Dh,AX=5F4Fh
  7848. ----------215F4F-----------------------------
  7849. INT 21 - LAN Manager Enhanced DOS API local interface - DosMailslotInfo
  7850.     AX = 5F4Fh
  7851.     ???
  7852. Return: ???
  7853. SeeAlso: AX=5F4Dh,AX=5F4Eh,AX=5F50h
  7854. ----------215F50-----------------------------
  7855. INT 21 - LAN Manager Enhanced DOS API local interface - DosReadMailslot
  7856.     AX = 5F50h
  7857.     ???
  7858. Return: ???
  7859. SeeAlso: AX=5F4Dh,AX=5F4Fh,AX=5F51h,AX=5F52h
  7860. ----------215F51-----------------------------
  7861. INT 21 - LAN Manager Enhanced DOS API local interface - DosPeekMailslot
  7862.     AX = 5F51h
  7863.     ???
  7864. Return: ???
  7865. SeeAlso: AX=5F35h,AX=5F4Fh,AX=5F50h,AX=5F52h
  7866. ----------215F52-----------------------------
  7867. INT 21 - LAN Manager Enhanced DOS API local interface - DosWriteMailslot
  7868.     AX = 5F52h
  7869.     ???
  7870. Return: ???
  7871. SeeAlso: AX=5F4Fh,AX=5F50h,AX=5F51h
  7872. ----------215F53-----------------------------
  7873. INT 21 - LAN Manager Enhanced DOS API local interface - NetServerEnum2
  7874.     AX = 5F53h
  7875.     ???
  7876. Return: ???
  7877. SeeAlso: AX=5F4Ch
  7878. ----------215F80-----------------------------
  7879. INT 21 - LANtastic - GET LOGIN ENTRY
  7880.     AX = 5F80h
  7881.     BX = login entry index (0-based)
  7882.     ES:DI -> 16-byte buffer for machine name
  7883. Return: CF clear if successful
  7884.         buffer filled with machine name ("\\" prefix removed)
  7885.         DL = adapter number (v3+)
  7886.     CF set on error
  7887.         AX = error code
  7888. Note:    the login entry index corresponds to the value BX used in AX=5F83h
  7889. SeeAlso: AX=5F83h
  7890. ----------215F81-----------------------------
  7891. INT 21 - LANtastic - LOGIN TO SERVER
  7892.     AX = 5F81h
  7893.     ES:DI -> ASCIZ login path followed immediately by ASCIZ password
  7894.     BL = adapter number
  7895.         FFh try all valid adapters
  7896.         00h-07h try only specified adapter
  7897. Return: CF clear if successful
  7898.     CF set on error
  7899.         AX = error code
  7900. Notes:    login path is of form "\\machine\username"
  7901.     if no password is used, the string at ES:DI must be terminated with
  7902.       three NULs for compatibility with LANtastic v3.0.
  7903. SeeAlso: AX=5F82h,AX=5F84h
  7904. ----------215F82-----------------------------
  7905. INT 21 - LANtastic - LOGOUT FROM SERVER
  7906.     AX = 5F82h
  7907.     ES:DI -> ASCIZ server name (in form "\\machine")
  7908. Return: CF clear if successful
  7909.     CF set on error
  7910.         AX = error code
  7911. SeeAlso: AX=5F81h,AX=5F88h,AX=5FCBh
  7912. ----------215F83-----------------------------
  7913. INT 21 - LANtastic - GET USERNAME ENTRY
  7914.     AX = 5F83h
  7915.     BX = login entry index (0-based)
  7916.     ES:DI -> 16-byte buffer for username currently logged into
  7917. Return: CF clear if successful
  7918.         DL = adapter number (v3+)
  7919.     CF set on error
  7920.         AX = error code
  7921. Note:    the login entry index corresponds to the value BX used in AX=5F80h
  7922. SeeAlso: AX=5F80h
  7923. ----------215F84-----------------------------
  7924. INT 21 - LANtastic - GET INACTIVE SERVER ENTRY
  7925.     AX = 5F84h
  7926.     BX = server index not currently logged into
  7927.     ES:DI -> 16-byte buffer for server name which is available for logging
  7928.         in to ("\\" prefix omitted)
  7929. Return: CF clear if successful
  7930.         DL = adapter number to non-logged in server is on
  7931.     CF set on error
  7932.         AX = error code
  7933. SeeAlso: AX=5F81h
  7934. ----------215F85-----------------------------
  7935. INT 21 - LANtastic - CHANGE PASSWORD
  7936.     AX = 5F85h
  7937.     ES:DI -> buffer containing "\\machine\oldpassword" 00h "newpassword"00h
  7938. Return: CF clear if successful
  7939.     CF set on error
  7940.         AX = error code
  7941. Notes:    must be logged into the named machine
  7942.     this function is illegal for group accounts
  7943. ----------215F86-----------------------------
  7944. INT 21 - LANtastic - DISABLE ACCOUNT
  7945.     AX = 5F86h
  7946.     ES:DI -> ASCIZ machine name and password in form "\\machine\password"
  7947. Return: CF clear if successful
  7948.     CF set on error
  7949.         AX = error code
  7950. Note:    must be logged into the named machine and concurrent logins set to 1
  7951.       by NET_MGR.  Requires system manager to re-enable account.
  7952. ----------215F87-----------------------------
  7953. INT 21 - LANtastic v3+ - GET ACCOUNT
  7954.     AX = 5F87h
  7955.     DS:SI -> 128-byte buffer for account information (see below)
  7956.     ES:DI -> ASCIZ machine name in form "\\machine"
  7957. Return:    CF clear if successful
  7958.     CF set on error
  7959.         AX = error code
  7960.     BX destroyed
  7961. Note:    must be logged into the specified machine
  7962.  
  7963. Format of user account structure:
  7964. Offset    Size    Description
  7965.  00h 16 BYTEs    blank-padded username (zero-padded for v4.x)
  7966.  10h 16 BYTEs    reserved (00h)
  7967.  20h 32 BYTEs    user description
  7968.  40h    BYTE    privilege bits
  7969.         bit 7: bypass access control lists
  7970.             6: bypass queue protection
  7971.             5: treat as local process
  7972.             4: bypass mail protection
  7973.             3: allow audit entry creation
  7974.             2: system manager
  7975.             0: user cannot change password
  7976.  41h    BYTE    maximum concurrent users
  7977.  42h 42 BYTEs    bit map for disallowed half hours, beginning on Sunday
  7978.         (bit set if half-hour not an allowed time)
  7979.  6Ch    WORD    internal (0002h)
  7980.  6Eh  2 WORDs    last login time
  7981.  72h  2 WORDs    account expiration date (MSDOS-format year/month:day)
  7982.  76h  2 WORDs    password expiration date (0 = none)
  7983.  7Ah    BYTE    number of days to extend password after change (1-31)
  7984.          00h if no extension required
  7985. ---v3.x---
  7986.  7Bh  5 BYTEs    reserved
  7987. ---v4.x---
  7988.  7Bh    BYTE    storage for first letter of user name when deleted (first
  7989.          character is changed to 00h when deleting account)
  7990.  7Ch    BYTE    extended privileges
  7991.  7Dh  3 BYTEs    reserved
  7992. ----------215F88-----------------------------
  7993. INT 21 - LANtastic v4.0+ - LOGOUT FROM ALL SERVERS
  7994.     AX = 5F88h
  7995. Return:    CF clear if successful
  7996.     CF set on error
  7997.         AX = error code
  7998. SeeAlso: AX=5F82h
  7999. ----------215F97-----------------------------
  8000. INT 21 - LANtastic - COPY FILE
  8001.     AX = 5F97h
  8002.     CX:DX = number of bytes to copy (FFFFFFFFh = entire file)
  8003.     SI = source file handle
  8004.     DI = destination file handle
  8005. Return: CF clear if successful
  8006.         DX:AX = number of bytes copied
  8007.     CF set on error
  8008.         AX = error code
  8009. Note:    copy is performed by server
  8010. ----------215F98-----------------------------
  8011. INT 21 - LANtastic - SEND UNSOLICITED MESSAGE
  8012.     AX = 5F98h
  8013.     DS:SI -> message buffer (see below)
  8014. Return: CF clear if successful
  8015.     CF set on error
  8016.         AX = error code
  8017. Note:    v4.1- return no errors
  8018. SeeAlso: AX=5F99h
  8019.  
  8020. Format of message buffer:
  8021. Offset    Size    Description
  8022.  00h    BYTE    reserved
  8023.  01h    BYTE    message type
  8024.         00h general 
  8025.         01h server warning
  8026.         02h-7Fh reserved
  8027.         80h-FFh user-defined
  8028.  02h 16 BYTEs    ASCIZ destination machine name
  8029.  12h 16 BYTEs    ASCIZ server name which user must be logged into
  8030.  22h 16 BYTEs    ASCIZ user name
  8031.  32h 16 BYTEs    ASCIZ originating machine name (filled in when received)
  8032.  42h 80 BYTEs    message text
  8033. ----------215F99-----------------------------
  8034. INT 21 - LANtastic - GET LAST RECEIVED UNSOLICITED MESSAGE
  8035.     AX = 5F99h
  8036.     ES:DI -> messsage buffer (see AX=5F98h for format)
  8037. Return: CF clear if successful
  8038.     CF set on error
  8039.         AX = error code
  8040. SeeAlso: AX=5F98h
  8041. ----------215F9A-----------------------------
  8042. INT 21 - LANtastic - GET MESSAGE PROCESSING FLAGS
  8043.     AX = 5F9Ah
  8044. Return: CF clear if successful
  8045.         DL = bits describing processing for received unsolicited messages
  8046.         bit 0: beep before message is delivered
  8047.             1: deliver message to message service
  8048.             2: pop up message automatically (v3+)
  8049.     CF set on error
  8050.         AX = error code
  8051. SeeAlso: AX=5F9Bh,AX=5F9Ch,AX=5F9Dh
  8052. ----------215F9B-----------------------------
  8053. INT 21 - LANtastic - SET MESSAGE PROCESSING FLAG
  8054.     AX = 5F9Bh
  8055.     DL = bits describing processing for received unsolicited messages
  8056.          (see AX=5F9Ah)
  8057. Return: CF clear if successful
  8058.     CF set on error
  8059.         AX = error code
  8060. SeeAlso: AX=5F9Ah,AX=5F9Eh
  8061. ----------215F9C-----------------------------
  8062. INT 21 - LANtastic v3+ - POP UP LAST RECEIVED MESSAGE
  8063.     AX = 5F9Ch
  8064.     CX = time to leave on screen in clock ticks
  8065.     DH = 0-based screen line on which to place message
  8066. Return:    CF clear if successful
  8067.     CF set on error
  8068.         AX = error code (0Bh)
  8069. Notes:    the original screen contents are restored when the message is removed
  8070.     the message will not appear, and an error will be returned, if the
  8071.       screen is in a graphics mode
  8072. SeeAlso: AX=5F9Ah
  8073. ----------215F9D-----------------------------
  8074. INT 21 - LANtastic v4.1+ - GET REDIRECTOR CONTROL BITS
  8075.     AX = 5F9Dh
  8076. Return:    DL = redirector control bits
  8077.         bit 7: set to notify on print job completion
  8078. SeeAlso: AX=5F9Ah,AX=5F9Eh
  8079. ----------215F9E-----------------------------
  8080. INT 21 - LANtastic v4.1+ - SET REDIRECTOR CONTROL BITS
  8081.     AX = 5F9Eh
  8082.     DL = redirector control bits (see AH = 5F9Dh)
  8083. Return: nothing
  8084. SeeAlso: AX=5F9Bh,AX=5F9Dh
  8085. ----------215FA0-----------------------------
  8086. INT 21 - LANtastic - GET QUEUE ENTRY
  8087.     AX = 5FA0h
  8088.     BX = queue entry index (0000h is first entry)
  8089.     DS:SI -> buffer for queue entry (see below)
  8090.     ES:DI -> ASCIZ server name in form "\\name"
  8091. Return: CF clear if successful
  8092.     CF set on error
  8093.         AX = error code
  8094.     BX = entry index for next queue entry (BX-1 is current index)
  8095. SeeAlso: AX=5FA1h,AX=5FA2h
  8096.  
  8097. Format of queue entry:
  8098. Offset    Size    Description
  8099.  00h    BYTE    status of entry
  8100.         00h empty
  8101.         01h being updated
  8102.         02h being held
  8103.         03h waiting for despool
  8104.         04h being despooled
  8105.         05h canceled
  8106.         06h spooled file could not be accessed
  8107.         07h destination could not be accessed
  8108.         08h rush job
  8109.  01h    DWORD    size of spooled file
  8110.  05h    BYTE    type of entry
  8111.         00h printer queue file
  8112.         01h message
  8113.         02h local file
  8114.         03h remote file
  8115.         04h to remote modem
  8116.         05h batch processor file
  8117.  06h    BYTE    output control
  8118.         bit 6: don't delete (for mail)
  8119.         bit 5: mail file contains voice mail (v3+)
  8120.         bit 4: mail message has been read
  8121.         bit 3: response has been requested for this mail
  8122.  07h    WORD    number of copies
  8123.  09h    DWORD    sequence number of queue entry
  8124.  0Dh 48 BYTEs    pathname of spooled file
  8125.  3Dh 16 BYTEs    user who spooled file
  8126.  4Dh 16 BYTEs    name of machine from which file was spooled
  8127.  5Dh    WORD    date file was spooled (see AX=5700h)
  8128.  5Fh    WORD    time file was spooled (see AX=5700h)
  8129.  61h 17 BYTEs    ASCIZ destination device or user name
  8130.  72h 48 BYTEs    comment field
  8131. ----------215FA1-----------------------------
  8132. INT 21 - LANtastic - SET QUEUE ENTRY
  8133.     AX = 5FA1h
  8134.     BX = handle of opened queue entry
  8135.     DS:SI -> queue entry (see AX=5FA0h)
  8136. Return: CF clear if successful
  8137.     CF set on error
  8138.         AX = error code
  8139. Notes:    the only queue entry fields which may be changed are output control,
  8140.       number of copies, destination device, and comment
  8141.     the handle in BX is that from a create or open (INT 21/AH=3Ch,3Dh)
  8142.       call on the file "\\server\\@MAIL" or "\\server\@name" (for
  8143.       printer queue entries)
  8144. SeeAlso: AX=5FA0h,AX=5FA2h,AX=5FA9h
  8145. ----------215FA2-----------------------------
  8146. INT 21 - LANtastic - CONTROL QUEUE
  8147.     AX = 5FA2h
  8148.     BL = control command
  8149.         00h start despooling (privileged)
  8150.         01h halt despooling (privileged)
  8151.         02h halt despooling at end of job (privileged)
  8152.         03h pause despooler at end of job (privileged)
  8153.         04h print single job (privileged)
  8154.         05h restart current job (privileged)
  8155.         06h cancel the current job
  8156.         07h hold queue entry
  8157.         08h release a held queue entry
  8158.         09h make queue entry a rushed job (privileged)
  8159.     CX:DX = sequence number to control (commands 06h-09h)
  8160.     DX = physical printer number (commands 00h-05h)
  8161.         00h-02h LPT1-LPT3
  8162.         03h,04h COM1,COM2
  8163.         other    all printers
  8164.     ES:DI -> ASCIZ server name in form "\\machine"
  8165. Return: CF clear if successful
  8166.     CF set on error
  8167.         AX = error code
  8168. ----------215FA3-----------------------------
  8169. INT 21 - LANtastic v3+ - GET PRINTER STATUS
  8170.     AX = 5FA3h
  8171.     BX = physical printer number (00h-02h = LPT1-LPT3, 03h-04h = COM1-COM2)
  8172.     DS:SI -> buffer for printer status (see below)
  8173.     ES:DI -> ASCIZ server name in form "\\machine"
  8174. Return: CF clear if successful
  8175.     CF set on error
  8176.         AX = error code
  8177.     BX = next physical printer number
  8178. Note:    you must be logged in to the specified server
  8179.  
  8180. Format of printer status:
  8181. Offset    Size    Description
  8182.  00h    BYTE    printer state
  8183.         bit 7: printer paused
  8184.         bits 0-6: 0 printer disabled
  8185.               1 will stop at end of job
  8186.               2 print multiple jobs
  8187.  01h    WORD    queue index of print job being despooled
  8188.         FFFFh if not despooling--ignore all following fields
  8189.  03h    WORD    actual characters per second being output
  8190.  05h    DWORD    number of characters actually output so far
  8191.  09h    DWORD    number of bytes read from spooled file so far
  8192.  0Dh    WORD    copies remaining to print
  8193. ----------215FA4-----------------------------
  8194. INT 21 - LANtastic v3+ - GET STREAM INFO
  8195.     AX = 5FA4h
  8196.     BX = 0-based stream index number
  8197.     DS:SI -> buffer for stream information (see below)
  8198.     ES:DI -> ASCIZ machine name in form "\\machine"
  8199. Return: CF clear if successful
  8200.     CF set on error
  8201.         AX = error code
  8202.     BX = next stream number
  8203. SeeAlso: AX=5FA5h
  8204.  
  8205. Format of stream information:
  8206. Offset    Size    Description
  8207.  00h    BYTE    queueing of jobs for logical printer (0=disabled,other=enabled)
  8208.  01h 11 BYTEs    logical printer resource template (may contain ? wildcards)
  8209. ----------215FA5-----------------------------
  8210. INT 21 - LANtastic v3+ - SET STREAM INFO
  8211.     AX = 5FA5h
  8212.     BX = 0-based stream index number
  8213.     DS:SI -> buffer containing stream information (see AX=5FA4h)
  8214.     ES:DI -> ASCIZ machine name in form "\\machine"
  8215. Return: CF clear if successful
  8216.     CF set on error
  8217.         AX = error code
  8218. SeeAlso: AX=5FA4h
  8219. ----------215FA7-----------------------------
  8220. INT 21 - LANtastic - CREATE USER AUDIT ENTRY
  8221.     AX = 5FA7h
  8222.     DS:DX -> ASCIZ reason code (max 8 bytes)
  8223.     DS:SI -> ASCIZ variable reason string (max 128 bytes)
  8224.     ES:DI -> ASCIZ machine name in form "\\machine"
  8225. Return: CF clear if successful
  8226.     CF set on error
  8227.         AX = error code
  8228. Note:    you must be logged in to the specified server and have the "U"
  8229.       privilege to execute this call
  8230. ----------215FA9-----------------------------
  8231. INT 21 - LANtastic v4.1+ - SET EXTENDED QUEUE ENTRY
  8232.     AX = 5FA9h
  8233.     BX = handle of opened queue entry
  8234.     DS:SI -> queue entry (see AX=5FA0h)
  8235. Return: CF clear if successful
  8236.     CF set on error
  8237.         AX = error code
  8238. Note:    functions exactly the same as AX=5FA1h except the spooled filename is
  8239.       also set.  This call supports    direct despooling.
  8240. SeeAlso: AX=5FA1h
  8241. ----------215FB0-----------------------------
  8242. INT 21 - LANtastic - GET ACTIVE USER INFORMATION
  8243.     AX = 5FB0h
  8244.     BX = server login entry index
  8245.     DS:SI -> buffer for active user entry (see below)
  8246.     ES:DI -> ASCIZ machine name in form "\\server"
  8247. Return: CF clear if successful
  8248.     CF set on error
  8249.         AX = error code
  8250.     BX = next login index
  8251.  
  8252. Format of active user entry:
  8253. Offset    Size    Description
  8254.  00h    WORD    virtual circuit number
  8255.  02h    BYTE    login state
  8256.         bit 0: fully logged in
  8257.             1: remote program load login
  8258.             2: user has system manager privileges
  8259.             3: user can create audit entries
  8260.             4: bypass mail protection
  8261.             5: treat as local process
  8262.             6: bypass queue protection
  8263.             7: bypass access control lists
  8264.  03h    BYTE    last command issued (see below)
  8265.  04h  5 BYTEs    number of I/O bytes (40-bit unsigned number)
  8266.  09h  3 BYTEs    number of server requests (24-bit unsigned)
  8267.  0Ch 16 BYTEs    name of user who is logged in
  8268.  1Ch 16 BYTEs    name of remote logged in machine
  8269.  2Ch    BYTE    extended privileges (v4+???)
  8270.          bit 0: user cannot change his password
  8271.  2Dh    WORD    time left in minutes (0000h = unlimited) (v4+???)
  8272.  
  8273. Values for last command:
  8274.  00h    login
  8275.  01h    process termination
  8276.  02h    open file
  8277.  03h    close file
  8278.  04h    create file
  8279.  05h    create new file
  8280.  06h    create unique file
  8281.  07h    commit data to disk
  8282.  08h    read file
  8283.  09h    write file
  8284.  0Ah    delete file
  8285.  0Bh    set file attributes
  8286.  0Ch    lock byte range
  8287.  0Dh    unlock byte range
  8288.  0Eh    create subdirectory
  8289.  0Fh    remove subdirectory
  8290.  10h    rename file
  8291.  11h    find first matching file
  8292.  12h    find next matching file
  8293.  13h    get disk free space
  8294.  14h    get a queue entry
  8295.  15h    set a queue entry
  8296.  16h    control the queue
  8297.  17h    return login information
  8298.  18h    return link description
  8299.  19h    seek on file
  8300.  1Ah    get server's time
  8301.  1Bh    create audit entry
  8302.  1Ch    open file in multitude of modes
  8303.  1Dh    change password
  8304.  1Eh    disable account
  8305.  1Fh    local server file copy
  8306. ---v3+---
  8307.  20h    get username from account file
  8308.  21h    translate server's logical path
  8309.  22h    make indirect file
  8310.  23h    get indirect file contents
  8311.  24h    get physical printer status
  8312.  25h    get logical print stream info
  8313.  26h    set logical print stream info
  8314.  27h    get user's account record
  8315. ---v4+---
  8316.  28h    request server shutdown
  8317.  29h    cancel server shutdown
  8318.  2Ah    stuff server's keyboard
  8319.  2Bh    write then commit data to disk
  8320.  2Ch    set extended queue entry
  8321.  2Dh    terminate user from server
  8322.  2Eh    enable/disable logins
  8323.  2Fh    flush server caches
  8324.  30h    change username
  8325.  31h    get extended queue entry
  8326.     (same as get queue, but can return named fields blanked)
  8327. ----------215FB1-----------------------------
  8328. INT 21 - LANtastic - GET SHARED DIRECTORY INFORMATION
  8329.     AX = 5FB1h
  8330.     DS:SI -> 64-byte buffer for link description
  8331.     ES:DI -> ASCIZ machine and shared directory name in form
  8332.          "\\machine\shared-resource"
  8333. Return: CF clear if successful
  8334.         CX = access control list privilege bits for requesting user
  8335.         bit 4: (I) allow expansion of indirect files
  8336.             5: (A) allow attribute changing
  8337.             6: (P) allow physical access to device
  8338.             7: (E) allow program execution
  8339.             8: (N) allow file renaming
  8340.             9: (K) allow directory deletion
  8341.            10: (D) allow file deletion
  8342.            11: (L) allow file/directory lookups
  8343.            12: (M) allow directory creation
  8344.            13: (C) allow file creation
  8345.            14: (W) allow open for write and writing
  8346.            15: (R) allow open for read and reading
  8347.     CF set on error
  8348.         AX = error code
  8349. ----------215FB2-----------------------------
  8350. INT 21 - LANtastic v3+ - GET USERNAME FROM ACCOUNT FILE
  8351.     AX = 5FB2h
  8352.     BX = username entry index (0 for first)
  8353.     DS:SI -> 16-byte buffer for username
  8354.     ES:DI -> ASCIZ server name in form "\\machine"
  8355. Return: CF clear if successful
  8356.     CF set on error
  8357.         AX = error code
  8358.     BX = next queue entry index
  8359. ----------215FB3-----------------------------
  8360. INT 21 - LANtastic v3+ - TRANSLATE PATH
  8361.     AX = 5FB3h
  8362.     DS:SI -> 128-byte buffer for ASCIZ result
  8363.     ES:DI -> full ASCIZ path, including server name
  8364.     DX = types of translation to be performed
  8365.         bit 0: expand last component as indirect file
  8366.         1: return actual path relative to server's physical disk
  8367. Return: CF clear if successful
  8368.     CF set on error
  8369.         AX = error code
  8370. Note:    always expands any indirect files along the path
  8371. SeeALso: AX=5FB4h
  8372. ----------215FB4-----------------------------
  8373. INT 21 - LANtastic v3+ - CREATE INDIRECT FILE
  8374.     AX = 5FB4h
  8375.     DS:SI -> 128-byte buffer containing ASCIZ contents of indirect file
  8376.     ES:DI -> full ASCIZ path of indirect file to create, incl machine name
  8377. Return: CF clear if successful
  8378.     CF set on error
  8379.         AX = error code
  8380. Note:    the contents of the indirect file may be any valid server-relative path
  8381. ----------215FB5-----------------------------
  8382. INT 21 - LANtastic v3+ - GET INDIRECT FILE CONTENTS
  8383.     AX = 5FB5h
  8384.     DS:SI -> 128-byte buffer for ASCIZ indirect file contents
  8385.     ES:DI -> full ASCIZ path of indirect file
  8386. Return: CF clear if successful
  8387.     CF set on error
  8388.         AX = error code
  8389. ----------215FB6-----------------------------
  8390. INT 21 - LANtastic v4.1+ - SET AUTO-LOGIN DEFAULTS
  8391.     AX = 5FB6h
  8392.     ES:DI -> pointer to ASCIZ default user name, immediately followed by
  8393.         ASCIZ password
  8394.     BL = adapter number to use for default login attempt
  8395.         FFh try all valid adapters
  8396.         00h-05h try adapter 0-5 explicitly
  8397. Return: CF clear if successful
  8398.     CF set on error
  8399.         AX = error code
  8400. Notes:    call with ES:DI -> two nulls to disable auto-login
  8401. SeeAlso: AX=5FB7h
  8402. ----------215FB7-----------------------------
  8403. INT 21 - LANtastic v4.1+ - GET AUTO-LOGIN DEFAULTS
  8404.     AX = 5FB7h
  8405.     ES:DI -> pointer to 16-byte buffer to store ASCIZ auto-login user name
  8406. Return: CF clear if successful
  8407.         DL = adapter number used for default login attempt
  8408.         FFh all valid adapters will be tried
  8409.         00h-05h specified adapter will be tried explicitly
  8410.     CF set on error
  8411.         AX = error code
  8412. SeeAlso: AX=5F81h,AX=5FB6h
  8413. ----------215FC0-----------------------------
  8414. INT 21 - LANtastic - GET TIME FROM SERVER
  8415.     AX = 5FC0h
  8416.     DS:SI -> time block (see below)
  8417.     ES:DI -> ASCIZ server name to get time from
  8418. Return: CF clear if successful
  8419.     CF set on error
  8420.         AX = error code
  8421.  
  8422. Format of time block:
  8423. Offset    Size    Description
  8424.  00h    WORD    year
  8425.  02h    BYTE    day
  8426.  03h    BYTE    month
  8427.  04h    BYTE    minutes
  8428.  05h    BYTE    hour
  8429.  06h    BYTE    hundredths of second
  8430.  07h    BYTE    second
  8431. ----------215FC8-----------------------------
  8432. INT 21 - LANtastic v4.0+ - SCHEDULE SERVER SHUTDOWN
  8433.     AX = 5FC8h
  8434.     ES:DI -> ASCIZ server name in form "\\machine"
  8435.     DS:SI -> ASCIZ reason string (80 characters)
  8436.     CX = number of minutes until shutdown (0 = immediate)
  8437.     DX = option flags (see below)
  8438.         bit 0: auto reboot
  8439.         1: do not notify users
  8440.         2: halt after shutdown
  8441.         3: shutdown due to power fail (used by UPS)
  8442.         bits 4-7: reserved
  8443.         bits 8-14: user definable
  8444.         bit 15: reserved
  8445. Return: CF clear if successful
  8446.     CF set on error
  8447.         AX = error code
  8448. SeeAlso: AH=5FC9h
  8449. ----------215FC9-----------------------------
  8450. INT 21 - LANtastic v4.0+ - CANCEL SERVER SHUTDOWN
  8451.     AX = 5FC9h
  8452.     ES:DI -> ASCIZ server name in form "\\machine"
  8453. Return: CF clear if successful
  8454.     CF set on error
  8455.         AX = error code
  8456. Note:    you must have the "S" privilege to use this call
  8457. SeeAlso: AH=5FC8h
  8458. ----------215FCA-----------------------------
  8459. INT 21 - LANtastic v4.0+ - STUFF SERVER KEYBOARD BUFFER
  8460.     AX = 5FCAh
  8461.     ES:DI -> ASCIZ server name in form "\\machine"
  8462.     DS:SI -> ASCIZ string to stuff (128 bytes)
  8463. Return: CF clear if successful
  8464.     CF set on error
  8465.         AX = error code
  8466. Note:    you must have the "S" privilege to use this call
  8467.     maximum number of characters that can be stuffed is determined by the
  8468.       server's RUN BUFFER SIZE.
  8469. ----------215FCB-----------------------------
  8470. INT 21 - LANtastic v4.1+ - TERMINATE USER
  8471.     AX = 5FCBh
  8472.     ES:DI -> ASCIZ server name in form "\\machine"
  8473.     DS:SI -> blank-padded username.     A null char = wildcard.
  8474.     DS:DX -> blank-padded machine name.  A null char = wildcard.
  8475.     CX = minutes until termination (0 = immediate)
  8476. Return: CF clear if successful
  8477.     CF set on error
  8478.         AX = error code
  8479. Note:    you must have the "S" privilege to use this call
  8480.     you cannot log yourself out using this call
  8481. SeeAlso: AX=5F82h
  8482. ----------215FCC-----------------------------
  8483. INT 21 - LANtastic v4.1+ - GET/SET SERVER CONTROL BITS
  8484.     AX = 5FCCh
  8485.     ES:DI -> ASCIZ server name in form "\\machine"
  8486.     CX = bit values (value of bits you want to set)     See below.
  8487.     DX = bit mask (bits you are interested in, 0 = get only)  See 
  8488. below.
  8489. Return: CF clear if successful
  8490.         CX = control bits after call
  8491.         bit 0: disable logins
  8492.     CF set on error
  8493.         AX = error code
  8494. Note:    you must have the "S" privilege to SET, anyone can GET.
  8495. ----------215FCD-----------------------------
  8496. INT 21 - LANtastic v4.1+ - FLUSH SERVER CACHES
  8497.     AX = 5FCDh
  8498.     ES:DI -> ASCIZ server name in form "\\machine"
  8499. Return: CF clear if successful
  8500.     CF set on error
  8501.         AX = error code
  8502. Note:    you must have the "S" privilege to use this call.
  8503. ----------215FD0-----------------------------
  8504. INT 21 - LANtastic - GET REDIRECTED PRINTER TIMEOUT
  8505.     AX = 5FD0h
  8506. Return: CF clear if successful
  8507.         CX = redirected printer timeout in clock ticks of 55ms
  8508.         0000h if timeout disabled
  8509.     CF set on error
  8510.         AX = error code
  8511. SeeAlso: AX=5FD1h
  8512. ----------215FD1-----------------------------
  8513. INT 21 - LANtastic - SET REDIRECTED PRINTER TIMEOUT
  8514.     AX = 5FD1h
  8515.     CX = printer timeout in clock ticks of 55ms, 0000h to disable timeouts
  8516. Return: CF clear if successful
  8517.     CF set on error
  8518.         AX = error code
  8519. SeeAlso: AX=5FD0h
  8520. ----------215FE0-----------------------------
  8521. INT 21 - LANtastic - GET DOS SERVICE VECTOR
  8522.     AX = 5FE0h
  8523. Return: CF clear if successful
  8524.         ES:BX -> current FAR service routine
  8525.     CF set on error
  8526.         AX = error code
  8527. Note:    the service routine is called by the LANtastic redirector whenever DOS
  8528.       may safely be called, permitting external TSRs and drivers to hook
  8529.       into LANtastic's DOS busy flag checking
  8530. SeeAlso: AX=5FE1h,INT 28,INT 2A/AH=84h
  8531. ----------215FE1-----------------------------
  8532. INT 21 - LANtastic - SET DOS SERVICE VECTOR
  8533.     AX = 5FE1h
  8534.     ES:BX -> FAR routine to call when DOS services are available
  8535. Return: CF clear if successful
  8536.     CF set on error
  8537.         AX = error code
  8538. Note:    new handler must chain to previous handler as its first action
  8539. SeeAlso: AX=5FE0h
  8540. ----------215FE2-----------------------------
  8541. INT 21 - LANtastic - GET MESSAGE SERVICE VECTOR
  8542.     AX = 5FE2h
  8543. Return: CF clear if successful
  8544.         ES:BX -> current FAR message service routine
  8545.     CF set on error
  8546.         AX = error code
  8547. SeeAlso: AX=5FE3h
  8548. ----------215FE3-----------------------------
  8549. INT 21 - LANtastic - SET MESSAGE SERVICE VECTOR
  8550.     AX = 5FE3h
  8551.     ES:BX -> FAR routine for processing network messages
  8552. Return: CF clear if successful
  8553.     CF set on error
  8554.         AX = error code
  8555. Notes:    handler must chain to previous handler as its first action
  8556.     on invocation, ES:BX -> just-received message
  8557. SeeAlso: AX=5FE2h
  8558. ----------2160-------------------------------
  8559. INT 21 - DOS 3.0+ - CANONICALIZE FILENAME OR PATH
  8560.     AH = 60h
  8561.     DS:SI -> ASCIZ filename or path
  8562.     ES:DI -> 128-byte buffer for canonicalized name
  8563. Return: CF set on error
  8564.         AX = error code
  8565.         02h invalid component in directory path or drive letter only
  8566.         03h malformed path or invalid drive letter
  8567.         ES:DI buffer unchanged
  8568.     CF clear if successful
  8569.         AH = 00h
  8570.         AL = destroyed (00h or 5Ch or last char of current dir on drive)
  8571.         buffer filled with qualified name of form D:\PATH\FILE.EXT or
  8572.           \\MACHINE\PATH\FILE.EXT
  8573. Notes:    the input path need not actually exist
  8574.     letters are uppercased, forward slashes converted to backslashes,
  8575.       asterisks converted to appropriate number of question marks, and
  8576.       file and directory names are truncated to 8.3 if necessary.
  8577.     '.' and '..' in the path are resolved
  8578.     filespecs on local drives always start with "d:", those on network
  8579.       drives always start with "\\"
  8580.     if path string is on a JOINed drive, the returned name is the one that
  8581.       would be needed if the drive were not JOINed; similarly for a
  8582.       SUBSTed, ASSIGNed, or network drive letter.    Because of this, it is
  8583.       possible to get a qualified name that is not legal under the current
  8584.       combination of SUBSTs, ASSIGNs, JOINs, and network redirections
  8585.     under DOS 3.3 through 5.00, a device name is translated differently if
  8586.       the device name does not have an explicit directory or the directory
  8587.       is \DEV (relative directory DEV from the root directory works
  8588.       correctly).  In these cases, the returned string consists of the
  8589.       unchanged device name and extension appended to the string X:/
  8590.       (forward slash instead of backward slash as in all other cases) where
  8591.       X is the default or explicit drive letter.
  8592.     functions which take pathnames require canonical paths if invoked via
  8593.       INT 21/AX=5D00h
  8594.     supported by OS/2 v1.1 compatibility box
  8595.     NetWare 2.1x does not support characters with the high bit set; early
  8596.       versions of NetWare 386 support such characters except in this call.
  8597.       In addition, NetWare returns error code 3 for the path "X:\"; one
  8598.       should use "X:\." instead.
  8599.     for DOS 3.3-5.0, the input and output buffers may be the same, as the
  8600.       canonicalized name is built in an internal buffer and copied to the
  8601.       specified output buffer as the very last step
  8602.     for DR DOS 6.0, this function is not automatically called when on a
  8603.       network.  Device drivers reportedly cannot make this call from their
  8604.       INIT function.  Using the same pointer for both input and output
  8605.       buffers is not supported in the April 1992 and earlier versions of
  8606.       DR DOS
  8607. SeeAlso: INT 2F/AX=1123h,INT 2F/AX=1221h
  8608. ----------2161-------------------------------
  8609. INT 21 - DOS 3+ - UNUSED
  8610.     AH = 61h
  8611. Return: AL = 00h
  8612. Note:    this function does nothing and returns immediately
  8613. ----------2162-------------------------------
  8614. INT 21 - DOS 3+ - GET CURRENT PSP ADDRESS
  8615.     AH = 62h
  8616. Return: BX = segment of PSP for current process
  8617. Notes:    under DOS 3+, this function does not use any of the DOS-internal stacks
  8618.       and may thus be called at any time, even during another INT 21h call
  8619.     the current PSP is not necessarily the caller's PSP
  8620.     identical to the undocumented AH=51h
  8621. SeeAlso: AH=50h,AH=51h
  8622. ----------216300-----------------------------
  8623. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
  8624.     AX = 6300h
  8625. Return: CF clear if successful
  8626.         DS:SI -> lead byte table (see below)
  8627.     CF set on error
  8628.         AX = error code (01h) (see AH=59h)
  8629. Notes:    does not preserve any registers other than SS:SP
  8630.     the US version of MSDOS 3.30 treats this as an unused function,
  8631.       setting AL=00h and returning immediately
  8632. SeeAlso: AX=6301h,AH=07h,AH=08h,AH=0Bh
  8633.  
  8634. Format of lead byte table entry:
  8635. Offset    Size    Description
  8636.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8637.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8638.     ...
  8639.   N   2 BYTEs    00h,00h end flag
  8640. ----------216300-----------------------------
  8641. INT 21 - Far East DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD TABLE
  8642.     AX = 6300h
  8643. Return: AL = error code
  8644.         00h successful
  8645.         DS:SI -> DBCS table (see below)
  8646.         all other registers except CS:IP and SS:SP destroyed
  8647.         FFh not supported
  8648. Notes:    probably identical to AH=63h/AL=00h for DOS 2.25
  8649.     the US version of MSDOS 3.30 treats this as an unused function,
  8650.       setting AL=00h and returning immediately
  8651.     the US version of DOS 4.0+ accepts this function, but returns an empty
  8652.       list
  8653. SeeAlso: AX=6300h"DOS 2.25"
  8654.  
  8655. Format of DBCS table:
  8656. Offset    Size    Description
  8657.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8658.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8659.     ...
  8660.   N   2 BYTEs    00h,00h end flag
  8661. ----------216301-----------------------------
  8662. INT 21 - DOS 2.25, Far East DOS 3.2+ - SET KOREAN (HANGUL) INPUT MODE
  8663.     AX = 6301h
  8664.     DL = new mode
  8665.         00h return only full characters on DOS keyboard input functions
  8666.         01h    return partially-formed characters also
  8667. Return: AL = status
  8668.         00h successful
  8669.         FFh invalid mode
  8670. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6302h
  8671. ----------216302-----------------------------
  8672. INT 21 - DOS 2.25, Far East DOS 3.2+ - GET KOREAN (HANGUL) INPUT MODE
  8673.     AX = 6302h
  8674. Return: AL = status
  8675.         00h successful
  8676.         DL = current input mode
  8677.             00h return only full characters
  8678.             01h return partial characters
  8679.         FFh not supported
  8680. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6301h
  8681. ----------2164-------------------------------
  8682. INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
  8683.     AH = 64h
  8684.     AL = flag
  8685.         00h (default) call device driver function 5 (non-dest read)
  8686.             before INT 21/AH=01h,08h,0Ah
  8687.         nonzero don't call driver function 5
  8688. Return: nothing
  8689. Notes:    called by DOS 3.3+ PRINT.COM
  8690.     does not use any of the DOS-internal stacks and is thus fully
  8691.       reentrant
  8692. SeeAlso: AH=01h,AH=08h,AH=0Ah,AX=5D06h
  8693. ----------2164--BX0000-----------------------
  8694. INT 21 - OS/2 v2.0 Virtual DOS Machine - GET/SET TASK TITLE
  8695.     AH = 64h
  8696.     BX = 0000h
  8697.     CX = 636Ch
  8698.     DX = function
  8699.         0000h enable automatic title switch on INT 21/AH=4Bh
  8700.         0001h set session title
  8701.             ES:DI -> new ASCIZ title or "" to restore original title
  8702.         0002h get session title
  8703.             ES:DI -> buffer for current title
  8704.             Return: buffer filled (single 00h if title never changed)
  8705. SeeAlso: INT 15/AH=12h/BH=05h,INT 21/AH=4Bh
  8706. ----------2165-------------------------------
  8707. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  8708.     AH = 65h
  8709.     AL = info ID
  8710.         01h get general internationalization info
  8711.         02h get pointer to uppercase table
  8712.         04h get pointer to filename uppercase table
  8713.         05h get pointer to filename terminator table
  8714.         06h get pointer to collating sequence table
  8715.         07h (DOS 4+) get pointer to Double-Byte Character Set table
  8716.     BX = code page (-1=global code page)
  8717.     DX = country ID (-1=current country)
  8718.     ES:DI -> country information buffer (see below)
  8719.     CX = size of buffer (>= 5)
  8720. Return: CF set on error
  8721.         AX = error code (see AH=59h)
  8722.     CF clear if succesful
  8723.         CX = size of country information returned
  8724.         ES:DI -> country information
  8725. Notes:    AL=05h appears to return same info for all countries and codepages; it
  8726.       has been documented for DOS 5.0, but was undocumented in ealier
  8727.       versions
  8728.     NLSFUNC must be installed to get info for countries other than the
  8729.       default
  8730.     subfunctions 02h and 04h are identical under OS/2
  8731. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h
  8732.  
  8733. Format of country information:
  8734. Offset    Size    Description
  8735.  00h    BYTE    info ID
  8736. ---if info ID = 01h---
  8737.  01h    WORD    size
  8738.  03h    WORD    country ID
  8739.  05h    WORD    code page
  8740.  07h 34 BYTEs    country-dependent info (see AH=38h)
  8741. ---if info ID = 02h---
  8742.  01h    DWORD    pointer to uppercase table (see below)
  8743. ---if info ID = 04h---
  8744.  01h    DWORD    pointer to filename uppercase table (see below)
  8745. ---if info ID = 05h---
  8746.  01h    DWORD    pointer to filename character table (see below)
  8747. ---if info ID = 06h---
  8748.  01h    DWORD    pointer to collating table (see below)
  8749. ---if info ID = 07h (DOS 4+)---
  8750.  01h    DWORD    pointer to DBCS lead byte table (see below)
  8751.  
  8752. Format of uppercase table:
  8753. Offset    Size    Description
  8754.  00h    WORD    table size
  8755.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  8756.  
  8757. Format of collating table:
  8758. Offset    Size    Description
  8759.  00h    WORD    table size
  8760.  02h 256 BYTEs    values used to sort characters 00h to FFh
  8761.  
  8762. Format of filename terminator table:
  8763. Offset    Size    Description
  8764.  00h    WORD    table size (not counting this word)
  8765.  02h    BYTE    ??? (01h for MSDOS 3.30-5.00)
  8766.  03h    BYTE    lowest permissible character value for filename
  8767.  04h    BYTE    highest permissible character value for filename
  8768.  05h    BYTE    ??? (00h for MSDOS 3.30-5.00)
  8769.  06h    BYTE    first excluded character in range \ all characters in this
  8770.  07h    BYTE    last excluded character in range  / range are illegal
  8771.  08h    BYTE    ??? (02h for MSDOS 3.30-5.00)
  8772.  09h    BYTE    number of illegal (terminator) characters
  8773.  0Ah  N BYTES    characters which terminate a filename:    ."/\[]:|<>+=;,
  8774. Note:    partially documented for DOS 5.0, but undocumented for earlier versions
  8775.  
  8776. Format of filename uppercase table:
  8777. Offset    Size    Description
  8778.  00h    WORD    table size
  8779.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  8780.  
  8781. Format of DBCS lead byte table:
  8782. Offset    Size    Description
  8783.  00h    WORD    length
  8784.  02h 2N BYTEs    start/end for N lead byte ranges
  8785.     WORD    0000h    (end of table)
  8786. ----------2165-------------------------------
  8787. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  8788.     AH = 65h
  8789.     AL = function
  8790.         20h capitalize character
  8791.         DL = character to capitalize
  8792.         Return: DL = capitalized character
  8793.         21h capitalize string
  8794.         DS:DX -> string to capitalize
  8795.         CX = length of string
  8796.         22h capitalize ASCIZ string
  8797.         DS:DX -> ASCIZ string to capitalize
  8798. Return: CF set on error
  8799.         AX = error code (see AH=59h)
  8800.     CF clear if successful
  8801. Note:    these calls have been documented for DOS 5+, but were undocumented in
  8802.       DOS 4.x.
  8803. ----------216523-----------------------------
  8804. INT 21 U - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  8805.     AX = 6523h
  8806.     DL = character
  8807.     DH = second character of double-byte character (if applicable)
  8808. Return: CF set on error
  8809.     CF clear if successful
  8810.         AX = type
  8811.         00h no
  8812.         01h yes
  8813.         02h neither yes nor no
  8814. ----------2165-------------------------------
  8815. INT 21 U - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  8816.     AH = 65h
  8817.     AL = function
  8818.         A0h capitalize filename character
  8819.         DL = character to capitalize
  8820.         Return: DL = capitalized character
  8821.         A1h capitalize counted filename string
  8822.         DS:DX -> filename string to capitalize
  8823.         CX = length of string
  8824.         A2h capitalize ASCIZ filename
  8825.         DS:DX -> ASCIZ filename to capitalize
  8826. Return: CF set on error
  8827.         AX = error code (see AH=59h)
  8828.     CF clear if successful
  8829. Note:    nonfunctional in DOS 4.00 through 5.00 due to a bug (the code sets a
  8830.       pointer depending on the high bit of AL, but doesn't clear the
  8831.       bit before branching by function number).
  8832. ----------216601-----------------------------
  8833. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  8834.     AX = 6601h
  8835. Return: CF set on error
  8836.         AX = error code (see AH=59h)
  8837.     CF clear if successful
  8838.         BX = active code page (see AX=6602h)
  8839.         DX = system code page
  8840. SeeAlso: AX=6602h
  8841. ----------216602-----------------------------
  8842. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  8843.     AX = 6602h
  8844.     BX = active code page
  8845.         437 US
  8846.         850 Multilingual
  8847.         852 Slavic/Latin II (DOS 5+)
  8848.         857 Turkish
  8849.         860 Portugal
  8850.         861    Iceland
  8851.         863 Canada (French)
  8852.         865 Norway/Denmark
  8853.     DX = system code page (active page at boot time)
  8854. Return: CF set on error
  8855.         AX = error code (see AH=59h)
  8856.     CF clear if successful
  8857. SeeAlso: AX=6601h
  8858. ----------2167-------------------------------
  8859. INT 21 - DOS 3.3+ - SET HANDLE COUNT
  8860.     AH = 67h
  8861.     BX = size of new file handle table for process
  8862. Return: CF clear if successful
  8863.     CF set on error
  8864.         AX = error code (see AH=59h)
  8865. Desc:    adjust the size of the per-process open file table, thus raising or
  8866.       lowering the limit on the number of files the caller can open
  8867.       simultaneously
  8868. Notes:    if BX <= 20, no action is taken if the handle limit has not yet been
  8869.       increased, and the table is copied back into the PSP if the limit
  8870.       is currently > 20 handles
  8871.     for file handle tables of > 20 handles, DOS 3.30 never reuses the
  8872.       same memory block, even if the limit is being reduced; this can lead
  8873.       to memory fragmentation as a new block is allocated and the existing
  8874.       one freed
  8875.     only the first 20 handles are copied to child processes in DOS 3.3
  8876. BUG:    the original release of DOS 3.30 allocates a full 64K for the handle
  8877.       table on requests for an even number of handles
  8878. SeeAlso: AH=26h,AH=86h
  8879. ----------2168-------------------------------
  8880. INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
  8881.     AH = 68h
  8882.     BX = file handle
  8883. Return: CF clear if successful
  8884.         all data still in DOS disk buffers is written to disk immediately,
  8885.           and the file's directory entry is updated
  8886.     CF set on error
  8887.         AX = error code (see AH=59h)
  8888. SeeAlso: AX=5D01h,AH=6Ah,INT 2F/AX=1107h
  8889. ----------2169-------------------------------
  8890. INT 21 U - DOS 4+ internal - GET/SET DISK SERIAL NUMBER
  8891.     AH = 69h
  8892.     AL = subfunction
  8893.         00h    get serial number
  8894.         01h set serial number
  8895.     BL = drive (0=default, 1=A, 2=B, etc)
  8896.     DS:DX -> disk info (see below)
  8897. Return: CF set on error
  8898.         AX = error code (see AH=59h)
  8899.     CF clear if successful
  8900.         AX destroyed
  8901.         (AL = 00h) buffer filled with appropriate values from extended BPB
  8902.         (AL = 01h) extended BPB on disk set to values from buffer
  8903. Notes:    does not generate a critical error; all errors are returned in AX
  8904.     error 0005h given if no extended BPB on disk
  8905.     does not work on network drives (error 0001h)
  8906.     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
  8907.       extended BPB on disk
  8908.     this function is supported under Novell NetWare versions 2.0A through
  8909.       3.11; the returned serial number is the one a DIR would display,
  8910.       the volume label is the NetWare volume label, and the file system
  8911.       is set to "FAT16".
  8912. SeeAlso: AX=440Dh
  8913.  
  8914. Format of disk info:
  8915. Offset    Size    Description
  8916.  00h    WORD    info level (zero)
  8917.  02h    DWORD    disk serial number (binary)
  8918.  06h 11 BYTEs    volume label or "NO NAME    " if none present
  8919.  11h  8 BYTEs    (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "
  8920. ----------2169-------------------------------
  8921. INT 21 - DR-DOS 5.0 - NULL FUNCTION
  8922.     AH = 69h
  8923. Return: AL = 00h
  8924. SeeAlso: AH=18h
  8925. ----------216969-----------------------------
  8926. INT 21 - VIRUS - "Rape-747" - INSTALLATION CHECK
  8927.     AX = 6969h
  8928. Return: AX = 0666h if resident
  8929. SeeAlso: AX=58CCh,AH=76h"VIRUS"
  8930. ----------216A-------------------------------
  8931. INT 21 U - DOS 4+ - COMMIT FILE
  8932.     AH = 6Ah
  8933.     BX = file handle
  8934. Return: CF clear if successful
  8935.         AH = 68h
  8936.     CF set on error
  8937.         AX = error code (06h) (see AH=59h)
  8938. Note:    identical to AH=68h in DOS 5.0; not known whether this is the case in
  8939.       DOS 4.x
  8940. SeeAlso: AH=68h
  8941. ----------216B-------------------------------
  8942. INT 21 U - DOS 4.0 internal - ???
  8943.     AH = 6Bh
  8944.     AL = subfunction
  8945.         00h ???
  8946.         DS:SI -> Current Directory Structure???
  8947.         CL = drive (1=A:)
  8948.         01h ???
  8949.         DS:SI -> ???
  8950.         CL = file handle???
  8951.         02h ???
  8952.         DS:SI -> Current Directory Structure???
  8953.         DI = ???
  8954.         CX = drive (1=A:)
  8955. Return: CF set on error
  8956.         AX = error code (see INT 21/AH=59h)
  8957.     CF clear if successful
  8958. Note:    passed through to INT 2F/AX=112Fh with AX on top of stack
  8959. SeeAlso: AH=6Bh"DOS 5",INT 2F/AX=112Fh
  8960. ----------216B-------------------------------
  8961. INT 21 U - DOS 5.0 - NULL FUNCTION
  8962.     AH = 6Bh
  8963. Return: AL = 00h
  8964. Note:    this function does nothing and returns immediately
  8965. SeeAlso: AH=6Bh"DOS 4"
  8966. ----------216C00-----------------------------
  8967. INT 21 - DOS 4+ - EXTENDED OPEN/CREATE
  8968.     AX = 6C00h
  8969.     BL = open mode as in AL for normal open (INT 21/AH=3Dh)
  8970.         bit 7: inheritance
  8971.         bits 4-6: sharing mode
  8972.         bit 3 reserved
  8973.         bits 0-2: access mode
  8974.     BH = flags
  8975.         bit 6 = auto commit on every write
  8976.         bit 5 = return error rather than doing INT 24h
  8977.     CX = create attribute
  8978.         bits 6-15 reserved
  8979.         bit 5: archive
  8980.         bit 4: reserved
  8981.         bit 3: volume label
  8982.         bit 2: system
  8983.         bit 1: hidden
  8984.         bit 0: readonly
  8985.     DL = action if file exists/does not exists
  8986.         bits 7-4 action if file does not exist
  8987.             0000 fail
  8988.             0001 create
  8989.         bits 3-0 action if file exists
  8990.             0000 fail
  8991.             0001 open
  8992.             0010 replace/open
  8993.     DH = 00h (reserved)
  8994.     DS:SI -> ASCIZ file name
  8995. Return: CF set on error
  8996.        AX = error code (see AH=59h)
  8997.     CF clear if successful
  8998.        AX = file handle
  8999.        CX = 1 file opened
  9000.         2 file created
  9001.         3 file replaced
  9002. Note:    the PC LAN Program only supports DL=01h, DL=10h/sharing=compatibility,
  9003.       and DL=12h
  9004. SeeAlso: AH=3Ch,AH=3Dh
  9005. ----------217070BX6060-----------------------
  9006. INT 21 - PCW Weather Card interface - GET DATA SEGMENT
  9007.     AX = 7070h
  9008.     BX = 6060h
  9009.     CX = 7070h
  9010.     DX = 7070h
  9011.     SX = 7070h
  9012.     DX = 7070h
  9013. Return: AX = segment of data structure
  9014. Notes:    the data structure is at offset 516 from this segment.
  9015.     the update byte is at offset 514 from this segment.  Updates are
  9016.       once per second while this byte is nonzero and it is decremented
  9017.       once per second.  While this byte is 0 updates are once per minute.
  9018. SeeAlso: AX=7070h/BX=7070h
  9019.  
  9020. Format of data structure:
  9021. Offset    Type    Description
  9022.  00h    WORD    hour
  9023.  02h    WORD    minute
  9024.  04h    WORD    second
  9025.  06h    WORD    day
  9026.  08h    WORD    month
  9027.  0Ah    WORD    year
  9028.  0Ch    WORD    ???
  9029.  0Eh    WORD    relative barometric pressure (in 1/100 inches)
  9030.  10h    WORD    ???
  9031.  12h    WORD    ???
  9032.  14h    WORD    temperature 1 (in 1/10 degrees F)
  9033.  16h    WORD    temperature 1 lowest (in 1/10 degrees F)
  9034.  18h    WORD    temperature 1 highest (in 1/10 degrees F)
  9035.  1Ah    WORD    temperature 2 (in 1/10 degrees F)
  9036.  1Ch    WORD    temperature 2 lowest (in 1/10 degrees F)
  9037.  1Eh    WORD    temperature 2 highest (in 1/10 degrees F)
  9038.  20h    WORD    wind speed (in MPH)
  9039.  22h    WORD    average of 60 wind speed samples (in MPH)
  9040.  24h    WORD    highest wind speed (in MPH)
  9041.  26h    WORD    wind chill factor  (in 1/10 degrees F)
  9042.  28h    WORD    lowest wind chill factor (in 1/10 degrees F)
  9043.  2Ah    WORD    ???
  9044.  2Ch    WORD    wind direction (in degrees)
  9045.  2Eh    WORD    accumulated daily rainfall (in 1/10 inches)
  9046.  30h    WORD    accumulated annual rainfall (in 1/10 inches)
  9047. ----------217070BX7070-----------------------
  9048. INT 21 - PCW Weather Card interface - INSTALLATION CHECK
  9049.     AX = 7070h
  9050.     BX = 7070h
  9051.     CX = 7070h
  9052.     DX = 7070h
  9053.     SX = 7070h
  9054.     DX = 7070h
  9055. Return: AX = 0070h
  9056.     BX = 0070h
  9057.     CX = 0070h
  9058.     DX = 0070h
  9059.     SX = 0070h
  9060.     DX = 0070h
  9061. SeeAlso: AX=7070h/BX=6060h,AX=8080h
  9062. ----------2176-------------------------------
  9063. INT 21 - VIRUS - "Klaeren"/"Hate" - INSTALLATION CHECK
  9064.     AH = 76h
  9065. Return: AL = 48h if resident
  9066. SeeAlso: AX=6969h,AX=7700h"VIRUS"
  9067. ----------217761-----------------------------
  9068. INT 21 - WATCH.COM v3.2+ - INSTALLATION CHECK
  9069.     AX = 7761h ('wa')
  9070. Return: AX = 6177h
  9071. Note:    WATCH.COM is part of the "TSR" package by TurboPower Software
  9072. SeeAlso: INT 16/AX=7761h
  9073. ----------217700-----------------------------
  9074. INT 21 - VIRUS - "Growing Block" - INSTALLATION CHECK
  9075.     AX = 7700h
  9076. Return: AX = 0920h if resident
  9077. SeeAlso: AH=76h,AH=7Fh
  9078. ----------217F-------------------------------
  9079. INT 21 - VIRUS - "Squeaker" - INSTALLATION CHECK
  9080.     AH = 7Fh
  9081. Return: AH = 80h if resident
  9082. SeeAlso: AX=7700h,AH=83h"VIRUS"
  9083. ---------------------------------------------
  9084.