home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / docum / inter42.doc / interrup.d < prev    next >
Encoding:
Text File  |  1994-08-07  |  286.5 KB  |  7,775 lines

  1. Interrupt List, part 4 of 12
  2. This compilation is Copyright (c) 1989,1990,1991,1992,1993,1994 Ralf Brown
  3. --------O-20---------------------------------
  4. INT 20 - Minix - SEND/RECEIVE MESSAGE
  5.     AX = process ID of other process
  6.     BX -> message
  7.     CX = operation (1 send, 2 receive, 3 send&receive)
  8. Program: Minix is a Version 7 Unix-compatible operating system by Andrew
  9.       Tanenbaum
  10. Note:    the message contains the system call number (numbered as in V7
  11.       Unix(tm)) and the call parameters
  12. --------D-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. --------G-20---------------------------------
  19. INT 20 - COMTROL HOSTESS i/ISA DEBUGGER - INVOKE FIRMWARE DEBUGGER
  20.     ???
  21. Return: ???
  22. SeeAlso: INT 21"COMTROL"
  23. --------G-21---------------------------------
  24. INT 21 - COMTROL HOSTESS i/ISA DEBUGGER - GET SEGMENT FOR CONTROL PROGRAM USE
  25.     ???
  26. Return: AX = first segment available for control program use
  27. SeeAlso: INT 20"COMTROL",INT 22"COMTROL"
  28. --------D-2100-------------------------------
  29. INT 21 - DOS 1+ - TERMINATE PROGRAM
  30.     AH = 00h
  31.     CS = PSP segment
  32. Notes:    Microsoft recommends using INT 21/AH=4Ch for DOS 2+
  33.     execution continues at the address stored in INT 22 after DOS performs
  34.       whatever cleanup it needs to do
  35.     if the PSP is its own parent, the process's memory is not freed; if
  36.       INT 22 additionally points into the terminating program, the
  37.       process is effectively NOT terminated
  38.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  39. SeeAlso: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22
  40. --------D-2101-------------------------------
  41. INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
  42.     AH = 01h
  43. Return: AL = character read
  44. Notes:    ^C/^Break are checked, and INT 23 executed if read
  45.     character is echoed to standard output
  46.     standard input is always the keyboard and standard output the screen
  47.       under DOS 1.x, but they may be redirected under DOS 2+
  48. SeeAlso: AH=06h,AH=07h,AH=08h,AH=0Ah
  49. --------D-2102-------------------------------
  50. INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
  51.     AH = 02h
  52.     DL = character to write
  53. Return: AL = last character output (despite the official docs which state
  54.         nothing is returned) (at least DOS 3.3-5.0)
  55. Notes:    ^C/^Break are checked, and INT 23 executed if pressed
  56.     standard output is always the screen under DOS 1.x, but may be
  57.       redirected under DOS 2+
  58.     the last character output will be the character in DL unless DL=09h
  59.       on entry, in which case AL=20h as tabs are expanded to blanks
  60. SeeAlso: AH=06h,AH=09h
  61. --------D-2103-------------------------------
  62. INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
  63.     AH = 03h
  64. Return: AL = character read
  65. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  66.     STDAUX is usually the first serial port
  67. SeeAlso: AH=04h,INT 14/AH=02h,INT E0/CL=03h
  68. --------D-2104-------------------------------
  69. INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
  70.     AH = 04h
  71.     DL = character to write
  72. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  73.     STDAUX is usually the first serial port
  74.     if STDAUX is busy, this function will wait until it becomes free
  75. SeeAlso: AH=03h,INT 14/AH=01h,INT E0/CL=04h
  76. --------D-2105-------------------------------
  77. INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
  78.     AH = 05h
  79.     DL = character to print
  80. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  81.     STDPRN is usually the first parallel port, but may be redirected under
  82.       DOS 2+
  83.     if the printer is busy, this function will wait
  84. SeeAlso: INT 17/AH=00h
  85. --------D-2106-------------------------------
  86. INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
  87.     AH = 06h
  88.     DL = character (except FFh)
  89. Return: AL = character output (despite official docs which state nothing is
  90.         returned) (at least DOS 3.3-5.0)
  91. Notes:    does not check ^C/^Break
  92.     writes to standard output, which is always the screen under DOS 1.x,
  93.       but may be redirected under DOS 2+
  94. SeeAlso: AH=02h,AH=09h
  95. --------D-2106--DLFF-------------------------
  96. INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
  97.     AH = 06h
  98.     DL = FFh
  99. Return: ZF set if no character available
  100.         AL = 00h
  101.     ZF clear if character available
  102.         AL = character read
  103. Notes:    ^C/^Break are NOT checked
  104.     if the returned character is 00h, the user pressed a key with an
  105.       extended keycode, which will be returned by the next call of this
  106.       function
  107.     this function reads from standard input, which is always the keyboard
  108.       under DOS 1.x, but may be redirected under DOS 2+
  109.     although the return of AL=00h when no characters are available is not
  110.       documented, some programs rely on this behavior
  111. SeeAlso: AH=0Bh
  112. --------D-2107-------------------------------
  113. INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
  114.     AH = 07h
  115. Return: AL = character read from standard input
  116. Notes:    does not check ^C/^Break
  117.     standard input is always the keyboard under DOS 1.x, but may be
  118.       redirected under DOS 2+
  119.     if the interim console flag is set (see AX=6301h), partially-formed
  120.       double-byte characters may be returned
  121. SeeAlso: AH=01h,AH=06h,AH=08h,AH=0Ah
  122. --------D-2108-------------------------------
  123. INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
  124.     AH = 08h
  125. Return: AL = character read from standard input
  126. Notes:    ^C/^Break are checked, and INT 23 executed if detected
  127.     standard input is always the keyboard under DOS 1.x, but may be
  128.       redirected under DOS 2+
  129.     if the interim console flag is set (see AX=6301h), partially-formed
  130.       double-byte characters may be returned
  131. SeeAlso: AH=01h,AH=06h,AH=07h,AH=0Ah,AH=64h
  132. --------D-2109-------------------------------
  133. INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
  134.     AH = 09h
  135.     DS:DX -> '$'-terminated string
  136. Return: AL = 24h (the '$' terminating the string, despite official docs which
  137.         state that nothing is returned) (at least DOS 3.3-5.0)
  138. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  139.     standard output is always the screen under DOS 1.x, but may be
  140.       redirected under DOS 2+
  141.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  142. SeeAlso: AH=02h,AH=06h"OUTPUT"
  143. --------D-210A-------------------------------
  144. INT 21 - DOS 1+ - BUFFERED INPUT
  145.     AH = 0Ah
  146.     DS:DX -> buffer (see #0485)
  147. Return: buffer filled with user input
  148. Notes:    ^C/^Break are checked, and INT 23 is called if either detected
  149.     reads from standard input, which may be redirected under DOS 2+
  150.     if the maximum buffer size (see #0485) is set to 00h, this call returns
  151.       immediately without reading any input
  152. SeeAlso: AH=0Ch,INT 2F/AX=4810h
  153.  
  154. Format of DOS input buffer:
  155. Offset    Size    Description    (Table 0485)
  156.  00h    BYTE    maximum characters buffer can hold
  157.  01h    BYTE    (call) number of chars from last input which may be recalled
  158.         (return) number of characters actually read, excluding CR
  159.  02h  N BYTEs    actual characters read, including the final carriage return
  160. --------K-210A00-----------------------------
  161. INT 21 - WCED v1.6+ - INSTALLATION CHECK
  162.     AX = 0A00h
  163.     DS:DX -> 6-byte buffer whose first two bytes must be 00h
  164. Return: buffer offset 02h-05h filled with "Wced" if installed
  165. Program: WCED is a free command-line editor and history utility by Stuart
  166.       Russell
  167. SeeAlso: AH=FFh"CED"
  168. --------D-210B-------------------------------
  169. INT 21 - DOS 1+ - GET STDIN STATUS
  170.     AH = 0Bh
  171. Return: AL = status
  172.         00h if no character available
  173.         FFh if character is available
  174. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  175.     standard input is always the keyboard under DOS 1.x, but may be
  176.       redirected under DOS 2+
  177.     if the interim console flag is set (see AX=6301h), this function
  178.       returns AL=FFh if a partially-formed double-byte character is
  179.       available
  180. SeeAlso: AH=06h"INPUT",AX=4406h
  181. --------v-210B56-----------------------------
  182. INT 21 - VIRUS - "Perfume" - INSTALLATION CHECK
  183.     AX = 0B56h
  184. Return: AX = 4952h if resident
  185. SeeAlso: AX=0D20h,INT 12/AX=4350h/BX=4920h
  186. --------D-210C-------------------------------
  187. INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
  188.     AH = 0Ch
  189.     AL = STDIN input function to execute after flushing buffer
  190.     other registers as appropriate for the input function
  191. Return: as appropriate for the specified input function
  192. Note:    if AL is not one of 01h,06h,07h,08h, or 0Ah, the buffer is flushed but
  193.       no input is attempted
  194. SeeAlso: AH=01h,AH=06h"INPUT",AH=07h,AH=08h,AH=0Ah
  195. --------D-210D-------------------------------
  196. INT 21 - DOS 1+ - DISK RESET
  197.     AH = 0Dh
  198. Return: (DOS 6 only) CF clear (earlier versions preserve CF)
  199. Notes:    This function writes all modified disk buffers to disk, but does not
  200.       update the directory information (that is only done when files are
  201.       closed or a SYNC call is issued)
  202. SeeAlso: AX=5D01h,INT 13/AH=00h,INT 2F/AX=1120h
  203. --------v-210D20-----------------------------
  204. INT 21 - VIRUS - "Crazy Imp" - INSTALLATION CHECK
  205.     AX = 0D20h
  206. Return: AX = 1971h if resident
  207. SeeAlso: AX=0B56h,AH=30h/DX=ABCDh
  208. --------D-210E-------------------------------
  209. INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
  210.     AH = 0Eh
  211.     DL = new default drive (00h = A:, 01h = B:, etc)
  212. Return: AL = number of potentially valid drive letters
  213. Notes:    under Novell NetWare, the return value is always 32, the number of
  214.       drives that NetWare supports
  215.     under DOS 3+, the return value is the greatest of 5, the value of
  216.       LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
  217.     on a DOS 1.x/2.x single-floppy system, AL returns 2 since the floppy
  218.       may be accessed as either A: or B:
  219.     otherwise, the return value is the highest drive actually present
  220.     DOS 1.x supports a maximum of 16 drives, 2.x a maximum of 63 drives,
  221.       and 3+ a maximum of 26 drives
  222. SeeAlso: AH=19h,AH=3Bh,AH=DBh
  223. --------v-210E--DLAD-------------------------
  224. INT 21 U - Novell DOS 7 - SDRes v27.03 - INSTALLATION CHECK
  225.     AH = 0Eh
  226.     DL = ADh
  227. Return: AL = BAh if installed
  228. Program: SDRes is the resident portion of the Search&Destroy antiviral by
  229.       Fifth Generation Systems, as bundled with Novell DOS 7
  230. SeeAlso: AH=0Eh/DL=AEh,AH=0Eh/DL=AFh,AH=4Ah/BX=00B6h,INT 13/AX=A759h
  231. --------v-210E--DLAD-------------------------
  232. INT 21 U - Novell DOS 7 - SDRes v27.03 - CLEAR ??? FLAG
  233.     AH = 0Eh
  234.     DL = ADh
  235. SeeAlso: AH=0Eh/DL=ADh,AH=0Eh/DL=AFh,INT 13/AX=A759h
  236. --------v-210E--DLAF-------------------------
  237. INT 21 U - Novell DOS 7 - SDRes v27.03 - SET ??? FLAG
  238.     AH = 0Eh
  239.     DL = AFh
  240. SeeAlso: AH=0Eh/DL=ADh,AH=0Eh/DL=AEh,INT 13/AX=A759h
  241. --------D-210F-------------------------------
  242. INT 21 - DOS 1+ - OPEN FILE USING FCB
  243.     AH = 0Fh
  244.     DS:DX -> unopened File Control Block (see #0486)
  245. Return: AL = status
  246.         00h successful
  247.         FFh file not found or access denied
  248. Notes:    (DOS 3.1+) file opened for read/write in compatibility mode
  249.     an unopened FCB has the drive, filename, and extension fields filled
  250.       in and all other bytes cleared
  251.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  252.     DR-DOS checks password attached with AX=4303h
  253. BUG:    APPEND for DOS 3.3+ corrupts DX if the file is not found
  254. SeeAlso: AH=10h,AH=16h,AH=3Dh,4303h
  255.  
  256. Format of File Control Block:
  257. Offset    Size    Description    (Table 0486)
  258.  -7    BYTE    extended FCB if FFh
  259.  -6   5 BYTEs    reserved
  260.  -1    BYTE    file attribute if extended FCB
  261.  00h    BYTE    drive number (0 = default, 1 = A, etc)
  262.  01h  8 BYTEs    blank-padded file name
  263.  09h  3 BYTEs    blank-padded file extension
  264.  0Ch    WORD    current block number
  265.  0Eh    WORD    logical record size
  266.  10h    DWORD    file size
  267.  14h    WORD    date of last write (see #0781 at AX=5700h)
  268.  16h    WORD    time of last write (see #0780 at AX=5700h) (DOS 1.1+)
  269.  18h  8 BYTEs    reserved (see #0487,#0488,#0489,#0490,#0491)
  270.  20h    BYTE    record within current block
  271.  21h    DWORD    random access record number (if record size is > 64 bytes, high
  272.           byte is omitted)
  273. Note:    to use an extended FCB, you must specify the address of the FFh flag at
  274.       offset -7, rather than the address of the drive number field
  275.  
  276. Format of FCB reserved field for DOS 1.0:
  277. Offset    Size    Description    (Table 0487)
  278.  16h    WORD    location in directory (if high byte = FFh, low byte is device
  279.           ID)
  280.  18h    WORD    number of first cluster in file
  281.  1Ah    WORD    current absolute cluster number on disk
  282.  1Ch    WORD    current relative cluster number within file
  283.         (0 = first cluster of file, 1 = second cluster, etc.)
  284.  1Eh    BYTE    dirty flag (00h = not dirty)
  285.  1Fh    BYTE    unused
  286.  
  287. Format of FCB reserved field for DOS 1.10-1.25:
  288. Offset    Size    Description    (Table 0488)
  289.  18h    BYTE    bit 7: set if logical device
  290.         bit 6: not dirty
  291.         bits 5-0: disk number or logical device ID
  292.  19h    WORD    starting cluster number on disk
  293.  1Bh    WORD    current absolute cluster number on disk
  294.  1Dh    WORD    current relative cluster number within file
  295.  1Fh    BYTE    unused
  296.  
  297. Format of FCB reserved field for DOS 2.x:
  298. Offset    Size    Description    (Table 0489)
  299.  18h    BYTE    bit 7: set if logical device
  300.         bit 6: set if open???
  301.         bits 5-0: ???
  302.  19h    WORD    starting cluster number on disk
  303.  1Bh    WORD    ???
  304.  1Dh    BYTE    ???
  305.  1Eh    BYTE    ???
  306.  1Fh    BYTE    ???
  307.  
  308. Format of FCB reserved field for DOS 3.x:
  309. Offset    Size    Description    (Table 0490)
  310.  18h    BYTE    number of system file table entry for file
  311.  19h    BYTE    attributes
  312.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  313.               01 = SHARE.EXE not loaded, character device
  314.               10 = SHARE.EXE loaded, remote file
  315.               11 = SHARE.EXE loaded, local file or device
  316.         bits 5-0: low six bits of device attribute word
  317. ---SHARE.EXE loaded, local file---
  318.  1Ah    WORD    starting cluster of file on disk
  319.  1Ch    WORD    (DOS 3.x) offset within SHARE of sharing record
  320.           (see #0752 at AH=52h)
  321.  1Eh    BYTE    file attribute
  322.  1Fh    BYTE    ???
  323. ---SHARE.EXE loaded, remote file---
  324.  1Ah    WORD    number of sector containing directory entry
  325.  1Ch    WORD    relative cluster within file of last cluster accessed
  326.  1Eh    BYTE    absolute cluster number of last cluster accessed
  327.  1Fh    BYTE    ???
  328. ---SHARE.EXE not loaded---
  329.  1Ah    BYTE    (low byte of device attribute word AND 0Ch) OR open mode
  330.  1Bh    WORD    starting cluster of file
  331.  1Dh    WORD    number of sector containing directory entry
  332.  1Fh    BYTE    number of directory entry within sector
  333. Note:    if FCB opened on character device, DWORD at 1Ah is set to the address
  334.       of the device driver header, then the BYTE at 1Ah is overwritten.
  335.  
  336. Format of FCB reserved field for DOS 5.0:
  337. Offset    Size    Description    (Table 0491)
  338.  18h    BYTE    number of system file table entry for file
  339.  19h    BYTE    attributes
  340.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  341.               01 = SHARE.EXE not loaded, character device
  342.               10 = SHARE.EXE loaded, remote file
  343.               11 = SHARE.EXE loaded, local file or device
  344.         bits 5-0: low six bits of device attribute word
  345. ---SHARE.EXE loaded, local file---
  346.  1Ah    WORD    starting cluster of file on disk
  347.  1Ch    WORD    unique sequence number of sharing record
  348.  1Eh    BYTE    file attributes
  349.  1Fh    BYTE    unused???
  350. ---SHARE.EXE loaded, remote file---
  351.  1Ah    WORD    network handle
  352.  1Ch    DWORD    network ID
  353. ---SHARE not loaded, local device---
  354.  1Ah    DWORD    pointer to device driver header
  355.  1Eh  2 BYTEs    unused???
  356. ---SHARE not loaded, local file---
  357.  1Ah    BYTE    extra info
  358.         bit 7: read-only attribute from SFT
  359.         bit 6: archive attribute from SFT
  360.         bits 5-0: high bits of sector number
  361.  1Bh    WORD    starting cluster of file
  362.  1Dh    WORD    low word of sector number containing directory entry
  363.  1Fh    BYTE    number of directory entry within sector
  364. --------D-2110-------------------------------
  365. INT 21 - DOS 1+ - CLOSE FILE USING FCB
  366.     AH = 10h
  367.     DS:DX -> File Control Block (see #0486)
  368. Return: AL = status
  369.         00h successful
  370.         FFh failed
  371. Notes:    a successful close forces all disk buffers used by the file to be
  372.       written and the directory entry to be updated
  373.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  374. SeeAlso: AH=0Fh,AH=16h,AH=3Eh
  375. --------D-2111-------------------------------
  376. INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
  377.     AH = 11h
  378.     DS:DX -> unopened FCB (see #0486), may contain '?' wildcards
  379. Return: AL = status
  380.         00h successful
  381.         [DTA] unopened FCB for first matching file
  382.         FFh no matching filename, or bad FCB
  383. Notes:    the type of the returned FCB depends on whether the input FCB was a
  384.       normal or an extended FCB
  385.     the data returned in the DTA is actually the drive number (or extended
  386.       FCB header and drive number) followed by the file's directory entry
  387.       (see #0492); this format happens to be compatible with an unopened
  388.       FCB
  389.     for extended FCBs with search attribute 08h, the volume label (if any)
  390.       will be returned even if the current directory is not the root dir.
  391.     DOS 3+ also allows the '*' wildcard
  392.     the search FCB must not be modified if AH=12h will be used to continue
  393.       searching; DOS 3.3 has set the following parts of the FCB:
  394.          0Ch    BYTE    ???
  395.          0Dh    WORD    directory entry number of matching file
  396.          0Fh    WORD    cluster number of current directory
  397.          11h  4 BYTEs    ???
  398.          15h    BYTE    drive number (1=A:)
  399.     this function is used by many copy protection schemes to obtain the
  400.       starting cluster of a file
  401. SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh
  402.  
  403. Format of DOS directory entry:
  404. Offset    Size    Description    (Table 0492)
  405.  00h  8 BYTEs    blank-padded filename
  406.  08h  3 BYTEs    blank-padded file extension
  407.  0Bh    BYTE    attributes
  408.  0Ch 10 BYTEs    reserved
  409.         used by DR-DOS to store file password
  410.  16h    WORD    time of creation or last update (see #0780 at AX=5700h)
  411.  18h    WORD    date of creation or last update (see #0781 at AX=5700h)
  412.  1Ah    WORD    starting cluster number
  413.  1Ch    DWORD    file size
  414. --------D-2112-------------------------------
  415. INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
  416.     AH = 12h
  417.     DS:DX -> unopened FCB (see #0486)
  418. Return: AL = status
  419.         00h successful
  420.         [DTA] = unopened FCB
  421.         FFh no more matching filenames
  422. Note:    (see AH=11h)
  423.     assumes that successful FindFirst executed on search FCB before call
  424. SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch
  425. --------D-2113-------------------------------
  426. INT 21 - DOS 1+ - DELETE FILE USING FCB
  427.     AH = 13h
  428.     DS:DX -> unopened FCB (see #0486), filename filled with template for
  429.         deletion ('?' wildcards allowed)
  430. Return: AL = status
  431.         00h one or more files successfully deleted
  432.         FFh no matching files or all were read-only or locked
  433. Notes:    DOS 1.25+ deletes everything in the current directory (including
  434.       subdirectories) and sets the first byte of the name to 00h (entry
  435.       never used) instead of E5h if called on an extended FCB with
  436.       filename '???????????' and bits 0-4 of the attribute set (bits 1 and
  437.       2 for DOS 1.x).  This may have originally been an optimization to
  438.       minimize directory searching after a mass deletion (DOS 1.25+ stop
  439.       the directory search upon encountering a never-used entry), but can
  440.       corrupt the filesystem under DOS 2+ because subdirectories are
  441.       removed without deleting the files they contain.
  442.     currently-open files should not be deleted
  443.     MS-DOS allows deletion of read-only files with an extended FCB, whereas
  444.       Novell NetWare does not
  445. SeeAlso: AH=41h,INT 2F/AX=1113h
  446. --------D-2114-------------------------------
  447. INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
  448.     AH = 14h
  449.     DS:DX -> opened FCB (see #0486)
  450. Return: AL = status
  451.         00h successful
  452.         01h end of file (no data)
  453.         02h segment wrap in DTA
  454.         03h end of file, partial record read
  455.     [DTA] = record read from file
  456. Notes:    reads a record of the size specified in the FCB beginning at the
  457.       current file position, then updates the current block and current
  458.       record fields in the FCB
  459.     if a partial record was read, it is zero-padded to the full size
  460.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  461. SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh,INT 2F/AX=1108h
  462. --------D-2115-------------------------------
  463. INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
  464.     AH = 15h
  465.     DS:DX -> opened FCB (see #0486)
  466.     [DTA] = record to write
  467. Return: AL = status
  468.         00h successful
  469.         01h disk full
  470.         02h segment wrap in DTA
  471. Notes:    writes a record of the size specified in the FCB beginning at the
  472.       current file position, then updates the current block and current
  473.       record fields in the FCB
  474.     if less than a full sector is written, the data is placed in a DOS
  475.       buffer to be written out at a later time
  476.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  477. SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h
  478. --------D-2116-------------------------------
  479. INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
  480.     AH = 16h
  481.     DS:DX -> unopened FCB (see #0486), wildcards not allowed
  482. Return: AL = status
  483.         00h successful
  484.         FFh directory full or file exists and is read-only or locked
  485. Notes:    if file already exists, it is truncated to zero length
  486.     if an extended FCB is used, the file is given the attribute in the
  487.       FCB; this is how to create a volume label in the disk's root dir
  488.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  489. SeeAlso: AH=0Fh,AH=10h,AH=3Ch
  490. --------D-2117-------------------------------
  491. INT 21 - DOS 1+ - RENAME FILE USING FCB
  492.     AH = 17h
  493.     DS:DX -> modified FCB (see also #0486)
  494.         the old filename ('?' wildcards OK) is in the standard location
  495.         while the new filename ('?' wildcards OK) is stored in the 11
  496.         bytes beginning at offset 11h
  497. Return: AL = status
  498.         00h successfully renamed
  499.         FFh no matching files,file is read-only, or new name already exists
  500. Notes:    subdirectories may be renamed using an extended FCB with the
  501.       appropriate attribute, as may volume labels
  502.     DR-DOS checks password attached with AX=4303h before permitting rename
  503. SeeAlso: AH=0Fh,AH=13h,AX=4303h,AH=56h,INT 2F/AX=1111h
  504. --------D-2118-------------------------------
  505. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  506.     AH = 18h
  507. Return: AL = 00h
  508. Note:    corresponds to the CP/M BDOS function "get bit map of logged drives",
  509.       which is meaningless under MS-DOS
  510. SeeAlso: AH=1Dh,AH=1Eh,AH=20h,AX=4459h,INT 60/DI=0513h
  511. --------D-2119-------------------------------
  512. INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
  513.     AH = 19h
  514. Return: AL = drive (00h = A:, 01h = B:, etc)
  515. Note:    Novell NetWare uses the fact that DOS 2.x COMMAND.COM issues this call
  516.       from a particular location every time it starts a command to
  517.       determine when to issue an automatic EOJ
  518. SeeAlso: AH=0Eh,AH=47h,AH=BBh
  519. --------D-211A-------------------------------
  520. INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
  521.     AH = 1Ah
  522.     DS:DX -> Disk Transfer Area (DTA)
  523. Notes:    the DTA is set to PSP:0080h when a program is started
  524.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  525. SeeAlso: AH=11h,AH=12h,AH=2Fh,AH=4Eh,AH=4Fh
  526. --------D-211B-------------------------------
  527. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
  528.     AH = 1Bh
  529. Return: AL = sectors per cluster (allocation unit)
  530.     CX = bytes per sector
  531.     DX = total number of clusters
  532.     DS:BX -> media ID byte (see #0493)
  533. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  534.       versions return a pointer to a copy of the FAT's ID byte
  535. SeeAlso: AH=1Ch,AH=36h
  536.  
  537. (Table 0493)
  538. Values for media ID byte:
  539.  FFh    floppy, double-sided, 8 sectors per track (320K)
  540.  FEh    floppy, single-sided, 8 sectors per track (160K)
  541.  FDh    floppy, double-sided, 9 sectors per track (360K)
  542.  FCh    floppy, single-sided, 9 sectors per track (180K)
  543.  F9h    floppy, double-sided, 15 sectors per track (1.2M)
  544.  F8h    hard disk
  545.  F0h    other
  546. --------D-211C-------------------------------
  547. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
  548.     AH = 1Ch
  549.     DL = drive (00h = default, 01h = A:, etc)
  550. Return: AL = sectors per cluster (allocation unit), or FFh if invalid drive
  551.     CX = bytes per sector
  552.     DX = total number of clusters
  553.     DS:BX -> media ID byte (see #0493)
  554. Notes:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  555.       versions return a pointer to a copy of the FAT's ID byte
  556.     on a DBLSPACE drive, the total number of clusters is based on the
  557.       estimated compression ratio
  558. SeeAlso: AH=1Bh,AH=36h
  559. --------D-211D-------------------------------
  560. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  561.     AH = 1Dh
  562. Return: AL = 00h
  563. Note:    corresponds to the CP/M BDOS function "get bit map of read-only
  564.       drives", which is meaningless under MS-DOS
  565. SeeAlso: AH=18h,AH=1Eh,AH=20h,AX=4459h
  566. --------D-211E-------------------------------
  567. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  568.     AH = 1Eh
  569. Return: AL = 00h
  570. Note:    corresponds to the CP/M BDOS function "set file attributes" which was
  571.      meaningless under MS-DOS 1.x
  572. SeeAlso: AH=18h,AH=1Dh,AH=20h
  573. --------D-211F-------------------------------
  574. INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
  575.     AH = 1Fh
  576. Return: AL = status
  577.         00h successful
  578.         DS:BX -> Drive Parameter Block (DPB) (see #0494 for DOS 1.x,
  579.             AH=32h for DOS 2+)
  580.         FFh invalid drive
  581. Note:    this call was undocumented prior to the release of DOS 5.0; however,
  582.       only the DOS 4+ version of the DPB has been documented
  583. SeeAlso: AH=32h
  584.  
  585. Format of DOS 1.1 and MS-DOS 1.25 drive parameter block:
  586. Offset    Size    Description    (Table 0494)
  587.  00h    BYTE    sequential device ID
  588.  01h    BYTE    logical drive number (0=A:)
  589.  02h    WORD    bytes per sector
  590.  04h    BYTE    highest sector number within a cluster
  591.  05h    BYTE    shift count to convert clusters into sectors
  592.  06h    WORD    starting sector number of first FAT
  593.  08h    BYTE    number of copies of FAT
  594.  09h    WORD    number of directory entries
  595.  0Bh    WORD    number of first data sector
  596.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  597.  0Fh    BYTE    sectors per FAT
  598.  10h    WORD    starting sector of directory
  599.  12h    WORD    address of allocation table
  600. Note:    the DOS 1.0 table is the same except that the first and last fields
  601.       are missing; see INT 21/AH=32h for the DOS 2+ version
  602. --------D-2120-------------------------------
  603. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  604.     AH = 20h
  605. Return: AL = 00h
  606. Note:    corresponds to the CP/M BDOS function "get/set default user
  607.       (sublibrary) number", which is meaningless under MS-DOS
  608. SeeAlso: AH=18h,AH=1Dh,AH=1Eh,AX=4459h
  609. --------D-2121-------------------------------
  610. INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
  611.     AH = 21h
  612.     DS:DX -> opened FCB (see #0486)
  613. Return: AL = status
  614.         00h successful
  615.         01h end of file, no data read
  616.         02h segment wrap in DTA, no data read
  617.         03h end of file, partial record read
  618.     [DTA] = record read from file
  619. Notes:    the record is read from the current file position as specified by the
  620.       random record and record size fields of the FCB
  621.     the file position is not updated after reading the record
  622.     if a partial record is read, it is zero-padded to the full size
  623.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  624. SeeAlso: AH=14h,AH=22h,AH=27h,AH=3Fh
  625. --------D-2122-------------------------------
  626. INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
  627.     AH = 22h
  628.     DS:DX -> opened FCB (see #0486)
  629.     [DTA] = record to write
  630. Return: AL = status
  631.         00h successful
  632.         01h disk full
  633.         02h segment wrap in DTA
  634. Notes:    the record is written to the current file position as specified by the
  635.       random record and record size fields of the FCB
  636.     the file position is not updated after writing the record
  637.     if the record is located beyond the end of the file, the file is
  638.       extended but the intervening data remains uninitialized
  639.     if the record only partially fills a disk sector, it is copied to a
  640.       DOS disk buffer to be written out to disk at a later time
  641.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  642. SeeAlso: AH=15h,AH=21h,AH=28h,AH=40h
  643. --------D-2123-------------------------------
  644. INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
  645.     AH = 23h
  646.     DS:DX -> unopened FCB (see #0486), wildcards not allowed
  647. Return: AL = status
  648.         00h successful (matching file found)
  649.         FCB random record field filled with size in records, rounded up
  650.         to next full record
  651.         FFh failed (no matching file found)
  652. Notes:    not supported by MS Windows 3.0 DOSX.EXE DOS extender
  653.     MS-DOS returns nonsense if the FCB record number field is set to a very
  654.       large positive number, and status FFh if negative; DR-DOS returns the
  655.       correct file size in both cases
  656. BUG:    APPEND for DOS 3.3+ corrupts DX if the file is not found
  657. SeeAlso: AH=42h
  658. --------D-2124-------------------------------
  659. INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
  660.     AH = 24h
  661.     DS:DX -> opened FCB (see #0486)
  662. Notes:    computes the random record number corresponding to the current record
  663.       number and record size, then stores the result in the FCB
  664.     normally used when switching from sequential to random access
  665.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  666. SeeAlso: AH=21h,AH=27h,AH=42h
  667. --------D-2125-------------------------------
  668. INT 21 - DOS 1+ - SET INTERRUPT VECTOR
  669.     AH = 25h
  670.     AL = interrupt number
  671.     DS:DX -> new interrupt handler
  672. Notes:    this function is preferred over direct modification of the interrupt
  673.       vector table
  674.     some DOS extenders place an API on this function, as it is not
  675.       directly meaningful in protected mode
  676.     under DR-DOS 5.0+, this function does not use any of the DOS-internal
  677.       stacks and may thus be called at any time
  678.     Novell NetWare (except the new DOS Requester) monitors the offset of
  679.       any INT 24 set, and if equal to the value at startup, substitutes
  680.       its own handler to allow handling of network errors; this introduces
  681.       the potential bug that any program whose INT 24 handler offset
  682.       happens to be the same as COMMAND.COM's will not have its INT 24
  683.       handler installed
  684. SeeAlso: AX=2501h,AH=35h
  685. --------E-212501-----------------------------
  686. INT 21 P - Phar Lap 386/DOS-Extender - RESET DOS EXTENDER DATA STRUCTURES
  687.     AX = 2501h
  688.     SS = application's original SS or DS (FlashTek X-32VM)
  689. Return: CF clear if successful
  690.     CF set on error
  691.         caller is operating on X-32 stack (FlashTek X-32VM)
  692. Notes:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  693.       system calls.     Only available when directly using 386/DOS-Extender or
  694.       a compatible DOS extender, or when using a product that was created
  695.       using 386-DOS/Extender or a compatible
  696.     this function is also supported by FlashTek X-32VM
  697. SeeAlso: AH=30h"Phar Lap"
  698. --------E-212502-----------------------------
  699. INT 21 P - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  700.     AX = 2502h
  701.     CL = interrupt number
  702. Return: CF clear
  703.     ES:EBX = CS:EIP of protected-mode interrupt handler
  704. Note:    this function is also supported by FlashTek X-32VM
  705. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0204h
  706. --------E-212503-----------------------------
  707. INT 21 P - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  708.     AX = 2503h
  709.     CL = interrupt number
  710. Return: CF clear
  711.     EBX = CS:IP of real-mode interrupt handler
  712. Note:    this function is also supported by FlashTek X-32VM
  713. SeeAlso: AX=2502h,AX=2504h,AH=35h,INT 31/AX=0200h
  714. --------E-212504-----------------------------
  715. INT 21 P - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  716.     AX = 2504h
  717.     CL = interrupt number
  718.     DS:EDX = CS:EIP of protected-mode interrupt handler
  719. Return: CF clear
  720. Note:    this function is also supported by FlashTek X-32VM
  721. SeeAlso: AX=2502h,AX=2505h,INT 31/AX=0205h
  722. --------E-212505-----------------------------
  723. INT 21 P - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  724.     AX = 2505h
  725.     CL = interrupt number
  726.     EBX = CS:IP of real-mode interrupt handler
  727. Return: CF clear
  728. Note:    this function is also supported by FlashTek X-32VM
  729. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0201h
  730. --------E-212506-----------------------------
  731. INT 21 P - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CNTRL IN PR. MODE
  732.     AX = 2506h
  733.     CL = interrupt number
  734.     DS:EDX = CS:EIP of protected-mode interrupt handler
  735. Return: CF clear
  736. Notes:    this function modifies both the real-mode low-memory interrupt
  737.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  738.     interrupts occurring in real mode are resignaled in protected mode
  739.     this function is also supported by FlashTek X-32VM
  740. --------E-212507-----------------------------
  741. INT 21 P - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  742.     AX = 2507h
  743.     CL = interrupt number
  744.     DS:EDX = CS:EIP of protected-mode interrupt handler
  745.     EBX = CS:IP of real-mode interrupt handler
  746. Return: CF clear
  747. Notes:    interrupts are disabled until both vectors have been modified
  748.     this function is also supported by FlashTek X-32VM
  749. SeeAlso: AX=2504h,AX=2505h
  750. --------E-212508-----------------------------
  751. INT 21 P - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  752.     AX = 2508h
  753.     BX = segment selector
  754. Return: CF clear if successful
  755.         ECX = linear base address of segment
  756.     CF set if invalid segment selector
  757. Note:    this function is also supported by FlashTek X-32VM
  758. SeeAlso: AX=2509h
  759. --------E-212509-----------------------------
  760. INT 21 P - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  761.     AX = 2509h
  762.     EBX = linear address to convert
  763. Return: CF clear if successful
  764.         ECX = physical address (carry flag clear)
  765.     CF set if linear address not mapped in page tables
  766. SeeAlso: AX=2508h
  767. --------E-212509-----------------------------
  768. INT 21 P - FlashTek X-32VM - GET SYSTEM SEGMENTS AND SELECTORS
  769.     AX = 2509h
  770. Return: CF clear
  771.     EAX high word = default DS
  772.     AX = alias for 16-bit data segment
  773.     BX = real mode code segment
  774.     EDX high word = selector covering full 4GB address space
  775.     DX = default SS
  776.     ESI high word = PSP selector
  777.     SI = environment selector
  778. --------E-21250A-----------------------------
  779. INT 21 P - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  780.     AX = 250Ah
  781.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  782.          to modify
  783.     EBX = physical base address of memory to map (multiple of 4K)
  784.     ECX = number of physical 4K pages to map
  785. Return: CF clear if successful
  786.         EAX = 32-bit offset in segment of mapped memory
  787.     CF set on error
  788.         EAX = error code
  789.         08h insufficient memory to create page tables
  790.         09h invalid segment selector
  791. SeeAlso: INT 31/AX=0800h
  792. --------E-21250C-----------------------------
  793. INT 21 P - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  794.     AX = 250Ch
  795. Return: CF clear
  796.     AL = base interrupt vector for IRQ0-IRQ7
  797.     AH = base interrupt vector for IRQ8-IRQ15
  798.     BL = interrupt vector for BIOS print screen function (Phar Lap only)
  799. Note:    this function is also supported by FlashTek X-32VM
  800. SeeAlso: INT 31/AX=0400h,INT 67/AX=DE0Ah
  801. --------E-21250D-----------------------------
  802. INT 21 P - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  803.     AX = 250Dh
  804. Return: CF clear
  805.     EAX = CS:IP of real-mode callback procedure (see #0495) that will
  806.           call through from real mode to a protected-mode routine
  807.     EBX = 32-bit real-mode address of intermode call data buffer
  808.     ECX = size in bytes of intermode call data buffer
  809.     ES:EDX = protected-mode address of intermode call data buffer
  810. Notes:    this function is also supported by FlashTek X-32VM
  811.     X-32VM guarantees the intermode buffer to be at least 4 KB
  812. SeeAlso: AX=250Eh
  813.  
  814. (Table 0495)
  815. Call Phar Lap real-mode callback with:
  816.     STACK:    DWORD    offset to protected-mode code
  817.         WORD    placeholder for protected-mode CS
  818.         DWORD    pointer to selector structure (see #0496)
  819.             or 0000h:0000h for defaults
  820.         var    parameters for protected-mode procedure
  821. Return: via FAR return
  822.  
  823. Format of Phar Lap selector structure:
  824. Offset    Size    Description    (Table 0496)
  825.  00h    WORD    protected-mode GS selector
  826.  02h    WORD    protected-mode FS selector
  827.  04h    WORD    protected-mode ES selector
  828.  06h    WORD    protected-mode DS selector
  829. --------E-21250E-----------------------------
  830. INT 21 P - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  831.     AX = 250Eh
  832.     EBX = CS:IP of real-mode procedure to call
  833.     ECX = number of two-byte words to copy from protected-mode stack
  834.           to real-mode stack
  835. Return: CF clear if successful
  836.         all segment registers unchanged
  837.         all general registers contain values set by real-mode procedure
  838.         all other flags set as they were left by real-mode procedure
  839.         stack unchanged
  840.     CF set on error
  841.         EAX = error code
  842.         01h not enough real-mode stack space
  843. Note:    this function is also supported by FlashTek X-32VM; under X-32VM, the
  844.       call will fail if ECX > 0000003Fh
  845. SeeAlso: AX=250Dh,AX=2510h,AH=E1h"OS/286",INT 31/AX=0301h
  846. --------E-21250F-----------------------------
  847. INT 21 P - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  848.     AX = 250Fh
  849.     ES:EBX = 48-bit protected-mode address to convert
  850.     ECX = 00000000h or length of data in bytes
  851. Return: CF clear if successful (address < 1MB and contiguous)
  852.         ECX = 32-bit real-mode MS-DOS address
  853.     CF set on error (address >= 1MB or not contiguous)
  854.         ECX = linear address
  855. Note:    this function is also supported by FlashTek X-32VM
  856. SeeAlso: AX=2510h
  857. --------E-212510-----------------------------
  858. INT 21 P - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  859.     AX = 2510h
  860.     EBX = CS:IP of real-mode procedure to call
  861.     ECX = number of two-byte words to copy to protected-mode stack to
  862.           real-mode stack
  863.     DS:EDX -> pointer to parameter block (see #0497)
  864. Return: CF clear if successful
  865.         all segment registers unchanged,
  866.         EDX unchanged
  867.         all other general registers contain values set by real-mode proc
  868.         all other flags are set as they were left by real-mode procedure
  869.         real-mode register values are returned in the parameter block
  870.     CF set on error
  871.         EAX = error code
  872.         01h not enough real-mode stack space
  873. Note:    unlike most of the preceding 25xxh functions, this one is not
  874.       supported by FlashTek X-32VM
  875. SeeAlso: AX=250Eh,AX=250Fh
  876.  
  877. Format of Phar Lap real-mode call parameter block:
  878. Offset    Size    Description    (Table 0497)
  879.  00h    WORD    real-mode DS value
  880.  02h    WORD    real-mode ES value
  881.  04h    WORD    real-mode FS value
  882.  06h    WORD    real-mode GS value
  883.  08h    DWORD    real-mode EAX value
  884.  0Ch    DWORD    real-mode EBX value
  885.  10h    DWORD    real-mode ECX value
  886.  14h    DWORD    real-mode EDX value
  887. --------E-212511-----------------------------
  888. INT 21 P - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  889.     AX = 2511h
  890.     DS:EDX -> parameter block (see #0498)
  891. Return: all segment registers unchanged
  892.     EDX unchanged
  893.     all other registers contain values set by the real-mode int handler
  894.     the flags are set as they were left by the real-mode interrupt handler
  895.     real-mode register values are returned in the parameter block
  896. Note:    this function is also supported by FlashTek X-32VM
  897. SeeAlso: AX=2503h,AX=2505h,AX=250Eh,AH=E3h"OS/286",INT 31/AX=0300h
  898.  
  899. Format of Phar Lap real-mode interrupt parameter block:
  900. Offset    Size    Description    (Table 0498)
  901.  00h    WORD    interrupt number
  902.  02h    WORD    real-mode DS value
  903.  04h    WORD    real-mode ES value
  904.  06h    WORD    real-mode FS value
  905.  08h    WORD    real-mode GS value
  906.  0Ah    DWORD    real-mode EAX value
  907.  0Eh    DWORD    real-mode EDX value
  908. Note: all other real-mode values set from protected-mode registers
  909. --------E-212512-----------------------------
  910. INT 21 P - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  911.     AX = 2512h
  912.     DS:EDX -> pointer to ASCIZ program name
  913.     ES:EBX -> pointer to parameter block (see #0500)
  914.     ECX = size in bytes of LDT buffer
  915. Return: CF clear if successful
  916.         EAX = number of segment descriptors in LDT
  917.     CF set on error
  918.         EAX = error code (see #0499)
  919. SeeAlso: AX=2517h
  920.  
  921. (Table 0499)
  922. Values for Phar Lap error code:
  923.  02h    file not found or path invalid
  924.  05h    access denied
  925.  08h    insufficient memory
  926.  0Ah    environment invalid
  927.  0Bh    invalid file format
  928.  80h    LDT too small
  929.  
  930. Format of Phar Lap program load parameter block:
  931. Offset    Size    Description    (Table 0500)
  932. Input:
  933.  00h    DWORD    32-bit offset of environment string
  934.  04h    WORD    segment of environment string
  935.  06h    DWORD    32-bit offset of command-tail string
  936.  0Ah    WORD    segment of command-tail string
  937.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  938.  10h    WORD    segment of LDT buffer
  939. Output:
  940.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  941.  14h    WORD    real/protected mode flag
  942.         0000h  real mode
  943.         0001h  protected mode
  944.  16h    DWORD    initial EIP value
  945.  1Ah    WORD    initial CS value
  946.  1Ch    DWORD    initial ESP value
  947.  20h    WORD    initial SS value
  948.  22h    WORD    initial DS value
  949.  24h    WORD    initial ES value
  950.  26h    WORD    initial FS value
  951.  28h    WORD    initial GS value
  952. --------E-212513-----------------------------
  953. INT 21 P - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  954.     AX = 2513h
  955.     BX = segment selector of descriptor in GDT or LDT
  956.     CL = access-rights byte for alias descriptor
  957.     CH = use-type bit (USE16 or USE32) for alias descriptor
  958. Return: CF clear if successful
  959.         AX = segment selector for created alias
  960.     CF set on error
  961.         EAX = error code
  962.         08h insufficient memory (can't grow LDT)
  963.         09h invalid segment selector in BX
  964. --------E-212514-----------------------------
  965. INT 21 P - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  966.     AX = 2514h
  967.     BX = segment selector of descriptor in GDT or LDT
  968.     CL = new access-rights byte
  969.     CH = new use-type bit (USE16 or USE32)
  970. Return: CF clear if successful
  971.     CF set on error
  972.         EAX = error code
  973.         09h invalid selector in BX
  974. SeeAlso: AX=2515h,INT 31/AX=0009h
  975. --------E-212515-----------------------------
  976. INT 21 P - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  977.     AX = 2515h
  978.     BX = segment selector of descriptor in GDT or LDT
  979. Return: CF clear if successful
  980.         CL = access-rights byte for segment
  981.         CH = use-type bit (USE16 or USE32)
  982.     ECX<16-31> destroyed
  983.     CF set on error
  984.         EAX = error code
  985.         09h invalid segment selector in BX
  986. SeeAlso: AX=2514h
  987. --------E-212516-----------------------------
  988. INT 21 P - Phar Lap 386/DOS-Extender v2.2+ - FREE ALL MEMORY OWNED BY LDT
  989.     AX = 2516h
  990. Return: CF clear
  991. Note:    this function must be called from Ring 0 or the CS descriptor is freed
  992. --------E-212517-----------------------------
  993. INT 21 P - Phar Lap 386/DOS-Extender v2.1c+ - GET INFO ON DOS DATA BUFFER
  994.     AX = 2517h
  995. Return: CF clear
  996.     ES:EBX -> data buffer (protected mode address)
  997.     ECX -> data buffer (real mode address)
  998.     EDX = size of data buffer in bytes
  999. Note:    the data buffer's address changes after calls to AX=2512h and AX=252Ah
  1000. SeeAlso: AX=2512h,AX=252Ah,AX=2530h
  1001. --------E-212518-----------------------------
  1002. INT 21 P - Phar Lap 386/DOS-Extender 2.1c+ - SPECIFY HANDLER FOR MOVED SEGMENTS
  1003.     AX = 2518h
  1004.     ES:EBX -> function to call when a segment is moved
  1005. Return: CF clear
  1006.     ES:EBX -> previous handler
  1007. --------E-212519-----------------------------
  1008. INT 21 P - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  1009.     AX = 2519h
  1010. Return: CF clear
  1011.     EAX = error code
  1012.         0000h  no error
  1013.         0001h  out of physical memory
  1014.         0002h  out of swap space (unable to grow swap file)
  1015.         0003h  out of LDT entries and unable to grow LDT
  1016.         0004h  unable to change extended memory allocation mark
  1017.         FFFFFFFFh    paging disabled
  1018. Note:    VMM is the Virtual Memory Manager option
  1019. --------E-21251A-----------------------------
  1020. INT 21 P - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  1021.     AX = 251Ah
  1022.     EDX = number of 4k pages to lock
  1023.     if BL = 00h
  1024.         ECX = linear address of first page to lock
  1025.     if BL = 01h
  1026.         ES:ECX -> pointer to first page to lock
  1027. Return: CF clear if successful
  1028.     CF set on error
  1029.         EAX = error code
  1030.         08h insufficient memory
  1031.         09h invalid address range
  1032. SeeAlso: AX=251Bh,AX=EB06h,INT 31/AX=0600h
  1033. --------E-21251B-----------------------------
  1034. INT 21 P - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  1035.     AX = 251Bh
  1036.     EDX = number of pages to unlock
  1037.     if BL = 00h
  1038.         ECX = linear address of first page to unlock
  1039.     if BL = 01h
  1040.         ES:ECX -> pointer to first page to unlock
  1041. Return: CF clear if successful
  1042.     CF set on error
  1043.         EAX = error code
  1044.         09h invalid address range
  1045. SeeAlso: AX=251Ah,AX=EB07h,INT 31/AX=0601h
  1046. --------E-21251C-----------------------------
  1047. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.1c+ - FREE PHYSICAL MEMORY PAGES
  1048.     AX = 251Ch
  1049.     BH = preservation flag (00h preserve contents, 01h discard contents)
  1050.     EDX = number of pages to free
  1051.     BL = address type
  1052.         00h linear address
  1053.         ECX = linear address of first page to be freed
  1054.         01h pointer
  1055.         ES:ECX -> first page to be freed
  1056. Return: CF clear if successful
  1057.     CF set on error
  1058.         EAX = error code
  1059.         08h memory error, swap space full, no VMM or DPMI
  1060.         09h invalid address
  1061. --------E-21251D-----------------------------
  1062. INT 21 OP - Phar Lap 386/DOS-Extender VMM v2.1c - READ PAGE-TABLE ENTRY
  1063.     AX = 251Dh
  1064.     BL = address type
  1065.         00h linear address
  1066.         ECX = linear address of page table entry to read
  1067.         01h pointer
  1068.         ES:ECX -> page table entry to read
  1069. Return: CF clear if successful
  1070.         EAX = contents of page table entry
  1071.     CF set on error
  1072.         EAX = error code
  1073.         09h invalid address or NOPAGE option set
  1074.         78h invalid under DPMI
  1075. Note:    this function is obsolete; use AX=252Bh/BH=09h instead
  1076. SeeAlso: AX=251Eh,AX=252Bh/BH=09h,AX=EB00h,INT 31/AX=0506h
  1077. --------E-21251E-----------------------------
  1078. INT 21 OP - Phar Lap 386/DOS-Extender VMM v2.1c - WRITE PAGE-TABLE ENTRY
  1079.     AX = 251Eh
  1080.     BL = address type
  1081.         00h linear address
  1082.         ECX = linear address of page table entry to read
  1083.         01h pointer
  1084.         ES:ECX -> page table entry to read
  1085.     EDX = new value for page table entry
  1086. Return: CF clear if successful
  1087.     CF set on error
  1088.         EAX = error code
  1089.         09h invalid address or NOPAGE option set
  1090.         82h not compatible with DPMI
  1091. Note:    this call is obsolete; use AX=252Bh/BH=0Ah instead
  1092. SeeAlso: AX=251Dh,AX=252Bh/BH=0Ah,INT 31/AX=0507h
  1093. --------E-21251F-----------------------------
  1094. INT 21 P - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  1095.     AX = 251Fh
  1096.     BL = address type
  1097.         00h linear address
  1098.         ECX = linear address of first page table entry
  1099.         EDX = linear address of second page table entry
  1100.         01h pointer
  1101.         ES:ECX -> first page table entry
  1102.         ES:EDX -> second page table entry
  1103. Return: CF clear if successful
  1104.     CF set on error
  1105.         EAX = error code
  1106.         09h invalid address or NOPAGE option set
  1107.         82h not compatible with DPMI
  1108. SeeAlso: AX=251Dh,AX=251Eh
  1109. --------E-212520-----------------------------
  1110. INT 21 P - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  1111.     AX = 2520h
  1112.     DS:EDX -> pointer to buffer at least 100 bytes in size (see #0501)
  1113.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  1114. Return: carry flag clear
  1115.  
  1116. Format of Phar Lap VM statistics buffer:
  1117. Offset    Size    Description    (Table 0501)
  1118.  00h    DWORD    VM status
  1119.         0001h VM subsystem is present
  1120.         0000h VM not present
  1121.  04h    DWORD    "nconvpg" number of conventional memory pages available
  1122.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  1123.  0Ch    DWORD    "nextpg" total number of extended memory pages
  1124.  10h    DWORD    "extlim" extender memory pages limit
  1125.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  1126.  18h    DWORD    "alockpg" number of locked pages owned by application
  1127.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  1128.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  1129.  24h    DWORD    linear address of beginning of application address space
  1130.  28h    DWORD    linear address of end of application address space
  1131.  2Ch    DWORD    number of seconds since last time VM stats were reset
  1132.  30h    DWORD    number of page faults since last time
  1133.  34h    DWORD    number of pages written to swap file since last time
  1134.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  1135.  3Ch    DWORD    number of virtual pages allocated to the application
  1136.  40h    DWORD    size in pages of swap file
  1137.  44h    DWORD    number of system pages allocated with EMS calls
  1138.  48h    DWORD    minimum number of conventional memory pages
  1139.  4Ch    DWORD    maximum size in pages to which swap file can be increased
  1140.  50h    DWORD    "vmflags"
  1141.         bit 0 = 1 if page fault in progress
  1142. ---v4.0+ ---
  1143.  54h    DWORD    number of physical pages guaranteed to be free
  1144.  58h    DWORD    number of free physical pages currently available
  1145.  5Ch    DWORD    size in pages of largest free block of memory (including disk
  1146.           swap space)
  1147.  60h    DWORD    reserved
  1148. --------E-212521-----------------------------
  1149. INT 21 P - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEM USAGE
  1150.     AX = 2521h
  1151.     EBX = max 4k pages of physical extended memory which program may use
  1152. Return: CF clear if successful
  1153.        EBX = maximum limit in pages
  1154.        ECX = minimum limit in pages
  1155.     CF set on error
  1156.         EAX = error code
  1157.         08h insufficient memory or -nopage switch used
  1158. SeeAlso: AX=2522h
  1159. --------E-212522-----------------------------
  1160. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - SPECIFY ALTERNATE PAGE-FAULT HANDLR
  1161.     AX = 2522h
  1162.     ES:EBX -> alternate handler for page faults
  1163. Return: CF clear
  1164.     ES:EBX -> previous page-fault handler
  1165. SeeAlso: AX=2523h
  1166. --------E-212523-----------------------------
  1167. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  1168.     AX = 2523h
  1169.     ???
  1170. Return: ???
  1171. Note:    this function takes a DWORD pointer and a DWORD pointer to a DWORD
  1172.       pointer as arguments
  1173. SeeAlso: AX=2522h
  1174. --------E-212524-----------------------------
  1175. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - INSTALL PAGE-REPLACEMENT HANDLERS
  1176.     AX = 2524h
  1177.     ???
  1178. Return: ???
  1179. Note:    this function takes three DWORD pointers and three DWORD pointers to
  1180.       DWORD pointers as arguments
  1181. --------E-212525-----------------------------
  1182. INT 21 P - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENT'L MEM USAGE
  1183.     AX = 2525h
  1184.     EBX = limit in 4k pages of physical conventional memory which program
  1185.           may use
  1186. Return: CF clear if successful
  1187.         EBX = maximum limit in pages
  1188.         ECX = minimum limit in pages
  1189.     CF set on error
  1190.         EAX = error code
  1191.         08h insufficient memory or -nopage switch used
  1192. SeeAlso: AX=2521h
  1193. --------E-212526-----------------------------
  1194. INT 21 P - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  1195.     AX = 2526h
  1196.     ???
  1197. Return: ???
  1198. Notes:    details are not yet available
  1199.     this function takes a pointer to the configuration buffer (see #0502)
  1200.       and a poitner to a BYTE as arguments
  1201.  
  1202. Format of Phar Lap configuration buffer:
  1203. Offset    Size    Description    (Table 0502)
  1204.  00h    DWORD    flags 1 (see #0503)
  1205.  04h    DWORD    flags 2 (unused through v5.0)
  1206.  08h    DWORD    flags 3 (unused through v5.0)
  1207.  0Ch    DWORD    386|DOS-Extender major version
  1208.  10h    DWORD    386|DOS-Extender minor version
  1209.  14h    DWORD    first letter of text after minor version number in version str
  1210.  18h    DWORD    beta flag (00h normal release, 01h beta release)
  1211.  1Ch    DWORD    processor (3 = 386, 4 = 486)
  1212.  20h    DWORD    coprocessor (4 = none, 6 = 287, 7 = 387/486)
  1213.  24h    DWORD    Weitek coprocessor flag (0 = none, 1 = present)
  1214.  28h    DWORD    machine type (0 = IBM PC compatible, 1 = NEC 9800 series)
  1215.  2Ch    DWORD    machine class
  1216.         IBM: bus type (0=ISA, 1=MCA, 2=XT, 3=EISA)
  1217.         NEC: 0=normal mode, 1=high-res mode
  1218.  30h    DWORD    VCPI flag (0 = none, 1 = present)
  1219.  34h    DWORD    -WEITEK/-1167 switch (0 = AUTO, 1 = ON, 2 = OFF)
  1220.  38h    DWORD    -MINREAL setting
  1221.  3Ch    DWORD    -MAXREAL setting
  1222.  40h    DWORD    -MINIBUF setting
  1223.  44h    DWORD    -MAXIBUF setting
  1224.  48h    DWORD    size in bytes of DOS call data buffer
  1225.  4Ch    DWORD    number of interrupt stacks (-NISTACK)
  1226.  50h    DWORD    interrupt stack size (-ISTKSIZE)
  1227.  54h    DWORD    -REALBREAK setting
  1228.  58h    DWORD    -CALLBUFS
  1229.  5Ch    DWORD    -HWIVEC
  1230.  60h    DWORD    -PRIVEC
  1231.  64h    DWORD    -INTMAP
  1232.  68h    DWORD    -PRIMAP
  1233.  6Ch    DWORD    VCPI: master 8259 interrupt vector base (IRQ0 mapping)
  1234.  70h    DWORD    VCPI: slave 8259 interrupt vector base (IRQ8 mapping)
  1235.  74h    DWORD    BIOS print screen interrupt vector (0 if NEC)
  1236.  78h    DWORD    -EXTLOW setting
  1237.  7Ch    DWORD    -EXTHIGH setting
  1238.  80h    DWORD    lowest physical extended-memory address allocatable
  1239.  84h    DWORD    highest physical extended-memory address allocatable + 1
  1240.  88h    DWORD    special memory's physical base address (00000000h if none)
  1241.  8Ch    DWORD    special memory size in bytes (00000000h if none)
  1242.  90h    DWORD    -MAXVCPIMEM setting
  1243.  94h    DWORD    -VSCAN
  1244.  98h    DWORD    -SWAPCHK (0 = OFF, 1 = ON, 2 = FORCE, 3 = MAX)
  1245.  9Ch    DWORD    -CODESIZE setting
  1246.  A0h    DWORD    minimum swap file size (-MINSWFSIZE)
  1247.  A4h    DWORD    maximum swap fiel size (-MAXSWFSIZE)
  1248.  A8h    DWORD    page replacement policy (0 = LFU, 1 = NUR)
  1249.  ACh    DWORD    number of GDT entries (-NGDTENT)
  1250.  B0h    DWORD    number of LDT entries (-NLDTENT)
  1251.  B4h    DWORD    program's privilege level (0-3)
  1252. ---386|DOS-Extender v3.0+ ---
  1253.  B8h    DWORD    -LOCKSTACK setting
  1254.  BCh    DWORD    -MAXEXTMEM
  1255.  C0h    DWORD    -MAXXMSMEM
  1256.  C4h    DWORD    -MAXPGMMEM
  1257.  C8h    DWORD    -DATATHRESHOLD
  1258.  CCh    DWORD    virtual memory manager flag (0 = not present, 1 = present)
  1259.  D0h    DWORD    Cyrix coprocessor flag (0 = no Cyrix EMC387, 1 = present)
  1260.  D4h    DWORD    -CYRIX setting (0 = AUTO, 1 = ON, 2 = OFF)
  1261.  D8h    DWORD    DPMI flag (0 = not present, 1 = present)
  1262.  DCh    DWORD    DPMI major version
  1263.  E0h    DWORD    DPMI minor version
  1264.  E4h    DWORD    DPMI capabilities flags (see #0504)
  1265.  E8h    DWORD    VCPI major version
  1266.  ECh    DWORD    VCPI minor version
  1267.  F0h    WORD    VCPI: IRQ0-7 physical base interrupt vector
  1268.  F2h    WORD    VCPI: IRQ8-15 physical base interrupt vector
  1269.  F4h    DWORD    XMS flag (0 = none, 1 = present)
  1270.  F8h    DWORD    XMS major version
  1271.  FCh    DWORD    XMS minor version
  1272. 100h    WORD    application's CS selector
  1273. 102h    WORD    application's DS selector
  1274. 104h    WORD    application's PSP selector
  1275. 106h    WORD    application's environment selector
  1276. 108h    WORD    selector mapping entire first megabyte
  1277. 10Ah    WORD    selector mapping text video memory
  1278. 10Ch    WORD    selector mapping video memory (text for IBM, graphics for NEC)
  1279. 10Eh    WORD    selector mapping Weitek address space, 0000h if not present
  1280. 110h    WORD    selector mapping Cyrix EMC387 address space, 0000h if none
  1281. 112h    WORD    reserved (0)
  1282. 114h    DWORD    real-mode FAR entry point to call to switch to protected mode
  1283.           with no saved context
  1284. 118h    DWORD    size of LDT in bytes
  1285. ---386|DOS-Extender v5.0+ ---
  1286. 11Ch    DWORD    Windows flag (0 = not present, 1 = Windows present)
  1287. 120h    DWORD    Windows major version
  1288. 124h    DWORD    Windows minor version
  1289. 128h    DWORD    Windows mode (0 = real/standard, 1 = enhanced)
  1290. 12Ch    DWORD    OS/2 flag (0 = not present, 1 = OS/2 present)
  1291. 130h    DWORD    OS/2 major version
  1292. 134h    DWORD    OS/2 minor version
  1293. 138h 50 DWORDs    reserved (0)
  1294.  
  1295. Bitfields for flags 1:
  1296. Bit(s)    Description    (Table 0503)
  1297.  0    -NOPAGE specified
  1298.  1    -A20 specified
  1299.  2    -VDISK specified
  1300.  3    -XT specified
  1301.  4    -AT specified
  1302.  5    -MCA specified
  1303.  6    -EISA specified
  1304.  7    -NORMRES specified (NEC only)
  1305.  8    -HIGHRES specified (NEC only)
  1306.  9    set if -SWFGROW1ST, clear if -NOSWFGROW1ST
  1307.  10    -NOVM specified
  1308.  11    -SAVEREGS specified
  1309.  12    unused (clear)
  1310.  13    -NOVCPI specified
  1311.  14    -NOMUL specified
  1312.  15    -NOBMCHK specified
  1313.  16    -NOSPCLMEM or -NOBIM
  1314.  17    -NOPGEXP specified
  1315.  18    -SWAPDEFDISK specified
  1316. ---v3.0+ ---
  1317.  19    -SAVEINTS specified
  1318.  20    -NOLOAD specified
  1319.  21    -PAGELOG specified
  1320.  22    -OPENDENY specified
  1321.  23    -ERRATA17 specified
  1322. ---v4.1+ ---
  1323.  24    -NESTDPMI specified
  1324.  25    -NONESTDPMI specified
  1325.  26    -NODPMI specified
  1326.  27    -NOPCDWEITEK specified
  1327. ---v4.2+ ---
  1328.  28    -WININT21 specified
  1329.  
  1330. Bitfields for DPMI capabilities flags:
  1331. Bit(s)    Description    (Table 0504)
  1332.  0    paging supported
  1333.  1    physical device mapping
  1334.  2    conventional memory mapping
  1335.  3    exceptions restartable
  1336. --------E-212527-----------------------------
  1337. INT 21 P - Phar Lap 386/DOS-Extender VMM - EN/DISABLE STATE SAVE ON INTERRUPTS
  1338.     AX = 2527h
  1339.     EBX = new status (00h disabled, 01h enabled)
  1340. Return: CF clear
  1341.     EBX = previous state save flag
  1342. SeeAlso: AX=2528h
  1343. --------E-212528-----------------------------
  1344. INT 21 P - Phar Lap 386/DOS-Extender VMM - READ REGISTERS AFTER CTRL-C INT
  1345.     AX = 2528h
  1346.     DS:EBX -> buffer for registers (see #0505)
  1347. Return: CF clear if successful
  1348.         DS:EBX buffer filled
  1349.     CF set on error
  1350.         EAX = error code
  1351.         83h interrupt state save not enabled
  1352.         84h no active interrupt
  1353. SeeAlso: AX=2527h
  1354.  
  1355. Format of Phar Lap buffer for registers:
  1356. Offset    Size    Description    (Table 0505)
  1357.  00h  8 BYTEs    unused
  1358.  08h  4    DWORDs    EAX,EBX,ECX,EDX
  1359.  18h  4 DWORDs    ESI,EDI,EBP,ESP
  1360.  28h  6 WORDs    CS,DS,SS,ES,FS,GS
  1361.  34h    DWORD    EIP
  1362.  38h    DWORD    EFLAGS
  1363. --------E-212529-----------------------------
  1364. INT 21 P - Phar Lap 386/DOS-Extender - LOAD FLAT MODEL .EXP or .REX FILE
  1365.     AX = 2529h
  1366.     ???
  1367. Return: ES:EBX -> parameter block (see #0506)
  1368.     ???
  1369. Note:    details not available at this time
  1370. SeeAlso: AX=252Ah
  1371.  
  1372. Format of Phar Lap program load parameter block:
  1373. Offset    Size    Description    (Table 0506)
  1374.  00h    DWORD    initial EIP
  1375.  04h    WORD    initial CS
  1376.  06h    DWORD    initial ESP
  1377.  0Ah    WORD    initial SS
  1378.  0Ch  4 WORDs    initial DS, ES, FS, GS
  1379.  14h    DWORD    minimum size in bytes of program segment
  1380.  18h    DWORD    bytes of additional memory allocated
  1381.  1Ch    DWORD    flags
  1382.         bit 0: child linked with -UNPRIVILEGED
  1383.         ---v6.0+ ---
  1384.         bit 1: child is PE file instead of .EXP
  1385.         bit 2: loaded file is a DLL
  1386.         bits 3-31 reserved
  1387. ---v6.0+ ---
  1388.  20h    DWORD    module handles (PE files only)
  1389.  24h  7 DWORDs    reserved (0)
  1390. --------E-21252A-----------------------------
  1391. INT 21 P - Phar Lap 386/DOS-Extender VMM - NEW LOAD PROGRAM FOR DEBUG
  1392.     AX = 252Ah
  1393.     DS:EDX -> ASCIZ program name
  1394.     ES:EBX -> parameter block (see #0500)
  1395.     ECX = size of LDT buffer in bytes
  1396.     ESI = bit flags
  1397.         bit 0: allow demand paging rather than loading entire program
  1398.         bit 1: demand page from swap file rather than from .EXP
  1399. Return: CF clear if successful
  1400.         EAX = VMM handle or FFFFFFFFh if none
  1401.         ECX = number of descriptors in LDT buffer
  1402.     CF set on error
  1403.         EAX = error code
  1404.         02h file error
  1405.             EBX = file error code (see #0507)
  1406.             ECX = DOS error code if EBX=1,2,3, or 8
  1407.         08h insufficient memory
  1408.             EBX = memory error code (see #0508)
  1409.         80h LDT buffer too small
  1410.         87h called twice without intervening call to AX=2531h
  1411. SeeAlso: AX=2512h,AX=2517h,AX=2529h,AX=2531h
  1412.  
  1413. (Table 0507)
  1414. Values for Phar Lap file error code:
  1415.  01h    DOS open error
  1416.  02h    DOS seek error
  1417.  03h    DOS read error
  1418.  04h    not an .EXP or .REX file
  1419.  05h    invalid file format
  1420.  06h    -OFFSET is not a multiple of 64K
  1421.  07h    -NOPAGE incompatible with -REALBREAK/-OFFSET
  1422.  08h    DOS error loading .EXE file
  1423.  
  1424. (Table 0508)
  1425. Values for Phar Lap memory error code:
  1426.  01h    out of physical memory
  1427.  02h    out of swap space
  1428.  04h    unable to change extended memory allocation
  1429.  05h    -MAXPGMMEM exceeded
  1430.  06h    insufficient low memory to REALBREAK value
  1431.  07h    insufficient low memory for PSP and environment
  1432. --------E-21252BBL00-------------------------
  1433. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE UNMAPPED PAGES
  1434.     AX = 252Bh
  1435.     BL = 00h
  1436.     ???
  1437. Return: ???
  1438. --------E-21252BBL01-------------------------
  1439. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE ALLOCATED PAGES
  1440.     AX = 252Bh
  1441.     BL = 01h
  1442.     ???
  1443. Return: ???
  1444. --------E-21252BBL02-------------------------
  1445. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE PHYSICAL DEVICE PAGES
  1446.     AX = 252Bh
  1447.     BL = 02h
  1448.     ???
  1449. Return: ???
  1450. --------E-21252BBL03-------------------------
  1451. INT 21 Pu - Phar Lap 386/DOS-Extender - MAP DATA FILE
  1452.     AX = 252Bh
  1453.     BL = 03h
  1454.     ???
  1455. Return: ???
  1456. SeeAlso: AX=252Bh/BL=0Bh
  1457. --------E-21252BBL04-------------------------
  1458. INT 21 Pu - Phar Lap 386/DOS-Extender - GET PAGE TYPES
  1459.     AX = 252Bh
  1460.     BL = 04h
  1461.     ???
  1462. Return: ???
  1463. Note:    returns one word per page
  1464. SeeAlso: #0509
  1465.  
  1466. Bitfields for Phar Lap page information:
  1467. Bit(s)    Description    (Table 0509)
  1468.  7    mapped to read/write data file
  1469.  6    mapped to read-only data file
  1470.  5    swapped to disk
  1471.  4    locked
  1472.  3-0    page type
  1473.     0 unmapped
  1474.     1 allocated
  1475.     2 physical device page
  1476. --------E-21252B-----------------------------
  1477. INT 21 P - Phar Lap 386/DOS-Extender - VIRTUAL MEMORY MANAGEMENT - PAGE LOCKING
  1478.     AX = 252Bh
  1479.     BH = function
  1480.         05h lock pages
  1481.         06h unlock pages
  1482.     BL = address type
  1483.         00h linear address
  1484.         ECX = linear start address of memory region
  1485.         01h segmented address
  1486.         ES:ECX -> start of memory region
  1487.     EDX = size of memory region in bytes
  1488. Return: CF clear if successful
  1489.     CF set on error
  1490. Note:    this function is also supported by FlashTek X-32VM; if X-32 is not
  1491.       using virtual memory, this function always succeeds
  1492. --------E-21252B-----------------------------
  1493. INT 21 Pu - Phar Lap 386/DOS-Extender - FREE PHYSICAL PAGES
  1494.     AX = 252Bh
  1495.     BL = function (07h,08h)
  1496.     ???
  1497. Return: ???
  1498. --------E-21252BBH09-------------------------
  1499. INT 21 P - Phar Lap 386/DOS-Extender v4.1 - GET PAGETABLE ENTRY/PAGE TABLE INFO
  1500.     AX = 252Bh
  1501.     BH = 09h
  1502.     BL = subfunction
  1503.         00h get page table entry by linear address
  1504.         ECX = linear address for which to get page table entry
  1505.         01h get page table entry by logical address
  1506.         ES:ECX = address for which to get page table entry
  1507. Return: CF clear if successful
  1508.         EAX = page table entry
  1509.         EBX = additional page table information
  1510.     CF set on error
  1511.         EAX = error code
  1512.         0009h invalid address
  1513.         0082h running under DPMI
  1514. SeeAlso: AX=251Dh,AX=252Bh/BH=0Ah
  1515. --------E-21252BBH0A-------------------------
  1516. INT 21 P - Phar Lap 386/DOS-Extender v4.1 - SET PAGETABLE ENTRY/PAGE TABLE INFO
  1517.     AX = 252Bh
  1518.     BH = 0Ah
  1519.     BL = subfunction
  1520.         00h set page table entry for linear address
  1521.         ECX = linear address for which to get page table entry
  1522.         01h set page table entry for logical address
  1523.         ES:ECX = address for which to get page table entry
  1524.     ESI = page table entry
  1525.     EDI = additional page table information
  1526. Return: CF clear if successful
  1527.     CF set on error
  1528.         EAX = error code
  1529.         0009h invalid address
  1530.         0082h running under DPMI
  1531. SeeAlso: AX=252Bh/BH=09h
  1532. --------E-21252BBH0B-------------------------
  1533. INT 21 P - Phar Lap 386/DOS-Extender v4.1+ - MAP DATA FILE AT FILE OFFSET
  1534.     AX = 252Bh
  1535.     BH = 0Bh
  1536.     BL = subfunction
  1537.         00h by linear address
  1538.         ECX = linear address at which to map data file
  1539.         01h by logical address
  1540.         ES:ECX = logical address at which to map data file
  1541.     EDX = number of bytes to map
  1542.     DS:ESI -> mapping structure (see #0510)
  1543.     DS:EDI -> ASCIZ filename
  1544. Return: CF clear if successful
  1545.     CF set on error
  1546.         EAX = error code
  1547.         0002h file error
  1548.             ECX = phase (01h opening file, 02h seeking, 03h reading)
  1549.             EDX = error code returned by DOS
  1550.         0009h invalid address
  1551.         0081h invalid parameters or 386|VMM not present
  1552.         0086h all 386|VMM file handles already in use
  1553. SeeAlso: AX=252Bh/BH=03h,AX=252Bh/BH=09h
  1554.  
  1555. Format of Phar Lap mapping structure:
  1556. Offset    Size    Description    (Table 0510)
  1557.  00h    DWORD    starting file offset to be mapped
  1558.  04h    DWORD    DOS file access and sharing modes (see #0539 at INT 21/AH=3Dh)
  1559. --------E-21252C-----------------------------
  1560. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - ADD UNMAPPED PAGES AT END OF SEGMENT
  1561.     AX = 252Ch
  1562.     BX = segment selector
  1563.     ECX = number of 4K pages to add
  1564. Return: CF clear if successful
  1565.         EAX = offset in segment of beginning of unmapped pages
  1566.     CF set on error
  1567.         EAX = error code
  1568.         08h insufficent memory
  1569.         09h invalid selector
  1570.         82h not supported by current DPMI
  1571. --------E-21252D-----------------------------
  1572. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.3+ - CLOSE VMM FILE HANDLE
  1573.     AX = 252Dh
  1574.     EBX = VMM file handle
  1575. Return: CF clear if successful
  1576.     CF set on error
  1577.         EAX = error code (81h invalid VMM handle)
  1578. --------E-21252E-----------------------------
  1579. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.3+ - GET/SET VMM PARAMETERS
  1580.     AX = 252Eh
  1581.     CL = direction (00h get parameters, 01h set parameters)
  1582.     DS:EBX -> parameter buffer (see #0511)
  1583. Return: CF clear if successful
  1584.     CF set on error
  1585.         EAX = error code (81h bad parameter value)
  1586.  
  1587. Format of Phar Lap VMM parameter buffer:
  1588. Offset    Size    Description    (Table 0511)
  1589.  00h    DWORD    flags
  1590.         bit 0: page fault logging enabled
  1591.         ---v5.0+ ---
  1592.         bit 1: swap extender to disk during DOS EXEC call
  1593.         bit 2: don't zero allocated memory
  1594.  04h    DWORD    scan period for page aging, in milliseconds
  1595.  08h    DWORD    maximum size (in bytes) to check on each page scan
  1596.  0Ch 52 BYTEs    unused
  1597. --------E-21252F-----------------------------
  1598. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - WRITE RECORD TO VMM PAGE LOG FILE
  1599.     AX = 252Fh
  1600.     DS:EBX -> data to be written
  1601.     CX = size of data in bytes
  1602. Return: CF clear if successful
  1603.     CF set on error
  1604.         EAX = error code (85h no page log file or not 386/VMM)
  1605. --------E-212530-----------------------------
  1606. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.3+ - SET SIZE OF BUFFER FOR DOS CALLS
  1607.     AX = 2530h
  1608.     ECX = size of data buffer in bytes (1024 to 65536)
  1609. Return: CF clear if successful
  1610.     CF set on error
  1611.         EAX = error code
  1612.         08h insufficient low memory
  1613.         81h invalid size
  1614. SeeAlso: AX=2517h
  1615. --------E-212531-----------------------------
  1616. INT 21 P - Phar Lap 386/DOS-Extender VMM v3.0 - READ/WRITE LDT DESCRIPTOR
  1617.     AX = 2531h
  1618.     BX = segment selector
  1619.     ECX = direction (00h read, 01h write)
  1620.     DS:EDX -> 8-byte buffer for descriptor contents
  1621. Return: CF clear if successful
  1622.     CF set on error
  1623.         EAX = error code
  1624.         81h invalid selector
  1625.         82h DPMI running, or not a code or data segment
  1626. --------E-212532-----------------------------
  1627. INT 21 P - Phar Lap 386/DOS-Extender - GET EXCEPTION HANDLER VECTOR
  1628.     AX = 2532h
  1629.     CL = exception number (00h-0Fh)
  1630. Return: CF clear if successful
  1631.         ES:EBX = CS:EIP of current exception handler
  1632.     CF set on error (CL > 0Fh)
  1633. Notes:    this call is also supported by the FlashTek X-32VM extender
  1634.     this function is incompatible with 386|VMM; use AX=2522h instead
  1635. SeeAlso: AX=2522h,AX=2533h
  1636. --------E-212533-----------------------------
  1637. INT 21 P - Phar Lap 386/DOS-Extender - SET EXCEPTION HANDLER VECTOR
  1638.     AX = 2533h
  1639.     CL = exception number (00h-0Fh)
  1640.     DS:EDX = CS:EIP of new exception handler
  1641. Return: CF clear if successful
  1642.     CF set on error (CL > 0Fh)
  1643. Notes:    this call is also supported by the FlashTek X-32VM extender
  1644.     this function is incompatible with 386|VMM; use AX=2522h instead
  1645. SeeAlso: AX=2522h,AX=2532h
  1646. --------E-212534-----------------------------
  1647. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - GET INTERRUPT FLAG
  1648.     AX = 2534h
  1649. Return: CF clear
  1650.     EAX = interrupt state (00h disabled, 01h enabled)
  1651. --------E-212535-----------------------------
  1652. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - READ/WRITE SYSTEM REGISTERS
  1653.     AX = 2535h
  1654.     EBX = direction (00h read registers, 01h write)
  1655.     DS:EDX -> system register record (see #0512)
  1656. Return: CF clear
  1657. Note:    this call is only available under MS Windows if PHARLAP.386 VDD is
  1658.       installed
  1659.  
  1660. Format of Phar Lap system register record:
  1661. Offset    Size    Description    (Table 0512)
  1662.  00h    DWORD    CR0
  1663.  04h  4 DWORDs    DR0,DR1,DR2,DR3
  1664.  14h  2 DWORDs    reserved
  1665.  1Ch  2 DWORDs    DR6,DR7
  1666.  24h  3 DWORDs    reserved
  1667. --------E-212536----------------------------
  1668. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0+ - MIN/MAX EXTENDED/CONV MEMORY USAGE
  1669.     AX = 2536h
  1670.     EBX = bit flags
  1671.         bit 0: modifying conventional memory rather than extended memory
  1672.         bit 1: setting maximum memory usage rather than minimum
  1673.     ECX = new limit in 4K pages
  1674. Return: CF clear if successful
  1675.         EAX = new limit
  1676.     CF set on error
  1677.         EAX = error code (08h memory error or -NOPAGE set)
  1678.         EBX = maximum limit in pages
  1679.         ECX = minimum limit in pages
  1680. --------E-212537----------------------------
  1681. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - ALLOCATE DOS MEMORY ABOVE DOS BUFFER
  1682.     AX = 2537h
  1683.     BX = number of paragraphs to allocate
  1684. Return: CF clear if successful
  1685.         AX = real-mode segment of allocated block
  1686.     CF set on error
  1687.         AX = error code
  1688.         07h MS-DOS memory chain corrupted
  1689.         08h insufficient low memory
  1690.         BX = size in paragraphs of largest free block
  1691. SeeAlso: AH=48h
  1692. --------E-212538----------------------------
  1693. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - READ PROTMODE REGS AFTER SFTWARE INT
  1694.     AX = 2538h
  1695.     DS:EBX -> buffer for registers (see #0505)
  1696.     ECX = register record to retrieve
  1697.         00h first interrupt state
  1698.         01h next interrupt state
  1699.         EDX = handle for current interrupt state
  1700. Return: CF clear if successful
  1701.         DS:EBX buffer filled
  1702.         EDX = handle of current interrupt state
  1703.         ESI = number of interrupt which occurred
  1704.     CF set on error
  1705.         EAX = error code
  1706.         81h invalid handle in EDX
  1707.         83h register saving not enabled
  1708.         84h no more interrupt states
  1709. SeeAlso: AX=2527h,AX=2528h
  1710. --------E-212539----------------------------
  1711. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - GET OFFSET OF .EXP FILE HEADER
  1712.     AX = 2539h
  1713.     BX = MS-DOS file handle for open file
  1714. Return: CF clear if successful
  1715.         EAX = offset of .EXP header in file
  1716.     CF set on error
  1717.         EAX = error code (02h file error)
  1718.         EBX = file error code
  1719.         02h DOS error seeking
  1720.         03h DOS error reading
  1721.         04h invalid file type    
  1722.         05h invalid file format
  1723.         ECX = DOS error code if EBX=02h or 03h
  1724.     current file position in file modified
  1725. --------E-21253A----------------------------
  1726. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - INSTALL MOD. SEG FAILURE HANDLER
  1727.     AX = 253Ah
  1728.     ES:EBX -> function to be called when INT 21/AH=4Ah is about to return
  1729.         an error
  1730. Return: CF clear
  1731.     ES:EBX -> previous handler
  1732. SeeAlso: AH=4Ah
  1733. --------E-21253B----------------------------
  1734. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - JUMP TO REAL MODE CODE, NO CONTEXT
  1735.     AX = 253Bh
  1736.     DS:EBX -> buffer containing register contents (see #0505)
  1737. Return: never returns
  1738. SeeAlso: AX=2528h
  1739. --------E-21253C-----------------------------
  1740. INT 21 P - Phar Lap 386/DOS-Extender VMM v3.0+ - SHRINK 386|VMM SWAP FILE
  1741.     AX = 253Ch
  1742. Return: CF clear
  1743.     EAX = old size of swap file in bytes
  1744.     EBX = new size of swap file in bytes
  1745. --------E-21253D-----------------------------
  1746. INT 21 P - Phar Lap 386/DOS-Extender v4.0+ - READ/WRITE IDT DESCRIPTOR
  1747.     AX = 253Dh
  1748.     BL = interrupt number
  1749.     ECX = direction (0 = read, 1 = write)
  1750.     DS:EDX -> 8-byte buffer for descriptor
  1751. Return: CF clear if successful
  1752.         DS:EDX filled if reading
  1753.     CF set on error
  1754.         EAX = error code (0082h if running under DPMI)
  1755. Desc:    access hardware-level IDT rather than the internal 386/DOS-Extender
  1756.       shadow IDT
  1757. Notes:    this call will always fail under DPMI because it is not possible to
  1758.       access the IDT
  1759.     the descriptor is not checked when writing
  1760.     this call can normally be used only by programs running in ring 0
  1761.       because the processor does not allow an interrupt to be vectored to
  1762.       a less privileged ring
  1763. --------E-21253F-----------------------------
  1764. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - ALLOCATE LDT DESCRIPTOR
  1765.     AX = 253Fh
  1766.     BX = LDT descriptor to allocate (0000h for any)
  1767.     ???
  1768. Return: ???
  1769. --------E-212540-----------------------------
  1770. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - FORCE ALIAS OF SEGMENT
  1771.     AX = 2540h
  1772.     ???
  1773. Return: ???
  1774. --------E-212544-----------------------------
  1775. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - FREE DLL
  1776.     AX = 2544h
  1777.     ???
  1778. Return: ???
  1779. --------E-212545-----------------------------
  1780. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - GET/SET PROCEDURE ADDRESS
  1781.     AX = 2545h
  1782.     ECX = direction (00h get, 01h set)
  1783.     ???
  1784. Return: ???
  1785. --------E-212546-----------------------------
  1786. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - GET MODULE HANDLE
  1787.     AX = 2546h
  1788.     ???
  1789. Return: ???
  1790. --------E-2125C0-----------------------------
  1791. INT 21 P - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  1792.     AX = 25C0h
  1793.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  1794. Return: CF clear if successful
  1795.         AX = real-mode paragraph address of memory
  1796.     CF set on error
  1797.         AX = error code
  1798.         07h MS-DOS memory control blocks destroyed
  1799.         08h insufficient memory
  1800.         BX = size in paragraphs of largest available memory block
  1801. SeeAlso: AX=25C1h,AX=25C2h
  1802. --------E-2125C1-----------------------------
  1803. INT 21 P - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  1804.     AX = 25C1h
  1805.     CX = real-mode paragraph address of memory block to free
  1806. Return: CF clear if successful
  1807.         EAX destroyed
  1808.     CF set on error
  1809.         AX = error code
  1810.         07h MS-DOS memory control blocks destroyed
  1811.         09h invalid memory block address in CX
  1812. SeeAlso: AX=25C0h,AX=25C2h
  1813. --------E-2125C2-----------------------------
  1814. INT 21 P - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  1815.     AX = 25C2h
  1816.     BX = new requested block size in paragraphs
  1817.     CX = real-mode paragraph address of memory block to modify
  1818. Return: CF clear if successful
  1819.         EAX destroyed
  1820.     CF set on error
  1821.         AX = error code
  1822.         07h MS-DOS memory control blocks destroyed
  1823.         08h insufficient memory
  1824.         09h invalid memory block address in CX
  1825.         BX = size in paragraphs of largest available memory block
  1826. SeeAlso: AX=25C0h,AX=25C1h
  1827. --------E-2125C3-----------------------------
  1828. INT 21 P - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  1829.     AX = 25C3h
  1830.     ES:EBX -> pointer to parameter block (see #0514)
  1831.     DS:EDX -> pointer to ASCIZ program filename
  1832. Return: CF clear if successful
  1833.         all registers unchanged
  1834.     CF set on error
  1835.         EAX = error code (see #0513)
  1836.  
  1837. (Table 0513)
  1838. Values for Phar Lap error code:
  1839.  01h    function code in AL is invalid ???
  1840.  02h    file not found or path invalid
  1841.  05h    access denied
  1842.  08h    insufficient memory to load program
  1843.  0Ah    environment invalid
  1844.  0Bh    invalid file format
  1845.  
  1846. Format of parameter block:
  1847. Offset    Size    Description    (Table 0514)
  1848.  00h    DWORD    32-bit offset of environment string
  1849.  04h    WORD    segment selector of environment string
  1850.  06h    DWORD    32-bit offset of command-tail string
  1851.  0Ah    WORD    segment selector of command-tail string
  1852. --------D-2126-------------------------------
  1853. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  1854.     AH = 26h
  1855.     DX = segment at which to create PSP (see #0515)
  1856. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1857.       taken from interrupt vector table; the parent PSP field is set to 0
  1858.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  1859.       copy
  1860. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  1861.  
  1862. Format of Program Segment Prefix (PSP):
  1863. Offset    Size    Description    (Table 0515)
  1864.  00h  2 BYTEs    INT 20 instruction for CP/M CALL 0 program termination
  1865.         the CDh 20h here is often used as a signature for a valid PSP
  1866.  02h    WORD    segment of first byte beyond memory allocated to program
  1867.  04h    BYTE    unused filler
  1868.  05h    BYTE    CP/M CALL 5 service request (FAR CALL to absolute 000C0h)
  1869.         BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  1870.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  1871.  08h  2 BYTEs    remainder of FAR JMP at 05h
  1872.  0Ah    DWORD    stored INT 22 termination address
  1873.  0Eh    DWORD    stored INT 23 control-Break handler address
  1874.  12h    DWORD    DOS 1.1+ stored INT 24 critical error handler address
  1875.  16h    WORD    segment of parent PSP
  1876.  18h 20 BYTEs    DOS 2+ Job File Table, one byte per file handle, FFh = closed
  1877.  2Ch    WORD    DOS 2+ segment of environment for process (see #0516)
  1878.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  1879.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  1880.  34h    DWORD    DOS 3+ pointer to JFT (default PSP:0018h)
  1881.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  1882.         used by SHARE in DOS 3.3
  1883.  3Ch    BYTE    apparently unused by MS-DOS versions <= 6.00
  1884.         (Novell DOS 7) interim console flag (see AX=6301h)
  1885.  3Dh    BYTE    (APPEND) TrueName flag (see INT 2F/AX=B711h)
  1886.  3Eh    BYTE    (Novell NetWare) flag: next byte initialized if CEh
  1887.  3Fh    BYTE    (Novell NetWare) Novell task number if previous byte is CEh
  1888.  40h  2 BYTEs    DOS 5+ version to return on INT 21/AH=30h
  1889.  42h    WORD    (MSWindows3) selector of next PSP (PDB) in linked list
  1890.         Windows keeps a linked list of Windows programs only
  1891.  44h  4 BYTEs    unused by DOS versions <= 6.00
  1892.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  1893.  49h  7 BYTEs    unused by DOS versions <= 6.00
  1894.  50h  3 BYTEs    DOS 2+ service request (INT 21/RETF instructions)
  1895.  53h  2 BYTEs    unused in DOS versions <= 6.00
  1896.  55h  7 BYTEs    unused in DOS versions <= 6.00; can be used to make first FCB
  1897.           into an extended FCB
  1898.  5Ch 16 BYTEs    first default FCB, filled in from first commandline argument
  1899.         overwrites second FCB if opened
  1900.  6Ch 16 BYTEs    second default FCB, filled in from second commandline argument
  1901.           overwrites beginning of commandline if opened
  1902.  7Ch  4 BYTEs    unused
  1903.  80h 128 BYTEs    commandline / default DTA
  1904.         command tail is BYTE for length of tail, N BYTEs for the tail,
  1905.           followed by a BYTE containing 0Dh
  1906. Notes:    in DOS v3+, the limit on simultaneously open files may be increased by
  1907.       allocating memory for a new open file table, filling it with FFh,
  1908.       copying the first 20 bytes from the default table, and adjusting the
  1909.       pointer and count at 34h and 32h.  However, DOS will only copy the
  1910.       first 20 file handles into a child PSP (including the one created on
  1911.       EXEC).
  1912.     network redirectors based on the original MS-Net implementation use
  1913.       values of 80h-FEh in the open file table to indicate remote files;
  1914.       Novell NetWare also uses values from FEh down to 80h or one more than
  1915.       FILES= (whichever is greater) to indicate remote files
  1916.     MS-DOS 5.00 incorrectly fills the FCB fields when loading a program
  1917.       high; the first FCB is empty and the second contains the first
  1918.       parameter
  1919.     some DOS extenders place protected-mode values in various PSP fields
  1920.       such as the "parent" field, which can confuse PSP walkers.  Always
  1921.       check either for the CDh 20h signature or that the suspected PSP is
  1922.       at the beginning of a memory block which owns itself (the preceding
  1923.       paragraph should be a valid MCB with "owner" the same as the
  1924.       suspected PSP).
  1925.     Novell NetWare updates the fields at offsets 3Eh and 3Fh without
  1926.       checking that a legal PSP segment is current; see AH=50h for further
  1927.       discussion
  1928.  
  1929. Format of environment block:
  1930. Offset    Size    Description    (Table 0516)
  1931.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  1932.       N BYTEs    second environment variable, ASCIZ string
  1933.     ...
  1934.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  1935.     BYTE    00h
  1936. ---DOS 3+---
  1937.     WORD    number of strings following environment (normally 1)
  1938.       N BYTEs    ASCIZ full pathname of program owning this environment
  1939.         other strings may follow
  1940. --------D-2127-------------------------------
  1941. INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
  1942.     AH = 27h
  1943.     CX = number of records to read
  1944.     DS:DX -> opened FCB (see #0486)
  1945. Return: AL = status
  1946.         00h successful, all records read
  1947.         01h end of file, no data read
  1948.         02h segment wrap in DTA, no data read
  1949.         03h end of file, partial read
  1950.     [DTA] = records read from file
  1951.     CX = number of records read (return AL = 00h or 03h)
  1952. Notes:    read begins at current file position as specified in FCB; the file
  1953.       position is updated after reading
  1954.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1955. SeeAlso: AH=21h,AH=28h,AH=3Fh
  1956. --------D-2128-------------------------------
  1957. INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
  1958.     AH = 28h
  1959.     CX = number of records to write
  1960.     DS:DX -> opened FCB (see #0486)
  1961.     [DTA] = records to write
  1962. Return: AL = status
  1963.         00h successful
  1964.         01h disk full or file read-only
  1965.         02h segment wrap in DTA
  1966.     CX = number of records written
  1967. Notes:    write begins at current file position as specified in FCB; the file
  1968.       position is updated after writing
  1969.     if CX = 0000h on entry, no data is written; instead the file size is
  1970.       adjusted to be the same as the file position specified by the random
  1971.       record and record size fields of the FCB
  1972.     if the data to be written is less than a disk sector, it is copied into
  1973.       a DOS disk buffer, to be written out to disk at a later time
  1974.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1975. SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h
  1976. --------D-2129-------------------------------
  1977. INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
  1978.     AH = 29h
  1979.     AL = parsing options (see #0517)
  1980.     DS:SI -> filename string (both '*' and '?' wildcards OK)
  1981.     ES:DI -> buffer for unopened FCB
  1982. Return: AL = result code
  1983.         00h successful parse, no wildcards encountered
  1984.         01h successful parse, wildcards present
  1985.         FFh failed (invalid drive specifier)
  1986.     DS:SI -> first unparsed character
  1987.     ES:DI buffer filled with unopened FCB (see #0486)
  1988. Notes:    asterisks expanded to question marks in the FCB
  1989.     all processing stops when a filename terminator is encountered
  1990.     cannot be used with filespecs which include a path (DOS 2+)
  1991.     Novell NetWare monitors the result code since an 'invalid drive' may
  1992.       signal an attempt to reconnect a network drive; if there are no
  1993.       connections to the specified drive, NetWare attempts to build a
  1994.       connection and map the drive to the SYS:LOGIN directory
  1995. SeeAlso: AH=0Fh,AH=16h,AH=26h
  1996.  
  1997. Bitfields for parsing options:
  1998. Bit(s)    Description    (Table 0517)
  1999.  0    skip leading separators
  2000.  1    use existing drive number in FCB if no drive is specified, instead of
  2001.       setting field to zero
  2002.  2    use existing filename in FCB if no base name is specified, instead of
  2003.       filling field with blanks
  2004.  3    use existing extension in FCB if no extension is specified, instead of
  2005.       filling field with blanks
  2006.  4-7    reserved (0)
  2007. --------D-212A-------------------------------
  2008. INT 21 - DOS 1+ - GET SYSTEM DATE
  2009.     AH = 2Ah
  2010. Return: CX = year (1980-2099)
  2011.     DH = month
  2012.     DL = day
  2013. ---DOS 1.10+---
  2014.     AL = day of week (00h=Sunday)
  2015. SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h,INT 1A/AH=04h,INT 2F/AX=120Dh
  2016. --------D-212B-------------------------------
  2017. INT 21 - DOS 1+ - SET SYSTEM DATE
  2018.     AH = 2Bh
  2019.     CX = year (1980-2099)
  2020.     DH = month
  2021.     DL = day
  2022. Return: AL = status
  2023.         00h successful
  2024.         FFh invalid date, system date unchanged
  2025. Note:    DOS 3.3+ also sets CMOS clock
  2026. SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h
  2027. --------E-212B--CX4149-----------------------
  2028. INT 21 - AI Architects - ??? - INSTALLATION CHECK
  2029.     AH = 2Bh
  2030.     CX = 4149h ('AI')
  2031.     DX = 413Fh ('A?')
  2032. Return: AL <> FFh if installed
  2033. Note:    Borland's TKERNEL makes this call
  2034. --------c-212B--CX4358-----------------------
  2035. INT 21 - Super PC-Kwik v3.20+ - INSTALLATION CHECK
  2036.     AH = 2Bh
  2037.     CX = 4358h ('CX')
  2038. Return: AL = FFh if PC-Kwik/PC-Cache not installed
  2039.     AL = 00h if installed
  2040.         CF clear
  2041.         CX = 6378h ('cx')
  2042.         BX = ???
  2043.         DX = version (DH = major version, DL = binary minor version)
  2044. Note:    PC Tools PC-Cache v5.x and Qualitas Qcache v4.00 are OEM versions of
  2045.       Super PC-Kwik, and thus support this call (PC-Cache 5.1 corresponds
  2046.       to PC-Kwik v3.20)
  2047. SeeAlso: INT 13/AH=A0h,INT 13/AH=B0h,INT 16/AX=FFA5h/CX=1111h
  2048. Index:    PC-Cache;installation check|Qualitas Qcache;installation check
  2049. Index:    installation check;PC-Cache 5.x|installation check;Qualitas Qcache
  2050. --------Q-212B--CX4445-----------------------
  2051. INT 21 - DESQview - INSTALLATION CHECK
  2052.     AH = 2Bh
  2053.     CX = 4445h ('DE')
  2054.     DX = 5351h ('SQ')
  2055.     AL = subfunction (DV v2.00+)
  2056.         01h get version
  2057.         Return: BX = version (BH = major, BL = minor)
  2058.         Note: early copies of v2.00 return 0002h
  2059.         02h get shadow buffer info, and start shadowing
  2060.         Return: BH = rows in shadow buffer
  2061.             BL = columns in shadow buffer
  2062.             DX = segment of shadow buffer
  2063.         04h get shadow buffer info
  2064.         Return: BH = rows in shadow buffer
  2065.             BL = columns in shadow buffer
  2066.             DX = segment of shadow buffer
  2067.         05h stop shadowing
  2068. Return: AL = FFh if DESQview not installed
  2069. Notes:    in DESQview v1.x, there were no subfunctions; this call only identified
  2070.       whether or not DESQview was loaded.  DESQview v2.52 performs function
  2071.       01h for all subfunction requests 0Ch and higher and appears to ignore
  2072.       all lower-numbered functions not listed here.
  2073.     DESQview versions 2.50-2.52 are part of DESQview/X v1.0x; version 2.53
  2074.       is part of DESQview/X v1.10; and version 2.63 is part of DESQview/X
  2075.       v2.00.
  2076. BUG:    subfunction 05h does not appear to work correctly in DESQview 2.52
  2077. SeeAlso: INT 10/AH=FEh,INT 10/AH=FFh,INT 15/AX=1024h,INT 15/AX=DE30h
  2078. --------U-212B--CX454C-----------------------
  2079. INT 21 - ELRES v1.1 - INSTALLATION CHECK
  2080.     AH = 2Bh
  2081.     CX = 454Ch ('EL')
  2082.     DX = 5253h ('RS')
  2083. Return: ES:BX -> ELRES history structure (see #0518)
  2084.     DX = DABEh (signature, DAve BEnnett)
  2085. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  2086.       Bennett which stores recent errorlevel values, allows them to be
  2087.       retrieved for use in batch files, and can place them in an
  2088.       environment variable
  2089. SeeAlso: AH=4Bh"ELRES",AH=4Dh
  2090.  
  2091. Format of ELRES history structure:
  2092. Offset    Size    Description    (Table 0518)
  2093.  00h    WORD    number of return codes which can be stored by following buffer
  2094.  02h    WORD    current position in buffer (treated as a ring)
  2095.  04h  N BYTEs    ELRES buffer
  2096. --------m-212B01CX444D-----------------------
  2097. INT 21 - Quarterdeck DOS-UP.SYS v2.00 - INSTALLATION CHECK
  2098.     AX = 2B01h
  2099.     CX = 444Dh ('DM')
  2100.     DX = 4158h ('AX')
  2101. Return: AX = 0000h if installed
  2102.         BX = version??? (0002h)
  2103.         CX = 4845h ('HE')
  2104.         DX = 5245h ('RE')
  2105.         ES = DOS-UP driver segment
  2106. --------T-212B01CX5441-----------------------
  2107. INT 21 - TAME v2.10+ - INSTALLATION CHECK
  2108.     AX = 2B01h
  2109.     CX = 5441h ('TA')
  2110.     DX = 4D45h ('ME')
  2111. ---v2.60---
  2112.     BH = ???
  2113.         00h skip ???, else do
  2114. Return: AL = 02h if installed
  2115.     ES:DX -> data area in TAME-RES (see #0519,#0523,#0524)
  2116. Program: TAME is a shareware program by David G. Thomas which gives up CPU time
  2117.       to other partitions under a multitasker when the current partition's
  2118.       program incessantly polls the keyboard or system time
  2119.  
  2120. Format of TAME 2.10-2.20 data area:
  2121. Offset    Size    Description    (Table 0519)
  2122.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  2123.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  2124.  02h    DWORD    number of task switches
  2125.  06h    DWORD    number of keyboard polls
  2126.  0Ah    DWORD    number of time polls
  2127.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  2128.  12h    DWORD    original INT 10h
  2129.  16h    DWORD    original INT 14h
  2130.  1Ah    DWORD    original INT 15h
  2131.  1Eh    DWORD    original INT 16h
  2132.  22h    DWORD    original INT 17h
  2133.  26h    DWORD    original INT 21h
  2134.  2Ah    DWORD    original INT 28h
  2135.  2Eh    WORD    offset of TAME INT 10h handler
  2136.  30h    WORD    offset of TAME INT 14h handler
  2137.  32h    WORD    offset of TAME INT 15h handler
  2138.  34h    WORD    offset of TAME INT 16h handler
  2139.  36h    WORD    offset of TAME INT 17h handler
  2140.  38h    WORD    offset of TAME INT 21h handler
  2141.  3Ah    WORD    offset of TAME INT 28h handler
  2142.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  2143.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  2144.  40h    WORD    number of polls remaining before next task switch
  2145.  42h    WORD    /KEYIDLE value
  2146.  44h    BYTE    interrupts already grabbed by TAME (see #0520)
  2147.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  2148.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  2149.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  2150.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  2151.  49h    BYTE    window or task number for this task
  2152.  4Ah    BYTE    multitasker type (see #0521)
  2153.  4Bh    BYTE    type of task switching selected
  2154.         bit 0: DESQview???
  2155.         bit 1: DoubleDOS???
  2156.         bit 2: TopView???
  2157.         bit 3: KeySwitch
  2158.         bit 4: HLT instruction
  2159.  4Ch    BYTE    ???
  2160.  4Dh    BYTE    flags
  2161.         bit 1: /FREQ instead of /MAX
  2162.  4Eh    BYTE    /FG: value
  2163.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  2164.  50h    BYTE    ???
  2165.  
  2166. Bitfields for interrupts already grabbed by TAME:
  2167. Bit(s)    Description    (Table 0520)
  2168.  0    INT 10h
  2169.  1    INT 14h
  2170.  2    INT 15h
  2171.  3    INT 16h
  2172.  4    INT 17h
  2173.  5    INT 21h
  2174.  6    INT 28h
  2175.  
  2176. (Table 0521)
  2177. Values for multitasker type:
  2178.  01h    DESQview
  2179.  02h    DoubleDOS
  2180.  03h    TopView
  2181.  04h    OmniView
  2182.  05h    VM/386
  2183.  
  2184. Bitfields for type of task switching selected:
  2185. Bit(s)    Description    (Table 0522)
  2186.  0    DESQview
  2187.  1    DoubleDOS
  2188.  2    TopView
  2189.  3    OmniView
  2190.  4    KeySwitch
  2191.  5    HLT instruction
  2192.  
  2193. Format of TAME 2.30 data area:
  2194. Offset    Size    Description    (Table 0523)
  2195.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  2196.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  2197.  02h    DWORD    number of task switches
  2198.  06h    DWORD    number of keyboard polls
  2199.  0Ah    DWORD    number of time polls
  2200.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  2201.  12h    DWORD    time of last /CLEAR or TAME-RES load
  2202.  16h    DWORD    time yielded
  2203.  1Ah    DWORD    time spent polling
  2204.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  2205.  22h    DWORD    original INT 10h
  2206.  26h    DWORD    original INT 14h
  2207.  2Ah    DWORD    original INT 15h
  2208.  2Eh    DWORD    original INT 16h
  2209.  32h    DWORD    original INT 17h
  2210.  36h    DWORD    original INT 21h
  2211.  3Ah    DWORD    original INT 28h
  2212.  3Eh    WORD    offset of TAME INT 10h handler
  2213.  40h    WORD    offset of TAME INT 14h handler
  2214.  42h    WORD    offset of TAME INT 15h handler
  2215.  44h    WORD    offset of TAME INT 16h handler
  2216.  46h    WORD    offset of TAME INT 17h handler
  2217.  48h    WORD    offset of TAME INT 21h handler
  2218.  4Ah    WORD    offset of TAME INT 28h handler
  2219.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  2220.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  2221.  50h    WORD    number of polls remaining before next task switch
  2222.  52h    WORD    /KEYIDLE value
  2223.  54h    WORD    /FG: value
  2224.  56h    WORD    task switches left until next FGONLY DESQview API call
  2225.  58h    WORD    multitasker version
  2226.  5Ah    WORD    virtual screen segment
  2227.  5Ch    BYTE    interrupts already grabbed by TAME (see #0520)
  2228.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  2229.  5Eh    BYTE    window or task number for this task
  2230.  5Fh    BYTE    multitasker type (see #0521)
  2231.  60h    BYTE    type of task switching selected (bit flags) (see #0522)
  2232.  61h    BYTE    watch_DOS
  2233.  62h    BYTE    bit flags
  2234.         bit 0: TAME enabled
  2235.         bit 1: /FREQ instead of /MAX (counts in 3Ch and 3Eh per tick)
  2236.         bit 2: /TIMEPOLL
  2237.         bit 3: /KEYPOLL
  2238.         bit 4: inhibit timer
  2239.         bit 5: enable status monitoring
  2240.  63h    BYTE    old status
  2241.  64h    WORD    signature DA34h
  2242.  
  2243. Format of TAME 2.60 data area:
  2244. Offset    Size    Description    (Table 0524)
  2245.  00h    BYTE    data structure minor version number (02h in TAME 2.60)
  2246.  01h    BYTE    data structure major version number (0Bh in TAME 2.60)
  2247.  02h    DWORD    number of task switches
  2248.  06h    DWORD    number of keyboard polls
  2249.  0Ah    DWORD    number of time polls
  2250.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  2251.  12h    DWORD    time of last /CLEAR or TAME-RES load
  2252.  16h    DWORD    time yielded
  2253.  1Ah    DWORD    time spent polling
  2254.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  2255.  22h  4 BYTEs    ???
  2256.  26h    DWORD    original INT 10h
  2257.  2Ah    DWORD    original INT 14h
  2258.  2Eh    DWORD    original INT 15h
  2259.  32h    DWORD    original INT 16h
  2260.  36h    DWORD    original INT 17h
  2261.  3Ah    DWORD    original INT 21h
  2262.  3Eh    DWORD    original INT 28h
  2263.  42h    WORD    offset of TAME INT 10h handler
  2264.  44h    WORD    offset of TAME INT 14h handler
  2265.  46h    WORD    offset of TAME INT 15h handler
  2266.  48h    WORD    offset of TAME INT 16h handler
  2267.  4Ah    WORD    offset of TAME INT 17h handler
  2268.  4Ch    WORD    offset of TAME INT 21h handler
  2269.  4Eh    WORD    offset of TAME INT 28h handler
  2270.  50h    WORD    X in /max:X,Y or /freq:X,Y
  2271.  52h    WORD    Y in /max:X,Y or /freq:X,Y
  2272.  54h    WORD    number of polls remaining before next task switch
  2273.  56h    WORD    /KEYIDLE value
  2274.  58h  4 BYTEs    ???
  2275.  5Ch    WORD    X in /boost:X,Y
  2276.  5Eh    WORD    Y in /boost:X,Y
  2277.  60h    WORD    /FG: value
  2278.  62h    WORD    task switches remaining until next FGONLY DESQview API call
  2279.  64h    WORD    multitasker version ???
  2280.  66h    WORD    virtual screen segment
  2281.  68h    BYTE    interrupts already grabbed by TAME (see #0520)
  2282.  69h    BYTE    flags for interrupts which may be acted on (same bits as above)
  2283.  6Ah    BYTE    window or task number for this task
  2284.  6Bh    BYTE    multitasker type (see #0521)
  2285.  6Ch    BYTE    type of task switching selected (bit flags) (see #0522)
  2286.  6Dh    BYTE    watch_DOS
  2287.  6Eh    BYTE    bit flags
  2288.         bit 0: TAME enabled
  2289.         bit 1: /FREQ instead of /MAX (counts in 50h and 52h per tick)
  2290.         bit 2: /TIMEPOLL
  2291.         bit 3: /KEYPOLL
  2292.         bit 4: inhibit timer
  2293.         bit 5: enable status monitoring
  2294.  6Fh    BYTE    old status
  2295.  70h    WORD    signature DA34h
  2296. --------v-212B16CX0643-----------------------
  2297. INT 21 - VIRUS - "Maltese Amoeba" - INSTALLATION CHECK
  2298.     AX = 2B16h
  2299.     CX = 0643h
  2300. Return: AX = 1603h if installed
  2301. --------R-212B44BX4D41-----------------------
  2302. INT 21 - pcANYWHERE IV/LAN - INSTALLATION CHECK
  2303.     AX = 2B44h ('D')
  2304.     BX = 4D41h ('MA')
  2305.     CX = 7063h ('pc')
  2306.     DX = 4157h ('AW')
  2307. Return: AX = resident program
  2308.         4F4Bh ('OK') if large host resident
  2309.         6F6Bh ('ok') if small host resident
  2310.     CX:DX -> API entry point (see #0525)
  2311. SeeAlso: INT 16/AH=79h
  2312.  
  2313. (Table 0525)
  2314. Call pcANYWHERE API entry point with:
  2315.     AX = 0000h get pcANYWHERE IV version
  2316.         DS:SI -> BYTE buffer for host type code
  2317.         Return: AH = version number
  2318.             AL = revision number
  2319.             DS:DI buffer byte filled with
  2320.             00h full-featured host
  2321.             01h limited-feature LAN host
  2322.             other API may not be supported
  2323.     AX = 0001h initialize operation
  2324.         DS:SI -> initialization request structure (see #0526)
  2325.         Return: AX = function status (see #0529)
  2326.     AX = 0002h get status
  2327.         Return: AH = current operating mode (see init req structure below)
  2328.             AL = current connection status (see #0528)
  2329.     AX = 0003h suspend remote screen updates
  2330.         Return: AX = function status (see #0529)
  2331.     AX = 0004h resume screen updates
  2332.         Return: AX = function status (see #0529)
  2333.     AX = 0005h end current remote access session
  2334.         DS:SI -> termination request structure (see #0527)
  2335.         Return: AX = function status (see #0529)
  2336.     AX = 0006h remove pcANYWHERE IV from memory
  2337.         Return: AX = status (see #0529)
  2338.     AX = 8000h read data from communications channel
  2339.         DS:BX -> buffer
  2340.         CX = buffer size
  2341.         Return: AX >= number of characters read/available
  2342.             AX < 0 on error
  2343.     AX = 8001h write data to communications channel
  2344.         DS:BX -> buffer
  2345.         CX = buffer size
  2346.         Return: AX >= number of characters written
  2347.             AX < 0 on error
  2348.     AX = 8002h get connection status
  2349.         Return: AX = status
  2350.             > 0000h if connection active
  2351.             = 0000h if connection lost
  2352.             < 0000h on error
  2353.  
  2354. Format of pcANYWHERE initialization request structure:
  2355. Offset    Size    Description    (Table 0526)
  2356.  00h    BYTE    operating mode
  2357.         00h wait for a call
  2358.         01h hot key activates
  2359.         02h incoming call activates
  2360.         03h initiate a call
  2361.  01h  3 BYTEs    user ID to append to config file names
  2362.  04h    WORD    DS-relative pointer to path for config files
  2363.  06h    WORD    DS-relative pointer to path for program files
  2364.  
  2365. Format of pcANYWHERE termination request structure:
  2366. Offset    Size    Description    (Table 0527)
  2367.  00h    BYTE    operating mode after termination
  2368.         00h wait for a call
  2369.         01h hot key activates
  2370.         02h incoming call activates
  2371.         80h use current mode
  2372.         FFh remove from memory
  2373.  
  2374. Bitfields for current connection status:
  2375. Bit(s)    Description    (Table 0528)
  2376.  0    a physical connection is active
  2377.  1    remove screen updating is active
  2378.  2    connection checking is active
  2379.  3    hot key detection is active
  2380.  4    background file transfer is active
  2381.  
  2382. (Table 0529)
  2383. Values for pcANYWHERE function status:
  2384.  0000h    function completed successfully
  2385.  FFD1h    unable to release interrupt vectors
  2386.  FFD2h    unable to release allocated memory
  2387.  FFF2h    unable to establish a connection when operating mode is
  2388.       "Initiate a call"
  2389.  FFF3h    modem configuration is invalid (corrupt config)
  2390.  FFF4h    modem initialization failed (no modem response)
  2391.  FFF5h    the communications device could not be initialized
  2392.  FFF6h    the host operator aborted the function
  2393.  FFF7h    the communications driver type specified in the configuration file is
  2394.       different than the one loaded when pcANYWHERE IV was started
  2395.  FFF9h    the configuration file is invalid
  2396.  FFFAh    the configuration file could not be found
  2397.  FFFBh    no session is active
  2398.  FFFCh    a remote access session is active
  2399.  FFFDh    the specified operating mode is invalid
  2400. ----------212B--CX6269-----------------------
  2401. INT 21 - WDTSR.COM - INSTALLATION CHECK
  2402.     AH = 2Bh
  2403.     CX = 6269h ('bi')
  2404.     DX = 742Dh ('t-')
  2405. Return: AL = FFh if not installed
  2406.     AL = 77h ('w') if WDTSR is installed
  2407.         CX = 6174h ('at')
  2408.         DX = 6368h ('ch')
  2409.         ES = resident code segment
  2410.         ES:DI -> identification and configuration data
  2411. Program: WDTSR is a driver for the bitWatch watchdog hardware by bit-design
  2412.       GmbH
  2413. SeeAlso: AH=2Bh/CX=6269h/DX=7449h,INT 14/AH=14h"FOSSIL",INT 15/AH=C3h
  2414. --------S-212B--CX6269-----------------------
  2415. INT 21 - bitFOSS - INSTALLATION CHECK
  2416.     AH = 2Bh
  2417.     CX = 6269h ('bi')
  2418.     DX = 7446h ('tF')
  2419. Return: AL = FFh if not installed
  2420.     AL = 4Fh ('O') if bitFOSS is installed
  2421.         CX = 5353h ('SS')
  2422.         DX = 494Ch ('IL')
  2423.         ES = resident code segment
  2424.         ES:DI -> identification data
  2425. Program: bitFOSS is a revision 5 FOSSIL driver
  2426. SeeAlso: AH=2Bh/CX=6269h/DX=7449h,INT 11/AH=BCh
  2427. --------S-212B--CX6269-----------------------
  2428. INT 21 - bitFOSSI - INSTALLATION CHECK
  2429.     AH = 2Bh
  2430.     CX = 6269h ('bi')
  2431.     DX = 7449h ('tI')
  2432. Return: AL = FFh if not installed
  2433.     AL = 53h ('S') if bitFOSSI is installed
  2434.         CX = 444Eh ('DN')
  2435.         DX = 2D46h ('-F')
  2436.         ES = resident code segment
  2437.         ES:DI -> identification data
  2438. Program: bitFOSSI is a revision 5 FOSSIL driver for ???'s ISDN board
  2439. SeeAlso: AH=2Bh/CX=6269h/DX=7446h,INT 11/AH=BCh
  2440. --------D-212C-------------------------------
  2441. INT 21 - DOS 1+ - GET SYSTEM TIME
  2442.     AH = 2Ch
  2443. Return: CH = hour
  2444.     CL = minute
  2445.     DH = second
  2446.     DL = 1/100 seconds
  2447. Note:    on most systems, the resolution of the system clock is about 5/100sec,
  2448.       so returned times generally do not increment by 1
  2449.     on some systems, DL may always return 00h
  2450. SeeAlso: AH=2Ah,AH=2Dh,AH=E7h,INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
  2451. SeeAlso: INT 2F/AX=120Dh
  2452. --------v-212C00CX534B-----------------------
  2453. INT 21 - SKUDO - INSTALLATION CHECK
  2454.     AX = 2C00h
  2455.     CX = 534Bh ('SK')
  2456.     DX = 5544h ('UD')
  2457.     BX = 4F21h ('O!')
  2458. Return: AX = 5349h ('SI') if installed
  2459.         CH = version number
  2460.         CL = subversion
  2461. Program: SKUDO is an antivirus TSR by Jordi Mas
  2462. --------D-212D-------------------------------
  2463. INT 21 - DOS 1+ - SET SYSTEM TIME
  2464.     AH = 2Dh
  2465.     CH = hour
  2466.     CL = minute
  2467.     DH = second
  2468.     DL = 1/100 seconds
  2469. Return: AL = result
  2470.         00h successful
  2471.         FFh invalid time, system time unchanged
  2472. Note:    DOS 3.3+ also sets CMOS clock
  2473. SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"
  2474. --------T-212D01CX7820-----------------------
  2475. INT 21 - PC-Mix - INSTALLATION CHECK
  2476.     AX = 2D01h
  2477.     CX = 7820h ('X ')
  2478.     DX = 6D69h ('MI')
  2479. Return: AL = 00h if installed
  2480. --------D-212E--DL00-------------------------
  2481. INT 21 - DOS 1+ - SET VERIFY FLAG
  2482.     AH = 2Eh
  2483.     DL = 00h (DOS 1.x/2.x only)
  2484.     AL = new state of verify flag
  2485.         00h off
  2486.         01h on
  2487. Notes:    default state at system boot is OFF
  2488.     when ON, all disk writes are verified provided the device driver
  2489.       supports read-after-write verification
  2490. SeeAlso: AH=54h
  2491. --------D-212F-------------------------------
  2492. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  2493.     AH = 2Fh
  2494. Return: ES:BX -> current DTA
  2495. Note:    under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
  2496. SeeAlso: AH=1Ah
  2497. --------D-2130-------------------------------
  2498. INT 21 - DOS 2+ - GET DOS VERSION
  2499.     AH = 30h
  2500. ---DOS 5+ ---
  2501.     AL = what to return in BH
  2502.         00h OEM number (as for DOS 2.0-4.0x)
  2503.         01h version flag
  2504. Return: AL = major version number (00h if DOS 1.x)
  2505.     AH = minor version number
  2506.     BL:CX = 24-bit user serial number (most versions do not use this)
  2507. ---if DOS <5 or AL=00h---
  2508.     BH = MS-DOS OEM number (see #0530)
  2509. ---if DOS 5+ and AL=01h---
  2510.     BH = version flag
  2511.         bit 3: DOS is in ROM
  2512.         other: reserved (0)
  2513. Notes:    the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
  2514.     the OS/2 v2.x Compatibility Box returns major version 14h (20)
  2515.     the Windows/NT DOS box returns version 5.00, subject to SETVER
  2516.     DOS 4.01 and 4.02 identify themselves as version 4.00; use
  2517.       INT 21/AH=87h to distinguish between the original European MS-DOS 4.0
  2518.       and the later PC-DOS 4.0x and MS-DOS 4.0x
  2519.     IBM DOS 6.1 reports its version as 6.00; use the OEM number to
  2520.       distinguish between MS-DOS 6.00 and IBM DOS 6.1 (there was never an
  2521.       IBM DOS 6.0)
  2522.     DR-DOS 5.0 and 6.0 report version 3.31; Novell DOS 7 reports v6.00.
  2523.     generic MS-DOS 3.30, Compaq MS-DOS 3.31, and others identify themselves
  2524.       as PC-DOS by returning OEM number 00h
  2525.     the version returned under DOS 4.0x may be modified by entries in
  2526.       the special program list (see #0778 at AH=52h); the version returned
  2527.       under DOS 5+ may be modified by SETVER--use AX=3306h to get the true
  2528.       version number
  2529. SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
  2530. SeeAlso: INT 2F/AX=122Fh,INT 2F/AX=E002h
  2531.  
  2532. (Table 0530)
  2533. Values for DOS OEM number:
  2534.  00h    IBM
  2535.  01h    Compaq
  2536.  02h    MS Packaged Product
  2537.  04h    AT&T
  2538.  05h    Zenith
  2539.  06h    Hewlett-Packard
  2540.  0Dh    Packard-Bell
  2541.  16h    DEC
  2542.  23h    Olivetti
  2543.  29h    Toshiba
  2544.  33h    Novell (Windows/386 device IDs only)
  2545.  34h    MS Multimedia Systems (Windows/386 device IDs only)
  2546.  35h    MS Multimedia Systems (Windows/386 device IDs only)
  2547.  4Dh    Hewlett-Packard
  2548.  66h    PhysTechSoft (PTS-DOS)
  2549.  99h    General Software's Embedded DOS
  2550.  EEh    DR-DOS
  2551.  EFh    Novell DOS
  2552.  FFh    Microsoft, Phoenix
  2553. --------E-2130-------------------------------
  2554. INT 21 - Phar Lap 386/DOS-Extender, Intel Code Builder - INSTALLATION CHECK
  2555.     AH = 30h
  2556.     EAX = 00003000h
  2557.     EBX = 50484152h ("PHAR")
  2558. Return: AL = major DOS version
  2559.     AH = minor DOS version
  2560.     EAX bits 31-16 = 4458h ('DX') if 386/DOS-extender installed
  2561.         BL = ASCII major version number
  2562.     EAX bits 31-16 = 4243h ('BC') if Intel Code Builder installed
  2563.         EDX = address of GDA
  2564. SeeAlso: AX=2501h,AX=FF00h,INT 2F/AX=F100h
  2565. --------v-2130--DXABCD-----------------------
  2566. INT 21 - VIRUS - "Possessed" - INSTALLATION CHECK
  2567.     AH = 30h
  2568.     DX = ABCDh
  2569. Return: DX = DCBAh if installed
  2570. SeeAlso: AX=0D20h,AX=30F1h
  2571. --------T-213000BX1234-----------------------
  2572. INT 21 - CTask 2.0+ - INSTALLATION CHECK
  2573.     AX = 3000h
  2574.     BX = 1234h
  2575.     DS:DX -> 8-byte version string (DX < FFF0h) "CTask21",00h for v2.1-2.2
  2576. Return: AL = DOS major version
  2577.     AH = DOS minor version
  2578.     CX:BX -> Ctask global data block
  2579. Program: CTask is a multitasking kernel for C written by Thomas Wagner
  2580. Note:    if first eight bytes of returned data block equal eight bytes passed
  2581.       in, CTask is resident
  2582. --------O-213000BX3000-----------------------
  2583. INT 21 - PC-MOS/386 v3.0 - INSTALLATION CHECK/GET VERSION
  2584.     AX = 3000h
  2585.     BX = 3000h
  2586.     CX = DX = 3000h
  2587. Return: AX = PC-MOS version
  2588. Program: PC-MOS/386 is a multitasking/multiuser MS-DOS-compatible operating
  2589.       system by The Software Link, Inc.
  2590. SeeAlso: AH=30h,INT 38/AH=02h,INT 38/AH=10h
  2591. --------G-213022-----------------------------
  2592. INT 21 - StopPrg v2.0 - INSTALLATION CHECK
  2593.     AX = 3022h
  2594. Return: AX = DOS version (see AH=30h)
  2595.     CX = 1112h if StopPrg installed
  2596.         BX = segment of resident code
  2597. Program: StopPrg is a resident program aborter by MAK-TRAXON's Prophet
  2598. Note:    StopPrg may be temporarily disabled by storing 9090h in the word at
  2599.       0000h:04FEh
  2600. --------v-2130F1-----------------------------
  2601. INT 21 - VIRUS - "Dutch-555"/"Quit 1992" - INSTALLATION CHECK
  2602.     AX = 30F1h
  2603. Return: AL = 00h if resident
  2604. SeeAlso: AH=30h/DX=ABCDh,AX=330Fh
  2605. ----------2130FFCX4445-----------------------
  2606. INT 21 - DESQ??? - INSTALLATION CHECK
  2607.     AX = 30FFh
  2608.     CX = 4445h ("DE")
  2609.     DX = 5351h ("SQ")
  2610. Return: BH = 05h if installed
  2611.     ???
  2612. Note:    called by DUBLDISK.COM v2.6; this function is not supported by
  2613.       DESQview, so it may be for DESQview's precursor DESQ.
  2614. SeeAlso: AX=4404h"DUBLDISK"
  2615. --------D-2131-------------------------------
  2616. INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
  2617.     AH = 31h
  2618.     AL = return code
  2619.     DX = number of paragraphs to keep resident
  2620. Return: never
  2621. Notes:    the value in DX only affects the memory block containing the PSP;
  2622.       additional memory allocated via AH=48h is not affected
  2623.     the minimum number of paragraphs which will remain resident is 11h
  2624.       for DOS 2.x and 06h for DOS 3+
  2625.     most TSRs can save some memory by releasing their environment block
  2626.       before terminating (see #0515 at AH=26h,AH=49h)
  2627. SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27
  2628. --------D-2132-------------------------------
  2629. INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
  2630.     AH = 32h
  2631.     DL = drive number (00h = default, 01h = A:, etc)
  2632. Return: AL = status
  2633.         00h successful
  2634.         DS:BX -> Drive Parameter Block (DPB) (see #0531) for specified
  2635.               drive
  2636.         FFh invalid or network drive
  2637. Notes:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  2638.       except for the DWORD at offset 12h
  2639.     this call updates the DPB by reading the disk; the DPB may be accessed
  2640.       via the DOS list of lists (see #0743 at AH=52h) if disk access is not
  2641.       desirable.
  2642.     undocumented prior to the release of DOS 5.0; only the DOS 4+ version
  2643.       of the DPB has been documented, however
  2644.     supported by DR-DOS 3.41+; DR-DOS 3.41-6.0 return the same data as
  2645.       MS-DOS 3.31
  2646. SeeAlso: AH=1Fh,AH=52h
  2647.  
  2648. Format of DOS Drive Parameter Block:
  2649. Offset    Size    Description    (Table 0531)
  2650.  00h    BYTE    drive number (00h = A:, 01h = B:, etc)
  2651.  01h    BYTE    unit number within device driver
  2652.  02h    WORD    bytes per sector
  2653.  04h    BYTE    highest sector number within a cluster
  2654.  05h    BYTE    shift count to convert clusters into sectors
  2655.  06h    WORD    number of reserved sectors at beginning of drive
  2656.  08h    BYTE    number of FATs
  2657.  09h    WORD    number of root directory entries
  2658.  0Bh    WORD    number of first sector containing user data
  2659.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  2660.         16-bit FAT if greater than 0FF6h, else 12-bit FAT
  2661.  0Fh    BYTE    number of sectors per FAT
  2662.  10h    WORD    sector number of first directory sector
  2663.  12h    DWORD    address of device driver header
  2664.  16h    BYTE    media ID byte
  2665.  17h    BYTE    00h if disk accessed, FFh if not
  2666.  18h    DWORD    pointer to next DPB
  2667. ---DOS 2.x---
  2668.  1Ch    WORD    cluster containing start of current directory, 0000h=root,
  2669.         FFFFh = unknown
  2670.  1Eh 64 BYTEs    ASCIZ pathname of current directory for drive
  2671. ---DOS 3.x---
  2672.  1Ch    WORD    cluster at which to start search for free space when writing
  2673.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  2674. ---DOS 4.0-6.0---
  2675.  0Fh    WORD    number of sectors per FAT
  2676.  11h    WORD    sector number of first directory sector
  2677.  13h    DWORD    address of device driver header
  2678.  17h    BYTE    media ID byte
  2679.  18h    BYTE    00h if disk accessed, FFh if not
  2680.  19h    DWORD    pointer to next DPB
  2681.  1Dh    WORD    cluster at which to start search for free space when writing,
  2682.         usually the last cluster allocated
  2683.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  2684. SeeAlso: #0779
  2685. --------D-2133-------------------------------
  2686. INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
  2687.     AH = 33h
  2688.     AL = subfunction
  2689.         00h get current extended break state
  2690.         Return: DL = current state, 00h = off, 01h = on
  2691.         01h set state of extended ^C/^Break checking
  2692.         DL = new state
  2693.             00h off, check only on character I/O functions
  2694.             01h on, check on all DOS functions
  2695.         Return: (Novell DOS 7) DL = old state of extended Break checks
  2696. Note:    under DOS 3.1+ and DR-DOS, this function does not use any of the
  2697.       DOS-internal stacks and may thus be called at any time
  2698. SeeAlso: AX=3302h
  2699. --------D-213302-----------------------------
  2700. INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  2701.     AX = 3302h
  2702.     DL = new state (00h for OFF, 01h for ON)
  2703. Return: DL = old state of extended BREAK checking
  2704. Notes:    this function does not use any of the DOS-internal stacks and may thus
  2705.       be called at any time; one possible use is modifying Control-Break
  2706.       checking from within an interrupt handler or TSR
  2707.     not supported by DR-DOS through version 6.0; newly-supported by
  2708.       Novell DOS 7
  2709. SeeAlso: AH=33h
  2710. --------D-213303-----------------------------
  2711. INT 21 - DOS 4+ - UNUSED
  2712.     AX = 3303h
  2713. Return: nothing
  2714. Note:    this function and AX=3304h were apparently intended to support a
  2715.       code-page switching flag for OS/2 compatibility (OS/2 allows a file
  2716.       to have a code page as an attribute); however, this function has
  2717.       always been a NOP in public releases of DOS.    See _DOS_Internals_
  2718.       Chapter 2 for more information
  2719. SeeAlso: AX=3304h
  2720. --------D-213304-----------------------------
  2721. INT 21 - DOS 4+ - UNUSED
  2722.     AX = 3304h
  2723. Return: nothing
  2724. Note:    this function and AX=3303h were apparently intended to support a
  2725.       code-page switching flag for OS/2 compatibility (OS/2 allows a file
  2726.       to have a code page as an attribute); however, this function has
  2727.       always been a NOP in public releases of DOS.    See _DOS_Internals_
  2728.       Chapter 2 for more information
  2729. SeeAlso: AX=3303h
  2730. --------D-213305-----------------------------
  2731. INT 21 - DOS 4+ - GET BOOT DRIVE
  2732.     AX = 3305h
  2733. Return: DL = boot drive (1=A:,...)
  2734. Notes:    fully reentrant
  2735.     NEC 9800-series PCs always call the boot drive A: and assign the other
  2736.       drive letters sequentially to the other drives in the system
  2737. --------D-213306-----------------------------
  2738. INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
  2739.     AX = 3306h
  2740. Return: BL = major version
  2741.     BH = minor version
  2742.     DL = revision (bits 2-0, all others 0)
  2743.     DH = version flags
  2744.         bit 3: DOS is in ROM
  2745.         bit 4: DOS is in HMA
  2746.     AL = FFh if true DOS version < 5.0
  2747. Notes:    this function always returns the true version number, unlike AH=30h,
  2748.       whose return value may be changed with SETVER
  2749.     because of the conflict from the CBIS PowerLAN redirector (see next
  2750.       entry), programs should check whether BH is less than 100 (64h)
  2751.       and BL is at least 5 before accepting the returned BX as the true
  2752.       version number; however, even this is not entirely reliable when
  2753.       that redirector is loaded
  2754.     fully reentrant
  2755.     OS/2 v2.1 will return BX=0A14h (version 20.10)
  2756.     the Windows NT DOS box returns BX=3205h (version 5.50)
  2757.     Novell DOS 7 returns version 6.00
  2758. BUG:    DR-DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
  2759.       subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
  2760.       for invalid subfunctions
  2761. SeeAlso: AH=30h,INT 2F/AX=122Fh
  2762. --------N-213306-----------------------------
  2763. INT 21 - CBIS POWERLAN - NETWORK REDIRECTOR - ???
  2764.     AX = 3306h
  2765. Return: AX = 3306h
  2766.     BL = ??? (usually 00h)
  2767.     BH = ??? (usually 00h or FFh)
  2768. Note:    unknown function, is in conflict with DOS 5+ version call
  2769. SeeAlso: AX=3306h"DOS"
  2770. --------v-21330F-----------------------------
  2771. INT 21 - VIRUS - "Burghofer" - INSTALLATION CHECK
  2772.     AX = 330Fh
  2773. Return: AL = 0Fh if resident (DOS returns AL=FFh)
  2774. SeeAlso: AX=30F1h,AX=33E0h
  2775. --------k-213341-----------------------------
  2776. INT 21 - Diet Disk v1.0 - INSTALLATION CHECK
  2777.     AX = 3341h
  2778. Return: DX = 1234h if installed
  2779.         CX = resident code segment
  2780. Program: Diet Disk is a public domain transparent data file compressor by
  2781.       Barry Nance
  2782. --------v-2133E0-----------------------------
  2783. INT 21 - VIRUS - "Oropax" - INSTALLATION CHECK
  2784.     AX = 33E0h
  2785. Return: AL = E0h if resident (DOS returns AL=FFh)
  2786. SeeAlso: AX=330Fh,AX=357Fh
  2787. --------D-2134-------------------------------
  2788. INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
  2789.     AH = 34h
  2790. Return: ES:BX -> one-byte InDOS flag
  2791. Notes:    this function executes on the DOS stack, and thus cannot be called
  2792.       while another DOS function is already executing; you should use
  2793.       this function once at the beginning of the program and store the
  2794.       returned pointer rather than calling it when requiring DOS access
  2795.     the value of InDOS is incremented whenever an INT 21 function begins
  2796.       and decremented whenever one completes
  2797.     during an INT 28 call, it is safe to call some INT 21 functions even
  2798.       though InDOS may be 01h instead of zero
  2799.     InDOS alone is not sufficient for determining when it is safe to
  2800.       enter DOS, as the critical error handling decrements InDOS and
  2801.       increments the critical error flag for the duration of the critical
  2802.       error.  Thus, it is possible for InDOS to be zero even if DOS is
  2803.       busy.
  2804.     SMARTDRV 4.0 sets the InDOS flag while flushing its buffers to disk,
  2805.       then zeros it on completion
  2806.     the critical error flag is the byte immediately following InDOS in
  2807.       DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3+ and
  2808.       DR-DOS 3.41+ (except COMPAQ DOS 3.0, where the critical error flag
  2809.       is located 1AAh bytes BEFORE the critical section flag)
  2810.     for DOS 3.1+, an undocumented call exists to get the address of the
  2811.       critical error flag (see AX=5D06h)
  2812.     this function was undocumented prior to the release of DOS 5.0.
  2813. SeeAlso: AX=5D06h,AX=5D0Bh,INT 15/AX=DE1Fh,INT 28
  2814. --------D-2135-------------------------------
  2815. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  2816.     AH = 35h
  2817.     AL = interrupt number
  2818. Return: ES:BX -> current interrupt handler
  2819. Note:    under DR-DOS 5.0+, this function does not use any of the DOS-internal
  2820.       stacks and may thus be called at any time
  2821. SeeAlso: AH=25h,AX=2503h
  2822. --------E-213501-----------------------------
  2823. INT 21 P - FlashTek X-32VM - ALLOCATE PROTECTED-MODE SELECTOR
  2824.     AX = 3501h
  2825. Return: CF clear if successful
  2826.         BX = new selector
  2827.     CF set on error (no more selectors available)
  2828. Note:    the new selector will be an expand-up read/write data selector with
  2829.       undefined base and limit
  2830. SeeAlso: AX=3502h,INT 31/AX=0000h
  2831. --------E-213502-----------------------------
  2832. INT 21 P - FlashTek X-32VM - DEALLOCATE PROTECTED-MODE SELECTOR
  2833.     AX = 3502h
  2834.     BX = selector
  2835. Return: CF clear if successful
  2836.     CF set on error (invalid selector)
  2837. Note:    only selectors allocated via AX=3501h should be deallocated
  2838. SeeAlso: AX=3501h,INT 31/AX=0001h
  2839. --------E-213503-----------------------------
  2840. INT 21 P - FlashTek X-32VM - SET SELECTOR BASE ADDRESS
  2841.     AX = 3503h
  2842.     BX = selector
  2843.     ECX = base address
  2844. Return: CF clear if successful
  2845.     CF set on error (invalid selector)
  2846. SeeAlso: AX=3504h,AX=3505h,INT 31/AX=0007h
  2847. --------E-213504-----------------------------
  2848. INT 21 P - FlashTek X-32VM - GET SELECTOR BASE ADDRESS
  2849.     AX = 3504h
  2850.     BX = selector
  2851. Return: CF clear if successful
  2852.         ECX = absolute base address of selector
  2853.     CF set on error (invalid selector)
  2854. SeeAlso: AX=3503h,INT 31/AX=0006h
  2855. --------E-213505-----------------------------
  2856. INT 21 P - FlashTek X-32VM - SET SELECTOR LIMIT
  2857.     AX = 3505h
  2858.     BX = selector
  2859.     ECX = desired limit
  2860. Return: CF clear if successful
  2861.         ECX = actual limit set
  2862.     CF set on error (no more selectors available)
  2863. Note:    the limit will be rounded down to nearest 4K boundary if the requested
  2864.       limit is greater than 1MB
  2865. SeeAlso: AX=3503h,INT 31/AX=0008h
  2866. --------E-21350A-----------------------------
  2867. INT 21 P - FlashTek X-32VM - PHYSICAL ADDRESS MAPPING
  2868.     AX = 350Ah
  2869.     EBX = absolute physical address
  2870.     ECX = size in bytes of area to map
  2871. Return: CF clear if successful
  2872.     CF set on error (insufficient memory or service refused by DPMI host)
  2873. Notes:    should not make repeated calls for the same physical address
  2874.     there is no provision for unmapping memory
  2875. --------E-21350B-----------------------------
  2876. INT 21 P - FlashTek X-32VM - UPDATE AND RETURN AVAILABLE FREE MEMORY
  2877.     AX = 350Bh
  2878.     DS = default selector for DS
  2879. Return: CF clear
  2880.     EAX = maximum amount of memory which can be allocated via AX=350Ch
  2881. SeeAlso: AX=350Ch
  2882. --------E-21350C-----------------------------
  2883. INT 21 P - FlashTek X-32VM - ALLOCATE A BLOCK OF MEMORY
  2884.     AX = 350Ch
  2885.     ECX = size of block in bytes
  2886.     DS = default DS
  2887. Return: CF clear if successful
  2888.         EAX = near pointer to new block
  2889.         EDX = new lowest legal value for stack
  2890.     CF set on error (requested size not multiple of 4K)
  2891. SeeAlso: AX=350Bh,AX=350Dh
  2892. --------E-21350D-----------------------------
  2893. INT 21 P - FlashTek X-32VM - RESERVE BLOCK OF MEMORY FOR 32-BIT STACK
  2894.     AX = 350Dh
  2895.     EBX = current ESP value
  2896.     ECX = size of block in bytes
  2897.     DS = default DS
  2898. Return: CF clear if successful
  2899.         EBX = new value for ESP
  2900.         EDX = suggested new limit for SS
  2901.     CF set on error
  2902. Note:    this function should only be called once during initialization
  2903. SeeAlso: AX=350Bh,AX=350Ch
  2904. --------v-21357F-----------------------------
  2905. INT 21 - VIRUS - "Agiplan"/"Month 4-6" - INSTALLATION CHECK
  2906.     AX = 357Fh
  2907. Return: DX = FFFFh if installed
  2908. SeeAlso: AX=33E0h,AX=3DFFh
  2909. --------D-2136-------------------------------
  2910. INT 21 - DOS 2+ - GET FREE DISK SPACE
  2911.     AH = 36h
  2912.     DL = drive number (00h = default, 01h = A:, etc)
  2913. Return: AX = FFFFh if invalid drive
  2914.     else
  2915.         AX = sectors per cluster
  2916.         BX = number of free clusters
  2917.         CX = bytes per sector
  2918.         DX = total clusters on drive
  2919. Notes:    free space on drive in bytes is AX * BX * CX
  2920.     total space on drive in bytes is AX * CX * DX
  2921.     "lost clusters" are considered to be in use
  2922.     according to Dave Williams' MS-DOS reference, the value in DX is
  2923.       incorrect for non-default drives after ASSIGN is run
  2924. SeeAlso: AH=1Bh,AH=1Ch
  2925. --------D-213700-----------------------------
  2926. INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
  2927.     AX = 3700h
  2928. Return: AL = status
  2929.         00h successful
  2930.         DL = current switch character
  2931.         FFh unsupported subfunction
  2932. Desc:    Determine the character which is used to introduce command switches.
  2933.       This setting is ignored by DOS commands in version 4.0 and higher,
  2934.       but is honored by many third-party programs.
  2935. Notes:    documented in some OEM versions of some releases of DOS
  2936.     supported by OS/2 compatibility box
  2937.     always returns AL=00h/DL=2Fh for MS-DOS 5+ and DR-DOS 3.41+
  2938. SeeAlso: AX=3701h
  2939. --------D-213701-----------------------------
  2940. INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
  2941.     AX = 3701h
  2942.     DL = new switch character
  2943. Return: AL = status
  2944.         00h successful
  2945.         FFh unsupported subfunction
  2946. Notes:    documented in some OEM versions of some releases of DOS
  2947.     supported by OS/2 compatibility box
  2948.     ignored by MS-DOS 5+ and DR-DOS 3.41+; DR-DOS 6.0 leaves AX unchanged
  2949. SeeAlso: AX=3700h
  2950. --------D-2137-------------------------------
  2951. INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
  2952.     AH = 37h
  2953.     AL = subfunction
  2954.         02h get availdev flag
  2955.         Return: DL = 00h \DEV\ must precede character device names
  2956.                = nonzero \DEV\ is optional
  2957.         03h set availdev flag
  2958.         DL = 00h    \DEV\ is mandatory
  2959.            = nonzero    \DEV\ is optional
  2960. Return: AL = status
  2961.         00h successful
  2962.         FFh unsupported subfunction
  2963. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  2964.       names without generating an error even if the directory \DEV does
  2965.       not actually exist (other paths generate an error if they do not
  2966.       exist).
  2967.     although MS-DOS 3.3+ and DR-DOS 3.41+ accept these calls, they have no
  2968.       effect, and AL=02h always returns DL=FFh
  2969. --------k-2137D0BX899D-----------------------
  2970. INT 21 - DIET v1.43e - TSR INSTALLATION CHECK
  2971.     AX = 37D0h
  2972.     BX = 899Dh ('DI' + 'ET')
  2973. Return: AL = FFh if not present as TSR (default return value from DOS)
  2974.     AX = 0000h if installed as a TSR
  2975.         CX = 899Dh
  2976.         DX = version ID
  2977. Program: DIET is a transparent file copressor/decompressor by Teddy Matsumoto
  2978. SeeAlso: AX=37D1h,AX=37D2h,AX=37D4h,AX=37D6h,AX=37DFh,AX=4BF0h,AX=4BF1h
  2979. --------k-2137D1BX899D-----------------------
  2980. INT 21 - DIET v1.43e - GET DIET.EXE RESIDENT SEGMENT
  2981.     AX = 37D1h
  2982.     BX = 899Dh ('DI' + 'ET')
  2983. Return: AX = 0000h
  2984.     CX = code segment of TSR part of DIET.EXE
  2985.     DX = memory block segment of TSR DIET.EXE
  2986.         (0000h if installed as device driver)
  2987. SeeAlso: AX=37D0h,AX=37DFh
  2988. --------k-2137D2BX899D-----------------------
  2989. INT 21 - DIET v1.43e - GET TSR CONTROL FLAGS
  2990.     AX = 37D2h
  2991.     BX = 899Dh ('DI' + 'ET')
  2992. Return: AX = 0000h
  2993.     DL = control flag (00h active, else disabled)
  2994.     DH = skip flag (nonzero while TSR active)
  2995. SeeAlso: AX=37D0h,AX=37D3h,AX=37D4h
  2996. --------k-2137D3BX899D-----------------------
  2997. INT 21 - DIET v1.43e - SET TSR CONTROL FLAGS
  2998.     AX = 37D3h
  2999.     BX = 899Dh ('DI' + 'ET')
  3000.     DL = control flag (00h active, else disabled)
  3001.     DH = skip flag (00h)
  3002. Return: AX = 0000h
  3003. SeeAlso: AX=37D0h,AX=37D2h,AX=37D5h
  3004. --------k-2137D4BX899D-----------------------
  3005. INT 21 - DIET v1.43e - GET TSR OPTIONS
  3006.     AX = 37D4h
  3007.     BX = 899Dh ('DI' + 'ET')
  3008. Return: AX = 0000h
  3009.     DX = TSR options (see #0532)
  3010. SeeAlso: AX=37D0h,AX=37D2h,AX=37D5h
  3011.  
  3012. Bitfields for DIET TSR options:
  3013. Bit(s)    Description    (Table 0532)
  3014.  0    automated compression of DIETed file
  3015.  1    automated compression of newly-created file
  3016.  2    suppress DIET message
  3017.  3    display original file size
  3018.  4-15    reserved (0)
  3019. --------k-2137D5BX899D-----------------------
  3020. INT 21 - DIET v1.43e - SET TSR OPTIONS
  3021.     AX = 37D5h
  3022.     BX = 899Dh ('DI' + 'ET')
  3023.     DX = TSR options (see #0532)
  3024. Return: AX = 0000h
  3025. Program: DIET is a transparent file copressor/decompressor by Teddy Matsumoto
  3026. SeeAlso: AX=37D0h,AX=37D3h,AX=37D4h
  3027. --------k-2137D6BX899D-----------------------
  3028. INT 21 - DIET v1.43e - GET TEMPORARY DIRECTORY NAMES
  3029.     AX = 37D6h
  3030.     BX = 899Dh ('DI' + 'ET')
  3031. Return: AX = 0000h
  3032.     DS:DX -> name of temporary directory or 0000h:0000h for current dir
  3033. SeeAlso: AX=37D0h,AX=37D7h
  3034. --------k-2137D7BX899D-----------------------
  3035. INT 21 - DIET v1.43e - SET TEMPORARY DIRECTORY NAMES
  3036.     AX = 37D7h
  3037.     BX = 899Dh ('DI' + 'ET')
  3038.     DS:DX -> ASCIZ name of temporary directory (max 61 chars)
  3039.         0000h:0000h for current directory
  3040. Return: AX = 0000h
  3041. Note:    the specified directory name must include a drive letter and end with
  3042.       a backslash
  3043. SeeAlso: AX=37D0h,AX=37D6h
  3044. --------k-2137DCBX899D-----------------------
  3045. INT 21 - DIET v1.43e - SET ADDRESS OF EXTERNAL PROCEDURE
  3046.     AX = 37DCh
  3047.     BX = 899Dh ('DI' + 'ET')
  3048.     DS:DX -> external procedure
  3049. Return: AX = 0000h
  3050. Note:    the resident code will call the specified external procedure at the
  3051.       beginning of decompression and when compression is exited on failure
  3052. SeeAlso: AX=37DDh
  3053.  
  3054. (Table 0533)
  3055. Values DIET external procedure is called with:
  3056.     STACK:    WORD    class
  3057.             FFFDh creation failed for unknown reasons
  3058.             FFFEh creation failed due to lack of space
  3059.             FFFFh file creation error
  3060.             else file handle of DIETed file to be decompressed
  3061.         DWORD    -> compressed filename
  3062.         DWORD    -> decompressed or temporary filename
  3063. Return: SI,DI,BP,DS,ES must be preserved by external procedure
  3064. --------k-2137DDBX899D-----------------------
  3065. INT 21 - DIET v1.43e - RELEASE EXTERNAL PROCEDURE
  3066.     AX = 37DDh
  3067.     BX = 899Dh ('DI' + 'ET')
  3068. Program: DIET is a transparent file copressor/decompressor by Teddy Matsumoto
  3069. Note:    unlinks the external procedure specified by AX=37DCh
  3070. SeeAlso: AX=37DCh
  3071. --------k-2137DEBX899D-----------------------
  3072. INT 21 - DIET v1.43e - READ EMS STATUS
  3073.     AX = 37DEh
  3074.     BX = 899Dh ('DI' + 'ET')
  3075. Return: AX = 0000h
  3076.     CX = EMS status
  3077.         0000h not used
  3078.         0001h used as work area
  3079.         0002h used for code and as work area
  3080.     DX = EMM handle when EMS is in use
  3081. --------k-2137DFBX899D-----------------------
  3082. INT 21 - DIET v1.43e - UNLOAD TSR
  3083.     AX = 37DFh
  3084.     BX = 899Dh ('DI' + 'ET')
  3085. Return: AX = status
  3086.         0000h successful
  3087.         00FFh failed
  3088. Program: DIET is a transparent file copressor/decompressor by Teddy Matsumoto
  3089. SeeAlso: AX=37D0h
  3090. Index:    uninstall;DIET
  3091. --------D-2138-------------------------------
  3092. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  3093.     AH = 38h
  3094. --DOS 2.x--
  3095.     AL = 00h get current-country info
  3096.     DS:DX -> buffer for returned info (see #0534,#0535)
  3097. Return: CF set on error
  3098.         AX = error code (02h)
  3099.     CF clear if successful
  3100.         AX = country code (MS-DOS 2.11 only)
  3101.         buffer at DS:DX filled
  3102. --DOS 3+--
  3103.     AL = 00h for current country
  3104.     AL = 01h thru 0FEh for specific country with code <255
  3105.     AL = 0FFh for specific country with code >= 255
  3106.        BX = 16-bit country code
  3107.     DS:DX -> buffer for returned info (see #0535)
  3108. Return: CF set on error
  3109.         AX = error code (02h)
  3110.     CF clear if successful
  3111.         BX = country code
  3112.         DS:DX buffer filled
  3113. Note:    this function is not supported by the Borland DPMI host, but no error
  3114.       is returned; as a workaround, one should allocate a buffer in
  3115.       conventional memory with INT 31/AX=0100h and simulate an INT 21 with
  3116.       INT 31/AX=0300h
  3117. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  3118.  
  3119. Format of DOS 2.00-2.10 country info:
  3120. Offset    Size    Description    (Table 0534)
  3121.  00h    WORD    date format  0 = USA    mm dd yy
  3122.                  1 = Europe dd mm yy
  3123.                  2 = Japan    yy mm dd
  3124.  02h    BYTE    currency symbol
  3125.  03h    BYTE    00h
  3126.  04h    BYTE    thousands separator char
  3127.  05h    BYTE    00h
  3128.  06h    BYTE    decimal separator char
  3129.  07h    BYTE    00h
  3130.  08h 24 BYTEs    reserved
  3131.  
  3132. Format of DOS 2.11+ country info:
  3133. Offset    Size    Description    (Table 0535)
  3134.  00h    WORD    date format (see #0534)
  3135.  02h  5 BYTEs    ASCIZ currency symbol string
  3136.  07h  2 BYTEs    ASCIZ thousands separator
  3137.  09h  2 BYTEs    ASCIZ decimal separator
  3138.  0Bh  2 BYTEs    ASCIZ date separator
  3139.  0Dh  2 BYTEs    ASCIZ time separator
  3140.  0Fh    BYTE    currency format
  3141.         bit 2 = set if currency symbol replaces decimal point
  3142.         bit 1 = number of spaces between value and currency symbol
  3143.         bit 0 = 0 if currency symbol precedes value
  3144.             1 if currency symbol follows value
  3145.  10h    BYTE    number of digits after decimal in currency
  3146.  11h    BYTE    time format
  3147.         bit 0 = 0 if 12-hour clock
  3148.             1 if 24-hour clock
  3149.  12h    DWORD    address of case map routine
  3150.         (FAR CALL, AL = character to map to upper case [>= 80h])
  3151.  16h  2 BYTEs    ASCIZ data-list separator
  3152.  18h 10 BYTEs    reserved
  3153.  
  3154. (Table 0536)
  3155. Values for country code:
  3156.  001h    United States
  3157.  002h    Canadian-French
  3158.  003h    Latin America
  3159.  01Fh    Netherlands
  3160.  020h    Belgium
  3161.  021h    France
  3162.  022h    Spain
  3163.  024h    Hungary (not supported by DR-DOS 5.0)
  3164.  026h    Yugoslavia (not supported by DR-DOS 5.0)
  3165.  027h    Italy
  3166.  029h    Switzerland
  3167.  02Ah    Czechoslovakia/Tjekia (not supported by DR-DOS 5.0)
  3168.  02Bh    Austria (DR-DOS 5.0)
  3169.  02Ch    United Kingdom
  3170.  02Dh    Denmark
  3171.  02Eh    Sweden
  3172.  02Fh    Norway
  3173.  030h    Poland (not supported by DR-DOS 5.0)
  3174.  031h    Germany
  3175.  037h    Brazil (not supported by DR-DOS 5.0)
  3176.  03Dh    International English [Australia in DR-DOS 5.0]
  3177.  051h    Japan (DR-DOS 5.0, MS-DOS 5.0+)
  3178.  052h    Korea (DR-DOS 5.0)
  3179.  056h    China (MS-DOS 5.0+)
  3180.  058h    Taiwan (MS-DOS 5.0+)
  3181.  05Ah    Turkey (MS-DOS 5.0+)
  3182.  15Fh    Portugal
  3183.  162h    Iceland
  3184.  166h    Finland
  3185.  311h    Middle East/Saudi Arabia (DR-DOS 5.0,MS-DOS 5.0+)
  3186.  3CCh    Israel (DR-DOS 5.0,MS-DOS 5.0+)
  3187. --------D-2138--DXFFFF-----------------------
  3188. INT 21 - DOS 3+ - SET COUNTRY CODE
  3189.     AH = 38h
  3190.     DX = FFFFh
  3191.     AL = 01h thru FEh for specific country with code <255
  3192.     AL = FFh for specific country with code >= 255
  3193.        BX = 16-bit country code (see #0536)
  3194. Return: CF set on error
  3195.         AX = error code (see #0789 at AH=59h)
  3196.     CF clear if successful
  3197. Note:    not supported by OS/2
  3198. SeeAlso: INT 2F/AX=1403h
  3199. --------D-2139-------------------------------
  3200. INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
  3201.     AH = 39h
  3202.     DS:DX -> ASCIZ pathname
  3203. Return: CF clear if successful
  3204.         AX destroyed
  3205.     CF set on error
  3206.         AX = error code (03h,05h) (see #0789 at AH=59h)
  3207. Notes:    all directories in the given path except the last must exist
  3208.     fails if the parent directory is the root and is full
  3209.     DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
  3210.       it is not possible to make that directory the current directory
  3211.       because the path would exceed 64 characters
  3212.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3213. SeeAlso: AH=3Ah,AH=3Bh,AH=6Dh,AH=71h,AH=E2h/SF=0Ah,INT 2F/AX=1103h
  3214. SeeAlso: INT 60/DI=0511h
  3215. --------D-213A-------------------------------
  3216. INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
  3217.     AH = 3Ah
  3218.     DS:DX -> ASCIZ pathname of directory to be removed
  3219. Return: CF clear if successful
  3220.         AX destroyed
  3221.     CF set on error
  3222.         AX = error code (03h,05h,06h,10h) (see #0789 at AH=59h)
  3223. Notes:    directory must be empty (contain only '.' and '..' entries)
  3224.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3225. SeeAlso: AH=39h,AH=3Bh,AH=71h,AH=E2h/SF=0Bh,INT 2F/AX=1101h,INT 60/DI=0512h
  3226. --------D-213B-------------------------------
  3227. INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
  3228.     AH = 3Bh
  3229.     DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
  3230. Return: CF clear if successful
  3231.         AX destroyed
  3232.     CF set on error
  3233.         AX = error code (03h) (see #0789 at AH=59h)
  3234. Notes:    if new directory name includes a drive letter, the default drive is
  3235.       not changed, only the current directory on that drive
  3236.     changing the current directory also changes the directory in which
  3237.       FCB file calls operate
  3238.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3239. SeeAlso: AH=47h,AH=71h,INT 2F/AX=1105h
  3240. --------D-213C-------------------------------
  3241. INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
  3242.     AH = 3Ch
  3243.     CX = file attributes (see #0537)
  3244.     DS:DX -> ASCIZ filename
  3245. Return: CF clear if successful
  3246.         AX = file handle
  3247.     CF set on error
  3248.         AX = error code (03h,04h,05h) (see #0789 at AH=59h)
  3249. Notes:    if a file with the given name exists, it is truncated to zero length
  3250.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3251.     DR-DOS checks the system password or explicitly supplied password at
  3252.       the end of the filename against the reserved field in the directory
  3253.       entry before allowing access
  3254. SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h,INT 2F/AX=1117h
  3255.  
  3256. Bitfields for file attributes:
  3257. Bit(s)    Description    (Table 0537)
  3258.  0    read-only
  3259.  1    hidden
  3260.  2    system
  3261.  3    volume label (ignored)
  3262.  4    reserved, must be zero (directory)
  3263.  5    archive bit
  3264.  7    if set, file is shareable under Novell NetWare
  3265. --------D-213D-------------------------------
  3266. INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
  3267.     AH = 3Dh
  3268.     AL = access and sharing modes (see #0538)
  3269.     DS:DX -> ASCIZ filename
  3270.     CL = attribute mask of files to look for (server call only)
  3271. Return: CF clear if successful
  3272.         AX = file handle
  3273.     CF set on error
  3274.         AX = error code (01h,02h,03h,04h,05h,0Ch,56h) (see #0789 at AH=59h)
  3275. Notes:    file pointer is set to start of file
  3276.     file handles which are inherited from a parent also inherit sharing
  3277.       and access restrictions
  3278.     files may be opened even if given the hidden or system attributes
  3279.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3280.     DR-DOS checks the system password or explicitly supplied password at
  3281.       the end of the filename against the reserved field in the directory
  3282.       entry before allowing access
  3283.     sharing modes are only effective on local drives if SHARE is loaded
  3284. SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1116h,INT 2F/AX=1226h
  3285.  
  3286. Bitfields for access and sharing modes:
  3287. Bit(s)    Description    (Table 0538)
  3288.  2-0    access mode
  3289.     000 read only
  3290.     001 write only
  3291.     010 read/write
  3292.     011 (DOS 5+ internal) passed to redirector on EXEC to allow
  3293.         case-sensitive filenames
  3294.  3    reserved (0)
  3295.  6-4    sharing mode (DOS 3+)
  3296.     000 compatibility mode
  3297.     001 "DENYALL" prohiboth read and write access by others
  3298.     010 "DENYWRITE" prohiwrite access by others
  3299.     011 "DENYREAD" prohiread access by others
  3300.     100 "DENYNONE" allow full access by others
  3301.     111 network FCB (only available during server call)
  3302.  7    inheritance
  3303.     if set, file is private to current process and will not be inherited
  3304.       by child processes
  3305.  
  3306. (Table 0539)
  3307. Values of DOS file sharing behavior:
  3308.       |    Second and subsequent Opens
  3309.  First      |Compat  Deny      Deny     Deny    Deny
  3310.  Open      |       All      Write     Read    None
  3311.       |R W RW R W RW R W RW R W RW R W RW
  3312.  - - - - -| - - - - - - - - - - - - - - - - -
  3313.  Compat R |Y Y Y  N N N     1 N N    N N N  1 N N
  3314.     W |Y Y Y  N N N     N N N    N N N  N N N
  3315.     RW|Y Y Y  N N N     N N N    N N N  N N N
  3316.  - - - - -|
  3317.  Deny    R |C C C  N N N     N N N    N N N  N N N
  3318.  All    W |C C C  N N N     N N N    N N N  N N N
  3319.     RW|C C C  N N N     N N N    N N N  N N N
  3320.  - - - - -|
  3321.  Deny    R |2 C C  N N N     Y N N    N N N  Y N N
  3322.  Write    W |C C C  N N N     N N N    Y N N  Y N N
  3323.     RW|C C C  N N N     N N N    N N N  Y N N
  3324.  - - - - -|
  3325.  Deny    R |C C C  N N N     N Y N    N N N  N Y N
  3326.  Read    W |C C C  N N N     N N N    N Y N  N Y N
  3327.     RW|C C C  N N N     N N N    N N N  N Y N
  3328.  - - - - -|
  3329.  Deny    R |2 C C  N N N     Y Y Y    N N N  Y Y Y
  3330.  None    W |C C C  N N N     N N N    Y Y Y  Y Y Y
  3331.     RW|C C C  N N N     N N N    N N N  Y Y Y
  3332. Legend: Y = open succeeds, N = open fails with error code 05h
  3333.     C = open fails, INT 24 generated
  3334.     1 = open succeeds if file read-only, else fails with error code
  3335.     2 = open succeeds if file read-only, else fails with INT 24
  3336. --------v-213DFF-----------------------------
  3337. INT 21 - VIRUS - "JD-448" - INSTALLATION CHECK
  3338.     AX = 3DFFh
  3339. Return: AX = 4A44h if resident
  3340. SeeAlso: AX=357Fh,AX=4203h
  3341. --------D-213E-------------------------------
  3342. INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
  3343.     AH = 3Eh
  3344.     BX = file handle
  3345. Return: CF clear if successful
  3346.         AX destroyed
  3347.     CF set on error
  3348.         AX = error code (06h) (see #0789 at AH=59h)
  3349. Note:    if the file was written to, any pending disk writes are performed, the
  3350.       time and date stamps are set to the current time, and the directory
  3351.       entry is updated
  3352. SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
  3353. --------D-213F-------------------------------
  3354. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  3355.     AH = 3Fh
  3356.     BX = file handle
  3357.     CX = number of bytes to read
  3358.     DS:DX -> buffer for data
  3359. Return: CF clear if successful
  3360.         AX = number of bytes actually read (0 if at EOF before call)
  3361.     CF set on error
  3362.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3363. Notes:    data is read beginning at current file position, and the file position
  3364.       is updated after a successful read
  3365.     the returned AX may be smaller than the request in CX if a partial
  3366.       read occurred
  3367.     if reading from CON, read stops at first CR
  3368.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3369. BUG:    Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to
  3370.       a record lock (see AH=5Ch), though it does return AX=0005h; this
  3371.       has been documented by Novell
  3372. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  3373. --------G-213F-------------------------------
  3374. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  3375.     AH = 3Fh
  3376.     BX = handle for character device "TDHDEBUG"
  3377.     CX = number of bytes to read
  3378.     DS:DX -> buffer for status block (see #0541)
  3379. Return: CF clear if successful
  3380.         AX = number of bytes actually read
  3381.     CF set on error
  3382.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3383. SeeAlso: AH=40h"Turbo Debug"
  3384.  
  3385. (Table 0540)
  3386. Values for status of Turbo Debugger command:
  3387.  00h    successful
  3388.  01h    invalid handle
  3389.  02h    no more breakpoints available
  3390.  03h    hardware does not support specified breakpoint type
  3391.  04h    previous command prevents execution
  3392.  05h    debugger hardware not found
  3393.  06h    hardware failure
  3394.  07h    invalid command
  3395.  08h    driver not initialized yet
  3396.  FEh    recursive entry (hardware breakpoint inside hw bp handler)
  3397.  
  3398. Format of Turbo Debugger status block:
  3399. Offset    Size    Description    (Table 0541)
  3400.  00h    BYTE    status of command (see #0540)
  3401. ---status for command 01h---
  3402.  01h    WORD    device driver interface version number (currently 1)
  3403.  03h    WORD    device driver software version
  3404.  05h    BYTE    maximum simultaneous hardware breakpoints
  3405.  06h    BYTE    configuration bits (see #0542)
  3406.  07h    BYTE    supported breakpoint types (see #0543)
  3407.  08h    WORD    supported addressing match modes (see #0544)
  3408.  0Ah    WORD    supported data matches (see #0545)
  3409.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  3410.  0Dh    WORD    size of onboard memory (in KB)
  3411.  0Fh    WORD    maximum number of trace-back events
  3412.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  3413.           supported)
  3414. ---status for command 04h---
  3415.  01h    BYTE    handle to use when referring to the just-set breakpoint
  3416.  
  3417. Bitfields for Turbo Debugger configuration bits:
  3418. Bit(s)    Description    (Table 0542)
  3419.  0    CPU and DMA accesses are distinct
  3420.  1    can detect DMA transfers
  3421.  2    supports data mask
  3422.  3    hardware pass counter on breakpoints
  3423.  4    can match on data as well as addresses
  3424.  
  3425. Bitfields for Turbo Debugger supported breakpoint types:
  3426. Bit(s)    Description    (Table 0543)
  3427.  0    memory read
  3428.  1    memory write
  3429.  2    memory read/write
  3430.  3    I/O read
  3431.  4    I/O write
  3432.  5    I/O read/write
  3433.  6    instruction fetch
  3434.  
  3435. Bitfields for Turbo Debugger supported addressing match modes:
  3436. Bit(s)    Description    (Table 0544)
  3437.  0    any address
  3438.  1    equal to test value
  3439.  2    not equal
  3440.  3    above test value
  3441.  4    below test value
  3442.  5    below or equal
  3443.  6    above or equal
  3444.  7    within range
  3445.  8    outside range
  3446.  
  3447. Bitfields for Turbo Debugger supported data matches:
  3448. Bit(s)    Description    (Table 0545)
  3449.  0    any data
  3450.  1    equal to test value
  3451.  2    not equal
  3452.  3    above test value
  3453.  4    below test value
  3454.  5    below or equal
  3455.  6    above or equal
  3456.  7    within range
  3457.  8    outside range
  3458. --------N-213F-------------------------------
  3459. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  3460.     AH = 3Fh
  3461.     BX = handle for character device "$IPCUST"
  3462.     CX = number of bytes to read
  3463.     DS:DX -> buffer for configuration data (see #0546)
  3464. Return: CF clear if successful
  3465.         AX = number of bytes actually read
  3466.     CF set on error
  3467.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3468. Notes:    if less than the entire data is read or written, the next read/write
  3469.       continues where the previous one ended; IOCTL calls AX=4402h and
  3470.       AX=4403h both reset the location at which the next operation starts
  3471.       to zero
  3472.     the data pointer is also reset to zero if the previous read or write
  3473.       reached or exceeded the end of the data, when the current function
  3474.       is read and the previous was write, or vice versa
  3475.     v2.1+ uses a new configuration method, but allows the installation
  3476.       of IPCUST.SYS for backward compatibility with other software which
  3477.       must read the PC/TCP configuration
  3478. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST",AX=4402h"FTPSOFT"
  3479.  
  3480. Format of PC/TCP configuration data:
  3481. Offset    Size    Description    (Table 0546)
  3482.  00h 12 BYTEs    IPCUST.SYS device driver header
  3483.  12h    BYTE    ???
  3484.  13h    BYTE    ???
  3485.  14h    WORD    ???
  3486.  16h    BYTE    bit flags
  3487.         bit 0: send BS rather than DEL for BackSpace key
  3488.         bit 1: wrap long lines
  3489.  17h    BYTE    ???
  3490.  18h 64 BYTEs    ASCIZ hostname
  3491.  58h 64 BYTEs    ASCIZ domain name
  3492.         (fully qualified domain name is hostname.domain-name)
  3493.  98h 16 BYTEs    ASCIZ username
  3494.  A8h 64 BYTEs    ASCIZ full name
  3495.  E8h 64 BYTEs    ASCIZ office address
  3496. 128h 32 BYTEs    ASCIZ phone number
  3497. 148h    WORD    offset from GMT in minutes
  3498. 14Ah  4 BYTEs    ASCIZ timezone name
  3499. 14Eh    WORD    number of time servers
  3500. 150h  ? DWORDs    (big-endian) IP addresses for time servers
  3501.     ???
  3502. 164h    WORD    number of old-style name servers
  3503. 166h  3 DWORDs    (big-endian) IP addresses for name servers
  3504. 172h    WORD    number of domain name servers
  3505. 174h  3 DWORDs    (big-endian) IP addresses for domain name servers
  3506. 180h    DWORD    (big-endian) IP address of default gateway
  3507. 184h    DWORD    (big-endian) IP address of log server
  3508. 188h    DWORD    (big-endian) IP address of cookie server
  3509. 18Ch    DWORD    (big-endian) IP address of lpr server
  3510. 190h    DWORD    (big-endian) IP address of imagen print server
  3511. 194h 54 BYTEs    ???
  3512. 1E8h    WORD    TCP default window size in bytes
  3513. 1EAh    WORD    TCP low window size
  3514. 1ECh 64 BYTEs    ASCIZ host tabel filename
  3515. 22Ch  2 BYTEs    ???
  3516. 22Eh 80 BYTEs    ASCIZ mail relay host name
  3517. 27Eh    BYTE    ???
  3518. 27Fh    BYTE    ??? bit flags
  3519. 280h 44 BYTEs    ???
  3520. 2ACh    WORD    ???
  3521. 2AEh 202 BYTEs    ???
  3522. --------N-213F-------------------------------
  3523. INT 21 - WORKGRP.SYS - GET ENTRY POINT
  3524.     AH = 3Fh
  3525.     BX = file handle for device "NET$HLP$"
  3526.     CX = 0008h
  3527.     DS:DX -> buffer for entry point record (see #0616)
  3528. Return: CF clear if successful
  3529.         AX = number of bytes actually read (0 if at EOF before call)
  3530.     CF set on error
  3531.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3532. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  3533.       permits communication with PCs running Windows for Workgroups or
  3534.       LAN Manager
  3535. SeeAlso: AX=4402h"WORKGRP.SYS",INT 2F/AX=9400h
  3536. --------N-213F-------------------------------
  3537. INT 21 - BW-TCP - GET DRIVER INFO
  3538.     AH = 3Fh
  3539.     BX = file handle for device "ETHDEV27"
  3540.     CX = 002Bh
  3541.     DS:DX -> buffer for driver info (see #0547)
  3542. Return: CF clear if successful
  3543.         AX = number of bytes actually read (0 if at EOF before call)
  3544.     CF set on error
  3545.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3546. Program: BW-TCP is a TCP/IP protocol stack by Beame & Whiteside Software
  3547. Notes:    the B&W socket library performs an INT 21/AX=4401h with DX=0060h before
  3548.       making this call to retrieve the driver information; one should also
  3549.       call the private API interrupt with AH=15h
  3550.     the installation check for the TCP/IP stack is to test for the
  3551.       existence of the character device UDP-IP10
  3552. SeeAlso: INT 14/AH=56h,INT 62/AH=00h"ETHDEV",INT 63/AH=03h,INT 64/AH=00h
  3553. Index:    installation check;BW-TCP hardware driver
  3554. Index:    installation check;BW-TCP TCPIP.SYS
  3555.  
  3556. Format of BW-TCP driver info:
  3557. Offset    Size    Description    (Table 0547)
  3558.  00h    WORD    I/O base address
  3559.  02h    BYTE    shared memory page (01h = segment 0100h, etc.)
  3560.  03h    BYTE    interrupt vector for private API
  3561.  04h    BYTE    IRQ used by board
  3562.  05h    WORD    size of data buffer
  3563.  07h    WORD    maximum transfer window
  3564.  09h    WORD    time zone
  3565.  0Bh    BYTE    address type (01h user, 04h RARP, 05h BOOTP)
  3566.  0Ch    DWORD    internet address
  3567.  10h    WORD    "value" ???
  3568.  12h    BYTE    subnet mask
  3569.  13h    WORD    "ether_pointer" ???
  3570.  15h    WORD    offset in device driver of log server records
  3571.  17h    WORD    offset in device driver of name server records
  3572.  19h    WORD    offset in device driver of print server records
  3573.  1Bh    WORD    offset in device driver of time server records
  3574.  1Dh    WORD    offset in device driver of gateway records
  3575.  1Fh    WORD    segment address of device driver
  3576.  21h    BYTE    transfer size
  3577.  22h  9 BYTEs    network adapter board name
  3578. ---11/21/91+ ---
  3579.  23h    BYTE    ETHDEV version (major in high nybble, minor in low nybble)
  3580.  24h    BYTE    ETHDEV revision
  3581.  25h    BYTE    TCPIP version (major in high nybble, minor in low nybble)
  3582.  26h    BYTE    TCPIP revision
  3583.  27h    BYTE    BWRPC version (major in high nybble, minor in low nybble)
  3584.  28h    BYTE    BWRPC revision
  3585.  29h    BYTE    BWNFS version (major in high nybble, minor in low nybble)
  3586.  2Ah    BYTE    BWNFS revision
  3587.  2Bh    BYTE    Telnet version (major in high nybble, minor in low nybble)
  3588.  2Ch    BYTE    Telnet revision
  3589.  2Dh    BYTE    NETBIOS version (major in high nybble, minor in low nybble)
  3590.  2Eh    BYTE    NETBIOS revision
  3591. Note:    for each driver, if version=0, the driver is not installed or does
  3592.       not support the version check
  3593.  
  3594. Format of BW-TCP server records:
  3595. Offset    Size    Description    (Table 0548)
  3596.  00h    BYTE    number of server records following
  3597.  01h  N DWORDs    internet addresses of servers
  3598. --------y-213F-------------------------------
  3599. INT 21 - Trusted Access - NB.SYS - GET STATE
  3600.     AH = 3Fh
  3601.     BX = file handle for device "$$NB$$NB"
  3602.     CX = 0002h (size of state)
  3603.     DS:DX -> buffer for state record (see #0549)
  3604. Return: CF clear if successful
  3605.         AX = number of bytes actually read (0 if at EOF before call)
  3606.     CF set on error
  3607.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3608. Program: Trusted Access is a security and access-control package by Lassen
  3609.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  3610.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  3611. SeeAlso: AH=40h"NB.SYS",AX=4101h
  3612.  
  3613. Format of Trusted Access state record:
  3614. Offset    Size    Description    (Table 0549)
  3615.  00h    BYTE    00h off, 01h on
  3616.  01h    BYTE    keys being disabled
  3617.         bit 0: Ctrl-Break
  3618.         bit 1: SysReq
  3619.         bit 2: Ctrl and Alt
  3620.         bit 3: Ctrl-Alt-Del
  3621.         bit 7: all keys (overrides other bits)
  3622. ----------213F-------------------------------
  3623. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  3624.     AH = 3Fh
  3625.     BX = file handle for device "IFS$HLP$"
  3626.     CX = 0008h (size of buffer in bytes)
  3627.     DS:DX -> buffer for entry point record (see #0550)
  3628. Return: CF clear if successful
  3629.         AX = number of bytes actually read (0 if at EOF before call)
  3630.     CF set on error
  3631.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3632. Program: IFSHLP.SYS is a support driver for Microsoft Windows for Workgroups
  3633. SeeAlso: AX=4402h"IFSHLP"
  3634.  
  3635. Format of IFSHLP.SYS entry point record:
  3636. Offset    Size    Description    (Table 0550)
  3637.  00h  4 BYTEs    (call) signature 70h E9h 34h 37h
  3638.         signature must be 34h 37h 70h EFh if called via IOCTL
  3639.  04h    DWORD    (ret) pointer to FAR call entry point (see #0551)
  3640.  
  3641. (Table 0551)
  3642. Call IFSHLP.SYS entry point with:
  3643.     STACK:    WORD    function number (00h-0Ch)
  3644.             00h ???
  3645.             01h set ??? intercept
  3646.             02h remove ??? intercept
  3647.             03h ??? LPT2
  3648.             04h ??? LPT1
  3649.             05h ??? and remove ??? intercept
  3650.             06h set ??? flag
  3651.             07h clear ??? flag
  3652.             08h get ??? flag word
  3653.             09h ???
  3654.             0Ah ???
  3655.             0Bh ???
  3656.             0Ch get ???
  3657. ---if function 00h---
  3658. Return: AX = ??? (0024h seen)
  3659.     DX = resident code segment
  3660. ---if function 01h---
  3661.     STACK:    DWORD    new intercept address
  3662. Return: AX = status
  3663.         0000h successful
  3664.         0001h failed (already set)
  3665.         DX = 0000h
  3666. ---if function 02h---
  3667. Return: AX = status
  3668.         0000h successful
  3669.         0001h failed (not set)
  3670.     DX = 0000h
  3671. ---if function 03h,04h---
  3672.     STACK:    WORD    ???
  3673. Return: AX = 0000h
  3674.     DX = 0000h
  3675. ---if function 05h---
  3676.     ???
  3677. ---if function 06h---
  3678. Return: AX = 0001h and DX = 0000h if already set
  3679.     AX,DX unchanged if successful
  3680. ---if function 07h---
  3681. Return: AX = 0001h and DX = 0000h if not set
  3682.     AX,DX unchanged if successful
  3683. ---if function 08h---
  3684. Return: DX = 0000h
  3685.     AX = flags (bit 0 set/cleared by functions 06h and 07h)
  3686. ---if function 09h---
  3687. Return: AX = status
  3688.         0000h successful
  3689.         0001h failed (already called)
  3690. ---if function 0Ah---
  3691.     STACK:    WORD    ???
  3692.     ???
  3693. ---if function 0Bh---
  3694. Return: AX = status
  3695.         0000h successful
  3696.         0001h failed (not set)
  3697. ---if function 0Ch---
  3698. Return: AX = 0000h
  3699.     ES:BX -> ??? data
  3700. ---if function > 0Ch---
  3701. Return:    AX = 0001h
  3702.     DX = 0000h
  3703. --------D-2140-------------------------------
  3704. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  3705.     AH = 40h
  3706.     BX = file handle
  3707.     CX = number of bytes to write
  3708.     DS:DX -> data to write
  3709. Return: CF clear if successful
  3710.         AX = number of bytes actually written
  3711.     CF set on error
  3712.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3713. Notes:    if CX is zero, no data is written, and the file is truncated or
  3714.       extended to the current position
  3715.     data is written beginning at the current file position, and the file
  3716.       position is updated after a successful write
  3717.     the usual cause for AX < CX on return is a full disk
  3718. BUG:    a write of zero bytes will appear to succeed when it actually failed
  3719.       if the write is extending the file and there is not enough disk
  3720.       space for the expanded file (DOS 5.0-6.0); one should therefore check
  3721.       whether the file was in fact extended by seeking to 0 bytes from
  3722.       the end of the file (INT 21/AX=4202h/CX=0/DX=0)
  3723.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3724. SeeAlso: AH=28h,AH=3Fh,AH=93h,INT 2F/AX=1109h
  3725. --------G-2140-------------------------------
  3726. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  3727.     AH = 40h
  3728.     BX = handle for character device "TDHDEBUG"
  3729.     CX = number of bytes to write
  3730.     DS:DX -> hardware breakpoint command (see #0552)
  3731. Return: CF clear if successful
  3732.         AX = number of bytes actually written
  3733.     CF set on error
  3734.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3735. Note:    results are retrieved by reading from the device
  3736. SeeAlso: AH=3Fh"Turbo Debug"
  3737.  
  3738. Format of Turbo Debugger hardware breakpoint commands:
  3739. Offset    Size    Description    (Table 0552)
  3740.  00h    BYTE    command code
  3741.         00h install interrupt vectors
  3742.         01h get hardware capabilities
  3743.         02h enable hardware breakpoints
  3744.         03h disable hardware breakpoints
  3745.         04h set hardware breakpoint
  3746.         05h clear hardware breakpoint
  3747.         06h set I/O base address and reset hardware
  3748.         07h restore interrupt vectors
  3749. ---command code 00h---
  3750.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  3751.           hardware breakpoint; call with CPU state the same as on
  3752.           the breakpoint except for pushing AX and placing an entry
  3753.           code (FFh if breakout button or breakpoint handle) in AH
  3754. ---command code 04h---
  3755.  01h    BYTE    breakpoint type
  3756.         00h memory read
  3757.         01h memory write
  3758.         02h memory read/write
  3759.         03h I/O read
  3760.         04h I/O write
  3761.         05h I/O read/write
  3762.         06h instruction fetch
  3763.  02h    BYTE    address matching mode (see #0553)
  3764.  03h    DWORD    32-bit linear low address
  3765.  07h    DWORD    32-bit linear high address
  3766.  0Bh    WORD    pass count
  3767.  0Dh    BYTE    data size (01h, 02h, or 04h)
  3768.  0Eh    BYTE    source of matched bus cycle (01h CPU, 02h DMA, 03h either)
  3769.  0Fh    BYTE    data-matching mode (see #0553)
  3770.  10h    DWORD    low data value
  3771.  14h    DWORD    high data value
  3772.  18h    DWORD    data mask specifying which bits of the data are tested
  3773. ---command code 05h---
  3774.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  3775.           04h)
  3776. ---command code 06h---
  3777.  01h    WORD    base address of hardware debugger board
  3778.  
  3779. (Table 0553)
  3780. Values for Turbo Debugger address/data matching mode:
  3781.  00h    match any
  3782.  01h    equal to test value
  3783.  02h    different from test value
  3784.  03h    above test value
  3785.  04h    below test value
  3786.  05h    below or equal to test value
  3787.  06h    above or equal to test value
  3788.  07h    within inclusive range
  3789.  08h    outside specified range
  3790. --------N-2140-------------------------------
  3791. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  3792.     AH = 40h
  3793.     BX = handle for character device "$IPCUST"
  3794.     CX = number of bytes to write
  3795.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  3796. Return: CF clear if successful
  3797.         AX = number of bytes actually written
  3798.     CF set on error
  3799.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3800. Notes:    if less than the entire data is read or written, the next read/write
  3801.       continues where the previous one ended; IOCTL calls AX=4402h and
  3802.       AX=4403h both reset the location at which the next operation starts
  3803.       to zero
  3804.     the data pointer is also reset to zero if the previous read or write
  3805.       reached or exceeded the end of the data, when the current function
  3806.       is read and the previous was write, or vice versa
  3807.     v2.1+ uses a new configuration method, but allows the installation
  3808.       of IPCUST.SYS for backward compatibility with other software which
  3809.       must read the PC/TCP configuration
  3810. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  3811. --------y-2140-------------------------------
  3812. INT 21 U - Trusted Access - NB.SYS - SET STATE
  3813.     AH = 40h
  3814.     BX = handle for character device "$$NB$$NB"
  3815.     DS:DX -> state record (see #0549)
  3816.     CX ignored
  3817. Return: CF clear if successful
  3818.         AX = number of bytes actually written
  3819.     CF set on error
  3820.         AX = error code (05h,06h) (see #0789 at AH=59h)
  3821. Program: Trusted Access is a security and access-control package by Lassen
  3822.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  3823.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  3824. SeeAlso: AH=3Fh"NB.SYS"
  3825. --------j-214000BX0002-----------------------
  3826. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  3827.     AX = 4000h
  3828.     BX = 0002h
  3829.     CX = 0000h
  3830.     DS:DX = 0000h:0000h
  3831. Return: CF clear if installed
  3832.         AX = CS of resident code
  3833. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  3834.       noises when programs output a bell
  3835. SeeAlso: AX=4001h
  3836. --------j-214001BX0002-----------------------
  3837. INT 21 - FARTBELL.EXE - FORCE NOISE
  3838.     AX = 4001h
  3839.     BX = 0002h
  3840.     CX = 0000h
  3841.     DS:DX = 0000h:0000h
  3842. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  3843.       noises when programs output a bell
  3844. SeeAlso: AX=4000h
  3845. --------D-2141-------------------------------
  3846. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  3847.     AH = 41h
  3848.     DS:DX -> ASCIZ filename (no wildcards, but see below)
  3849.     CL = attribute mask for deletion (server call only, see below)
  3850. Return: CF clear if successful
  3851.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  3852.     CF set on error
  3853.         AX = error code (02h,03h,05h) (see #0789 at AH=59h)
  3854. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  3855.       the filespec must be canonical (as returned by AH=60h), and only
  3856.       files matching the attribute mask in CL are deleted
  3857.     DR-DOS 5.0-6.0 returns error code 03h if invoked via AX=5D00h
  3858.     DOS does not erase the file's data; it merely becomes inaccessible
  3859.       because the FAT chain for the file is cleared
  3860.     deleting a file which is currently open may lead to filesystem
  3861.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  3862.       referencing the deleted file, thus allowing writes to a nonexistant
  3863.       file.
  3864.     under DRDOS and DR Multiuser DOS, this function will fail if the file
  3865.       is currently open
  3866.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3867. BUG:    DR-DOS 3.41 crashes if called via AX=5D00h
  3868. SeeAlso: AH=13h,AX=4301h,AX=4380h,AX=5D00h,AH=60h,AH=71h,AX=F244h
  3869. SeeAlso: INT 2F/AX=1113h
  3870. --------y-214101DXFFFE-----------------------
  3871. INT 21 - SoftLogic Data Guardian - ???
  3872.     AX = 4101h
  3873.     DX = FFFEh
  3874. Return: AX = 0000h if installed
  3875. Note:    resident code sets several internal variables on this call
  3876. SeeAlso: AH=3Fh"NB.SYS",INT 16/AX=FFA3h/BX=0000h
  3877. --------D-2142-------------------------------
  3878. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  3879.     AH = 42h
  3880.     AL = origin of move
  3881.         00h start of file
  3882.         01h current file position
  3883.         02h end of file
  3884.     BX = file handle
  3885.     CX:DX = offset from origin of new file position
  3886. Return: CF clear if successful
  3887.         DX:AX = new file position in bytes from start of file
  3888.     CF set on error
  3889.         AX = error code (01h,06h) (see #0789 at AH=59h)
  3890. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  3891.       start of the file; no error is returned in that case, but subsequent
  3892.       attempts at I/O will produce errors
  3893.     if the new position is beyond the current end of file, the file will
  3894.       be extended by the next write (see AH=40h)
  3895. BUG:    using this method to grow a file from zero bytes to a very large size
  3896.       can corrupt the FAT in some versions of DOS; the file should first
  3897.       be grown from zero to one byte and then to the desired large size
  3898. SeeAlso: AH=24h,INT 2F/AX=1228h
  3899. --------v-214203-----------------------------
  3900. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  3901.     AX = 4203h
  3902. Return: AX = 1234h if resident
  3903. SeeAlso: AX=3DFFh,AX=4243h
  3904. --------v-214243-----------------------------
  3905. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  3906.     AX = 4243h
  3907. Return: AX = 5678h if resident
  3908. SeeAlso: AX=4203h,AX=4B04h
  3909. --------D-214300-----------------------------
  3910. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  3911.     AX = 4300h
  3912.     DS:DX -> ASCIZ filename
  3913. Return: CF clear if successful
  3914.         CX = file attributes (see #0554)
  3915.         AX = CX (DR-DOS 5.0)
  3916.     CF set on error
  3917.         AX = error code (01h,02h,03h,05h) (see #0789 at AH=59h)
  3918. Notes:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  3919.     under DR-DOS 3.41 and 5.0, attempts to change the subdirectory bit are
  3920.       simply ignored without an error
  3921. BUG:    Windows for Workgroups returns error code 05h (access denied) instead
  3922.       of error code 02h (file not found) when attempting to get the
  3923.       attributes of a nonexistent file.  This causes open() with O_CREAT
  3924.       and fopen() with the "w" mode to fail in Borland C++.
  3925. SeeAlso: AX=4301h,AX=4310h,AH=71h,AH=B6h,INT 2F/AX=110Fh,INT 60/DI=0517h
  3926. --------D-214301-----------------------------
  3927. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  3928.     AX = 4301h
  3929.     CX = new file attributes (see #0554)
  3930.     DS:DX -> ASCIZ filename
  3931. Return: CF clear if successful
  3932.         AX destroyed
  3933.     CF set on error
  3934.         AX = error code (01h,02h,03h,05h) (see #0789 at AH=59h)
  3935. Notes:    will not change volume label or directory attribute bits, but will
  3936.       change the other attribute bits of a directory (the directory
  3937.       bit must be cleared to successfully change the other attributes of a
  3938.       directory, but the directory will not be changed to a normal file as
  3939.       a result)
  3940.     MS-DOS 4.01 reportedly closes the file if it is currently open
  3941.     for security reasons, the Novell NetWare execute-only bit can never
  3942.       be cleared; the file must be deleted and recreated
  3943.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  3944.     DOS 5.0 SHARE will close the file if it is currently open in sharing-
  3945.       compatibility mode, otherwise a sharing violation critical error is
  3946.       generated if the file is currently open
  3947. SeeAlso: AX=4300h,AX=4311h,AH=71h,INT 2F/AX=110Eh
  3948.  
  3949. Bitfields for file attributes:
  3950. Bit(s)    Description    (Table 0554)
  3951.  7    shareable (Novell NetWare)
  3952.  6    unused
  3953.  5    archive
  3954.  4    directory
  3955.  3    volume label
  3956.     execute-only (Novell NetWare)
  3957.  2    system
  3958.  1    hidden
  3959.  0    read-only
  3960. --------D-214302-----------------------------
  3961. INT 21 - DOS 7 (Chicago) - GET VOLUME INFORMATION
  3962.     AX = 4302h
  3963.     details not yet available
  3964. SeeAlso: AH=71h,AH=72h
  3965. --------O-214302-----------------------------
  3966. INT 21 - DR-DOS 3.41+ internal - GET ACCESS RIGHTS
  3967.     AX = 4302h
  3968.     DS:DX -> ASCIZ pathname
  3969. Return: CF clear if successful
  3970.         CX = access rights (see #0555)
  3971.         AX = CX (DR-DOS 5.0)
  3972.     CF set on error
  3973.         AX = error code
  3974. Desc:    Determine which operations the calling program may perform on a
  3975.       specified file without being required to provide a password.
  3976. Notes:    this protection scheme has been coordinated on all current Digital
  3977.       Research/Novell operating systems (DR-DOS 3.41+, DRMDOS 5.x, and
  3978.       FlexOS 2+)
  3979.     this function is documented in DR-DOS 6.0 and corresponds to the
  3980.       "Get/Set File Attributes" function, subfunction 2, documented in
  3981.       Concurrent DOS.
  3982.     only FlexOS actually uses the "execution" bits; DR-DOS 3.41+ treats
  3983.       them as "read" bits.
  3984.     DR-DOS 3.41-5.x only use bits 0-3.  Only DR-DOS 6.0 using a
  3985.       DRMDOS 5.x security system allowing for users and groups uses bits
  3986.       4-11.
  3987. SeeAlso: AX=4303h
  3988.  
  3989. Bitfields for DR-DOS file access rights:
  3990. Bit(s)    Description    (Table 0555)
  3991.  0    owner delete requires password
  3992.  1    owner execution requires password (FlexOS)
  3993.  2    owner write requires password
  3994.  3    owner read requires password
  3995.  4    group delete requires password
  3996.  5    group execution requires password (FlexOS)
  3997.  6    group write requires password
  3998.  7    group read requires password
  3999.  8    world delete requires password
  4000.  9    world execution requires password (FlexOS)
  4001.  10    world write requires password
  4002.  11    world read requires password
  4003. --------O-214303-----------------------------
  4004. INT 21 - DR-DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  4005.     AX = 4303h
  4006.     CX = access rights
  4007.          bits 11-0: access rights (see #0555)
  4008.          bit 15: new password is to be set
  4009.     DS:DX -> ASCIZ pathname
  4010.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  4011. Return: CF clear if successful
  4012.     CF set on error
  4013.         AX = error code
  4014. Notes:    if the file is already protected, the old password must be added after
  4015.       the pathname, separated by a ";"
  4016.     this function is documented in DR-DOS 6.0 and corresponds to the
  4017.       "Get/Set File Attributes" function, subfunction 3, documented in
  4018.       Concurrent DOS.
  4019. SeeAlso: AH=0Fh,AH=17h,AX=4302h"DR-DOS",AX=4305h,AX=4454h
  4020. --------O-214304-----------------------------
  4021. INT 21 U - DR-DOS 5.0-6.0 internal - GET ENCRYPTED PASSWORD
  4022.     AX = 4304h
  4023.     DS:DX -> ASCIZ filename
  4024.     ???
  4025. Return: CF clear if successful
  4026.         CX = AX = 0000h if no password assigned to file
  4027.     CF set on error
  4028.         AX = error code (see #0789 at AH=59h)
  4029. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  4030. SeeAlso: AX=4303h,AX=4305h
  4031. --------O-214305-----------------------------
  4032. INT 21 U - DR-DOS 5.0-6.0 internal - SET EXTENDED FILE ATTRIBUTES
  4033.     AX = 4305h
  4034.     DS:DX -> ASCIZ filename
  4035.     ???
  4036. Return: CF clear if successful
  4037.     CF set on error
  4038.         AX = error code (see #0789 at AH=59h)
  4039. Desc:    this function allows the extended attributes, and optionally the
  4040.       encrypted password, of a file to be set.
  4041. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  4042. SeeAlso: AX=4304h,AX=4311h
  4043. --------O-214306-----------------------------
  4044. INT 21 - DR-DOS 6.0 - GET FILE OWNER
  4045.     AX = 4306h
  4046.     DS:DX -> ASCIZ filename
  4047. Return: CF clear if successful
  4048.         AX = CX = value set with AX=4307h
  4049.     CF set on error
  4050.         AX = error code (see #0789 at AH=59h)
  4051. SeeAlso: AX=4307h
  4052. --------O-214307-----------------------------
  4053. INT 21 - DR-DOS 6.0 - SET FILE OWNER
  4054.     AX = 4307h
  4055.     CX = ??? (owner identification number?)
  4056.     DS:DX -> ASCIZ filename
  4057. Return: CF clear if successful
  4058.     CF set on error
  4059.         AX = error code (see #0789 at AH=59h)
  4060. SeeAlso: AX=4306h
  4061. --------N-214310-----------------------------
  4062. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  4063.     AX = 4310h
  4064.     DS:DX -> ASCIZ filename
  4065. Return: CF clear if successful
  4066.         CH = attributes (see #0556)
  4067.     CF set on error
  4068.         AX = error code (01h,02h,03h,05h) (see #0789 at AH=59h)
  4069. Note:    the filename may be a directory but must be on a VINES file service
  4070. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  4071. --------N-214311-----------------------------
  4072. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  4073.     AX = 4311h
  4074.     CH = new attributes (see #0556)
  4075.     DS:DX -> ASCIZ filename
  4076. Return: CF clear if successful
  4077.     CF set on error
  4078.         AX = error code (01h,02h,03h,05h) (see #0789 at AH=59h)
  4079. Note:    the filename may be a directory but must be on a VINES file service
  4080. SeeAlso: AX=4301h,AX=4305h,AX=4310h,INT 2F/AX=110Eh
  4081.  
  4082. Bitfields for VINES extended file attributes:
  4083. Bit(s)    Description    (Table 0556)
  4084.  7    unused
  4085.  6    shareable
  4086.  5    execute-only
  4087.  4-0    unused
  4088. --------O-214380-----------------------------
  4089. INT 21 - Novell DOS 7 - UNDELETE PENDING DELETE FILE
  4090.     AX = 4380h
  4091.     ???
  4092. Return: ???
  4093. SeeAlso: AH=41h,AX=4381h
  4094. --------O-214381-----------------------------
  4095. INT 21 - Novell DOS 7 - PURGE PENDING DELETE FILE
  4096.     AX = 4381h
  4097.     ???
  4098. Return: ???
  4099. SeeAlso: AH=41h,AX=4380h
  4100. --------D-214400-----------------------------
  4101. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  4102.     AX = 4400h
  4103.     BX = handle
  4104. Return: CF clear if successful
  4105.         DX = device information word (see #0557)
  4106.         AX destroyed
  4107.     CF set on error
  4108.         AX = error code (01h,05h,06h) (see #0789 at AH=59h)
  4109. Notes:    value in DH corresponds to high byte of device driver's attribute word
  4110.       if handle refers to a character device
  4111.     Novell NetWare reportedly does not return a drive number in bits 5-0
  4112.       for a disk file
  4113. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  4114.  
  4115. Bitfields for device information word:
  4116. Bit(s)    Description    (Table 0557)
  4117.  character device
  4118.   14    device driver can process IOCTL requests (see AX=4402h)
  4119.   13    output until busy supported
  4120.   11    driver supports OPEN/CLOSE calls
  4121.    7    set (indicates device)
  4122.    6    EOF on input
  4123.    5    raw (binary) mode
  4124.    4    device is special (uses INT 29)
  4125.    3    clock device
  4126.    2    NUL device
  4127.    1    standard output
  4128.    0    standard input
  4129.  disk file
  4130.   15    file is remote (DOS 3+)
  4131.   14    don't set file date/time on closing (DOS 3+)
  4132.   11    media not removable
  4133.    8    (DOS 4 only) generate INT 24 if no disk space on write or read past
  4134.       end of file
  4135.    7    clear (indicates file)
  4136.    6    file has not been written
  4137.   5-0    drive number (0 = A:)
  4138. --------D-214401-----------------------------
  4139. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  4140.     AX = 4401h
  4141.     BX = handle (must refer to character device)
  4142.     DX = device information word (see #0557)
  4143.         (DH must be zero)
  4144. Return: CF clear if successful
  4145.     CF set on error
  4146.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4147. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  4148. --------D-214402-----------------------------
  4149. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  4150.     AX = 4402h
  4151.     BX = file handle referencing character device
  4152.     CX = number of bytes to read
  4153.     DS:DX -> buffer
  4154. Return: CF clear if successful
  4155.         AX = number of bytes actually read
  4156.     CF set on error
  4157.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4158. Note:    format of data is driver-specific (see below for some specific cases)
  4159. SeeAlso: AX=4400h,AX=4403h,AX=4404h,INT 2F/AX=122Bh
  4160. --------N-214402-----------------------------
  4161. INT 21 - Network Driver Interface Specification (NDIS) 2.0.1 - PROTOCOL MANAGER
  4162.     AX = 4402h
  4163.     BX = file handle for device "PROTMAN$"
  4164.     CX = 000Eh (size of request block)
  4165.     DS:DX -> request block (see #0558,#0559,#0560,#0561,#0562,#0566,#0567)
  4166. Return: CF clear if successful
  4167.         AX = number of bytes actually read
  4168.     CF set on error
  4169.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4170. SeeAlso: AX=4402h"FTPSOFT"
  4171.  
  4172. Format of NDIS request block for GetProtocolManagerInfo:
  4173. Offset    Size    Description    (Table 0558)
  4174.  00h    WORD    01h
  4175.  02h    WORD    returned status (see #0568)
  4176.  04h    DWORD    returned pointer to structure representing parsed user config
  4177.  08h    DWORD    unused
  4178.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  4179. SeeAlso: #0559,#0560,#0561,#0562,#0563,#0564,#0565,#0566,#0567
  4180.  
  4181. Format of NDIS request block for RegisterModule:
  4182. Offset    Size    Description    (Table 0559)
  4183.  00h    WORD    02h
  4184.  02h    WORD    returned status (see #0568)
  4185.  04h    DWORD    pointer to module's common characteristics table (see #0569)
  4186.  08h    DWORD    pointer to list of modules to which the module is to be bound
  4187.  0Ch    WORD    unused
  4188. SeeAlso: #0558,#0560,#0561,#0562,#0563,#0564,#0565,#0566,#0567
  4189.  
  4190. Format of NDIS request block for BindAndStart:
  4191. Offset    Size    Description    (Table 0560)
  4192.  00h    WORD    03h
  4193.  02h    WORD    returned status (see #0568)
  4194.  04h    DWORD    caller's virtual address in FailingModules structure
  4195.  08h    DWORD    unused
  4196.  0Ch    WORD    unused
  4197. SeeAlso: #0558,#0559,#0561,#0562,#0563,#0564,#0565,#0566,#0567
  4198.  
  4199. Format of NDIS request block for GetProtocolManagerLinkage:
  4200. Offset    Size    Description    (Table 0561)
  4201.  00h    WORD    04h
  4202.  02h    WORD    returned status (see #0568)
  4203.  04h    DWORD    returned dispatch point
  4204.  08h    DWORD    unused
  4205.  0Ch    WORD    returned protocol manager DS
  4206. Note:    the dispatch point may be called as follows instead of using this IOCTL
  4207.     STACK: WORD  protocol manager DS
  4208.            DWORD pointer to request block
  4209.     Return: AX = returned status
  4210.         STACK popped
  4211. SeeAlso: #0558,#0559,#0560,#0562,#0563,#0564,#0565,#0566,#0567
  4212.  
  4213. Format of NDIS request block for GetProtocolIniPath:
  4214. Offset    Size    Description    (Table 0562)
  4215.  00h    WORD    05h
  4216.  02h    WORD    returned status (see #0568)
  4217.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  4218.  08h    DWORD    unused
  4219.  0Ch    WORD    buffer length
  4220. SeeAlso: #0558,#0559,#0560,#0561,#0563,#0564,#0565,#0566,#0567
  4221.  
  4222. Format of NDIS request block for RegisterProtocolManagerInfo:
  4223. Offset    Size    Description    (Table 0563)
  4224.  00h    WORD    06h
  4225.  02h    WORD    returned status (see #0568)
  4226.  04h    DWORD    pointer to structure containing parsed user config file
  4227.  08h    DWORD    unused
  4228.  0Ch    WORD    length of structure
  4229. SeeAlso: #0558,#0559,#0560,#0561,#0562,#0564,#0565,#0566,#0567
  4230.  
  4231. Format of NDIS request block for InitAndRegister:
  4232. Offset    Size    Description    (Table 0564)
  4233.  00h    WORD    07h
  4234.  02h    WORD    returned status (see #0568)
  4235.  04h    DWORD    unused
  4236.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  4237.  0Ch    WORD    unused
  4238. SeeAlso: #0558,#0559,#0560,#0561,#0562,#0563,#0565,#0566,#0567
  4239.  
  4240. Format of NDIS request block for UnbindAndStop:
  4241. Offset    Size    Description    (Table 0565)
  4242.  00h    WORD    08h
  4243.  02h    WORD    returned status (see #0568)
  4244.  04h    DWORD    failing modules as for BindAndStart
  4245.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  4246.         if 0000h:0000h, terminate a set of previously dynamically
  4247.           bound protocol modules
  4248.  0Ch    WORD    unused
  4249. SeeAlso: #0558,#0559,#0560,#0561,#0562,#0563,#0564,#0566,#0567
  4250.  
  4251. Format of NDIS request block for BindStatus:
  4252. Offset    Size    Description    (Table 0566)
  4253.  00h    WORD    09h
  4254.  02h    WORD    returned status (see #0568)
  4255.  04h    DWORD    must be 0000h:0000h
  4256.         on return, points to root tree
  4257.  08h    DWORD    0000h:0000h
  4258.  0Ch    WORD    unused under DOS
  4259. SeeAlso: #0558,#0559,#0560,#0561,#0562,#0563,#0564,#0565,#0567
  4260.  
  4261. Format of NDIS request block for RegisterStatus:
  4262. Offset    Size    Description    (Table 0567)
  4263.  00h    WORD    0Ah
  4264.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see #0568)
  4265.  04h    DWORD    0000h:0000h
  4266.  08h    DWORD    pointer to 16-byte ASCIZ module name
  4267.  0Ch    WORD    0000h
  4268. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  4269. SeeAlso: #0558,#0559,#0560,#0561,#0562,#0563,#0564,#0565,#0566
  4270.  
  4271. (Table 0568)
  4272. Values for NDIS status code:
  4273.  0000h    success
  4274.  0001h    wait for release--protocol has retained control of the data buffer
  4275.  0002h    request queued
  4276.  0003h    frame not recognized
  4277.  0004h    frame rejected
  4278.  0005h    frame should be forwarded
  4279.  0006h    out of resource
  4280.  0007h    invalid parameter
  4281.  0008h    invalid function
  4282.  0009h    not supported
  4283.  000Ah    hardware error
  4284.  000Bh    transmit error
  4285.  000Ch    unrecognized destination
  4286.  000Dh    buffer too small
  4287.  0020h    already started
  4288.  0021h    binding incomplete
  4289.  0022h    driver not initialized
  4290.  0023h    hardware not found
  4291.  0024h    hardware failure
  4292.  0025h    configuration failure
  4293.  0026h    interrupt conflict
  4294.  0027h    MAC incompatible
  4295.  0028h    initialization failed
  4296.  0029h    no binding
  4297.  002Ah    network may be disconnected
  4298.  002Bh    incompatible OS version
  4299.  002Ch    already registered
  4300.  002Dh    path not found
  4301.  002Eh    insufficient memory
  4302.  002Fh    info not found
  4303.  00FFh    general failure
  4304.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  4305.  
  4306. Format of NDIS common characteristics table:
  4307. Offset    Size    Description    (Table 0569)
  4308.  00h    WORD    size of table in bytes
  4309.  02h    BYTE    NDIS major version
  4310.  03h    BYTE    NDIS minor version
  4311.  04h    WORD    reserved
  4312.  06h    BYTE    module major version
  4313.  07h    BYTE    module minor version
  4314.  08h    DWORD    module function flag bits
  4315.         bit 0: binding at upper boundary supported
  4316.         bit 1: binding at lower boundary supported
  4317.         bit 2: dynamically bound
  4318.         bits 3-31 reserved, must be 0
  4319.  0Ch 16 BYTEs    ASCIZ module name
  4320.  1Ch    BYTE    upper boundary protocol level (see #0570)
  4321.  1Dh    BYTE    upper boundary interface type
  4322.         for MACs: 1 = MAC
  4323.         for data links and transports: to be defined
  4324.         for session: 1 = NCB
  4325.         any level: 0 = private (ISV-defined)
  4326.  1Eh    BYTE    lower boundary protocol level (see #0570)
  4327.  1Fh    BYTE    lower boundary interface type
  4328.         same as offset 1Dh
  4329.  20h    WORD    module ID filled in by protocol manager
  4330.  22h    WORD    module DS
  4331.  24h    DWORD    system request entry point
  4332.  28h    DWORD    pointer to service-specific characteristics (see #0572,#0574)
  4333.         0000h:0000h if none
  4334.  2Ch    DWORD    pointer to service-specific status, or 0000h:0000h if none
  4335.  30h    DWORD    pointer to upper dispatch table (see #0571)
  4336.         0000h:0000h if none
  4337.  34h    DWORD    pointer to lower dispatch table (see #0571)
  4338.         0000h:0000h if none
  4339.  38h  2 DWORDs    reserved, must be 0
  4340. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  4341.       interpreted as 01h
  4342.  
  4343. (Table 0570)
  4344. Values for NDIS boundary protocol level:
  4345.  00h    physical
  4346.  01h    Media Access Control
  4347.  02h    Data link
  4348.  03h    network
  4349.  04h    transport
  4350.  05h    session
  4351.  FFh    not specified
  4352.  
  4353. Format of NDIS dispatch table:
  4354. Offset    Size    Description    (Table 0571)
  4355.  00h    DWORD    -> common characteristics table (see #0569)
  4356.  04h  4 BYTEs    ???
  4357.  08h    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  4358.  0Ch    DWORD    -> ??? function (called with 10 bytes of stack arguments)
  4359.  10h    DWORD    -> ??? function (called with 16 bytes of stack arguments)
  4360.  14h    DWORD    -> ??? function (called with 4 bytes of stack arguments)
  4361.  18h    DWORD    -> ??? function (called with 18 bytes of stack arguments)
  4362.  1Ch    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  4363.  
  4364. Format of MAC Service-Specific Characteristics Table:
  4365. Offset    Size    Description    (Table 0572)
  4366.  00h    WORD    length of table in bytes
  4367.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  4368.           "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  4369.           "HDLC", or "ISDN"
  4370.  12h    WORD    length of station addresses in bytes
  4371.  14h 16 BYTEs    permanent station address
  4372.  24h 16 BYTEs    current station address
  4373.  34h    DWORD    current functional adapter address (00000000h if none)
  4374.  38h    DWORD    pointer to multicast address list
  4375.  3Ch    DWORD    link speed in bits/sec
  4376.  40h    DWORD    service flags (see #0573)
  4377.  44h    WORD    maximum frame size which may be both sent and received
  4378.  46h    DWORD    total transmit buffer capacity in bytes
  4379.  4Ah    WORD    transmit buffer allocation block size in bytes
  4380.  4Ch    DWORD    total receive buffer capacity in bytes
  4381.  50h    WORD    receive buffer allocation block size in bytes
  4382.  52h  3 BYTEs    IEEE vendor code
  4383.  55h    BYTE    vendor adapter code
  4384.  56h    DWORD    pointer to ASCIZ vendor adapter description
  4385.  5Ah    WORD    IRQ used by adapter
  4386.  5Ch    WORD    transmit queue depth
  4387.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  4388.  60h  N BYTEs    vendor-specific info
  4389.  
  4390. Bitfields for service flags:
  4391. Bit(s)    Description    (Table 0573)
  4392.  0    supports broadcast
  4393.  1    supports multicast
  4394.  2    supports functional/group addressing
  4395.  3    supports promiscuous mode
  4396.  4    station address software settable
  4397.  5    statistics always current
  4398.  6    supports InitiateDiagnostics
  4399.  7    supports loopback
  4400.  8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  4401.     indications
  4402.  9    supports IBM source routing
  4403.  10    supports MAC reset
  4404.  11    supports Open/Close adapter
  4405.  12    supports interrupt request
  4406.  13    supports source routing bridge
  4407.  14    supports GDT virtual addresses (OS/2 version)
  4408.  15    multiple TransferDatas allowed durign a single indication
  4409.  16    MAC normally sets FrameSize = 0 in ReceiveLookahead
  4410.  17-31    reserved, must be 0
  4411.  
  4412. Format of NetBIOS Service-Specific Characteristics Table:
  4413. Offset    Size    Description    (Table 0574)
  4414.  00h    WORD    length of table in bytes
  4415.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  4416.  12h    WORD    NetBIOS module code
  4417.  14h  N BYTEs    vendor-specific info
  4418.  
  4419. Format of MAC Service-Specific Status Table:
  4420. Offset    Size    Description    (Table 0575)
  4421.  00h    WORD    length of table in bytes
  4422.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  4423.         (FFFFFFFFh = never)
  4424.  06h    DWORD    MAC status bits (see #0576)
  4425.  0Ah    WORD    current packet filter flags (see #0577)
  4426.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  4427.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  4428.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  4429.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  4430.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  4431.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  4432.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  4433.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  4434.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  4435.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  4436.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  4437.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  4438.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  4439.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  4440.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  4441.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  4442.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  4443.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  4444.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  4445.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  4446.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  4447.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  4448.  64h  N BYTEs    vendor-specific info
  4449.  
  4450. Bitfields for MAC status bits:
  4451. Bit(s)    Description    (Table 0576)
  4452.  0-2    operational status
  4453.     000 hardware not installed
  4454.     001 hardware failed startup diagnostics
  4455.     010 hardware configuration problem
  4456.     011 hardware fault
  4457.     100 operating marginally due to soft faults
  4458.     101 reserved
  4459.     110 reserved
  4460.     111 hardware fully operational
  4461.  3    MAC bound
  4462.  4    MAC open
  4463.  5    diagnostics in progress
  4464.  6-31    reserved
  4465.  
  4466. Bitfields for packet filter flags:
  4467. Bit(s)    Description    (Table 0577)
  4468.  0    directed/multicast or group/functional
  4469.  1    broadcast
  4470.  2    promiscuous
  4471.  3    all source routing
  4472.  4-15    reserved, must be zero
  4473. --------I-214402-----------------------------
  4474. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  4475.     AX = 4402h
  4476.     BX = handle for character device "GDMS"
  4477.     CX = number of bytes to read (>= 4)
  4478.     DS:DX -> buffer (see #0578)
  4479. Return: CF set on error
  4480.         AX = error code (see #0789 at AH=59h)
  4481.     CF clear if successful
  4482.         AX = number of bytes read
  4483.  
  4484. Format of System 36/38 emulator returned data:
  4485. Offset    Size    Description    (Table 0578)
  4486.  00h  4 BYTEs    ???
  4487.  04h    DWORD    pointer to ???
  4488.  08h  4 BYTEs    ???
  4489. --------m-214402-----------------------------
  4490. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  4491.     AX = 4402h
  4492.     BX = handle for device "LA$TBYTE"
  4493.     CX = 0004h
  4494.     DS:DX -> DWORD to hold address of 39-byte table of ???
  4495. Return: CF set on error
  4496.         AX = error code (see #0789 at AH=59h)
  4497.     CF clear if successful
  4498.         AX = number of bytes read
  4499. Program: LASTBYTE.SYS is part of the shareware "The Last Byte" memory
  4500.       management package by Key Software Products
  4501. SeeAlso: AX=4402h"HIGHUMM"
  4502. --------m-214402-----------------------------
  4503. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  4504.     AX = 4402h
  4505.     BX = handle for device "KSP$UMM"
  4506.     CX = 0004h
  4507.     DS:DX -> DWORD to hold entry point
  4508. Return: CF set on error
  4509.         AX = error code (see #0789 at AH=59h)
  4510.     CF clear if successful
  4511.         AX = number of bytes read
  4512. Program: HIGHUMM.SYS is part of the shareware "The Last Byte" memory management
  4513.       package by Key Software Products
  4514. SeeAlso: AX=4402h"LASTBYTE"
  4515.  
  4516. (Table 0579)
  4517. Call HIGHUMM.SYS entry point with:
  4518.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  4519.         DX = size in paragraphs
  4520.         Return: BX = segment number (if successful)
  4521.             DX = size of requested block/size of largest block
  4522.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  4523.         DX = segment number of UMB
  4524.     AH = 02h request a bank-switched memory block
  4525.         DX = size in paragraphs
  4526.         Return: BX = segment number (if successful)
  4527.             DX = size of requested block/size of largest block
  4528.     AH = 03h release a bank-switched memory block
  4529.         DX = segment number
  4530.     AH = 04h transfer data to/from high memory
  4531.         DS:SI -> source
  4532.         ES:DI -> destination
  4533.         CX = length in bytes
  4534.         Note: enables bank-switched memory, does the copy, then disables
  4535.         bank-switched memory
  4536.     AH = 05h get a word from bank-switched memory
  4537.         ES:DI -> word to read
  4538.         Return: DX = word
  4539.     AH = 06h put a word to bank-switched memory
  4540.         ES:DI -> word to write
  4541.         DX = word
  4542.     AH = 07h put a byte to bank-switched memory
  4543.         ES:DI -> byte to write
  4544.         DL = byte
  4545.     AH = 08h enable bank-switched memory
  4546.         DS:SI -> 6-byte status save area
  4547.     AH = 09h disable bank-switched memory
  4548.         DS:SI -> 6-byte save area from enable call (AH=08h)
  4549.     AH = 0Ah assign name to UMB or high bank-switched block
  4550.         DX = segment number
  4551.         DS:SI -> 8-byte blank-padded name
  4552.     AH = 0Bh locate UMB block by name
  4553.         DS:SI -> 8-byte blank-padded name
  4554.         Return: BX = segment number (if successful)
  4555.             DX = size of block
  4556.     AH = 0Ch locate bank-switched block by name
  4557.         DS:SI -> 8-byte blank-padded name
  4558.         Return: BX = segment number (if successful)
  4559.             DX = size of block
  4560. Return: AX = status code
  4561.         0001h successful
  4562.         0000h failed
  4563.         BL = error code
  4564.             80h not implemented
  4565.             B0h insufficient memory, smaller block available
  4566.             B1h insufficient memory, no blocks available
  4567.             B2h invalid segment number
  4568. Note:    only functions 00h and 01h are always available; the remaining
  4569.       functions are only enabled if the proper commandline switch is given
  4570. --------c-214402-----------------------------
  4571. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - GET CACHE STATUS
  4572.     AX = 4402h
  4573.     BX = file handle for device "SMARTAAR"
  4574.     CX = number of bytes to read (min 28h)
  4575.     DS:DX -> buffer for status record (see #0580)
  4576. Return: CF clear if successful
  4577.         AX = number of bytes actually read
  4578.     CF set on error
  4579.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4580. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  4581.  
  4582. Format of SMARTDRV status record:
  4583. Offset    Size    Description    (Table 0580)
  4584.  00h    BYTE    write-through flag (always 01h)
  4585.  01h    BYTE    writes should be buffered (always 00h)
  4586.  02h    BYTE    cache enabled if 01h
  4587.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  4588.  04h    WORD    clock ticks between cache flushes (currently unused)
  4589.  06h    BYTE    cache contains locked tracks if nonzero
  4590.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  4591.  08h    BYTE    cache full track writes if nonzero
  4592.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  4593.  0Ah    DWORD    original INT 13 vector
  4594.  0Eh    BYTE    minor version number
  4595.  0Fh    BYTE    major version number
  4596.  10h    WORD    unused
  4597.  12h    WORD    sectors read            \
  4598.  14h    WORD    sectors already in cache     > may be scaled rather than
  4599.  16h    WORD    sectors already in track buffer /  absolute counts
  4600.  18h    BYTE    cache hit rate in percent
  4601.  19h    BYTE    track buffer hit rate in percent
  4602.  1Ah    WORD    total tracks in cache
  4603.  1Ch    WORD    number of tracks in use
  4604.  1Eh    WORD    number of locked tracks
  4605.  20h    WORD    number of dirty tracks
  4606.  22h    WORD    current cache size in 16K pages
  4607.  24h    WORD    original (maximum) cache size in 16K pages
  4608.  26h    WORD    minimum cache size in 16K pages
  4609.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  4610. --------d-214402-----------------------------
  4611. INT 21 - CD-ROM device driver - IOCTL INPUT
  4612.     AX = 4402h
  4613.     BX = file handle referencing character device for CD-ROM driver
  4614.     CX = number of bytes to read
  4615.     DS:DX -> control block (see #0582)
  4616. Return: CF clear if successful
  4617.         AX = number of bytes actually read
  4618.     CF set on error
  4619.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4620. Note:    the data returned depends on the first byte of the control block; the
  4621.       remainder of the control block is filled by the driver
  4622. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  4623.  
  4624. (Table 0581)
  4625. Values for CD-ROM data being requested:
  4626.  00h    device driver header address
  4627.  01h    drive head location
  4628.  02h    reserved
  4629.  03h    error statistics
  4630.  04h    audio channel info
  4631.  05h    raw drive bytes (uninterpreted and device-specific)
  4632.  06h    device status
  4633.  07h    sector size
  4634.  08h    volume size
  4635.  09h    media change status
  4636.  0Ah    audio disk info
  4637.  0Bh    audio track info
  4638.  0Ch    audio Q-Channel info
  4639.  0Dh    audio sub-channel info
  4640.  0Eh    UPC code
  4641.  0Fh    audio status info
  4642.  
  4643. Format of CD-ROM control block:
  4644. Offset    Size    Description    (Table 0582)
  4645.  00h    BYTE    data being requested (see #0581)
  4646. ---function 00h---
  4647.  01h    DWORD    device driver header address (see also AH=52h)
  4648. ---function 01h---
  4649.  01h    BYTE    addressing mode
  4650.         00h HSG
  4651.         01h Red Book
  4652.  02h    DWORD    current location of drive's head
  4653.         logical sector number in HSG mode
  4654.         frame/second/minute/unused in Red Book mode
  4655.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  4656. ---function 03h---
  4657.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  4658. ---function 04h---
  4659.  01h    BYTE    input channel (0-3) for output channel 0
  4660.  02h    BYTE    volume for output channel 0
  4661.  03h    BYTE    input channel (0-3) for output channel 1
  4662.  04h    BYTE    volume for output channel 1
  4663.  05h    BYTE    input channel (0-3) for output channel 2
  4664.  06h    BYTE    volume for output channel 2
  4665.  07h    BYTE    input channel (0-3) for output channel 3
  4666.  08h    BYTE    volume for output channel 3
  4667. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  4668.       right prime; a volume of 00h is off
  4669.     the default setting is for each input channel to be assigned to the
  4670.       same-numbered output channel at full (FFh) volume
  4671. ---function 05h---
  4672.  01h    BYTE    number of bytes read
  4673.  02h 128 BYTEs    buffer for drive bytes
  4674. ---function 06h---
  4675.  01h    DWORD    device parameters (see #0583)
  4676. ---function 07h---
  4677.  01h    BYTE    read mode
  4678.         00h cooked
  4679.         01h raw
  4680.  02h    WORD    sector size in bytes
  4681. ---function 08h---
  4682.  01h    DWORD    volume size in sectors
  4683. ---function 09h---
  4684.  01h    BYTE    media change status
  4685.         00h don't know
  4686.         01h media unchanged
  4687.         FFh media has been changed
  4688. ---function 0Ah---
  4689.  01h    BYTE    lowest audio track number
  4690.  02h    BYTE    highest audio track number
  4691.  03h    DWORD    start address of lead-out track (Red Book format)
  4692. --function 0Bh---
  4693.  01h    BYTE    track number (set by caller)
  4694.  02h    DWORD    starting point of track (Red Book format)
  4695.  06h    BYTE    track control info
  4696.         bits 15,14,12: track type (notice: bits not contiguous!)
  4697.             000 two audio channels, no pre-emphasis
  4698.             001 two audio channels with pre-emphasis
  4699.             010 data track
  4700.             100 four audio channels, no pre-emphasis
  4701.             101 four audio channels with pre-emphasis
  4702.             other reserved
  4703.         bit 13: digital copy permitted
  4704. ---function 0Ch---
  4705.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  4706.  02h    BYTE    track number
  4707.  03h    BYTE    point or index
  4708.  04h    BYTE    minute    \
  4709.  05h    BYTE    second     > running time within track
  4710.  06h    BYTE    frame    /
  4711.  07h    BYTE    zero
  4712.  08h    BYTE    "AMIN" or "PMIN"     \
  4713.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  4714.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  4715. ---function 0Dh---
  4716.  01h    DWORD    starting frame address (Red Book format)
  4717.  05h    DWORD    transfer address
  4718.  09h    DWORD    number of sectors to read
  4719. Note:    copies 96 bytes of sub-channel info per sector into buffer
  4720. ---function 0Eh---
  4721.  01h    BYTE    CONTROL and ADR byte
  4722.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  4723.  09h    BYTE    zero
  4724.  0Ah    BYTE    "AFRAME"
  4725. ---function 0Fh---
  4726.  ??? documentation not yet available
  4727.  01h    WORD    pause status (0000h not paused, 0001h paused)
  4728.  03h    DWORD    audio play start address
  4729.  07h    DWORD    ??? audio play length or end address
  4730.  
  4731. Bitfields for CD-ROM device parameters:
  4732. Bit(s)    Description    (Table 0583)
  4733.  0    door open
  4734.  1    door unlocked
  4735.  2    supports raw reading in addition to cooked
  4736.  3    writable
  4737.  4    can play audio/video tracks
  4738.  5    supports interleaving
  4739.  6    reserved
  4740.  7    supports prefetch requests
  4741.  8    supports audio channel control
  4742.  9    supports Red Book addressing in addition to HSG
  4743.  10    audio is playing
  4744.  11    no disk in drive
  4745.  12    supports R-W subchannels
  4746. --------m-214402-----------------------------
  4747. INT 21 - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  4748.     AX = 4402h
  4749.     BX = file handle for device "QEMM386$"
  4750.     CX = 0004h
  4751.     DS:DX -> DWORD buffer for API entry point
  4752. Return: CF clear if successful
  4753.         buffer filled (see INT 67/AH=3Fh for entry point parameters)
  4754.     CF set on error
  4755.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4756. Note:    Quarterdeck recently (June 1993) documented this function, but the
  4757.       documentation incorrectly states that it is only available for
  4758.       QEMM 6+
  4759. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  4760. --------Q-214402-----------------------------
  4761. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  4762.     AX = 4402h
  4763.     BX = file handle for device "HOOKROM$"
  4764.     CX = 0004h
  4765.     DS:DX -> DWORD buffer for address of hooked vector table (see #0584)
  4766. Return: CF clear if successful
  4767.         DS:DX buffer filled
  4768.     CF set on error
  4769.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4770. SeeAlso: AX=4402h/SF=01h
  4771.  
  4772. Format of HOOKROM.SYS hooked vector table entry:
  4773. Offset    Size    Description    (Table 0584)
  4774.  00h  5 BYTEs    FAR jump to actual interrupt handler
  4775.         (end of table if first byte is not EAh)
  4776.  05h    BYTE    interrupt vector number
  4777. --------d-214402-----------------------------
  4778. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  4779.     AX = 4402h
  4780.     BX = file handle for device "SCSIMGR$"
  4781.     CX = 0004h or 0005h (see notes)
  4782.     DS:DX -> buffer for result (see #0585), set to zeros before call
  4783. Return: CF clear if successful
  4784.         AX = 0004h or 0005h (see notes)
  4785.     CF set on error
  4786.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  4787. Note:    the variant of the call requesting five bytes is an UNDOCUMENTED
  4788.       extension supported by Adaptec's ASPI2DOS.SYS, ASPI4DOS.SYS, and
  4789.       ASPI7DOS.SYS; if made of a host manager which does not support the
  4790.       variant, only four bytes will be returned.  If the variant is
  4791.       supported, Adaptec's WINASPI.DLL assumes that the host manager is
  4792.       an "advanced" one which operates in either real or protected mode
  4793.       (and thus does not require a DPMI INT 31/AX=0301h call to be invoked
  4794.       from protected mode).     Support of the five-byte variant also appears
  4795.       to imply that an advanced ASPI host manager uses no temporary storage
  4796.       space except the SRB and the stack, and that it is fully reentrant.
  4797.     if called with a standard request for four bytes, even Adaptec's
  4798.       advanced drivers return only the requested four bytes containing the
  4799.       ASPI entry point address
  4800.     the function address is called with the address of a SCSI Request
  4801.       Block on the stack and the caller must clean up the stack
  4802. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  4803.  
  4804. Format of ASPI IOCTL result:
  4805. Offset    Size    Description    (Table 0585)
  4806.  00h    DWORD    function address
  4807.  04h    BYTE    number of SCSI host adapters supported by host manager
  4808.  
  4809. (Table 0586)
  4810. Values for ASPI request number:
  4811.  00h    "HA_INQ"    host adapter inquiry
  4812.  01h    "GET_TYPE"    get device type
  4813.  02h    "EXEC_SIO"    execute SCSI I/O
  4814.  03h    "ABORT_SRB"    abort SRB
  4815.  04h    "RESET_DEV"    reset SCSI device
  4816.  05h    "SET_HAPRMS"    set host adapter parameters
  4817.  06h    get disk drive information
  4818.  
  4819. Format of SCSI Request Block (64 bytes):
  4820. Offset    Size    Description    (Table 0587)
  4821.  00h    BYTE    request number (see #0586)
  4822.  01h    BYTE    request status (see #0588)
  4823.  02h    BYTE    host adapter ID
  4824.  03h    BYTE    request flags (see #0589)
  4825.  04h    DWORD    reserved
  4826. ---request 00h---
  4827.  08h    BYTE    (return) number of host adapters
  4828.  09h    BYTE    (return) target adapter ID
  4829.  0Ah 16 BYTEs    (return) SCSI manager ID
  4830.  1Ah 16 BYTEs    (return) host adapter ID
  4831.  2Ah 16 BYTEs    (return) host adapter-unique parameters
  4832. ---request 01h---
  4833.  08h    BYTE    target ID
  4834.  09h    BYTE    logical unit number
  4835.  0Ah    BYTE    (return) device type (see #0592)
  4836. ---request 02h---
  4837.  08h    BYTE    target ID
  4838.  09h    BYTE    logical unit number
  4839.  0Ah    DWORD    data allocation length
  4840.  0Eh    BYTE    sense allocation length
  4841.  0Fh    DWORD    data buffer pointer
  4842.  13h    DWORD    next request pointer (for linking)
  4843.  17h    BYTE    CDB length
  4844.  18h    BYTE    (return) host adapter status (see #0587)
  4845.  19h    BYTE    (return) target status (see #0591)
  4846.  1Ah    DWORD    post routine address
  4847.  1Eh    WORD    real mode Post DS
  4848.  20h    DWORD    SRB pointer
  4849.  24h    WORD    reserved
  4850.  26h    DWORD    SRB physical address
  4851.  2Ah 22 BYTEs    SCSIMGR$ workspace
  4852.  40h  N BYTEs    CCB, including sense data (20-24 bytes)
  4853. ---request 03h---
  4854.  08h    DWORD    address of SRB to abort
  4855. ---request 04h---
  4856.  08h    BYTE    target ID
  4857.  09h    BYTE    logical unit number
  4858.  0Ah 14 BYTEs    reserved
  4859.  18h    BYTE    (return) host adapter status (see #0590)
  4860.  19h    BYTE    (return) target status (see #0591)
  4861.  1Ah    DWORD    post routine address
  4862.  1Eh 34 BYTEs    workspace
  4863. ---request 05h---
  4864.  08h 16 BYTEs    host adapter-unique parameters
  4865. ---request 06h---
  4866.  08h    BYTE    target ID
  4867.  09h    BYTE    logical unit number
  4868.  0Ah    BYTE    disk drive flags
  4869.  0Bh    BYTE    INT 13h drive number
  4870.  0Ch    BYTE    preferred head number translation
  4871.  0Dh    BYTE    preferred sector size translation
  4872.  0Eh 10 BYTEs    reserved
  4873.  
  4874. (Table 0588)
  4875. Values for ASPI request status:
  4876.  00h    not done yet
  4877.  01h    completed successfully
  4878.  02h    aborted by host
  4879.  04h    SCSI I/O error
  4880.  80h    invalid
  4881.  81h    no adapter
  4882.  82h    no device attached
  4883.  else    status
  4884.  
  4885. Bitfields for ASPI request flags:
  4886. Bit(s)    Description    (Table 0589)
  4887.  0    posting enabled
  4888.  1    linking enabled
  4889.  2    direction
  4890.  3    transfer from SCSI target to host
  4891.  4    transfer from host to SCSI target
  4892. Note:    no data is transferred if both bits 3 and 4 are set
  4893.  
  4894. (Table 0590)
  4895. Values for host adapter status:
  4896.  00h    no error detected
  4897.  11h    select timeout
  4898.  12h    data overrun
  4899.  13h    bus error
  4900.  14h    bus failure
  4901.  
  4902. (Table 0591)
  4903. Values for target status:
  4904.  00h    no status
  4905.  02h    sense data stored in SRB
  4906.  08h    target busy
  4907.  18h    reservation error
  4908.  
  4909. (Table 0592)
  4910. Values for device type:
  4911.  00h    disk drive
  4912.  01h    tape drive (streamer)
  4913.  02h    printer
  4914.  03h    processor
  4915.  04h    WORM drive
  4916.  05h    CD-ROM drive
  4917.  06h    scanner
  4918.  07h    optical drive
  4919.  08h    autochanger
  4920.  09h    communications device
  4921.  
  4922. (Table 0593)
  4923. Values for disk drive flags:
  4924.  00h    no INT 13 access
  4925.  01h    INT 13 with DOS access
  4926.  02h    INT 13 without DOS access
  4927.  03h    invalid flags
  4928.  
  4929. Format of CCB:
  4930. Offset    Size    Description    (Table 0594)
  4931.  00h    BYTE    command code (see #0595)
  4932.  01h    BYTE    flags
  4933.         bits 4-0: vary by function
  4934.         bits 7-5: logical unit number
  4935.  02h    BYTE    "adr_1"
  4936.  03h    BYTE    "adr_0"
  4937.  04h    BYTE    length
  4938.  05h    BYTE    control
  4939.     ...
  4940.  06h/0Ah 14 BYTEs buffer for sense data (see #0596)
  4941.  
  4942. (Table 0595)
  4943. Values for CCB command code:
  4944.  00h    test unit ready
  4945.  01h    rewind
  4946.  03h    request sense data
  4947.  05h    get block size limits
  4948.  08h    Group 0 read
  4949.  0Ah    Group 0 write
  4950.  10h    write file marks
  4951.  11h    SCSI Space (set position?)
  4952.  12h    SCSI Inquire
  4953.  15h    set mode information
  4954.  16h    reserve SCSI device
  4955.  17h    release SCSI device
  4956.  19h    erase
  4957.  1Ah    request mode information
  4958.  1Bh    load/unload media
  4959.  1Dh    request target self-check
  4960.  24h    set window parameters
  4961.  25h    get window parameters
  4962.  28h    Group 1 read
  4963.  2Ah    Group 1 write
  4964.  31h    document feeder control
  4965.  34h    get scan data status
  4966. ---vendor-specific commands---
  4967.  D3h    get document feeder status
  4968.  D4h    set document feeder mode
  4969.  
  4970. Format of sense data:
  4971. Offset    Size    Description    (Table 0596)
  4972.  00h    BYTE    error code (bit 7 set if valid)
  4973.  01h    BYTE    segment number
  4974.  02h    BYTE    sense key
  4975.         bit 6: EOM
  4976.         bit 5: ILI
  4977.         bits 0-3: sense key (see #0597)
  4978.  03h  4 BYTEs    information bytes
  4979.  07h    BYTE    additional sense length (0Ah)
  4980.  08h  4 BYTEs    command-specific information
  4981.  0Ch    BYTE    additional sense code
  4982.  0Dh    BYTE    additional sense code qualifier
  4983.  0Eh    BYTE    field replaceable unit code
  4984.  0Fh  3 BYTEs    sense key specific bytes
  4985.  
  4986. (Table 0597)
  4987. Values for sense key:
  4988.  00h    no sense data
  4989.  02h    SCSI unit not ready
  4990.  03h    media error
  4991.  04h    unrecoverable hardware error
  4992.  05h    illegal parameter in CDB
  4993.  06h    target has been reset
  4994.  0Bh    target aborted command
  4995. --------m-214402-----------------------------
  4996. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  4997.     AX = 4402h
  4998.     BX = file handle for device "386MAX$$"
  4999.     CX = number of bytes to read
  5000.     DS:DX -> BYTE 03h followed by 386MAX state buffer (see #0598)
  5001. Return: CF clear if successful
  5002.         buffer at DS:DX+1 filled
  5003.         AX = number of bytes actually copied
  5004.     CF set on error
  5005.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5006. Notes:    if the value given in CX is less than the size of the state record
  5007.       (5Ah for v6.01, 66h for v7.00), only a partial state record will be
  5008.       returned
  5009.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  5010.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  5011.       56h bytes for v5.11.
  5012.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  5013.       the word at offset 25h in the returned state, load all other
  5014.       registers as needed for the desired function, and execute an
  5015.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  5016.       if it is not otherwise modified by the API function.    For safety,
  5017.       in case a function is not supported or 386MAX is not present, SP
  5018.       should be saved and restored around the API call.
  5019.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  5020.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  5021.       make some calls incorrectly
  5022. SeeAlso: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
  5023.  
  5024. Format of 386MAX v6.01+ state:
  5025. Offset    Size    Description    (Table 0598)
  5026.  -1    BYTE    (call) 03h
  5027.  00h  6 BYTEs    signature "386MAX"
  5028.  06h  4 BYTEs    version string "N;NN" or "N.NN" (i.e. "6;01" for v6.01)
  5029.         (';' by default; apparently changed to a period when 386MAX
  5030.         has linked high RAM into DOS's memory chain)
  5031.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  5032.  0Ch  2 BYTEs    ???
  5033.  0Eh    WORD    segment of ??? memory block or 0000h
  5034.  10h    WORD    bit flags 1 (see #0599)
  5035.  12h    WORD    starting address of video memory in KB
  5036.  14h  2 BYTEs    ???
  5037.  16h    WORD    total high DOS memory in KB
  5038.  18h  2 BYTEs    ???
  5039.  1Ah    WORD    available shared memory in KB
  5040.  1Ch    WORD    KBytes extended memory used by 386MAX
  5041.  1Eh  2 BYTEs    ???
  5042.  20h    WORD    total extended memory in KB
  5043.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  5044.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  5045.  26h    WORD    ??? (depends on DOS version)
  5046.  28h    WORD    size of ??? in paragraphs
  5047.  2Ah    DWORD    machine type (see #0607)
  5048.  2Eh    DWORD    -> first DOS memory control block
  5049.  32h    WORD    system configuration flags (see #0600)
  5050.  34h    WORD    debugging flags 1 (see #0601)
  5051.  36h    WORD    debugging flags 2 (see #0602)
  5052.  38h  2 BYTEs    ???
  5053.  3Ah    WORD    segment of first MCB in high memory chain
  5054.  3Ch    WORD    feature flags 1 (see #0604)
  5055.  3Eh    WORD    feature flags 2 (see #0605)
  5056.  40h    WORD    feature flags 3 (see #0606)
  5057.  42h    WORD    segment of first 386MAX control block??? (see #0608)
  5058.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  5059.  46h  4 BYTEs    ???
  5060.  4Ah    WORD    number of K at start of address space swapped with fast
  5061.           extended memory (SWAP= parameter)
  5062.  4Ch  2 BYTEs    ???
  5063.  4Eh    WORD    segment address of ???
  5064.  50h    WORD    debugging flags 3 (see #0603)
  5065.  52h    DWORD    old INT 21h
  5066.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  5067. ---386MAX v7.00---
  5068.  5Ah    DWORD    KB of extended memory managed by 386MAX
  5069.  5Eh    DWORD    bytes of extended memory (EXT= parameter)
  5070.  62h  4 BYTEs    ???
  5071.  
  5072. Bitfields for 386MAX bit flags 1:
  5073. Bit(s)    Description    (Table 0599)
  5074.  1    ???
  5075.  2    allow A20 to be enabled/disabled???
  5076.  3    ??? (cleared by calling INT 67 functions or starting MSWindows)
  5077.  4    high RAM present???
  5078.  5    386MAX in AUTO mode
  5079.  6    386MAX enabled
  5080.  7    386MAX is providing EMS services
  5081.  8    ??? (affects API function 08h)
  5082.  9    A20 gate closed (A20 disabled) (see INT 15/AX=2402h)
  5083.  10    Weitek support enabled
  5084.  11    ???
  5085.  12    ROMs not shadowed???
  5086.  13    QPMS has been used
  5087.  14    ???
  5088.  15    ???
  5089.  
  5090. Bitfields for 386MAX system configuration flags:
  5091. Bit(s)    Description    (Table 0600)
  5092.  1    ROM compressed???
  5093.  3    ???
  5094.  5    386MAX loaded into high memory
  5095.  6    Microchannel bus
  5096.  7    Weitek math coprocessor detected
  5097.  9    ??? (also generates INT 01 on ??? and INT 03 on ???)
  5098.  11    PC/XT (thus only single 8259 interrupt controller present, DMA only
  5099.         in 1st megabyte, etc)
  5100.  13    LMLTOP= specified
  5101.  14    enable A20 control???
  5102.  15    ???
  5103.  
  5104. Bitfields for 386MAX debugging flags 1:
  5105. Bit(s)    Description    (Table 0601)
  5106.  0    DEBUG=LED
  5107.  1    DEBUG=X67
  5108.  2    DEBUG=INV
  5109.  3    DEBUG=EMSPTED
  5110.  4    DEBUG=JMP
  5111.  5    DEBUG=CALL
  5112.  6    DEBUG=HLT
  5113.  7    DEBUG=PMR
  5114.  8    DEBUG=CR3
  5115.  9    DEBUG=CAPS or DEBUG=INT
  5116.  10    DEBUG=RC
  5117.  11    DEBUG=ROM
  5118.  12    DEBUG=XM
  5119.  13    DEBUG=SOR
  5120.  14    DEBUG=XR
  5121.  15    DEBUG=EMSERR (generate INT 01 on returning error from EMS call)
  5122.  
  5123. Bitfields for 386MAX debugging flags 2:
  5124. Bit(s)    Description    (Table 0602)
  5125.  0    DEBUG=ROMSWAP
  5126.  1    DEBUG=UNSHADOWROM
  5127.  2    DEBUG=COMPROM
  5128.  3    DEBUG=DPMIPHYS
  5129.  4    DEBUG=ALLROM
  5130.  5    DEBUG=VMS
  5131.  6    DEBUG=XMS (generate INT 01 on XMS calls)
  5132.  7    DEBUG=I06
  5133.  8    DEBUG=VCPI
  5134.  9    DEBUG=XDMA
  5135.  10    DEBUG=X09
  5136.  13    DEBUG=I67 (generate INT 01 on every INT 67 call)
  5137.  14    DEBUG=EVM (generate INT 01 on entering V86 mode)
  5138.  15    DEBUG=EMSSAVE or DEBUG=VDS
  5139.  
  5140. Bitfields for 386MAX debugging flags 3:
  5141. Bit(s)    Description    (Table 0603)
  5142.  10    DEBUG=EPM
  5143.  12    DEBUG=ABIOS
  5144.  13    DEBUG=XMSPTED
  5145.  14    DEBUG=TIME
  5146.  15    DEBUG=SCRUB
  5147.  
  5148. Bitfields for 386MAX feature flags 1:
  5149. Bit(s)    Description    (Table 0604)
  5150.  1    Weitek present
  5151.  2    no DPMI services
  5152.  3    NODMA
  5153.  4    TERSE
  5154.  5    NOROM
  5155.  6    NOPARITY
  5156.  8    NOFLEX (IGNOREFLEXFRAME)
  5157.  11    don't create UMBs
  5158.  12    don't backfill below video memory (NOLOW)
  5159.  13    FRAME= specified
  5160.  14    EXT= specified
  5161.  15    NOEMS, allow prior expanded memory manager to provide EMS
  5162.  
  5163. Bitfields for 386MAX feature flags 2:
  5164. Bit(s)    Description    (Table 0605)
  5165.  0    UNSHIFT specified (FORCEA20 disabled)
  5166.  1    NOXRAM
  5167.  2    NOSCSI specified
  5168.  3    SCREEN specified
  5169.  4    enabled EISADMA
  5170.  5    slow DMA
  5171.  6    RESETKEYB specified
  5172.  7    ???
  5173.  9    TOP384
  5174.  10    ???
  5175.  11    NOWARMBOOT
  5176.  12    USE= specified
  5177.  13    ROM= specified
  5178.  
  5179. Bitfields for 386MAX feature flags 3:
  5180. Bit(s)    Description    (Table 0606)
  5181.  0    Windows3 support enabled
  5182.  1    SHADOWROM
  5183.  2    don't compress ROM (NOCOMPROM)
  5184.  3    ??? (related to PRGREG=)
  5185.  4    ??? (related to PRGREG=)
  5186.  5    SHADOWRAM
  5187.  6    DOS4 specified
  5188.  7    NOLOADHIGH
  5189.  8    NOPULSE
  5190.  11    FORCEA20
  5191.  12    DMA buffer enabled
  5192.  13    NOSCRUB
  5193.  15    NOFRAME
  5194.  
  5195. Bitfields for 386MAX machine type:
  5196. Bit(s)    Description    (Table 0607)
  5197.  12    Amstrad
  5198.  13    Epson
  5199.  14    Zenith Data Systems
  5200.  15    "ASEM"
  5201.  16    NEC
  5202.  17    "HPRS" model codes 69h and 6Ah
  5203.  18    Dell
  5204.  19    "CA"
  5205.  20    ITT (Xtra Business Systems/Alcatel)
  5206.  21    Toshiba 5100
  5207.  22    Olivetti
  5208.  23    Quadram Quad386 (BIOS model FEh, submodel A6h)
  5209.  24    Tandy???
  5210.  25    AST 386
  5211.  26    INBOARD, ??? version
  5212.  27    INBOARD, ??? version
  5213.  28    INBOARD, ??? version
  5214.  29    "HPRS"
  5215.  30    Compaq 386
  5216.  31    JET386
  5217.  
  5218. Format of 386MAX control block:
  5219. Offset    Size    Description    (Table 0608)
  5220.  00h    WORD    segment of next block (FFFFh if last)
  5221.  02h    WORD    segment of previous block (FFFFh if first)
  5222.  04h 12 BYTEs    filename
  5223.  10h    WORD    resident size in paragraphs
  5224.  12h    WORD    environment size???
  5225.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  5226.  16h  2 BYTEs    ???
  5227.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  5228.  1Ch    DWORD    SIZE=-1 ???
  5229.  20h    DWORD    SIZE= ???
  5230.  24h    BYTE    PRGREG= if specified, else FFh
  5231.  25h    BYTE    ENVREG= if specified, else FFh
  5232.  26h    BYTE    FlexFrame (00h not present, 01h present)
  5233.  27h  3 BYTEs    ???
  5234.  2Ah    BYTE    GROUP= or 00h if not present
  5235.  2Bh    BYTE    ???
  5236.  2Ch    WORD    PSP
  5237.  
  5238. Format of 386MAX high memory info record:
  5239. Offset    Size    Description    (Table 0609)
  5240.  00h    WORD    segment address of memory region
  5241.  02h    WORD    size of memory region in paragraphs
  5242.  04h    BYTE    type or flags???
  5243.         00h if locked out
  5244.         02h if EMS page frame
  5245.         04h if high RAM
  5246.         42h if ROM
  5247.  05h    BYTE    ???
  5248.  
  5249. Format of 386MAX ROM shadowing record:
  5250. Offset    Size    Description    (Table 0610)
  5251.  00h    WORD    logical start segment of ROM??? (may be used by BlueMAX when it
  5252.           squeezes together the ROMs to make room)
  5253.  02h    WORD    physical start segment of ROM
  5254.  04h  2 BYTEs    ???
  5255.  06h    WORD    size of shadowed ROM in paragraphs
  5256.  08h  2 BYTEs    ???
  5257.  0Ah    WORD    flags
  5258.         bit 15: shadowing enabled for this ROM???
  5259.         bit 14: ???
  5260.         bit 13: ???
  5261.         bit 12: ???
  5262.         bit 10: ???
  5263.  
  5264. (Table 0611)
  5265. Values for 386MAX memory type:
  5266.  00h    unused by EMS
  5267.  01h    DOS
  5268.  04h    page frame overlapping ROM???
  5269.  80h    high memory
  5270.  84h    page frame???
  5271.  87h    video ROM???
  5272. Note:    the type may be 00h (unused) if the 16K page is split among different
  5273.       uses (such as ROM and high RAM)
  5274.  
  5275. (Table 0612)
  5276. Call 386MAX API (via OUT DX,AL) with:
  5277.     STACK: WORD value for DX
  5278.     AH = 00h unused
  5279.         Return: AH = 84h (unsupported function)
  5280.     AH = 01h get high memory information
  5281.         ES:DI -> buffer for array of high memory info records
  5282.             (see #0609)
  5283.         Return: CX = number of records placed in buffer
  5284.     AH = 02h get shadowed ROM info
  5285.         ES:DI -> buffer for array of ROM shadowing records (see #0610)
  5286.         Return: CX = number of records placed in buffer
  5287.     AH = 03h get 386MAX state
  5288.         ES:DI -> 90-byte buffer for state (see #0598)
  5289.         Return: AH = 00h (successful)
  5290.             buffer filled
  5291.     AH = 04h get memory types???
  5292.         ES:DI -> buffer for memory type info (array of bytes, one per
  5293.             16K page) (see #0611)
  5294.         Return:    CX = number of bytes placed in buffer
  5295.     AH = 05h get page table entries
  5296.         AL = A20 control (00h enable A20 first, 01h leave unchanged)
  5297.         CX = buffer size in bytes (0000h = enough for all memory from
  5298.             given start to end of memory managed by 386MAX)
  5299.         SI = first K to report (rounded down to 4K page)
  5300.         ES:DI -> buffer for returned page table entries
  5301.         Return: CX = number of bytes returned (four per 4K page)
  5302.             ES:DI buffer filled
  5303.     AH = 06h get memory speed info
  5304.         ES:DI -> buffer for memory speed records (see #0613)
  5305.         Return: AH = 00h (successful)
  5306.             CX = number of bytes placed in buffer
  5307.         Note:    this function can take over a second to execute
  5308.     AH = 07h map/unmap multiple handle pages
  5309.         DX = EMS handle (on stack)
  5310.         STACK: DWORD -> EMS mapping record
  5311.         Return:    AH = status (00h,80h,83h,8Ah,8Bh)
  5312.         Format of EMS mapping record:
  5313.         Offset    Size    Description
  5314.          00h    WORD    function
  5315.                 0000h use physical page numbers
  5316.                 0001h use segment addresses
  5317.          02h    WORD    EMS handle
  5318.          04h    WORD    number of mapping entries following
  5319.          06h 2N WORDs    logical page number and physical page/segment
  5320.                 logical page FFFFh means unmap physical page
  5321.         SeeAlso: INT 67/AH=50h
  5322.     AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
  5323.         AL = ??? (00h or nonzero)
  5324.         Return: AH = status (00h OK, A4h not possible at this time)
  5325.         Note:    if AL=00h, this function always returns success
  5326.     AH = 09h toggle Bit Flags 1 flags
  5327.         BX = bitmask of bit flags 1's flags to toggle (see #0599)
  5328.         Return: AH = 00h (successful)
  5329.         Note:    enables A20 first
  5330.     AH = 0Ah toggle Debugging Flags 1 flags
  5331.         BX = bitmask of Debugging Flags 1's bits to toggle (see #0601)
  5332.         Return: AH = 00h (successful)
  5333.         Notes:    enables A20 first
  5334.             does ??? if bit 3 on after specified bits are toggled
  5335.     AH = 0Bh toggle Debugging Flags 2 flags
  5336.         BX = bitmask of Debugging Flags 2's bits to toggle (see #0602)
  5337.         Return: AH = 00h (successful)
  5338.         Note:    enables A20 first
  5339.     AH = 0Ch toggle feature flags 3
  5340.         BX = bitmask of feature flags 3's bits to toggle (see #0606)
  5341.         Return: AH = 00h (successful)
  5342.         Note:    enables A20 first
  5343.     AH = 0Dh specify 386MAX high-memory location
  5344.         BX = segment address of high-memory real-mode portion of 386MAX
  5345.         CX = current segment of real-mode stub???
  5346.         Return: AH = status (00h successful)
  5347.             ???
  5348.     AH = 0Eh CRT controller register virtualization
  5349.         AL = subfunction
  5350.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  5351.             01h trap accesses to CRTC I/O ports
  5352.     AH = 0Fh reboot system
  5353.         Return: never
  5354.     AH = 10h unused
  5355.         Return: AH = 84h (unsupported function)
  5356.     AH = 11h get high memory information
  5357.         ES:DI -> 96-byte buffer for high memory info
  5358.         Return: AH = 00h (successful)
  5359.             ES:DI buffer filled
  5360.         Notes:    each byte in buffer contains bit flags for a 4K page in
  5361.               the A000h-FFFFh region
  5362.                 bit 0: page is writeable
  5363.                 bit 1: physical address same as linear address
  5364.                 bit 2: EMS page frame
  5365.                 bit 6: page is part of the QPMS window
  5366.             this function can take over a second to execute,
  5367.               because it does a 128K read for each page in an
  5368.               attempt to flush any RAM cache the system may have
  5369.     AH = 12h shadow RAM mapping
  5370.         AL = subfunction
  5371.             00h unshadow ROMs (except page FFh if NOWARMBOOT set)
  5372.             01h map shadow RAM into ROM regions???
  5373.         Return: AH = 00h (successful) if AL=00h or 01h
  5374.             AH = 8Fh otherwise
  5375.     AH = 13h shadow RAM page protection
  5376.         AL = subfunction
  5377.             00h set all shadowed ROM 4K pages to read-only
  5378.             01h set all shadowed ROM 4K pages to read-write
  5379.         Return: AH = 00h (successful) if AL=00h or 01h
  5380.             AH = 8Fh otherwise
  5381.     AH = 14h get Programmable Option Select info???
  5382.         ES:DI -> 54-byte buffer for POS data???
  5383.         Return: AH = 00h if successful
  5384.             AH = A4h on error
  5385.         Note:    the buffer consists of nine 6-byte fields; the first
  5386.               eight for slots 1-8, the last for the system board
  5387.     AH = 15h ???
  5388.         ???
  5389.         Return: ???
  5390.     AH = 16h get 386MAX memory usage screen
  5391.         ES:DI -> buffer for memory info display
  5392.         CX = size of buffer in bytes
  5393.         Return:    ES:DI buffer filled with '$'-terminated string (if
  5394.                 large enough to hold entire usage screen)
  5395.         Note:    the screen is 0303h bytes in v7.00
  5396.     AH = 17h Windows 3 startup/termination
  5397.         AL = subfunction
  5398.             00h Windows3 initializing
  5399.             DX (on stack) = Windows startup flags
  5400.             DI = Windows version number (major in upper byte)
  5401.             ES:BX = 0000h:0000h
  5402.             DS:SI = 0000h:0000h
  5403.             Return: CX = 0000h if OK for Windows to load
  5404.                    <> 0 if Windows should not load
  5405.                 ES:BX -> startup info structure
  5406.                 DS:SI -> Virtual86 mode enable/disable callback
  5407.             01h Windows3 terminating
  5408.             ES:BX -> ???
  5409.             DX (on stack) = Windows exit flags
  5410.             Return: ???
  5411.     AH = 18h QPMS (Qualitas Protected Memory Services)
  5412.         AL = subfunction
  5413.             00h get QPMS configuration
  5414.             Return: BX = starting segment of QPMS memory window
  5415.                 CX = number of 4K pages reserved for QPMS???
  5416.                 DX = number of 4K pages in QPMS window???
  5417.             01h map QPMS memory page???
  5418.             BX = 4K page number within memory reserved for QPMS???
  5419.             CL = 4K page number within QPMS memory window???
  5420.             02h mark all QPMS memory read-only
  5421.             03h mark all QPMS memory read-write
  5422.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  5423.     AH = 19h get linear address for physical address
  5424.         EDX = physical address (low word on stack)
  5425.         Return: AH = status
  5426.                 00h successful
  5427.                 EDX = linear address at which physical address
  5428.                     may be accessed
  5429.                 8Bh physical address currently not addressable
  5430.         Note:    enables A20 first
  5431.     AH = 1Ah set page table entry
  5432.         EDX = new page table entry (low word on stack)
  5433.         ESI = linear address of page to map (bits 0-11 clear)
  5434.         Return: AH = status (00h,8Bh)
  5435.         Note:    enables A20 first
  5436.     AH = 1Bh get ???
  5437.         Return: AH = status
  5438.             BX = ???
  5439.             CX = number of ???
  5440.             EDX = physical address of ???
  5441.     AH = 1Ch get original interrupt vector
  5442.         AL = interrupt vector (00h-7Fh)
  5443.         Return: AH = 00h (successful)
  5444.             EDX = original vector before 386MAX loaded (segment in
  5445.                 high word, offset in low word)
  5446.         Note:    no range checking is performed; requests for INTs 80h-
  5447.               FFh will return random values
  5448.     AH = 1Dh display string???
  5449.         SI = ???
  5450.         Return: AH = 00h (successful)
  5451.             ???
  5452.         Note:    this function appears to be broken in v7.00
  5453.     AH = 1Eh get memory info
  5454.         ES:DI -> memory info (see #0614)
  5455.         Return: ???
  5456.     AH = 1Fh get DPMI host information
  5457.         Return: AX = 0000h if successful
  5458.             BX = DPMI flags (see #1646 at INT 31/AX=0400h)
  5459.             CL = CPU type (02h = 80286, 03h = 80386, etc.)
  5460.             DX = DPMI ver supported (DH=major, DL=2-digit minor)
  5461.             SI = ???
  5462.             ES???:DI -> ???
  5463.         Note:    NOP if NODPMI switch specified
  5464.     AH = 20h (v7.00) get ???
  5465.         AL = index of ???
  5466.         Return: EDX = ??? for specified ???
  5467.     AH = 21h (v7.00) STACKS support
  5468.         AL = 00h get STACKS parameters
  5469.         Return: BX = ??? (0060h for v7.00)
  5470.             CX = number of stacks for hardware interrupts
  5471.             DX = size of each stack in bytes
  5472.             SI = ??? (low and high bytes are separate values)
  5473.             DI = ??? (low and high bytes are separate values)
  5474.                 low byte = logical page number set by subfn 02h
  5475.             ES = ???
  5476.         AL = 01h set ??? "EMM2_DSTKS"
  5477.         EBX = ???
  5478.         ECX = ???
  5479.         AL = 02h set ???
  5480.         BL = logical page number for ??? (00h-03h)
  5481.         Return: AH = status (00h,8Ah)
  5482.     AH = 22h (v7.00) call ??? for every load module
  5483.         AL = which function to call
  5484.         00h call ???
  5485.         else call ????
  5486.         Return: AH = 00h
  5487.         Note: if AL=00h, calls the protected-mode function pointed at by
  5488.         the DWORD at offset 22h from the start of each module installed
  5489.         by a LOAD= directive; if AL<>00h, it calls the function
  5490.         pointed at by the DWORD at offset 28h of the load module
  5491.     AH = 23h (v7.00) ???
  5492.         AL = 00h set ???
  5493.         BL = ???
  5494.         Return:    AH = 00h or unchanged (depending on ???)
  5495.         AL = 01h set ???
  5496.         BL = ???
  5497.         BH = ???
  5498.         CX = ???
  5499.         DX = ??? (on top of stack)
  5500.         Return: AH = status (00h if successful, 8Fh once table full)
  5501.         Note:    this call adds one entry to an internal table on each
  5502.               call, until the table is full
  5503.         AL = 02h get ???
  5504.         CX = size of buffer
  5505.         ES:DI -> buffer for ??? (60 bytes total data)
  5506.         Return: CX = number of bytes actually returned
  5507.         Note:    returns the array storing the values set with AX=2301h
  5508.         Format of one entry in array:
  5509.         Offset    Size    Description
  5510.          00h    BYTE    ??? (BL from subfn 01h)
  5511.          01h    WORD    ??? (CX from subfn 01h)
  5512.          03h    BYTE    ??? (BH from subfn 01h)
  5513.          04h    WORD    ??? (DX from subfn 01h)
  5514.         AL = 03h set ??? name/path
  5515.         ES:DI -> buffer containing ASCIZ ???
  5516.         AL = 04h get ???
  5517.         ES:DI -> buffer for ASCIZ ???
  5518.         Note: the ASCIZ string for subfunctions 03h and 04h does not appear
  5519.         to be used by 386MAX, and may serve merely for communication
  5520.         between two other Qualitas programs
  5521.     AH = 24h (v7.00) high memory control
  5522.         AL = 00h get high memory state
  5523.         Return: BX = current state
  5524.                 00h high memory removed from DOS memory chain
  5525.                 01h high memory included in DOS memory chain
  5526.         AL = 01h set high memory state
  5527.         BX = new state
  5528.             00h high memory removed from DOS memory chain
  5529.             01h high memory included in DOS memory chain
  5530.             else
  5531.             Return: ??? (error, but return varies according to ???)
  5532.     AH = 25h (v7.00) remove high RAM from DOS memory chain
  5533.     AH = 26h (v7.00) ???
  5534.         BX = ???
  5535.         CX = ???
  5536.         SI = ???
  5537.         DI = ???
  5538.         Return: AH = status
  5539.             BX = ???
  5540.             CX = ???
  5541.     AH = 27h (v7.00) ???
  5542.         AL = 00h get ???
  5543.         Return: BX = number of paragraphs for ???
  5544.         AL = 01h ???
  5545.         BX = ???
  5546.         ES??? = ???
  5547.         AL = 02h ???
  5548.         ???
  5549.         AL = 03h ???
  5550.         CX = ???
  5551.         DX = ???
  5552.         ES??? = ???
  5553.         Return: ???
  5554.     AH = 28h (v7.00) get ???
  5555.         Return: AH = status (00h,8Fh) (see #1932 at INT 67/AH=40h)
  5556.             if AH=00h,
  5557.                 CX = ???
  5558.                 DX = ???
  5559.     AH = 29h (v7.00) get ???
  5560.         Return: AX = ???
  5561.     AH = 40h-5Dh EMS services (see INT 67/AH=40h etc)
  5562.     AH = DEh VCPI services (see INT 67/AX=DE00h etc)
  5563. Return: AH = status (as for EMS INT 67 calls)
  5564.         00h successful
  5565.         80h internal error
  5566.         81h hardware malfunction
  5567.         83h invalid handle
  5568.         84h    undefined function
  5569.         8Ah invalid logical page nuber
  5570.         8Bh illegal physical page number
  5571.         8Fh undefined subfunction
  5572.         A4h access denied
  5573.         etc.
  5574.     STACK popped (value placed in DX if no specific return value for DX)
  5575.  
  5576. Format of 386MAX memory speed record:
  5577. Offset    Size    Description    (Table 0613)
  5578.  00h    DWORD    page table entry for 4K page
  5579.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  5580.           entire 4K page
  5581.  
  5582. Format of 386MAX memory info [array]:
  5583. Offset    Size    Description    (Table 0614)
  5584.  00h    DWORD    linear start address
  5585.  04h    DWORD    size in bytes
  5586.  08h    WORD    XMS handle (if next byte = 04h)
  5587.         ??? (if next byte = 05h)
  5588.         ??? (if next byte = 06h)
  5589.         ??? (if next byte = 13h)
  5590.         ??? (if next byte = 14h)
  5591.         ??? (if next byte = 15h)
  5592.         ??? (if next byte = 23h)
  5593.         ??? (if next byte = 24h)
  5594.         ??? (if next byte = 26h)
  5595.         else unused
  5596.  0Ah    BYTE    type
  5597.         00h = ???, 01h = VDISK,
  5598.         02h = INT 15h extended memory, 03h = ??? extended,
  5599.         04h = XMS handle's memory, 05h = ???, 06h = ???, 07h = ???,
  5600.         08h = ???, 09h = ???, 0Ah = ???, 0Bh = ???,
  5601.         11h = ???, 12h = ???, 14h = ???, 15h = ???,
  5602.         19h = ???, 1Ah = ???, 1Bh = ???,
  5603.         1Ch = ???, 1Dh = ???, 1Eh = ???, 1Fh = ???,
  5604.         20h = ???, 21h = ???, 23h = ???, 24h = ???,
  5605.         26h = ???
  5606.  0Bh    BYTE    ??? (00h for types 00h-03h, 07h-0Bh, 19h-21h;
  5607.              80h for types 04h/13h-15h/23h-26h;
  5608.             ??? for type 05h)
  5609. --------V-214402-----------------------------
  5610. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  5611.     AX = 4402h
  5612.     BX = file handle for device "PGS1600$"
  5613.     CX = 0018h (size of buffer)
  5614.     DS:DX -> configuration buffer (see #0615)
  5615. Return: CF clear if successful
  5616.         buffer filled
  5617.         AX = number of bytes actually copied
  5618.     CF set on error
  5619.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5620. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  5621.       display adapter, which provides a 1600x1200 monochrome display as
  5622.       well as one of two emulations, MDA or CGA.
  5623. SeeAlso: AX=4403h"PGS1600"
  5624.  
  5625. Format of PGS1600.DEV configuration information:
  5626. Offset    Size    Description    (Table 0615)
  5627.  00h    WORD    version (high byte = major, low byte = minor)
  5628.  02h    WORD    board initialisation mode
  5629.  04h    WORD    board I/O address
  5630.         03D0h CGA emulation
  5631.         03B0h MDA emulation
  5632.         0390h no emulation
  5633.         0350h no emulation, alternate
  5634.  06h    WORD    emulation buffer segment
  5635.         B800h    CGA emulation
  5636.         B000h    MDA emulation
  5637.         0000h    no emulation
  5638.  08h    WORD    PG1600 graphics buffer segment
  5639.  0Ah    WORD    number of bytes between consecutive graphic rows
  5640.  0Ch    WORD    horizontal pixel size
  5641.  0Eh    WORD    vertical pixel size
  5642.  10h    WORD    horizontal dots per inch
  5643.  12h    WORD    vertical dots per inch
  5644.  14h    WORD    graphics buffer bits per pixel
  5645.  16h    WORD    monitor bits per pixel
  5646. --------N-214402-----------------------------
  5647. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  5648.     AX = 4402h
  5649.     BX = file handle referencing device "$IPCUST"
  5650.     CX, DS:DX ignored
  5651. Return: CF clear if successful
  5652.         AX destroyed
  5653.     CF set on error
  5654.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5655. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  5656.       version 2.05.     If less than the entire data is read or written,
  5657.       the next read/write continues where the previous one ended; this
  5658.       call and AX=4403h both reset the location at which the next
  5659.       operation starts to zero
  5660.     v2.1+ uses a new configuration method, but allows the installation
  5661.       of IPCUST.SYS for backward compatibility with other software which
  5662.       must read the PC/TCP configuration
  5663. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  5664. --------N-214402-----------------------------
  5665. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  5666.     AX = 4402h
  5667.     BX = file handle for device "NET$HLP$"
  5668.     CX = 0008h
  5669.     DS:DX -> buffer for entry point record
  5670. Return: CF clear if successful
  5671.         AX = number of bytes actually read
  5672.     CF set on error
  5673.         AX = error code
  5674. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  5675.       permits communication with PCs running Windows for Workgroups or
  5676.       LAN Manager
  5677. SeeAlso: AH=3Fh"WORKGRP.SYS"
  5678.  
  5679. Format of WORKGRP.SYS entry point record:
  5680. Offset    Size    Description    (Table 0616)
  5681.  00h    WORD    3633h  \ signature???
  5682.  02h    WORD    EF6Fh  /
  5683.  04h    DWORD    address of entry point
  5684. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  5685.       IOCTL rather than READ to get the entry point record
  5686.  
  5687. (Table 0617)
  5688. Call WORKGRP entry point with:
  5689.     STACK:    WORD    function number (0000h-0009h)
  5690. Return: STACK unchanged
  5691.  
  5692. (Table 0618)
  5693. Call WORKGRP function 00h with:
  5694.     STACK:    WORD    0000h (function "get ???")
  5695. Return: DX:AX -> data table
  5696.  
  5697. (Table 0619)
  5698. Call WORKGRP function 01h with:
  5699.     STACK:    WORD    0001h (function "hook ???")
  5700. Return: STACK:    DWORD    pointer to ???
  5701.         WORD    0001h (function number)
  5702.  
  5703. (Table 0620)
  5704. Call WORKGRP function 02h with:
  5705.     STACK:    WORD    0002h (function "unhook ???")
  5706.     ???
  5707. Return: ???
  5708.  
  5709. (Table 0621)
  5710. Call WORKGRP function 03h with:
  5711.     STACK:    WORD    0003h (function "reenable printer port")
  5712.         WORD    LPT port number
  5713. Return: ???
  5714.  
  5715. (Table 0622)
  5716. Call WORKGRP function 04h with:
  5717.     STACK:    WORD    0004h (function "disable printer port")
  5718.         WORD    LPT port number
  5719. Return: ???
  5720.  
  5721. (Table 0623)
  5722. Call WORKGRP function 05h with:
  5723.     STACK:    WORD    0005h (function "???")
  5724.         ???
  5725. Return: ???
  5726.  
  5727. (Table 0624)
  5728. Call WORKGRP function 06h with:
  5729.     STACK:    WORD    0006h (function "???")
  5730. Return: STACK unchanged
  5731.     AX = 0000h
  5732.     DX = 0000h
  5733.  
  5734. (Table 0625)
  5735. Call WORKGRP functions 07h-09h with:
  5736.     STACK:    WORD    0007h-0009h (NOP functions)
  5737. Return: STACK unchanged
  5738.     AX = 0001h
  5739.     DX = 0000h
  5740. --------N-214402-----------------------------
  5741. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  5742.     AX = 4402h
  5743.     BX = file handle referencing device "10BEUI$"
  5744.     DS:DX -> parameter record (see #0626)
  5745.     CX ignored
  5746. Return: CF clear if successful
  5747.         AX destroyed
  5748.     CF set on error
  5749.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5750. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  5751.  
  5752. Format of 10NET 10BEUI.DOS parameter record:
  5753. Offset    Size    Description    (Table 0626)
  5754.  00h    WORD    000Ah (function number???)
  5755.  02h    WORD    ???
  5756.  04h    DWORD    pointer to buffer for ???
  5757.  08h  4 BYTEs    ???
  5758.  0Ch    WORD    transfer size
  5759. --------N-214402-----------------------------
  5760. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  5761.     AX = 4402h
  5762.     BX = file handle referencing device "MEMMGR0$"
  5763.     DS:DX -> 6-byte buffer for interface info (see #0627)
  5764.     CX ignored
  5765. Return: CF clear if successful
  5766.         AX destroyed
  5767.     CF set on error
  5768.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5769. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  5770.  
  5771. Format of 10NET 10MEMMGR.SYS interface info:
  5772. Offset    Size    Description    (Table 0627)
  5773.  00h    DWORD    address of entry point (see #0628)
  5774.  04h    WORD    version (0500h for v5.00)
  5775.  
  5776. (Table 0628)
  5777. Call 10NET 10MEMMGR.SYS entry point with:
  5778.     AL = 01h ???
  5779.         BX = ???
  5780.         Return: CF clear if successful
  5781.             CF set on error
  5782.             AX = error code
  5783.     AL = 02h ???
  5784.         ???
  5785.     AL = 03h ???
  5786.         ???
  5787.     AL = 04h set/restore memory allocation strategy
  5788.         BX = subfunction
  5789.         0000h set strategy
  5790.         0001h restore strategy
  5791.         Return: CF clear if successful
  5792.             CF set on error (if function disabled)
  5793.             various registers destroyed
  5794.     AL = other
  5795.         Return: CF set
  5796.             AX = 0000h
  5797.             BL = 01h
  5798. --------V-214402-----------------------------
  5799. INT 21 - Compaq AG1024.SYS - RGDI - GET DRIVER LOCATION
  5800.     AX = 4402h
  5801.     BX = file handle for device "$$$$RGDI"
  5802.     CX = 0006h (size of returned data)
  5803.     DS:DX -> location record (see #0629)
  5804. Return: CF clear if successful
  5805.         buffer filled
  5806.     CF set on error
  5807.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5808. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  5809. SeeAlso: AX=4403h"RGDI"
  5810.  
  5811. Format of Compaq AG1024.SYS location record:
  5812. Offset    Size    Description    (Table 0629)
  5813.  00h    WORD    signature 55AAh
  5814.  02h    WORD    segment of ???
  5815.  04h    WORD    segment of device driver's code
  5816. --------N-214402-----------------------------
  5817. INT 21 - FTPSOFT.DOS v3.1 - GET ???
  5818.     AX = 4402h
  5819.     BX = file handle for device "FTPSOFT$"
  5820.     CX = size of buffer
  5821.     DS:DX -> buffer for data (see #0630)
  5822. Return: CF clear if successful
  5823.         buffer filled
  5824.     CF set on error
  5825.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5826. Program: FTPSOFT.DOS is a device driver for Protocol Manager support from
  5827.        FTP Software, Inc.
  5828. SeeAlso: AH=3Fh"PC/TCP",AX=4402h"NDIS"
  5829.  
  5830. Format of FTPSOFT.DOS data:
  5831. Offset    Size    Description    (Table 0630)
  5832.  00h    WORD    (call) BA98h (if different, no data returned)
  5833.  02h    DWORD    -> NDIS common characteristics table
  5834.           (see #0569 at AX=4402h"NDIS")
  5835.  06h    DWORD    (call) -> new dispatch table (see #0571 at AX=4402h"NDIS")
  5836.  0Ah    DWORD    -> 28-byte buffer for ??? data
  5837.  0Eh    DWORD    ???
  5838.  12h    DWORD    -> FAR function to reset dispatch jump table to defaults
  5839.  16h    BYTE    ???
  5840. Note:    the addresses in the new dispatch table are copied into an internal
  5841.       jump table which may be reset by calling the function pointed at by
  5842.       offset 12h
  5843. --------n-214402-----------------------------
  5844. INT 21 U - PenDOS PENDEV.SYS - GET ENTRY POINTS
  5845.     AX = 4402h
  5846.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  5847.     CX = size of buffer (4 for $$PENDOS and a 4,8,12, or 16 for $$PD_REG)
  5848.     DS:DX -> buffer for entry point record (see #0631)
  5849. Return: CF clear if successful
  5850.         buffer filled
  5851.     CF set on error
  5852.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5853. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  5854.       which provides pen capability to keyboard-based programs, is bundled
  5855.       with IBM DOS 6.1
  5856. SeeAlso: AX=4403h"PENDEV.SYS"
  5857.  
  5858. Format of PENDEV.SYS entry point record:
  5859. Offset    Size    Description    (Table 0631)
  5860.  00h    DWORD    -> array of jumps
  5861.  04h    WORD    offset of function to retrieve entry point (see #0632)
  5862.  06h  2 BYTEs    signature "Pe"
  5863.  08h    WORD    offset of function to set entry point (see #0633)
  5864.  0Ah  2 BYTEs    signature "nD"
  5865.  0Ch    WORD    offset of function to clear entry point (see #0634)
  5866.  0Eh    WORD    signature "OS"
  5867.  
  5868. (Table 0632)
  5869. Call PENDEV.SYS function to retrieve entry point with:
  5870.     AX = index of entry point (0-9)
  5871. Return: CF clear if successful
  5872.         DX:AX -> desired entry point
  5873.     CF set on error (AX out of range)
  5874.  
  5875. (Table 0633)
  5876. Call PENDEV.SYS function to set entry point with:
  5877.     AX = index of entry point (0-9)
  5878.     DX:SI -> new handler
  5879. Return: CF clear if successful
  5880.     CF set on error (AX out of range)
  5881.  
  5882. (Table 0634)
  5883. Call PENDEV.SYS function to clear entry point with:
  5884.     AX = index of entry point (0-9)
  5885. Return: CF clear if successful
  5886.     CF set on error (AX out of range)
  5887. Note:    resets the jump at the specified entry point to its default target,
  5888.       which simply returns
  5889. --------N-214402-----------------------------
  5890. INT 21 U - LAN Manager - TCPDRV.DOS - API
  5891.     AX = 4402h
  5892.     BX = file handle referencing device "TCPDRV$"
  5893.     CX = 0019h
  5894.     DS:DX -> buffer containing request block
  5895. Return: CF clear if successful
  5896.         buffer filled
  5897.     CF set on error
  5898.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5899. Program: TCPDRV.DOS is the low-level device driver supporting LAN Manager's
  5900.       TCP/IP protocol stack
  5901.  
  5902. Format of TCPDRV.DOS request block:
  5903. Offset    Size    Description    (Table 0635)
  5904.  00h    BYTE    (call) function number
  5905.         00h initialize ???
  5906.         06h get ???
  5907.         07h get ???
  5908.  01h    BYTE    (call) 00h
  5909.         (return) error code if error, unchanged if successful
  5910.  02h    WORD    signature 4354h ('CT')
  5911. ---function 00h---
  5912.  04h    DWORD    (call) pointer to ??? FAR function
  5913.         function is called with ES:BX -> device driver request used to
  5914.           invoke this function
  5915.  08h  4 BYTEs    ???
  5916.  0Ch    DWORD    (call) pointer to ??? record, WORD at offset 22h is read
  5917.  10h    DWORD    (return) -> ??? buffer if 0000h:0000h on call
  5918. ---function 06h---
  5919.  04h  4 BYTEs    ???
  5920.  08h    DWORD    (return) pointer to ???
  5921. ---function 07h---
  5922.  04h    DWORD    (return) pointer to ??? record
  5923. --------y-214402-----------------------------
  5924. INT 21 U - PC Tools 9 CPRLOW.EXE - GET CODE AND DATA ADDRESSES
  5925.     AX = 4402h
  5926.     BX = file handle referencing device "RECLOWLD"
  5927.     DS:DX -> buffer for address list (see #0636)
  5928.     CX ignored
  5929. Return: CF clear if successful
  5930.         buffer filled
  5931.     CF set on error
  5932.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5933.  
  5934. Format of CPRLOW address list:
  5935. Offset    Size    Description    (Table 0636)
  5936.  00h    WORD    segment of CPRLOW code
  5937.  02h    WORD    offset in code segment of ??? entry point
  5938.         (switches into protected mode)
  5939.  04h    WORD    offset in code segment of jump array (see #0637)
  5940.  06h    WORD    segment of copy of interrupt vector table at CPRLOW load time
  5941. Note:    neither the entry point nor the jump array is valid until after a
  5942.       CPR /LOAD, because CPR.EXE installs the code into CPRLOW at runtime.
  5943.  
  5944. Format of CPRLOW jump array:
  5945. Offset    Size    Description    (Table 0637)
  5946.  00h  3 BYTEs    initialize CPRLOW interrupt hooks
  5947.  03h  3 BYTEs    reset timers and enable CPR (hotkey enable)
  5948.  06h  3 BYTEs    disable CPR (hotkey disable)
  5949.  09h  3 BYTEs    clear ??? flag, hotkey disable, and ???
  5950.  0Ch  3 BYTEs    initialize delay loop counter (destroys AX,BX,CX,DX)
  5951.  0Fh  3 BYTEs    disable CPR completely (commandline /DISABLE)
  5952.  12h  3 BYTEs    enable ??? if CPR enabled by both cmdline and hotkey
  5953.  15h  3 BYTEs    enable CPR (commandline /ENABLE)
  5954. --------m-214402-----------------------------
  5955. INT 21 U - Novell DOS 7 EMM386.EXE - GET STATE RECORD???
  5956.     AX = 4402h
  5957.     BX = file handle for device "EMMXXXX0"
  5958.     CX = 003Eh (size of state record)
  5959.     DS:DX -> buffer for state record (see #0638)
  5960. Return: CF clear if successful
  5961.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  5962.     CF set on error
  5963.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5964.  
  5965. Format of Novell DOS 7 EMM386.EXE state record:
  5966. Offset    Size    Description    (Table 0638)
  5967.  00h    WORD    signature EDC0h
  5968.  02h 60 BYTEs    ???
  5969. --------m-214402SF00-------------------------
  5970. INT 21 U - Memory Managers - GET API ENTRY POINT
  5971.     AX = 4402h subfn 00h
  5972.     BX = file handle for device "EMMXXXX0"
  5973.     CX = 0006h (size of buffer in bytes)
  5974.     DS:DX -> buffer for API entry point record (see #0640)
  5975.         first byte must be 00h on entry
  5976. Return: CF clear if successful
  5977.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  5978.     CF set on error
  5979.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  5980. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  5981.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  5982.     if no other program has hooked INT 67, an alternate installation
  5983.       check for CEMM is testing for the string
  5984.       "COMPAQ EXPANDED MEMORY MANAGER 386" at offset 14h in the INT 67
  5985.       handler's segment; if present, the word at offset 12h contains the
  5986.       offset of the API entry point
  5987. SeeAlso: AX=4402h/SF=01h,AX=4402h/SF=02h,AX=4402h"EMM386",INT 67/AH=3Fh
  5988.  
  5989. Format of memory manager API entry point record:
  5990. Offset    Size    Description    (Table 0639)
  5991.  00h    WORD    ??? (0022h for CEMM 5.11, 0025h for MS EMM386 v4.45)
  5992.  02h    DWORD    manager's private API entry point
  5993.         (see #0640,#1950 at INT 67/AX=FFA5h)
  5994.  
  5995. (Table 0640)
  5996. Call CEMM v5.10+ entry point with:
  5997.     AH = 00h get memory manager's state
  5998.         Return: AH = state
  5999.             bit 0: turned OFF
  6000.             bit 1: AUTO mode enabled
  6001.     AH = 01h set memory manager's state
  6002.         AL = new state (00h ON, 01h OFF, 02h AUTO)
  6003.         Return: CF clear if successful
  6004.             CF set on error
  6005.     AH = 02h Weitek coprocessor support
  6006.         AL = subfunction
  6007.         00h get Weitek support state
  6008.             Return: AL = status
  6009.                 bit 0: Weitek coprocessor is present
  6010.                 bit 1: Weitek support is enabled
  6011.         01h turn on Weitek support
  6012.         02h turn off Weitek support
  6013.         Return: CF clear if successful
  6014.             CF set on error
  6015.             AH = error code (01h invalid subfunc, 02h no Weitek)
  6016.     AH = 05h get statistics
  6017.         ???
  6018.     AH > 06h
  6019.         Return: CF set
  6020.             AH = 01h (invalid function)
  6021. Notes:    AH=03h,04h,06h are NOPs which return CF clear, presumably for backwards
  6022.       compatibility with earlier versions of CEMM
  6023.     in v5.11, AH=05h merely prints an error message (using INT 21/AH=09h)
  6024.       stating that a different version of CEMM is installed and it is
  6025.       therefore not possible to display the statistics
  6026. --------m-214402SF01-------------------------
  6027. INT 21 U - Memory Managers - GET EMM IMPORT STRUCTURE ADDRESS
  6028.     AX = 4402h subfn 01h
  6029.     BX = file handle for device "EMMXXXX0"
  6030.     CX = 0006h (size of buffer in bytes)
  6031.     DS:DX -> buffer for EMM import structure record (see #0641)
  6032.         first byte must be 01h on entry
  6033. Return: CF clear if successful
  6034.         buffer filled (see also INT 67/AH=3Fh function 1B00h)
  6035.     CF set on error
  6036.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6037. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+,
  6038.       QEMM-386 v6+, and CEMM v5.10+, and is intended for use by MS Windows
  6039.       as it starts up
  6040.     for QEMM-386, this call always returns an error if Windows3 support
  6041.       has been disabled with the NW3 switch
  6042. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 2F/AX=D201h/BX=5145h
  6043. SeeAlso: INT 67/AH=3Fh
  6044.  
  6045. Format of EMM import structure record:
  6046. Offset    Size    Description    (Table 0641)
  6047.  00h    DWORD    physical address of EMM import structure (see #0642)
  6048.  04h    BYTE    EMM import structure major version
  6049.  05h    BYTE    EMM import structure minor version
  6050. Note:    version 1.00 contains only EMS information (Windows 3.0+)
  6051.     version 1.10 contains UMB/XMS/HMA/EMS information (Windows 3.1)
  6052.     version 1.11 is version 1.10 plus memory manager maker/product name
  6053. SeeAlso: #1927
  6054.  
  6055. Format of Global EMM Import record:
  6056. Offset    Size    Description    (Table 0642)
  6057.  00h    BYTE    bit flags
  6058.         bit 2: ???
  6059.         bit 3: free EMM386 virtual HMA only if hma_page_table_paddr!=0
  6060.         bit 4: no UMB???
  6061.  01h    BYTE    reserved (0)
  6062.  02h    WORD    size of structure in bytes
  6063.  04h    WORD    structure version
  6064.  06h    DWORD    reserved
  6065.  0Ah 384 BYTEs    64 EMS frame status records (see #0643), one per 16K of
  6066.           real-mode 1M address space
  6067. 18Ah    BYTE    ??? (must be at least 3*number_of_EMS_frames+4)
  6068. 18Bh    BYTE    number of UMB frame descriptors following
  6069. 18Ch 4N DWORDs    UMB frame descriptors
  6070.         each is 4 DWORDs giving physical page numbers for the four
  6071.           4K pages of a 16K EMS frame (00000000h if non-UMB page)
  6072. var    BYTE    number of EMS handle info records following
  6073.     16N BYTEs    EMS handle info records (see #0645)
  6074. ---version 1.10+ ---
  6075.     DWORD    realmode INT 67 vector (used by Windows to set breakpoints)
  6076.     DWORD    physical address of HMA page table values
  6077.     BYTE    number of free page entries following
  6078.      2N DWORDs    free page entries
  6079.         each is:
  6080.             DWORD    physical page number
  6081.             DWORD    number of consecutive physical pages
  6082.     BYTE    number of XMS handle info records following
  6083.         00h if memory manager does not emulate XMS or has real mode
  6084.           XMS code which can execute in the Windows environment
  6085.     12N BYTEs    XMS handle info records (see #0646)
  6086.     BYTE    number of free UMB info records following
  6087.      2N WORDs    free UMB info records
  6088.         each is:
  6089.             WORD    real mode start segment
  6090.             WORD    size in paragraphs
  6091. ---version 1.11---    
  6092.      20 BYTEs    blank-padded maker name
  6093.      20 BYTEs    blank-padded product name
  6094.  
  6095. Format of EMS frame status record:
  6096. Offset    Size    Description    (Table 0643)
  6097.  00h    BYTE    frame type (see #0644)
  6098.  01h    BYTE    owner handle (00h/FFh = none) from frame including UMB
  6099.         index to UMB frame descriptors
  6100.  02h    WORD    logical page for frame, 7FFFh if none, FFFFh if non-EMS frame
  6101.  04h    BYTE    EMS physical page number (FFh for non-EMS = don't care???)
  6102.  05h    BYTE    flags for non-EMS frames (00h for EMS frame)
  6103.         bits 0,1 for first 4K, bits 2,3 for second 4K, etc:
  6104.           10: direct mapping (linear address = physical address)
  6105.           01: UMB mapping
  6106.  
  6107. Bitfields for EMS frame type:
  6108. Bit(s)    Description    (Table 0644)
  6109.  0    EMS frame
  6110.  1    (if EMS frame) in standard 64K page frame
  6111.  2    first 4K of frame is UMB
  6112.  3    second 4K of frame is UMB
  6113.  4    third 4K of frame is UMB
  6114.  5    last 4K of frame is UMB
  6115.  
  6116. Format of EMS handle info record:
  6117. Offset    Size    Description    (Table 0645)
  6118.  00h    BYTE    handle number (00h = system handle)
  6119.  01h    BYTE    flags
  6120.         bit 0: normal handle rather than system handle
  6121.         bit 2: ??? (set by some EMS managers)
  6122.  02h  8 BYTEs    EMS handle's name
  6123.  0Ah    WORD    number of 16K pages for handle
  6124.  0Ch    DWORD    physical address of page table entries forming page map
  6125. Note:    all values should be zero for the system handle if no large frame
  6126.       support is present
  6127.  
  6128. Format of XMS handle info record:
  6129. Offset    Size    Description    (Table 0646)
  6130.  00h    WORD    handle
  6131.  02h    WORD    flags
  6132.         bit 0: handle usable by Windows
  6133.             (already in use when Windows started if clear)
  6134.         bit 1: reserved (0)
  6135.  04h    DWORD    size in KB (may be zero, used only if flags bit 0 set)
  6136.  08h    DWORD    physical address (only if flags bit 0 set)
  6137. --------m-214402SF02-------------------------
  6138. INT 21 U - Memory Managers - GET MEMORY MANAGER VERSION
  6139.     AX = 4402h subfn 02h
  6140.     BX = file handle for device "EMMXXXX0"
  6141.     CX = 0002h (size of buffer in bytes)
  6142.     DS:DX -> buffer for memory manager version (see #0647)
  6143.         first byte must be 02h on entry
  6144. Return: CF clear if successful
  6145.         buffer filled
  6146.     CF set on error
  6147.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6148. Note:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  6149.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  6150. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 67/AH=3Fh
  6151.  
  6152. Format of memory manager version:
  6153. Offset    Size    Description    (Table 0647)
  6154.  00h    BYTE    major version
  6155.  01h    BYTE    minor version (binary)
  6156. --------m-214402-----------------------------
  6157. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  6158.     AX = 4402h
  6159.     BX = file handle for device "EMMXXXX0"
  6160.     CX = size of buffer in bytes (varies, see below)
  6161.     DS:DX -> buffer for returned data (see #0648)
  6162.         first byte must be set on entry to indicate desired data
  6163. Return: CF clear if successful
  6164.         buffer filled
  6165.     CF set on error
  6166.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6167. Notes:    an error is returned if the number of bytes to be read does not match
  6168.       the number of bytes returned for the specified data item
  6169.     this function is part of the interface which allows MS Windows to
  6170.       cooperate with memory managers
  6171. SeeAlso: AX=4402h/SF=00h,AX=4402h/SF=01h,AX=4402h/SF=02h,INT 67/AX=FFA5h
  6172.  
  6173. Format of EMM386.EXE data buffer:
  6174. Offset    Size    Description    (Table 0648)
  6175.  00h    BYTE    (call) function
  6176.         03h get ???
  6177.         04h get ???
  6178. ---function 03h---
  6179.  00h    WORD    ???
  6180.  02h    WORD    ???
  6181. ---function 04h---
  6182.  00h    WORD    segment of UMB containing EMM386 code/data
  6183.  02h    WORD    number of paragraphs of EMM386 code/data in UMB
  6184.  04h    WORD    ???
  6185. ----------214402-----------------------------
  6186. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  6187.     AX = 4402h
  6188.     BX = file handle for device "IFS$HLP$"
  6189.     CX = 0008h (size of buffer in bytes)
  6190.     DS:DX -> buffer for entry point record (see #0550 at AH=3Fh"IFSHLP")
  6191. Return: CF clear if successful
  6192.         buffer filled
  6193.     CF set on error
  6194.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6195. SeeAlso: AH=3Fh"IFSHLP"
  6196. --------D-214403-----------------------------
  6197. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  6198.     AX = 4403h
  6199.     BX = file handle referencing character device
  6200.     CX = number of bytes to write
  6201.     DS:DX -> data to write
  6202. Return: CF clear if successful
  6203.         AX = number of bytes actually written
  6204.     CF set on error
  6205.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6206. Notes:    format of data is driver-specific (see below for some specific cases)
  6207.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  6208.       KEYSTACK.SYS driver will push the specified characters on the
  6209.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  6210.       driver will push the characters onto the keyboard stack
  6211. SeeAlso: AX=4400h,AX=4402h,AX=4405h,INT 2F/AX=122Bh,INT 2F/AX=D44Dh
  6212. SeeAlso: INT 2F/AX=D44Fh
  6213. --------c-214403-----------------------------
  6214. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - CACHE CONTROL
  6215.     AX = 4403h
  6216.     BX = handle for device "SMARTAAR"
  6217.     CX = number of bytes to write
  6218.     DS:DX -> SMARTDRV control block (see #0650)
  6219. Return: CF clear if successful
  6220.         AX = number of bytes actually written
  6221.         0000h if control block too small for given command
  6222.     CF set on error
  6223.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6224. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  6225.  
  6226. (Table 0649)
  6227. Values for SMARTDRV function code:
  6228.  00h    flush cache
  6229.  01h    flush and discard cache
  6230.  02h    disable caching (flushes and discards cache first)
  6231.  03h    enable caching
  6232.  04h    control write caching
  6233.  05h    set flushing tick count
  6234.  06h    lock cache contents
  6235.  07h    unlock cache contents
  6236.  08h    set flush-on-reboot flag
  6237.  09h    unused
  6238.  0Ah    control full-track caching
  6239.  0Bh    reduce cache size
  6240.  0Ch    increase cache size
  6241.  0Dh    set INT 13 chain address
  6242.  
  6243. Format of SMARTDRV control block:
  6244. Offset    Size    Description    (Table 0650)
  6245.  00h    BYTE    function code (see #0649)
  6246. ---functions 00h-03h,06h,07h---
  6247.  no additional fields
  6248. ---function 04h---
  6249.  01h    BYTE    write caching control action
  6250.         00h turn off write-through
  6251.         01h turn on write-through
  6252.         02h turn off write buffering (also flushes cache)
  6253.         03h turn on write buffering (also flushes cache)
  6254. ---function 05h---
  6255.  01h    WORD    number of timer ticks between cache flushes
  6256. ---function 08h---
  6257.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  6258. ---function 0Ah---
  6259.  01h    BYTE    full-track writes are
  6260.         00h not cached
  6261.         01h cached
  6262. ---functions 0Bh,0Ch---
  6263.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  6264. ---function 0Dh---
  6265.  01h    DWORD    new address to which to chain on INT 13
  6266. Note:    the previous address is not preserved
  6267. --------d-214403-----------------------------
  6268. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  6269.     AX = 4403h
  6270.     BX = file handle referencing character device for CD-ROM driver
  6271.     CX = number of bytes to write
  6272.     DS:DX -> control block (see #0651)
  6273. Return: CF clear if successful
  6274.         AX = number of bytes actually written
  6275.     CF set on error
  6276.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6277. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  6278.  
  6279. Format of CR-ROM control block:
  6280. Offset    Size    Description    (Table 0651)
  6281.  00h    BYTE    function code
  6282.         00h eject disk
  6283.         01h lock/unlock door
  6284.         02h reset drive
  6285.         03h control audio channel
  6286.         04h write device control string
  6287.         05h close tray
  6288. ---functions 00h,02h,05h---
  6289.  no further fields
  6290. ---function 01h---
  6291.  01h    BYTE    lock function
  6292.         00h unlock door
  6293.         01h lock door
  6294. ---function 03h---
  6295.  01h    BYTE    input channel (0-3) for output channel 0
  6296.  02h    BYTE    volume for output channel 0
  6297.  03h    BYTE    input channel (0-3) for output channel 1
  6298.  04h    BYTE    volume for output channel 1
  6299.  05h    BYTE    input channel (0-3) for output channel 2
  6300.  06h    BYTE    volume for output channel 2
  6301.  07h    BYTE    input channel (0-3) for output channel 3
  6302.  08h    BYTE    volume for output channel 3
  6303. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  6304.       right prime; a volume of 00h is off
  6305. ---function 04h---
  6306.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  6307.           interpretation
  6308. --------d-214403-----------------------------
  6309. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  6310.     AX = 4403h
  6311.     BX = handle for device "SCSITAPE"
  6312.     CX = number of bytes to write
  6313.     DS:DX -> SCSITAPE control block (see #0652)
  6314. Return: CF clear if successful
  6315.         AX = number of bytes actually written
  6316.     CF set on error
  6317.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6318. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  6319.  
  6320. Format of SCSITAPE control block:
  6321. Offset    Size    Description    (Table 0652)
  6322.  00h    WORD    command type
  6323.         'F' Format (argument 1 = interleave, argument 2 = format type)
  6324.         'E' Erase
  6325.         'R' Rewind
  6326.         'L' Load
  6327.         'N' No Load
  6328.         'S' Space (argument 1 = count, argument 2 = type)
  6329.         'M' File Mark (argument 1 = count)
  6330.         'A' Reassign
  6331.  02h    WORD    argument 1
  6332.  04h    WORD    argument 2
  6333.  06h    WORD    segment of command buffer
  6334.  08h    WORD    offset of command buffer
  6335.  0Ah    WORD    length of command buffer
  6336. --------E-214403-----------------------------
  6337. INT 21 U - AI Architects - OS/x86??? - API
  6338.     AX = 4403h
  6339.     BX = handle for device "AIA_OS"
  6340.     CX = number of bytes to write (ignored)
  6341.     DS:DX -> 12-byte buffer, first byte is command:
  6342.             81h installation check
  6343.             82h get API entry point
  6344.             84h uninstall
  6345. Return: CF clear if successful
  6346.         AX = number of bytes actually written
  6347.     CF set on error
  6348.         AX = error code (01h,05h,06h,0Ch,0Dh) (see #0789 at AH=59h)
  6349. Notes:    these functions are only available if the DOS extender was loaded as a
  6350.       device driver in CONFIG.SYS
  6351.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  6352. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  6353. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  6354.  
  6355. Format of buffer on return:
  6356. Offset    Size    Description    (Table 0653)
  6357.  00h  4 BYTEs    signature "IABH"
  6358. ---if func 81h---
  6359.  (no additional fields)
  6360. ---if func 82h---
  6361.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  6362. ---if func 84h---
  6363.  04h    WORD    success indicator
  6364.  06h    WORD    segment of ???
  6365.  08h    WORD    segment of ??? memory block to free if nonzero
  6366.  0Ah    WORD    segment of ??? memory block to free if nonzero
  6367. --------V-214403-----------------------------
  6368. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  6369.     AX = 4403h
  6370.     BX = file handle for device "PGS1600$"
  6371.     CX = 0018h (size of buffer)
  6372.     DS:DX -> configuration buffer (see #0615 at AX=4402h"PGS1600")
  6373. Return: CF clear if successful
  6374.         AX = number of bytes actually written
  6375.     CF set on error
  6376.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6377. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  6378.       display adapter, which provides a 1600x1200 monochrome display as
  6379.       well as one of two emulations, MDA or CGA.
  6380. SeeAlso: AX=4402h"PGS1600"
  6381. --------N-214403-----------------------------
  6382. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  6383.     AX = 4403h
  6384.     BX = file handle referencing device "$IPCUST"
  6385.     CX, DS:DX ignored
  6386. Return: CF clear if successful
  6387.         AX destroyed
  6388.     CF set on error
  6389.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6390. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  6391.       version 2.05.     If less than the entire data is read or written,
  6392.       the next read/write continues where the previous one ended; this
  6393.       call and AX=4402h both reset the location at which the next
  6394.       operation starts to zero
  6395.     v2.1+ uses a new configuration method, but allows the installation
  6396.       of IPCUST.SYS for backward compatibility with other software which
  6397.       must read the PC/TCP configuration
  6398. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  6399. --------V-214403-----------------------------
  6400. INT 21 - Compaq AG1024.SYS - CPQ_MGES - IOCTL OUTPUT
  6401.     AX = 4403h
  6402.     BX = file handle referencing device "CPQ_MGES"
  6403.     DS:DX -> request packet (see #0654)
  6404.     CX ignored
  6405. Return: CF clear if successful
  6406.         AX destroyed
  6407.         data buffer filled (if applicable)
  6408.         first word of request packet set to number of bytes of data
  6409.           available (amount returned is smaller of this and requested
  6410.           amount)
  6411.     CF set on error
  6412.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6413. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  6414. SeeAlso: AX=4403h"RGDI"
  6415.  
  6416. Format of Compaq AG1024.SYS request packet:
  6417. Offset    Size    Description    (Table 0654)
  6418.  00h    WORD    function
  6419.         0000h get ??? (26h bytes)
  6420.         0001h get ??? (36h bytes)
  6421.         0002h set ??? (same as returned by function 0001h)
  6422.         0003h get ??? (6 bytes)
  6423.         0004h get ???
  6424.         0005h get ???
  6425.         0006h get ??? (10h bytes)
  6426.         0007h set ??? (same as returned by function 0006h)
  6427. ---functions 00h-03h,06h,07h---
  6428.  02h    WORD    size of data buffer
  6429.  04h    DWORD    -> buffer for function's data
  6430.  ---functions 04h,05h---
  6431.  02h    WORD    ???
  6432.  04h    WORD    size of data buffer
  6433.  06h    DWORD    -> buffer to receive data
  6434. --------V-214403-----------------------------
  6435. INT 21 - Compaq AG1024.SYS - RGDI - IOCTL OUTPUT
  6436.     AX = 4403h
  6437.     BX = file handle referencing device "$$$$RGDI"
  6438.     DS:DX -> request packet (see #0655)
  6439.     CX ignored
  6440. Return: CF clear if successful
  6441.         AX destroyed
  6442.         data buffer filled (if applicable)
  6443.         first word of request packet set to number of bytes of data
  6444.           available (amount returned is smaller of this and requested
  6445.           amount)
  6446.     CF set on error
  6447.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6448. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  6449. SeeAlso: AX=4402h"RGDI",AX=4403h"CPQ_MGES"
  6450.  
  6451. Format of Compaq AG1024.SYS request packet:
  6452. Offset    Size    Description    (Table 0655)
  6453.  00h    WORD    function
  6454.         0000h get entry points
  6455.         0001h get ???
  6456.  02h    DWORD    address of buffer for returned data
  6457. --------m-214403SF01-------------------------
  6458. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX OFF
  6459.     AX = 4403h subfn 01h
  6460.     BX = handle for device "386MAX$$"
  6461.     DS:DX -> BYTE 01h
  6462.     CX ignored
  6463. Return: DS:DX -> BYTE status (00h = successful)
  6464.     CF clear if successful
  6465.         AX destroyed
  6466.     CF set on error
  6467.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6468. Note:    this function will fail if any EMS or UMBs are in use
  6469. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6470. --------m-214403SF02-------------------------
  6471. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX ON
  6472.     AX = 4403h subfn 02h
  6473.     BX = handle for device "386MAX$$"
  6474.     DS:DX -> BYTE 02h
  6475.     CX ignored
  6476. Return: DS:DX -> BYTE status (00h = successful)
  6477.     CF clear if successful
  6478.         AX destroyed
  6479.     CF set on error
  6480.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6481. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6482. --------m-214403SF03-------------------------
  6483. INT 21 U - Qualitas 386MAX v6.01+ - SET STATE
  6484.     AX = 4403h subfn 03h
  6485.     BX = handle for device "386MAX$$"
  6486.     CX = number of bytes to copy (up to size of state buffer)
  6487.     DS:DX -> BYTE 03h followed by state buffer
  6488.           (see #0598 at AX=4402h"386MAX")
  6489. Return: CF clear if successful
  6490.         AX = number of bytes actually written
  6491.     CF set on error
  6492.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6493. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  6494.       (specifying the version of the state record) and the buffer must
  6495.       contain CX bytes AFTER the initial byte
  6496. SeeAlso: AX=4402h"386MAX"
  6497. --------m-214403SF05-------------------------
  6498. INT 21 U - Qualitas 386MAX v7.00+ - LIMIT AUTOMATIC ACTIVATION TO STD EMS CALLS
  6499.     AX = 4403h subfn 05h
  6500.     BX = handle for device "386MAX$$"
  6501.     DS:DX -> BYTE 05h
  6502.     CX ignored
  6503. Return: CF clear if successful
  6504.         AX destroyed
  6505.     CF set on error
  6506.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6507. Desc:    specifies that 386MAX will only shift from AUTO to ON mode on standard
  6508.       EMS calls INT 67/AH=40h-5Dh
  6509. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=06h
  6510. --------m-214403SF06-------------------------
  6511. INT 21 U - Qualitas 386MAX v7.00+ - ALLOW AUTOMATIC ACTIVATION ON ANY INT 67
  6512.     AX = 4403h subfn 06h
  6513.     BX = handle for device "386MAX$$"
  6514.     DS:DX -> BYTE 06h
  6515.     CX ignored
  6516. Return: CF clear if successful
  6517.         AX destroyed
  6518.     CF set on error
  6519.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6520. Desc:    specified that 386MAX should shift from AUTO to ON mode on any INT 67
  6521.       call other than INT 67/AH=3Fh
  6522. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6523. --------n-214403-----------------------------
  6524. INT 21 U - PenDOS PENDEV.SYS - ???
  6525.     AX = 4403h
  6526.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  6527.     CX = size of buffer
  6528.     DS:DX -> buffer containing ???
  6529. Return: CF clear if successful
  6530.         buffer filled
  6531.     CF set on error
  6532.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6533. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  6534.       which provides pen capability to keyboard-based programs, is bundled
  6535.       with IBM DOS 6.1
  6536. Note:    this call sets the WORD at offset 1Ah into the device driver request
  6537.       header used to call the driver to 0000h.
  6538. SeeAlso: AX=4402h"PENDEV.SYS"
  6539. --------D-214404-----------------------------
  6540. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  6541.     AX = 4404h
  6542.     BL = drive number (00h = default, 01h = A:, etc.)
  6543.     CX = number of bytes to read
  6544.     DS:DX -> buffer
  6545. Return: CF clear if successful
  6546.         AX = number of bytes actually read
  6547.     CF set on error
  6548.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6549. Note:    format of data is driver-specific
  6550. SeeAlso: AX=4402h,AX=4405h,INT 2F/AX=122Bh
  6551. --------k-214404-----------------------------
  6552. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  6553.     AX = 4404h
  6554.     BL = drive number (00h = default, 01h = A:, etc.)
  6555.     CX = 0004h
  6556.     DS:DX -> DWORD buffer to receive device driver address
  6557. Note:    In addition to returning the address of the Stacker device driver,
  6558.       this call also sets the volume number at offset 3Eh in the device
  6559.       driver (see INT 25/AX=CDCDh)
  6560. SeeAlso: INT 25/AX=CDCDh
  6561. --------k-214404-----------------------------
  6562. INT 21 - Stacker - GET STACVOL FILE SECTORS
  6563.     AX = 4404h
  6564.     BL = drive number (0 is current drive)
  6565.     CX = byte count (i.e., 200h = 1 sector)
  6566.     DS:DX -> buffer (see #0656)
  6567. Return: Data Buffer contains the number of sectors requested from the
  6568.       STACVOL physical file for the drive specified.
  6569.  
  6570. Format of Stacker buffer:
  6571. Offset    Size    Description    (Table 0656)
  6572.  00h    WORD    01CDh
  6573.  02h    WORD    sector count
  6574.  04h    DWORD    number of starting sector
  6575.  08h    DWORD    far pointer to Data Buffer
  6576. --------k-214404-----------------------------
  6577. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  6578.     AX = 4404h
  6579.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  6580.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  6581.     DS:DX -> data record (see #0657)
  6582. Return: CF clear if successful
  6583.         AX = number of bytes read
  6584.     CF set on error
  6585.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6586. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  6587.       expander by Vertisoft Systems, Inc.
  6588. Note:    the installation check for v2.6 consists of scanning memory for the
  6589.       signature "FAT 2.6  byte:", which is immediately followed by a data
  6590.       table (see #0658)
  6591. BUG:    VOPT (a disk optimizer by Golden Bow Software) assumes that any driver
  6592.       which returns the "correct" number of bytes when the first word of
  6593.       the buffer for the data record contains the signature value 4444h is
  6594.       DoubleDisk; a workaround is for the non-DoubleDisk driver to return
  6595.       no data if the signature is present
  6596. SeeAlso: AX=440Dh
  6597. Index:    installation check;DUBLDISK.SYS
  6598.  
  6599. Format of DUBLDISK data record:
  6600. Offset    Size    Description    (Table 0657)
  6601.  00h    WORD    (call) signature 4444h
  6602.  02h    BYTE    (call) function
  6603.             00h ???
  6604.             01h ???
  6605. ---function 00h---
  6606.  02h    BYTE    (return) ???
  6607.  03h    BYTE    (return) ???
  6608. ---function 01h---
  6609.  02h    WORD    (return) 4444h
  6610.  04h    WORD    allocation unit size???
  6611.  06h    WORD    ???
  6612.  08h    WORD    ???
  6613.  0Ah    BYTE    ???
  6614.  
  6615. Format of DUBLDISK signature data table:
  6616. Offset    Size    Description    (Table 0658)
  6617.  00h  5 BYTEs    ???
  6618.  05h    BYTE    first drive number
  6619.  06h    BYTE    number of drives
  6620.  07h    ???
  6621. --------k-214404-----------------------------
  6622. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  6623.     AX = 4404h
  6624.     BL = drive number (00h = default, 01h = A:, etc)
  6625.     CX = 000Ah (size of DSPACKET structure)
  6626.     DS:DX -> DSPACKET structure (see #0659)
  6627. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6628.         AX = number of bytes actually transferred
  6629.     CF set on error
  6630.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6631. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6632.  
  6633. Format of DoubleSpace DSPACKET structure:
  6634. Offset    Size    Description    (Table 0659)
  6635.  00h    WORD    signature 444Dh ("DM")
  6636.  02h    BYTE    command code
  6637.         46h ('F') flush internal caches
  6638.         49h ('I') flush and invalidate internal caches
  6639.  03h    WORD    result code
  6640.         (return) 4F4Bh ("OK") if successful, else unchanged
  6641.  05h  5 BYTEs    padding
  6642. --------k-214404-----------------------------
  6643. INT 21 - DBLSPACE.BIN v6.2 - IOCTL - GET ??? FOR SPECIFIED DRIVE
  6644.     AX = 4404h
  6645.     BL = drive number (00h = default, 01h = A:, etc)
  6646.     CX = size of DSPACKET structure (ignored in DOS 6.2)
  6647.     DS:DX -> DSPACKET structure (see #0660)
  6648. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6649.         AX = number of bytes actually transferred
  6650.     CF set on error
  6651.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6652. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6653.  
  6654. Format of DoubleSpace DSPACKET structure:
  6655. Offset    Size    Description    (Table 0660)
  6656.  00h    WORD    signature 444Dh ("DM")
  6657.  02h    BYTE    command code
  6658.         53h ('S') get ??? for specified drive
  6659.  03h    WORD    result code
  6660.         (return) 4F4Bh ("OK") if successful, else unchanged
  6661.  05h    DWORD    (return) pointer to 96-byte ??? data
  6662.  09h    DWORD    (return) pointer to ??? data
  6663.  0Dh  3 BYTEs    reserved
  6664. --------d-214404-----------------------------
  6665. INT 21 U - xDISK v3.31 - CONFIGURE
  6666.     AX = 4404h
  6667.     BL = drive number (00h = default, 01h = A:, etc)
  6668.     CX = 0047h (length of version string)
  6669.     DS:DX -> 79-byte buffer for version string and ???
  6670.     DS:0081h = commandline containing new switches for driver
  6671. Return: CF clear if successful
  6672.         AX = number of bytes actually transferred
  6673.     CF set on error
  6674.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6675. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  6676. SeeAlso: AX=4405h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  6677. --------c-214404-----------------------------
  6678. INT 21 - COMBI-disk v1.13 - GET DATA RECORD
  6679.     AX = 4404h
  6680.     BL = drive number (00h = default, 01h = A:, etc)
  6681.     CX = 0032h (length of data packet)
  6682.     DS:DX -> buffer for data packet (see #0661)
  6683. Return: CF clear if successful
  6684.         AX = number of bytes actually transferred
  6685.     CF set on error
  6686.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6687. Program: COMBI-disk is a shareware combination cache and RAMdisk sharing a
  6688.       single pool of memory by Vadim V. Vlasov
  6689. Note:    the installation check consists of scanning the valid drives for one
  6690.       which returns a correctly-sized data packet with the proper
  6691.       signature in the first field
  6692. SeeAlso: AX=4405h"COMBI"
  6693. Index:    installation check;COMBI-disk
  6694.  
  6695. Format of COMBI-disk data packet:
  6696. Offset    Size    Description    (Table 0661)
  6697.  00h  6 BYTEs    ASCIZ signature "COMBI"
  6698.  06h    WORD    version (high byte = major, low = decimal minor version)
  6699.  08h    BYTE    current options (see below)
  6700.  09h    BYTE    sectors per allocation block
  6701.  0Ah    WORD    maximum buffer in KB
  6702.  0Ch    WORD    current buffer in KB (less than max if XMS memory being lent)
  6703.  0Eh    WORD    total number of allocation blocks
  6704.  10h    WORD    current number of allocation blocks
  6705.  12h    WORD    number of blocks being used by RAM disk
  6706.  14h    WORD    number of blocks being used by cache or unused
  6707.  16h    WORD    number of dirty cache blocks
  6708.  18h    WORD    number of blocks which could not be written out due to errors
  6709.  1Ah    WORD    total number of read requests
  6710.  1Ch    WORD    total number of sectors read
  6711.  1Eh    WORD    number of BIOS read requests (cache misses)
  6712.  20h    WORD    number of sectors read via BIOS (cache misses)
  6713.  22h    WORD    total number of write requests
  6714.  24h    WORD    total number of sectors written
  6715.  26h    WORD    number of BIOS write requests
  6716.  28h    WORD    number of sectors written via BIOS
  6717.  2Ah    WORD    number of RAM disk read requests
  6718.  2Ch    WORD    number of sectors read from RAM disk
  6719.  2Eh    WORD    number of RAM disk write requests
  6720.  30h    WORD    number of sectors written to RAM disk
  6721. --------d-214404-----------------------------
  6722. INT 21 - SFS v1.00 - GET CONFIGURATION INFORMATION
  6723.     AX = 4404h
  6724.     BL = drive number (00h = default, 01h = A:, etc)
  6725.     CX = 001Ah (length of data packet)
  6726.     DS:DX -> buffer for data packet (see #0662)
  6727. Return: CF clear if successful
  6728.         AX = number of bytes actually transferred
  6729.     CF set on error
  6730.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6731. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  6732.       Peter C. Gutmann
  6733. SeeAlso: AX=4405h"SFS"
  6734.  
  6735. Format of SFS data packet:
  6736. Offset    Size    Description    (Table 0662)
  6737.  00h  4 BYTEs    signature string "SFS1"
  6738.  04h    WORD    SFS unit number (0-based)
  6739.  06h    WORD    drive on which the SFS volume is mounted
  6740.  08h    DWORD    sector offset of logical volume from start of physical volume
  6741.         0 if logical volume = physical volume
  6742.  0Ch    WORD    flag: 00h = no disk mounted, 01h = disk mounted
  6743.  0Eh    WORD    flag: 00h read/write, 01h read-only
  6744.  10h    WORD    quick-unmount hotkey (high byte = shift state, low = scan code)
  6745.  12h    WORD    auto-unmount time in minutes, or 0000h if already expired, or
  6746.         FFFFh if not set
  6747.  14h    WORD    time in minutes remaining before auto-unmount
  6748.  16h    WORD    internal driver check code
  6749.         0000h no error
  6750.         0001h driver consistency check failed
  6751.         0002h unit consistency check failed
  6752.  18h    WORD    disk access mode
  6753.         0000h BIOS
  6754.         0001h IDE direct access
  6755.         0002h SCSI direct access
  6756. --------D-214405-----------------------------
  6757. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  6758.     AX = 4405h
  6759.     BL = drive number (00h = default, 01h = A:, etc)
  6760.     CX = number of bytes to write
  6761.     DS:DX -> data to write
  6762. Return: CF clear if successful
  6763.         AX = number of bytes actually written
  6764.     CF set on error
  6765.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6766. Note:    format of data is driver-specific
  6767. SeeAlso: AX=4403h,AX=4404h,INT 2F/AX=122Bh
  6768. --------d-214405-----------------------------
  6769. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  6770.     AX = 4405h
  6771.     BX = drive number (00h = default, 01h = A:, etc)
  6772.     CX = number of bytes to write
  6773.     DS:DX -> SCSIDISK control block (see also #0652 at AX=4403h"ST-01")
  6774. Return: CF clear if successful
  6775.         AX = number of bytes actually written
  6776.     CF set on error
  6777.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6778. SeeAlso: AX=4403h"ST-01"
  6779. --------k-214405-----------------------------
  6780. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  6781.     AX = 4405h
  6782.     BL = drive number (00h = default, 01h = A:, etc)
  6783.     CX = 000Ah (size of DSPACKET structure)
  6784.     DS:DX -> DSPACKET structure (see #0663)
  6785. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6786.         AX = number of bytes actually transferred
  6787.     CF set on error
  6788.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6789. Note:    this call is identical to the documented AX=4404h
  6790. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6791.  
  6792. Format of DoubleSpace DSPACKET structure:
  6793. Offset    Size    Description    (Table 0663)
  6794.  00h    WORD    signature 444Dh ("DM")
  6795.  02h    BYTE    command code
  6796.         46h ('F') flush internal caches
  6797.         49h ('I') flush and invalidate internal caches
  6798.  03h    WORD    result code
  6799.         (return) 4F4Bh ("OK") if successful, else unchanged
  6800.  05h  5 BYTEs    padding
  6801. --------d-214405-----------------------------
  6802. INT 21 U - xDISK v3.31 - ???
  6803.     AX = 4405h
  6804.     BL = drive number (00h = default, 01h = A:, etc)
  6805.     CX = number of bytes to write
  6806.     DS:DX -> buffer containing version string
  6807.     ???
  6808. Return: CF clear if successful
  6809.         AX = number of bytes actually transferred
  6810.     CF set on error
  6811.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6812. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  6813. SeeAlso: AX=4404h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  6814. --------d-214405-----------------------------
  6815. INT 21 - COMBI-disk v1.13 - CONTROL COMBI-disk
  6816.     AX = 4405h
  6817.     BL = drive number (00h = default, 01h = A:, etc) for RAM disk
  6818.     CX = number of bytes to write
  6819.     DS:DX -> buffer containing command packet (see #0665)
  6820. Return: CF clear if successful
  6821.         AX = number of bytes actually transferred
  6822.     CF set on error
  6823.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6824. SeeAlso: AX=4404h"COMBI"
  6825.  
  6826. (Table 0664)
  6827. Values for COMBI-disk command code:
  6828.  80h    flush cache
  6829.  81h    change options byte
  6830.  82h    shrink memory
  6831.  83h    expand memory
  6832.  84h    get dirty block information
  6833.  85h    reset write errors
  6834.  86h    reset counters
  6835.  
  6836. Format of COMBI-disk command packet:
  6837. Offset    Size    Description    (Table 0665)
  6838.  00h    WORD    version
  6839.  02h    BYTE    command code (see #0664)
  6840. ---command code 80h---
  6841.  no additional fields
  6842. ---command code 81h---
  6843.  03h    BYTE    new options byte (see #0666)
  6844. ---command code 82h---
  6845.  03h    WORD    number of KB to release
  6846. ---command code 83h---
  6847.  03h    WORD    number of KB to expand
  6848. ---command code 84h---
  6849.  03h    DWORD    -> buffer for block info (see #0667)
  6850. ---command code 85h---
  6851.  03h    DWORD    block ID
  6852. ---command code 86h---
  6853.  03h    BYTE    which counters to reset
  6854.         bit 0: hard disk read counts
  6855.         bit 1: hard disk write counts
  6856.         bit 2: RAM disk read/write counts
  6857. Note:    multiple commands may be placed in a single packet by stringing
  6858.       together as many command/argument pairs as desired
  6859.  
  6860. Bitfields for COMBI-disk options byte:
  6861. Bit(s)    Description    (Table 0666)
  6862.  0    cache off
  6863.  1    cache frozen
  6864.  2    write caching enabled
  6865.  3    delayed writing disabled
  6866.  5    fix memory allocation (no XMS lending)
  6867.  6    no 'sector not found' error
  6868.  
  6869. Format of COMBI-disk block info:
  6870. Offset    Size    Description    (Table 0667)
  6871.  00h    DWORD    block ID
  6872.  04h    BYTE    bitmask of valid sectors in block
  6873.  05h    BYTE    bitmask of dirty sectors in block
  6874.  06h    BYTE    last error returned by BIOS
  6875.  07h    BYTE    number of errors
  6876. --------D-214405-----------------------------
  6877. INT 21 - SFS v1.00 - DRIVER CONTROL
  6878.     AX = 4405h
  6879.     BL = drive number (00h = default, 01h = A:, etc)
  6880.     CX = number of bytes to write
  6881.     DS:DX -> data to write (see #0669)
  6882. Return: CF clear if successful
  6883.         AX = number of bytes actually written
  6884.     CF set on error
  6885.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6886. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  6887.       Peter C. Gutmann
  6888. SeeAlso: AX=4404h"SFS"
  6889.  
  6890. (Table 0668)
  6891. Values for SFS control function:
  6892.  00h    "PACKET_SET_DISKINFO"     set disk parameters
  6893.  01h    "PACKET_SET_KEYINFO"     set keying information
  6894.  02h    "PACKET_SET_READONLY"     select read/write or read-only
  6895.  03h    "PACKET_SET_DRIVENO"     set drive number to mount
  6896.  04h    "PACKET_SET_MOUNTSTATUS" set mount status
  6897.  05h    "PACKET_SET_UNMOUNT"     set/clear quick-unmount hotkey
  6898.  06h    "PACKET_SET_TIMEOUT"     set/clear auto-unmount timeout
  6899.  
  6900. Format of SFS control data packet:
  6901. Offset    Size    Description    (Table 0669)
  6902.  00h    WORD    signature 4330h ('C0')
  6903.  02h    WORD    function (see #0668)
  6904. ---function 00h---
  6905.  04h    WORD    sector size in bytes
  6906.  06h    BYTE    sectors per cluster
  6907.  07h    WORD    number of boot sectors
  6908.  09h    BYTE    number of copies of FAT
  6909.  0Ah    WORD    size of root directory in entries
  6910.  0Ch    WORD    number of sectors on disk, 16-bit
  6911.  0Eh    BYTE    media descriptor byte
  6912.  0Fh    WORD    sectors per FAT
  6913.  11h    WORD    sectors per track
  6914.  13h    WORD    number of heads
  6915.  15h    DWORD    number of hidden sectors
  6916.  19h    DWORD    number of sectors on disk, 32-bit
  6917. ---function 01h---
  6918.  04h 20 BYTEs    master IV for encrypted disk
  6919.  18h 64 BYTEs    NDC/SHS keying information
  6920. ---function 02h---
  6921.  04h    WORD    read-only state: 00h read-only, 01h read/write
  6922. ---function 03h---
  6923.  04h    WORD    drive number (see #0670)
  6924.  06h    DWORD    sector offset of logical volume from start of physical volume
  6925.         0 if logical volume = physical volume
  6926. ---function 04h---
  6927.  04h    WORD    mount status (00h unmounted, 01h mounted)
  6928. ---function 05h---
  6929.  04h    WORD    hotkey (high byte = shift state, low byte = scan code or 00h)
  6930.         0000h to disable hotkey
  6931. ---function 06h---
  6932.  04h    WORD    timeout in minutes before automatic unmount
  6933.         0000h to disable auto-unmount
  6934. Notes:    the data for function 00h corresponds to a DOS BPB (see AH=53h)
  6935.     functions 00h, 01h, and 03h automatically unmount the encrypted drive
  6936.     unmounting a drive with function 04h also destroys the encryption
  6937.       information in the driver and forces all dirty buffers to be flushed
  6938.  
  6939. Bitfields for SFS drive number:
  6940. Bit(s)    Description    (Table 0670)
  6941.  15-12    drive access mode
  6942.     0000 BIOS access
  6943.     0001 direct IDE access
  6944.     0010 direct SCSI access
  6945. ---if BIOS access---
  6946.  11-8    unused (0)
  6947.  7-0    BIOS drive number
  6948. ---if IDE access---
  6949.  11-8    unused (0)
  6950.  7-0    IDE drive number
  6951. ---if SCSI access---
  6952.  11-8    SCSI host number
  6953.  7-4    SCSI target ID
  6954.  3-0    SCSI logical unit number
  6955. --------D-214406-----------------------------
  6956. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  6957.     AX = 4406h
  6958.     BX = file handle
  6959. Return: CF clear if successful
  6960.         AL = input status
  6961.         00h not ready (device) or at EOF (file)
  6962.         FFh ready
  6963.     CF set on error
  6964.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6965. Note:    files may not register as being at EOF if positioned there by AH=42h
  6966. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  6967. --------D-214407-----------------------------
  6968. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  6969.     AX = 4407h
  6970.     BX = file handle
  6971. Return: CF clear if successful
  6972.         AL = input status
  6973.         00h not ready
  6974.         FFh ready
  6975.     CF set on error
  6976.         AX = error code (01h,05h,06h,0Dh) (see #0789 at AH=59h)
  6977. Note:    for DOS 2+, files are always ready for output, even if the disk is
  6978.       full or no media is in the drive
  6979. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  6980. --------D-214408-----------------------------
  6981. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  6982.     AX = 4408h
  6983.     BL = drive number (00h = default, 01h = A:, etc)
  6984. Return: CF clear if successful
  6985.         AX = media type (0000h removable, 0001h fixed)
  6986.     CF set on error
  6987.         AX = error code (01h,0Fh) (see #0789 at AH=59h)
  6988. SeeAlso: AX=4400h,AX=4409h,INT 2F/AX=122Bh
  6989. --------D-214409-----------------------------
  6990. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  6991.     AX = 4409h
  6992.     BL = drive number (00h = default, 01h = A:, etc)
  6993. Return: CF clear if successful
  6994.         DX = device attribute word
  6995.         bit 15: drive is SUBSTituted
  6996.         bit 12: drive is remote
  6997.         bit  9: direct I/O not allowed
  6998.     CF set on error
  6999.         AX = error code (01h,0Fh) (see #0789 at AH=59h)
  7000. Note:    on local drives, DX bits not listed above are the attribute word from
  7001.       the device driver header (see #0763 at AH=52h); for remote drives,
  7002.       the other bits appear to be undefined for DOS versions prior to 5.0
  7003.       (they are all cleared in DOS 5+)
  7004. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  7005. --------D-21440A-----------------------------
  7006. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  7007.     AX = 440Ah
  7008.     BX = handle
  7009. Return: CF clear if successful
  7010.         DX = attribute word (as stored in SFT)
  7011.         bit 15: set if remote
  7012.         bit 14: date/time not set on close
  7013.     CF set on error
  7014.         AX = error code (01h,06h) (see #0789 at AH=59h)
  7015. Notes:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  7016.       the file server on which the handle is located in CX
  7017.     DR-DOS 3.41 and 5.0 clear all bits of DX except bit 15
  7018. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  7019. --------D-21440B-----------------------------
  7020. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  7021.     AX = 440Bh
  7022.     CX = pause between retries (default 1)
  7023.     DX = number of retries (default 3)
  7024. Return: CF clear if successful
  7025.     CF set on error
  7026.         AX = error code (01h) (see #0789 at AH=59h)
  7027. Notes:    delay is dependent on processor speed (value in CX specifies number of
  7028.       64K-iteration empty loops to execute)
  7029.     if DX=0000h on entry, the retry count is left unchanged
  7030. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  7031. --------D-21440C-----------------------------
  7032. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  7033.     AX = 440Ch
  7034.     BX = device handle
  7035.     CH = category code (see #0671)
  7036.     CL = function number (see #0672)
  7037.     DS:DX -> parameter block (see #0673,#0674,#0675,#0676,#0677,#0678)
  7038.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  7039.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  7040. Return: CF set on error
  7041.         AX = error code (see #0789 at AH=59h)
  7042.     CF clear if successful
  7043.         DS:DX -> iteration count if CL=65h
  7044.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  7045.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  7046. Note:    DR-DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
  7047.       does not support a retry counter
  7048. SeeAlso: AX=440Dh,INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  7049. SeeAlso: INT 2F/AX=1A01h
  7050.  
  7051. (Table 0671)
  7052. Values for IOCTL category code:
  7053.  00h    unknown (DOS 3.3+)
  7054.  01h    COMn: (DOS 3.3+)
  7055.  03h    CON (DOS 3.3+)
  7056.  05h    LPTn:
  7057.  9Eh    Media Access Control driver (STARLITE)
  7058.  00h-7Fh reserved for Microsoft
  7059.  80h-FFh reserved for OEM/user-defined
  7060.  
  7061. (Table 0672)
  7062. Values for generic character IOCTL function:
  7063.  00h    MAC driver Bind (STARLITE)
  7064.  45h    set iteration (retry) count
  7065.  4Ah    select code page
  7066.  4Ch    start code-page preparation
  7067.  4Dh    end code-page preparation
  7068.  5Fh    set display information (DOS 4+)
  7069.  65h    get iteration (retry) count
  7070.  6Ah    query selected code page
  7071.  6Bh    query prepare list
  7072.  7Fh    get display information (DOS 4+)
  7073. Note:    bit assignments for function code:
  7074.         bit 7: set to ignore if unsupported, clear to return error
  7075.         bit 6: set if passed to driver, clear if intercepted by DOS
  7076.         bit 5: set if queries data from device, clear if sends command
  7077.         bits 4-0: subfunction
  7078.  
  7079. Format of parameter block for function 00h:
  7080. Offset    Size    Description    (Table 0673)
  7081.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  7082.  08h    WORD    version
  7083.  0Ah    WORD    flags
  7084.         bit 0: media requires connect or listen request before use
  7085.         bit 1: network is a LAN (broadcast/multicast supported)
  7086.         bit 2: point-to-point network
  7087.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  7088.         by MAC driver)
  7089.  0Eh    WORD    context
  7090.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  7091.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  7092.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  7093.  16h    WORD    addressing format (filled in by MAC driver)
  7094.         0000h general addressing
  7095.         0001h Ethernet addressing
  7096.         0002h Token Ring addressing
  7097.         0003h Token Bus addressing
  7098.  18h    DWORD    Send entry point (filled in by MAC driver)
  7099.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  7100.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  7101.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  7102.  
  7103. Format of parameter block for function 45h:
  7104. Offset    Size    Description    (Table 0674)
  7105.  00h    WORD    number of times output is attempted before driver assumes
  7106.           device is busy
  7107.  
  7108. Format of parameter block for functions 4Ah and 6Ah:
  7109. Offset    Size    Description    (Table 0675)
  7110.  00h    WORD    length of data
  7111.  02h    WORD    code page ID
  7112.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  7113.           start/end for each of N ranges (DOS 4.0)
  7114.     WORD    0000h  end of data (DOS 4.0)
  7115.  
  7116. Format of parameter block for function 4Ch:
  7117. Offset    Size    Description    (Table 0676)
  7118.  00h    WORD    flags
  7119.         DISPLAY.SYS = 0000h
  7120.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  7121.             prepare cartridge selection
  7122.  02h    WORD    length of remainder of parameter block
  7123.  04h    WORD    number of code pages following
  7124.  06h  N WORDs    code page 1,...,N
  7125.  
  7126. Format of parameter block for function 4Dh:
  7127. Offset    Size    Description    (Table 0677)
  7128.  00h    WORD    length of data
  7129.  02h    WORD    code page ID
  7130.  
  7131. Format of parameter block for functions 5Fh and 7Fh:
  7132. Offset    Size    Description    (Table 0678)
  7133.  00h    BYTE    level (0 for DOS 4.x-6.0)
  7134.  01h    BYTE    reserved (0)
  7135.  02h    WORD    length of following data (14)
  7136.  04h    WORD    control flags
  7137.         bit 0 set for blink, clear for intensity
  7138.         bits 1-15 reserved
  7139.  06h    BYTE    mode type (1=text, 2=graphics)
  7140.  07h    BYTE    reserved (0)
  7141.  08h    WORD    colors
  7142.         0000h = monochrome
  7143.         else N bits per pixel
  7144.  0Ah    WORD    pixel columns
  7145.  0Ch    WORD    pixel rows
  7146.  0Eh    WORD    character columns
  7147.  10h    WORD    character rows
  7148.  
  7149. Format of parameter block for function 6Bh:
  7150. Offset    Size    Description    (Table 0679)
  7151.  00h    WORD    length of following data
  7152.  02h    WORD    number of hardware code pages
  7153.  04h  N WORDs    hardware code pages 1,...,N
  7154.     WORD    number of prepared code pages
  7155.       N WORDs    prepared code pages 1,...,N
  7156. --------d-21440C-----------------------------
  7157. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  7158.     AX = 440Ch
  7159.     BX = device handle
  7160.     CH = category code
  7161.         07h tape (ASPITAPE.SYS)
  7162.     CL = function
  7163.         01h "mtop" - perform tape operation
  7164.         02h "mtget" - get tape status
  7165.         03h ignore end-of-tape errors
  7166.         04h enable end-of-tape errors
  7167.     DS:DX -> parameter block (see #0680,#0681)
  7168. Return: CF set on error
  7169.         AX = error code (see #0789 at AH=59h)
  7170.     CF clear if successful
  7171.         DS:DX -> data block
  7172. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  7173.       SCSI Programming Interface (ASPI).  It provides the following device
  7174.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  7175.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  7176.       also be the following names 'MTx' and 'NMTx' which default to 1024
  7177.       byte blocks.    The names may also have a '$' appended to try and make
  7178.       them unique from file names of 'RMT0' etc.
  7179.     once opend these devices must be put into RAW mode
  7180. SeeAlso: AX=4402h"ASPI"
  7181.  
  7182. Format of ASPITAPE.SYS mtop parameter block:
  7183. Offset    Size    Description    (Table 0680)
  7184.  00h    WORD    operation code
  7185.         00h "MTWEOF" - write an end-of-file record
  7186.         01h "MTFSF" - forward space file
  7187.         02h "MTBSF" - backward space file
  7188.         03h "MTFSR" - forward space record
  7189.         04h "MTBSR" - backward space record
  7190.         05h "MTREW" - rewind
  7191.         06h "MTOFFL" - rewind and unload
  7192.         07h "MTNOP" - perform TEST UNIT READY
  7193.  02h    DWORD    repetition count
  7194.  
  7195. Format of ASPITAPE.SYS mtget parameter block:
  7196. Offset    Size    Description    (Table 0681)
  7197.  00h    BYTE    ASPI host ID
  7198.  01h    BYTE    SCSI target ID
  7199.  02h    BYTE    SCSI logical unit number
  7200.  03h    BYTE    device parameters
  7201.         bit 0: drive must use fixed-block read and write
  7202.         bit 7: drive is an ASPI device
  7203.  04h    BYTE    current device state (see #0682)
  7204.  05h    BYTE    unit number within driver
  7205.  06h    WORD    fixed block blocksize
  7206.  08h    BYTE    last SCSI status
  7207.  09h    BYTE    last SCSI sense key
  7208.  0Ah    WORD    last SCSI opcode (packed) (see #0683)
  7209.  0Ch    WORD    residual bytes from SCSI opcode
  7210.  
  7211. Bitfields for ASPITAPE.SYS current device state:
  7212. Bit(s)    Description    (Table 0682)
  7213.  0    device currently opened in buffered mode
  7214.  1    drive currently opened in nonbuffered mode
  7215.  2    rewind drive on last close
  7216.  3    drive has been written on
  7217.  4    drive has been read from
  7218.  5    next read will return 0 bytes
  7219.  6    EOM will resemble EOF
  7220.  7    drive may be busy rewinding
  7221.  
  7222. Bitfields for SCSI opcode:
  7223. Bit(s)    Description    (Table 0683)
  7224.  0-7    SCSI operation (SCSI packet byte 0)
  7225.  8-10    SCSI flags (SCSI packet byte 1)
  7226.  11-12    ASPI "Direction Bits" (ASPI SRB byte 3)
  7227. --------D-21440D-----------------------------
  7228. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  7229.     AX = 440Dh
  7230.     BL = drive number (00h=default,01h=A:,etc)
  7231.     CH = category code (see #0684)
  7232.     CL = minor code (function) (see #0685)
  7233.     DS:DX -> (DOS) parameter block (see #0686,#0688,#0689,#0690,#0691)
  7234.     SI:DI -> (OS/2 comp box) parameter block (see #0692,#0693,#0694,#0695)
  7235. Return: CF set on error
  7236.         AX = error code (01h,02h) (see #0789 at AH=59h)
  7237.     CF clear if successful
  7238.         DS:DX -> data block if CL=60h or CL=61h
  7239. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  7240.       entries in the BPB for diskettes.
  7241.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  7242.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  7243.     DR-DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
  7244.       other minor codes return error code 16h
  7245.     some PCMCIA calls reportedly appear to be dangerous for MS-DOS versions
  7246.       prior to 5.0
  7247. SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
  7248.  
  7249. (Table 0684)
  7250. Values for block device IOCTL category code:
  7251.  08h    disk drive
  7252.  00h-7Fh reserved for Microsoft
  7253.  80h-FFh reserved for OEM/user-defined
  7254.  
  7255. (Table 0685)
  7256. Values for generic block IOCTL minor code:
  7257.  00h    (OS/2)    \ used to lock/unlock a drive
  7258.  01h    (OS/2)    /
  7259.  40h    set device parameters
  7260.  41h    write logical device track
  7261.  42h    format and verify logical device track
  7262.  46h    (DOS 4+) set volume serial number (see also AH=69h)
  7263.  47h    (DOS 4+) set access flag
  7264.  50h    (PCMCIA) attribute memory write
  7265.  51h    (PCMCIA) common memory write
  7266.  52h    (PCMCIA) force media change (DOS 5+ ???)
  7267.  53h    (PCMCIA) erase drive
  7268.  54h    (PCMCIA) erase media
  7269.  56h    (PCMCIA) set erase status callback
  7270.  57h    (PCMCIA) append Card Information Structure (CIS) tuple
  7271.  58h    (PCMCIA) erase CIS tuples
  7272.  60h    get device parameters
  7273.  61h    read logical device track
  7274.  62h    verify logical device track
  7275.  66h    (DOS 4+) get volume serial number (see also AH=69h)
  7276.  67h    (DOS 4+) get access flag
  7277.  68h    (DOS 5+) sense media type
  7278.  70h    (PCMCIA) attribute memory read
  7279.  73h    (PCMCIA) get memory media information (DOS 5+ ???)
  7280.  76h    (PCMCIA) get erase status callback
  7281.  77h    (PCMCIA) get first Card Information Structure (CIS) tuple
  7282.  78h    (PCMCIA) get next CIS tuple
  7283.  
  7284. Format of parameter block for functions 40h, 60h:
  7285. Offset    Size    Description    (Table 0686)
  7286.  00h    BYTE    special functions
  7287.         bit 0 set if function to use current BPB, clear if Device
  7288.               BIOS Parameter Block field contains new default BPB
  7289.         bit 1 set if function to use track layout fields only
  7290.             must be clear if CL=60h
  7291.         bit 2 set if all sectors in track same size (should be set)
  7292.         bits 3-7 reserved
  7293.  01h    BYTE    device type (see #0687)
  7294.  02h    WORD    device attributes
  7295.         bit 0 set if nonremovable medium
  7296.         bit 1 set if door lock ("changeline") supported
  7297.         bits 2-15 reserved
  7298.  04h    WORD    number of cylinders
  7299.  06h    BYTE    media type
  7300.         for 1.2M drive
  7301.             00h 1.2M disk (default)
  7302.             01h 320K/360K disk
  7303.         F8h for DUBLDISK.SYS v2.6 expanded drives
  7304.         always 00h for other drive types
  7305.  07h 31 BYTEs    device BPB (see #0779 at AH=53h), bytes after BPB offset 1Eh
  7306.           omitted
  7307. ---function 40h only---
  7308.  26h    WORD    number of sectors per track (start of track layout field)
  7309.         (maximum 63)
  7310.  28h  N word pairs: number,size of each sector in track
  7311.  
  7312. (Table 0687)
  7313. Values for device type:
  7314.  00h    320K/360K disk
  7315.  01h    1.2M disk
  7316.  02h    720K disk
  7317.  03h    single-density 8-inch disk
  7318.  04h    double-density 8-inch disk
  7319.  05h    fixed disk
  7320.  06h    tape drive
  7321.  07h    (DOS 3.3+) other type of block device, normally 1.44M floppy
  7322.  08h    read/write optical disk
  7323.  09h    (DOS 5+) 2.88M floppy
  7324.  
  7325. Format of parameter block for functions 41h, 61h:
  7326. Offset    Size    Description    (Table 0688)
  7327.  00h    BYTE    special functions (reserved, must be zero)
  7328.  01h    WORD    number of disk head
  7329.  03h    WORD    number of disk cylinder
  7330.  05h    WORD    number of first sector to read/write
  7331.  07h    WORD    number of sectors
  7332.  09h    DWORD    transfer address
  7333.  
  7334. Format of parameter block for function 42h:
  7335. Offset    Size    Description    (Table 0689)
  7336.  00h    BYTE    reserved, must be zero (DOS <3.2)
  7337.           bit 0=0: format/verify track
  7338.             1: format status call (DOS 3.2+), don't actually format
  7339.           bits 1-7 reserved, must be zero
  7340.         value on return (DOS 3.3+):
  7341.           00h    specified tracks, sectors/track supported by BIOS
  7342.           01h    function not supported by BIOS
  7343.           02h    specified tracks, sectors/track not allowed for drive
  7344.           03h    no disk in drive
  7345.  01h    WORD    number of disk head
  7346.  03h    WORD    number of disk cylinder
  7347.  
  7348. Format of parameter block for function 62h:
  7349. Offset    Size    Description    (Table 0690)
  7350.  00h    BYTE    reserved, must be zero (DOS <3.2)
  7351.           bit 0=0: verify single track
  7352.             1: verify multiple tracks
  7353.           bits 1-7 reserved, must be zero
  7354.         value on return (DOS 3.3+):
  7355.           00h    specified tracks, sectors/track supported by BIOS
  7356.           01h    function not supported by BIOS
  7357.           02h    specified tracks, sectors/track not allowed for drive
  7358.           03h    no disk in drive
  7359.  01h    WORD    number of disk head
  7360.  03h    WORD    number of disk cylinder
  7361.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  7362.  
  7363. Format of parameter block for functions 46h, 66h:
  7364. Offset    Size    Description    (Table 0691)
  7365.  00h    WORD    (call) info level (should be 0000h)
  7366.  02h    DWORD    disk serial number (binary)
  7367.  06h 11 BYTEs    volume label or "NO NAME    "
  7368.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   " (CL=66h only)
  7369.  
  7370. Format of parameter block for functions 47h, 67h:
  7371. Offset    Size    Description    (Table 0692)
  7372.  00h    BYTE    special-function field (must be zero)
  7373.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  7374.  
  7375. Format of parameter block for function 52h:
  7376.  00h    BYTE    (call) unused???    (Table 0693)
  7377.         (return) 00h if flash/ATA drive but no card inserted
  7378.             unchanged otherwise
  7379. Notes:    the absense of a flash card should be tested by checking the DOS error
  7380.       code rather than the returned byte
  7381.     the parameter byte is cleared to 00h erroneously by the Award
  7382.       PCDISK.EXE v1.02c PCMCIA/ATA driver if no ATA card is inserted
  7383.  
  7384. Format of parameter block for function 68h:
  7385. Offset    Size    Description    (Table 0694)
  7386.  00h    BYTE    01h for default media type, 00h for any other media type
  7387.         (see also INT 13/AH=20h"Compaq")
  7388.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  7389.  
  7390. Format of parameter block for function 73h:
  7391. Offset    Size    Description    (Table 0695)
  7392.  00h    BYTE    ???
  7393.         00h ATA card inserted ???
  7394.         80h ATA card not inserted ???
  7395.  01h    BYTE    length of parameter block ???
  7396.         apparently always 40h
  7397.  02h    BYTE    ???
  7398.         00h ATA card not inserted ???
  7399.         0Dh ATA card inserted ???
  7400.  03h  2 BYTEs    ??? (apparently always 00h)
  7401.  05h    BYTE    drive number (0=first) ???
  7402.  06h    BYTE    total number of drives ???
  7403.  07h    BYTE    ???
  7404.         00h ATA card not inserted ???
  7405.         01h ATA card inserted ???
  7406.  08h 17 BYTEs    ???
  7407.  19h    BYTE    ???
  7408.         00h ATA card not inserted ???
  7409.         01h ATA card inserted ???
  7410.  1Ah    BYTE    ??? (apparently always 01h)
  7411.  1Bh    BYTE    ???
  7412.         00h ATA card not inserted ???
  7413.         01h ATA card inserted ???
  7414.  1Ch  2 BYTEs    ??? (apparently always 0015h)
  7415.  1Eh  2 BYTEs    ???
  7416.  20h  2 BYTEs    ??? (apparently always 0110h)
  7417.  22h 15 BYTEs    ???
  7418.  31h  2 BYTEs    ??? (apparently always 7000h)
  7419.  33h 11 BYTEs    driver signature
  7420.         "AWARD PDISK" for Award PCDISK.EXE v1.02c PCMCIA/ATA driver
  7421.  3Eh  2 BYTEs    ???
  7422. --------D-21440E-----------------------------
  7423. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  7424.     AX = 440Eh
  7425.     BL = drive number (00h=default,01h=A:,etc)
  7426. Return: CF set on error
  7427.         AX = error code (01h,0Fh) (see #0789 at AH=59h)
  7428.     CF clear if successful
  7429.         AL = 00h block device has only one logical drive assigned
  7430.          1..26 the last letter used to reference the drive (1=A:,etc)
  7431. Note:    DR-DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  7432.       always returns AL=00h
  7433. SeeAlso: AX=440Fh,INT 2F/AX=122Bh
  7434. --------D-21440F-----------------------------
  7435. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  7436.     AX = 440Fh
  7437.     BL = physical drive number (00h=default,01h=A:,etc))
  7438. Return: CF set on error
  7439.         AX = error code (01h,0Fh) (see #0789 at AH=59h)
  7440.     CF clear if successful
  7441.         drive now responds to next logical drive number
  7442. Notes:    maps logical drives to physical drives, similar to DOS's treatment of
  7443.       a single physical floppy drive as both A: and B:
  7444.     DR-DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  7445.       always returns an error on this function
  7446. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  7447. --------D-214410-----------------------------
  7448. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  7449.     AX = 4410h
  7450.     BX = handle for device
  7451.     CH = category code (see #0671)
  7452.     CL = function code (see #0672)
  7453. Return: CF clear if successful
  7454.         AX = 0000h    specified IOCTL function is supported
  7455.     CF set on error
  7456.         AL = 01h    IOCTL capability not available
  7457. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  7458.       standard DOS 3.2 set may use this call first to see whether a
  7459.       particular call is supported
  7460. SeeAlso: AX=440Ch,AX=440Dh,AX=4411h
  7461. --------d-214410BXFFFF-----------------------
  7462. INT 21 U - NewSpace - ENABLE DRIVER
  7463.     AX = 4410h
  7464.     BX = FFFFh
  7465. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  7466.       all files as they are written and decompresses them as they are read
  7467. Note:    compressed files are not accessible unless the driver is enabled
  7468. SeeAlso: AX=4411h/BX=FFFFh
  7469. --------D-214411-----------------------------
  7470. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  7471.     AX = 4411h
  7472.     BL = drive number
  7473.     CH = category code (see #0684)
  7474.     CL = function code (see #0685)
  7475. Return: CF clear if successful
  7476.         AX = 0000h    specified IOCTL function is supported
  7477.     CF set on error
  7478.         AL = 01h    IOCTL capability not available
  7479. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  7480.       standard DOS 3.2 set may use this call first to see whether a
  7481.       particular call is supported
  7482. SeeAlso: AX=440Ch,AX=440Dh,AX=4410h
  7483. --------d-214411BXFFFF-----------------------
  7484. INT 21 U - NewSpace - DISABLE DRIVER
  7485.     AX = 4411h
  7486.     BX = FFFFh
  7487. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  7488.       all files as they are written and decompresses them as they are read
  7489. Note:    compressed files are not accessible unless the driver is enabled
  7490. SeeAlso: AX=4410h/BX=FFFFh
  7491. --------O-214412-----------------------------
  7492. INT 21 O - DR-DOS 5.0-6.0 - DETERMINE DOS TYPE
  7493.     AX = 4412h
  7494.     CF set
  7495. Return: CF set if not DR-DOS
  7496.         AX = error code (see #0789 at AH=59h)
  7497.     CF clear if DR-DOS
  7498.         DX = AX = version code (see #0697)
  7499. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  7500.       identical to AX=4452h
  7501. SeeAlso: AX=4452h
  7502. --------d-214412BXFFFF-----------------------
  7503. INT 21 U - NewSpace - INSTALLATION CHECK???
  7504.     AX = 4412h
  7505.     BX = FFFFh
  7506. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  7507.     BX:DX -> ???
  7508.     CX = ???
  7509. SeeAlso: AX=4411h/BX=FFFFh
  7510. --------d-214413BXFFFF-----------------------
  7511. INT 21 U - NewSpace - GET ???
  7512.     AX = 4413h
  7513.     BX = FFFFh
  7514. Return: AX = code segment of NewRes (resident driver for NewSpace)
  7515.     BX = offset of ???
  7516. SeeAlso: AX=4412h/BX=FFFFh
  7517. --------O-214414-----------------------------
  7518. INT 21 OU - DR-DOS 5.0-6.0 - SET GLOBAL PASSWORD
  7519.     AX = 4414h
  7520.     DS:DX -> password string (blank-padded to 8 characters)
  7521. Desc:    Specify the master password for accessing files.
  7522. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  7523.       identical to AX=4454h
  7524. SeeAlso: AX=4454h
  7525. --------d-214414BXFFFF-----------------------
  7526. INT 21 U - NewSpace - DEBUGGING DUMP
  7527.     AX = 4414h
  7528.     BX = FFFFh
  7529. Return: debugging dump written to X:\NEWSPACE.SMP
  7530. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  7531. --------O-2144-------------------------------
  7532. INT 21 OU - DR-DOS 5.0-6.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  7533.     AH = 44h
  7534.     AL = 16h to 18h
  7535. Note:    these obsolete subfunctions (which are no longer supported in Novell
  7536.       DOS 7) are identical to AX=4456h through 4458h
  7537. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  7538. --------O-214451-----------------------------
  7539. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  7540.     AX = 4451h
  7541. Return: CF set if not Concurrent DOS
  7542.         AX = error code (see #0789 at AH=59h)
  7543.     CF clear if successful
  7544.         AH = single-user/multiuser nature
  7545.         10h single-user
  7546.             AL = operating system version ID (see #0697)
  7547.         14h multiuser
  7548.             AL = operating system version ID (see #0696)
  7549. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  7550.       in the environment variable VER
  7551.     use this function if you are looking for multiuser capabilities,
  7552.       AX=4452h for single-user
  7553.     this function should never return the single-user values
  7554. SeeAlso: AX=4452h,AX=4459h
  7555.  
  7556. (Table 0696)
  7557. Values for Digital Research operating system version ID:
  7558.  32h    Concurrent PC DOS 3.2
  7559.  41h    Concurrent DOS 4.1
  7560.  50h    Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  7561.  60h    Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  7562.  62h    Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  7563.  66h    DR Multiuser DOS 5.1
  7564.  67h    Concurrent DOS 5.1
  7565. --------O-214452-----------------------------
  7566. INT 21 - DR-DOS 3.41+ - DETERMINE DOS TYPE/GET DR-DOS VERSION
  7567.     AX = 4452h ("DR")
  7568.     CF set
  7569. Return: CF set if not DR-DOS
  7570.         AX = error code (see #0789 at AH=59h)
  7571.     CF clear if DR-DOS
  7572.         AX = version code
  7573.         AH = single-user/multiuser nature
  7574.         10h single-user
  7575.             AL = operating system version ID (see #0697)
  7576.         14h multiuser
  7577.             AL = operating system version ID (see #0696)
  7578.         DX modified (see note)
  7579. Notes:    the DR-DOS version is stored in the environment variable VER
  7580.     use this function if looking for single-user capabilities, AX=4451h
  7581.       if looking for multiuser; this call should never return multiuser
  7582.       values
  7583.     in DR-DOS 3.41-6.0, DX=AX on return; for Novell DOS 7, DH=AH but DL=00h
  7584.     Novell DOS 7 returns error code 0001h if SETVER 255.x is in effect for
  7585.       the calling program
  7586. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  7587.  
  7588. (Table 0697)
  7589. Values for Digital Research operating system version ID:
  7590.  60h    DOS Plus
  7591.  63h    DR-DOS 3.41
  7592.  64h    DR-DOS 3.42
  7593.  65h    DR-DOS 5.00
  7594.  67h    DR-DOS 6.00
  7595.  70h    PalmDOS
  7596.  71h    DR-DOS 6.0 March 1993 "business update"
  7597.  72h    Novell DOS 7.0
  7598. --------O-214454-----------------------------
  7599. INT 21 U - DR-DOS 3.41+ - SET GLOBAL PASSWORD
  7600.     AX = 4454h
  7601.     DS:DX -> password string (blank-padded to 8 characters)
  7602. Desc:    Specify the master password for accessing files.
  7603. SeeAlso: AX=4303h,AX=4414h
  7604. --------O-214456-----------------------------
  7605. INT 21 U - DR-DOS 5.0+ - HISTORY BUFFER CONTROL
  7606.     AX = 4456h
  7607.     DL = control flags (see #0698)
  7608. Return: AL = previous value of state flags (see #0699)
  7609. Note:    DR-DOS 6.0 only checks bit 0 and ignores the rest of DL
  7610. SeeAlso: #0700
  7611.  
  7612. Bitfields for control flags:
  7613. Bit(s)    Description    (Table 0698)
  7614.  0    whose buffer: 0=application, 1=COMMAND.COM
  7615. ---Novell DOS 7---
  7616.  1    toggle HISTORY usage
  7617.  2    toggle INSERT state 
  7618. Note:    only one bit at a time may be used
  7619.  
  7620. Bitfields for state flags:
  7621. Bit(s)    Description    (Table 0699)
  7622.  0    HISTORY buffer enabled
  7623.  1    INSERT enabled
  7624.  2-5    unused
  7625.  7    whose buffer: 0=application, 1=COMMAND.COM
  7626. --------O-214457-----------------------------
  7627. INT 21 U - DR-DOS 5.0+ - SHARE/HILOAD CONTROL
  7628.     AX = 4457h
  7629.     DH = subfunction
  7630.         00h enable/disable SHARE
  7631.         DL = 00h disable
  7632.            = 01h enable
  7633.            else Return: AX = ???
  7634.         01h get HILOAD status
  7635.         Return: AX = status
  7636.                 0000h off
  7637.                 0001h on
  7638.         02h set HILOAD status
  7639.         DL = new state (00h off, 01h on)
  7640.         Return: AX = ???
  7641.         other
  7642.         Return: AX = ???
  7643. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0; it does not seem
  7644.       to be supported by Novell DOS 7
  7645. SeeAlso: AX=4457h/DX=FFFFh
  7646. --------O-214457DXFFFF-----------------------
  7647. INT 21 U - DR-DOS 6.0 - GET SHARE STATUS
  7648.     AX = 4457h
  7649.     DX = FFFFh
  7650. Return: AX = SHARE status
  7651. SeeAlso: INT 2F/AX=1000h
  7652. --------O-214458-----------------------------
  7653. INT 21 U - DR-DOS 5.0+ internal - GET POINTER TO INTERNAL VARIABLE TABLE
  7654.     AX = 4458h
  7655. Return: ES:BX -> internal variable table (see #0700,#0701)
  7656.     AX = ??? (0B50h for DR-DOS 5.0, 0A56h for DR-DOS 6.0, 0FE4h for
  7657.           Novell DOS 7)
  7658. SeeAlso: AX=4452h
  7659.  
  7660. Format of DR-DOS 5.0-6.0 internal variable table:
  7661. Offset    Size    Description    (Table 0700)
  7662.  00h    WORD    ???
  7663.  02h    WORD    segment of ???
  7664.  04h    WORD    offset within DOS data segment of history control structure
  7665.           for COMMAND.COM history buffer (see #0702)
  7666.  06h    WORD    offset within DOS data segment of history control structure
  7667.           for application history buffer (see #0702)
  7668.  08h    BYTE    initial history state flags (see #0699)
  7669.  09h  2 BYTEs    ???
  7670.  0Bh    WORD    KB of extended memory at startup
  7671.  0Dh    BYTE    number of far jump entry points
  7672.  0Eh    WORD    segment containing far jumps to DR-DOS entry points (see #0703)
  7673.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  7674.           memory block (see #0704) or 0000h if none; segment is FFFFh
  7675.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  7676.           or 0000h if already used
  7677. ---DR-DOS 6.0---
  7678.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  7679.         memory block (see #0704) or 0000h if none; segment is FFFFh
  7680.  16h  8 BYTEs    ???
  7681.  1Eh    WORD    offset in DOS data segment of full COUNTRY.SYS filename
  7682.  20h  8 BYTEs    ???
  7683.  28h    WORD    offset in DOS data segment of SHARE hook table
  7684.  2Ah  2 BYTEs    ???
  7685.  2Ch    WORD    offset in DOS data segment of far pointer to INT 2F/AX=1000h
  7686.           handler
  7687. Note:    the segment used for the DR-DOS 6.0 CONFIG environment variables
  7688.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  7689.       called from CONFIG.SYS. The word is set to zero later when the area
  7690.       is copied to the COMMAND.COM environment space.  This allows
  7691.       CONFIG.SYS to pass information to AUTOEXEC.BAT.
  7692.  
  7693. Format of Novell DOS 7 internal variable table:
  7694. Offset    Size    Description    (Table 0701)
  7695.  00h    ???
  7696.  1Eh    WORD    offset of COUNTRY.SYS filename
  7697.  42h 16 DWORDs    pointers to ??? entry points
  7698.     ???
  7699.  
  7700. Format of history control structure:
  7701. Offset    Size    Description    (Table 0702)
  7702.  00h    WORD    segment of buffer
  7703.  02h    WORD    size of buffer in bytes
  7704.  04h    WORD    ???
  7705.  
  7706. Format of kernel entry jump table for DR-DOS 5.0-6.0:
  7707. Offset    Size    Description    (Table 0703)
  7708.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  7709.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  7710.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  7711.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22 (RETF)
  7712.  14h  5 BYTEs    far jump to kernel entry point for INT 23 (RETF)
  7713.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  7714.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  7715.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  7716.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  7717.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  7718.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  7719.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  7720.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  7721.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  7722.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  7723.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  7724. Notes:    all of these entry points are indirected through this jump table
  7725.       to allow the kernel to be relocated into high memory while leaving
  7726.       the actual entry addresses in low memory for maximum compatibility
  7727.     some of these entry points (22h,23h,24h,2Eh,2Fh) are replaced as soon
  7728.       as COMMAND.COM is loaded, and return immediately to the caller, some
  7729.       returning an error code (the original handler for INT 2F returns
  7730.       AL=03h [fail]).
  7731.  
  7732. Format of HMA Memory Block (DR-DOS 6.0 kernel loaded in HMA):
  7733. Offset    Size    Description    (Table 0704)
  7734.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  7735.  02h    WORD    size of this block in bytes (at least 10h)
  7736.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  7737.         00h system
  7738.         01h KEYB
  7739.         02h NLSFUNC
  7740.         03h SHARE
  7741.         04h TaskMAX
  7742.         05h COMMAND
  7743.  05h    var    TSR (or system) code and data. DR-DOS TSR's, such as KEYB,
  7744.           hooks interrupts using segment FFFEh instead FFFFh.
  7745. --------O-214459-----------------------------
  7746. INT 21 - DR MultiUser DOS 5.0 - API
  7747.     AX = 4459h
  7748.     CL = function (see INT E0"CP/M")
  7749.     DS,DX = parameters
  7750. Notes:    DR-DOS 5.0 and Novell DOS 7 return CF set and AX=0001h
  7751.     this API is also available on INT E0
  7752. SeeAlso: AX=4452h,INT E0"CP/M"
  7753. --------N-2144E0-----------------------------
  7754. INT 21 U - Sun PC-NFS - API???
  7755.     AX = 44E0h
  7756.     DS:DX -> ???
  7757.     SS:BP -> stack frame (see #0705)
  7758. Return: ???
  7759. Note:    this function is also supported by Beame&Whiteside's BWPCNFS shim; the
  7760.       description presented here was derived from that shim
  7761.  
  7762. Format of PC-NFS stack frame:
  7763. Offset    Size    Description    (Table 0705)
  7764.  00h    WORD    -> previous stack frame
  7765.  02h    DWORD    return address
  7766. --------d-2144FFBXFFFF-----------------------
  7767. INT 21 U - NewSpace - ???
  7768.     AX = 44FFh
  7769.     BX = FFFFh
  7770.     DX = ???
  7771. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  7772.       all files as they are written and decompresses them as they are read
  7773. SeeAlso: AX=4414h/BX=FFFFh
  7774. --------!---Section--------------------------
  7775.