home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / DTOOL / INTER57B.ZIP / INTERRUP.F < prev    next >
Text File  |  1998-03-22  |  361KB  |  9,489 lines

  1. Interrupt List, part 6 of 16
  2. Copyright (c) 1989,1990,1991,1992,1993,1994,1995,1996,1997,1998 Ralf Brown
  3. --------D-2125-------------------------------
  4. INT 21 - DOS 1+ - SET INTERRUPT VECTOR
  5.     AH = 25h
  6.     AL = interrupt number
  7.     DS:DX -> new interrupt handler
  8. Notes:    this function is preferred over direct modification of the interrupt
  9.       vector table
  10.     some DOS extenders place an API on this function, as it is not
  11.       directly meaningful in protected mode
  12.     under DR DOS 5.0+, this function does not use any of the DOS-internal
  13.       stacks and may thus be called at any time
  14.     Novell NetWare (except the new DOS Requester) monitors the offset of
  15.       any INT 24 set, and if equal to the value at startup, substitutes
  16.       its own handler to allow handling of network errors; this introduces
  17.       the potential bug that any program whose INT 24 handler offset
  18.       happens to be the same as COMMAND.COM's will not have its INT 24
  19.       handler installed
  20. SeeAlso: AX=2501h,AH=35h
  21. --------E-212501-----------------------------
  22. INT 21 P - Phar Lap 386/DOS-Extender - RESET DOS EXTENDER DATA STRUCTURES
  23.     AX = 2501h
  24.     SS = application's original SS or DS (FlashTek X-32VM)
  25. Return: CF clear if successful
  26.     CF set on error
  27.         caller is operating on X-32 stack (FlashTek X-32VM)
  28. Notes:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  29.       system calls.     Only available when directly using 386/DOS-Extender or
  30.       a compatible DOS extender, or when using a product that was created
  31.       using 386-DOS/Extender or a compatible
  32.     this function is also supported by FlashTek X-32VM
  33. SeeAlso: AH=30h"Phar Lap"
  34. --------E-212502-----------------------------
  35. INT 21 P - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  36.     AX = 2502h
  37.     CL = interrupt number
  38. Return: CF clear
  39.     ES:EBX = CS:EIP of protected-mode interrupt handler
  40. Note:    this function is also supported by FlashTek X-32VM
  41. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0204h
  42. --------E-212503-----------------------------
  43. INT 21 P - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  44.     AX = 2503h
  45.     CL = interrupt number
  46. Return: CF clear
  47.     EBX = CS:IP of real-mode interrupt handler
  48. Note:    this function is also supported by FlashTek X-32VM
  49. SeeAlso: AX=2502h,AX=2504h,AH=35h,INT 31/AX=0200h
  50. --------E-212504-----------------------------
  51. INT 21 P - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  52.     AX = 2504h
  53.     CL = interrupt number
  54.     DS:EDX = CS:EIP of protected-mode interrupt handler
  55. Return: CF clear
  56. Note:    this function is also supported by FlashTek X-32VM
  57. SeeAlso: AX=2502h,AX=2505h,INT 31/AX=0205h
  58. --------E-212505-----------------------------
  59. INT 21 P - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  60.     AX = 2505h
  61.     CL = interrupt number
  62.     EBX = CS:IP of real-mode interrupt handler
  63. Return: CF clear
  64. Note:    this function is also supported by FlashTek X-32VM
  65. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0201h
  66. --------E-212506-----------------------------
  67. INT 21 P - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CNTRL IN PR. MODE
  68.     AX = 2506h
  69.     CL = interrupt number
  70.     DS:EDX = CS:EIP of protected-mode interrupt handler
  71. Return: CF clear
  72. Notes:    this function modifies both the real-mode low-memory interrupt
  73.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  74.     interrupts occurring in real mode are resignaled in protected mode
  75.     this function is also supported by FlashTek X-32VM
  76. --------E-212507-----------------------------
  77. INT 21 P - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  78.     AX = 2507h
  79.     CL = interrupt number
  80.     DS:EDX = CS:EIP of protected-mode interrupt handler
  81.     EBX = CS:IP of real-mode interrupt handler
  82. Return: CF clear
  83. Notes:    interrupts are disabled until both vectors have been modified
  84.     this function is also supported by FlashTek X-32VM
  85. SeeAlso: AX=2504h,AX=2505h
  86. --------E-212508-----------------------------
  87. INT 21 P - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  88.     AX = 2508h
  89.     BX = segment selector
  90. Return: CF clear if successful
  91.         ECX = linear base address of segment
  92.     CF set if invalid segment selector
  93. Note:    this function is also supported by FlashTek X-32VM
  94. SeeAlso: AX=2509h
  95. --------E-212509-----------------------------
  96. INT 21 P - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  97.     AX = 2509h
  98.     EBX = linear address to convert
  99. Return: CF clear if successful
  100.         ECX = physical address (carry flag clear)
  101.     CF set if linear address not mapped in page tables
  102. SeeAlso: AX=2508h
  103. --------E-212509-----------------------------
  104. INT 21 P - FlashTek X-32VM - GET SYSTEM SEGMENTS AND SELECTORS
  105.     AX = 2509h
  106. Return: CF clear
  107.     EAX high word = default DS
  108.     AX = alias for 16-bit data segment
  109.     BX = real mode code segment
  110.     EDX high word = selector covering full 4GB address space
  111.     DX = default SS
  112.     ESI high word = PSP selector
  113.     SI = environment selector
  114. --------E-21250A-----------------------------
  115. INT 21 P - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  116.     AX = 250Ah
  117.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  118.          to modify
  119.     EBX = physical base address of memory to map (multiple of 4K)
  120.     ECX = number of physical 4K pages to map
  121. Return: CF clear if successful
  122.         EAX = 32-bit offset in segment of mapped memory
  123.     CF set on error
  124.         EAX = error code
  125.         08h insufficient memory to create page tables
  126.         09h invalid segment selector
  127. SeeAlso: INT 31/AX=0800h
  128. --------E-21250C-----------------------------
  129. INT 21 P - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  130.     AX = 250Ch
  131. Return: CF clear
  132.     AL = base interrupt vector for IRQ0-IRQ7
  133.     AH = base interrupt vector for IRQ8-IRQ15
  134.     BL = interrupt vector for BIOS print screen function (Phar Lap only)
  135. Note:    this function is also supported by FlashTek X-32VM
  136. SeeAlso: INT 31/AX=0400h,INT 67/AX=DE0Ah
  137. --------E-21250D-----------------------------
  138. INT 21 P - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  139.     AX = 250Dh
  140. Return: CF clear
  141.     EAX = CS:IP of real-mode callback procedure (see #1046) that will
  142.           call through from real mode to a protected-mode routine
  143.     EBX = 32-bit real-mode address of intermode call data buffer
  144.     ECX = size in bytes of intermode call data buffer
  145.     ES:EDX = protected-mode address of intermode call data buffer
  146. Notes:    this function is also supported by FlashTek X-32VM
  147.     X-32VM guarantees the intermode buffer to be at least 4 KB
  148. SeeAlso: AX=250Eh
  149.  
  150. (Table 1046)
  151. Call Phar Lap real-mode callback with:
  152.     STACK:    DWORD    offset to protected-mode code
  153.         WORD    placeholder for protected-mode CS
  154.         DWORD    pointer to selector structure (see #1047)
  155.             or 0000h:0000h for defaults
  156.         var    parameters for protected-mode procedure
  157. Return: via FAR return
  158.  
  159. Format of Phar Lap selector structure:
  160. Offset    Size    Description    (Table 1047)
  161.  00h    WORD    protected-mode GS selector
  162.  02h    WORD    protected-mode FS selector
  163.  04h    WORD    protected-mode ES selector
  164.  06h    WORD    protected-mode DS selector
  165. --------E-21250E-----------------------------
  166. INT 21 P - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  167.     AX = 250Eh
  168.     EBX = CS:IP of real-mode procedure to call
  169.     ECX = number of two-byte words to copy from protected-mode stack
  170.           to real-mode stack
  171. Return: CF clear if successful
  172.         all segment registers unchanged
  173.         all general registers contain values set by real-mode procedure
  174.         all other flags set as they were left by real-mode procedure
  175.         stack unchanged
  176.     CF set on error
  177.         EAX = error code
  178.         01h not enough real-mode stack space
  179. Note:    this function is also supported by FlashTek X-32VM; under X-32VM, the
  180.       call will fail if ECX > 0000003Fh
  181. SeeAlso: AX=250Dh,AX=2510h,AH=E1h"OS/286",INT 31/AX=0301h
  182. --------E-21250F-----------------------------
  183. INT 21 P - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  184.     AX = 250Fh
  185.     ES:EBX = 48-bit protected-mode address to convert
  186.     ECX = 00000000h or length of data in bytes
  187. Return: CF clear if successful (address < 1MB and contiguous)
  188.         ECX = 32-bit real-mode MS-DOS address
  189.     CF set on error (address >= 1MB or not contiguous)
  190.         ECX = linear address
  191. Note:    this function is also supported by FlashTek X-32VM
  192. SeeAlso: AX=2510h
  193. --------E-212510-----------------------------
  194. INT 21 P - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  195.     AX = 2510h
  196.     EBX = CS:IP of real-mode procedure to call
  197.     ECX = number of two-byte words to copy to protected-mode stack to
  198.           real-mode stack
  199.     DS:EDX -> pointer to parameter block (see #1048)
  200. Return: CF clear if successful
  201.         all segment registers unchanged,
  202.         EDX unchanged
  203.         all other general registers contain values set by real-mode proc
  204.         all other flags are set as they were left by real-mode procedure
  205.         real-mode register values are returned in the parameter block
  206.     CF set on error
  207.         EAX = error code
  208.         01h not enough real-mode stack space
  209. Note:    unlike most of the preceding 25xxh functions, this one is not
  210.       supported by FlashTek X-32VM
  211. SeeAlso: AX=250Eh,AX=250Fh
  212.  
  213. Format of Phar Lap real-mode call parameter block:
  214. Offset    Size    Description    (Table 1048)
  215.  00h    WORD    real-mode DS value
  216.  02h    WORD    real-mode ES value
  217.  04h    WORD    real-mode FS value
  218.  06h    WORD    real-mode GS value
  219.  08h    DWORD    real-mode EAX value
  220.  0Ch    DWORD    real-mode EBX value
  221.  10h    DWORD    real-mode ECX value
  222.  14h    DWORD    real-mode EDX value
  223. --------E-212511-----------------------------
  224. INT 21 P - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  225.     AX = 2511h
  226.     DS:EDX -> parameter block (see #1049)
  227. Return: all segment registers unchanged
  228.     EDX unchanged
  229.     all other registers contain values set by the real-mode int handler
  230.     the flags are set as they were left by the real-mode interrupt handler
  231.     real-mode register values are returned in the parameter block
  232. Note:    this function is also supported by FlashTek X-32VM
  233. SeeAlso: AX=2503h,AX=2505h,AX=250Eh,AH=E3h"OS/286",INT 31/AX=0300h
  234.  
  235. Format of Phar Lap real-mode interrupt parameter block:
  236. Offset    Size    Description    (Table 1049)
  237.  00h    WORD    interrupt number
  238.  02h    WORD    real-mode DS value
  239.  04h    WORD    real-mode ES value
  240.  06h    WORD    real-mode FS value
  241.  08h    WORD    real-mode GS value
  242.  0Ah    DWORD    real-mode EAX value
  243.  0Eh    DWORD    real-mode EDX value
  244. Note: all other real-mode values set from protected-mode registers
  245. --------E-212512-----------------------------
  246. INT 21 P - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  247.     AX = 2512h
  248.     DS:EDX -> pointer to ASCIZ program name
  249.     ES:EBX -> pointer to parameter block (see #1051)
  250.     ECX = size in bytes of LDT buffer
  251. Return: CF clear if successful
  252.         EAX = number of segment descriptors in LDT
  253.     CF set on error
  254.         EAX = error code (see #1050)
  255. SeeAlso: AX=2517h
  256.  
  257. (Table 1050)
  258. Values for Phar Lap error code:
  259.  02h    file not found or path invalid
  260.  05h    access denied
  261.  08h    insufficient memory
  262.  0Ah    environment invalid
  263.  0Bh    invalid file format
  264.  80h    LDT too small
  265.  
  266. Format of Phar Lap program load parameter block:
  267. Offset    Size    Description    (Table 1051)
  268. Input:
  269.  00h    DWORD    32-bit offset of environment string
  270.  04h    WORD    segment of environment string
  271.  06h    DWORD    32-bit offset of command-tail string
  272.  0Ah    WORD    segment of command-tail string
  273.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  274.  10h    WORD    segment of LDT buffer
  275. Output:
  276.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  277.  14h    WORD    real/protected mode flag
  278.         0000h  real mode
  279.         0001h  protected mode
  280.  16h    DWORD    initial EIP value
  281.  1Ah    WORD    initial CS value
  282.  1Ch    DWORD    initial ESP value
  283.  20h    WORD    initial SS value
  284.  22h    WORD    initial DS value
  285.  24h    WORD    initial ES value
  286.  26h    WORD    initial FS value
  287.  28h    WORD    initial GS value
  288. --------E-212513-----------------------------
  289. INT 21 P - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  290.     AX = 2513h
  291.     BX = segment selector of descriptor in GDT or LDT
  292.     CL = access-rights byte for alias descriptor
  293.     CH = use-type bit (USE16 or USE32) for alias descriptor
  294. Return: CF clear if successful
  295.         AX = segment selector for created alias
  296.     CF set on error
  297.         EAX = error code
  298.         08h insufficient memory (can't grow LDT)
  299.         09h invalid segment selector in BX
  300. --------E-212514-----------------------------
  301. INT 21 P - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  302.     AX = 2514h
  303.     BX = segment selector of descriptor in GDT or LDT
  304.     CL = new access-rights byte
  305.     CH = new use-type bit (USE16 or USE32)
  306. Return: CF clear if successful
  307.     CF set on error
  308.         EAX = error code
  309.         09h invalid selector in BX
  310. SeeAlso: AX=2515h,INT 31/AX=0009h
  311. --------E-212515-----------------------------
  312. INT 21 P - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  313.     AX = 2515h
  314.     BX = segment selector of descriptor in GDT or LDT
  315. Return: CF clear if successful
  316.         CL = access-rights byte for segment
  317.         CH = use-type bit (USE16 or USE32)
  318.     ECX<16-31> destroyed
  319.     CF set on error
  320.         EAX = error code
  321.         09h invalid segment selector in BX
  322. SeeAlso: AX=2514h
  323. --------E-212516-----------------------------
  324. INT 21 P - Phar Lap 386/DOS-Extender v2.2+ - FREE ALL MEMORY OWNED BY LDT
  325.     AX = 2516h
  326. Return: CF clear
  327. Note:    this function must be called from Ring 0 or the CS descriptor is freed
  328. --------E-212517-----------------------------
  329. INT 21 P - Phar Lap 386/DOS-Extender v2.1c+ - GET INFO ON DOS DATA BUFFER
  330.     AX = 2517h
  331. Return: CF clear
  332.     ES:EBX -> data buffer (protected mode address)
  333.     ECX -> data buffer (real mode address)
  334.     EDX = size of data buffer in bytes
  335. Note:    the data buffer's address changes after calls to AX=2512h and AX=252Ah
  336. SeeAlso: AX=2512h,AX=252Ah,AX=2530h
  337. --------E-212518-----------------------------
  338. INT 21 P - Phar Lap 386/DOS-Extender 2.1c+ - SPECIFY HANDLER FOR MOVED SEGMENTS
  339.     AX = 2518h
  340.     ES:EBX -> function to call when a segment is moved
  341. Return: CF clear
  342.     ES:EBX -> previous handler
  343. --------E-212519-----------------------------
  344. INT 21 P - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  345.     AX = 2519h
  346. Return: CF clear
  347.     EAX = error code
  348.         0000h  no error
  349.         0001h  out of physical memory
  350.         0002h  out of swap space (unable to grow swap file)
  351.         0003h  out of LDT entries and unable to grow LDT
  352.         0004h  unable to change extended memory allocation mark
  353.         FFFFFFFFh    paging disabled
  354. Note:    VMM is the Virtual Memory Manager option
  355. --------E-21251A-----------------------------
  356. INT 21 P - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  357.     AX = 251Ah
  358.     EDX = number of 4k pages to lock
  359.     if BL = 00h
  360.         ECX = linear address of first page to lock
  361.     if BL = 01h
  362.         ES:ECX -> pointer to first page to lock
  363. Return: CF clear if successful
  364.     CF set on error
  365.         EAX = error code
  366.         08h insufficient memory
  367.         09h invalid address range
  368. SeeAlso: AX=251Bh,AX=EB06h,INT 31/AX=0600h
  369. --------E-21251B-----------------------------
  370. INT 21 P - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  371.     AX = 251Bh
  372.     EDX = number of pages to unlock
  373.     if BL = 00h
  374.         ECX = linear address of first page to unlock
  375.     if BL = 01h
  376.         ES:ECX -> pointer to first page to unlock
  377. Return: CF clear if successful
  378.     CF set on error
  379.         EAX = error code
  380.         09h invalid address range
  381. SeeAlso: AX=251Ah,AX=EB07h,INT 31/AX=0601h
  382. --------E-21251C-----------------------------
  383. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.1c+ - FREE PHYSICAL MEMORY PAGES
  384.     AX = 251Ch
  385.     BH = preservation flag (00h preserve contents, 01h discard contents)
  386.     EDX = number of pages to free
  387.     BL = address type
  388.         00h linear address
  389.         ECX = linear address of first page to be freed
  390.         01h pointer
  391.         ES:ECX -> first page to be freed
  392. Return: CF clear if successful
  393.     CF set on error
  394.         EAX = error code
  395.         08h memory error, swap space full, no VMM or DPMI
  396.         09h invalid address
  397. --------E-21251D-----------------------------
  398. INT 21 OP - Phar Lap 386/DOS-Extender VMM v2.1c - READ PAGE-TABLE ENTRY
  399.     AX = 251Dh
  400.     BL = address type
  401.         00h linear address
  402.         ECX = linear address of page table entry to read
  403.         01h pointer
  404.         ES:ECX -> page table entry to read
  405. Return: CF clear if successful
  406.         EAX = contents of page table entry
  407.     CF set on error
  408.         EAX = error code
  409.         09h invalid address or NOPAGE option set
  410.         78h invalid under DPMI
  411. Note:    this function is obsolete; use AX=252Bh/BH=09h instead
  412. SeeAlso: AX=251Eh,AX=252Bh/BH=09h,AX=EB00h,INT 31/AX=0506h
  413. --------E-21251E-----------------------------
  414. INT 21 OP - Phar Lap 386/DOS-Extender VMM v2.1c - WRITE PAGE-TABLE ENTRY
  415.     AX = 251Eh
  416.     BL = address type
  417.         00h linear address
  418.         ECX = linear address of page table entry to read
  419.         01h pointer
  420.         ES:ECX -> page table entry to read
  421.     EDX = new value for page table entry
  422. Return: CF clear if successful
  423.     CF set on error
  424.         EAX = error code
  425.         09h invalid address or NOPAGE option set
  426.         82h not compatible with DPMI
  427. Note:    this call is obsolete; use AX=252Bh/BH=0Ah instead
  428. SeeAlso: AX=251Dh,AX=252Bh/BH=0Ah,INT 31/AX=0507h
  429. --------E-21251F-----------------------------
  430. INT 21 P - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  431.     AX = 251Fh
  432.     BL = address type
  433.         00h linear address
  434.         ECX = linear address of first page table entry
  435.         EDX = linear address of second page table entry
  436.         01h pointer
  437.         ES:ECX -> first page table entry
  438.         ES:EDX -> second page table entry
  439. Return: CF clear if successful
  440.     CF set on error
  441.         EAX = error code
  442.         09h invalid address or NOPAGE option set
  443.         82h not compatible with DPMI
  444. SeeAlso: AX=251Dh,AX=251Eh
  445. --------E-212520-----------------------------
  446. INT 21 P - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  447.     AX = 2520h
  448.     DS:EDX -> pointer to buffer at least 100 bytes in size (see #1052)
  449.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  450. Return: carry flag clear
  451.  
  452. Format of Phar Lap VM statistics buffer:
  453. Offset    Size    Description    (Table 1052)
  454.  00h    DWORD    VM status
  455.         0001h VM subsystem is present
  456.         0000h VM not present
  457.  04h    DWORD    "nconvpg" number of conventional memory pages available
  458.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  459.  0Ch    DWORD    "nextpg" total number of extended memory pages
  460.  10h    DWORD    "extlim" extender memory pages limit
  461.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  462.  18h    DWORD    "alockpg" number of locked pages owned by application
  463.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  464.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  465.  24h    DWORD    linear address of beginning of application address space
  466.  28h    DWORD    linear address of end of application address space
  467.  2Ch    DWORD    number of seconds since last time VM stats were reset
  468.  30h    DWORD    number of page faults since last time
  469.  34h    DWORD    number of pages written to swap file since last time
  470.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  471.  3Ch    DWORD    number of virtual pages allocated to the application
  472.  40h    DWORD    size in pages of swap file
  473.  44h    DWORD    number of system pages allocated with EMS calls
  474.  48h    DWORD    minimum number of conventional memory pages
  475.  4Ch    DWORD    maximum size in pages to which swap file can be increased
  476.  50h    DWORD    "vmflags"
  477.         bit 0 = 1 if page fault in progress
  478. ---v4.0+ ---
  479.  54h    DWORD    number of physical pages guaranteed to be free
  480.  58h    DWORD    number of free physical pages currently available
  481.  5Ch    DWORD    size in pages of largest free block of memory (including disk
  482.           swap space)
  483.  60h    DWORD    reserved
  484. --------E-212521-----------------------------
  485. INT 21 P - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEM USAGE
  486.     AX = 2521h
  487.     EBX = max 4k pages of physical extended memory which program may use
  488. Return: CF clear if successful
  489.        EBX = maximum limit in pages
  490.        ECX = minimum limit in pages
  491.     CF set on error
  492.         EAX = error code
  493.         08h insufficient memory or -nopage switch used
  494. SeeAlso: AX=2522h
  495. --------E-212522-----------------------------
  496. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - SPECIFY ALTERNATE PAGE-FAULT HANDLR
  497.     AX = 2522h
  498.     ES:EBX -> alternate handler for page faults
  499. Return: CF clear
  500.     ES:EBX -> previous page-fault handler
  501. SeeAlso: AX=2523h
  502. --------E-212523-----------------------------
  503. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  504.     AX = 2523h
  505.     ???
  506. Return: ???
  507. Note:    this function takes a DWORD pointer and a DWORD pointer to a DWORD
  508.       pointer as arguments
  509. SeeAlso: AX=2522h
  510. --------E-212524-----------------------------
  511. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.2+ - INSTALL PAGE-REPLACEMENT HANDLERS
  512.     AX = 2524h
  513.     ???
  514. Return: ???
  515. Note:    this function takes three DWORD pointers and three DWORD pointers to
  516.       DWORD pointers as arguments
  517. --------E-212525-----------------------------
  518. INT 21 P - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENT'L MEM USAGE
  519.     AX = 2525h
  520.     EBX = limit in 4k pages of physical conventional memory which program
  521.           may use
  522. Return: CF clear if successful
  523.         EBX = maximum limit in pages
  524.         ECX = minimum limit in pages
  525.     CF set on error
  526.         EAX = error code
  527.         08h insufficient memory or -nopage switch used
  528. SeeAlso: AX=2521h
  529. --------E-212526-----------------------------
  530. INT 21 P - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  531.     AX = 2526h
  532.     ???
  533. Return: ???
  534. Notes:    details are not yet available
  535.     this function takes a pointer to the configuration buffer (see #1053)
  536.       and a poitner to a BYTE as arguments
  537.  
  538. Format of Phar Lap configuration buffer:
  539. Offset    Size    Description    (Table 1053)
  540.  00h    DWORD    flags 1 (see #1054)
  541.  04h    DWORD    flags 2 (unused through v5.0)
  542.  08h    DWORD    flags 3 (unused through v5.0)
  543.  0Ch    DWORD    386|DOS-Extender major version
  544.  10h    DWORD    386|DOS-Extender minor version
  545.  14h    DWORD    first letter of text after minor version number in version str
  546.  18h    DWORD    beta flag (00h normal release, 01h beta release)
  547.  1Ch    DWORD    processor (3 = 386, 4 = 486)
  548.  20h    DWORD    coprocessor (4 = none, 6 = 287, 7 = 387/486)
  549.  24h    DWORD    Weitek coprocessor flag (0 = none, 1 = present)
  550.  28h    DWORD    machine type (0 = IBM PC compatible, 1 = NEC 9800 series)
  551.  2Ch    DWORD    machine class
  552.         IBM: bus type (0=ISA, 1=MCA, 2=XT, 3=EISA)
  553.         NEC: 0=normal mode, 1=high-res mode
  554.  30h    DWORD    VCPI flag (0 = none, 1 = present)
  555.  34h    DWORD    -WEITEK/-1167 switch (0 = AUTO, 1 = ON, 2 = OFF)
  556.  38h    DWORD    -MINREAL setting
  557.  3Ch    DWORD    -MAXREAL setting
  558.  40h    DWORD    -MINIBUF setting
  559.  44h    DWORD    -MAXIBUF setting
  560.  48h    DWORD    size in bytes of DOS call data buffer
  561.  4Ch    DWORD    number of interrupt stacks (-NISTACK)
  562.  50h    DWORD    interrupt stack size (-ISTKSIZE)
  563.  54h    DWORD    -REALBREAK setting
  564.  58h    DWORD    -CALLBUFS
  565.  5Ch    DWORD    -HWIVEC
  566.  60h    DWORD    -PRIVEC
  567.  64h    DWORD    -INTMAP
  568.  68h    DWORD    -PRIMAP
  569.  6Ch    DWORD    VCPI: master 8259 interrupt vector base (IRQ0 mapping)
  570.  70h    DWORD    VCPI: slave 8259 interrupt vector base (IRQ8 mapping)
  571.  74h    DWORD    BIOS print screen interrupt vector (0 if NEC)
  572.  78h    DWORD    -EXTLOW setting
  573.  7Ch    DWORD    -EXTHIGH setting
  574.  80h    DWORD    lowest physical extended-memory address allocatable
  575.  84h    DWORD    highest physical extended-memory address allocatable + 1
  576.  88h    DWORD    special memory's physical base address (00000000h if none)
  577.  8Ch    DWORD    special memory size in bytes (00000000h if none)
  578.  90h    DWORD    -MAXVCPIMEM setting
  579.  94h    DWORD    -VSCAN
  580.  98h    DWORD    -SWAPCHK (0 = OFF, 1 = ON, 2 = FORCE, 3 = MAX)
  581.  9Ch    DWORD    -CODESIZE setting
  582.  A0h    DWORD    minimum swap file size (-MINSWFSIZE)
  583.  A4h    DWORD    maximum swap fiel size (-MAXSWFSIZE)
  584.  A8h    DWORD    page replacement policy (0 = LFU, 1 = NUR)
  585.  ACh    DWORD    number of GDT entries (-NGDTENT)
  586.  B0h    DWORD    number of LDT entries (-NLDTENT)
  587.  B4h    DWORD    program's privilege level (0-3)
  588. ---386|DOS-Extender v3.0+ ---
  589.  B8h    DWORD    -LOCKSTACK setting
  590.  BCh    DWORD    -MAXEXTMEM
  591.  C0h    DWORD    -MAXXMSMEM
  592.  C4h    DWORD    -MAXPGMMEM
  593.  C8h    DWORD    -DATATHRESHOLD
  594.  CCh    DWORD    virtual memory manager flag (0 = not present, 1 = present)
  595.  D0h    DWORD    Cyrix coprocessor flag (0 = no Cyrix EMC387, 1 = present)
  596.  D4h    DWORD    -CYRIX setting (0 = AUTO, 1 = ON, 2 = OFF)
  597.  D8h    DWORD    DPMI flag (0 = not present, 1 = present)
  598.  DCh    DWORD    DPMI major version
  599.  E0h    DWORD    DPMI minor version
  600.  E4h    DWORD    DPMI capabilities flags (see #1055)
  601.  E8h    DWORD    VCPI major version
  602.  ECh    DWORD    VCPI minor version
  603.  F0h    WORD    VCPI: IRQ0-7 physical base interrupt vector
  604.  F2h    WORD    VCPI: IRQ8-15 physical base interrupt vector
  605.  F4h    DWORD    XMS flag (0 = none, 1 = present)
  606.  F8h    DWORD    XMS major version
  607.  FCh    DWORD    XMS minor version
  608. 100h    WORD    application's CS selector
  609. 102h    WORD    application's DS selector
  610. 104h    WORD    application's PSP selector
  611. 106h    WORD    application's environment selector
  612. 108h    WORD    selector mapping entire first megabyte
  613. 10Ah    WORD    selector mapping text video memory
  614. 10Ch    WORD    selector mapping video memory (text for IBM, graphics for NEC)
  615. 10Eh    WORD    selector mapping Weitek address space, 0000h if not present
  616. 110h    WORD    selector mapping Cyrix EMC387 address space, 0000h if none
  617. 112h    WORD    reserved (0)
  618. 114h    DWORD    real-mode FAR entry point to call to switch to protected mode
  619.           with no saved context
  620. 118h    DWORD    size of LDT in bytes
  621. ---386|DOS-Extender v5.0+ ---
  622. 11Ch    DWORD    Windows flag (0 = not present, 1 = Windows present)
  623. 120h    DWORD    Windows major version
  624. 124h    DWORD    Windows minor version
  625. 128h    DWORD    Windows mode (0 = real/standard, 1 = enhanced)
  626. 12Ch    DWORD    OS/2 flag (0 = not present, 1 = OS/2 present)
  627. 130h    DWORD    OS/2 major version
  628. 134h    DWORD    OS/2 minor version
  629. 138h 50 DWORDs    reserved (0)
  630.  
  631. Bitfields for flags 1:
  632. Bit(s)    Description    (Table 1054)
  633.  0    -NOPAGE specified
  634.  1    -A20 specified
  635.  2    -VDISK specified
  636.  3    -XT specified
  637.  4    -AT specified
  638.  5    -MCA specified
  639.  6    -EISA specified
  640.  7    -NORMRES specified (NEC only)
  641.  8    -HIGHRES specified (NEC only)
  642.  9    set if -SWFGROW1ST, clear if -NOSWFGROW1ST
  643.  10    -NOVM specified
  644.  11    -SAVEREGS specified
  645.  12    unused (clear)
  646.  13    -NOVCPI specified
  647.  14    -NOMUL specified
  648.  15    -NOBMCHK specified
  649.  16    -NOSPCLMEM or -NOBIM
  650.  17    -NOPGEXP specified
  651.  18    -SWAPDEFDISK specified
  652. ---v3.0+ ---
  653.  19    -SAVEINTS specified
  654.  20    -NOLOAD specified
  655.  21    -PAGELOG specified
  656.  22    -OPENDENY specified
  657.  23    -ERRATA17 specified
  658. ---v4.1+ ---
  659.  24    -NESTDPMI specified
  660.  25    -NONESTDPMI specified
  661.  26    -NODPMI specified
  662.  27    -NOPCDWEITEK specified
  663. ---v4.2+ ---
  664.  28    -WININT21 specified
  665.  
  666. Bitfields for DPMI capabilities flags:
  667. Bit(s)    Description    (Table 1055)
  668.  0    paging supported
  669.  1    physical device mapping
  670.  2    conventional memory mapping
  671.  3    exceptions restartable
  672. --------E-212527-----------------------------
  673. INT 21 P - Phar Lap 386/DOS-Extender VMM - EN/DISABLE STATE SAVE ON INTERRUPTS
  674.     AX = 2527h
  675.     EBX = new status (00h disabled, 01h enabled)
  676. Return: CF clear
  677.     EBX = previous state save flag
  678. SeeAlso: AX=2528h
  679. --------E-212528-----------------------------
  680. INT 21 P - Phar Lap 386/DOS-Extender VMM - READ REGISTERS AFTER CTRL-C INT
  681.     AX = 2528h
  682.     DS:EBX -> buffer for registers (see #1056)
  683. Return: CF clear if successful
  684.         DS:EBX buffer filled
  685.     CF set on error
  686.         EAX = error code
  687.         83h interrupt state save not enabled
  688.         84h no active interrupt
  689. SeeAlso: AX=2527h
  690.  
  691. Format of Phar Lap buffer for registers:
  692. Offset    Size    Description    (Table 1056)
  693.  00h  8 BYTEs    unused
  694.  08h  4    DWORDs    EAX,EBX,ECX,EDX
  695.  18h  4 DWORDs    ESI,EDI,EBP,ESP
  696.  28h  6 WORDs    CS,DS,SS,ES,FS,GS
  697.  34h    DWORD    EIP
  698.  38h    DWORD    EFLAGS
  699. --------E-212529-----------------------------
  700. INT 21 P - Phar Lap 386/DOS-Extender - LOAD FLAT MODEL .EXP or .REX FILE
  701.     AX = 2529h
  702.     ???
  703. Return: ES:EBX -> parameter block (see #1057)
  704.     ???
  705. Note:    details not available at this time
  706. SeeAlso: AX=252Ah
  707.  
  708. Format of Phar Lap program load parameter block:
  709. Offset    Size    Description    (Table 1057)
  710.  00h    DWORD    initial EIP
  711.  04h    WORD    initial CS
  712.  06h    DWORD    initial ESP
  713.  0Ah    WORD    initial SS
  714.  0Ch  4 WORDs    initial DS, ES, FS, GS
  715.  14h    DWORD    minimum size in bytes of program segment
  716.  18h    DWORD    bytes of additional memory allocated
  717.  1Ch    DWORD    flags
  718.         bit 0: child linked with -UNPRIVILEGED
  719.         ---v6.0+ ---
  720.         bit 1: child is PE file instead of .EXP
  721.         bit 2: loaded file is a DLL
  722.         bits 3-31 reserved
  723. ---v6.0+ ---
  724.  20h    DWORD    module handles (PE files only)
  725.  24h  7 DWORDs    reserved (0)
  726. --------E-21252A-----------------------------
  727. INT 21 P - Phar Lap 386/DOS-Extender VMM - NEW LOAD PROGRAM FOR DEBUG
  728.     AX = 252Ah
  729.     DS:EDX -> ASCIZ program name
  730.     ES:EBX -> parameter block (see #1051)
  731.     ECX = size of LDT buffer in bytes
  732.     ESI = bit flags
  733.         bit 0: allow demand paging rather than loading entire program
  734.         bit 1: demand page from swap file rather than from .EXP
  735. Return: CF clear if successful
  736.         EAX = VMM handle or FFFFFFFFh if none
  737.         ECX = number of descriptors in LDT buffer
  738.     CF set on error
  739.         EAX = error code
  740.         02h file error
  741.             EBX = file error code (see #1058)
  742.             ECX = DOS error code if EBX=1,2,3, or 8
  743.         08h insufficient memory
  744.             EBX = memory error code (see #1059)
  745.         80h LDT buffer too small
  746.         87h called twice without intervening call to AX=2531h
  747. SeeAlso: AX=2512h,AX=2517h,AX=2529h,AX=2531h
  748.  
  749. (Table 1058)
  750. Values for Phar Lap file error code:
  751.  01h    DOS open error
  752.  02h    DOS seek error
  753.  03h    DOS read error
  754.  04h    not an .EXP or .REX file
  755.  05h    invalid file format
  756.  06h    -OFFSET is not a multiple of 64K
  757.  07h    -NOPAGE incompatible with -REALBREAK/-OFFSET
  758.  08h    DOS error loading .EXE file
  759.  
  760. (Table 1059)
  761. Values for Phar Lap memory error code:
  762.  01h    out of physical memory
  763.  02h    out of swap space
  764.  04h    unable to change extended memory allocation
  765.  05h    -MAXPGMMEM exceeded
  766.  06h    insufficient low memory to REALBREAK value
  767.  07h    insufficient low memory for PSP and environment
  768. --------E-21252BBH00-------------------------
  769. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE UNMAPPED PAGES
  770.     AX = 252Bh
  771.     BH = 00h
  772.     ???
  773. Return: ???
  774. --------E-21252BBH01-------------------------
  775. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE ALLOCATED PAGES
  776.     AX = 252Bh
  777.     BH = 01h
  778.     ???
  779. Return: ???
  780. --------E-21252BBH02-------------------------
  781. INT 21 Pu - Phar Lap 386/DOS-Extender - CREATE PHYSICAL DEVICE PAGES
  782.     AX = 252Bh
  783.     BH = 02h
  784.     ???
  785. Return: ???
  786. --------E-21252BBH03-------------------------
  787. INT 21 Pu - Phar Lap 386/DOS-Extender - MAP DATA FILE
  788.     AX = 252Bh
  789.     BH = 03h
  790.     ???
  791. Return: ???
  792. SeeAlso: AX=252Bh/BH=0Bh
  793. --------E-21252BBH04-------------------------
  794. INT 21 Pu - Phar Lap 386/DOS-Extender - GET PAGE TYPES
  795.     AX = 252Bh
  796.     BH = 04h
  797.     ???
  798. Return: ???
  799. Note:    returns one word per page
  800. SeeAlso: #1060
  801.  
  802. Bitfields for Phar Lap page information:
  803. Bit(s)    Description    (Table 1060)
  804.  7    mapped to read/write data file
  805.  6    mapped to read-only data file
  806.  5    swapped to disk
  807.  4    locked
  808.  3-0    page type
  809.     0 unmapped
  810.     1 allocated
  811.     2 physical device page
  812. --------E-21252B-----------------------------
  813. INT 21 P - Phar Lap 386/DOS-Extender - VIRTUAL MEMORY MANAGEMENT - PAGE LOCKING
  814.     AX = 252Bh
  815.     BH = function
  816.         05h lock pages
  817.         06h unlock pages
  818.     BL = address type
  819.         00h linear address
  820.         ECX = linear start address of memory region
  821.         01h segmented address
  822.         ES:ECX -> start of memory region
  823.     EDX = size of memory region in bytes
  824. Return: CF clear if successful
  825.     CF set on error
  826. Note:    this function is also supported by FlashTek X-32VM; if X-32 is not
  827.       using virtual memory, this function always succeeds
  828. --------E-21252B-----------------------------
  829. INT 21 Pu - Phar Lap 386/DOS-Extender - FREE PHYSICAL PAGES
  830.     AX = 252Bh
  831.     BH = function (07h,08h)
  832.     ???
  833. Return: ???
  834. --------E-21252BBH09-------------------------
  835. INT 21 P - Phar Lap 386/DOS-Extender v4.1 - GET PAGETABLE ENTRY/PAGE TABLE INFO
  836.     AX = 252Bh
  837.     BH = 09h
  838.     BL = subfunction
  839.         00h get page table entry by linear address
  840.         ECX = linear address for which to get page table entry
  841.         01h get page table entry by logical address
  842.         ES:ECX = address for which to get page table entry
  843. Return: CF clear if successful
  844.         EAX = page table entry
  845.         EBX = additional page table information
  846.     CF set on error
  847.         EAX = error code
  848.         0009h invalid address
  849.         0082h running under DPMI
  850. SeeAlso: AX=251Dh,AX=252Bh/BH=0Ah
  851. --------E-21252BBH0A-------------------------
  852. INT 21 P - Phar Lap 386/DOS-Extender v4.1 - SET PAGETABLE ENTRY/PAGE TABLE INFO
  853.     AX = 252Bh
  854.     BH = 0Ah
  855.     BL = subfunction
  856.         00h set page table entry for linear address
  857.         ECX = linear address for which to get page table entry
  858.         01h set page table entry for logical address
  859.         ES:ECX = address for which to get page table entry
  860.     ESI = page table entry
  861.     EDI = additional page table information
  862. Return: CF clear if successful
  863.     CF set on error
  864.         EAX = error code
  865.         0009h invalid address
  866.         0082h running under DPMI
  867. SeeAlso: AX=252Bh/BH=09h
  868. --------E-21252BBH0B-------------------------
  869. INT 21 P - Phar Lap 386/DOS-Extender v4.1+ - MAP DATA FILE AT FILE OFFSET
  870.     AX = 252Bh
  871.     BH = 0Bh
  872.     BL = subfunction
  873.         00h by linear address
  874.         ECX = linear address at which to map data file
  875.         01h by logical address
  876.         ES:ECX = logical address at which to map data file
  877.     EDX = number of bytes to map
  878.     DS:ESI -> mapping structure (see #1061)
  879.     DS:EDI -> ASCIZ filename
  880. Return: CF clear if successful
  881.     CF set on error
  882.         EAX = error code
  883.         0002h file error
  884.             ECX = phase (01h opening file, 02h seeking, 03h reading)
  885.             EDX = error code returned by DOS
  886.         0009h invalid address
  887.         0081h invalid parameters or 386|VMM not present
  888.         0086h all 386|VMM file handles already in use
  889. SeeAlso: AX=252Bh/BH=03h,AX=252Bh/BH=09h
  890.  
  891. Format of Phar Lap mapping structure:
  892. Offset    Size    Description    (Table 1061)
  893.  00h    DWORD    starting file offset to be mapped
  894.  04h    DWORD    DOS file access and sharing modes (see #1091 at INT 21/AH=3Dh)
  895. --------E-21252C-----------------------------
  896. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - ADD UNMAPPED PAGES AT END OF SEGMENT
  897.     AX = 252Ch
  898.     BX = segment selector
  899.     ECX = number of 4K pages to add
  900. Return: CF clear if successful
  901.         EAX = offset in segment of beginning of unmapped pages
  902.     CF set on error
  903.         EAX = error code
  904.         08h insufficent memory
  905.         09h invalid selector
  906.         82h not supported by current DPMI
  907. --------E-21252D-----------------------------
  908. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.3+ - CLOSE VMM FILE HANDLE
  909.     AX = 252Dh
  910.     EBX = VMM file handle
  911. Return: CF clear if successful
  912.     CF set on error
  913.         EAX = error code (81h invalid VMM handle)
  914. --------E-21252E-----------------------------
  915. INT 21 P - Phar Lap 386/DOS-Extender VMM v2.3+ - GET/SET VMM PARAMETERS
  916.     AX = 252Eh
  917.     CL = direction (00h get parameters, 01h set parameters)
  918.     DS:EBX -> parameter buffer (see #1062)
  919. Return: CF clear if successful
  920.     CF set on error
  921.         EAX = error code (81h bad parameter value)
  922.  
  923. Format of Phar Lap VMM parameter buffer:
  924. Offset    Size    Description    (Table 1062)
  925.  00h    DWORD    flags
  926.         bit 0: page fault logging enabled
  927.         ---v5.0+ ---
  928.         bit 1: swap extender to disk during DOS EXEC call
  929.         bit 2: don't zero allocated memory
  930.  04h    DWORD    scan period for page aging, in milliseconds
  931.  08h    DWORD    maximum size (in bytes) to check on each page scan
  932.  0Ch 52 BYTEs    unused
  933. --------E-21252F-----------------------------
  934. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - WRITE RECORD TO VMM PAGE LOG FILE
  935.     AX = 252Fh
  936.     DS:EBX -> data to be written
  937.     CX = size of data in bytes
  938. Return: CF clear if successful
  939.     CF set on error
  940.         EAX = error code (85h no page log file or not 386/VMM)
  941. --------E-212530-----------------------------
  942. INT 21 P - Phar Lap 386/DOS-Ext VMM v2.3+ - SET SIZE OF BUFFER FOR DOS CALLS
  943.     AX = 2530h
  944.     ECX = size of data buffer in bytes (1024 to 65536)
  945. Return: CF clear if successful
  946.     CF set on error
  947.         EAX = error code
  948.         08h insufficient low memory
  949.         81h invalid size
  950. SeeAlso: AX=2517h
  951. --------E-212531-----------------------------
  952. INT 21 P - Phar Lap 386/DOS-Extender VMM v3.0 - READ/WRITE LDT DESCRIPTOR
  953.     AX = 2531h
  954.     BX = segment selector
  955.     ECX = direction (00h read, 01h write)
  956.     DS:EDX -> 8-byte buffer for descriptor contents
  957. Return: CF clear if successful
  958.     CF set on error
  959.         EAX = error code
  960.         81h invalid selector
  961.         82h DPMI running, or not a code or data segment
  962. --------E-212532-----------------------------
  963. INT 21 P - Phar Lap 386/DOS-Extender - GET EXCEPTION HANDLER VECTOR
  964.     AX = 2532h
  965.     CL = exception number (00h-0Fh)
  966. Return: CF clear if successful
  967.         ES:EBX = CS:EIP of current exception handler
  968.     CF set on error (CL > 0Fh)
  969. Notes:    this call is also supported by the FlashTek X-32VM extender
  970.     this function is incompatible with 386|VMM; use AX=2522h instead
  971. SeeAlso: AX=2522h,AX=2533h
  972. --------E-212533-----------------------------
  973. INT 21 P - Phar Lap 386/DOS-Extender - SET EXCEPTION HANDLER VECTOR
  974.     AX = 2533h
  975.     CL = exception number (00h-0Fh)
  976.     DS:EDX = CS:EIP of new exception handler
  977. Return: CF clear if successful
  978.     CF set on error (CL > 0Fh)
  979. Notes:    this call is also supported by the FlashTek X-32VM extender
  980.     this function is incompatible with 386|VMM; use AX=2522h instead
  981. SeeAlso: AX=2522h,AX=2532h
  982. --------E-212534-----------------------------
  983. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - GET INTERRUPT FLAG
  984.     AX = 2534h
  985. Return: CF clear
  986.     EAX = interrupt state (00h disabled, 01h enabled)
  987. --------E-212535-----------------------------
  988. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - READ/WRITE SYSTEM REGISTERS
  989.     AX = 2535h
  990.     EBX = direction (00h read registers, 01h write)
  991.     DS:EDX -> system register record (see #1063)
  992. Return: CF clear
  993. Note:    this call is only available under MS Windows if PHARLAP.386 VDD is
  994.       installed
  995.  
  996. Format of Phar Lap system register record:
  997. Offset    Size    Description    (Table 1063)
  998.  00h    DWORD    CR0
  999.  04h  4 DWORDs    DR0,DR1,DR2,DR3
  1000.  14h  2 DWORDs    reserved
  1001.  1Ch  2 DWORDs    DR6,DR7
  1002.  24h  3 DWORDs    reserved
  1003. --------E-212536----------------------------
  1004. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0+ - MIN/MAX EXTENDED/CONV MEMORY USAGE
  1005.     AX = 2536h
  1006.     EBX = bit flags
  1007.         bit 0: modifying conventional memory rather than extended memory
  1008.         bit 1: setting maximum memory usage rather than minimum
  1009.     ECX = new limit in 4K pages
  1010. Return: CF clear if successful
  1011.         EAX = new limit
  1012.     CF set on error
  1013.         EAX = error code (08h memory error or -NOPAGE set)
  1014.         EBX = maximum limit in pages
  1015.         ECX = minimum limit in pages
  1016. --------E-212537----------------------------
  1017. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - ALLOCATE DOS MEMORY ABOVE DOS BUFFER
  1018.     AX = 2537h
  1019.     BX = number of paragraphs to allocate
  1020. Return: CF clear if successful
  1021.         AX = real-mode segment of allocated block
  1022.     CF set on error
  1023.         AX = error code
  1024.         07h MS-DOS memory chain corrupted
  1025.         08h insufficient low memory
  1026.         BX = size in paragraphs of largest free block
  1027. SeeAlso: AH=48h
  1028. --------E-212538----------------------------
  1029. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - READ PROTMODE REGS AFTER SFTWARE INT
  1030.     AX = 2538h
  1031.     DS:EBX -> buffer for registers (see #1056)
  1032.     ECX = register record to retrieve
  1033.         00h first interrupt state
  1034.         01h next interrupt state
  1035.         EDX = handle for current interrupt state
  1036. Return: CF clear if successful
  1037.         DS:EBX buffer filled
  1038.         EDX = handle of current interrupt state
  1039.         ESI = number of interrupt which occurred
  1040.     CF set on error
  1041.         EAX = error code
  1042.         81h invalid handle in EDX
  1043.         83h register saving not enabled
  1044.         84h no more interrupt states
  1045. SeeAlso: AX=2527h,AX=2528h
  1046. --------E-212539----------------------------
  1047. INT 21 P - Phar Lap 386/DOS-Ext VMM v3.0 - GET OFFSET OF .EXP FILE HEADER
  1048.     AX = 2539h
  1049.     BX = MS-DOS file handle for open file
  1050. Return: CF clear if successful
  1051.         EAX = offset of .EXP header in file
  1052.     CF set on error
  1053.         EAX = error code (02h file error)
  1054.         EBX = file error code
  1055.         02h DOS error seeking
  1056.         03h DOS error reading
  1057.         04h invalid file type
  1058.         05h invalid file format
  1059.         ECX = DOS error code if EBX=02h or 03h
  1060.     current file position in file modified
  1061. --------E-21253A----------------------------
  1062. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - INSTALL MOD. SEG FAILURE HANDLER
  1063.     AX = 253Ah
  1064.     ES:EBX -> function to be called when INT 21/AH=4Ah is about to return
  1065.         an error
  1066. Return: CF clear
  1067.     ES:EBX -> previous handler
  1068. SeeAlso: AH=4Ah
  1069. --------E-21253B----------------------------
  1070. INT 21 P - Phar Lap 386/DOS-Extender v3.0+ - JUMP TO REAL MODE CODE, NO CONTEXT
  1071.     AX = 253Bh
  1072.     DS:EBX -> buffer containing register contents (see #1056)
  1073. Return: never returns
  1074. SeeAlso: AX=2528h
  1075. --------E-21253C-----------------------------
  1076. INT 21 P - Phar Lap 386/DOS-Extender VMM v3.0+ - SHRINK 386|VMM SWAP FILE
  1077.     AX = 253Ch
  1078. Return: CF clear
  1079.     EAX = old size of swap file in bytes
  1080.     EBX = new size of swap file in bytes
  1081. --------E-21253D-----------------------------
  1082. INT 21 P - Phar Lap 386/DOS-Extender v4.0+ - READ/WRITE IDT DESCRIPTOR
  1083.     AX = 253Dh
  1084.     BL = interrupt number
  1085.     ECX = direction (0 = read, 1 = write)
  1086.     DS:EDX -> 8-byte buffer for descriptor
  1087. Return: CF clear if successful
  1088.         DS:EDX filled if reading
  1089.     CF set on error
  1090.         EAX = error code (0082h if running under DPMI)
  1091. Desc:    access hardware-level IDT rather than the internal 386/DOS-Extender
  1092.       shadow IDT
  1093. Notes:    this call will always fail under DPMI because it is not possible to
  1094.       access the IDT
  1095.     the descriptor is not checked when writing
  1096.     this call can normally be used only by programs running in ring 0
  1097.       because the processor does not allow an interrupt to be vectored to
  1098.       a less privileged ring
  1099. --------E-21253F-----------------------------
  1100. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - ALLOCATE LDT DESCRIPTOR
  1101.     AX = 253Fh
  1102.     BX = LDT descriptor to allocate (0000h for any)
  1103.     ???
  1104. Return: ???
  1105. --------E-212540-----------------------------
  1106. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - FORCE ALIAS OF SEGMENT
  1107.     AX = 2540h
  1108.     ???
  1109. Return: ???
  1110. --------E-212544-----------------------------
  1111. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - FREE DLL
  1112.     AX = 2544h
  1113.     ???
  1114. Return: ???
  1115. --------E-212545-----------------------------
  1116. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - GET/SET PROCEDURE ADDRESS
  1117.     AX = 2545h
  1118.     ECX = direction (00h get, 01h set)
  1119.     ???
  1120. Return: ???
  1121. --------E-212546-----------------------------
  1122. INT 21 Pu - Phar Lap 386/DOS-Extender v6.0+ - GET MODULE HANDLE
  1123.     AX = 2546h
  1124.     ???
  1125. Return: ???
  1126. --------E-2125C0-----------------------------
  1127. INT 21 P - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  1128.     AX = 25C0h
  1129.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  1130. Return: CF clear if successful
  1131.         AX = real-mode paragraph address of memory
  1132.     CF set on error
  1133.         AX = error code
  1134.         07h MS-DOS memory control blocks destroyed
  1135.         08h insufficient memory
  1136.         BX = size in paragraphs of largest available memory block
  1137. SeeAlso: AX=25C1h,AX=25C2h
  1138. --------E-2125C1-----------------------------
  1139. INT 21 P - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  1140.     AX = 25C1h
  1141.     CX = real-mode paragraph address of memory block to free
  1142. Return: CF clear if successful
  1143.         EAX destroyed
  1144.     CF set on error
  1145.         AX = error code
  1146.         07h MS-DOS memory control blocks destroyed
  1147.         09h invalid memory block address in CX
  1148. SeeAlso: AX=25C0h,AX=25C2h
  1149. --------E-2125C2-----------------------------
  1150. INT 21 P - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  1151.     AX = 25C2h
  1152.     BX = new requested block size in paragraphs
  1153.     CX = real-mode paragraph address of memory block to modify
  1154. Return: CF clear if successful
  1155.         EAX destroyed
  1156.     CF set on error
  1157.         AX = error code
  1158.         07h MS-DOS memory control blocks destroyed
  1159.         08h insufficient memory
  1160.         09h invalid memory block address in CX
  1161.         BX = size in paragraphs of largest available memory block
  1162. SeeAlso: AX=25C0h,AX=25C1h
  1163. --------E-2125C3-----------------------------
  1164. INT 21 P - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  1165.     AX = 25C3h
  1166.     ES:EBX -> pointer to parameter block (see #1065)
  1167.     DS:EDX -> pointer to ASCIZ program filename
  1168. Return: CF clear if successful
  1169.         all registers unchanged
  1170.     CF set on error
  1171.         EAX = error code (see #1064)
  1172.  
  1173. (Table 1064)
  1174. Values for Phar Lap error code:
  1175.  01h    function code in AL is invalid ???
  1176.  02h    file not found or path invalid
  1177.  05h    access denied
  1178.  08h    insufficient memory to load program
  1179.  0Ah    environment invalid
  1180.  0Bh    invalid file format
  1181.  
  1182. Format of parameter block:
  1183. Offset    Size    Description    (Table 1065)
  1184.  00h    DWORD    32-bit offset of environment string
  1185.  04h    WORD    segment selector of environment string
  1186.  06h    DWORD    32-bit offset of command-tail string
  1187.  0Ah    WORD    segment selector of command-tail string
  1188. --------D-2126-------------------------------
  1189. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  1190.     AH = 26h
  1191.     DX = segment at which to create PSP (see #1066)
  1192. Return: AL destroyed
  1193. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1194.       taken from interrupt vector table; the parent PSP field is set to 0
  1195.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  1196.       copy
  1197. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  1198.  
  1199. Format of Program Segment Prefix (PSP):
  1200. Offset    Size    Description    (Table 1066)
  1201.  00h  2 BYTEs    INT 20 instruction for CP/M CALL 0 program termination
  1202.         the CDh 20h here is often used as a signature for a valid PSP
  1203.  02h    WORD    segment of first byte beyond memory allocated to program
  1204.  04h    BYTE    (DOS) unused filler
  1205.         (OS/2) count of fake DOS version returns
  1206.  05h    BYTE    CP/M CALL 5 service request (FAR CALL to absolute 000C0h)
  1207.         BUG: (DOS 2+ DEBUG) PSPs created by DEBUG point at 000BEh
  1208.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  1209.  08h  2 BYTEs    remainder of FAR JMP at 05h
  1210.  0Ah    DWORD    stored INT 22 termination address
  1211.  0Eh    DWORD    stored INT 23 control-Break handler address
  1212.  12h    DWORD    DOS 1.1+ stored INT 24 critical error handler address
  1213.  16h    WORD    segment of parent PSP
  1214.  18h 20 BYTEs    DOS 2+ Job File Table, one byte per file handle, FFh = closed
  1215.  2Ch    WORD    DOS 2+ segment of environment for process (see #1067)
  1216.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  1217.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  1218.  34h    DWORD    DOS 3+ pointer to JFT (default PSP:0018h)
  1219.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  1220.         used by SHARE in DOS 3.3
  1221.  3Ch    BYTE    DOS 4+ (DBCS) interim console flag (see AX=6301h)
  1222.         Novell DOS 7 DBCS interim flag as set with AX=6301h
  1223.         (possibly also used by Far East MS-DOS 3.2-3.3)
  1224.  3Dh    BYTE    (APPEND) TrueName flag (see INT 2F/AX=B711h)
  1225.  3Eh    BYTE    (Novell NetWare) flag: next byte initialized if CEh
  1226.         (OS/2) capabilities flag
  1227.  3Fh    BYTE    (Novell NetWare) Novell task number if previous byte is CEh
  1228.  40h  2 BYTEs    DOS 5+ version to return on INT 21/AH=30h
  1229.  42h    WORD    (MSWindows3) selector of next PSP (PDB) in linked list
  1230.         Windows keeps a linked list of Windows programs only
  1231.  44h    WORD    (MSWindows3) "PDB_Partition"
  1232.  46h    WORD    (MSWindows3) "PDB_NextPDB"
  1233.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  1234.  49h    BYTE    unused by DOS versions <= 6.00
  1235.  4Ch    WORD    (MSWindows3) "PDB_EntryStack"
  1236.  4Eh  2 BYTEs    unused by DOS versions <= 6.00
  1237.  50h  3 BYTEs    DOS 2+ service request (INT 21/RETF instructions)
  1238.  53h  2 BYTEs    unused in DOS versions <= 6.00
  1239.  55h  7 BYTEs    unused in DOS versions <= 6.00; can be used to make first FCB
  1240.           into an extended FCB
  1241.  5Ch 16 BYTEs    first default FCB, filled in from first commandline argument
  1242.         overwrites second FCB if opened
  1243.  6Ch 16 BYTEs    second default FCB, filled in from second commandline argument
  1244.           overwrites beginning of commandline if opened
  1245.  7Ch  4 BYTEs    unused
  1246.  80h 128 BYTEs    commandline / default DTA
  1247.         command tail is BYTE for length of tail, N BYTEs for the tail,
  1248.           followed by a BYTE containing 0Dh
  1249. Notes:    in DOS v3+, the limit on simultaneously open files may be increased by
  1250.       allocating memory for a new open file table, filling it with FFh,
  1251.       copying the first 20 bytes from the default table, and adjusting the
  1252.       pointer and count at 34h and 32h.  However, DOS will only copy the
  1253.       first 20 file handles into a child PSP (including the one created on
  1254.       EXEC).
  1255.     in an OS/2 DOS box, values of D0h-FEh in the open file table indicate
  1256.       device drivers
  1257.     network redirectors based on the original MS-Net implementation use
  1258.       values of 80h-FEh in the open file table to indicate remote files;
  1259.       Novell NetWare also uses values from FEh down to 80h or one more than
  1260.       FILES= (whichever is greater) to indicate remote files (except on
  1261.       OS/2, where is uses CFh down to 80h)
  1262.     MS-DOS 5.00 incorrectly fills the FCB fields when loading a program
  1263.       high; the first FCB is empty and the second contains the first
  1264.       parameter
  1265.     some DOS extenders place protected-mode values in various PSP fields
  1266.       such as the "parent" field, which can confuse PSP walkers.  Always
  1267.       check either for the CDh 20h signature or that the suspected PSP is
  1268.       at the beginning of a memory block which owns itself (the preceding
  1269.       paragraph should be a valid MCB with "owner" the same as the
  1270.       suspected PSP).
  1271.     Novell NetWare updates the fields at offsets 3Eh and 3Fh without
  1272.       checking that a legal PSP segment is current; see AH=50h for further
  1273.       discussion
  1274.     for 4DOS and Windows95, the command tail may be more than 126
  1275.       characters; in that case, the length byte will be set to 7Fh (with
  1276.       an 0Dh in the     127th position at offset FFh), and the first 126
  1277.       characters will be stored in the PSP, with the entire command line
  1278.       in the environment variable CMDLINE; under at least some versions
  1279.       of 4DOS, the byte at offset FFh is *not* set to 0Dh, so there is no
  1280.       terminating carriage return in the PSP's command tail.
  1281.  
  1282. Format of environment block:
  1283. Offset    Size    Description    (Table 1067)
  1284.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  1285.       N BYTEs    second environment variable, ASCIZ string
  1286.     ...
  1287.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  1288.     BYTE    00h
  1289. ---DOS 3.0+ ---
  1290.     WORD    number of strings following environment (normally 1)
  1291.       N BYTEs    ASCIZ full pathname of program owning this environment
  1292.         other strings may follow
  1293. --------D-2127-------------------------------
  1294. INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
  1295.     AH = 27h
  1296.     CX = number of records to read
  1297.     DS:DX -> opened FCB (see #1034)
  1298. Return: AL = status
  1299.         00h successful, all records read
  1300.         01h end of file, no data read
  1301.         02h segment wrap in DTA, no data read
  1302.         03h end of file, partial read
  1303.     Disk Transfer Area filled with records read from file
  1304.     CX = number of records read (return AL = 00h or 03h)
  1305. Notes:    read begins at current file position as specified in FCB; the file
  1306.       position is updated after reading
  1307.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1308. SeeAlso: AH=21h,AH=28h,AH=3Fh"DOS"
  1309. --------D-2128-------------------------------
  1310. INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
  1311.     AH = 28h
  1312.     CX = number of records to write
  1313.     DS:DX -> opened FCB (see #1034)
  1314.     Disk Transfer Area contains records to be written
  1315. Return: AL = status
  1316.         00h successful
  1317.         01h disk full or file read-only
  1318.         02h segment wrap in DTA
  1319.     CX = number of records written
  1320. Notes:    write begins at current file position as specified in FCB; the file
  1321.       position is updated after writing
  1322.     if CX = 0000h on entry, no data is written; instead the file size is
  1323.       adjusted to be the same as the file position specified by the random
  1324.       record and record size fields of the FCB
  1325.     if the data to be written is less than a disk sector, it is copied into
  1326.       a DOS disk buffer, to be written out to disk at a later time
  1327.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1328. SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h/BX=0000h
  1329. --------D-2129-------------------------------
  1330. INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
  1331.     AH = 29h
  1332.     AL = parsing options (see #1068)
  1333.     DS:SI -> filename string (both '*' and '?' wildcards OK)
  1334.     ES:DI -> buffer for unopened FCB
  1335. Return: AL = result code
  1336.         00h successful parse, no wildcards encountered
  1337.         01h successful parse, wildcards present
  1338.         FFh failed (invalid drive specifier)
  1339.     DS:SI -> first unparsed character
  1340.     ES:DI buffer filled with unopened FCB (see #1034)
  1341. Notes:    asterisks expanded to question marks in the FCB
  1342.     all processing stops when a filename terminator is encountered
  1343.     cannot be used with filespecs which include a path (DOS 2+)
  1344.     Novell NetWare monitors the result code since an 'invalid drive' may
  1345.       signal an attempt to reconnect a network drive; if there are no
  1346.       connections to the specified drive, NetWare attempts to build a
  1347.       connection and map the drive to the SYS:LOGIN directory
  1348. SeeAlso: AH=0Fh,AH=16h,AH=26h
  1349.  
  1350. Bitfields for parsing options:
  1351. Bit(s)    Description    (Table 1068)
  1352.  0    skip leading separators
  1353.  1    use existing drive number in FCB if no drive is specified, instead of
  1354.       setting field to zero
  1355.  2    use existing filename in FCB if no base name is specified, instead of
  1356.       filling field with blanks
  1357.  3    use existing extension in FCB if no extension is specified, instead of
  1358.       filling field with blanks
  1359.  4-7    reserved (0)
  1360. --------D-212A-------------------------------
  1361. INT 21 - DOS 1+ - GET SYSTEM DATE
  1362.     AH = 2Ah
  1363. Return: CX = year (1980-2099)
  1364.     DH = month
  1365.     DL = day
  1366. ---DOS 1.10+---
  1367.     AL = day of week (00h=Sunday)
  1368. SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h"Novell",INT 1A/AH=04h,INT 2F/AX=120Dh
  1369. --------D-212B-------------------------------
  1370. INT 21 - DOS 1+ - SET SYSTEM DATE
  1371.     AH = 2Bh
  1372.     CX = year (1980-2099)
  1373.     DH = month
  1374.     DL = day
  1375. Return: AL = status
  1376.         00h successful
  1377.         FFh invalid date, system date unchanged
  1378. Note:    DOS 3.3+ also sets CMOS clock
  1379. SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h
  1380. --------E-212B--CX4149-----------------------
  1381. INT 21 - AI Architects - ??? - INSTALLATION CHECK
  1382.     AH = 2Bh
  1383.     CX = 4149h ('AI')
  1384.     DX = 413Fh ('A?')
  1385. Return: AL <> FFh if installed
  1386. Note:    Borland's TKERNEL makes this call
  1387. --------c-212B--CX4358-----------------------
  1388. INT 21 - Super PC-Kwik v3.20+ - INSTALLATION CHECK
  1389.     AH = 2Bh
  1390.     CX = 4358h ('CX')
  1391. Return: AL = FFh if PC-Kwik/PC-Cache not installed
  1392.     AL = 00h if installed
  1393.         CF clear
  1394.         CX = 6378h ('cx')
  1395.         BX = ???
  1396.         DX = version (DH = major version, DL = binary minor version)
  1397. Note:    PC Tools PC-Cache v5.x and Qualitas Qcache v4.00 are OEM versions of
  1398.       Super PC-Kwik, and thus support this call (PC-Cache 5.1 corresponds
  1399.       to PC-Kwik v3.20)
  1400. SeeAlso: INT 13/AH=A0h,INT 13/AH=B0h,INT 16/AX=FFA5h/CX=1111h
  1401. Index:    PC-Cache;installation check|Qualitas Qcache;installation check
  1402. Index:    installation check;PC-Cache 5.x|installation check;Qualitas Qcache
  1403. --------Q-212B--CX4445-----------------------
  1404. INT 21 - DESQview - INSTALLATION CHECK
  1405.     AH = 2Bh
  1406.     CX = 4445h ('DE')
  1407.     DX = 5351h ('SQ')
  1408.     AL = subfunction (DV v2.00+)
  1409.         01h get version
  1410.         Return: BX = version (BH = major, BL = minor)
  1411.         Note: early copies of v2.00 return 0002h
  1412.         02h get shadow buffer info, and start shadowing
  1413.         Return: BH = rows in shadow buffer
  1414.             BL = columns in shadow buffer
  1415.             DX = segment of shadow buffer
  1416.         04h get shadow buffer info
  1417.         Return: BH = rows in shadow buffer
  1418.             BL = columns in shadow buffer
  1419.             DX = segment of shadow buffer
  1420.         05h stop shadowing
  1421. Return: AL = FFh if DESQview not installed
  1422. Notes:    in DESQview v1.x, there were no subfunctions; this call only identified
  1423.       whether or not DESQview was loaded.  DESQview v2.52 performs function
  1424.       01h for all subfunction requests 0Ch and higher and appears to ignore
  1425.       all lower-numbered functions not listed here.
  1426.     DESQview versions 2.50-2.52 are part of DESQview/X v1.0x; version 2.53
  1427.       is part of DESQview/X v1.10; and version 2.63 is part of DESQview/X
  1428.       v2.00.
  1429. BUG:    subfunction 05h does not appear to work correctly in DESQview 2.52
  1430. SeeAlso: INT 10/AH=FEh,INT 10/AH=FFh,INT 15/AX=1024h,INT 15/AX=DE30h
  1431. --------U-212B--CX454C-----------------------
  1432. INT 21 - ELRES v1.1 - INSTALLATION CHECK
  1433.     AH = 2Bh
  1434.     CX = 454Ch ('EL')
  1435.     DX = 5253h ('RS')
  1436. Return: ES:BX -> ELRES history structure (see #1069)
  1437.     DX = DABEh (signature, DAve BEnnett)
  1438. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  1439.       Bennett which stores recent errorlevel values, allows them to be
  1440.       retrieved for use in batch files, and can place them in an
  1441.       environment variable
  1442. SeeAlso: AH=4Bh"ELRES",AH=4Dh
  1443.  
  1444. Format of ELRES history structure:
  1445. Offset    Size    Description    (Table 1069)
  1446.  00h    WORD    number of return codes which can be stored by following buffer
  1447.  02h    WORD    current position in buffer (treated as a ring)
  1448.  04h  N BYTEs    ELRES buffer
  1449. --------l-212B00CX5643-----------------------
  1450. INT 21 - The Volkov Commander - GET POINTER TO LEFT PANEL DATA STRUCTURE
  1451.     AX = 2B00h
  1452.     CX = 5643h ('VC')
  1453.     DX = 4F4Dh ('OM')
  1454. Return: AL = 0
  1455.     ES:BX -> left panel data structure
  1456. Program: Volcov Commander is a shell for MS-DOS by Vsevolod V. Volkov
  1457. SeeAlso: AX=2B01h/CX=5643h,AX=2B02h/CX=5643h
  1458. --------l-212B01CX5643-----------------------
  1459. INT 21 - The Volkov Commander - GET POINTER TO RIGHT PANEL DATA STRUCTURE
  1460.     AX = 2B01h
  1461.     CX = 5643h ('VC')
  1462.     DX = 4F4Dh ('OM')
  1463. Return: AL = 0
  1464.     ES:BX -> right panel data structure
  1465. SeeAlso: AX=2B00h/CX=5643h,AX=2B02h/CX=5643h
  1466. --------l-212B02CX5643-----------------------
  1467. INT 21 - The Volkov Commander - GET POINTER TO GLOBAL VARIABLES
  1468.     AX = 2B02h
  1469.     CX = 5643h ('VC')
  1470.     DX = 4F4Dh ('OM')
  1471. Return: AL = 0
  1472.     ES:BX -> global variables
  1473. SeeAlso: AX=2B00h/CX=5643h,AX=2B01h/CX=5643h
  1474. --------m-212B01CX444D-----------------------
  1475. INT 21 - Quarterdeck DOS-UP.SYS v2.00 - INSTALLATION CHECK
  1476.     AX = 2B01h
  1477.     CX = 444Dh ('DM')
  1478.     DX = 4158h ('AX')
  1479. Return: AX = 0000h if installed
  1480.         BX = DOS-UP version (BH = minor, BL = major)
  1481.         CX = 4845h ('HE')
  1482.         DX = 5245h ('RE')
  1483.         ES = DOS-UP driver segment
  1484. --------T-212B01CX5441-----------------------
  1485. INT 21 - TAME v2.10+ - INSTALLATION CHECK
  1486.     AX = 2B01h
  1487.     CX = 5441h ('TA')
  1488.     DX = 4D45h ('ME')
  1489. ---v2.60---
  1490.     BH = ???
  1491.         00h skip ???, else do
  1492. Return: AL = 02h if installed
  1493.     ES:DX -> data area in TAME-RES (see #1070,#1074,#1076)
  1494. Program: TAME is a shareware program by David G. Thomas which gives up CPU
  1495.       time to other partitions under a multitasker when the current
  1496.       partition's program incessantly polls the keyboard or system time
  1497.  
  1498. Format of TAME 2.10-2.20 data area:
  1499. Offset    Size    Description    (Table 1070)
  1500.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  1501.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  1502.  02h    DWORD    number of task switches
  1503.  06h    DWORD    number of keyboard polls
  1504.  0Ah    DWORD    number of time polls
  1505.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1506.  12h    DWORD    original INT 10h
  1507.  16h    DWORD    original INT 14h
  1508.  1Ah    DWORD    original INT 15h
  1509.  1Eh    DWORD    original INT 16h
  1510.  22h    DWORD    original INT 17h
  1511.  26h    DWORD    original INT 21h
  1512.  2Ah    DWORD    original INT 28h
  1513.  2Eh    WORD    offset of TAME INT 10h handler
  1514.  30h    WORD    offset of TAME INT 14h handler
  1515.  32h    WORD    offset of TAME INT 15h handler
  1516.  34h    WORD    offset of TAME INT 16h handler
  1517.  36h    WORD    offset of TAME INT 17h handler
  1518.  38h    WORD    offset of TAME INT 21h handler
  1519.  3Ah    WORD    offset of TAME INT 28h handler
  1520.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  1521.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1522.  40h    WORD    number of polls remaining before next task switch
  1523.  42h    WORD    /KEYIDLE value
  1524.  44h    BYTE    interrupts already grabbed by TAME (see #1071)
  1525.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1526.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  1527.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  1528.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  1529.  49h    BYTE    window or task number for this task
  1530.  4Ah    BYTE    multitasker type (see #1072)
  1531.  4Bh    BYTE    type of task switching selected
  1532.         bit 0: DESQview???
  1533.         bit 1: DoubleDOS???
  1534.         bit 2: TopView???
  1535.         bit 3: KeySwitch
  1536.         bit 4: HLT instruction
  1537.  4Ch    BYTE    ???
  1538.  4Dh    BYTE    flags
  1539.         bit 1: /FREQ instead of /MAX
  1540.  4Eh    BYTE    /FG: value
  1541.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  1542.  50h    BYTE    ???
  1543.  
  1544. Bitfields for interrupts already grabbed by TAME:
  1545. Bit(s)    Description    (Table 1071)
  1546.  0    INT 10h
  1547.  1    INT 14h
  1548.  2    INT 15h
  1549.  3    INT 16h
  1550.  4    INT 17h
  1551.  5    INT 21h
  1552.  6    INT 28h
  1553.  
  1554. (Table 1072)
  1555. Values for multitasker type:
  1556.  01h    DESQview
  1557.  02h    DoubleDOS
  1558.  03h    TopView
  1559.  04h    OmniView
  1560.  05h    VM/386
  1561.  
  1562. Bitfields for type of task switching selected:
  1563. Bit(s)    Description    (Table 1073)
  1564.  0    DESQview
  1565.  1    DoubleDOS
  1566.  2    TopView
  1567.  3    OmniView
  1568.  4    KeySwitch
  1569.  5    HLT instruction
  1570.  
  1571. Format of TAME 2.30 data area:
  1572. Offset    Size    Description    (Table 1074)
  1573.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  1574.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  1575.  02h    DWORD    number of task switches
  1576.  06h    DWORD    number of keyboard polls
  1577.  0Ah    DWORD    number of time polls
  1578.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1579.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1580.  16h    DWORD    time yielded
  1581.  1Ah    DWORD    time spent polling
  1582.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1583.  22h    DWORD    original INT 10h
  1584.  26h    DWORD    original INT 14h
  1585.  2Ah    DWORD    original INT 15h
  1586.  2Eh    DWORD    original INT 16h
  1587.  32h    DWORD    original INT 17h
  1588.  36h    DWORD    original INT 21h
  1589.  3Ah    DWORD    original INT 28h
  1590.  3Eh    WORD    offset of TAME INT 10h handler
  1591.  40h    WORD    offset of TAME INT 14h handler
  1592.  42h    WORD    offset of TAME INT 15h handler
  1593.  44h    WORD    offset of TAME INT 16h handler
  1594.  46h    WORD    offset of TAME INT 17h handler
  1595.  48h    WORD    offset of TAME INT 21h handler
  1596.  4Ah    WORD    offset of TAME INT 28h handler
  1597.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  1598.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1599.  50h    WORD    number of polls remaining before next task switch
  1600.  52h    WORD    /KEYIDLE value
  1601.  54h    WORD    /FG: value
  1602.  56h    WORD    task switches left until next FGONLY DESQview API call
  1603.  58h    WORD    multitasker version
  1604.  5Ah    WORD    virtual screen segment
  1605.  5Ch    BYTE    interrupts already grabbed by TAME (see #1071)
  1606.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  1607.  5Eh    BYTE    window or task number for this task
  1608.  5Fh    BYTE    multitasker type (see #1072)
  1609.  60h    BYTE    type of task switching selected (bit flags) (see #1073)
  1610.  61h    BYTE    watch_DOS
  1611.  62h    BYTE    action flags (see #1075)
  1612.  63h    BYTE    old status
  1613.  64h    WORD    signature DA34h
  1614.  
  1615. Bitfields for TAME action flags:
  1616. Bit(s)    Description    (Table 1075)
  1617.  0    TAME enabled
  1618.  1    /FREQ instead of /MAX (X and Y count fields are per tick)
  1619.  2    /TIMEPOLL
  1620.  3    /KEYPOLL
  1621.  4    inhibit timer
  1622.  5    enable status monitoring
  1623. SeeAlso: #1074,#1076
  1624.  
  1625. Format of TAME 2.60 data area:
  1626. Offset    Size    Description    (Table 1076)
  1627.  00h    BYTE    data structure minor version number (02h in TAME 2.60)
  1628.  01h    BYTE    data structure major version number (0Bh in TAME 2.60)
  1629.  02h    DWORD    number of task switches
  1630.  06h    DWORD    number of keyboard polls
  1631.  0Ah    DWORD    number of time polls
  1632.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1633.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1634.  16h    DWORD    time yielded
  1635.  1Ah    DWORD    time spent polling
  1636.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1637.  22h  4 BYTEs    ???
  1638.  26h    DWORD    original INT 10h
  1639.  2Ah    DWORD    original INT 14h
  1640.  2Eh    DWORD    original INT 15h
  1641.  32h    DWORD    original INT 16h
  1642.  36h    DWORD    original INT 17h
  1643.  3Ah    DWORD    original INT 21h
  1644.  3Eh    DWORD    original INT 28h
  1645.  42h    WORD    offset of TAME INT 10h handler
  1646.  44h    WORD    offset of TAME INT 14h handler
  1647.  46h    WORD    offset of TAME INT 15h handler
  1648.  48h    WORD    offset of TAME INT 16h handler
  1649.  4Ah    WORD    offset of TAME INT 17h handler
  1650.  4Ch    WORD    offset of TAME INT 21h handler
  1651.  4Eh    WORD    offset of TAME INT 28h handler
  1652.  50h    WORD    X in /max:X,Y or /freq:X,Y
  1653.  52h    WORD    Y in /max:X,Y or /freq:X,Y
  1654.  54h    WORD    number of polls remaining before next task switch
  1655.  56h    WORD    /KEYIDLE value
  1656.  58h  4 BYTEs    ???
  1657.  5Ch    WORD    X in /boost:X,Y
  1658.  5Eh    WORD    Y in /boost:X,Y
  1659.  60h    WORD    /FG: value
  1660.  62h    WORD    task switches remaining until next FGONLY DESQview API call
  1661.  64h    WORD    multitasker version ???
  1662.  66h    WORD    virtual screen segment
  1663.  68h    BYTE    interrupts already grabbed by TAME (see #1071)
  1664.  69h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1665.  6Ah    BYTE    window or task number for this task
  1666.  6Bh    BYTE    multitasker type (see #1072)
  1667.  6Ch    BYTE    type of task switching selected (bit flags) (see #1073)
  1668.  6Dh    BYTE    watch_DOS
  1669.  6Eh    BYTE    action flags (see #1075)
  1670.  6Fh    BYTE    old status
  1671.  70h    WORD    signature DA34h
  1672. --------v-212B16CX0643-----------------------
  1673. INT 21 - VIRUS - "Maltese Amoeba" - INSTALLATION CHECK
  1674.     AX = 2B16h
  1675.     CX = 0643h
  1676. Return: AX = 1603h if installed
  1677. --------R-212B44BX4D41-----------------------
  1678. INT 21 - pcANYWHERE IV/LAN - INSTALLATION CHECK
  1679.     AX = 2B44h ('D')
  1680.     BX = 4D41h ('MA')
  1681.     CX = 7063h ('pc')
  1682.     DX = 4157h ('AW')
  1683. Return: AX = resident program
  1684.         4F4Bh ('OK') if large host resident
  1685.         6F6Bh ('ok') if small host resident
  1686.     CX:DX -> API entry point (see #1077)
  1687. SeeAlso: INT 16/AH=79h
  1688.  
  1689. (Table 1077)
  1690. Call pcANYWHERE API entry point with:
  1691.     AX = 0000h get pcANYWHERE IV version
  1692.         DS:SI -> BYTE buffer for host type code
  1693.         Return: AH = version number
  1694.             AL = revision number
  1695.             DS:DI buffer byte filled with
  1696.             00h full-featured host
  1697.             01h limited-feature LAN host
  1698.             other API may not be supported
  1699.     AX = 0001h initialize operation
  1700.         DS:SI -> initialization request structure (see #1078)
  1701.         Return: AX = function status (see #1081)
  1702.     AX = 0002h get status
  1703.         Return: AH = current operating mode (see #1078)
  1704.             AL = current connection status (see #1080)
  1705.     AX = 0003h suspend remote screen updates
  1706.         Return: AX = function status (see #1081)
  1707.     AX = 0004h resume screen updates
  1708.         Return: AX = function status (see #1081)
  1709.     AX = 0005h end current remote access session
  1710.         DS:SI -> termination request structure (see #1079)
  1711.         Return: AX = function status (see #1081)
  1712.     AX = 0006h remove pcANYWHERE IV from memory
  1713.         Return: AX = status (see #1081)
  1714.     AX = 8000h read data from communications channel
  1715.         DS:BX -> buffer
  1716.         CX = buffer size
  1717.         Return: AX >= number of characters read/available
  1718.             AX < 0 on error
  1719.     AX = 8001h write data to communications channel
  1720.         DS:BX -> buffer
  1721.         CX = buffer size
  1722.         Return: AX >= number of characters written
  1723.             AX < 0 on error
  1724.     AX = 8002h get connection status
  1725.         Return: AX = status
  1726.             > 0000h if connection active
  1727.             = 0000h if connection lost
  1728.             < 0000h on error
  1729.  
  1730. Format of pcANYWHERE initialization request structure:
  1731. Offset    Size    Description    (Table 1078)
  1732.  00h    BYTE    operating mode
  1733.         00h wait for a call
  1734.         01h hot key activates
  1735.         02h incoming call activates
  1736.         03h initiate a call
  1737.  01h  3 BYTEs    user ID to append to config file names
  1738.  04h    WORD    DS-relative pointer to path for config files
  1739.  06h    WORD    DS-relative pointer to path for program files
  1740.  
  1741. Format of pcANYWHERE termination request structure:
  1742. Offset    Size    Description    (Table 1079)
  1743.  00h    BYTE    operating mode after termination
  1744.         00h wait for a call
  1745.         01h hot key activates
  1746.         02h incoming call activates
  1747.         80h use current mode
  1748.         FFh remove from memory
  1749.  
  1750. Bitfields for current connection status:
  1751. Bit(s)    Description    (Table 1080)
  1752.  0    a physical connection is active
  1753.  1    remove screen updating is active
  1754.  2    connection checking is active
  1755.  3    hot key detection is active
  1756.  4    background file transfer is active
  1757.  
  1758. (Table 1081)
  1759. Values for pcANYWHERE function status:
  1760.  0000h    function completed successfully
  1761.  FFD1h    unable to release interrupt vectors
  1762.  FFD2h    unable to release allocated memory
  1763.  FFF2h    unable to establish a connection when operating mode is
  1764.       "Initiate a call"
  1765.  FFF3h    modem configuration is invalid (corrupt config)
  1766.  FFF4h    modem initialization failed (no modem response)
  1767.  FFF5h    the communications device could not be initialized
  1768.  FFF6h    the host operator aborted the function
  1769.  FFF7h    the communications driver type specified in the configuration file is
  1770.       different than the one loaded when pcANYWHERE IV was started
  1771.  FFF9h    the configuration file is invalid
  1772.  FFFAh    the configuration file could not be found
  1773.  FFFBh    no session is active
  1774.  FFFCh    a remote access session is active
  1775.  FFFDh    the specified operating mode is invalid
  1776. --------l-212B--CX5643-----------------------
  1777. INT 21 - Volkov Commander - INSTALLATION CHECK
  1778.     AH = 2Bh
  1779.     CX = 5643h ('VC')
  1780.     DX = 4F4Dh ('OM')
  1781.     AL = function number
  1782.         00h get left window data address
  1783.         01h get right window data address
  1784.         02h get address of general variables
  1785. Return: AL = 00h if Volkov Commander installed
  1786.         AH = version code (27h for v4.00.039)
  1787.         ES:BX -> requested data
  1788. Program: Volkov Commander is a Norton Commander-like DOS shell
  1789. --------G-212B--CX6269-----------------------
  1790. INT 21 - WDTSR.COM - INSTALLATION CHECK
  1791.     AH = 2Bh
  1792.     CX = 6269h ('bi')
  1793.     DX = 742Dh ('t-')
  1794. Return: AL = FFh if not installed
  1795.     AL = 77h ('w') if WDTSR is installed
  1796.         CX = 6174h ('at')
  1797.         DX = 6368h ('ch')
  1798.         ES = resident code segment
  1799.         ES:DI -> identification and configuration data
  1800. Program: WDTSR is a driver for the bitWatch watchdog hardware by bit-design
  1801.       GmbH
  1802. SeeAlso: AH=2Bh/CX=6269h"bitFOSSI",INT 14/AH=14h"FOSSIL",INT 15/AH=C3h
  1803. --------S-212B--CX6269-----------------------
  1804. INT 21 - bitFOSS - INSTALLATION CHECK
  1805.     AH = 2Bh
  1806.     CX = 6269h ('bi')
  1807.     DX = 7446h ('tF')
  1808. Return: AL = FFh if not installed
  1809.     AL = 4Fh ('O') if bitFOSS is installed
  1810.         CX = 5353h ('SS')
  1811.         DX = 494Ch ('IL')
  1812.         ES = resident code segment
  1813.         ES:DI -> identification data
  1814. Program: bitFOSS is a revision 5 FOSSIL driver
  1815. SeeAlso: AH=2Bh/CX=6269h"bitFOSSI",INT 11/AH=BCh
  1816. --------S-212B--CX6269-----------------------
  1817. INT 21 - bitFOSSI - INSTALLATION CHECK
  1818.     AH = 2Bh
  1819.     CX = 6269h ('bi')
  1820.     DX = 7449h ('tI')
  1821. Return: AL = FFh if not installed
  1822.     AL = 53h ('S') if bitFOSSI is installed
  1823.         CX = 444Eh ('DN')
  1824.         DX = 2D46h ('-F')
  1825.         ES = resident code segment
  1826.         ES:DI -> identification data
  1827. Program: bitFOSSI is a revision 5 FOSSIL driver for ???'s ISDN board
  1828. SeeAlso: AH=2Bh/CX=6269h"bitFOSS",INT 11/AH=BCh
  1829. --------D-212C-------------------------------
  1830. INT 21 - DOS 1+ - GET SYSTEM TIME
  1831.     AH = 2Ch
  1832. Return: CH = hour
  1833.     CL = minute
  1834.     DH = second
  1835.     DL = 1/100 seconds
  1836. Note:    on most systems, the resolution of the system clock is about 5/100sec,
  1837.       so returned times generally do not increment by 1
  1838.     on some systems, DL may always return 00h
  1839. SeeAlso: AH=2Ah,AH=2Dh,AH=E7h"Novell",INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
  1840. SeeAlso: INT 2F/AX=120Dh
  1841. --------v-212C--------------------------
  1842. INT 21 - VIRUS - "Anti Pode 2.0" - INSTALLATION CHECK
  1843.     AH = 2Ch
  1844. Return: DL = F2h if resident
  1845. SeeAlso: AX=1812h"VIRUS",AX=2C2Ch
  1846. --------v-212C00CX534B-----------------------
  1847. INT 21 - SKUDO - INSTALLATION CHECK
  1848.     AX = 2C00h
  1849.     CX = 534Bh ('SK')
  1850.     DX = 5544h ('UD')
  1851.     BX = 4F21h ('O!')
  1852. Return: AX = 5349h ('SI') if installed
  1853.         CH = version number
  1854.         CL = subversion
  1855. Program: SKUDO is an antivirus TSR by Jordi Mas
  1856. --------v-212C2C------------------------
  1857. INT 21 - VIRUS - "LockJaw/Proto-T" - INSTALLATION CHECK
  1858.     AX = 2C2Ch
  1859. Return: AX = 0DCDh if resident
  1860. SeeAlso: AH=2Ch"VIRUS",AX=3000h"VIRUS"
  1861. --------D-212D-------------------------------
  1862. INT 21 - DOS 1+ - SET SYSTEM TIME
  1863.     AH = 2Dh
  1864.     CH = hour
  1865.     CL = minute
  1866.     DH = second
  1867.     DL = 1/100 seconds
  1868. Return: AL = result
  1869.         00h successful
  1870.         FFh invalid time, system time unchanged
  1871. Note:    DOS 3.3+ also sets CMOS clock
  1872. SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"
  1873. --------T-212D01CX7820-----------------------
  1874. INT 21 - PC-Mix - INSTALLATION CHECK
  1875.     AX = 2D01h
  1876.     CX = 7820h ('X ')
  1877.     DX = 6D69h ('MI')
  1878. Return: AL = 00h if installed
  1879. --------D-212E--DL00-------------------------
  1880. INT 21 - DOS 1+ - SET VERIFY FLAG
  1881.     AH = 2Eh
  1882.     DL = 00h (DOS 1.x/2.x only)
  1883.     AL = new state of verify flag
  1884.         00h off
  1885.         01h on
  1886. Notes:    default state at system boot is OFF
  1887.     when ON, all disk writes are verified provided the device driver
  1888.       supports read-after-write verification
  1889. SeeAlso: AH=54h
  1890. --------D-212F-------------------------------
  1891. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1892.     AH = 2Fh
  1893. Return: ES:BX -> current DTA
  1894. Note:    under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
  1895. SeeAlso: AH=1Ah
  1896. --------D-2130-------------------------------
  1897. INT 21 - DOS 2+ - GET DOS VERSION
  1898.     AH = 30h
  1899. ---DOS 5+ ---
  1900.     AL = what to return in BH
  1901.         00h OEM number (as for DOS 2.0-4.0x)
  1902.         01h version flag
  1903. Return: AL = major version number (00h if DOS 1.x)
  1904.     AH = minor version number
  1905.     BL:CX = 24-bit user serial number (most versions do not use this)
  1906. ---if DOS <5 or AL=00h---
  1907.     BH = MS-DOS OEM number (see #1082)
  1908. ---if DOS 5+ and AL=01h---
  1909.     BH = version flag
  1910.         bit 3: DOS is in ROM
  1911.         other: reserved (0)
  1912. Notes:    the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
  1913.     the OS/2 v2.x Compatibility Box returns major version 14h (20)
  1914.     OS/2 Warp 3.0 Virtual DOS Machines report v20.30; Warp 4 VDMs report
  1915.       v20.40.
  1916.     the WindowsNT DOS box returns version 5.00, subject to SETVER
  1917.     DOS 4.01 and 4.02 identify themselves as version 4.00; use
  1918.       INT 21/AH=87h to distinguish between the original European MS-DOS 4.0
  1919.       and the later PC-DOS 4.0x and MS-DOS 4.0x
  1920.     IBM DOS 6.1 reports its version as 6.00; use the OEM number to
  1921.       distinguish between MS-DOS 6.00 and IBM DOS 6.1 (there was never an
  1922.       IBM DOS 6.0)
  1923.     MS-DOS 6.21 reports its version as 6.20; version 6.22 returns the
  1924.       correct value
  1925.     Windows95 returns version 7.00 (the underlying MS-DOS), as did the
  1926.       "Chicago" beta (reported in _Microsoft_Systems_Journal_,August 1994);
  1927.       Windows95 OSR2 returns version 7.10
  1928.     DR DOS 5.0 and 6.0 report version 3.31; Novell DOS 7 reports IBM v6.00,
  1929.       which some software displays as IBM DOS v6.10 (because of the version
  1930.       mismatch in true IBM DOS, as mentioned above).  The Novell DOS 7
  1931.       SETVER.EXE has an undocumented option /G x.y which sets the "global"
  1932.       DOS version returned by this function for all executables not given
  1933.       a specific version number in SETVER to major version x and minor
  1934.       version y.
  1935.     generic MS-DOS 3.30, Compaq MS-DOS 3.31, and others identify themselves
  1936.       as PC-DOS by returning OEM number 00h
  1937.     the version returned under DOS 4.0x may be modified by entries in
  1938.       the special program list (see #1348 at AH=52h); the version returned
  1939.       under DOS 5+ may be modified by SETVER--use AX=3306h to get the true
  1940.       version number
  1941. SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
  1942. SeeAlso: INT 2F/AX=122Fh,INT 2F/AX=4010h,INT 2F/AX=4A33h,INT 2F/AX=E002h
  1943.  
  1944. (Table 1082)
  1945. Values for DOS OEM number:
  1946.  00h    IBM
  1947.  01h    Compaq
  1948.  02h    MS Packaged Product
  1949.  04h    AT&T
  1950.  05h    ZDS (Zenith Electronics)
  1951.  06h    Hewlett-Packard
  1952.  07h    ZDS (Groupe Bull)
  1953.  0Dh    Packard-Bell
  1954.  16h    DEC
  1955.  23h    Olivetti
  1956.  28h    Texas Instruments
  1957.  29h    Toshiba
  1958.  33h    Novell (Windows/386 device IDs only)
  1959.  34h    MS Multimedia Systems (Windows/386 device IDs only)
  1960.  35h    MS Multimedia Systems (Windows/386 device IDs only)
  1961.  4Dh    Hewlett-Packard
  1962.  5Eh    RxDOS
  1963.  66h    PhysTechSoft (PTS-DOS)
  1964.  99h    General Software's Embedded DOS
  1965.  EEh    DR DOS
  1966.  EFh    Novell DOS
  1967.  FDh    FreeDOS
  1968.  FFh    Microsoft, Phoenix
  1969. --------E-2130-------------------------------
  1970. INT 21 - Phar Lap 386/DOS-Extender, Intel Code Builder - INSTALLATION CHECK
  1971.     AH = 30h
  1972.     EAX = 00003000h
  1973.     EBX = 50484152h ("PHAR")
  1974. Return: AL = major DOS version
  1975.     AH = minor DOS version
  1976.     EAX bits 31-16 = 4458h ('DX') if 386/DOS-extender installed
  1977.         BL = ASCII major version number
  1978.     EAX bits 31-16 = 4243h ('BC') if Intel Code Builder installed
  1979.         EDX = address of GDA
  1980. SeeAlso: AX=2501h,AX=FF00h,INT 2F/AX=F100h
  1981. --------v-2130--DXABCD-----------------------
  1982. INT 21 - VIRUS - "Possessed" - INSTALLATION CHECK
  1983.     AH = 30h
  1984.     DX = ABCDh
  1985. Return: DX = DCBAh if installed
  1986. SeeAlso: AX=0D20h,AH=30h/SI=1234h,AX=3000h"VIRUS",AX=30F1h
  1987. --------v-2130--SI1234---------------------
  1988. INT 21 - VIRUS - "ANDROMEDA-758" -INSTALLATION CHECK
  1989.     AH = 30h
  1990.     SI = 1234h
  1991. Return: AX = FFDDh if resident
  1992. SeeAlso: AH=30h/DX=ABCDh,AX=3000h"VIRUS"
  1993. --------T-213000BX1234-----------------------
  1994. INT 21 - CTask 2.0+ - INSTALLATION CHECK
  1995.     AX = 3000h
  1996.     BX = 1234h
  1997.     DS:DX -> 8-byte version string (DX < FFF0h) "CTask21",00h for v2.1-2.2
  1998. Return: AL = DOS major version
  1999.     AH = DOS minor version
  2000.     CX:BX -> Ctask global data block
  2001. Program: CTask is a multitasking kernel for C written by Thomas Wagner
  2002. Note:    if first eight bytes of returned data block equal eight bytes passed
  2003.       in, CTask is resident
  2004. --------O-213000BX3000-----------------------
  2005. INT 21 - PC-MOS/386 v3.0 - INSTALLATION CHECK/GET VERSION
  2006.     AX = 3000h
  2007.     BX = 3000h
  2008.     CX = DX = 3000h
  2009. Return: AX = PC-MOS version
  2010. Program: PC-MOS/386 is a multitasking/multiuser MS-DOS-compatible operating
  2011.       system by The Software Link, Inc.
  2012. SeeAlso: AH=30h,INT D4/AH=02h,INT D4/AH=10h
  2013. --------v-213000BX614A------------------
  2014. INT 21 - VIRUS - "Jackal" - INSTALLATION CHECK
  2015.     AX = 3000h
  2016.     BX = 614Ah ('aJ')
  2017.     CX = 6B63h ('kc')
  2018.     DX = 6C61h ('la')
  2019. Return: BX = ???
  2020. SeeAlso: AX=2C2Ch"VIRUS",AX=3030h"VIRUS"
  2021. --------G-213022-----------------------------
  2022. INT 21 - StopPrg v2.0 - INSTALLATION CHECK
  2023.     AX = 3022h
  2024. Return: AX = DOS version (see AH=30h)
  2025.     CX = 1112h if StopPrg installed
  2026.         BX = segment of resident code
  2027. Program: StopPrg is a resident program aborter by MAK-TRAXON's Prophet
  2028. Note:    StopPrg may be temporarily disabled by storing 9090h in the word at
  2029.       0000h:04FEh
  2030. --------v-213030BX694D-----------------------
  2031. INT 21 - VIRUS - "IMTC" -INSTALLATION CHECK
  2032.     AX = 3030h
  2033.     BX = 694Dh
  2034. Return: DX = 7443h if resident
  2035. SeeAlso: AX=3000h/BX=614Ah"VIRUS",AX=3032h"VIRUS"
  2036. --------v-213032DX1234-----------------------
  2037. INT 21 - VIRUS - "Uruguay" - INSTALLATION CHECK
  2038.     AX = 3032h
  2039.     DX = 1234h
  2040. Return: AX = 5678h if resident
  2041. SeeAlso: AX=3030h"VIRUS",AX=30F1h"VIRUS"
  2042. --------v-2130F1-----------------------------
  2043. INT 21 - VIRUS - "Dutch-555"/"Quit 1992" - INSTALLATION CHECK
  2044.     AX = 30F1h
  2045. Return: AL = 00h if resident
  2046. SeeAlso: AH=30h/DX=ABCDh,AX=3032h,AX=330Fh,AX=33DAh
  2047. ----------2130FFCX4445-----------------------
  2048. INT 21 - DESQ??? - INSTALLATION CHECK
  2049.     AX = 30FFh
  2050.     CX = 4445h ("DE")
  2051.     DX = 5351h ("SQ")
  2052. Return: BH = 05h if installed
  2053.     ???
  2054. Note:    called by DUBLDISK.COM v2.6; this function is not supported by
  2055.       DESQview, so it may be for DESQview's precursor DESQ.
  2056. SeeAlso: AX=4404h"DUBLDISK"
  2057. --------D-2131-------------------------------
  2058. INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
  2059.     AH = 31h
  2060.     AL = return code
  2061.     DX = number of paragraphs to keep resident
  2062. Return: never
  2063. Notes:    the value in DX only affects the memory block containing the PSP;
  2064.       additional memory allocated via AH=48h is not affected
  2065.     the minimum number of paragraphs which will remain resident is 11h
  2066.       for DOS 2.x and 06h for DOS 3.0+
  2067.     most TSRs can save some memory by releasing their environment block
  2068.       before terminating (see #1066 at AH=26h,AH=49h)
  2069.     any open files remain open, so one should close any files which will
  2070.       not be used before going resident; to access a file which is left
  2071.       open from the TSR, one must switch PSP segments first (see AH=50h)
  2072. SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27
  2073. --------D-2132-------------------------------
  2074. INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
  2075.     AH = 32h
  2076.     DL = drive number (00h = default, 01h = A:, etc)
  2077. Return: AL = status
  2078.         00h successful
  2079.         DS:BX -> Drive Parameter Block (DPB) (see #1083) for specified
  2080.               drive
  2081.         FFh invalid or network drive
  2082. Notes:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  2083.       except for the DWORD at offset 12h
  2084.     this call updates the DPB by reading the disk; the DPB may be accessed
  2085.       via the DOS list of lists (see #1313 at AH=52h) if disk access is not
  2086.       desirable.
  2087.     undocumented prior to the release of DOS 5.0; only the DOS 4.0+
  2088.       version of the DPB has been documented, however
  2089.     supported by DR DOS 3.41+; DR DOS 3.41-6.0 return the same data as
  2090.       MS-DOS 3.31
  2091.     IBM ROM-DOS v4.0 also reports invalid/network (AL=FFh) on the ROM drive
  2092. SeeAlso: AH=1Fh,AH=52h,AX=7302h
  2093.  
  2094. Format of DOS Drive Parameter Block:
  2095. Offset    Size    Description    (Table 1083)
  2096.  00h    BYTE    drive number (00h = A:, 01h = B:, etc)
  2097.  01h    BYTE    unit number within device driver
  2098.  02h    WORD    bytes per sector
  2099.  04h    BYTE    highest sector number within a cluster
  2100.  05h    BYTE    shift count to convert clusters into sectors
  2101.  06h    WORD    number of reserved sectors at beginning of drive
  2102.  08h    BYTE    number of FATs
  2103.  09h    WORD    number of root directory entries
  2104.  0Bh    WORD    number of first sector containing user data
  2105.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  2106.         16-bit FAT if greater than 0FF6h, else 12-bit FAT
  2107.  0Fh    BYTE    number of sectors per FAT
  2108.  10h    WORD    sector number of first directory sector
  2109.  12h    DWORD    address of device driver header (see #1332)
  2110.  16h    BYTE    media ID byte (see #1044)
  2111.  17h    BYTE    00h if disk accessed, FFh if not
  2112.  18h    DWORD    pointer to next DPB
  2113. ---DOS 2.x---
  2114.  1Ch    WORD    cluster containing start of current directory, 0000h=root,
  2115.         FFFFh = unknown
  2116.  1Eh 64 BYTEs    ASCIZ pathname of current directory for drive
  2117. ---DOS 3.x---
  2118.  1Ch    WORD    cluster at which to start search for free space when writing
  2119.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  2120. ---DOS 4.0-6.0---
  2121.  0Fh    WORD    number of sectors per FAT
  2122.  11h    WORD    sector number of first directory sector
  2123.  13h    DWORD    address of device driver header (see #1332)
  2124.  17h    BYTE    media ID byte (see #1044)
  2125.  18h    BYTE    00h if disk accessed, FFh if not
  2126.  19h    DWORD    pointer to next DPB
  2127.  1Dh    WORD    cluster at which to start search for free space when writing,
  2128.         usually the last cluster allocated
  2129.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  2130. SeeAlso: #1045,#1349,#1475 at AX=7302h,#3766 at INT E0/CL=71h
  2131. --------D-2133-------------------------------
  2132. INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
  2133.     AH = 33h
  2134.     AL = subfunction
  2135.         00h get current extended break state
  2136.         Return: DL = current state, 00h = off, 01h = on
  2137.         01h set state of extended ^C/^Break checking
  2138.         DL = new state
  2139.             00h off, check only on character I/O functions
  2140.             01h on, check on all DOS functions
  2141.         Return: (Novell DOS 7) DL = old state of extended Break checks
  2142. Note:    under DOS 3.1+ and DR DOS, this function does not use any of the
  2143.       DOS-internal stacks and may thus be called at any time
  2144. SeeAlso: AX=3302h
  2145. --------D-213302-----------------------------
  2146. INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  2147.     AX = 3302h
  2148.     DL = new state (00h for OFF, 01h for ON)
  2149. Return: DL = old state of extended BREAK checking
  2150. Notes:    this function does not use any of the DOS-internal stacks and may thus
  2151.       be called at any time; one possible use is modifying Control-Break
  2152.       checking from within an interrupt handler or TSR
  2153.     not supported by DR DOS through version 6.0 (error code 01h);
  2154.       newly-supported by Novell DOS 7
  2155. SeeAlso: AH=33h
  2156. --------D-213303-----------------------------
  2157. INT 21 - DOS 4.0+ - UNUSED
  2158.     AX = 3303h
  2159. Return: nothing
  2160. Note:    this function and AX=3304h were intended to support a proposed
  2161.       code-page switching flag (using two of the ten reserved bytes in
  2162.       the DOS directory entry for codepage information); however, this
  2163.       function has always been a NOP in public releases of DOS and OS/2.
  2164.       See _DOS_Internals_ Chapter 2 for more information
  2165. SeeAlso: AX=3304h
  2166. --------D-213304-----------------------------
  2167. INT 21 - DOS 4.0+ - UNUSED
  2168.     AX = 3304h
  2169. Return: nothing
  2170. Note:    this function and AX=3303h were intended to support a proposed
  2171.       code-page switching flag (using two of the ten reserved bytes in
  2172.       the DOS directory entry for codepage information); however, this
  2173.       function has always been a NOP in public releases of DOS and OS/2.
  2174.       See _DOS_Internals_ Chapter 2 for more information
  2175. SeeAlso: AX=3303h
  2176. --------D-213305-----------------------------
  2177. INT 21 - DOS 4.0+ - GET BOOT DRIVE
  2178.     AX = 3305h
  2179. Return: DL = boot drive (1=A:,...)
  2180. Notes:    fully reentrant
  2181.     NEC 9800-series PCs always call the boot drive A: and assign the other
  2182.       drive letters sequentially to the other drives in the system
  2183.     this call is supported by OS/2 Warp 3.0, but not earlier versions of
  2184.       OS/2; it is also supported by Novell DOS 7
  2185. --------D-213306-----------------------------
  2186. INT 21 - DOS 5+ - GET TRUE VERSION NUMBER
  2187.     AX = 3306h
  2188. Return: BL = major version
  2189.     BH = minor version
  2190.     DL = revision (bits 2-0, all others 0)
  2191.     DH = version flags
  2192.         bit 3: DOS is in ROM
  2193.         bit 4: DOS is in HMA
  2194.     AL = FFh if true DOS version < 5.0
  2195. Notes:    this function always returns the true version number, unlike AH=30h,
  2196.       whose return value may be changed with SETVER
  2197.     because of the conflict from the CBIS redirector (see next
  2198.       entry), programs should check whether BH is less than 100 (64h)
  2199.       and BL is at least 5 before accepting the returned BX as the true
  2200.       version number; however, even this is not entirely reliable when
  2201.       that redirector is loaded
  2202.     fully reentrant
  2203.     OS/2 v2.1 will return BX=0A14h (version 20.10)
  2204.     the Windows NT DOS box returns BX=3205h (version 5.50)
  2205.     Novell DOS 7 returns IBM v6.00, which some software displays as
  2206.       IBM DOS v6.10 (because of the version mismatch in true IBM DOS
  2207.       mentioned for INT 21/AH=30h); versions through Update 15 all
  2208.       return revision code 00h
  2209.     Windows95 and Windows95 SP1 return version 7.00; Windows95 OSR2 returns
  2210.       version 7.10
  2211. BUG:    DR DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
  2212.       subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
  2213.       for invalid subfunctions
  2214. SeeAlso: AH=30h,INT 2F/AX=122Fh,INT 2F/AX=E000h"SETDRVER"
  2215. --------N-213306-----------------------------
  2216. INT 21 - CBIS network - NETWORK REDIRECTOR - ???
  2217.     AX = 3306h
  2218. Return: AX = 3306h
  2219.     BL = ??? (usually 00h)
  2220.     BH = ??? (usually 00h or FFh)
  2221. Note:    unknown function, is in conflict with DOS 5+ version call
  2222. SeeAlso: AX=3306h"DOS"
  2223. --------D-213307-----------------------------
  2224. INT 21 - Windows95 - SET/CLEAR DOS_FLAG
  2225.     AX = 3307h
  2226.     DL = subfunction
  2227.         00h clear bit 5 of "DOS_FLAG"
  2228.         01h set bit 5 of "DOS_FLAG"
  2229. Return: ???
  2230. --------v-21330F-----------------------------
  2231. INT 21 - VIRUS - "Burghofer" - INSTALLATION CHECK
  2232.     AX = 330Fh
  2233. Return: AL = 0Fh if resident (DOS returns AL=FFh)
  2234. SeeAlso: AX=30F1h,AX=33DAh,AX=33E0h
  2235. --------k-213341-----------------------------
  2236. INT 21 - Diet Disk v1.0 - INSTALLATION CHECK
  2237.     AX = 3341h
  2238. Return: DX = 1234h if installed
  2239.         CX = resident code segment
  2240. Program: Diet Disk is a public domain transparent data file compressor by
  2241.       Barry Nance
  2242. --------v-2133DA------------------------
  2243. INT 21 - VIRUS - "CoffeeShop" - INSTALLATION CHECK
  2244.     AX = 33DAh
  2245. Return: AH = A5h if resident
  2246.         AL = virus version
  2247. SeeAlso: AX=33DB,AX=33DCh,AX=330Fh,AX=33E0h,AX=5643h"VIRUS"
  2248. --------v-2133DB------------------------
  2249. INT 21 - VIRUS - "CoffeeShop" - GENERATE RANDOM NUMBER
  2250.     AX = 33DBh
  2251. Return:    ???
  2252. SeeAlso: AX=33DAh,AX=33DCh
  2253. --------v-2133DC------------------------
  2254. INT 21 - VIRUS - "CoffeeShop" - DISPLAY "LEGALIZE CANNABIS" GRAPHIC
  2255.     AX = 33DCh
  2256. Return:    ???
  2257. SeeAlso: AX=33DAh,AX=33DBh
  2258. --------v-2133E0-----------------------------
  2259. INT 21 - VIRUS - "Oropax" - INSTALLATION CHECK
  2260.     AX = 33E0h
  2261. Return: AL = E0h if resident (DOS returns AL=FFh)
  2262. SeeAlso: AX=330Fh,AX=33DAh,AX=357Fh
  2263. --------D-2134-------------------------------
  2264. INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
  2265.     AH = 34h
  2266. Return: ES:BX -> one-byte InDOS flag
  2267. Notes:    this function executes on the DOS stack, and thus cannot be called
  2268.       while another DOS function is already executing; you should use
  2269.       this function once at the beginning of the program and store the
  2270.       returned pointer rather than calling it when requiring DOS access
  2271.     the value of InDOS is incremented whenever an INT 21 function begins
  2272.       and decremented whenever one completes
  2273.     during an INT 28 call, it is safe to call some INT 21 functions even
  2274.       though InDOS may be 01h instead of zero
  2275.     InDOS alone is not sufficient for determining when it is safe to
  2276.       enter DOS, as the critical error handling decrements InDOS and
  2277.       increments the critical error flag for the duration of the critical
  2278.       error.  Thus, it is possible for InDOS to be zero even if DOS is
  2279.       busy.
  2280.     SMARTDRV 4.0 sets the InDOS flag while flushing its buffers to disk,
  2281.       then zeros it on completion
  2282.     the critical error flag is the byte immediately following InDOS in
  2283.       DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3.0+ and
  2284.       DR DOS 3.41+ (except COMPAQ DOS 3.0, where the critical error flag
  2285.       is located 1AAh bytes BEFORE the critical section flag)
  2286.     for DOS 3.1+, an undocumented call exists to get the address of the
  2287.       critical error flag (see AX=5D06h)
  2288.     this function was undocumented prior to the release of DOS 5.0.
  2289. SeeAlso: AX=5D06h,AX=5D0Bh,INT 15/AX=DE1Fh,INT 28
  2290. --------D-2135-------------------------------
  2291. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  2292.     AH = 35h
  2293.     AL = interrupt number
  2294. Return: ES:BX -> current interrupt handler
  2295. Note:    under DR DOS 5.0+, this function does not use any of the DOS-internal
  2296.       stacks and may thus be called at any time
  2297. SeeAlso: AH=25h,AX=2503h
  2298. --------E-213501-----------------------------
  2299. INT 21 P - FlashTek X-32VM - ALLOCATE PROTECTED-MODE SELECTOR
  2300.     AX = 3501h
  2301. Return: CF clear if successful
  2302.         BX = new selector
  2303.     CF set on error (no more selectors available)
  2304. Note:    the new selector will be an expand-up read/write data selector with
  2305.       undefined base and limit
  2306. SeeAlso: AX=3502h,INT 31/AX=0000h
  2307. --------E-213502-----------------------------
  2308. INT 21 P - FlashTek X-32VM - DEALLOCATE PROTECTED-MODE SELECTOR
  2309.     AX = 3502h
  2310.     BX = selector
  2311. Return: CF clear if successful
  2312.     CF set on error (invalid selector)
  2313. Note:    only selectors allocated via AX=3501h should be deallocated
  2314. SeeAlso: AX=3501h,INT 31/AX=0001h
  2315. --------E-213503-----------------------------
  2316. INT 21 P - FlashTek X-32VM - SET SELECTOR BASE ADDRESS
  2317.     AX = 3503h
  2318.     BX = selector
  2319.     ECX = base address
  2320. Return: CF clear if successful
  2321.     CF set on error (invalid selector)
  2322. SeeAlso: AX=3504h,AX=3505h,INT 31/AX=0007h
  2323. --------E-213504-----------------------------
  2324. INT 21 P - FlashTek X-32VM - GET SELECTOR BASE ADDRESS
  2325.     AX = 3504h
  2326.     BX = selector
  2327. Return: CF clear if successful
  2328.         ECX = absolute base address of selector
  2329.     CF set on error (invalid selector)
  2330. SeeAlso: AX=3503h,INT 31/AX=0006h
  2331. --------E-213505-----------------------------
  2332. INT 21 P - FlashTek X-32VM - SET SELECTOR LIMIT
  2333.     AX = 3505h
  2334.     BX = selector
  2335.     ECX = desired limit
  2336. Return: CF clear if successful
  2337.         ECX = actual limit set
  2338.     CF set on error (no more selectors available)
  2339. Note:    the limit will be rounded down to nearest 4K boundary if the requested
  2340.       limit is greater than 1MB
  2341. SeeAlso: AX=3503h,INT 31/AX=0008h
  2342. --------E-21350A-----------------------------
  2343. INT 21 P - FlashTek X-32VM - PHYSICAL ADDRESS MAPPING
  2344.     AX = 350Ah
  2345.     EBX = absolute physical address
  2346.     ECX = size in bytes of area to map
  2347. Return: CF clear if successful
  2348.     CF set on error (insufficient memory or service refused by DPMI host)
  2349. Notes:    should not make repeated calls for the same physical address
  2350.     there is no provision for unmapping memory
  2351. --------E-21350B-----------------------------
  2352. INT 21 P - FlashTek X-32VM - UPDATE AND RETURN AVAILABLE FREE MEMORY
  2353.     AX = 350Bh
  2354.     DS = default selector for DS
  2355. Return: CF clear
  2356.     EAX = maximum amount of memory which can be allocated via AX=350Ch
  2357. SeeAlso: AX=350Ch
  2358. --------E-21350C-----------------------------
  2359. INT 21 P - FlashTek X-32VM - ALLOCATE A BLOCK OF MEMORY
  2360.     AX = 350Ch
  2361.     ECX = size of block in bytes
  2362.     DS = default DS
  2363. Return: CF clear if successful
  2364.         EAX = near pointer to new block
  2365.         EDX = new lowest legal value for stack
  2366.     CF set on error (requested size not multiple of 4K)
  2367. SeeAlso: AX=350Bh,AX=350Dh
  2368. --------E-21350D-----------------------------
  2369. INT 21 P - FlashTek X-32VM - RESERVE BLOCK OF MEMORY FOR 32-BIT STACK
  2370.     AX = 350Dh
  2371.     EBX = current ESP value
  2372.     ECX = size of block in bytes
  2373.     DS = default DS
  2374. Return: CF clear if successful
  2375.         EBX = new value for ESP
  2376.         EDX = suggested new limit for SS
  2377.     CF set on error
  2378. Note:    this function should only be called once during initialization
  2379. SeeAlso: AX=350Bh,AX=350Ch
  2380. --------v-21357F-----------------------------
  2381. INT 21 - VIRUS - "Agiplan"/"Month 4-6" - INSTALLATION CHECK
  2382.     AX = 357Fh
  2383. Return: DX = FFFFh if installed
  2384. SeeAlso: AX=33E0h,AX=3DFFh
  2385. --------D-2136-------------------------------
  2386. INT 21 - DOS 2+ - GET FREE DISK SPACE
  2387.     AH = 36h
  2388.     DL = drive number (00h = default, 01h = A:, etc)
  2389. Return: AX = FFFFh if invalid drive
  2390.     else
  2391.         AX = sectors per cluster
  2392.         BX = number of free clusters
  2393.         CX = bytes per sector
  2394.         DX = total clusters on drive
  2395. Notes:    free space on drive in bytes is AX * BX * CX
  2396.     total space on drive in bytes is AX * CX * DX
  2397.     "lost clusters" are considered to be in use
  2398.     according to Dave Williams' MS-DOS reference, the value in DX is
  2399.       incorrect for non-default drives after ASSIGN is run
  2400.     this function does not return proper results on CD-ROMs;
  2401.       use AX=4402h"CD-ROM" instead
  2402.     (FAT32 drive) the reported total and free space are limited to 2G-32K
  2403.       should they exceed that value
  2404. SeeAlso: AH=1Bh,AH=1Ch,AX=4402h"CD-ROM",AX=7303h
  2405. --------D-213700-----------------------------
  2406. INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
  2407.     AX = 3700h
  2408. Return: AL = status
  2409.         00h successful
  2410.         DL = current switch character
  2411.         FFh unsupported subfunction
  2412. Desc:    Determine the character which is used to introduce command switches.
  2413.       This setting is ignored by MS-DOS commands in version 4.0 and higher,
  2414.       but is honored by many third-party programs and by Novell DOS 7
  2415.       external commands
  2416. BUG:    Novell DOS 7's COMMAND.COM (prior to Update 15) fails to honor the
  2417.       SwitChar setting for internal commands even though COMMAND.COM
  2418.       honors it in its own command tail (i.e. COMMAND /?); even in Update
  2419.       15, internal commands fail to honor SwitChar for the /? help option
  2420. Notes:    documented in some OEM versions of some releases of DOS
  2421.     supported by OS/2 compatibility box
  2422.     always returns AL=00h/DL=2Fh for MS-DOS 5+ and DR DOS 3.41-6.0
  2423.     Novell DOS 7 COMMAND.COM indicates switch characters other than '/'
  2424.       by changing the first backslash (and only the first one) in the
  2425.       path it prints for PROMPT $p with a forward slash
  2426. SeeAlso: AX=3701h
  2427. --------D-213701-----------------------------
  2428. INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
  2429.     AX = 3701h
  2430.     DL = new switch character
  2431. Return: AL = status
  2432.         00h successful
  2433.         FFh unsupported subfunction
  2434. Notes:    documented in some OEM versions of some releases of DOS; DOS 2.x had
  2435.       a SWITCHAR=c setting in CONFIG.SYS
  2436.     supported by OS/2 compatibility box and Novell DOS 7
  2437.     ignored by MS-DOS 5+ and DR DOS 3.41-6.0; DR DOS 6.0 and Novell DOS 7
  2438.       leave AX unchanged
  2439. SeeAlso: AX=3700h
  2440. --------D-2137-------------------------------
  2441. INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
  2442.     AH = 37h
  2443.     AL = subfunction
  2444.         02h get availdev flag
  2445.         Return: DL = 00h \DEV\ must precede character device names
  2446.                = nonzero \DEV\ is optional
  2447.         03h set availdev flag
  2448.         DL = new state
  2449.             00h        \DEV\ is mandatory
  2450.             nonzero    \DEV\ is optional
  2451. Return: AL = status
  2452.         00h successful
  2453.         FFh unsupported subfunction
  2454. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  2455.       names without generating an error even if the directory \DEV does
  2456.       not actually exist (other paths generate an error if they do not
  2457.       exist); DOS 2.x has an AVAILDEV= option in CONFIG.SYS to make \DEV
  2458.       mandatory
  2459.     although MS-DOS 3.3+, DR DOS 3.41+, and Novell DOS 7 accept these
  2460.       calls, they have no effect, and AL=02h always returns DL=FFh (except
  2461.       for Novell DOS 7, which leaves AX unchanged for both subfunctions)
  2462. --------k-2137A0BX6A6D-----------------------
  2463. INT 21 - XPACK v1.52+ - TSR INSTALLATION CHECK
  2464.     AX = 37A0h
  2465.     BX = 6A6Dh ('jm')
  2466. Return: AL = FFh if not present as TSR (default return value from DOS)
  2467.     AX = 0000h if installed as a TSR
  2468.         CX = 6A6Dh ('jm')
  2469.         DX = version ID (0152h)
  2470. Program: XPACK is a transparent file compressor/decompressor by JauMing Tseng
  2471. SeeAlso: AX=37A1h/BX=6A6Dh,AX=37A3h/BX=6A6Dh
  2472. --------k-2137A1BX6A6D-----------------------
  2473. INT 21 - XPACK v1.52+ - UNINSTALL
  2474.     AX = 37A1h
  2475.     BX = 6A6Dh ('jm')
  2476. Return: AX = status
  2477.         0000h successful
  2478.         FFFFh failed
  2479. Program: XPACK is a transparent file compressor/decompressor by JauMing Tseng
  2480. SeeAlso: AX=37A0h/BX=6A6Dh
  2481. --------k-2137A2BX6A6D-----------------------
  2482. INT 21 - XPACK v1.52+ - GET TSR STATUS
  2483.     AX = 37A2h
  2484.     BX = 6A6Dh ('jm')
  2485. Return: AX = 0000h (successful)
  2486.     DL = status (01h active, 00h disabled)
  2487. SeeAlso: AX=37A3h/BX=6A6Dh
  2488. --------k-2137A3BX6A6D-----------------------
  2489. INT 21 - XPACK v1.52+ - SET TSR STATUS
  2490.     AX = 37A3h
  2491.     BX = 6A6Dh ('jm')
  2492.     DL = status (01h active, 00h disabled)
  2493. Return: AX = 0000h (successful)
  2494. SeeAlso: AX=37A0h/BX=6A6Dh,AX=37A2h/BX=6A6Dh
  2495. ----------2137A6BX6A6D-----------------------
  2496. INT 21 - XPACK v1.65 - GET TEMPORARY DIRECTORY NAME
  2497.     AX = 37A6h
  2498.     BX = 6A6Dh ('jm')
  2499. Return: AX = 0000h
  2500.     DS:DX -> name of temporary directory
  2501. Program: XPACK is a transparent file compressor/decompressor by JauMing Tseng
  2502. SeeAlso: AX=37A0h/BX=6A6Dh,AX=37A7h/BX=6A6Dh
  2503. ----------2137A7BX6A6D-----------------------
  2504. INT 21 - XPACK v1.65 - SET TEMPORARY DIRECTORY NAME
  2505.     AX = 37A7h
  2506.     BX = 6A6Dh ('jm')
  2507.     DS:DX -> ASCIZ name of temporary directory (max 64 chars)
  2508. Return: AX = 0000h
  2509. Note:    the specified directory name must include a drive letter and end with
  2510.       a backslash (e.g. 'c:\dos\',0)
  2511. SeeAlso: AX=37A0h/BX=6A6Dh,AX=37A6h/BX=6A6Dh
  2512. --------k-2137D0BX899D-----------------------
  2513. INT 21 - DIET v1.43e - TSR INSTALLATION CHECK
  2514.     AX = 37D0h
  2515.     BX = 899Dh ('DI' + 'ET')
  2516. Return: AL = FFh if not present as TSR (default return value from DOS)
  2517.     AX = 0000h if installed as a TSR
  2518.         CX = 899Dh
  2519.         DX = version ID
  2520. Program: DIET is a transparent file compressor/decompressor by Teddy Matsumoto
  2521. SeeAlso: AX=37D1h,AX=37D2h,AX=37D4h,AX=37D6h,AX=37DFh,AX=4BF0h,AX=4BF1h
  2522. --------k-2137D1BX899D-----------------------
  2523. INT 21 - DIET v1.43e - GET DIET.EXE RESIDENT SEGMENT
  2524.     AX = 37D1h
  2525.     BX = 899Dh ('DI' + 'ET')
  2526. Return: AX = 0000h
  2527.     CX = code segment of TSR part of DIET.EXE
  2528.     DX = memory block segment of TSR DIET.EXE
  2529.         (0000h if installed as device driver)
  2530. SeeAlso: AX=37D0h,AX=37DFh
  2531. --------k-2137D2BX899D-----------------------
  2532. INT 21 - DIET v1.43e - GET TSR CONTROL FLAGS
  2533.     AX = 37D2h
  2534.     BX = 899Dh ('DI' + 'ET')
  2535. Return: AX = 0000h
  2536.     DL = control flag (00h active, else disabled)
  2537.     DH = skip flag (nonzero while TSR active)
  2538. SeeAlso: AX=37D0h,AX=37D3h,AX=37D4h
  2539. --------k-2137D3BX899D-----------------------
  2540. INT 21 - DIET v1.43e - SET TSR CONTROL FLAGS
  2541.     AX = 37D3h
  2542.     BX = 899Dh ('DI' + 'ET')
  2543.     DL = control flag (00h active, else disabled)
  2544.     DH = skip flag (00h)
  2545. Return: AX = 0000h
  2546. SeeAlso: AX=37D0h,AX=37D2h,AX=37D5h
  2547. --------k-2137D4BX899D-----------------------
  2548. INT 21 - DIET v1.43e - GET TSR OPTIONS
  2549.     AX = 37D4h
  2550.     BX = 899Dh ('DI' + 'ET')
  2551. Return: AX = 0000h
  2552.     DX = TSR options (see #1084)
  2553. SeeAlso: AX=37D0h,AX=37D2h,AX=37D5h
  2554.  
  2555. Bitfields for DIET TSR options:
  2556. Bit(s)    Description    (Table 1084)
  2557.  0    automated compression of DIETed file
  2558.  1    automated compression of newly-created file
  2559.  2    suppress DIET message
  2560.  3    display original file size
  2561.  4-15    reserved (0)
  2562. --------k-2137D5BX899D-----------------------
  2563. INT 21 - DIET v1.43e - SET TSR OPTIONS
  2564.     AX = 37D5h
  2565.     BX = 899Dh ('DI' + 'ET')
  2566.     DX = TSR options (see #1084)
  2567. Return: AX = 0000h
  2568. Program: DIET is a transparent file compressor/decompressor by Teddy Matsumoto
  2569. SeeAlso: AX=37D0h,AX=37D3h,AX=37D4h
  2570. --------k-2137D6BX899D-----------------------
  2571. INT 21 - DIET v1.43e - GET TEMPORARY DIRECTORY NAMES
  2572.     AX = 37D6h
  2573.     BX = 899Dh ('DI' + 'ET')
  2574. Return: AX = 0000h
  2575.     DS:DX -> name of temporary directory or 0000h:0000h for current dir
  2576. SeeAlso: AX=37D0h,AX=37D7h
  2577. --------k-2137D7BX899D-----------------------
  2578. INT 21 - DIET v1.43e - SET TEMPORARY DIRECTORY NAMES
  2579.     AX = 37D7h
  2580.     BX = 899Dh ('DI' + 'ET')
  2581.     DS:DX -> ASCIZ name of temporary directory (max 61 chars)
  2582.         0000h:0000h for current directory
  2583. Return: AX = 0000h
  2584. Note:    the specified directory name must include a drive letter and end with
  2585.       a backslash
  2586. SeeAlso: AX=37D0h,AX=37D6h
  2587. --------k-2137DCBX899D-----------------------
  2588. INT 21 - DIET v1.43e - SET ADDRESS OF EXTERNAL PROCEDURE
  2589.     AX = 37DCh
  2590.     BX = 899Dh ('DI' + 'ET')
  2591.     DS:DX -> external procedure (see #1085)
  2592. Return: AX = 0000h
  2593. Note:    the resident code will call the specified external procedure at the
  2594.       beginning of decompression and when compression is exited on failure
  2595. SeeAlso: AX=37DDh
  2596.  
  2597. (Table 1085)
  2598. Values DIET external procedure is called with:
  2599.     STACK:    WORD    class
  2600.             FFFDh creation failed for unknown reasons
  2601.             FFFEh creation failed due to lack of space
  2602.             FFFFh file creation error
  2603.             else file handle of DIETed file to be decompressed
  2604.         DWORD    -> compressed filename
  2605.         DWORD    -> decompressed or temporary filename
  2606. Return: SI,DI,BP,DS,ES must be preserved by external procedure
  2607. --------k-2137DDBX899D-----------------------
  2608. INT 21 - DIET v1.43e - RELEASE EXTERNAL PROCEDURE
  2609.     AX = 37DDh
  2610.     BX = 899Dh ('DI' + 'ET')
  2611. Program: DIET is a transparent file compressor/decompressor by Teddy Matsumoto
  2612. Note:    unlinks the external procedure specified by AX=37DCh
  2613. SeeAlso: AX=37DCh
  2614. --------k-2137DEBX899D-----------------------
  2615. INT 21 - DIET v1.43e - READ EMS STATUS
  2616.     AX = 37DEh
  2617.     BX = 899Dh ('DI' + 'ET')
  2618. Return: AX = 0000h
  2619.     CX = EMS status
  2620.         0000h not used
  2621.         0001h used as work area
  2622.         0002h used for code and as work area
  2623.     DX = EMM handle when EMS is in use
  2624. --------k-2137DFBX899D-----------------------
  2625. INT 21 - DIET v1.43e - UNINSTALL TSR
  2626.     AX = 37DFh
  2627.     BX = 899Dh ('DI' + 'ET')
  2628. Return: AX = status
  2629.         0000h successful
  2630.         00FFh failed
  2631. Program: DIET is a transparent file compressor/decompressor by Teddy Matsumoto
  2632. SeeAlso: AX=37D0h
  2633. Index:    uninstall;DIET
  2634. --------D-2138-------------------------------
  2635. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  2636.     AH = 38h
  2637. --DOS 2.x--
  2638.     AL = 00h get current-country info
  2639.     DS:DX -> buffer for returned info (see #1086,#1087)
  2640. Return: CF set on error
  2641.         AX = error code (02h)
  2642.     CF clear if successful
  2643.         AX = country code (MS-DOS 2.11 only)
  2644.         buffer at DS:DX filled
  2645. --DOS 3.0+--
  2646.     AL = 00h for current country
  2647.     AL = 01h thru 0FEh for specific country with code <255 (see #1088)
  2648.     AL = 0FFh for specific country with code >= 255
  2649.        BX = 16-bit country code (see #1088)
  2650.     DS:DX -> buffer for returned info (see #1087)
  2651. Return: CF set on error
  2652.         AX = error code (02h)
  2653.     CF clear if successful
  2654.         AX = country code (Novell NWDOS v7.0)
  2655.         BX = country code
  2656.         DS:DX buffer filled
  2657. Note:    this function is not supported by the Borland DPMI host, but no error
  2658.       is returned; as a workaround, one should allocate a buffer in
  2659.       conventional memory with INT 31/AX=0100h and simulate an INT 21 with
  2660.       INT 31/AX=0300h
  2661. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  2662.  
  2663. Format of DOS 2.00-2.10 country info:
  2664. Offset    Size    Description    (Table 1086)
  2665.  00h    WORD    date format  0 = USA    mm dd yy
  2666.                  1 = Europe dd mm yy
  2667.                  2 = Japan    yy mm dd
  2668.  02h    BYTE    currency symbol
  2669.  03h    BYTE    00h
  2670.  04h    BYTE    thousands separator char
  2671.  05h    BYTE    00h
  2672.  06h    BYTE    decimal separator char
  2673.  07h    BYTE    00h
  2674.  08h 24 BYTEs    reserved
  2675.  
  2676. Format of DOS 2.11+ country info:
  2677. Offset    Size    Description    (Table 1087)
  2678.  00h    WORD    date format (see #1086)
  2679.  02h  5 BYTEs    ASCIZ currency symbol string
  2680.  07h  2 BYTEs    ASCIZ thousands separator
  2681.  09h  2 BYTEs    ASCIZ decimal separator
  2682.  0Bh  2 BYTEs    ASCIZ date separator
  2683.  0Dh  2 BYTEs    ASCIZ time separator
  2684.  0Fh    BYTE    currency format
  2685.         bit 2 = set if currency symbol replaces decimal point
  2686.         bit 1 = number of spaces between value and currency symbol
  2687.         bit 0 = 0 if currency symbol precedes value
  2688.             1 if currency symbol follows value
  2689.  10h    BYTE    number of digits after decimal in currency
  2690.  11h    BYTE    time format
  2691.         bit 0 = 0 if 12-hour clock
  2692.             1 if 24-hour clock
  2693.  12h    DWORD    address of case map routine
  2694.         (FAR CALL, AL = character to map to upper case [>= 80h])
  2695.  16h  2 BYTEs    ASCIZ data-list separator
  2696.  18h 10 BYTEs    reserved
  2697.  
  2698. (Table 1088)
  2699. Values for country code:
  2700.  001h (1)    United States
  2701.  002h (2)    Canadian-French
  2702.  003h (3)    Latin America
  2703.  004h (4)    Canada (English)
  2704.  007h (7)    Russia
  2705.  014h (20)    Egypt
  2706.  01Bh (27)    South Africa
  2707.  01Eh (30)    Greece
  2708.  01Fh (31)    Netherlands
  2709.  020h (32)    Belgium
  2710.  021h (33)    France
  2711.  022h (34)    Spain
  2712.  023h (35)    Bulgaria???
  2713.  024h (36)    Hungary (not supported by DR DOS 5.0)
  2714.  026h (38)    Yugoslavia (not supported by DR DOS 5.0) -- obsolete
  2715.  027h (39)    Italy / San Marino / Vatican City
  2716.  028h (40)    Romania
  2717.  029h (41)    Switzerland / Liechtenstein
  2718.  02Ah (42)    Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0)
  2719.  02Bh (43)    Austria (DR DOS 5.0)
  2720.  02Ch (44)    United Kingdom
  2721.  02Dh (45)    Denmark
  2722.  02Eh (46)    Sweden
  2723.  02Fh (47)    Norway
  2724.  030h (48)    Poland (not supported by DR DOS 5.0)
  2725.  031h (49)    Germany
  2726.  033h (51)    Peru
  2727.  034h (52)    Mexico
  2728.  035h (53)    Cuba
  2729.  036h (54)    Argentina
  2730.  037h (55)    Brazil (not supported by DR DOS 5.0)
  2731.  038h (56)    Chile
  2732.  039h (57)    Columbia
  2733.  03Ah (58)    Venezuela
  2734.  03Ch (60)    Malaysia
  2735.  03Dh (61)    International English / Australia
  2736.  03Eh (62)    Indonesia / East Timor
  2737.  03Fh (63)    Philippines
  2738.  040h (64)    New Zealand
  2739.  041h (65)    Singapore
  2740.  042h (66)    Taiwan???
  2741.  051h (81)    Japan (DR DOS 5.0, MS-DOS 5.0+)
  2742.  052h (82)    South Korea (DR DOS 5.0)
  2743.  054h (84)    Vietnam
  2744.  056h (86)    China (MS-DOS 5.0+)
  2745.  058h (88)    Taiwan (MS-DOS 5.0+)
  2746.  05Ah (90)    Turkey (MS-DOS 5.0+)
  2747.  05Bh (91)    India
  2748.  05Ch (92)    Pakistan
  2749.  05Dh (93)    Afghanistan
  2750.  05Eh (94)    Sri Lanka
  2751.  062h (98)    Iran
  2752.  063h (99)    Asia (English)
  2753.  070h (112)    Belarus
  2754.  0C8h (200)    Thailand
  2755.  0D4h (212)    Morocco
  2756.  0D5h (213)    Algeria
  2757.  0D8h (216)    Tunisia
  2758.  0DAh (218)    Libya
  2759.  0DCh (220)    Gambia
  2760.  0DDh (221)    Senegal
  2761.  0DEh (222)    Maruitania
  2762.  0DFh (223)    Mali
  2763.  0E0h (224)    African Guinea
  2764.  0E1h (225)    Ivory Coast
  2765.  0E2h (226)    Burkina Faso
  2766.  0E3h (227)    Niger
  2767.  0E4h (228)    Togo
  2768.  0E5h (229)    Benin
  2769.  0E6h (230)    Mauritius
  2770.  0E7h (231)    Liberia
  2771.  0E8h (232)    Sierra Leone
  2772.  0E9h (233)    Ghana
  2773.  0EAh (234)    Nigeria
  2774.  0EBh (235)    Chad
  2775.  0ECh (236)    Centra African Republic
  2776.  0EDh (237)    Cameroon
  2777.  0EEh (238)    Cape Verde Islands
  2778.  0EFh (239)    Sao Tome and Principe
  2779.  0F0h (240)    Equatorial Guinea
  2780.  0F1h (241)    Gabon
  2781.  0F2h (242)    Congo
  2782.  0F3h (243)    Zaire
  2783.  0F4h (244)    Angola
  2784.  0F5h (245)    Guinea-Bissau
  2785.  0F6h (246)    Diego Garcia
  2786.  0F7h (247)    Ascension Isle
  2787.  0F8h (248)    Seychelles
  2788.  0F9h (249)    Sudan
  2789.  0FAh (250)    Rwhanda
  2790.  0FBh (251)    Ethiopia
  2791.  0FCh (252)    Somalia
  2792.  0FDh (253)    Djibouti
  2793.  0FEh (254)    Kenya
  2794.  0FFh (255)    Tanzania
  2795.  100h (256)    Uganda
  2796.  101h (257)    Burundi
  2797.  103h (259)    Mozambique
  2798.  104h (260)    Zambia
  2799.  105h (261)    Madagascar
  2800.  106h (262)    Reunion Island
  2801.  107h (263)    Zimbabwe
  2802.  108h (264)    Namibia
  2803.  109h (265)    Malawi
  2804.  10Ah (266)    Lesotho
  2805.  10Bh (267)    Botswana
  2806.  10Ch (268)    Swaziland
  2807.  10Dh (269)    Comoros
  2808.  10Eh (270)    Mayotte
  2809.  122h (290)    St. Helena
  2810.  129h (297)    Aruba
  2811.  12Ah (298)    Faroe Islands
  2812.  12Bh (299)    Greenland
  2813.  15Eh (350)    Gibraltar
  2814.  15Fh (351)    Portugal
  2815.  160h (352)    Luxembourg
  2816.  161h (353)    Ireland
  2817.  162h (354)    Iceland
  2818.  163h (355)    Albania
  2819.  164h (356)    Malta
  2820.  165h (357)    Cyprus
  2821.  166h (358)    Finland
  2822.  167h (359)    Bulgaria
  2823.  172h (370)    Lithuania
  2824.  173h (371)    Latvia
  2825.  174h (372)    Estonia
  2826.  175h (373)    Moldova
  2827.  17Dh (381)    Serbia / Montenegro
  2828.  180h (384)    Croatia???
  2829.  181h (385)    Croatia
  2830.  182h (386)    Slovenia
  2831.  183h (387)    Bosnia-Herzegovina (Latin)
  2832.  184h (388)    Bosnia-Herzegovina (Cyrillic)
  2833.  185h (389)    FYR Macedonia
  2834.  1A5h (421)    Czech Republic
  2835.  1A6h (422)    Slovakia
  2836.  1F4h (500)    Falkland Islands
  2837.  1F5h (501)    Belize
  2838.  1F6h (502)    Guatemala
  2839.  1F7h (503)    El Salvador
  2840.  1F8h (504)    Honduras
  2841.  1F9h (505)    Nicraragua
  2842.  1FAh (506)    Costa Rica
  2843.  1FBh (507)    Panama
  2844.  1FCh (508)    St. Pierre and Miquelon
  2845.  1FDh (509)    Haiti
  2846.  24Eh (590)    Guadeloupe
  2847.  24Fh (591)    Bolivia
  2848.  250h (592)    Guyana
  2849.  251h (593)    Ecuador
  2850.  252h (594)    rench Guiana
  2851.  253h (595)    Paraguay
  2852.  254h (596)    Martinique / French Antilles
  2853.  255h (597)    Suriname
  2854.  256h (598)    Uruguay
  2855.  257h (599)    Netherland Antilles
  2856.  29Eh (670)    Saipan / N. Mariana Island
  2857.  29Fh (671)    Guam
  2858.  2A0h (672)    Norfolk Island (Australia) / Christmas Island/Cocos Islands / Antartica
  2859.  2A1h (673)    Brunei Darussalam
  2860.  2A2h (674)    Nauru
  2861.  2A3h (675)    Papua New Guinea
  2862.  2A4h (676)    Tonga Islands
  2863.  2A5h (677)    Solomon Islands
  2864.  2A6h (678)    Vanuatu
  2865.  2A7h (679)    Fiji
  2866.  2A8h (680)    Palau
  2867.  2A9h (681)    Wallis & Futuna
  2868.  2AAh (682)    Cook Islands
  2869.  2ABh (683)    Niue
  2870.  2ACh (684)    American Samoa
  2871.  2ADh (685)    Western Samoa
  2872.  2AEh (686)    Kiribati
  2873.  2AFh (687)    New Caledonia
  2874.  2B0h (688)    Tuvalu
  2875.  2B1h (689)    French Polynesia
  2876.  2B2h (690)    Tokealu
  2877.  2B3h (691)    Micronesia
  2878.  2B4h (692)    Marshall Islands
  2879.  2C7h (711)    ??? (currency = EA$)
  2880.  311h (785)    Arabic (Middle East/Saudi Arabia/etc.)
  2881.  324h (804)    Ukraine
  2882.  329h (809)    Antigua and Barbuda / Anguilla / Bahamas / Barbados / Bermuda
  2883.         British Virgin Islands / Cayman Islands / Dominica
  2884.         Dominican Republic / Grenada / Jamaica / Montserra
  2885.         St. Kitts and Nevis / St. Lucia / St. Vincent and Grenadines
  2886.         Trinidad and Tobago / Turks and Caicos
  2887.  352h (850)    North Korea
  2888.  354h (852)    Hong Kong
  2889.  355h (853)    Macao
  2890.  357h (855)    Cambodia
  2891.  358h (856)    Laos
  2892.  370h (880)    Bangladesh
  2893.  376h (886)    Taiwan (DOS 6.22+)
  2894.  3C0h (960)    Maldives
  2895.  3C1h (961)    Lebanon
  2896.  3C2h (962)    Jordan
  2897.  3C3h (963)    Syrian Arab Republic
  2898.  3C4h (964)    Ireq
  2899.  3C5h (965)    Kuwait
  2900.  3C6h (966)    Saudi Arabia
  2901.  3C7h (967)    Yemen
  2902.  3C8h (968)    Oman
  2903.  3CBh (971)    United Arab Emirates
  2904.  3CCh (972)    Israel (Hebrew) (DR DOS 5.0,MS-DOS 5.0+)
  2905.  3CDh (973)    Bahrain
  2906.  3CEh (974)    Qatar
  2907.  3CFh (975)    Bhutan
  2908.  3D0h (976)    Mongolia
  2909.  3D1h (977)    Nepal
  2910.  3E3h (995)    Myanmar (Burma)
  2911. Note:    not all country codes are supported by all versions of DOS
  2912. --------D-2138--DXFFFF-----------------------
  2913. INT 21 - DOS 3.0+ - SET COUNTRY CODE
  2914.     AH = 38h
  2915.     DX = FFFFh
  2916.     AL = 01h thru FEh for specific country with code <255
  2917.     AL = FFh for specific country with code >= 255
  2918.        BX = 16-bit country code (see #1088)
  2919. Return: CF set on error
  2920.         AX = error code (see #1366 at AH=59h/BX=0000h)
  2921.     CF clear if successful
  2922. Note:    not supported by OS/2
  2923. SeeAlso: INT 2F/AX=1403h
  2924. --------D-2139-------------------------------
  2925. INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
  2926.     AH = 39h
  2927.     DS:DX -> ASCIZ pathname
  2928. Return: CF clear if successful
  2929.         AX destroyed
  2930.     CF set on error
  2931.         AX = error code (03h,05h) (see #1366 at AH=59h/BX=0000h)
  2932. Notes:    all directories in the given path except the last must exist
  2933.     fails if the parent directory is the root and is full
  2934.     DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
  2935.       it is not possible to make that directory the current directory
  2936.       because the path would exceed 64 characters
  2937.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2938. SeeAlso: AH=3Ah,AH=3Bh,AH=6Dh,AX=7139h,AH=E2h/SF=0Ah,INT 2F/AX=1103h
  2939. SeeAlso: INT 60/DI=0511h
  2940. --------D-213A-------------------------------
  2941. INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
  2942.     AH = 3Ah
  2943.     DS:DX -> ASCIZ pathname of directory to be removed
  2944. Return: CF clear if successful
  2945.         AX destroyed
  2946.     CF set on error
  2947.         AX = error code (03h,05h,06h,10h) (see #1366 at AH=59h/BX=0000h)
  2948. Notes:    directory must be empty (contain only '.' and '..' entries)
  2949.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2950. SeeAlso: AH=39h,AH=3Bh,AX=713Ah,AH=E2h/SF=0Bh,INT 2F/AX=1101h,INT 60/DI=0512h
  2951. --------D-213B-------------------------------
  2952. INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
  2953.     AH = 3Bh
  2954.     DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
  2955. Return: CF clear if successful
  2956.         AX destroyed
  2957.     CF set on error
  2958.         AX = error code (03h) (see #1366 at AH=59h/BX=0000h)
  2959. Notes:    if new directory name includes a drive letter, the default drive is
  2960.       not changed, only the current directory on that drive
  2961.     changing the current directory also changes the directory in which
  2962.       FCB file calls operate
  2963.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2964. SeeAlso: AH=47h,AX=713Bh,INT 2F/AX=1105h
  2965. --------D-213C-------------------------------
  2966. INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
  2967.     AH = 3Ch
  2968.     CX = file attributes (see #1089)
  2969.     DS:DX -> ASCIZ filename
  2970. Return: CF clear if successful
  2971.         AX = file handle
  2972.     CF set on error
  2973.         AX = error code (03h,04h,05h) (see #1366 at AH=59h/BX=0000h)
  2974. Notes:    if a file with the given name exists, it is truncated to zero length
  2975.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2976.     DR DOS checks the system password or explicitly supplied password at
  2977.       the end of the filename against the reserved field in the directory
  2978.       entry before allowing access
  2979. SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h,INT 2F/AX=1117h
  2980.  
  2981. Bitfields for file attributes:
  2982. Bit(s)    Description    (Table 1089)
  2983.  0    read-only
  2984.  1    hidden
  2985.  2    system
  2986.  3    volume label (ignored)
  2987.  4    reserved, must be zero (directory)
  2988.  5    archive bit
  2989.  7    if set, file is shareable under Novell NetWare
  2990. --------D-213D-------------------------------
  2991. INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
  2992.     AH = 3Dh
  2993.     AL = access and sharing modes (see #1090)
  2994.     DS:DX -> ASCIZ filename
  2995.     CL = attribute mask of files to look for (server call only)
  2996. Return: CF clear if successful
  2997.         AX = file handle
  2998.     CF set on error
  2999.         AX = error code (01h,02h,03h,04h,05h,0Ch,56h) (see #1366 at AH=59h)
  3000. Notes:    file pointer is set to start of file
  3001.     if SHARE or a network is loaded, the file open may fail if the file
  3002.       is already open, depending on the combination of sharing modes
  3003.       (see #1091,#3760)
  3004.     file handles which are inherited from a parent also inherit sharing
  3005.       and access restrictions
  3006.     files may be opened even if given the hidden or system attributes
  3007.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3008.     DR DOS checks the system password or explicitly supplied password at
  3009.       the end of the filename (following a semicolon) against the reserved
  3010.       field in the directory entry before allowing access
  3011.     sharing modes are only effective on local drives if SHARE is loaded
  3012. BUG:    Novell DOS 7 SHARE v1.00 would refuse file access in the cases in
  3013.       #1091 marked with [1] (read-only open of a read-only file
  3014.       which had previously been opened in compatibility mode); this was
  3015.       fixed in SHARE v1.01 of 09/29/94
  3016. SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1116h,INT 2F/AX=1226h
  3017.  
  3018. Bitfields for access and sharing modes:
  3019. Bit(s)    Description    (Table 1090)
  3020.  2-0    access mode
  3021.     000 read only
  3022.     001 write only
  3023.     010 read/write
  3024.     011 (DOS 5+ internal) passed to redirector on EXEC to allow
  3025.         case-sensitive filenames
  3026.  3    reserved (0)
  3027.  6-4    sharing mode (DOS 3.0+) (see #1091)
  3028.     000 compatibility mode
  3029.     001 "DENYALL" prohibit both read and write access by others
  3030.     010 "DENYWRITE" prohibit write access by others
  3031.     011 "DENYREAD" prohibit read access by others
  3032.     100 "DENYNONE" allow full access by others
  3033.     111 network FCB (only available during server call)
  3034.  7    inheritance
  3035.     if set, file is private to current process and will not be inherited
  3036.       by child processes
  3037. SeeAlso: #1471,#1091
  3038.  
  3039. (Table 1091)
  3040. Values of DOS 2-6.22 file sharing behavior:
  3041.       |    Second and subsequent Opens
  3042.  First      |Compat  Deny      Deny     Deny    Deny
  3043.  Open      |       All      Write     Read    None
  3044.       |R W RW R W RW R W RW R W RW R W RW
  3045.  - - - - -| - - - - - - - - - - - - - - - - -
  3046.  Compat R |Y Y Y  N N N     1 N N    N N N  1 N N
  3047.     W |Y Y Y  N N N     N N N    N N N  N N N
  3048.     RW|Y Y Y  N N N     N N N    N N N  N N N
  3049.  - - - - -|
  3050.  Deny    R |C C C  N N N     N N N    N N N  N N N
  3051.  All    W |C C C  N N N     N N N    N N N  N N N
  3052.     RW|C C C  N N N     N N N    N N N  N N N
  3053.  - - - - -|
  3054.  Deny    R |2 C C  N N N     Y N N    N N N  Y N N
  3055.  Write    W |C C C  N N N     N N N    Y N N  Y N N
  3056.     RW|C C C  N N N     N N N    N N N  Y N N
  3057.  - - - - -|
  3058.  Deny    R |C C C  N N N     N Y N    N N N  N Y N
  3059.  Read    W |C C C  N N N     N N N    N Y N  N Y N
  3060.     RW|C C C  N N N     N N N    N N N  N Y N
  3061.  - - - - -|
  3062.  Deny    R |2 C C  N N N     Y Y Y    N N N  Y Y Y
  3063.  None    W |C C C  N N N     N N N    Y Y Y  Y Y Y
  3064.     RW|C C C  N N N     N N N    N N N  Y Y Y
  3065. Legend: Y = open succeeds, N = open fails with error code 05h
  3066.     C = open fails, INT 24 generated
  3067.     1 = open succeeds if file read-only, else fails with error code
  3068.     2 = open succeeds if file read-only, else fails with INT 24
  3069. SeeAlso: #1322,#3760
  3070.  
  3071. (Table 3760)
  3072. Values for DOS 7.x file sharing behavior:
  3073.       |    Second and subsequent Opens
  3074.  First      |Compat    Deny      Deny     Deny       Deny
  3075.  Open      |         All       Write     Read       None
  3076.       |R W RW A  R W RW A  R W RW A     R W RW A  R W RW A
  3077.  - - - - -| - - - - - - - - - - - - - - - - - - - - - - - -
  3078.  Compat R |Y Y Y Y   N N N N   Y N N Y     N N N Y   Y N N Y
  3079.     W |Y Y Y C   N N N N   N N N N     N N N Y   Y N N Y
  3080.     RW|Y Y Y C   N N N N   N N N N     N N N Y   Y N N Y
  3081.     NA|Y C C Y   N N N N   Y N N Y     N N N Y   Y N N Y
  3082.  - - - - -|
  3083.  Deny    R |C C C C   N N N N   N N N N     N N N N   N N N N
  3084.  All    W |C C C C   N N N N   N N N N     N N N N   N N N N
  3085.     RW|C C C C   N N N N   N N N N     N N N N   N N N N
  3086.     NA|C C C C   N N N N   N N N N     N N N N   N N N N
  3087.  - - - - -|
  3088.  Deny    R |Y C C Y   N N N N   Y N N Y     N N N Y   Y N N Y
  3089.  Write    W |C C C C   N N N N   N N N N     Y N N Y   Y N N Y
  3090.     RW|C C C C   N N N N   N N N N     N N N Y   Y N N Y
  3091.     NA|Y C C Y   N N N N   Y N N Y     N N N Y   Y N N Y
  3092.  - - - - -|
  3093.  Deny    R |C C C C   N N N N   N Y N N     N N N N   N Y N N
  3094.  Read    W |C C C C   N N N N   N N N N     N Y N N   N Y N N
  3095.     RW|C C C C   N N N N   N N N N     N N N N   N Y N N
  3096.     NA|Y Y Y Y   N N N N   Y Y Y Y     N N N Y   Y Y Y Y
  3097.  - - - - -|
  3098.  Deny    R |Y Y Y Y   N N N N   Y Y Y Y     N N N Y   Y Y Y Y
  3099.  None    W |C C C C   N N N N   N N N N     Y Y Y Y   Y Y Y Y
  3100.     RW|C C C C   N N N N   N N N N     N N N Y   Y Y Y Y
  3101.     NA|Y Y Y Y   N N N N   Y Y Y Y     N N N Y   Y Y Y Y
  3102. Legend: R -> reading, W -> writing, RW -> both reading & writing,
  3103.     A/NA -> reading without access time update
  3104.     Y = open succeeds, N = open fails with error code 05h
  3105.     C = open fails, INT 24 generated
  3106. SeeAlso: #1091,#1322
  3107. --------v-213D76-----------------------------
  3108. INT 21 - VIRUS - "GT-SPOOF" -INSTALLATION CHECK
  3109.     AX = 3D76h
  3110. Return: AX = 763Dh if resident
  3111. SeeAlso: AX=357Fh,AX=3DFFh
  3112. --------v-213DFF-----------------------------
  3113. INT 21 - VIRUS - "JD-448" - INSTALLATION CHECK
  3114.     AX = 3DFFh
  3115. Return: AX = 4A44h if resident
  3116. SeeAlso: AX=3D76h,AX=4203h
  3117. --------D-213E-------------------------------
  3118. INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
  3119.     AH = 3Eh
  3120.     BX = file handle
  3121. Return: CF clear if successful
  3122.         AX destroyed
  3123.     CF set on error
  3124.         AX = error code (06h) (see #1366 at AH=59h/BX=0000h)
  3125. Notes:    if the file was written to, any pending disk writes are performed, the
  3126.       time and date stamps are set to the current time, and the directory
  3127.       entry is updated
  3128.     recent versions of DOS preserve AH because some versions of Multiplan
  3129.       had a bug which depended on AH being preserved
  3130. SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
  3131. --------D-213F-------------------------------
  3132. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  3133.     AH = 3Fh
  3134.     BX = file handle
  3135.     CX = number of bytes to read
  3136.     DS:DX -> buffer for data
  3137. Return: CF clear if successful
  3138.         AX = number of bytes actually read (0 if at EOF before call)
  3139.     CF set on error
  3140.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3141. Notes:    data is read beginning at current file position, and the file position
  3142.       is updated after a successful read
  3143.     the returned AX may be smaller than the request in CX if a partial
  3144.       read occurred
  3145.     if reading from CON, read stops at first CR
  3146.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3147. BUG:    Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to
  3148.       a record lock (see AH=5Ch), though it does return AX=0005h; this
  3149.       has been documented by Novell
  3150. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  3151. --------G-213F-------------------------------
  3152. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  3153.     AH = 3Fh
  3154.     BX = handle for character device "TDHDEBUG"
  3155.     CX = number of bytes to read
  3156.     DS:DX -> buffer for status block (see #1093)
  3157. Return: CF clear if successful
  3158.         AX = number of bytes actually read
  3159.     CF set on error
  3160.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3161. SeeAlso: AH=40h"Turbo Debug"
  3162.  
  3163. (Table 1092)
  3164. Values for status of Turbo Debugger command:
  3165.  00h    successful
  3166.  01h    invalid handle
  3167.  02h    no more breakpoints available
  3168.  03h    hardware does not support specified breakpoint type
  3169.  04h    previous command prevents execution
  3170.  05h    debugger hardware not found
  3171.  06h    hardware failure
  3172.  07h    invalid command
  3173.  08h    driver not initialized yet
  3174.  FEh    recursive entry (hardware breakpoint inside hw bp handler)
  3175.  
  3176. Format of Turbo Debugger status block:
  3177. Offset    Size    Description    (Table 1093)
  3178.  00h    BYTE    status of command (see #1092)
  3179. ---status for command 01h---
  3180.  01h    WORD    device driver interface version number (currently 1)
  3181.  03h    WORD    device driver software version
  3182.  05h    BYTE    maximum simultaneous hardware breakpoints
  3183.  06h    BYTE    configuration bits (see #1094)
  3184.  07h    BYTE    supported breakpoint types (see #1095)
  3185.  08h    WORD    supported addressing match modes (see #1096)
  3186.  0Ah    WORD    supported data matches (see #1097)
  3187.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  3188.  0Dh    WORD    size of onboard memory (in KB)
  3189.  0Fh    WORD    maximum number of trace-back events
  3190.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  3191.           supported)
  3192. ---status for command 04h---
  3193.  01h    BYTE    handle to use when referring to the just-set breakpoint
  3194.  
  3195. Bitfields for Turbo Debugger configuration bits:
  3196. Bit(s)    Description    (Table 1094)
  3197.  0    CPU and DMA accesses are distinct
  3198.  1    can detect DMA transfers
  3199.  2    supports data mask
  3200.  3    hardware pass counter on breakpoints
  3201.  4    can match on data as well as addresses
  3202.  
  3203. Bitfields for Turbo Debugger supported breakpoint types:
  3204. Bit(s)    Description    (Table 1095)
  3205.  0    memory read
  3206.  1    memory write
  3207.  2    memory read/write
  3208.  3    I/O read
  3209.  4    I/O write
  3210.  5    I/O read/write
  3211.  6    instruction fetch
  3212.  
  3213. Bitfields for Turbo Debugger supported addressing match modes:
  3214. Bit(s)    Description    (Table 1096)
  3215.  0    any address
  3216.  1    equal to test value
  3217.  2    not equal
  3218.  3    above test value
  3219.  4    below test value
  3220.  5    below or equal
  3221.  6    above or equal
  3222.  7    within range
  3223.  8    outside range
  3224.  
  3225. Bitfields for Turbo Debugger supported data matches:
  3226. Bit(s)    Description    (Table 1097)
  3227.  0    any data
  3228.  1    equal to test value
  3229.  2    not equal
  3230.  3    above test value
  3231.  4    below test value
  3232.  5    below or equal
  3233.  6    above or equal
  3234.  7    within range
  3235.  8    outside range
  3236. --------N-213F-------------------------------
  3237. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  3238.     AH = 3Fh
  3239.     BX = handle for character device "$IPCUST"
  3240.     CX = number of bytes to read
  3241.     DS:DX -> buffer for configuration data (see #1098)
  3242. Return: CF clear if successful
  3243.         AX = number of bytes actually read
  3244.     CF set on error
  3245.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3246. Notes:    if less than the entire data is read or written, the next read/write
  3247.       continues where the previous one ended; IOCTL calls AX=4402h and
  3248.       AX=4403h both reset the location at which the next operation starts
  3249.       to zero
  3250.     the data pointer is also reset to zero if the previous read or write
  3251.       reached or exceeded the end of the data, when the current function
  3252.       is read and the previous was write, or vice versa
  3253.     v2.1+ uses a new configuration method, but allows the installation
  3254.       of IPCUST.SYS for backward compatibility with other software which
  3255.       must read the PC/TCP configuration
  3256. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST",AX=4402h"FTPSOFT"
  3257.  
  3258. Format of PC/TCP configuration data:
  3259. Offset    Size    Description    (Table 1098)
  3260.  00h 12 BYTEs    IPCUST.SYS device driver header (see #1332)
  3261.  12h    BYTE    ???
  3262.  13h    BYTE    ???
  3263.  14h    WORD    ???
  3264.  16h    BYTE    bit flags
  3265.         bit 0: send BS rather than DEL for BackSpace key
  3266.         bit 1: wrap long lines
  3267.  17h    BYTE    ???
  3268.  18h 64 BYTEs    ASCIZ hostname
  3269.  58h 64 BYTEs    ASCIZ domain name
  3270.         (fully qualified domain name is hostname.domain-name)
  3271.  98h 16 BYTEs    ASCIZ username
  3272.  A8h 64 BYTEs    ASCIZ full name
  3273.  E8h 64 BYTEs    ASCIZ office address
  3274. 128h 32 BYTEs    ASCIZ phone number
  3275. 148h    WORD    offset from GMT in minutes
  3276. 14Ah  4 BYTEs    ASCIZ timezone name
  3277. 14Eh    WORD    number of time servers
  3278. 150h  ? DWORDs    (big-endian) IP addresses for time servers
  3279.     ???
  3280. 164h    WORD    number of old-style name servers
  3281. 166h  3 DWORDs    (big-endian) IP addresses for name servers
  3282. 172h    WORD    number of domain name servers
  3283. 174h  3 DWORDs    (big-endian) IP addresses for domain name servers
  3284. 180h    DWORD    (big-endian) IP address of default gateway
  3285. 184h    DWORD    (big-endian) IP address of log server
  3286. 188h    DWORD    (big-endian) IP address of cookie server
  3287. 18Ch    DWORD    (big-endian) IP address of lpr server
  3288. 190h    DWORD    (big-endian) IP address of imagen print server
  3289. 194h 54 BYTEs    ???
  3290. 1E8h    WORD    TCP default window size in bytes
  3291. 1EAh    WORD    TCP low window size
  3292. 1ECh 64 BYTEs    ASCIZ host tabel filename
  3293. 22Ch  2 BYTEs    ???
  3294. 22Eh 80 BYTEs    ASCIZ mail relay host name
  3295. 27Eh    BYTE    ???
  3296. 27Fh    BYTE    ??? bit flags
  3297. 280h 44 BYTEs    ???
  3298. 2ACh    WORD    ???
  3299. 2AEh 202 BYTEs    ???
  3300. --------N-213F-------------------------------
  3301. INT 21 - WORKGRP.SYS - GET ENTRY POINT
  3302.     AH = 3Fh
  3303.     BX = file handle for device "NET$HLP$"
  3304.     CX = 0008h
  3305.     DS:DX -> buffer for entry point record (see #1172)
  3306. Return: CF clear if successful
  3307.         AX = number of bytes actually read (0 if at EOF before call)
  3308.     CF set on error
  3309.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3310. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  3311.       permits communication with PCs running Windows for Workgroups or
  3312.       LAN Manager
  3313. SeeAlso: AX=4402h"WORKGRP.SYS",INT 2F/AX=9400h
  3314. --------N-213F-------------------------------
  3315. INT 21 - BW-TCP - GET DRIVER INFO
  3316.     AH = 3Fh
  3317.     BX = file handle for device "ETHDEV27"
  3318.     CX = 002Bh
  3319.     DS:DX -> buffer for driver info (see #1099)
  3320. Return: CF clear if successful
  3321.         AX = number of bytes actually read (0 if at EOF before call)
  3322.     CF set on error
  3323.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3324. Program: BW-TCP is a TCP/IP protocol stack by Beame & Whiteside Software
  3325. InstallCheck:    for the TCP/IP stack, test for the existence of the character
  3326.       device UDP-IP10
  3327. Note:    the B&W socket library performs an INT 21/AX=4401h with DX=0060h before
  3328.       making this call to retrieve the driver information; one should also
  3329.       call the private API interrupt with AH=15h
  3330. SeeAlso: INT 14/AH=56h,INT 62/AH=00h"ETHDEV",INT 63/AH=03h,INT 64/AH=01h
  3331. Index:    installation check;BW-TCP hardware driver
  3332. Index:    installation check;BW-TCP TCPIP.SYS
  3333.  
  3334. Format of BW-TCP driver info:
  3335. Offset    Size    Description    (Table 1099)
  3336.  00h    WORD    I/O base address
  3337.  02h    BYTE    shared memory page (01h = segment 0100h, etc.)
  3338.  03h    BYTE    interrupt vector for private API
  3339.  04h    BYTE    IRQ used by board
  3340.  05h    WORD    size of data buffer
  3341.  07h    WORD    maximum transfer window
  3342.  09h    WORD    time zone
  3343.  0Bh    BYTE    address type (01h user, 04h RARP, 05h BOOTP)
  3344.  0Ch    DWORD    internet address
  3345.  10h    WORD    "value" ???
  3346.  12h    BYTE    subnet mask
  3347.  13h    WORD    "ether_pointer" ???
  3348.  15h    WORD    offset in device driver of log server records (see #1100)
  3349.  17h    WORD    offset in device driver of name server records (see #1100)
  3350.  19h    WORD    offset in device driver of print server records (see #1100)
  3351.  1Bh    WORD    offset in device driver of time server records (see #1100)
  3352.  1Dh    WORD    offset in device driver of gateway records (see #1100)
  3353.  1Fh    WORD    segment address of device driver
  3354.  21h    BYTE    transfer size
  3355.  22h  9 BYTEs    network adapter board name
  3356. ---11/21/91+ ---
  3357.  23h    BYTE    ETHDEV version (major in high nybble, minor in low nybble)
  3358.  24h    BYTE    ETHDEV revision
  3359.  25h    BYTE    TCPIP version (major in high nybble, minor in low nybble)
  3360.  26h    BYTE    TCPIP revision
  3361.  27h    BYTE    BWRPC version (major in high nybble, minor in low nybble)
  3362.  28h    BYTE    BWRPC revision
  3363.  29h    BYTE    BWNFS version (major in high nybble, minor in low nybble)
  3364.  2Ah    BYTE    BWNFS revision
  3365.  2Bh    BYTE    Telnet version (major in high nybble, minor in low nybble)
  3366.  2Ch    BYTE    Telnet revision
  3367.  2Dh    BYTE    NETBIOS version (major in high nybble, minor in low nybble)
  3368.  2Eh    BYTE    NETBIOS revision
  3369. Note:    for each driver, if version=0, the driver is not installed or does
  3370.       not support the version check
  3371.  
  3372. Format of BW-TCP server records:
  3373. Offset    Size    Description    (Table 1100)
  3374.  00h    BYTE    number of server records following
  3375.  01h  N DWORDs    internet addresses of servers
  3376. --------y-213F-------------------------------
  3377. INT 21 - Trusted Access - NB.SYS - GET STATE
  3378.     AH = 3Fh
  3379.     BX = file handle for device "$$NB$$NB"
  3380.     CX = 0002h (size of state)
  3381.     DS:DX -> buffer for state record (see #1101)
  3382. Return: CF clear if successful
  3383.         AX = number of bytes actually read (0 if at EOF before call)
  3384.     CF set on error
  3385.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3386. Program: Trusted Access is a security and access-control package by Lassen
  3387.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  3388.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  3389. SeeAlso: AH=40h"NB.SYS",AX=4101h
  3390.  
  3391. Format of Trusted Access state record:
  3392. Offset    Size    Description    (Table 1101)
  3393.  00h    BYTE    00h off, 01h on
  3394.  01h    BYTE    keys being disabled
  3395.         bit 0: Ctrl-Break
  3396.         bit 1: SysReq
  3397.         bit 2: Ctrl and Alt
  3398.         bit 3: Ctrl-Alt-Del
  3399.         bit 7: all keys (overrides other bits)
  3400. ----------213F-------------------------------
  3401. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  3402.     AH = 3Fh
  3403.     BX = file handle for device "IFS$HLP$"
  3404.     CX = 0008h (size of buffer in bytes)
  3405.     DS:DX -> buffer for entry point record (see #1102)
  3406. Return: CF clear if successful
  3407.         AX = number of bytes actually read (0 if at EOF before call)
  3408.     CF set on error
  3409.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3410. Program: IFSHLP.SYS is a support driver for Microsoft Windows for Workgroups
  3411. SeeAlso: AX=4402h"IFSHLP"
  3412.  
  3413. Format of IFSHLP.SYS entry point record:
  3414. Offset    Size    Description    (Table 1102)
  3415.  00h  4 BYTEs    (call) required signature if called via IOCTL
  3416.             70h E9h 34h 37h for Windows 3.11
  3417.             70h E9h 35h 37h for Windows 3.11
  3418.         (ret) signature 34h 37h 70h EFh (Windows 3.11)
  3419.         (ret) signature 35h 37h 70h EFh (Windows95)
  3420.  04h    DWORD    (ret) pointer to FAR call entry point (see #1103)
  3421.  
  3422. (Table 1103)
  3423. Call IFSHLP.SYS entry point with:
  3424.     STACK:    WORD    function number (00h-0Ch)
  3425.             00h get ??? data
  3426.             01h set interrupt intercepts (trap)
  3427.             02h remove interrupt intercepts (untrap)
  3428.             03h ??? LPT2
  3429.             04h ??? LPT1
  3430.             05h revector INT 2F to trap and remove trap for others
  3431.             06h set ??? flag
  3432.             07h clear ??? flag
  3433.             08h get ??? flag word
  3434.             ---Windows 3.11 only---
  3435.             09h ???
  3436.             0Ah ???
  3437.             0Bh ???
  3438.             0Ch get ???
  3439. ---if function 00h---
  3440. Return: DX:AX -> ??? data (see #1104)
  3441.     BX destroyed
  3442. ---if function 01h---
  3443.     STACK:    DWORD    new intercept (trap) address
  3444. Return: AX = status
  3445.         0000h successful
  3446.         0001h failed (already set)
  3447.         DX = 0000h
  3448.     BX destroyed
  3449. Note:    the trap handler is called with a function number in BX, and the
  3450.       original BX on top of the stack; a null handler must perform a
  3451.       POP BX and an IRET
  3452. ---if function 02h---
  3453. Return: AX = status
  3454.         0000h successful
  3455.         0001h failed (not set)
  3456.     DX = 0000h
  3457.     BX destroyed
  3458. ---if function 03h,04h---
  3459.     STACK:    WORD    ???
  3460. Return: AX = 0000h
  3461.     DX = 0000h
  3462.     BX destroyed
  3463. ---if function 05h---
  3464.     ???
  3465. Return:    BX destroyed
  3466. ---if function 06h---
  3467. Return: AX = 0001h and DX = 0000h if already set
  3468.     AX,DX unchanged if successful
  3469.     BX destroyed
  3470. ---if function 07h---
  3471. Return: AX = 0001h and DX = 0000h if not set
  3472.     AX,DX unchanged if successful
  3473.     BX destroyed
  3474. ---if function 08h---
  3475. Return: DX = 0000h
  3476.     AX = flags
  3477.         bit 0: set/cleared by functions 06h and 07h
  3478.         bit 1: trap is currently set (refer to functions 01h/02h)
  3479.     BX destroyed
  3480. ---if function 09h---
  3481. Return: AX = status
  3482.         0000h successful
  3483.         0001h failed (already called)
  3484.     BX destroyed
  3485. ---if function 0Ah---
  3486.     STACK:    WORD    ???
  3487.     ???
  3488. Return:    BX destroyed
  3489. ---if function 0Bh---
  3490. Return: AX = status
  3491.         0000h successful
  3492.         0001h failed (not set)
  3493.     BX destroyed
  3494. ---if function 0Ch---
  3495. Return: AX = 0000h
  3496.     ES:BX -> ??? data
  3497. ---if function > 0Ch---
  3498. Return: AX = 0001h
  3499.     DX = 0000h
  3500.     BX destroyed
  3501.  
  3502. Format of IFSHLP ??? data:
  3503. Offset    Size    Description    (Table 1104)
  3504.  00h    DWORD    -> DOS Swappable Data Area (see #1373,#1375)
  3505.  02h    WORD    ??? offset in DOS data segment?
  3506.  04h    WORD    offset in DOS data segment of current-PSP WORD
  3507.  06h    WORD    ???
  3508.  08h    WORD    ???
  3509.  0Ah    WORD    ???
  3510.  0Ch    DWORD    -> DOS List of Lists (see #1313)
  3511.  10h    ???
  3512. SeeAlso: #1103
  3513. --------v-213F--BXFEB0-----------------------
  3514. INT 21 - VIRUS - "KYZ/LieWait" - INSTALLATION CHECK
  3515.     AH = 3Fh
  3516.     BX = FEB0h
  3517. Return: BX = 1212h if resident
  3518. SeeAlso: AX=3032h"VIRUS",AX=4BF1h"VIRUS"
  3519. --------D-2140-------------------------------
  3520. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  3521.     AH = 40h
  3522.     BX = file handle
  3523.     CX = number of bytes to write
  3524.     DS:DX -> data to write
  3525. Return: CF clear if successful
  3526.         AX = number of bytes actually written
  3527.     CF set on error
  3528.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3529. Notes:    if CX is zero, no data is written, and the file is truncated or
  3530.       extended to the current position
  3531.     data is written beginning at the current file position, and the file
  3532.       position is updated after a successful write
  3533.     for FAT32 drives, the file must have been opened with AX=6C00h with
  3534.       the "extended size" flag in order to expand the file beyond 2GB;
  3535.       otherwise the write will fail with error code 0005h (access denied)
  3536.     the usual cause for AX < CX on return is a full disk
  3537. BUG:    a write of zero bytes will appear to succeed when it actually failed
  3538.       if the write is extending the file and there is not enough disk
  3539.       space for the expanded file (DOS 5.0-6.0); one should therefore check
  3540.       whether the file was in fact extended by seeking to 0 bytes from
  3541.       the end of the file (INT 21/AX=4202h/CX=0000h/DX=0000h)
  3542.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3543. SeeAlso: AH=28h,AH=3Fh"DOS",AH=93h,INT 2F/AX=1109h
  3544. --------G-2140-------------------------------
  3545. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  3546.     AH = 40h
  3547.     BX = handle for character device "TDHDEBUG"
  3548.     CX = number of bytes to write
  3549.     DS:DX -> hardware breakpoint command (see #1105)
  3550. Return: CF clear if successful
  3551.         AX = number of bytes actually written
  3552.     CF set on error
  3553.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3554. Note:    results are retrieved by reading from the device
  3555. SeeAlso: AH=3Fh"Turbo Debug"
  3556.  
  3557. Format of Turbo Debugger hardware breakpoint commands:
  3558. Offset    Size    Description    (Table 1105)
  3559.  00h    BYTE    command code
  3560.         00h install interrupt vectors
  3561.         01h get hardware capabilities
  3562.         02h enable hardware breakpoints
  3563.         03h disable hardware breakpoints
  3564.         04h set hardware breakpoint
  3565.         05h clear hardware breakpoint
  3566.         06h set I/O base address and reset hardware
  3567.         07h restore interrupt vectors
  3568. ---command code 00h---
  3569.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  3570.           hardware breakpoint; call with CPU state the same as on
  3571.           the breakpoint except for pushing AX and placing an entry
  3572.           code (FFh if breakout button or breakpoint handle) in AH
  3573. ---command code 04h---
  3574.  01h    BYTE    breakpoint type
  3575.         00h memory read
  3576.         01h memory write
  3577.         02h memory read/write
  3578.         03h I/O read
  3579.         04h I/O write
  3580.         05h I/O read/write
  3581.         06h instruction fetch
  3582.  02h    BYTE    address matching mode (see #1106)
  3583.  03h    DWORD    32-bit linear low address
  3584.  07h    DWORD    32-bit linear high address
  3585.  0Bh    WORD    pass count
  3586.  0Dh    BYTE    data size (01h, 02h, or 04h)
  3587.  0Eh    BYTE    source of matched bus cycle (01h CPU, 02h DMA, 03h either)
  3588.  0Fh    BYTE    data-matching mode (see #1106)
  3589.  10h    DWORD    low data value
  3590.  14h    DWORD    high data value
  3591.  18h    DWORD    data mask specifying which bits of the data are tested
  3592. ---command code 05h---
  3593.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  3594.           04h)
  3595. ---command code 06h---
  3596.  01h    WORD    base address of hardware debugger board
  3597.  
  3598. (Table 1106)
  3599. Values for Turbo Debugger address/data matching mode:
  3600.  00h    match any
  3601.  01h    equal to test value
  3602.  02h    different from test value
  3603.  03h    above test value
  3604.  04h    below test value
  3605.  05h    below or equal to test value
  3606.  06h    above or equal to test value
  3607.  07h    within inclusive range
  3608.  08h    outside specified range
  3609. --------N-2140-------------------------------
  3610. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  3611.     AH = 40h
  3612.     BX = handle for character device "$IPCUST"
  3613.     CX = number of bytes to write
  3614.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  3615. Return: CF clear if successful
  3616.         AX = number of bytes actually written
  3617.     CF set on error
  3618.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3619. Notes:    if less than the entire data is read or written, the next read/write
  3620.       continues where the previous one ended; IOCTL calls AX=4402h and
  3621.       AX=4403h both reset the location at which the next operation starts
  3622.       to zero
  3623.     the data pointer is also reset to zero if the previous read or write
  3624.       reached or exceeded the end of the data, when the current function
  3625.       is read and the previous was write, or vice versa
  3626.     v2.1+ uses a new configuration method, but allows the installation
  3627.       of IPCUST.SYS for backward compatibility with other software which
  3628.       must read the PC/TCP configuration
  3629. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  3630. --------y-2140-------------------------------
  3631. INT 21 U - Trusted Access - NB.SYS - SET STATE
  3632.     AH = 40h
  3633.     BX = handle for character device "$$NB$$NB"
  3634.     DS:DX -> state record (see #1101)
  3635.     CX ignored
  3636. Return: CF clear if successful
  3637.         AX = number of bytes actually written
  3638.     CF set on error
  3639.         AX = error code (05h,06h) (see #1366 at AH=59h/BX=0000h)
  3640. Program: Trusted Access is a security and access-control package by Lassen
  3641.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  3642.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  3643. SeeAlso: AH=3Fh"NB.SYS"
  3644. --------j-214000BX0002-----------------------
  3645. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  3646.     AX = 4000h
  3647.     BX = 0002h
  3648.     CX = 0000h
  3649.     DS:DX = 0000h:0000h
  3650. Return: CF clear if installed
  3651.         AX = CS of resident code
  3652. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  3653.       noises when programs output a bell
  3654. SeeAlso: AX=4001h
  3655. --------j-214001BX0002-----------------------
  3656. INT 21 - FARTBELL.EXE - FORCE NOISE
  3657.     AX = 4001h
  3658.     BX = 0002h
  3659.     CX = 0000h
  3660.     DS:DX = 0000h:0000h
  3661. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  3662.       noises when programs output a bell
  3663. SeeAlso: AX=4000h
  3664. --------D-2141-------------------------------
  3665. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  3666.     AH = 41h
  3667.     DS:DX -> ASCIZ filename (no wildcards, but see notes)
  3668.     CL = attribute mask for deletion (server call only, see notes)
  3669. Return: CF clear if successful
  3670.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  3671.     CF set on error
  3672.         AX = error code (02h,03h,05h) (see #1366 at AH=59h/BX=0000h)
  3673. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  3674.       the filespec must be canonical (as returned by AH=60h), and only
  3675.       files matching the attribute mask in CL are deleted
  3676.     DR DOS 5.0-6.0 returns error code 03h if invoked via AX=5D00h; DR DOS
  3677.       3.41 crashes if called via AX=5D00h with wildcards
  3678.     DOS does not erase the file's data; it merely becomes inaccessible
  3679.       because the FAT chain for the file is cleared
  3680.     deleting a file which is currently open may lead to filesystem
  3681.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  3682.       referencing the deleted file, thus allowing writes to a nonexistant
  3683.       file.
  3684.     under DR DOS and DR Multiuser DOS, this function will fail if the file
  3685.       is currently open
  3686.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  3687. BUG:    DR DOS 3.41 crashes if called via AX=5D00h
  3688. SeeAlso: AH=13h,AX=4301h,AX=4380h,AX=5D00h,AH=60h,AX=7141h,AX=F244h
  3689. SeeAlso: INT 2F/AX=1113h
  3690. --------y-214101DXFFFE-----------------------
  3691. INT 21 - SoftLogic Data Guardian - ???
  3692.     AX = 4101h
  3693.     DX = FFFEh
  3694. Return: AX = 0000h if installed
  3695. Note:    resident code sets several internal variables on this call
  3696. SeeAlso: AH=3Fh"NB.SYS",INT 16/AX=FFA3h/BX=0000h
  3697. --------D-2142-------------------------------
  3698. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  3699.     AH = 42h
  3700.     AL = origin of move
  3701.         00h start of file
  3702.         01h current file position
  3703.         02h end of file
  3704.     BX = file handle
  3705.     CX:DX = (signed) offset from origin of new file position
  3706. Return: CF clear if successful
  3707.         DX:AX = new file position in bytes from start of file
  3708.     CF set on error
  3709.         AX = error code (01h,06h) (see #1366 at AH=59h/BX=0000h)
  3710. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  3711.       start of the file; no error is returned in that case, but subsequent
  3712.       attempts at I/O will produce errors
  3713.     if the new position is beyond the current end of file, the file will
  3714.       be extended by the next write (see AH=40h); for FAT32 drives, the
  3715.       file must have been opened with AX=6C00h with the "extended size"
  3716.       flag in order to expand the file beyond 2GB
  3717. BUG:    using this method to grow a file from zero bytes to a very large size
  3718.       can corrupt the FAT in some versions of DOS; the file should first
  3719.       be grown from zero to one byte and then to the desired large size
  3720. SeeAlso: AH=24h,INT 2F/AX=1228h
  3721. --------v-214203-----------------------------
  3722. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  3723.     AX = 4203h
  3724. Return: AX = 1234h if resident
  3725. SeeAlso: AX=3DFFh,AX=4243h
  3726. --------v-214243-----------------------------
  3727. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  3728.     AX = 4243h
  3729. Return: AX = 5678h if resident
  3730. SeeAlso: AX=4203h,AX=44A0h,AX=4B04h
  3731. --------D-214300-----------------------------
  3732. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  3733.     AX = 4300h
  3734.     DS:DX -> ASCIZ filename
  3735. Return: CF clear if successful
  3736.         CX = file attributes (see #1107)
  3737.         AX = CX (DR DOS 5.0)
  3738.     CF set on error
  3739.         AX = error code (01h,02h,03h,05h) (see #1366 at AH=59h)
  3740. Notes:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  3741.     under DR DOS 3.41 and 5.0, attempts to change the subdirectory bit are
  3742.       simply ignored without an error
  3743. BUG:    Windows for Workgroups returns error code 05h (access denied) instead
  3744.       of error code 02h (file not found) when attempting to get the
  3745.       attributes of a nonexistent file.  This causes open() with O_CREAT
  3746.       and fopen() with the "w" mode to fail in Borland C++.
  3747. SeeAlso: AX=4301h,AX=4310h,AX=7143h,AH=B6h,INT 2F/AX=110Fh,INT 60/DI=0517h
  3748. --------D-214301-----------------------------
  3749. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  3750.     AX = 4301h
  3751.     CX = new file attributes (see #1107)
  3752.     DS:DX -> ASCIZ filename
  3753. Return: CF clear if successful
  3754.         AX destroyed
  3755.     CF set on error
  3756.         AX = error code (01h,02h,03h,05h) (see #1366 at AH=59h)
  3757. Notes:    will not change volume label or directory attribute bits, but will
  3758.       change the other attribute bits of a directory (the directory
  3759.       bit must be cleared to successfully change the other attributes of a
  3760.       directory, but the directory will not be changed to a normal file as
  3761.       a result)
  3762.     MS-DOS 4.01 reportedly closes the file if it is currently open
  3763.     for security reasons, the Novell NetWare execute-only bit can never
  3764.       be cleared; the file must be deleted and recreated
  3765.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  3766.     DOS 5.0 SHARE will close the file if it is currently open in sharing-
  3767.       compatibility mode, otherwise a sharing violation critical error is
  3768.       generated if the file is currently open
  3769.     DR DOS 3.41/5.0 will silently ignore attempts to change the 'directory'
  3770.       attribute bit
  3771. SeeAlso: AX=4300h,AX=4311h,AX=7143h,INT 2F/AX=110Eh
  3772.  
  3773. Bitfields for file attributes:
  3774. Bit(s)    Description    (Table 1107)
  3775.  7    shareable (Novell NetWare)
  3776.  7    pending deleted files (Novell DOS, OpenDOS)
  3777.  6    unused
  3778.  5    archive
  3779.  4    directory
  3780.  3    volume label
  3781.     execute-only (Novell NetWare)
  3782.  2    system
  3783.  1    hidden
  3784.  0    read-only
  3785. --------D-214302-----------------------------
  3786. INT 21 - MS-DOS 7 - GET COMPRESSED FILE SIZE
  3787.     AX = 4302h
  3788.     DS:DX -> ASCIZ pathname for file or directory
  3789. Return: CF clear if successful
  3790.         ??? = compressed size of file/directory in bytes
  3791.     CF set on error
  3792.         AX = error code
  3793. Note:    on volumes which do not support compression, the returned size is the
  3794.       actual file size rounded up to the next cluster boundary
  3795. SeeAlso: AH=71h,AH=72h
  3796. --------O-214302-----------------------------
  3797. INT 21 - DR DOS 3.41+ internal - GET ACCESS RIGHTS
  3798.     AX = 4302h
  3799.     DS:DX -> ASCIZ pathname
  3800. Return: CF clear if successful
  3801.         CX = access rights (see #1108)
  3802.         AX = CX (DR DOS 5.0)
  3803.     CF set on error
  3804.         AX = error code
  3805. Desc:    Determine which operations the calling program may perform on a
  3806.       specified file without being required to provide a password.
  3807. Notes:    this protection scheme has been coordinated on all current Digital
  3808.       Research/Novell operating systems (DR DOS 3.41+, DRMDOS 5.x, and
  3809.       FlexOS 2+)
  3810.     this function is documented in DR DOS 6.0 and corresponds to the
  3811.       "Get/Set File Attributes" function, subfunction 2, documented in
  3812.       Concurrent DOS.
  3813.     only FlexOS actually uses the "execution" bits; DR DOS 3.41+ treats
  3814.       them as "read" bits.
  3815.     DR DOS 3.41-5.x only use bits 0-3.  Only DR DOS 6.0 using a
  3816.       DRMDOS 5.x security system allowing for users and groups uses bits
  3817.       4-11.
  3818. SeeAlso: AX=4303h,#3763 at INT 21/AH=11h
  3819.  
  3820. Bitfields for DR DOS file access rights:
  3821. Bit(s)    Description    (Table 1108)
  3822.  0    owner delete requires password
  3823.  1    owner execution requires password (FlexOS)
  3824.  2    owner write requires password
  3825.  3    owner read requires password
  3826.  4    group delete requires password
  3827.  5    group execution requires password (FlexOS)
  3828.  6    group write requires password
  3829.  7    group read requires password
  3830.  8    world delete requires password
  3831.  9    world execution requires password (FlexOS)
  3832.  10    world write requires password
  3833.  11    world read requires password
  3834. --------O-214303-----------------------------
  3835. INT 21 - DR DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  3836.     AX = 4303h
  3837.     CX = access rights
  3838.          bits 11-0: access rights (see #1108)
  3839.          bit 15: new password is to be set
  3840.     DS:DX -> ASCIZ pathname
  3841.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  3842. Return: CF clear if successful
  3843.     CF set on error
  3844.         AX = error code
  3845. Notes:    if the file is already protected, the old password must be added after
  3846.       the pathname, separated by a ";".  As with all password handling in
  3847.       DR DOS, the old password is processed by the kernel, not any
  3848.       applications or utilities making the call.
  3849.     this function is documented in DR DOS 6.0 and corresponds to the
  3850.       "Get/Set File Attributes" function, subfunction 3, documented in
  3851.       Concurrent DOS.
  3852. SeeAlso: AH=0Fh,AH=17h,AX=4302h"DR DOS",AX=4305h,AX=4454h
  3853. --------O-214304-----------------------------
  3854. INT 21 U - DR DOS 5.0-6.0 internal - GET ENCRYPTED PASSWORD
  3855.     AX = 4304h
  3856.     DS:DX -> ASCIZ filename
  3857.     ???
  3858. Return: CF clear if successful
  3859.         CX = AX = 0000h if no password assigned to file
  3860.     CF set on error
  3861.         AX = error code (see #1366 at AH=59h/BX=0000h)
  3862. Note:    this function is only supported by DR DOS 5.0 and 6.0 and DRMDOS 5.1
  3863. SeeAlso: AX=4303h,AX=4305h
  3864. --------O-214305-----------------------------
  3865. INT 21 U - DR DOS 5.0-6.0 internal - SET EXTENDED FILE ATTRIBUTES
  3866.     AX = 4305h
  3867.     DS:DX -> ASCIZ filename
  3868.     ???
  3869. Return: CF clear if successful
  3870.     CF set on error
  3871.         AX = error code (see #1366 at AH=59h/BX=0000h)
  3872. Desc:    this function allows the extended attributes, and optionally the
  3873.       encrypted password, of a file to be set.
  3874. Note:    this function is only supported by DR DOS 5.0 and 6.0 and DRMDOS 5.1
  3875. SeeAlso: AX=4304h,AX=4311h
  3876. --------O-214306-----------------------------
  3877. INT 21 O - DR DOS 6.0 - GET FILE OWNER
  3878.     AX = 4306h
  3879.     DS:DX -> ASCIZ filename
  3880. Return: CF clear if successful
  3881.         AX = CX = value set with AX=4307h
  3882.     CF set on error
  3883.         AX = error code (see #1366 at AH=59h/BX=0000h)
  3884. Note:    no longer supported by Novell DOS 7 / OpenDOS
  3885. SeeAlso: AX=4307h
  3886. --------O-214307-----------------------------
  3887. INT 21 O - DR DOS 6.0 - SET FILE OWNER
  3888.     AX = 4307h
  3889.     CX = ??? (owner identification number?)
  3890.     DS:DX -> ASCIZ filename
  3891. Return: CF clear if successful
  3892.     CF set on error
  3893.         AX = error code (see #1366 at AH=59h/BX=0000h)
  3894. Note:    no longer supported by Novell DOS 7 / OpenDOS
  3895. SeeAlso: AX=4306h
  3896. --------N-214310-----------------------------
  3897. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  3898.     AX = 4310h
  3899.     DS:DX -> ASCIZ filename
  3900. Return: CF clear if successful
  3901.         CH = attributes (see #1109)
  3902.     CF set on error
  3903.         AX = error code (01h,02h,03h,05h) (see #1366 at AH=59h/BX=0000h)
  3904. Note:    the filename may be a directory but must be on a VINES file service
  3905. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  3906. --------N-214311-----------------------------
  3907. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  3908.     AX = 4311h
  3909.     CH = new attributes (see #1109)
  3910.     DS:DX -> ASCIZ filename
  3911. Return: CF clear if successful
  3912.     CF set on error
  3913.         AX = error code (01h,02h,03h,05h) (see #1366 at AH=59h/BX=0000h)
  3914. Note:    the filename may be a directory but must be on a VINES file service
  3915. SeeAlso: AX=4301h,AX=4305h,AX=4310h,INT 2F/AX=110Eh
  3916.  
  3917. Bitfields for VINES extended file attributes:
  3918. Bit(s)    Description    (Table 1109)
  3919.  7    unused
  3920.  6    shareable
  3921.  5    execute-only
  3922.  4-0    unused
  3923. --------u-214321BX0000-----------------------
  3924. INT 21 - Q87, Q387 - INSTALLATION CHECK
  3925.     AX = 4321h
  3926.     BX = 0000h
  3927.     EAX = 87654321h (entire EAX value is required, not just AX)
  3928. Return: EAX = 12345678h if installed
  3929. Program: Q387 (renamed to Q87 as of v3.7) is a math coprocessor emulator from
  3930.       Quickware
  3931. Note:    this function is available only in virtual-86 mode in older versions;
  3932.       newer versions also provide it in MS Windows 16- and 32-bit protected
  3933.       mode
  3934. SeeAlso: AX=4321h/BX=0001h,AX=4321h/BX=0002h,INT 67/AX=4321h
  3935. --------u-214321BX0001-----------------------
  3936. INT 21 - Q87, Q387 - ENABLE EMULATOR
  3937.     AX = 4321h
  3938.     BX = 0001h
  3939.     EAX = 87654321h (entire EAX value is required, not just AX)
  3940. Desc:    enable the emulator by setting the CPU MSW's EM bit and updating
  3941.       the BIOS equipment list
  3942. Note:    this function is available only in virtual-86 mode in older versions;
  3943.       newer versions also provide it in MS Windows 16- and 32-bit protected
  3944.       mode
  3945. SeeAlso: AX=4321h/BX=0000h,AX=4321h/BX=0002h
  3946. --------u-214321BX0002-----------------------
  3947. INT 21 - Q87, Q387 - DISABLE EMULATOR
  3948.     AX = 4321h
  3949.     BX = 0002h
  3950.     EAX = 87654321h (entire EAX value is required, not just AX)
  3951. Desc:    disable the emulator by clearing the CPU MSW's EM bit and updating
  3952.       the BIOS equipment list
  3953. Note:    this function is available only in virtual-86 mode in older versions;
  3954.       newer versions also provide it in MS Windows 16- and 32-bit protected
  3955.       mode
  3956. SeeAlso: AX=4321h/BX=0000h,AX=4321h/BX=0001h
  3957. --------O-214380-----------------------------
  3958. INT 21 - Novell DOS 7 - UNDELETE PENDING DELETE FILE
  3959.     AX = 4380h
  3960.     ???
  3961. Return: ???
  3962. SeeAlso: AH=41h,AX=4381h
  3963. --------O-214381-----------------------------
  3964. INT 21 - Novell DOS 7 - PURGE PENDING DELETE FILE
  3965.     AX = 4381h
  3966.     ???
  3967. Return: ???
  3968. SeeAlso: AH=41h,AX=4380h
  3969. --------D-214400-----------------------------
  3970. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  3971.     AX = 4400h
  3972.     BX = handle
  3973. Return: CF clear if successful
  3974.         DX = device information word (see #1110)
  3975.         AX destroyed
  3976.     CF set on error
  3977.         AX = error code (01h,05h,06h) (see #1366 at AH=59h/BX=0000h)
  3978. Notes:    value in DH corresponds to high byte of device driver's attribute word
  3979.       if handle refers to a character device
  3980.     Novell NetWare reportedly does not return a drive number in bits 5-0
  3981.       for a disk file
  3982.     this function was not supported by Digital Research's DOS-Plus
  3983. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  3984.  
  3985. Bitfields for device information word:
  3986. Bit(s)    Description    (Table 1110)
  3987.  character device
  3988.   14    device driver can process IOCTL requests (see AX=4402h"DOS 2+")
  3989.   13    output until busy supported
  3990.   11    driver supports OPEN/CLOSE calls
  3991.    8    ??? (set by MS-DOS 6.2x KEYB)
  3992.    7    set (indicates device)
  3993.    6    EOF on input
  3994.    5    raw (binary) mode
  3995.    4    device is special (uses INT 29)
  3996.    3    clock device
  3997.    2    NUL device
  3998.    1    standard output
  3999.    0    standard input
  4000.  disk file
  4001.   15    file is remote (DOS 3.0+)
  4002.   14    don't set file date/time on closing (DOS 3.0+)
  4003.   11    media not removable
  4004.    8    (DOS 4 only) generate INT 24 if no disk space on write or read past
  4005.       end of file
  4006.    7    clear (indicates file)
  4007.    6    file has not been written
  4008.   5-0    drive number (0 = A:)
  4009. SeeAlso: INT 29
  4010. --------D-214401-----------------------------
  4011. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  4012.     AX = 4401h
  4013.     BX = handle (must refer to character device)
  4014.     DX = device information word (see #1110)
  4015.         (DH must be zero for DOS version prior to 6.x)
  4016. Return: CF clear if successful
  4017.     CF set on error
  4018.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4019. Note:    this function was not supported by Digital Research's DOS-Plus
  4020. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  4021. --------D-214402-----------------------------
  4022. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  4023.     AX = 4402h
  4024.     BX = file handle referencing character device
  4025.     CX = number of bytes to read
  4026.     DS:DX -> buffer
  4027. Return: CF clear if successful
  4028.         AX = number of bytes actually read
  4029.     CF set on error
  4030.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4031. Notes:    format of data is driver-specific
  4032.       (also see separate entries below for some specific cases)
  4033.     this function was not supported by Digital Research's DOS-Plus
  4034. SeeAlso: AX=4400h,AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  4035. --------N-214402-----------------------------
  4036. INT 21 - Network Driver Interface Specification (NDIS) 2.0.1 - PROTOCOL MANAGER
  4037.     AX = 4402h
  4038.     BX = file handle for device "PROTMAN$"
  4039.     CX = 000Eh (size of request block)
  4040.     DS:DX -> request block (see #1111,#1112,#1113,#1114,#1115,#1119,#1120)
  4041. Return: CF clear if successful
  4042.         AX = number of bytes actually read
  4043.     CF set on error
  4044.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4045. SeeAlso: AX=4402h"FTPSOFT"
  4046.  
  4047. Format of NDIS request block for GetProtocolManagerInfo:
  4048. Offset    Size    Description    (Table 1111)
  4049.  00h    WORD    01h
  4050.  02h    WORD    returned status (see #1121)
  4051.  04h    DWORD    returned pointer to structure representing parsed user config
  4052.  08h    DWORD    unused
  4053.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  4054. SeeAlso: #1112,#1113,#1114,#1115,#1116,#1117,#1118,#1119,#1120
  4055.  
  4056. Format of NDIS request block for RegisterModule:
  4057. Offset    Size    Description    (Table 1112)
  4058.  00h    WORD    02h
  4059.  02h    WORD    returned status (see #1121)
  4060.  04h    DWORD    pointer to module's common characteristics table (see #1122)
  4061.  08h    DWORD    pointer to list of modules to which the module is to be bound
  4062.  0Ch    WORD    unused
  4063. SeeAlso: #1111,#1113,#1114,#1115,#1116,#1117,#1118,#1119,#1120
  4064.  
  4065. Format of NDIS request block for BindAndStart:
  4066. Offset    Size    Description    (Table 1113)
  4067.  00h    WORD    03h
  4068.  02h    WORD    returned status (see #1121)
  4069.  04h    DWORD    caller's virtual address in FailingModules structure
  4070.  08h    DWORD    unused
  4071.  0Ch    WORD    unused
  4072. SeeAlso: #1111,#1112,#1114,#1115,#1116,#1117,#1118,#1119,#1120
  4073.  
  4074. Format of NDIS request block for GetProtocolManagerLinkage:
  4075. Offset    Size    Description    (Table 1114)
  4076.  00h    WORD    04h
  4077.  02h    WORD    returned status (see #1121)
  4078.  04h    DWORD    returned dispatch point
  4079.  08h    DWORD    unused
  4080.  0Ch    WORD    returned protocol manager DS
  4081. Note:    the dispatch point may be called as follows instead of using this IOCTL
  4082.     STACK: WORD  protocol manager DS
  4083.            DWORD pointer to request block
  4084.     Return: AX = returned status
  4085.         STACK popped
  4086. SeeAlso: #1111,#1112,#1113,#1115,#1116,#1117,#1118,#1119,#1120
  4087.  
  4088. Format of NDIS request block for GetProtocolIniPath:
  4089. Offset    Size    Description    (Table 1115)
  4090.  00h    WORD    05h
  4091.  02h    WORD    returned status (see #1121)
  4092.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  4093.  08h    DWORD    unused
  4094.  0Ch    WORD    buffer length
  4095. SeeAlso: #1111,#1112,#1113,#1114,#1116,#1117,#1118,#1119,#1120
  4096.  
  4097. Format of NDIS request block for RegisterProtocolManagerInfo:
  4098. Offset    Size    Description    (Table 1116)
  4099.  00h    WORD    06h
  4100.  02h    WORD    returned status (see #1121)
  4101.  04h    DWORD    pointer to structure containing parsed user config file
  4102.  08h    DWORD    unused
  4103.  0Ch    WORD    length of structure
  4104. SeeAlso: #1111,#1112,#1113,#1114,#1115,#1117,#1118,#1119,#1120
  4105.  
  4106. Format of NDIS request block for InitAndRegister:
  4107. Offset    Size    Description    (Table 1117)
  4108.  00h    WORD    07h
  4109.  02h    WORD    returned status (see #1121)
  4110.  04h    DWORD    unused
  4111.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  4112.  0Ch    WORD    unused
  4113. SeeAlso: #1111,#1112,#1113,#1114,#1115,#1116,#1118,#1119,#1120
  4114.  
  4115. Format of NDIS request block for UnbindAndStop:
  4116. Offset    Size    Description    (Table 1118)
  4117.  00h    WORD    08h
  4118.  02h    WORD    returned status (see #1121)
  4119.  04h    DWORD    failing modules as for BindAndStart
  4120.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  4121.         if 0000h:0000h, terminate a set of previously dynamically
  4122.           bound protocol modules
  4123.  0Ch    WORD    unused
  4124. SeeAlso: #1111,#1112,#1113,#1114,#1115,#1116,#1117,#1119,#1120
  4125.  
  4126. Format of NDIS request block for BindStatus:
  4127. Offset    Size    Description    (Table 1119)
  4128.  00h    WORD    09h
  4129.  02h    WORD    returned status (see #1121)
  4130.  04h    DWORD    must be 0000h:0000h
  4131.         on return, points to root tree
  4132.  08h    DWORD    0000h:0000h
  4133.  0Ch    WORD    unused under DOS
  4134. SeeAlso: #1111,#1112,#1113,#1114,#1115,#1116,#1117,#1118,#1120
  4135.  
  4136. Format of NDIS request block for RegisterStatus:
  4137. Offset    Size    Description    (Table 1120)
  4138.  00h    WORD    0Ah
  4139.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see #1121)
  4140.  04h    DWORD    0000h:0000h
  4141.  08h    DWORD    pointer to 16-byte ASCIZ module name
  4142.  0Ch    WORD    0000h
  4143. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  4144. SeeAlso: #1111,#1112,#1113,#1114,#1115,#1116,#1117,#1118,#1119
  4145.  
  4146. (Table 1121)
  4147. Values for NDIS status code:
  4148.  0000h    success
  4149.  0001h    wait for release--protocol has retained control of the data buffer
  4150.  0002h    request queued
  4151.  0003h    frame not recognized
  4152.  0004h    frame rejected
  4153.  0005h    frame should be forwarded
  4154.  0006h    out of resource
  4155.  0007h    invalid parameter
  4156.  0008h    invalid function
  4157.  0009h    not supported
  4158.  000Ah    hardware error
  4159.  000Bh    transmit error
  4160.  000Ch    unrecognized destination
  4161.  000Dh    buffer too small
  4162.  0020h    already started
  4163.  0021h    binding incomplete
  4164.  0022h    driver not initialized
  4165.  0023h    hardware not found
  4166.  0024h    hardware failure
  4167.  0025h    configuration failure
  4168.  0026h    interrupt conflict
  4169.  0027h    MAC incompatible
  4170.  0028h    initialization failed
  4171.  0029h    no binding
  4172.  002Ah    network may be disconnected
  4173.  002Bh    incompatible OS version
  4174.  002Ch    already registered
  4175.  002Dh    path not found
  4176.  002Eh    insufficient memory
  4177.  002Fh    info not found
  4178.  00FFh    general failure
  4179.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  4180.  
  4181. Format of NDIS common characteristics table:
  4182. Offset    Size    Description    (Table 1122)
  4183.  00h    WORD    size of table in bytes
  4184.  02h    BYTE    NDIS major version
  4185.  03h    BYTE    NDIS minor version
  4186.  04h    WORD    reserved
  4187.  06h    BYTE    module major version
  4188.  07h    BYTE    module minor version
  4189.  08h    DWORD    module function flag bits
  4190.         bit 0: binding at upper boundary supported
  4191.         bit 1: binding at lower boundary supported
  4192.         bit 2: dynamically bound
  4193.         bits 3-31 reserved, must be 0
  4194.  0Ch 16 BYTEs    ASCIZ module name
  4195.  1Ch    BYTE    upper boundary protocol level (see #1123)
  4196.  1Dh    BYTE    upper boundary interface type
  4197.         for MACs: 1 = MAC
  4198.         for data links and transports: to be defined
  4199.         for session: 1 = NCB
  4200.         any level: 0 = private (ISV-defined)
  4201.  1Eh    BYTE    lower boundary protocol level (see #1123)
  4202.  1Fh    BYTE    lower boundary interface type
  4203.         same as offset 1Dh
  4204.  20h    WORD    module ID filled in by protocol manager
  4205.  22h    WORD    module DS
  4206.  24h    DWORD    system request entry point
  4207.  28h    DWORD    pointer to service-specific characteristics (see #1125,#1127)
  4208.         0000h:0000h if none
  4209.  2Ch    DWORD    pointer to service-specific status, or 0000h:0000h if none
  4210.           (see #1128)
  4211.  30h    DWORD    pointer to upper dispatch table (see #1124)
  4212.         0000h:0000h if none
  4213.  34h    DWORD    pointer to lower dispatch table (see #1124)
  4214.         0000h:0000h if none
  4215.  38h  2 DWORDs    reserved, must be 0
  4216. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  4217.       interpreted as 01h
  4218.  
  4219. (Table 1123)
  4220. Values for NDIS boundary protocol level:
  4221.  00h    physical
  4222.  01h    Media Access Control
  4223.  02h    Data link
  4224.  03h    network
  4225.  04h    transport
  4226.  05h    session
  4227.  FFh    not specified
  4228.  
  4229. Format of NDIS dispatch table:
  4230. Offset    Size    Description    (Table 1124)
  4231.  00h    DWORD    -> common characteristics table (see #1122)
  4232.  04h  4 BYTEs    ???
  4233.  08h    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  4234.  0Ch    DWORD    -> ??? function (called with 10 bytes of stack arguments)
  4235.  10h    DWORD    -> ??? function (called with 16 bytes of stack arguments)
  4236.  14h    DWORD    -> ??? function (called with 4 bytes of stack arguments)
  4237.  18h    DWORD    -> ??? function (called with 18 bytes of stack arguments)
  4238.  1Ch    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  4239.  
  4240. Format of MAC Service-Specific Characteristics Table:
  4241. Offset    Size    Description    (Table 1125)
  4242.  00h    WORD    length of table in bytes
  4243.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  4244.           "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  4245.           "HDLC", or "ISDN"
  4246.  12h    WORD    length of station addresses in bytes
  4247.  14h 16 BYTEs    permanent station address
  4248.  24h 16 BYTEs    current station address
  4249.  34h    DWORD    current functional adapter address (00000000h if none)
  4250.  38h    DWORD    pointer to multicast address list
  4251.  3Ch    DWORD    link speed in bits/sec
  4252.  40h    DWORD    service flags (see #1126)
  4253.  44h    WORD    maximum frame size which may be both sent and received
  4254.  46h    DWORD    total transmit buffer capacity in bytes
  4255.  4Ah    WORD    transmit buffer allocation block size in bytes
  4256.  4Ch    DWORD    total receive buffer capacity in bytes
  4257.  50h    WORD    receive buffer allocation block size in bytes
  4258.  52h  3 BYTEs    IEEE vendor code
  4259.  55h    BYTE    vendor adapter code
  4260.  56h    DWORD    pointer to ASCIZ vendor adapter description
  4261.  5Ah    WORD    IRQ used by adapter
  4262.  5Ch    WORD    transmit queue depth
  4263.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  4264.  60h  N BYTEs    vendor-specific info
  4265. SeeAlso: #1127
  4266.  
  4267. Bitfields for service flags:
  4268. Bit(s)    Description    (Table 1126)
  4269.  0    supports broadcast
  4270.  1    supports multicast
  4271.  2    supports functional/group addressing
  4272.  3    supports promiscuous mode
  4273.  4    station address software settable
  4274.  5    statistics always current
  4275.  6    supports InitiateDiagnostics
  4276.  7    supports loopback
  4277.  8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  4278.     indications
  4279.  9    supports IBM source routing
  4280.  10    supports MAC reset
  4281.  11    supports Open/Close adapter
  4282.  12    supports interrupt request
  4283.  13    supports source routing bridge
  4284.  14    supports GDT virtual addresses (OS/2 version)
  4285.  15    multiple TransferDatas allowed durign a single indication
  4286.  16    MAC normally sets FrameSize = 0 in ReceiveLookahead
  4287.  17-31    reserved, must be 0
  4288.  
  4289. Format of NetBIOS Service-Specific Characteristics Table:
  4290. Offset    Size    Description    (Table 1127)
  4291.  00h    WORD    length of table in bytes
  4292.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  4293.  12h    WORD    NetBIOS module code
  4294.  14h  N BYTEs    vendor-specific info
  4295. SeeAlso: #1125
  4296.  
  4297. Format of MAC Service-Specific Status Table:
  4298. Offset    Size    Description    (Table 1128)
  4299.  00h    WORD    length of table in bytes
  4300.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  4301.         (FFFFFFFFh = never)
  4302.  06h    DWORD    MAC status bits (see #1129)
  4303.  0Ah    WORD    current packet filter flags (see #1130)
  4304.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  4305.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  4306.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  4307.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  4308.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  4309.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  4310.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  4311.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  4312.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  4313.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  4314.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  4315.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  4316.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  4317.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  4318.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  4319.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  4320.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  4321.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  4322.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  4323.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  4324.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  4325.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  4326.  64h  N BYTEs    vendor-specific info
  4327.  
  4328. Bitfields for MAC status bits:
  4329. Bit(s)    Description    (Table 1129)
  4330.  0-2    operational status
  4331.     000 hardware not installed
  4332.     001 hardware failed startup diagnostics
  4333.     010 hardware configuration problem
  4334.     011 hardware fault
  4335.     100 operating marginally due to soft faults
  4336.     101 reserved
  4337.     110 reserved
  4338.     111 hardware fully operational
  4339.  3    MAC bound
  4340.  4    MAC open
  4341.  5    diagnostics in progress
  4342.  6-31    reserved
  4343.  
  4344. Bitfields for packet filter flags:
  4345. Bit(s)    Description    (Table 1130)
  4346.  0    directed/multicast or group/functional
  4347.  1    broadcast
  4348.  2    promiscuous
  4349.  3    all source routing
  4350.  4-15    reserved, must be zero
  4351. --------D-214402-----------------------------
  4352. INT 21 U - MS-DOS 7.0 - CONFIG$ device - GET CONFIGURATION INFORMATION
  4353.     AX = 4402h
  4354.     BX = file handle for character device "CONFIG$"
  4355.     CX = number of bytes to read (at least 5)
  4356.     DS:DX -> buffer for ??? data (see #1131)
  4357. Return: CF clear if successful
  4358.         AX = number of bytes actually read
  4359.     CF set on error
  4360.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4361. SeeAlso: AX=4403h"CONFIG$"
  4362.  
  4363. Format of MS-DOS 7.0 CONFIG$ ??? data:
  4364. Offset    Size    Description    (Table 1131)
  4365.  00h    WORD    ??? (0000h)
  4366.  02h    WORD    ??? (0000h or value read from IO.SYS segment 70h)
  4367.  04h    BYTE    ??? (value read from IO.SYS segment 70h)
  4368. --------I-214402-----------------------------
  4369. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  4370.     AX = 4402h
  4371.     BX = handle for character device "GDMS"
  4372.     CX = number of bytes to read (>= 4)
  4373.     DS:DX -> buffer (see #1132)
  4374. Return: CF set on error
  4375.         AX = error code (see #1366 at AH=59h/BX=0000h)
  4376.     CF clear if successful
  4377.         AX = number of bytes read
  4378.  
  4379. Format of System 36/38 emulator returned data:
  4380. Offset    Size    Description    (Table 1132)
  4381.  00h  4 BYTEs    ???
  4382.  04h    DWORD    pointer to ???
  4383.  08h  4 BYTEs    ???
  4384. --------m-214402-----------------------------
  4385. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  4386.     AX = 4402h
  4387.     BX = handle for device "LA$TBYTE"
  4388.     CX = 0004h
  4389.     DS:DX -> DWORD to hold address of 39-byte table of ???
  4390. Return: CF set on error
  4391.         AX = error code (see #1366 at AH=59h/BX=0000h)
  4392.     CF clear if successful
  4393.         AX = number of bytes read
  4394. Program: LASTBYTE.SYS is part of the shareware "The Last Byte" memory
  4395.       management package by Key Software Products
  4396. SeeAlso: AX=4402h"HIGHUMM"
  4397. --------m-214402-----------------------------
  4398. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  4399.     AX = 4402h
  4400.     BX = handle for device "KSP$UMM"
  4401.     CX = 0004h
  4402.     DS:DX -> DWORD to hold entry point (see #1133)
  4403. Return: CF set on error
  4404.         AX = error code (see #1366 at AH=59h/BX=0000h)
  4405.     CF clear if successful
  4406.         AX = number of bytes read
  4407. Program: HIGHUMM.SYS is part of the shareware "The Last Byte" memory
  4408.       management package by Key Software Products
  4409. SeeAlso: AX=4402h"LASTBYTE"
  4410.  
  4411. (Table 1133)
  4412. Call HIGHUMM.SYS entry point with:
  4413.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  4414.         DX = size in paragraphs
  4415.         Return: BX = segment number (if successful)
  4416.             DX = size of requested block/size of largest block
  4417.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  4418.         DX = segment number of UMB
  4419.     AH = 02h request a bank-switched memory block
  4420.         DX = size in paragraphs
  4421.         Return: BX = segment number (if successful)
  4422.             DX = size of requested block/size of largest block
  4423.     AH = 03h release a bank-switched memory block
  4424.         DX = segment number
  4425.     AH = 04h transfer data to/from high memory
  4426.         DS:SI -> source
  4427.         ES:DI -> destination
  4428.         CX = length in bytes
  4429.         Note: enables bank-switched memory, does the copy, then disables
  4430.         bank-switched memory
  4431.     AH = 05h get a word from bank-switched memory
  4432.         ES:DI -> word to read
  4433.         Return: DX = word
  4434.     AH = 06h put a word to bank-switched memory
  4435.         ES:DI -> word to write
  4436.         DX = word
  4437.     AH = 07h put a byte to bank-switched memory
  4438.         ES:DI -> byte to write
  4439.         DL = byte
  4440.     AH = 08h enable bank-switched memory
  4441.         DS:SI -> 6-byte status save area
  4442.     AH = 09h disable bank-switched memory
  4443.         DS:SI -> 6-byte save area from enable call (AH=08h)
  4444.     AH = 0Ah assign name to UMB or high bank-switched block
  4445.         DX = segment number
  4446.         DS:SI -> 8-byte blank-padded name
  4447.     AH = 0Bh locate UMB block by name
  4448.         DS:SI -> 8-byte blank-padded name
  4449.         Return: BX = segment number (if successful)
  4450.             DX = size of block
  4451.     AH = 0Ch locate bank-switched block by name
  4452.         DS:SI -> 8-byte blank-padded name
  4453.         Return: BX = segment number (if successful)
  4454.             DX = size of block
  4455. Return: AX = status code
  4456.         0001h successful
  4457.         0000h failed
  4458.         BL = error code
  4459.             80h not implemented
  4460.             B0h insufficient memory, smaller block available
  4461.             B1h insufficient memory, no blocks available
  4462.             B2h invalid segment number
  4463. Note:    only functions 00h and 01h are always available; the remaining
  4464.       functions are only enabled if the proper commandline switch is given
  4465. --------c-214402-----------------------------
  4466. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - GET CACHE STATUS
  4467.     AX = 4402h
  4468.     BX = file handle for device "SMARTAAR"
  4469.     CX = number of bytes to read (min 28h)
  4470.     DS:DX -> buffer for status record (see #1134)
  4471. Return: CF clear if successful
  4472.         AX = number of bytes actually read
  4473.     CF set on error
  4474.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4475. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  4476.       interface, but does not do so correctly, often hanging the system;
  4477.       one should use the SmartDrive v4.x or NCache private interfaces
  4478.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  4479. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  4480.  
  4481. Format of SMARTDRV status record:
  4482. Offset    Size    Description    (Table 1134)
  4483.  00h    BYTE    write-through flag (always 01h)
  4484.  01h    BYTE    writes should be buffered (always 00h)
  4485.  02h    BYTE    cache enabled if 01h
  4486.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  4487.  04h    WORD    clock ticks between cache flushes (currently unused)
  4488.  06h    BYTE    cache contains locked tracks if nonzero
  4489.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  4490.  08h    BYTE    cache full track writes if nonzero
  4491.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  4492.  0Ah    DWORD    original INT 13 vector
  4493.  0Eh    BYTE    minor version number
  4494.  0Fh    BYTE    major version number
  4495.  10h    WORD    unused
  4496.  12h    WORD    sectors read            \
  4497.  14h    WORD    sectors already in cache     > may be scaled rather than
  4498.  16h    WORD    sectors already in track buffer /  absolute counts
  4499.  18h    BYTE    cache hit rate in percent
  4500.  19h    BYTE    track buffer hit rate in percent
  4501.  1Ah    WORD    total tracks in cache
  4502.  1Ch    WORD    number of tracks in use
  4503.  1Eh    WORD    number of locked tracks
  4504.  20h    WORD    number of dirty tracks
  4505.  22h    WORD    current cache size in 16K pages
  4506.  24h    WORD    original (maximum) cache size in 16K pages
  4507.  26h    WORD    minimum cache size in 16K pages
  4508.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  4509. --------d-214402-----------------------------
  4510. INT 21 - CD-ROM device driver - IOCTL INPUT
  4511.     AX = 4402h
  4512.     BX = file handle referencing character device for CD-ROM driver
  4513.     CX = number of bytes to read
  4514.     DS:DX -> control block (see #1136)
  4515. Return: CF clear if successful
  4516.         AX = number of bytes actually read
  4517.     CF set on error
  4518.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4519. Notes:    the data returned depends on the first byte of the control block
  4520.       (two bytes for functions 01h/07h/0Bh, see #1136); the remainder of
  4521.       the control block is filled by the driver
  4522.     some device drivers support several subunits (that is more than one
  4523.       drive) but it is not possible to distinguish between them with this
  4524.       function; use INT 2F/AX=1510h or INT 2F/AX=0802h instead
  4525.     under Windows95, the "mscd$$$$" device cannot be opened so you cannot
  4526.       obtain the handle required by this function: use INT 2F/AX=1510h
  4527.       or INT 2F/AX=0802h instead
  4528. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h,INT 2F/AX=1510h
  4529.  
  4530. (Table 1135)
  4531. Values for CD-ROM data being requested:
  4532.  00h    device driver header address
  4533.  01h    drive head location
  4534.  02h    reserved
  4535.  03h    error statistics
  4536.  04h    audio channel info
  4537.  05h    raw drive bytes (uninterpreted and device-specific)
  4538.  06h    device status
  4539.  07h    sector size
  4540.  08h    volume size
  4541.  09h    media change status
  4542.  0Ah    audio disk info
  4543.  0Bh    audio track info
  4544.  0Ch    audio Q-Channel info
  4545.  0Dh    audio sub-channel info
  4546.  0Eh    UPC code
  4547.  0Fh    audio status info
  4548.  
  4549. Format of CD-ROM control block:
  4550. Offset    Size    Description    (Table 1136)
  4551.  00h    BYTE    data being requested (see #1135)
  4552. ---function 00h---
  4553.  01h    DWORD    device driver header address (see also AH=52h,#1332)
  4554. ---function 01h---
  4555.  01h    BYTE    (call) addressing mode
  4556.         00h HSG
  4557.         01h Red Book
  4558.  02h    DWORD    current location of drive's head
  4559.         logical sector number in HSG mode
  4560.         frame/second/minute/unused in Red Book mode
  4561.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  4562. ---function 03h---
  4563.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  4564. ---function 04h---
  4565.  01h    BYTE    input channel (0-3) for output channel 0
  4566.  02h    BYTE    volume for output channel 0
  4567.  03h    BYTE    input channel (0-3) for output channel 1
  4568.  04h    BYTE    volume for output channel 1
  4569.  05h    BYTE    input channel (0-3) for output channel 2
  4570.  06h    BYTE    volume for output channel 2
  4571.  07h    BYTE    input channel (0-3) for output channel 3
  4572.  08h    BYTE    volume for output channel 3
  4573. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  4574.       right prime; a volume of 00h is off
  4575.     the default setting is for each input channel to be assigned to the
  4576.       same-numbered output channel at full (FFh) volume
  4577. ---function 05h---
  4578.  01h    BYTE    number of bytes read
  4579.  02h 128 BYTEs    buffer for drive bytes
  4580. ---function 06h---
  4581.  01h    DWORD    device parameters (see #1137)
  4582. ---function 07h---
  4583.  01h    BYTE    (call) read mode
  4584.         00h cooked
  4585.         01h raw
  4586.  02h    WORD    (return) sector size in bytes
  4587. ---function 08h---
  4588.  01h    DWORD    volume size in sectors
  4589. BUGS:    Aztech device driver v1.10 and v1.27 (at least) return the last sector
  4590.       number, i.e. total number of sectors - 1
  4591.     Windows95 returns the total number of sectors + 150 (see the Red Book
  4592.       to HSG conversion formula at function 01h to understand why this
  4593.       happens)
  4594. ---function 09h---
  4595.  01h    BYTE    media change status
  4596.         00h don't know
  4597.         01h media unchanged
  4598.         FFh media has been changed
  4599. ---function 0Ah---
  4600.  01h    BYTE    lowest audio track number
  4601.  02h    BYTE    highest audio track number
  4602.  03h    DWORD    start address of lead-out track (Red Book format)
  4603. --function 0Bh---
  4604.  01h    BYTE    (call) track number
  4605.  02h    DWORD    starting point of track (Red Book format)
  4606.  06h    BYTE    track control info
  4607.         bits 15,14,12: track type (notice: bits not contiguous!)
  4608.             000 two audio channels, no pre-emphasis
  4609.             001 two audio channels with pre-emphasis
  4610.             010 data track
  4611.             100 four audio channels, no pre-emphasis
  4612.             101 four audio channels with pre-emphasis
  4613.             other reserved
  4614.         bit 13: digital copy permitted
  4615. ---function 0Ch---
  4616.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  4617.  02h    BYTE    track number
  4618.  03h    BYTE    point or index
  4619.  04h    BYTE    minute    \
  4620.  05h    BYTE    second     > running time within track
  4621.  06h    BYTE    frame    /
  4622.  07h    BYTE    zero
  4623.  08h    BYTE    "AMIN" or "PMIN"     \
  4624.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  4625.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  4626. ---function 0Dh---
  4627.  01h    DWORD    starting frame address (Red Book format)
  4628.  05h    DWORD    transfer address
  4629.  09h    DWORD    number of sectors to read
  4630. Note:    copies 96 bytes of sub-channel info per sector into buffer
  4631. ---function 0Eh---
  4632.  01h    BYTE    CONTROL and ADR byte
  4633.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  4634.  09h    BYTE    zero
  4635.  0Ah    BYTE    "AFRAME"
  4636. ---function 0Fh---
  4637.  ??? documentation not yet available
  4638.  01h    WORD    pause status (0000h not paused, 0001h paused)
  4639.  03h    DWORD    audio play start address
  4640.  07h    DWORD    ??? audio play length or end address
  4641.  
  4642. Bitfields for CD-ROM device parameters:
  4643. Bit(s)    Description    (Table 1137)
  4644.  0    door open
  4645.  1    door unlocked
  4646.  2    supports raw reading in addition to cooked
  4647.  3    writable
  4648.  4    can play audio/video tracks
  4649.  5    supports interleaving
  4650.  6    reserved
  4651.  7    supports prefetch requests
  4652.  8    supports audio channel control
  4653.  9    supports Red Book addressing in addition to HSG
  4654.  10    audio is playing
  4655.  11    no disk in drive
  4656.  12    supports R-W subchannels
  4657. --------m-214402-----------------------------
  4658. INT 21 - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  4659.     AX = 4402h
  4660.     BX = file handle for device "QEMM386$"
  4661.     CX = 0004h
  4662.     DS:DX -> DWORD buffer for API entry point
  4663. Return: CF clear if successful
  4664.         buffer filled (refer to INT 67/AH=3Fh for entry point parameters)
  4665.     CF set on error
  4666.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4667. Note:    Quarterdeck recently (June 1993) documented this function, but the
  4668.       documentation incorrectly states that it is only available for
  4669.       QEMM 6+
  4670. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  4671. --------Q-214402-----------------------------
  4672. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  4673.     AX = 4402h
  4674.     BX = file handle for device "HOOKROM$"
  4675.     CX = 0004h
  4676.     DS:DX -> DWORD buffer for address of hooked vector table (see #1138)
  4677. Return: CF clear if successful
  4678.         DS:DX buffer filled
  4679.     CF set on error
  4680.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4681. SeeAlso: AX=4402h/SF=01h
  4682.  
  4683. Format of HOOKROM.SYS hooked vector table entry:
  4684. Offset    Size    Description    (Table 1138)
  4685.  00h  5 BYTEs    FAR jump to actual interrupt handler
  4686.         (end of table if first byte is not EAh)
  4687.  05h    BYTE    interrupt vector number
  4688. --------d-214402-----------------------------
  4689. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  4690.     AX = 4402h
  4691.     BX = file handle for device "SCSIMGR$"
  4692.     CX = 0004h or 0005h (refer to notes below)
  4693.     DS:DX -> buffer for result (see #1139), set to zeros before call
  4694. Return: CF clear if successful
  4695.         AX = 0004h or 0005h (refer to notes below)
  4696.     CF set on error
  4697.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4698. Notes:    the variant of the call requesting five bytes is an UNDOCUMENTED
  4699.       extension supported by Adaptec's ASPI2DOS.SYS, ASPI4DOS.SYS, and
  4700.       ASPI7DOS.SYS; if made of a host manager which does not support the
  4701.       variant, only four bytes will be returned.  If the variant is
  4702.       supported, Adaptec's WINASPI.DLL assumes that the host manager is
  4703.       an "advanced" one which operates in either real or protected mode
  4704.       (and thus does not require a DPMI INT 31/AX=0301h call to be invoked
  4705.       from protected mode).     Support of the five-byte variant also appears
  4706.       to imply that an advanced ASPI host manager uses no temporary
  4707.       storage space except the SRB (see #1141) and the stack, and that it
  4708.       is fully reentrant.
  4709.     if called with a standard request for four bytes, even Adaptec's
  4710.       advanced drivers return only the requested four bytes containing the
  4711.       ASPI entry point address
  4712.     the function address is called with the address of a SCSI Request
  4713.       Block (see #1141) on the stack and the caller must clean up the
  4714.       stack
  4715. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  4716.  
  4717. Format of ASPI IOCTL result:
  4718. Offset    Size    Description    (Table 1139)
  4719.  00h    DWORD    function address
  4720.  04h    BYTE    number of SCSI host adapters supported by host manager
  4721.  
  4722. (Table 1140)
  4723. Values for ASPI request number:
  4724.  00h    "HA_INQ"    host adapter inquiry / extended host adapter inquiry
  4725.  01h    "GET_TYPE"    get device type
  4726.  02h    "EXEC_SIO"    execute SCSI I/O
  4727.  03h    "ABORT_SRB"    abort SRB
  4728.  04h    "RESET_DEV"    reset SCSI device
  4729.  05h    "SET_HAPRMS"    set host adapter parameters
  4730.  06h    get disk drive information
  4731.  
  4732. Format of SCSI Request Block (64 bytes):
  4733. Offset    Size    Description    (Table 1141)
  4734.  00h    BYTE    request number (see #1140)
  4735.  01h    BYTE    request status (see #1142)
  4736.  02h    BYTE    host adapter ID
  4737.  03h    BYTE    request flags (see #1143)
  4738.  04h    DWORD    reserved (0)
  4739. ---request 00h---
  4740.  08h    BYTE    (ret) number of host adapters
  4741.  09h    BYTE    (ret) target adapter ID
  4742.  0Ah 16 BYTEs    (ret) SCSI manager ID
  4743.  1Ah 16 BYTEs    (ret) host adapter ID
  4744.  2Ah 16 BYTEs    (ret) host adapter-unique parameters
  4745. ---extended request 00h---
  4746.  04h  2 BYTEs    (call) extended request signature 55h AAh
  4747.         (ret) if extended request supported, reply AAh 55h
  4748.  06h    WORD    (call) length of extended buffer at offset 3Ah
  4749.         (ret) number of bytes returned in extended buffer
  4750.  08h    BYTE    (ret) number of host adapters
  4751.  09h    BYTE    (ret) target adapter ID
  4752.  0Ah 16 BYTEs    (ret) SCSI manager ID
  4753.  1Ah 16 BYTEs    (ret) host adapter ID
  4754.  2Ah 16 BYTEs    (ret) host adapter-unique parameters
  4755.  3Ah  N BYTEs    extended buffer
  4756.         3Ah    WORD    features (see #1144)
  4757.         3Ch    WORD    maximum scatter/gather list length
  4758.         3Eh    DWORD    maximum SCIS data transfer size (0 = unlimited)
  4759. ---request 01h---
  4760.  08h    BYTE    target ID
  4761.  09h    BYTE    logical unit number
  4762.  0Ah    BYTE    (ret) device type (see #1147)
  4763. ---request 02h---
  4764.  08h    BYTE    target ID
  4765.  09h    BYTE    logical unit number
  4766.  0Ah    DWORD    data allocation length
  4767.         (ret) residual byte length (if supported and requested)
  4768.  0Eh    BYTE    sense allocation length
  4769.  0Fh    DWORD    data buffer pointer
  4770.  13h    DWORD    next request pointer (for linking)
  4771.  17h    BYTE    CDB length
  4772.  18h    BYTE    (ret) host adapter status (see #1141)
  4773.  19h    BYTE    (ret) target status (see #1146)
  4774.  1Ah    DWORD    post routine address (see #1153)
  4775.  1Eh    WORD    real mode Post DS
  4776.  20h    DWORD    SRB pointer
  4777.  24h    WORD    reserved
  4778.  26h    DWORD    SRB physical address
  4779.  2Ah 22 BYTEs    SCSIMGR$ workspace
  4780.  40h  N BYTEs    CCB, including sense data (20-24 bytes)
  4781. ---request 03h---
  4782.  08h    DWORD    address of SRB to abort
  4783. ---request 04h---
  4784.  08h    BYTE    target ID
  4785.  09h    BYTE    logical unit number
  4786.  0Ah 14 BYTEs    reserved
  4787.  18h    BYTE    (ret) host adapter status (see #1145)
  4788.  19h    BYTE    (ret) target status (see #1146)
  4789.  1Ah    DWORD    post routine address
  4790.  1Eh 34 BYTEs    workspace
  4791. ---request 05h---
  4792.  08h 16 BYTEs    host adapter-unique parameters
  4793. ---request 06h---
  4794.  08h    BYTE    target ID
  4795.  09h    BYTE    logical unit number
  4796.  0Ah    BYTE    disk drive flags (see #1148)
  4797.  0Bh    BYTE    INT 13h drive number
  4798.  0Ch    BYTE    preferred head number translation
  4799.  0Dh    BYTE    preferred sector size translation
  4800.  0Eh 10 BYTEs    reserved
  4801. SeeAlso: #1149
  4802.  
  4803. (Table 1142)
  4804. Values for ASPI request status:
  4805.  00h    not done yet
  4806.  01h    completed successfully
  4807.  02h    aborted by host
  4808.  04h    SCSI I/O error
  4809.  80h    invalid
  4810.  81h    no adapter
  4811.  82h    no device attached
  4812.  else    status
  4813. SeeAlso: #1141
  4814.  
  4815. Bitfields for ASPI request flags:
  4816. Bit(s)    Description    (Table 1143)
  4817.  0    posting enabled
  4818.  1    linking enabled
  4819.  2    residual byte length reported in Data Allocation Length field
  4820.  3    transfer from SCSI target to host
  4821.  4    transfer from host to SCSI target
  4822.  5    scatter/gather
  4823.  7-6    reserved
  4824. Note:    no data is transferred if both bits 3 and 4 are set; if neither is
  4825.       set, the direction is determined by the SCSI command
  4826. SeeAlso: #1141
  4827.  
  4828. Bitfields for ASPI extended features:
  4829. Bit(s)    Description    (Table 1144)
  4830.  0    scatter/gather supported
  4831.  1    residual byte length reported
  4832.  2    Wide SCSI 16 host adapter
  4833.  3    Wide SCSI 32 host adapter
  4834.  15-4    reserved
  4835. SeeAlso: #1141
  4836.  
  4837. (Table 1145)
  4838. Values for host adapter status:
  4839.  00h    no error detected
  4840.  11h    select timeout
  4841.  12h    data overrun
  4842.  13h    bus error
  4843.  14h    bus failure
  4844.  
  4845. (Table 1146)
  4846. Values for target status:
  4847.  00h    no status
  4848.  02h    sense data stored in SRB
  4849.  08h    target busy
  4850.  18h    reservation error
  4851.  
  4852. (Table 1147)
  4853. Values for device type:
  4854.  00h    disk drive
  4855.  01h    tape drive (streamer)
  4856.  02h    printer
  4857.  03h    processor
  4858.  04h    WORM drive
  4859.  05h    CD-ROM drive
  4860.  06h    scanner
  4861.  07h    optical drive
  4862.  08h    autochanger
  4863.  09h    communications device
  4864.  
  4865. (Table 1148)
  4866. Values for disk drive flags:
  4867.  00h    no INT 13 access
  4868.  01h    INT 13 with DOS access
  4869.  02h    INT 13 without DOS access
  4870.  03h    invalid flags
  4871.  
  4872. Format of CCB:
  4873. Offset    Size    Description    (Table 1149)
  4874.  00h    BYTE    command code (see #1150)
  4875.  01h    BYTE    flags
  4876.         bits 4-0: vary by function
  4877.         bits 7-5: logical unit number
  4878.  02h    BYTE    "adr_1"
  4879.  03h    BYTE    "adr_0"
  4880.  04h    BYTE    length
  4881.  05h    BYTE    control
  4882.     ...
  4883.  06h/0Ah 14 BYTEs buffer for sense data (see #1151)
  4884. SeeAlso: #1141
  4885.  
  4886. (Table 1150)
  4887. Values for CCB command code:
  4888.  00h    test unit ready
  4889.  01h    rewind
  4890.  03h    request sense data
  4891.  05h    get block size limits
  4892.  08h    Group 0 read
  4893.  0Ah    Group 0 write
  4894.  10h    write file marks
  4895.  11h    SCSI Space (set position?)
  4896.  12h    SCSI Inquire
  4897.  15h    set mode information
  4898.  16h    reserve SCSI device
  4899.  17h    release SCSI device
  4900.  19h    erase
  4901.  1Ah    request mode information
  4902.  1Bh    load/unload media
  4903.  1Dh    request target self-check
  4904.  24h    set window parameters
  4905.  25h    get window parameters
  4906.  28h    Group 1 read
  4907.  2Ah    Group 1 write
  4908.  31h    document feeder control
  4909.  34h    get scan data status
  4910. ---vendor-specific commands---
  4911.  D3h    get document feeder status
  4912.  D4h    set document feeder mode
  4913.  
  4914. Format of sense data:
  4915. Offset    Size    Description    (Table 1151)
  4916.  00h    BYTE    error code (bit 7 set if valid)
  4917.  01h    BYTE    segment number
  4918.  02h    BYTE    sense key
  4919.         bit 6: EOM
  4920.         bit 5: ILI
  4921.         bits 0-3: sense key (see #1152)
  4922.  03h  4 BYTEs    information bytes
  4923.  07h    BYTE    additional sense length (0Ah)
  4924.  08h  4 BYTEs    command-specific information
  4925.  0Ch    BYTE    additional sense code
  4926.  0Dh    BYTE    additional sense code qualifier
  4927.  0Eh    BYTE    field replaceable unit code
  4928.  0Fh  3 BYTEs    sense key specific bytes
  4929.  
  4930. (Table 1152)
  4931. Values for sense key:
  4932.  00h    no sense data
  4933.  02h    SCSI unit not ready
  4934.  03h    media error
  4935.  04h    unrecoverable hardware error
  4936.  05h    illegal parameter in CDB
  4937.  06h    target has been reset
  4938.  0Bh    target aborted command
  4939.  
  4940. (Table 1153)
  4941. Values APSI post function is called with:
  4942.     STACK:    DWORD -> SRB (see #1141) which completed
  4943.     interrupts disabled
  4944. Return: EBP, EBX, ESI, EDI must be preserved
  4945.     interrupts disabled
  4946. Note:    the post function may issue any APSI function except an abort; it
  4947.       should complete as quickly as possible
  4948. --------m-214402-----------------------------
  4949. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  4950.     AX = 4402h
  4951.     BX = file handle for device "386MAX$$"
  4952.     CX = number of bytes to read
  4953.     DS:DX -> BYTE 03h followed by 386MAX state buffer (see #1154)
  4954. Return: CF clear if successful
  4955.         buffer at DS:DX+1 filled
  4956.         AX = number of bytes actually copied
  4957.     CF set on error
  4958.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  4959. Notes:    if the value given in CX is less than the size of the state record
  4960.       (5Ah for v6.01, 66h for v7.00), only a partial state record will be
  4961.       returned
  4962.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  4963.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  4964.       56h bytes for v5.11.
  4965.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  4966.       the word at offset 25h in the returned state, load all other
  4967.       registers as needed for the desired function, and execute an
  4968.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  4969.       if it is not otherwise modified by the API function.    For safety,
  4970.       in case a function is not supported or 386MAX is not present, SP
  4971.       should be saved and restored around the API call.
  4972.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  4973.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  4974.       make some calls incorrectly
  4975. SeeAlso: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
  4976.  
  4977. Format of 386MAX v6.01+ state:
  4978. Offset    Size    Description    (Table 1154)
  4979.  -1    BYTE    (call) 03h
  4980.  00h  6 BYTEs    signature "386MAX"
  4981.  06h  4 BYTEs    version string "N;NN" or "N.NN" (i.e. "6;01" for v6.01)
  4982.         (';' by default; apparently changed to a period when 386MAX
  4983.         has linked high RAM into DOS's memory chain)
  4984.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  4985.  0Ch  2 BYTEs    ???
  4986.  0Eh    WORD    segment of ??? memory block or 0000h
  4987.  10h    WORD    bit flags 1 (see #1155)
  4988.  12h    WORD    starting address of video memory in KB
  4989.  14h  2 BYTEs    ???
  4990.  16h    WORD    total high DOS memory in KB
  4991.  18h  2 BYTEs    ???
  4992.  1Ah    WORD    available shared memory in KB
  4993.  1Ch    WORD    KBytes extended memory used by 386MAX
  4994.  1Eh  2 BYTEs    ???
  4995.  20h    WORD    total extended memory in KB
  4996.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  4997.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  4998.           (see #1168)
  4999.  26h    WORD    ??? (depends on DOS version)
  5000.  28h    WORD    size of ??? in paragraphs
  5001.  2Ah    DWORD    machine type (see #1163)
  5002.  2Eh    DWORD    -> first DOS memory control block
  5003.  32h    WORD    system configuration flags (see #1156)
  5004.  34h    WORD    debugging flags 1 (see #1157)
  5005.  36h    WORD    debugging flags 2 (see #1158)
  5006.  38h  2 BYTEs    ???
  5007.  3Ah    WORD    segment of first MCB in high memory chain
  5008.  3Ch    WORD    feature flags 1 (see #1160)
  5009.  3Eh    WORD    feature flags 2 (see #1161)
  5010.  40h    WORD    feature flags 3 (see #1162)
  5011.  42h    WORD    segment of first 386MAX control block??? (see #1164)
  5012.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  5013.  46h  4 BYTEs    ???
  5014.  4Ah    WORD    number of K at start of address space swapped with fast
  5015.           extended memory (SWAP= parameter)
  5016.  4Ch  2 BYTEs    ???
  5017.  4Eh    WORD    segment address of ???
  5018.  50h    WORD    debugging flags 3 (see #1159)
  5019.  52h    DWORD    old INT 21h
  5020.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  5021. ---386MAX v7.00---
  5022.  5Ah    DWORD    KB of extended memory managed by 386MAX
  5023.  5Eh    DWORD    bytes of extended memory (EXT= parameter)
  5024.  62h  4 BYTEs    ???
  5025.  
  5026. Bitfields for 386MAX bit flags 1:
  5027. Bit(s)    Description    (Table 1155)
  5028.  1    ???
  5029.  2    allow A20 to be enabled/disabled???
  5030.  3    ??? (cleared by calling INT 67 functions or starting MSWindows)
  5031.  4    high RAM present???
  5032.  5    386MAX in AUTO mode
  5033.  6    386MAX enabled
  5034.  7    386MAX is providing EMS services
  5035.  8    ??? (affects API function 08h)
  5036.  9    A20 gate closed (A20 disabled) (see INT 15/AX=2402h)
  5037.  10    Weitek support enabled
  5038.  11    ???
  5039.  12    ROMs not shadowed???
  5040.  13    QPMS has been used
  5041.  14    ???
  5042.  15    ???
  5043.  
  5044. Bitfields for 386MAX system configuration flags:
  5045. Bit(s)    Description    (Table 1156)
  5046.  1    ROM compressed???
  5047.  3    ???
  5048.  5    386MAX loaded into high memory
  5049.  6    Microchannel bus
  5050.  7    Weitek math coprocessor detected
  5051.  9    ??? (also generates INT 01 on ??? and INT 03 on ???)
  5052.  11    PC/XT (thus only single 8259 interrupt controller present, DMA only
  5053.         in 1st megabyte, etc)
  5054.  13    LMLTOP= specified
  5055.  14    enable A20 control???
  5056.  15    ???
  5057.  
  5058. Bitfields for 386MAX debugging flags 1:
  5059. Bit(s)    Description    (Table 1157)
  5060.  0    DEBUG=LED
  5061.  1    DEBUG=X67
  5062.  2    DEBUG=INV
  5063.  3    DEBUG=EMSPTED
  5064.  4    DEBUG=JMP
  5065.  5    DEBUG=CALL
  5066.  6    DEBUG=HLT
  5067.  7    DEBUG=PMR
  5068.  8    DEBUG=CR3
  5069.  9    DEBUG=CAPS or DEBUG=INT
  5070.  10    DEBUG=RC
  5071.  11    DEBUG=ROM
  5072.  12    DEBUG=XM
  5073.  13    DEBUG=SOR
  5074.  14    DEBUG=XR
  5075.  15    DEBUG=EMSERR (generate INT 01 on returning error from EMS call)
  5076.  
  5077. Bitfields for 386MAX debugging flags 2:
  5078. Bit(s)    Description    (Table 1158)
  5079.  0    DEBUG=ROMSWAP
  5080.  1    DEBUG=UNSHADOWROM
  5081.  2    DEBUG=COMPROM
  5082.  3    DEBUG=DPMIPHYS
  5083.  4    DEBUG=ALLROM
  5084.  5    DEBUG=VMS
  5085.  6    DEBUG=XMS (generate INT 01 on XMS calls)
  5086.  7    DEBUG=I06
  5087.  8    DEBUG=VCPI
  5088.  9    DEBUG=XDMA
  5089.  10    DEBUG=X09
  5090.  13    DEBUG=I67 (generate INT 01 on every INT 67 call)
  5091.  14    DEBUG=EVM (generate INT 01 on entering V86 mode)
  5092.  15    DEBUG=EMSSAVE or DEBUG=VDS
  5093.  
  5094. Bitfields for 386MAX debugging flags 3:
  5095. Bit(s)    Description    (Table 1159)
  5096.  10    DEBUG=EPM
  5097.  12    DEBUG=ABIOS
  5098.  13    DEBUG=XMSPTED
  5099.  14    DEBUG=TIME
  5100.  15    DEBUG=SCRUB
  5101.  
  5102. Bitfields for 386MAX feature flags 1:
  5103. Bit(s)    Description    (Table 1160)
  5104.  1    Weitek present
  5105.  2    no DPMI services
  5106.  3    NODMA
  5107.  4    TERSE
  5108.  5    NOROM
  5109.  6    NOPARITY
  5110.  8    NOFLEX (IGNOREFLEXFRAME)
  5111.  11    don't create UMBs
  5112.  12    don't backfill below video memory (NOLOW)
  5113.  13    FRAME= specified
  5114.  14    EXT= specified
  5115.  15    NOEMS, allow prior expanded memory manager to provide EMS
  5116.  
  5117. Bitfields for 386MAX feature flags 2:
  5118. Bit(s)    Description    (Table 1161)
  5119.  0    UNSHIFT specified (FORCEA20 disabled)
  5120.  1    NOXRAM
  5121.  2    NOSCSI specified
  5122.  3    SCREEN specified
  5123.  4    enabled EISADMA
  5124.  5    slow DMA
  5125.  6    RESETKEYB specified
  5126.  7    ???
  5127.  9    TOP384
  5128.  10    ???
  5129.  11    NOWARMBOOT
  5130.  12    USE= specified
  5131.  13    ROM= specified
  5132.  
  5133. Bitfields for 386MAX feature flags 3:
  5134. Bit(s)    Description    (Table 1162)
  5135.  0    Windows3 support enabled
  5136.  1    SHADOWROM
  5137.  2    don't compress ROM (NOCOMPROM)
  5138.  3    ??? (related to PRGREG=)
  5139.  4    ??? (related to PRGREG=)
  5140.  5    SHADOWRAM
  5141.  6    DOS4 specified
  5142.  7    NOLOADHIGH
  5143.  8    NOPULSE
  5144.  11    FORCEA20
  5145.  12    DMA buffer enabled
  5146.  13    NOSCRUB
  5147.  15    NOFRAME
  5148.  
  5149. Bitfields for 386MAX machine type:
  5150. Bit(s)    Description    (Table 1163)
  5151.  12    Amstrad
  5152.  13    Epson
  5153.  14    Zenith Data Systems
  5154.  15    "ASEM"
  5155.  16    NEC
  5156.  17    "HPRS" model codes 69h and 6Ah
  5157.  18    Dell
  5158.  19    "CA"
  5159.  20    ITT (Xtra Business Systems/Alcatel)
  5160.  21    Toshiba 5100
  5161.  22    Olivetti
  5162.  23    Quadram Quad386 (BIOS model FEh, submodel A6h)
  5163.  24    Tandy???
  5164.  25    AST 386
  5165.  26    INBOARD, ??? version
  5166.  27    INBOARD, ??? version
  5167.  28    INBOARD, ??? version
  5168.  29    "HPRS"
  5169.  30    Compaq 386
  5170.  31    JET386
  5171.  
  5172. Format of 386MAX control block:
  5173. Offset    Size    Description    (Table 1164)
  5174.  00h    WORD    segment of next block (FFFFh if last)
  5175.  02h    WORD    segment of previous block (FFFFh if first)
  5176.  04h 12 BYTEs    filename
  5177.  10h    WORD    resident size in paragraphs
  5178.  12h    WORD    environment size???
  5179.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  5180.  16h  2 BYTEs    ???
  5181.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  5182.  1Ch    DWORD    SIZE=-1 ???
  5183.  20h    DWORD    SIZE= ???
  5184.  24h    BYTE    PRGREG= if specified, else FFh
  5185.  25h    BYTE    ENVREG= if specified, else FFh
  5186.  26h    BYTE    FlexFrame (00h not present, 01h present)
  5187.  27h  3 BYTEs    ???
  5188.  2Ah    BYTE    GROUP= or 00h if not present
  5189.  2Bh    BYTE    ???
  5190.  2Ch    WORD    PSP
  5191.  
  5192. Format of 386MAX high memory info record:
  5193. Offset    Size    Description    (Table 1165)
  5194.  00h    WORD    segment address of memory region
  5195.  02h    WORD    size of memory region in paragraphs
  5196.  04h    BYTE    type or flags???
  5197.         00h if locked out
  5198.         02h if EMS page frame
  5199.         04h if high RAM
  5200.         42h if ROM
  5201.  05h    BYTE    ???
  5202.  
  5203. Format of 386MAX ROM shadowing record:
  5204. Offset    Size    Description    (Table 1166)
  5205.  00h    WORD    logical start segment of ROM??? (may be used by BlueMAX when it
  5206.           squeezes together the ROMs to make room)
  5207.  02h    WORD    physical start segment of ROM
  5208.  04h  2 BYTEs    ???
  5209.  06h    WORD    size of shadowed ROM in paragraphs
  5210.  08h  2 BYTEs    ???
  5211.  0Ah    WORD    flags
  5212.         bit 15: shadowing enabled for this ROM???
  5213.         bit 14: ???
  5214.         bit 13: ???
  5215.         bit 12: ???
  5216.         bit 10: ???
  5217.  
  5218. (Table 1167)
  5219. Values for 386MAX memory type:
  5220.  00h    unused by EMS
  5221.  01h    DOS
  5222.  04h    page frame overlapping ROM???
  5223.  80h    high memory
  5224.  84h    page frame???
  5225.  87h    video ROM???
  5226. Note:    the type may be 00h (unused) if the 16K page is split among different
  5227.       uses (such as ROM and high RAM)
  5228.  
  5229. (Table 1168)
  5230. Call 386MAX API (via OUT DX,AL) with:
  5231.     STACK: WORD value for DX
  5232.     AH = 00h unused
  5233.         Return: AH = 84h (unsupported function)
  5234.     AH = 01h get high memory information
  5235.         ES:DI -> buffer for array of high memory info records
  5236.             (see #1165)
  5237.         Return: CX = number of records placed in buffer
  5238.     AH = 02h get shadowed ROM info
  5239.         ES:DI -> buffer for array of ROM shadowing records (see #1166)
  5240.         Return: CX = number of records placed in buffer
  5241.     AH = 03h get 386MAX state
  5242.         ES:DI -> 90-byte buffer for state (see #1154)
  5243.         Return: AH = 00h (successful)
  5244.             buffer filled
  5245.     AH = 04h get memory types???
  5246.         ES:DI -> buffer for memory type info (array of bytes, one per
  5247.             16K page) (see #1167)
  5248.         Return:    CX = number of bytes placed in buffer
  5249.     AH = 05h get page table entries
  5250.         AL = A20 control (00h enable A20 first, 01h leave unchanged)
  5251.         CX = buffer size in bytes (0000h = enough for all memory from
  5252.             given start to end of memory managed by 386MAX)
  5253.         SI = first K to report (rounded down to 4K page)
  5254.         ES:DI -> buffer for returned page table entries
  5255.         Return: CX = number of bytes returned (four per 4K page)
  5256.             ES:DI buffer filled
  5257.     AH = 06h get memory speed info
  5258.         ES:DI -> buffer for memory speed records (see #1169)
  5259.         Return: AH = 00h (successful)
  5260.             CX = number of bytes placed in buffer
  5261.         Note:    this function can take over a second to execute
  5262.     AH = 07h map/unmap multiple handle pages
  5263.         DX = EMS handle (on stack)
  5264.         STACK: DWORD -> EMS mapping record
  5265.         Return:    AH = status (00h,80h,83h,8Ah,8Bh)
  5266.         Format of EMS mapping record:
  5267.         Offset    Size    Description
  5268.          00h    WORD    function
  5269.                 0000h use physical page numbers
  5270.                 0001h use segment addresses
  5271.          02h    WORD    EMS handle
  5272.          04h    WORD    number of mapping entries following
  5273.          06h 2N WORDs    logical page number and physical page/segment
  5274.                 logical page FFFFh means unmap physical page
  5275.         SeeAlso: INT 67/AH=50h
  5276.     AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
  5277.         AL = ??? (00h or nonzero)
  5278.         Return: AH = status (00h OK, A4h not possible at this time)
  5279.         Note:    if AL=00h, this function always returns success
  5280.     AH = 09h toggle Bit Flags 1 flags
  5281.         BX = bitmask of bit flags 1's flags to toggle (see #1155)
  5282.         Return: AH = 00h (successful)
  5283.         Note:    enables A20 first
  5284.     AH = 0Ah toggle Debugging Flags 1 flags
  5285.         BX = bitmask of Debugging Flags 1's bits to toggle (see #1157)
  5286.         Return: AH = 00h (successful)
  5287.         Notes:    enables A20 first
  5288.             does ??? if bit 3 on after specified bits are toggled
  5289.     AH = 0Bh toggle Debugging Flags 2 flags
  5290.         BX = bitmask of Debugging Flags 2's bits to toggle (see #1158)
  5291.         Return: AH = 00h (successful)
  5292.         Note:    enables A20 first
  5293.     AH = 0Ch toggle feature flags 3
  5294.         BX = bitmask of feature flags 3's bits to toggle (see #1162)
  5295.         Return: AH = 00h (successful)
  5296.         Note:    enables A20 first
  5297.     AH = 0Dh specify 386MAX high-memory location
  5298.         BX = segment address of high-memory real-mode portion of 386MAX
  5299.         CX = current segment of real-mode stub???
  5300.         Return: AH = status (00h successful)
  5301.             ???
  5302.     AH = 0Eh CRT controller register virtualization
  5303.         AL = subfunction
  5304.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  5305.             01h trap accesses to CRTC I/O ports
  5306.     AH = 0Fh reboot system
  5307.         Return: never
  5308.     AH = 10h unused
  5309.         Return: AH = 84h (unsupported function)
  5310.     AH = 11h get high memory information
  5311.         ES:DI -> 96-byte buffer for high memory info
  5312.         Return: AH = 00h (successful)
  5313.             ES:DI buffer filled
  5314.         Notes:    each byte in buffer contains bit flags for a 4K page in
  5315.               the A000h-FFFFh region
  5316.                 bit 0: page is writeable
  5317.                 bit 1: physical address same as linear address
  5318.                 bit 2: EMS page frame
  5319.                 bit 6: page is part of the QPMS window
  5320.             this function can take over a second to execute,
  5321.               because it does a 128K read for each page in an
  5322.               attempt to flush any RAM cache the system may have
  5323.     AH = 12h shadow RAM mapping
  5324.         AL = subfunction
  5325.             00h unshadow ROMs (except page FFh if NOWARMBOOT set)
  5326.             01h map shadow RAM into ROM regions???
  5327.         Return: AH = 00h (successful) if AL=00h or 01h
  5328.             AH = 8Fh otherwise
  5329.     AH = 13h shadow RAM page protection
  5330.         AL = subfunction
  5331.             00h set all shadowed ROM 4K pages to read-only
  5332.             01h set all shadowed ROM 4K pages to read-write
  5333.         Return: AH = 00h (successful) if AL=00h or 01h
  5334.             AH = 8Fh otherwise
  5335.     AH = 14h get Programmable Option Select info???
  5336.         ES:DI -> 54-byte buffer for POS data???
  5337.         Return: AH = 00h if successful
  5338.             AH = A4h on error
  5339.         Note:    the buffer consists of nine 6-byte fields; the first
  5340.               eight for slots 1-8, the last for the system board
  5341.     AH = 15h ???
  5342.         ???
  5343.         Return: ???
  5344.     AH = 16h get 386MAX memory usage screen
  5345.         ES:DI -> buffer for memory info display
  5346.         CX = size of buffer in bytes
  5347.         Return:    ES:DI buffer filled with '$'-terminated string (if
  5348.                 large enough to hold entire usage screen)
  5349.         Note:    the screen is 0303h bytes in v7.00
  5350.     AH = 17h Windows 3 startup/termination
  5351.         AL = subfunction
  5352.             00h Windows3 initializing
  5353.             DX (on stack) = Windows startup flags
  5354.             DI = Windows version number (major in upper byte)
  5355.             ES:BX = 0000h:0000h
  5356.             DS:SI = 0000h:0000h
  5357.             Return: CX = 0000h if OK for Windows to load
  5358.                    <> 0 if Windows should not load
  5359.                 ES:BX -> startup info structure
  5360.                 DS:SI -> Virtual86 mode enable/disable callback
  5361.             01h Windows3 terminating
  5362.             ES:BX -> ???
  5363.             DX (on stack) = Windows exit flags
  5364.             Return: ???
  5365.     AH = 18h QPMS (Qualitas Protected Memory Services)
  5366.         AL = subfunction
  5367.             00h get QPMS configuration
  5368.             Return: BX = starting segment of QPMS memory window
  5369.                 CX = number of 4K pages reserved for QPMS???
  5370.                 DX = number of 4K pages in QPMS window???
  5371.             01h map QPMS memory page???
  5372.             BX = 4K page number within memory reserved for QPMS???
  5373.             CL = 4K page number within QPMS memory window???
  5374.             02h mark all QPMS memory read-only
  5375.             03h mark all QPMS memory read-write
  5376.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  5377.     AH = 19h get linear address for physical address
  5378.         EDX = physical address (low word on stack)
  5379.         Return: AH = status
  5380.                 00h successful
  5381.                 EDX = linear address at which physical address
  5382.                     may be accessed
  5383.                 8Bh physical address currently not addressable
  5384.         Note:    enables A20 first
  5385.     AH = 1Ah set page table entry
  5386.         EDX = new page table entry (low word on stack)
  5387.         ESI = linear address of page to map (bits 0-11 clear)
  5388.         Return: AH = status (00h,8Bh)
  5389.         Note:    enables A20 first
  5390.     AH = 1Bh get ???
  5391.         Return: AH = status
  5392.             BX = ???
  5393.             CX = number of ???
  5394.             EDX = physical address of ???
  5395.     AH = 1Ch get original interrupt vector
  5396.         AL = interrupt vector (00h-7Fh)
  5397.         Return: AH = 00h (successful)
  5398.             EDX = original vector before 386MAX loaded (segment in
  5399.                 high word, offset in low word)
  5400.         Note:    no range checking is performed; requests for INTs 80h-
  5401.               FFh will return random values
  5402.     AH = 1Dh display string???
  5403.         SI = ???
  5404.         Return: AH = 00h (successful)
  5405.             ???
  5406.         Note:    this function appears to be broken in v7.00
  5407.     AH = 1Eh get memory info
  5408.         ES:DI -> memory info (see #1170)
  5409.         Return: ???
  5410.     AH = 1Fh get DPMI host information
  5411.         Return: AX = 0000h if successful
  5412.             BX = DPMI flags (see #2823 at INT 31/AX=0400h)
  5413.             CL = CPU type (02h = 80286, 03h = 80386, etc.)
  5414.             DX = DPMI ver supported (DH=major, DL=2-digit minor)
  5415.             SI = ???
  5416.             ES???:DI -> ???
  5417.         Note:    NOP if NODPMI switch specified
  5418.     AH = 20h (v7.00) get ???
  5419.         AL = index of ???
  5420.         Return: EDX = ??? for specified ???
  5421.     AH = 21h (v7.00) STACKS support
  5422.         AL = 00h get STACKS parameters
  5423.         Return: BX = ??? (0060h for v7.00)
  5424.             CX = number of stacks for hardware interrupts
  5425.             DX = size of each stack in bytes
  5426.             SI = ??? (low and high bytes are separate values)
  5427.             DI = ??? (low and high bytes are separate values)
  5428.                 low byte = logical page number set by subfn 02h
  5429.             ES = ???
  5430.         AL = 01h set ??? "EMM2_DSTKS"
  5431.         EBX = ???
  5432.         ECX = ???
  5433.         AL = 02h set ???
  5434.         BL = logical page number for ??? (00h-03h)
  5435.         Return: AH = status (00h,8Ah)
  5436.     AH = 22h (v7.00) call ??? for every load module
  5437.         AL = which function to call
  5438.         00h call ???
  5439.         else call ????
  5440.         Return: AH = 00h
  5441.         Note: if AL=00h, calls the protected-mode function pointed at by
  5442.         the DWORD at offset 22h from the start of each module installed
  5443.         by a LOAD= directive; if AL<>00h, it calls the function
  5444.         pointed at by the DWORD at offset 28h of the load module
  5445.     AH = 23h (v7.00) ???
  5446.         AL = 00h set ???
  5447.         BL = ???
  5448.         Return:    AH = 00h or unchanged (depending on ???)
  5449.         AL = 01h set ???
  5450.         BL = ???
  5451.         BH = ???
  5452.         CX = ???
  5453.         DX = ??? (on top of stack)
  5454.         Return: AH = status (00h if successful, 8Fh once table full)
  5455.         Note:    this call adds one entry to an internal table on each
  5456.               call, until the table is full
  5457.         AL = 02h get ???
  5458.         CX = size of buffer
  5459.         ES:DI -> buffer for ??? (60 bytes total data)
  5460.         Return: CX = number of bytes actually returned
  5461.         Note:    returns the array storing the values set with AX=2301h
  5462.         Format of one entry in array:
  5463.         Offset    Size    Description
  5464.          00h    BYTE    ??? (BL from subfn 01h)
  5465.          01h    WORD    ??? (CX from subfn 01h)
  5466.          03h    BYTE    ??? (BH from subfn 01h)
  5467.          04h    WORD    ??? (DX from subfn 01h)
  5468.         AL = 03h set ??? name/path
  5469.         ES:DI -> buffer containing ASCIZ ???
  5470.         AL = 04h get ???
  5471.         ES:DI -> buffer for ASCIZ ???
  5472.         Note: the ASCIZ string for subfunctions 03h and 04h does not appear
  5473.         to be used by 386MAX, and may serve merely for communication
  5474.         between two other Qualitas programs
  5475.     AH = 24h (v7.00) high memory control
  5476.         AL = 00h get high memory state
  5477.         Return: BX = current state
  5478.                 00h high memory removed from DOS memory chain
  5479.                 01h high memory included in DOS memory chain
  5480.         AL = 01h set high memory state
  5481.         BX = new state
  5482.             00h high memory removed from DOS memory chain
  5483.             01h high memory included in DOS memory chain
  5484.             else
  5485.             Return: ??? (error, but return varies according to ???)
  5486.     AH = 25h (v7.00) remove high RAM from DOS memory chain
  5487.     AH = 26h (v7.00) ???
  5488.         BX = ???
  5489.         CX = ???
  5490.         SI = ???
  5491.         DI = ???
  5492.         Return: AH = status
  5493.             BX = ???
  5494.             CX = ???
  5495.     AH = 27h (v7.00) ???
  5496.         AL = 00h get ???
  5497.         Return: BX = number of paragraphs for ???
  5498.         AL = 01h ???
  5499.         BX = ???
  5500.         ES??? = ???
  5501.         AL = 02h ???
  5502.         ???
  5503.         AL = 03h ???
  5504.         CX = ???
  5505.         DX = ???
  5506.         ES??? = ???
  5507.         Return: ???
  5508.     AH = 28h (v7.00) get ???
  5509.         Return: AH = status (00h,8Fh) (see #3319 at INT 67/AH=40h)
  5510.             if AH=00h,
  5511.                 CX = ???
  5512.                 DX = ???
  5513.     AH = 29h (v7.00) get ???
  5514.         Return: AX = ???
  5515.     AH = 40h-5Dh EMS services (see INT 67/AH=40h, etc.)
  5516.     AH = DEh VCPI services (see INT 67/AX=DE00h, etc.)
  5517. Return: AH = status (as for EMS INT 67 calls)
  5518.         00h successful
  5519.         80h internal error
  5520.         81h hardware malfunction
  5521.         83h invalid handle
  5522.         84h    undefined function
  5523.         8Ah invalid logical page nuber
  5524.         8Bh illegal physical page number
  5525.         8Fh undefined subfunction
  5526.         A4h access denied
  5527.         etc.
  5528.     STACK popped (value placed in DX if no specific return value for DX)
  5529.  
  5530. Format of 386MAX memory speed record:
  5531. Offset    Size    Description    (Table 1169)
  5532.  00h    DWORD    page table entry for 4K page
  5533.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  5534.           entire 4K page
  5535.  
  5536. Format of 386MAX memory info [array]:
  5537. Offset    Size    Description    (Table 1170)
  5538.  00h    DWORD    linear start address
  5539.  04h    DWORD    size in bytes
  5540.  08h    WORD    XMS handle (if next byte = 04h)
  5541.         ??? (if next byte = 05h)
  5542.         ??? (if next byte = 06h)
  5543.         ??? (if next byte = 13h)
  5544.         ??? (if next byte = 14h)
  5545.         ??? (if next byte = 15h)
  5546.         ??? (if next byte = 23h)
  5547.         ??? (if next byte = 24h)
  5548.         ??? (if next byte = 26h)
  5549.         else unused
  5550.  0Ah    BYTE    type
  5551.         00h = ???, 01h = VDISK,
  5552.         02h = INT 15h extended memory, 03h = ??? extended,
  5553.         04h = XMS handle's memory, 05h = ???, 06h = ???, 07h = ???,
  5554.         08h = ???, 09h = ???, 0Ah = ???, 0Bh = ???,
  5555.         11h = ???, 12h = ???, 14h = ???, 15h = ???,
  5556.         19h = ???, 1Ah = ???, 1Bh = ???,
  5557.         1Ch = ???, 1Dh = ???, 1Eh = ???, 1Fh = ???,
  5558.         20h = ???, 21h = ???, 23h = ???, 24h = ???,
  5559.         26h = ???
  5560.  0Bh    BYTE    ??? (00h for types 00h-03h, 07h-0Bh, 19h-21h;
  5561.              80h for types 04h/13h-15h/23h-26h;
  5562.             ??? for type 05h)
  5563. --------V-214402-----------------------------
  5564. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  5565.     AX = 4402h
  5566.     BX = file handle for device "PGS1600$"
  5567.     CX = 0018h (size of buffer)
  5568.     DS:DX -> configuration buffer (see #1171)
  5569. Return: CF clear if successful
  5570.         buffer filled
  5571.         AX = number of bytes actually copied
  5572.     CF set on error
  5573.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5574. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  5575.       display adapter, which provides a 1600x1200 monochrome display as
  5576.       well as one of two emulations, MDA or CGA.
  5577. SeeAlso: AX=4403h"PGS1600"
  5578.  
  5579. Format of PGS1600.DEV configuration information:
  5580. Offset    Size    Description    (Table 1171)
  5581.  00h    WORD    version (high byte = major, low byte = minor)
  5582.  02h    WORD    board initialisation mode
  5583.  04h    WORD    board I/O address
  5584.         03D0h CGA emulation
  5585.         03B0h MDA emulation
  5586.         0390h no emulation
  5587.         0350h no emulation, alternate
  5588.  06h    WORD    emulation buffer segment
  5589.         B800h    CGA emulation
  5590.         B000h    MDA emulation
  5591.         0000h    no emulation
  5592.  08h    WORD    PG1600 graphics buffer segment
  5593.  0Ah    WORD    number of bytes between consecutive graphic rows
  5594.  0Ch    WORD    horizontal pixel size
  5595.  0Eh    WORD    vertical pixel size
  5596.  10h    WORD    horizontal dots per inch
  5597.  12h    WORD    vertical dots per inch
  5598.  14h    WORD    graphics buffer bits per pixel
  5599.  16h    WORD    monitor bits per pixel
  5600. --------N-214402-----------------------------
  5601. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  5602.     AX = 4402h
  5603.     BX = file handle referencing device "$IPCUST"
  5604.     CX, DS:DX ignored
  5605. Return: CF clear if successful
  5606.         AX destroyed
  5607.     CF set on error
  5608.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5609. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  5610.       version 2.05.     If less than the entire data is read or written,
  5611.       the next read/write continues where the previous one ended; this
  5612.       call and AX=4403h both reset the location at which the next
  5613.       operation starts to zero
  5614.     v2.1+ uses a new configuration method, but allows the installation
  5615.       of IPCUST.SYS for backward compatibility with other software which
  5616.       must read the PC/TCP configuration
  5617. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  5618. --------N-214402-----------------------------
  5619. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  5620.     AX = 4402h
  5621.     BX = file handle for device "NET$HLP$"
  5622.     CX = 0008h
  5623.     DS:DX -> buffer for entry point record (see #1172)
  5624. Return: CF clear if successful
  5625.         AX = number of bytes actually read
  5626.     CF set on error
  5627.         AX = error code
  5628. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  5629.       permits communication with PCs running Windows for Workgroups or
  5630.       LAN Manager
  5631. SeeAlso: AH=3Fh"WORKGRP.SYS"
  5632.  
  5633. Format of WORKGRP.SYS entry point record:
  5634. Offset    Size    Description    (Table 1172)
  5635.  00h    WORD    3633h  \ signature???
  5636.  02h    WORD    EF6Fh  /
  5637.  04h    DWORD    address of entry point (see #1173)
  5638. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  5639.       IOCTL rather than READ to get the entry point record
  5640.  
  5641. (Table 1173)
  5642. Call WORKGRP entry point with:
  5643.     STACK:    WORD    function number (0000h-0009h)
  5644. Return: STACK unchanged
  5645. SeeAlso: #1174,#1175,#1176,#1177,#1178,#1179,#1180,#1181
  5646.  
  5647. (Table 1174)
  5648. Call WORKGRP function 00h with:
  5649.     STACK:    WORD    0000h (function "get ???")
  5650. Return: DX:AX -> data table
  5651.  
  5652. (Table 1175)
  5653. Call WORKGRP function 01h with:
  5654.     STACK:    WORD    0001h (function "hook ???")
  5655. Return: STACK:    DWORD    pointer to ???
  5656.         WORD    0001h (function number)
  5657.  
  5658. (Table 1176)
  5659. Call WORKGRP function 02h with:
  5660.     STACK:    WORD    0002h (function "unhook ???")
  5661.     ???
  5662. Return: ???
  5663.  
  5664. (Table 1177)
  5665. Call WORKGRP function 03h with:
  5666.     STACK:    WORD    0003h (function "reenable printer port")
  5667.         WORD    LPT port number
  5668. Return: ???
  5669.  
  5670. (Table 1178)
  5671. Call WORKGRP function 04h with:
  5672.     STACK:    WORD    0004h (function "disable printer port")
  5673.         WORD    LPT port number
  5674. Return: ???
  5675.  
  5676. (Table 1179)
  5677. Call WORKGRP function 05h with:
  5678.     STACK:    WORD    0005h (function "???")
  5679.         ???
  5680. Return: ???
  5681.  
  5682. (Table 1180)
  5683. Call WORKGRP function 06h with:
  5684.     STACK:    WORD    0006h (function "???")
  5685. Return: STACK unchanged
  5686.     AX = 0000h
  5687.     DX = 0000h
  5688.  
  5689. (Table 1181)
  5690. Call WORKGRP functions 07h-09h with:
  5691.     STACK:    WORD    0007h-0009h (NOP functions)
  5692. Return: STACK unchanged
  5693.     AX = 0001h
  5694.     DX = 0000h
  5695. --------N-214402-----------------------------
  5696. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  5697.     AX = 4402h
  5698.     BX = file handle referencing device "10BEUI$"
  5699.     DS:DX -> parameter record (see #1182)
  5700.     CX ignored
  5701. Return: CF clear if successful
  5702.         AX destroyed
  5703.     CF set on error
  5704.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5705. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  5706.  
  5707. Format of 10NET 10BEUI.DOS parameter record:
  5708. Offset    Size    Description    (Table 1182)
  5709.  00h    WORD    000Ah (function number???)
  5710.  02h    WORD    ???
  5711.  04h    DWORD    pointer to buffer for ???
  5712.  08h  4 BYTEs    ???
  5713.  0Ch    WORD    transfer size
  5714. --------N-214402-----------------------------
  5715. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  5716.     AX = 4402h
  5717.     BX = file handle referencing device "MEMMGR0$"
  5718.     DS:DX -> 6-byte buffer for interface info (see #1183)
  5719.     CX ignored
  5720. Return: CF clear if successful
  5721.         AX destroyed
  5722.     CF set on error
  5723.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5724. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  5725.  
  5726. Format of 10NET 10MEMMGR.SYS interface info:
  5727. Offset    Size    Description    (Table 1183)
  5728.  00h    DWORD    address of entry point (see #1184)
  5729.  04h    WORD    version (0500h for v5.00)
  5730.  
  5731. (Table 1184)
  5732. Call 10NET 10MEMMGR.SYS entry point with:
  5733.     AL = 01h ???
  5734.         BX = ???
  5735.         Return: CF clear if successful
  5736.             CF set on error
  5737.             AX = error code
  5738.     AL = 02h ???
  5739.         ???
  5740.     AL = 03h ???
  5741.         ???
  5742.     AL = 04h set/restore memory allocation strategy
  5743.         BX = subfunction
  5744.         0000h set strategy
  5745.         0001h restore strategy
  5746.         Return: CF clear if successful
  5747.             CF set on error (if function disabled)
  5748.             various registers destroyed
  5749.     AL = other
  5750.         Return: CF set
  5751.             AX = 0000h
  5752.             BL = 01h
  5753. --------V-214402-----------------------------
  5754. INT 21 - Compaq AG1024.SYS - RGDI - GET DRIVER LOCATION
  5755.     AX = 4402h
  5756.     BX = file handle for device "$$$$RGDI"
  5757.     CX = 0006h (size of returned data)
  5758.     DS:DX -> location record (see #1185)
  5759. Return: CF clear if successful
  5760.         buffer filled
  5761.     CF set on error
  5762.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5763. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  5764. SeeAlso: AX=4403h"RGDI"
  5765.  
  5766. Format of Compaq AG1024.SYS location record:
  5767. Offset    Size    Description    (Table 1185)
  5768.  00h    WORD    signature 55AAh
  5769.  02h    WORD    segment of ???
  5770.  04h    WORD    segment of device driver's code
  5771. --------N-214402-----------------------------
  5772. INT 21 - FTPSOFT.DOS v3.1 - GET ???
  5773.     AX = 4402h
  5774.     BX = file handle for device "FTPSOFT$"
  5775.     CX = size of buffer
  5776.     DS:DX -> buffer for data (see #1186)
  5777. Return: CF clear if successful
  5778.         buffer filled
  5779.     CF set on error
  5780.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5781. Program: FTPSOFT.DOS is a device driver for Protocol Manager support from
  5782.        FTP Software, Inc.
  5783. SeeAlso: AH=3Fh"PC/TCP",AX=4402h"NDIS"
  5784.  
  5785. Format of FTPSOFT.DOS data:
  5786. Offset    Size    Description    (Table 1186)
  5787.  00h    WORD    (call) BA98h (if different, no data returned)
  5788.  02h    DWORD    -> NDIS common characteristics table
  5789.           (see #1122 at AX=4402h"NDIS")
  5790.  06h    DWORD    (call) -> new dispatch table (see #1124 at AX=4402h"NDIS")
  5791.  0Ah    DWORD    -> 28-byte buffer for ??? data
  5792.  0Eh    DWORD    ???
  5793.  12h    DWORD    -> FAR function to reset dispatch jump table to defaults
  5794.  16h    BYTE    ???
  5795. Note:    the addresses in the new dispatch table are copied into an internal
  5796.       jump table which may be reset by calling the function pointed at by
  5797.       offset 12h
  5798. --------n-214402-----------------------------
  5799. INT 21 U - PenDOS PENDEV.SYS - GET ENTRY POINTS
  5800.     AX = 4402h
  5801.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  5802.     CX = size of buffer (4 for $$PENDOS and a 4,8,12, or 16 for $$PD_REG)
  5803.     DS:DX -> buffer for entry point record (see #1187)
  5804. Return: CF clear if successful
  5805.         buffer filled
  5806.     CF set on error
  5807.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5808. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  5809.       which provides pen capability to keyboard-based programs, is bundled
  5810.       with IBM DOS 6.1
  5811. SeeAlso: AX=4403h"PENDEV.SYS"
  5812.  
  5813. Format of PENDEV.SYS entry point record:
  5814. Offset    Size    Description    (Table 1187)
  5815.  00h    DWORD    -> array of jumps
  5816.  04h    WORD    offset of function to retrieve entry point (see #1188)
  5817.  06h  2 BYTEs    signature "Pe"
  5818.  08h    WORD    offset of function to set entry point (see #1189)
  5819.  0Ah  2 BYTEs    signature "nD"
  5820.  0Ch    WORD    offset of function to clear entry point (see #1190)
  5821.  0Eh    WORD    signature "OS"
  5822.  
  5823. (Table 1188)
  5824. Call PENDEV.SYS function to retrieve entry point with:
  5825.     AX = index of entry point (0-9)
  5826. Return: CF clear if successful
  5827.         DX:AX -> desired entry point
  5828.     CF set on error (AX out of range)
  5829.  
  5830. (Table 1189)
  5831. Call PENDEV.SYS function to set entry point with:
  5832.     AX = index of entry point (0-9)
  5833.     DX:SI -> new handler
  5834. Return: CF clear if successful
  5835.     CF set on error (AX out of range)
  5836.  
  5837. (Table 1190)
  5838. Call PENDEV.SYS function to clear entry point with:
  5839.     AX = index of entry point (0-9)
  5840. Return: CF clear if successful
  5841.     CF set on error (AX out of range)
  5842. Note:    resets the jump at the specified entry point to its default target,
  5843.       which simply returns
  5844. --------N-214402-----------------------------
  5845. INT 21 U - LAN Manager - TCPDRV.DOS - API
  5846.     AX = 4402h
  5847.     BX = file handle referencing device "TCPDRV$"
  5848.     CX = 0019h
  5849.     DS:DX -> buffer containing request block (see #1191)
  5850. Return: CF clear if successful
  5851.         buffer filled
  5852.     CF set on error
  5853.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5854. Program: TCPDRV.DOS is the low-level device driver supporting LAN Manager's
  5855.       TCP/IP protocol stack
  5856.  
  5857. Format of TCPDRV.DOS request block:
  5858. Offset    Size    Description    (Table 1191)
  5859.  00h    BYTE    (call) function number
  5860.         00h initialize ???
  5861.         06h get ???
  5862.         07h get ???
  5863.  01h    BYTE    (call) 00h
  5864.         (ret) error code if error, unchanged if successful
  5865.  02h    WORD    signature 4354h ('CT')
  5866. ---function 00h---
  5867.  04h    DWORD    (call) pointer to ??? FAR function
  5868.         function is called with ES:BX -> device driver request used to
  5869.           invoke this function
  5870.  08h  4 BYTEs    ???
  5871.  0Ch    DWORD    (call) pointer to ??? record, WORD at offset 22h is read
  5872.  10h    DWORD    (ret) -> ??? buffer if 0000h:0000h on call
  5873. ---function 06h---
  5874.  04h  4 BYTEs    ???
  5875.  08h    DWORD    (ret) pointer to ???
  5876. ---function 07h---
  5877.  04h    DWORD    (ret) pointer to ??? record
  5878. --------y-214402-----------------------------
  5879. INT 21 U - PC Tools 9 CPRLOW.EXE - GET CODE AND DATA ADDRESSES
  5880.     AX = 4402h
  5881.     BX = file handle referencing device "RECLOWLD"
  5882.     DS:DX -> buffer for address list (see #1192)
  5883.     CX ignored
  5884. Return: CF clear if successful
  5885.         buffer filled
  5886.     CF set on error
  5887.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5888.  
  5889. Format of CPRLOW address list:
  5890. Offset    Size    Description    (Table 1192)
  5891.  00h    WORD    segment of CPRLOW code
  5892.  02h    WORD    offset in code segment of ??? entry point
  5893.         (switches into protected mode)
  5894.  04h    WORD    offset in code segment of jump array (see #1193)
  5895.  06h    WORD    segment of copy of interrupt vector table at CPRLOW load time
  5896. Note:    neither the entry point nor the jump array is valid until after a
  5897.       CPR /LOAD, because CPR.EXE installs the code into CPRLOW at runtime.
  5898.  
  5899. Format of CPRLOW jump array:
  5900. Offset    Size    Description    (Table 1193)
  5901.  00h  3 BYTEs    initialize CPRLOW interrupt hooks
  5902.  03h  3 BYTEs    reset timers and enable CPR (hotkey enable)
  5903.  06h  3 BYTEs    disable CPR (hotkey disable)
  5904.  09h  3 BYTEs    clear ??? flag, hotkey disable, and ???
  5905.  0Ch  3 BYTEs    initialize delay loop counter (destroys AX,BX,CX,DX)
  5906.  0Fh  3 BYTEs    disable CPR completely (commandline /DISABLE)
  5907.  12h  3 BYTEs    enable ??? if CPR enabled by both cmdline and hotkey
  5908.  15h  3 BYTEs    enable CPR (commandline /ENABLE)
  5909. --------s-214402-----------------------------
  5910. INT 21 U - Creative Technology CTMMSYS.SYS v1.00.01 - API
  5911.     AX = 4402h
  5912.     BX = file handle for device "CTMMSYS$"
  5913.     CX = 0004h (size of data)
  5914.     DS:DX -> buffer for entry point (see #1194)
  5915. Return: CF clear if successful
  5916.         buffer updated
  5917.     CF set on error
  5918.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5919. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  5920.       driver
  5921. SeeAlso: AX=4402h"CTSB2",INT 80/BX=0000h"SBFM"
  5922.  
  5923. Format of CTMMSYS.SYS entry point record:
  5924. Offset    Size    Description    (Table 1194)
  5925.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  5926.         (ret) pointer to CTMMSYS entry point (see #1195)
  5927. SeeAlso: #1196
  5928.  
  5929. (Table 1195)
  5930. Call CTMMSYS.SYS entry point with:
  5931.     AX = ???
  5932.     STACK:    WORD    ???
  5933.         WORD    ???
  5934.         WORD    ??? (0001h,0002h,0005h,0006h)
  5935.         WORD    ???
  5936.         DWORD    -> ???
  5937.         WORD    ???
  5938.         WORD    ???
  5939. Return: DX:AX = ??? or error code
  5940.         0000h:000Bh invalid value for ???
  5941.         0000h:000Fh API call already in progress
  5942. SeeAlso: #1194
  5943. --------s-214402-----------------------------
  5944. INT 21 U - Creative Technology CTSB2.SYS v1.01.01 - API
  5945.     AX = 4402h
  5946.     BX = file handle for device "CTSOUND0"
  5947.     CX = 0004h (size of data)
  5948.     DS:DX -> buffer for entry point (see #1196)
  5949. Return: CF clear if successful
  5950.         buffer updated
  5951.     CF set on error
  5952.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5953. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  5954.       driver
  5955. SeeAlso: AX=4402h"CTMMSYS",INT 80/BX=0000h"SBFM"
  5956.  
  5957. Format of CTSB2.SYS entry point record:
  5958. Offset    Size    Description    (Table 1196)
  5959.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  5960.         (ret) pointer to CTSB2 entry point (see #1197)
  5961. SeeAlso: #1194
  5962.  
  5963. (Table 1197)
  5964. Call CTSB2.SYS entry point with:
  5965.     AX = ???
  5966.     STACK:    DWORD    -> ???
  5967.         WORD    function number
  5968.             (0100h,0200h,0300h,0400h,0500h,0600h,0701h)
  5969.         DWORD    -> ???
  5970.         WORD    ???
  5971.         WORD    ???
  5972. Return: DX:AX = ??? or error code
  5973.         0000h:0004h invalid subfunction???
  5974.         0000h:000Bh invalid value for ???
  5975.         0000h:000Fh API call already in progress
  5976. SeeAlso: #1196
  5977. --------m-214402-----------------------------
  5978. INT 21 U - Novell DOS 7 EMM386.EXE - GET STATE RECORD???
  5979.     AX = 4402h
  5980.     BX = file handle for device "EMMXXXX0"
  5981.     CX = 003Eh (size of state record)
  5982.     DS:DX -> buffer for state record (see #1198)
  5983. Return: CF clear if successful
  5984.         buffer filled (see #3274 at INT 67/AH=3Fh)
  5985.     CF set on error
  5986.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  5987.  
  5988. Format of Novell DOS 7 EMM386.EXE state record:
  5989. Offset    Size    Description    (Table 1198)
  5990.  00h    WORD    signature EDC0h
  5991.  02h 60 BYTEs    ???
  5992. --------m-214402SF00-------------------------
  5993. INT 21 U - Memory Managers - GET API ENTRY POINT
  5994.     AX = 4402h subfn 00h
  5995.     BX = file handle for device "EMMXXXX0"
  5996.     CX = 0006h (size of buffer in bytes)
  5997.     DS:DX -> buffer for API entry point record (see #1199)
  5998.         first byte must be 00h on entry
  5999. Return: CF clear if successful
  6000.         buffer filled (see #3274 at INT 67/AH=3Fh)
  6001.     CF set on error
  6002.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6003. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  6004.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  6005.     if no other program has hooked INT 67, an alternate installation
  6006.       check for CEMM is testing for the string
  6007.       "COMPAQ EXPANDED MEMORY MANAGER 386" at offset 14h in the INT 67
  6008.       handler's segment; if present, the word at offset 12h contains the
  6009.       offset of the API entry point
  6010. SeeAlso: AX=4402h/SF=01h,AX=4402h/SF=02h,AX=4402h"EMM386",INT 67/AH=3Fh
  6011.  
  6012. Format of memory manager API entry point record:
  6013. Offset    Size    Description    (Table 1199)
  6014.  00h    WORD    ??? (0022h for CEMM 5.11, 0025h for MS EMM386 v4.45)
  6015.  02h    DWORD    manager's private API entry point
  6016.         (see #1200,#3337 at INT 67/AX=FFA5h)
  6017.  
  6018. (Table 1200)
  6019. Call CEMM v5.10+ entry point with:
  6020.     AH = 00h get memory manager's state
  6021.         Return: AH = state
  6022.             bit 0: turned OFF
  6023.             bit 1: AUTO mode enabled
  6024.     AH = 01h set memory manager's state
  6025.         AL = new state (00h ON, 01h OFF, 02h AUTO)
  6026.         Return: CF clear if successful
  6027.             CF set on error
  6028.     AH = 02h Weitek coprocessor support
  6029.         AL = subfunction
  6030.         00h get Weitek support state
  6031.             Return: AL = status
  6032.                 bit 0: Weitek coprocessor is present
  6033.                 bit 1: Weitek support is enabled
  6034.         01h turn on Weitek support
  6035.         02h turn off Weitek support
  6036.         Return: CF clear if successful
  6037.             CF set on error
  6038.             AH = error code (01h invalid subfunc, 02h no Weitek)
  6039.     AH = 05h get statistics
  6040.         ???
  6041.     AH > 06h
  6042.         Return: CF set
  6043.             AH = 01h (invalid function)
  6044. Notes:    AH=03h,04h,06h are NOPs which return CF clear, presumably for backwards
  6045.       compatibility with earlier versions of CEMM
  6046.     in v5.11, AH=05h merely prints an error message (using INT 21/AH=09h)
  6047.       stating that a different version of CEMM is installed and it is
  6048.       therefore not possible to display the statistics
  6049. --------m-214402SF01-------------------------
  6050. INT 21 U - Memory Managers - GET EMM IMPORT STRUCTURE ADDRESS
  6051.     AX = 4402h subfn 01h
  6052.     BX = file handle for device "EMMXXXX0"
  6053.     CX = 0006h (size of buffer in bytes)
  6054.     DS:DX -> buffer for EMM import structure record (see #1201)
  6055.         first byte must be 01h on entry
  6056. Return: CF clear if successful
  6057.         buffer filled (see also #3274 at INT 67/AH=3Fh)
  6058.     CF set on error
  6059.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6060. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+,
  6061.       QEMM-386 v6+, and CEMM v5.10+, and is intended for use by MS Windows
  6062.       as it starts up
  6063.     for QEMM-386, this call always returns an error if Windows3 support
  6064.       has been disabled with the NW3 switch
  6065. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 2F/AX=D201h/BX=5145h
  6066. SeeAlso: INT 67/AH=3Fh
  6067.  
  6068. Format of EMM import structure record:
  6069. Offset    Size    Description    (Table 1201)
  6070.  00h    DWORD    physical address of EMM import structure (see #1202)
  6071.  04h    BYTE    EMM import structure major version
  6072.  05h    BYTE    EMM import structure minor version
  6073. Note:    vession 1.00 contains only EMS information (Windows 3.0+)
  6074.     version 1.10 contains UMB/XMS/HMA/EMS information (Windows 3.1)
  6075.     version 1.11 is version 1.10 plus memory manager maker/product name
  6076. SeeAlso: #3314
  6077.  
  6078. Format of Global EMM Import record:
  6079. Offset    Size    Description    (Table 1202)
  6080.  00h    BYTE    bit flags
  6081.         bit 2: ???
  6082.         bit 3: free EMM386 virtual HMA only if hma_page_table_paddr!=0
  6083.         bit 4: no UMB???
  6084.  01h    BYTE    reserved (0)
  6085.  02h    WORD    size of structure in bytes
  6086.  04h    WORD    structure version
  6087.  06h    DWORD    reserved
  6088.  0Ah 384 BYTEs    64 EMS frame status records (see #1203), one per 16K of
  6089.           real-mode 1M address space
  6090. 18Ah    BYTE    ??? (must be at least 3*number_of_EMS_frames+4)
  6091. 18Bh    BYTE    number of UMB frame descriptors following
  6092. 18Ch 4N DWORDs    UMB frame descriptors
  6093.         each is 4 DWORDs giving physical page numbers for the four
  6094.           4K pages of a 16K EMS frame (00000000h if non-UMB page)
  6095. var    BYTE    number of EMS handle info records following
  6096.     16N BYTEs    EMS handle info records (see #1205)
  6097. ---version 1.10+ ---
  6098.     DWORD    realmode INT 67 vector (used by Windows to set breakpoints)
  6099.     DWORD    physical address of HMA page table values
  6100.     BYTE    number of free page entries following
  6101.      2N DWORDs    free page entries
  6102.         each is:
  6103.             DWORD    physical page number
  6104.             DWORD    number of consecutive physical pages
  6105.     BYTE    number of XMS handle info records following
  6106.         00h if memory manager does not emulate XMS or has real mode
  6107.           XMS code which can execute in the Windows environment
  6108.     12N BYTEs    XMS handle info records (see #1206)
  6109.     BYTE    number of free UMB info records following
  6110.      2N WORDs    free UMB info records
  6111.         each is:
  6112.             WORD    real mode start segment
  6113.             WORD    size in paragraphs
  6114. ---version 1.11---
  6115.      20 BYTEs    blank-padded maker name
  6116.      20 BYTEs    blank-padded product name
  6117.  
  6118. Format of EMS frame status record:
  6119. Offset    Size    Description    (Table 1203)
  6120.  00h    BYTE    frame type (see #1204)
  6121.  01h    BYTE    owner handle (00h/FFh = none) from frame including UMB
  6122.         index to UMB frame descriptors
  6123.  02h    WORD    logical page for frame, 7FFFh if none, FFFFh if non-EMS frame
  6124.  04h    BYTE    EMS physical page number (FFh for non-EMS = don't care???)
  6125.  05h    BYTE    flags for non-EMS frames (00h for EMS frame)
  6126.         bits 0,1 for first 4K, bits 2,3 for second 4K, etc:
  6127.           10: direct mapping (linear address = physical address)
  6128.           01: UMB mapping
  6129.  
  6130. Bitfields for EMS frame type:
  6131. Bit(s)    Description    (Table 1204)
  6132.  0    EMS frame
  6133.  1    (if EMS frame) in standard 64K page frame
  6134.  2    first 4K of frame is UMB
  6135.  3    second 4K of frame is UMB
  6136.  4    third 4K of frame is UMB
  6137.  5    last 4K of frame is UMB
  6138.  
  6139. Format of EMS handle info record:
  6140. Offset    Size    Description    (Table 1205)
  6141.  00h    BYTE    handle number (00h = system handle)
  6142.  01h    BYTE    flags
  6143.         bit 0: normal handle rather than system handle
  6144.         bit 2: ??? (set by some EMS managers)
  6145.  02h  8 BYTEs    EMS handle's name
  6146.  0Ah    WORD    number of 16K pages for handle
  6147.  0Ch    DWORD    physical address of page table entries forming page map
  6148. Note:    all values should be zero for the system handle if no large frame
  6149.       support is present
  6150.  
  6151. Format of XMS handle info record:
  6152. Offset    Size    Description    (Table 1206)
  6153.  00h    WORD    handle
  6154.  02h    WORD    flags
  6155.         bit 0: handle usable by Windows
  6156.             (already in use when Windows started if clear)
  6157.         bit 1: reserved (0)
  6158.  04h    DWORD    size in KB (may be zero, used only if flags bit 0 set)
  6159.  08h    DWORD    physical address (only if flags bit 0 set)
  6160. --------m-214402SF02-------------------------
  6161. INT 21 U - Memory Managers - GET MEMORY MANAGER VERSION
  6162.     AX = 4402h subfn 02h
  6163.     BX = file handle for device "EMMXXXX0"
  6164.     CX = 0002h (size of buffer in bytes)
  6165.     DS:DX -> buffer for memory manager version (see #1207)
  6166.         first byte must be 02h on entry
  6167. Return: CF clear if successful
  6168.         buffer filled
  6169.     CF set on error
  6170.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6171. Note:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  6172.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  6173. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 67/AH=3Fh
  6174.  
  6175. Format of memory manager version:
  6176. Offset    Size    Description    (Table 1207)
  6177.  00h    BYTE    major version
  6178.  01h    BYTE    minor version (binary)
  6179. --------m-214402-----------------------------
  6180. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  6181.     AX = 4402h
  6182.     BX = file handle for device "EMMXXXX0"
  6183.     CX = size of buffer in bytes (varies, see #1208)
  6184.     DS:DX -> buffer for returned data (see #1208)
  6185.         first byte must be set on entry to indicate desired data
  6186. Return: CF clear if successful
  6187.         buffer filled
  6188.     CF set on error
  6189.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6190. Notes:    an error is returned if the number of bytes to be read does not match
  6191.       the number of bytes returned for the specified data item
  6192.     this function is part of the interface which allows MS Windows to
  6193.       cooperate with memory managers
  6194. SeeAlso: AX=4402h/SF=00h,AX=4402h/SF=01h,AX=4402h/SF=02h,INT 67/AX=FFA5h
  6195.  
  6196. Format of EMM386.EXE data buffer:
  6197. Offset    Size    Description    (Table 1208)
  6198.  00h    BYTE    (call) function
  6199.         03h get ???
  6200.         04h get ???
  6201. ---function 03h---
  6202.  00h    WORD    ???
  6203.  02h    WORD    ???
  6204. ---function 04h---
  6205.  00h    WORD    segment of UMB containing EMM386 code/data
  6206.  02h    WORD    number of paragraphs of EMM386 code/data in UMB
  6207.  04h    WORD    ???
  6208. ----------214402-----------------------------
  6209. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  6210.     AX = 4402h
  6211.     BX = file handle for device "IFS$HLP$"
  6212.     CX = 0008h (size of buffer in bytes)
  6213.     DS:DX -> buffer for entry point record (see #1102 at AH=3Fh"IFSHLP")
  6214. Return: CF clear if successful
  6215.         buffer filled
  6216.     CF set on error
  6217.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6218. SeeAlso: AH=3Fh"IFSHLP"
  6219. --------D-214403-----------------------------
  6220. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  6221.     AX = 4403h
  6222.     BX = file handle referencing character device
  6223.     CX = number of bytes to write
  6224.     DS:DX -> data to write
  6225. Return: CF clear if successful
  6226.         AX = number of bytes actually written
  6227.     CF set on error
  6228.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6229. Notes:    format of data is driver-specific
  6230.       (also see separate entries below for some specific cases)
  6231.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  6232.       KEYSTACK.SYS driver will push the specified characters on the
  6233.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  6234.       driver will push the characters onto the keyboard stack
  6235.     this function was not supported by Digital Research's DOS-Plus
  6236. SeeAlso: AX=4400h,AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  6237. SeeAlso: INT 2F/AX=D44Dh,INT 2F/AX=D44Fh
  6238. --------c-214403-----------------------------
  6239. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - CACHE CONTROL
  6240.     AX = 4403h
  6241.     BX = handle for device "SMARTAAR"
  6242.     CX = number of bytes to write
  6243.     DS:DX -> SMARTDRV control block (see #1210)
  6244. Return: CF clear if successful
  6245.         AX = number of bytes actually written
  6246.         0000h if control block too small for given command
  6247.     CF set on error
  6248.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6249. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  6250.       interface, but does not do so correctly, often hanging the system;
  6251.       one should use the SmartDrive v4.x or NCache private interfaces
  6252.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  6253. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  6254.  
  6255. (Table 1209)
  6256. Values for SMARTDRV function code:
  6257.  00h    flush cache
  6258.  01h    flush and discard cache
  6259.  02h    disable caching (flushes and discards cache first)
  6260.  03h    enable caching
  6261.  04h    control write caching
  6262.  05h    set flushing tick count
  6263.  06h    lock cache contents
  6264.  07h    unlock cache contents
  6265.  08h    set flush-on-reboot flag
  6266.  09h    unused
  6267.  0Ah    control full-track caching
  6268.  0Bh    reduce cache size
  6269.  0Ch    increase cache size
  6270.  0Dh    set INT 13 chain address
  6271.  
  6272. Format of SMARTDRV control block:
  6273. Offset    Size    Description    (Table 1210)
  6274.  00h    BYTE    function code (see #1209)
  6275. ---functions 00h-03h,06h,07h---
  6276.  no additional fields
  6277. ---function 04h---
  6278.  01h    BYTE    write caching control action
  6279.         00h turn off write-through
  6280.         01h turn on write-through
  6281.         02h turn off write buffering (also flushes cache)
  6282.         03h turn on write buffering (also flushes cache)
  6283. ---function 05h---
  6284.  01h    WORD    number of timer ticks between cache flushes
  6285. ---function 08h---
  6286.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  6287. ---function 0Ah---
  6288.  01h    BYTE    full-track writes are
  6289.         00h not cached
  6290.         01h cached
  6291. ---functions 0Bh,0Ch---
  6292.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  6293. ---function 0Dh---
  6294.  01h    DWORD    new address to which to chain on INT 13
  6295. Note:    the previous address is not preserved
  6296. --------d-214403-----------------------------
  6297. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  6298.     AX = 4403h
  6299.     BX = file handle referencing character device for CD-ROM driver
  6300.     CX = number of bytes to write
  6301.     DS:DX -> control block (see #1211)
  6302. Return: CF clear if successful
  6303.         AX = number of bytes actually written
  6304.     CF set on error
  6305.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6306. Notes:    some device drivers support several subunits (that is more than one
  6307.       drive) but it is not possible to distinguish between them with this
  6308.       function; use INT 2F/AX=1510h or INT 2F/AX=0802h instead
  6309.     under Windows95, the "mscd$$$$" device cannot be opened so you cannot
  6310.       obtain the handle required by this function: use INT 2F/AX=1510h
  6311.       or INT 2F/AX=0802h instead
  6312. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h,INT 2F/AX=1510h
  6313.  
  6314. Format of CR-ROM control block:
  6315. Offset    Size    Description    (Table 1211)
  6316.  00h    BYTE    function code
  6317.         00h eject disk
  6318.         01h lock/unlock door
  6319.         02h reset drive
  6320.         03h control audio channel
  6321.         04h write device control string
  6322.         05h close tray
  6323. ---functions 00h,02h,05h---
  6324.  no further fields
  6325. ---function 01h---
  6326.  01h    BYTE    lock function
  6327.         00h unlock door
  6328.         01h lock door
  6329. ---function 03h---
  6330.  01h    BYTE    input channel (0-3) for output channel 0
  6331.  02h    BYTE    volume for output channel 0
  6332.  03h    BYTE    input channel (0-3) for output channel 1
  6333.  04h    BYTE    volume for output channel 1
  6334.  05h    BYTE    input channel (0-3) for output channel 2
  6335.  06h    BYTE    volume for output channel 2
  6336.  07h    BYTE    input channel (0-3) for output channel 3
  6337.  08h    BYTE    volume for output channel 3
  6338. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  6339.       right prime; a volume of 00h is off
  6340. ---function 04h---
  6341.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  6342.           interpretation
  6343. --------D-214403-----------------------------
  6344. INT 21 U - MS-DOS 7.0 - CONFIG$ device - SET??? CONFIGURATION INFORMATION
  6345.     AX = 4403h
  6346.     BX = file handle for character device "CONFIG$"
  6347.     CX = number of bytes to write
  6348.     DS:DX -> buffer containing ???
  6349. Return: CF clear if successful
  6350.         AX = number of bytes actually written
  6351.     CF set on error
  6352.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6353. Note:    IOCTL Output to CONFIG$ is only available while IO.SYS is booting
  6354.       the system; once CONFIG.SYS has been processed, this call always
  6355.       succeeds, ignoring any input
  6356. SeeAlso: AX=4403h"CONFIG$"
  6357. --------d-214403-----------------------------
  6358. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  6359.     AX = 4403h
  6360.     BX = handle for device "SCSITAPE"
  6361.     CX = number of bytes to write
  6362.     DS:DX -> SCSITAPE control block (see #1212)
  6363. Return: CF clear if successful
  6364.         AX = number of bytes actually written
  6365.     CF set on error
  6366.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6367. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  6368.  
  6369. Format of SCSITAPE control block:
  6370. Offset    Size    Description    (Table 1212)
  6371.  00h    WORD    command type
  6372.         'F' Format (argument 1 = interleave, argument 2 = format type)
  6373.         'E' Erase
  6374.         'R' Rewind
  6375.         'L' Load
  6376.         'N' No Load
  6377.         'S' Space (argument 1 = count, argument 2 = type)
  6378.         'M' File Mark (argument 1 = count)
  6379.         'A' Reassign
  6380.  02h    WORD    argument 1
  6381.  04h    WORD    argument 2
  6382.  06h    WORD    segment of command buffer
  6383.  08h    WORD    offset of command buffer
  6384.  0Ah    WORD    length of command buffer
  6385. --------E-214403-----------------------------
  6386. INT 21 U - AI Architects - OS/x86??? - API
  6387.     AX = 4403h
  6388.     BX = handle for device "AIA_OS"
  6389.     CX = number of bytes to write (ignored)
  6390.     DS:DX -> 12-byte buffer (see #1213), first byte is command:
  6391.           81h installation check
  6392.           82h get API entry point
  6393.           84h uninstall
  6394. Return: CF clear if successful
  6395.         AX = number of bytes actually written
  6396.         DS:DX buffer filled
  6397.     CF set on error
  6398.         AX = error code (01h,05h,06h,0Ch,0Dh) (see #1366 at AH=59h)
  6399. Notes:    these functions are only available if the DOS extender was loaded as a
  6400.       device driver in CONFIG.SYS
  6401.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  6402. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  6403. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  6404.  
  6405. Format of buffer on return:
  6406. Offset    Size    Description    (Table 1213)
  6407.  00h  4 BYTEs    signature "IABH"
  6408. ---if function 81h---
  6409.  (no additional fields)
  6410. ---if function 82h---
  6411.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  6412. ---if function 84h---
  6413.  04h    WORD    success indicator
  6414.  06h    WORD    segment of ???
  6415.  08h    WORD    segment of ??? memory block to free if nonzero
  6416.  0Ah    WORD    segment of ??? memory block to free if nonzero
  6417. --------V-214403-----------------------------
  6418. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  6419.     AX = 4403h
  6420.     BX = file handle for device "PGS1600$"
  6421.     CX = 0018h (size of buffer)
  6422.     DS:DX -> configuration buffer (see #1171 at AX=4402h"PGS1600")
  6423. Return: CF clear if successful
  6424.         AX = number of bytes actually written
  6425.     CF set on error
  6426.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6427. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  6428.       display adapter, which provides a 1600x1200 monochrome display as
  6429.       well as one of two emulations, MDA or CGA.
  6430. SeeAlso: AX=4402h"PGS1600"
  6431. --------N-214403-----------------------------
  6432. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  6433.     AX = 4403h
  6434.     BX = file handle referencing device "$IPCUST"
  6435.     CX, DS:DX ignored
  6436. Return: CF clear if successful
  6437.         AX destroyed
  6438.     CF set on error
  6439.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6440. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  6441.       version 2.05.     If less than the entire data is read or written,
  6442.       the next read/write continues where the previous one ended; this
  6443.       call and AX=4402h both reset the location at which the next
  6444.       operation starts to zero
  6445.     v2.1+ uses a new configuration method, but allows the installation
  6446.       of IPCUST.SYS for backward compatibility with other software which
  6447.       must read the PC/TCP configuration
  6448. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  6449. --------V-214403-----------------------------
  6450. INT 21 - Compaq AG1024.SYS - CPQ_MGES - IOCTL OUTPUT
  6451.     AX = 4403h
  6452.     BX = file handle referencing device "CPQ_MGES"
  6453.     DS:DX -> request packet (see #1214)
  6454.     CX ignored
  6455. Return: CF clear if successful
  6456.         AX destroyed
  6457.         data buffer filled (if applicable)
  6458.         first word of request packet set to number of bytes of data
  6459.           available (amount returned is smaller of this and requested
  6460.           amount)
  6461.     CF set on error
  6462.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6463. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  6464. SeeAlso: AX=4403h"RGDI"
  6465.  
  6466. Format of Compaq AG1024.SYS request packet:
  6467. Offset    Size    Description    (Table 1214)
  6468.  00h    WORD    function
  6469.         0000h get ??? (26h bytes)
  6470.         0001h get ??? (36h bytes)
  6471.         0002h set ??? (same as returned by function 0001h)
  6472.         0003h get ??? (6 bytes)
  6473.         0004h get ???
  6474.         0005h get ???
  6475.         0006h get ??? (10h bytes)
  6476.         0007h set ??? (same as returned by function 0006h)
  6477. ---functions 00h-03h,06h,07h---
  6478.  02h    WORD    size of data buffer
  6479.  04h    DWORD    -> buffer for function's data
  6480.  ---functions 04h,05h---
  6481.  02h    WORD    ???
  6482.  04h    WORD    size of data buffer
  6483.  06h    DWORD    -> buffer to receive data
  6484. --------V-214403-----------------------------
  6485. INT 21 - Compaq AG1024.SYS - RGDI - IOCTL OUTPUT
  6486.     AX = 4403h
  6487.     BX = file handle referencing device "$$$$RGDI"
  6488.     DS:DX -> request packet (see #1215)
  6489.     CX ignored
  6490. Return: CF clear if successful
  6491.         AX destroyed
  6492.         data buffer filled (if applicable)
  6493.         first word of request packet set to number of bytes of data
  6494.           available (amount returned is smaller of this and requested
  6495.           amount)
  6496.     CF set on error
  6497.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6498. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  6499. SeeAlso: AX=4402h"RGDI",AX=4403h"CPQ_MGES"
  6500.  
  6501. Format of Compaq AG1024.SYS request packet:
  6502. Offset    Size    Description    (Table 1215)
  6503.  00h    WORD    function
  6504.         0000h get entry points
  6505.         0001h get ???
  6506.  02h    DWORD    address of buffer for returned data
  6507. --------m-214403SF01-------------------------
  6508. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX OFF
  6509.     AX = 4403h subfn 01h
  6510.     BX = handle for device "386MAX$$"
  6511.     DS:DX -> BYTE 01h
  6512.     CX ignored
  6513. Return: DS:DX -> BYTE status (00h = successful)
  6514.     CF clear if successful
  6515.         AX destroyed
  6516.     CF set on error
  6517.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6518. Note:    this function will fail if any EMS or UMBs are in use
  6519. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6520. --------m-214403SF02-------------------------
  6521. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX ON
  6522.     AX = 4403h subfn 02h
  6523.     BX = handle for device "386MAX$$"
  6524.     DS:DX -> BYTE 02h
  6525.     CX ignored
  6526. Return: DS:DX -> BYTE status (00h = successful)
  6527.     CF clear if successful
  6528.         AX destroyed
  6529.     CF set on error
  6530.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6531. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6532. --------m-214403SF03-------------------------
  6533. INT 21 U - Qualitas 386MAX v6.01+ - SET STATE
  6534.     AX = 4403h subfn 03h
  6535.     BX = handle for device "386MAX$$"
  6536.     CX = number of bytes to copy (up to size of state buffer)
  6537.     DS:DX -> BYTE 03h followed by state buffer
  6538.           (see #1154 at AX=4402h"386MAX")
  6539. Return: CF clear if successful
  6540.         AX = number of bytes actually written
  6541.     CF set on error
  6542.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6543. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  6544.       (specifying the version of the state record) and the buffer must
  6545.       contain CX bytes AFTER the initial byte
  6546. SeeAlso: AX=4402h"386MAX"
  6547. --------m-214403SF05-------------------------
  6548. INT 21 U - Qualitas 386MAX v7.00+ - LIMIT AUTOMATIC ACTIVATION TO STD EMS CALLS
  6549.     AX = 4403h subfn 05h
  6550.     BX = handle for device "386MAX$$"
  6551.     DS:DX -> BYTE 05h
  6552.     CX ignored
  6553. Return: CF clear if successful
  6554.         AX destroyed
  6555.     CF set on error
  6556.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6557. Desc:    specifies that 386MAX will only shift from AUTO to ON mode on standard
  6558.       EMS calls INT 67/AH=40h-5Dh
  6559. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=06h
  6560. --------m-214403SF06-------------------------
  6561. INT 21 U - Qualitas 386MAX v7.00+ - ALLOW AUTOMATIC ACTIVATION ON ANY INT 67
  6562.     AX = 4403h subfn 06h
  6563.     BX = handle for device "386MAX$$"
  6564.     DS:DX -> BYTE 06h
  6565.     CX ignored
  6566. Return: CF clear if successful
  6567.         AX destroyed
  6568.     CF set on error
  6569.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6570. Desc:    specified that 386MAX should shift from AUTO to ON mode on any INT 67
  6571.       call other than INT 67/AH=3Fh
  6572. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  6573. --------n-214403-----------------------------
  6574. INT 21 U - PenDOS PENDEV.SYS - ???
  6575.     AX = 4403h
  6576.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  6577.     CX = size of buffer
  6578.     DS:DX -> buffer containing ???
  6579. Return: CF clear if successful
  6580.         buffer filled
  6581.     CF set on error
  6582.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6583. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  6584.       which provides pen capability to keyboard-based programs, is bundled
  6585.       with IBM DOS 6.1
  6586. Note:    this call sets the WORD at offset 1Ah into the device driver request
  6587.       header used to call the driver to 0000h.
  6588. SeeAlso: AX=4402h"PENDEV.SYS"
  6589. --------D-214404-----------------------------
  6590. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  6591.     AX = 4404h
  6592.     BL = drive number (00h = default, 01h = A:, etc.)
  6593.     CX = number of bytes to read
  6594.     DS:DX -> buffer
  6595. Return: CF clear if successful
  6596.         AX = number of bytes actually read
  6597.     CF set on error
  6598.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6599. Notes:    format of data is driver-specific
  6600.     this function was not supported by Digital Research's DOS-Plus
  6601. SeeAlso: AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  6602. --------k-214404-----------------------------
  6603. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  6604.     AX = 4404h
  6605.     BL = drive number (00h = default, 01h = A:, etc.)
  6606.     CX = 0004h
  6607.     DS:DX -> DWORD buffer to receive device driver address
  6608. Return: buffer filled with pointer into Stacker device driver (see #2238):
  6609.       driver + 19h if Stacker Anywhere controls this drive
  6610.       driver + 1Ah if Stacker controls this drive
  6611.       unchanged else
  6612. Notes:    in addition to returning the address of the Stacker device driver,
  6613.       this call also sets the volume number at offset 58h in the device
  6614.       driver (see #2238 at INT 25/AX=CDCDh)
  6615.     Stacker Anywhere does not link its built-in device driver into
  6616.       the standard device driver chain, but it can be found via CDS/DPB
  6617.     this call can be used as an installation check for all versions of
  6618.       Stacker and Stacker Anywhere to avoid the INT 25 call
  6619. SeeAlso: AX=4408h,AX=440Eh,AH=52h,INT 25/AX=CDCDh
  6620. --------k-214404-----------------------------
  6621. INT 21 - Stacker - GET STACVOL FILE SECTORS
  6622.     AX = 4404h
  6623.     BL = drive number (0 is current drive)
  6624.     CX = byte count (i.e., 200h = 1 sector)
  6625.     DS:DX -> buffer (see #1216)
  6626. Return: Data Buffer contains the number of sectors requested from the
  6627.       STACVOL physical file for the drive specified.
  6628.  
  6629. Format of Stacker buffer:
  6630. Offset    Size    Description    (Table 1216)
  6631.  00h    WORD    01CDh
  6632.  02h    WORD    sector count
  6633.  04h    DWORD    number of starting sector
  6634.  08h    DWORD    far pointer to Data Buffer
  6635. --------k-214404-----------------------------
  6636. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  6637.     AX = 4404h
  6638.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  6639.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  6640.     DS:DX -> data record (see #1217)
  6641. Return: CF clear if successful
  6642.         AX = number of bytes read
  6643.     CF set on error
  6644.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6645. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  6646.       expander by Vertisoft Systems, Inc.
  6647. InstallCheck:    for v2.6, scan memory for the signature "FAT 2.6  byte:",
  6648.       which is immediately followed by a data table (see #1218)
  6649. BUG:    VOPT (a disk optimizer by Golden Bow Software) assumes that any driver
  6650.       which returns the "correct" number of bytes when the first word of
  6651.       the buffer for the data record contains the signature value 4444h is
  6652.       DoubleDisk; a workaround is for the non-DoubleDisk driver to return
  6653.       no data if the signature is present
  6654. SeeAlso: AX=440Dh"DOS 3.2+"
  6655. Index:    installation check;DUBLDISK.SYS
  6656.  
  6657. Format of DUBLDISK data record:
  6658. Offset    Size    Description    (Table 1217)
  6659.  00h    WORD    (call) signature 4444h
  6660.  02h    BYTE    (call) function
  6661.             00h ???
  6662.             01h ???
  6663. ---function 00h---
  6664.  02h    BYTE    (ret) ???
  6665.  03h    BYTE    (ret) ???
  6666. ---function 01h---
  6667.  02h    WORD    (ret) 4444h
  6668.  04h    WORD    allocation unit size???
  6669.  06h    WORD    ???
  6670.  08h    WORD    ???
  6671.  0Ah    BYTE    ???
  6672.  
  6673. Format of DUBLDISK signature data table:
  6674. Offset    Size    Description    (Table 1218)
  6675.  00h  5 BYTEs    ???
  6676.  05h    BYTE    first drive number
  6677.  06h    BYTE    number of drives
  6678.  07h    ???
  6679. --------k-214404-----------------------------
  6680. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  6681.     AX = 4404h
  6682.     BL = drive number (00h = default, 01h = A:, etc)
  6683.     CX = 000Ah (size of DSPACKET structure)
  6684.     DS:DX -> DSPACKET structure (see #1219)
  6685. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6686.         AX = number of bytes actually transferred
  6687.     CF set on error
  6688.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6689. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6690.  
  6691. Format of DoubleSpace DSPACKET structure:
  6692. Offset    Size    Description    (Table 1219)
  6693.  00h    WORD    signature 444Dh ("DM")
  6694.  02h    BYTE    command code
  6695.         46h ('F') flush internal caches
  6696.         49h ('I') flush and invalidate internal caches
  6697.  03h    WORD    result code
  6698.         (ret) 4F4Bh ("OK") if successful, else unchanged
  6699.  05h  5 BYTEs    padding
  6700. --------k-214404-----------------------------
  6701. INT 21 - DBLSPACE.BIN v6.2 - IOCTL - GET ??? FOR SPECIFIED DRIVE
  6702.     AX = 4404h
  6703.     BL = drive number (00h = default, 01h = A:, etc)
  6704.     CX = size of DSPACKET structure (ignored in DOS 6.2)
  6705.     DS:DX -> DSPACKET structure (see #1220)
  6706. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6707.         AX = number of bytes actually transferred
  6708.     CF set on error
  6709.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6710. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6711.  
  6712. Format of DoubleSpace DSPACKET structure:
  6713. Offset    Size    Description    (Table 1220)
  6714.  00h    WORD    signature 444Dh ("DM")
  6715.  02h    BYTE    command code
  6716.         53h ('S') get ??? for specified drive
  6717.  03h    WORD    result code
  6718.         (ret) 4F4Bh ("OK") if successful, else unchanged
  6719.  05h    DWORD    (ret) pointer to 96-byte ??? data
  6720.  09h    DWORD    (ret) pointer to ??? data
  6721.  0Dh  3 BYTEs    reserved
  6722. --------k-214404-----------------------------
  6723. INT 21 U - DoubleTools v1.0 - GET ???
  6724.     AX = 4404h
  6725.     BL = drive number (00h = default, 01h = A:, etc)
  6726.     CX = 0006h
  6727.     DS:DX -> DoubleTools structure (see #1221)
  6728. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6729.         AX = number of bytes actually transferred
  6730.     CF set on error
  6731.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6732. Note:    the Transporter device driver has the signature 55h 61h 50h 74h
  6733.       ("DaPt") twelve bytes after it beginning
  6734.  
  6735. Format of DoubleTools structure:
  6736. Offset    Size    Description    (Table 1221)
  6737.  00h    WORD    (call) signature 55h AAh
  6738.         (ret) signature 78h 70h ("xp")
  6739.  02h    WORD    (call) signature 52h 16h
  6740.         (ret) ???
  6741.  04h    WORD    (ret) segment of driver's DS (same as its PSP)
  6742. --------d-214404-----------------------------
  6743. INT 21 U - xDISK v3.31 - CONFIGURE
  6744.     AX = 4404h
  6745.     BL = drive number (00h = default, 01h = A:, etc)
  6746.     CX = 0047h (length of version string)
  6747.     DS:DX -> 79-byte buffer for version string and ???
  6748.     DS:0081h = commandline containing new switches for driver
  6749. Return: CF clear if successful
  6750.         AX = number of bytes actually transferred
  6751.     CF set on error
  6752.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6753. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  6754. SeeAlso: AX=4405h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  6755. --------c-214404-----------------------------
  6756. INT 21 - COMBI-disk v1.13 - GET DATA RECORD
  6757.     AX = 4404h
  6758.     BL = drive number (00h = default, 01h = A:, etc)
  6759.     CX = 0032h (length of data packet)
  6760.     DS:DX -> buffer for data packet (see #1222)
  6761. Return: CF clear if successful
  6762.         AX = number of bytes actually transferred
  6763.     CF set on error
  6764.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6765. Program: COMBI-disk is a shareware combination cache and RAMdisk sharing a
  6766.       single pool of memory by Vadim V. Vlasov
  6767. InstallCheck:    scan the valid drives for one which returns a correctly-sized
  6768.       data packet with the proper signature in the first field
  6769. SeeAlso: AX=4405h"COMBI"
  6770. Index:    installation check;COMBI-disk
  6771.  
  6772. Format of COMBI-disk data packet:
  6773. Offset    Size    Description    (Table 1222)
  6774.  00h  6 BYTEs    ASCIZ signature "COMBI"
  6775.  06h    WORD    version (high byte = major, low = decimal minor version)
  6776.  08h    BYTE    current options
  6777.  09h    BYTE    sectors per allocation block
  6778.  0Ah    WORD    maximum buffer in KB
  6779.  0Ch    WORD    current buffer in KB (less than max if XMS memory being lent)
  6780.  0Eh    WORD    total number of allocation blocks
  6781.  10h    WORD    current number of allocation blocks
  6782.  12h    WORD    number of blocks being used by RAM disk
  6783.  14h    WORD    number of blocks being used by cache or unused
  6784.  16h    WORD    number of dirty cache blocks
  6785.  18h    WORD    number of blocks which could not be written out due to errors
  6786.  1Ah    WORD    total number of read requests
  6787.  1Ch    WORD    total number of sectors read
  6788.  1Eh    WORD    number of BIOS read requests (cache misses)
  6789.  20h    WORD    number of sectors read via BIOS (cache misses)
  6790.  22h    WORD    total number of write requests
  6791.  24h    WORD    total number of sectors written
  6792.  26h    WORD    number of BIOS write requests
  6793.  28h    WORD    number of sectors written via BIOS
  6794.  2Ah    WORD    number of RAM disk read requests
  6795.  2Ch    WORD    number of sectors read from RAM disk
  6796.  2Eh    WORD    number of RAM disk write requests
  6797.  30h    WORD    number of sectors written to RAM disk
  6798. --------d-214404-----------------------------
  6799. INT 21 - SFS v1.00 - GET CONFIGURATION INFORMATION
  6800.     AX = 4404h
  6801.     BL = drive number (00h = default, 01h = A:, etc)
  6802.     CX = 001Ah (length of data packet)
  6803.     DS:DX -> buffer for data packet (see #1223)
  6804. Return: CF clear if successful
  6805.         AX = number of bytes actually transferred
  6806.     CF set on error
  6807.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6808. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  6809.       Peter C. Gutmann
  6810. SeeAlso: AX=4405h"SFS"
  6811.  
  6812. Format of SFS data packet:
  6813. Offset    Size    Description    (Table 1223)
  6814.  00h  4 BYTEs    signature string "SFS1"
  6815.  04h    WORD    SFS unit number (0-based)
  6816.  06h    WORD    drive on which the SFS volume is mounted
  6817.  08h    DWORD    sector offset of logical volume from start of physical volume
  6818.         0 if logical volume = physical volume
  6819.  0Ch    WORD    flag: 00h = no disk mounted, 01h = disk mounted
  6820.  0Eh    WORD    flag: 00h read/write, 01h read-only
  6821.  10h    WORD    quick-unmount hotkey
  6822.         (high byte = shift state, low = scan code) (see #0005)
  6823.  12h    WORD    auto-unmount time in minutes, or 0000h if already expired, or
  6824.         FFFFh if not set
  6825.  14h    WORD    time in minutes remaining before auto-unmount
  6826.  16h    WORD    internal driver check code
  6827.         0000h no error
  6828.         0001h driver consistency check failed
  6829.         0002h unit consistency check failed
  6830.  18h    WORD    disk access mode
  6831.         0000h BIOS
  6832.         0001h IDE direct access
  6833.         0002h SCSI direct access
  6834. --------D-214405-----------------------------
  6835. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  6836.     AX = 4405h
  6837.     BL = drive number (00h = default, 01h = A:, etc)
  6838.     CX = number of bytes to write
  6839.     DS:DX -> data to write
  6840. Return: CF clear if successful
  6841.         AX = number of bytes actually written
  6842.     CF set on error
  6843.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6844. Notes:    format of data is driver-specific
  6845.     this function was not supported by Digital Research's DOS-Plus
  6846. SeeAlso: AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  6847. --------d-214405-----------------------------
  6848. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  6849.     AX = 4405h
  6850.     BX = drive number (00h = default, 01h = A:, etc)
  6851.     CX = number of bytes to write
  6852.     DS:DX -> SCSIDISK control block (see also #1212 at AX=4403h"ST-01")
  6853. Return: CF clear if successful
  6854.         AX = number of bytes actually written
  6855.     CF set on error
  6856.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6857. SeeAlso: AX=4403h"ST-01"
  6858. --------k-214405-----------------------------
  6859. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  6860.     AX = 4405h
  6861.     BL = drive number (00h = default, 01h = A:, etc)
  6862.     CX = 000Ah (size of DSPACKET structure)
  6863.     DS:DX -> DSPACKET structure (see #1224)
  6864. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  6865.         AX = number of bytes actually transferred
  6866.     CF set on error
  6867.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6868. Note:    this call is identical to the documented AX=4404h
  6869. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  6870.  
  6871. Format of DoubleSpace DSPACKET structure:
  6872. Offset    Size    Description    (Table 1224)
  6873.  00h    WORD    signature 444Dh ("DM")
  6874.  02h    BYTE    command code
  6875.         46h ('F') flush internal caches
  6876.         49h ('I') flush and invalidate internal caches
  6877.  03h    WORD    result code
  6878.         (ret) 4F4Bh ("OK") if successful, else unchanged
  6879.  05h  5 BYTEs    padding
  6880. --------d-214405-----------------------------
  6881. INT 21 U - xDISK v3.31 - ???
  6882.     AX = 4405h
  6883.     BL = drive number (00h = default, 01h = A:, etc)
  6884.     CX = number of bytes to write
  6885.     DS:DX -> buffer containing version string
  6886.     ???
  6887. Return: CF clear if successful
  6888.         AX = number of bytes actually transferred
  6889.     CF set on error
  6890.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6891. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  6892. SeeAlso: AX=4404h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  6893. --------d-214405-----------------------------
  6894. INT 21 - COMBI-disk v1.13 - CONTROL COMBI-disk
  6895.     AX = 4405h
  6896.     BL = drive number (00h = default, 01h = A:, etc) for RAM disk
  6897.     CX = number of bytes to write
  6898.     DS:DX -> buffer containing command packet (see #1226)
  6899. Return: CF clear if successful
  6900.         AX = number of bytes actually transferred
  6901.     CF set on error
  6902.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6903. SeeAlso: AX=4404h"COMBI"
  6904.  
  6905. (Table 1225)
  6906. Values for COMBI-disk command code:
  6907.  80h    flush cache
  6908.  81h    change options byte
  6909.  82h    shrink memory
  6910.  83h    expand memory
  6911.  84h    get dirty block information
  6912.  85h    reset write errors
  6913.  86h    reset counters
  6914.  
  6915. Format of COMBI-disk command packet:
  6916. Offset    Size    Description    (Table 1226)
  6917.  00h    WORD    version
  6918.  02h    BYTE    command code (see #1225)
  6919. ---command code 80h---
  6920.  no additional fields
  6921. ---command code 81h---
  6922.  03h    BYTE    new options byte (see #1227)
  6923. ---command code 82h---
  6924.  03h    WORD    number of KB to release
  6925. ---command code 83h---
  6926.  03h    WORD    number of KB to expand
  6927. ---command code 84h---
  6928.  03h    DWORD    -> buffer for block info (see #1228)
  6929. ---command code 85h---
  6930.  03h    DWORD    block ID
  6931. ---command code 86h---
  6932.  03h    BYTE    which counters to reset
  6933.         bit 0: hard disk read counts
  6934.         bit 1: hard disk write counts
  6935.         bit 2: RAM disk read/write counts
  6936. Note:    multiple commands may be placed in a single packet by stringing
  6937.       together as many command/argument pairs as desired
  6938.  
  6939. Bitfields for COMBI-disk options byte:
  6940. Bit(s)    Description    (Table 1227)
  6941.  0    cache off
  6942.  1    cache frozen
  6943.  2    write caching enabled
  6944.  3    delayed writing disabled
  6945.  5    fix memory allocation (no XMS lending)
  6946.  6    no 'sector not found' error
  6947.  
  6948. Format of COMBI-disk block info:
  6949. Offset    Size    Description    (Table 1228)
  6950.  00h    DWORD    block ID
  6951.  04h    BYTE    bitmask of valid sectors in block
  6952.  05h    BYTE    bitmask of dirty sectors in block
  6953.  06h    BYTE    last error returned by BIOS
  6954.  07h    BYTE    number of errors
  6955. --------D-214405-----------------------------
  6956. INT 21 - SFS v1.00 - DRIVER CONTROL
  6957.     AX = 4405h
  6958.     BL = drive number (00h = default, 01h = A:, etc)
  6959.     CX = number of bytes to write
  6960.     DS:DX -> data to write (see #1230)
  6961. Return: CF clear if successful
  6962.         AX = number of bytes actually written
  6963.     CF set on error
  6964.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  6965. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  6966.       Peter C. Gutmann
  6967. SeeAlso: AX=4404h"SFS"
  6968.  
  6969. (Table 1229)
  6970. Values for SFS control function:
  6971.  00h    "PACKET_SET_DISKINFO"     set disk parameters
  6972.  01h    "PACKET_SET_KEYINFO"     set keying information
  6973.  02h    "PACKET_SET_READONLY"     select read/write or read-only
  6974.  03h    "PACKET_SET_DRIVENO"     set drive number to mount
  6975.  04h    "PACKET_SET_MOUNTSTATUS" set mount status
  6976.  05h    "PACKET_SET_UNMOUNT"     set/clear quick-unmount hotkey
  6977.  06h    "PACKET_SET_TIMEOUT"     set/clear auto-unmount timeout
  6978.  
  6979. Format of SFS control data packet:
  6980. Offset    Size    Description    (Table 1230)
  6981.  00h    WORD    signature 4330h ('C0')
  6982.  02h    WORD    function (see #1229)
  6983. ---function 00h---
  6984.  04h    WORD    sector size in bytes
  6985.  06h    BYTE    sectors per cluster
  6986.  07h    WORD    number of boot sectors
  6987.  09h    BYTE    number of copies of FAT
  6988.  0Ah    WORD    size of root directory in entries
  6989.  0Ch    WORD    number of sectors on disk, 16-bit
  6990.  0Eh    BYTE    media descriptor byte
  6991.  0Fh    WORD    sectors per FAT
  6992.  11h    WORD    sectors per track
  6993.  13h    WORD    number of heads
  6994.  15h    DWORD    number of hidden sectors
  6995.  19h    DWORD    number of sectors on disk, 32-bit
  6996. ---function 01h---
  6997.  04h 20 BYTEs    master IV for encrypted disk
  6998.  18h 64 BYTEs    NDC/SHS keying information
  6999. ---function 02h---
  7000.  04h    WORD    read-only state: 00h read-only, 01h read/write
  7001. ---function 03h---
  7002.  04h    WORD    drive number (see #1231)
  7003.  06h    DWORD    sector offset of logical volume from start of physical volume
  7004.         0 if logical volume = physical volume
  7005. ---function 04h---
  7006.  04h    WORD    mount status (00h unmounted, 01h mounted)
  7007. ---function 05h---
  7008.  04h    WORD    hotkey (high byte = shift state, low byte = scan code or 00h)
  7009.         (see #0005)
  7010.         0000h to disable hotkey
  7011. ---function 06h---
  7012.  04h    WORD    timeout in minutes before automatic unmount
  7013.         0000h to disable auto-unmount
  7014. Notes:    the data for function 00h corresponds to a DOS BPB (see AH=53h)
  7015.     functions 00h, 01h, and 03h automatically unmount the encrypted drive
  7016.     unmounting a drive with function 04h also destroys the encryption
  7017.       information in the driver and forces all dirty buffers to be flushed
  7018.  
  7019. Bitfields for SFS drive number:
  7020. Bit(s)    Description    (Table 1231)
  7021.  15-12    drive access mode
  7022.     0000 BIOS access
  7023.     0001 direct IDE access
  7024.     0010 direct SCSI access
  7025. ---if BIOS access---
  7026.  11-8    unused (0)
  7027.  7-0    BIOS drive number
  7028. ---if IDE access---
  7029.  11-8    unused (0)
  7030.  7-0    IDE drive number
  7031. ---if SCSI access---
  7032.  11-8    SCSI host number
  7033.  7-4    SCSI target ID
  7034.  3-0    SCSI logical unit number
  7035. --------D-214406-----------------------------
  7036. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  7037.     AX = 4406h
  7038.     BX = file handle
  7039. Return: CF clear if successful
  7040.         AL = input status
  7041.         00h not ready (device) or at EOF (file)
  7042.         FFh ready
  7043.         AH may be destroyed (refer to note)
  7044.     CF set on error
  7045.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  7046. Notes:    files may not register as being at EOF if positioned there by AH=42h
  7047.     under DOS 5.0, on a successful return, AH contains either the next
  7048.       character which will be read or 1Ah if at EOF; under a Windows95
  7049.       DOS box, AH seems to be either unchanged or 00h
  7050.     this function was not supported by Digital Research's DOS-Plus
  7051. BUG:    the CLOCK$ device under DR DOS 3.41 always indicates 'Ready'; this was
  7052.       corrected in v5.0
  7053. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  7054. --------D-214407-----------------------------
  7055. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  7056.     AX = 4407h
  7057.     BX = file handle
  7058. Return: CF clear if successful
  7059.         AL = input status
  7060.         00h not ready
  7061.         FFh ready
  7062.     CF set on error
  7063.         AX = error code (01h,05h,06h,0Dh) (see #1366 at AH=59h/BX=0000h)
  7064. Notes:    for DOS 2+, files are always ready for output, even if the disk is
  7065.       full or no media is in the drive
  7066.     this function was not supported by Digital Research's DOS-Plus
  7067. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  7068. --------D-214408-----------------------------
  7069. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  7070.     AX = 4408h
  7071.     BL = drive number (00h = default, 01h = A:, etc)
  7072. Return: CF clear if successful
  7073.         AX = media type (0000h removable, 0001h fixed)
  7074.     CF set on error
  7075.         AX = error code (01h,0Fh) (see #1366 at AH=59h/BX=0000h)
  7076. Notes:    in addition to the normal operation, if Stacker is installed, this
  7077.       call also sets the volume number at offset 58h in the Stacker
  7078.       device driver (except under DR DOS 3.41-5.0, which do not pass
  7079.       through this call to the driver; use AX=440Eh instead)
  7080.       (see AX=4404h"Stacker",AX=440Eh,INT 25/AX=CDCDh)
  7081.     this function was not supported by Digital Research's DOS-Plus
  7082. SeeAlso: AX=4400h,AX=4404h"Stacker",AX=4409h,INT 2F/AX=122Bh
  7083. --------D-214409-----------------------------
  7084. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  7085.     AX = 4409h
  7086.     BL = drive number (00h = default, 01h = A:, etc)
  7087. Return: CF clear if successful
  7088.         DX = device attribute word
  7089.         bit 15: drive is SUBSTituted
  7090.         bit 13: (DR DOS 3.41/5.0 local drives only) always set
  7091.             media ID needed
  7092.         bit 12: drive is remote
  7093.         bit  9: direct I/O not allowed
  7094.     CF set on error
  7095.         AX = error code (01h,0Fh) (see #1366 at AH=59h/BX=0000h)
  7096. Notes:    on local drives, DX bits not listed above are the attribute word from
  7097.       the device driver header (see #1332 at AH=52h); for remote drives,
  7098.       the other bits appear to be undefined for MS-DOS versions prior to
  7099.       5.0 (they are all cleared in DOS 5+)
  7100.     checking whether DX=0800h on return appears to be a fairly reliable
  7101.       method for detecting Microsoft's RAMDRIVE, though not for other
  7102.       ramdisks (there appears to be no simple yet foolproof method for
  7103.       detecting ramdisks, although the presence of only a single copy of
  7104.       the FAT and only a single head on non-removable devices is a fairly
  7105.       good indicator); for Windows95, RAMDRIVE returns DX=4800h
  7106.     this function was not supported by Digital Research's DOS-Plus
  7107. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  7108. --------D-21440A-----------------------------
  7109. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  7110.     AX = 440Ah
  7111.     BX = handle
  7112. Return: CF clear if successful
  7113.         DX = attribute word (as stored in SFT)
  7114.         bit 15: set if remote
  7115.         bit 14: date/time not set on close
  7116.     CF set on error
  7117.         AX = error code (01h,06h) (see #1366 at AH=59h/BX=0000h)
  7118. Notes:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  7119.       the file server on which the handle is located in CX
  7120.     DR DOS 3.41 and 5.0 clear all bits of DX except bit 15; Novell DOS 7
  7121.       fully supports this function
  7122.     this function was not supported by Digital Research's DOS-Plus
  7123. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  7124. --------D-21440B-----------------------------
  7125. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  7126.     AX = 440Bh
  7127.     CX = pause between retries (default 1)
  7128.     DX = number of retries (default 3)
  7129. Return: CF clear if successful
  7130.     CF set on error
  7131.         AX = error code (01h) (see #1366 at AH=59h/BX=0000h)
  7132. Notes:    delay is dependent on processor speed (value in CX specifies number of
  7133.       64K-iteration empty loops to execute)
  7134.     if DX=0000h on entry, the retry count is left unchanged
  7135.     this function was not supported by Digital Research's DOS-Plus
  7136. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  7137. --------D-21440C-----------------------------
  7138. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  7139.     AX = 440Ch
  7140.     BX = device handle
  7141.     CH = category code (see #1232)
  7142.     CL = function number (see #1233)
  7143.     DS:DX -> parameter block (see #1234,#1235,#1236,#1237,#1238,#1239)
  7144.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  7145.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  7146. Return: CF set on error
  7147.         AX = error code (see #1366 at AH=59h/BX=0000h)
  7148.     CF clear if successful
  7149.         DS:DX -> iteration count if CL=65h
  7150.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  7151.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  7152. Note:    DR DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
  7153.       does not support a retry counter
  7154. SeeAlso: AX=440Dh"DOS 3.2+",INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  7155. SeeAlso: INT 2F/AX=1A01h
  7156.  
  7157. (Table 1232)
  7158. Values for IOCTL category code:
  7159.  00h    unknown (DOS 3.3+)
  7160.  01h    COMn: (DOS 3.3+)
  7161.  03h    CON (DOS 3.3+)
  7162.  05h    LPTn:
  7163.  9Eh    Media Access Control driver (STARLITE)
  7164.  00h-7Fh reserved for Microsoft
  7165.  80h-FFh reserved for OEM/user-defined
  7166.  
  7167. (Table 1233)
  7168. Values for generic character IOCTL function:
  7169.  00h    MAC driver Bind (STARLITE) (see #1234)
  7170.  45h    set iteration (retry) count (see #1235)
  7171.  4Ah    select code page (see #1236)
  7172.  4Ch    start code-page preparation (see #1237)
  7173.  4Dh    end code-page preparation (see #1238)
  7174.  5Fh    set display information (DOS 4.0+) (see #1239)
  7175.  65h    get iteration (retry) count
  7176.  6Ah    query selected code page (see #1236)
  7177.  6Bh    query prepare list (see #1240)
  7178.  7Fh    get display information (DOS 4.0+) (see #1239)
  7179. Note:    bit assignments for function code:
  7180.         bit 7: set to ignore if unsupported, clear to return error
  7181.         bit 6: set if passed to driver, clear if intercepted by DOS
  7182.         bit 5: set if queries data from device, clear if sends command
  7183.         bits 4-0: subfunction
  7184.  
  7185. Format of parameter block for function 00h:
  7186. Offset    Size    Description    (Table 1234)
  7187.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  7188.  08h    WORD    version
  7189.  0Ah    WORD    flags
  7190.         bit 0: media requires connect or listen request before use
  7191.         bit 1: network is a LAN (broadcast/multicast supported)
  7192.         bit 2: point-to-point network
  7193.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  7194.         by MAC driver)
  7195.  0Eh    WORD    context
  7196.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  7197.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  7198.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  7199.  16h    WORD    addressing format (filled in by MAC driver)
  7200.         0000h general addressing
  7201.         0001h Ethernet addressing
  7202.         0002h Token Ring addressing
  7203.         0003h Token Bus addressing
  7204.  18h    DWORD    Send entry point (filled in by MAC driver)
  7205.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  7206.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  7207.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  7208.  
  7209. Format of parameter block for function 45h:
  7210. Offset    Size    Description    (Table 1235)
  7211.  00h    WORD    number of times output is attempted before driver assumes
  7212.           device is busy
  7213.  
  7214. Format of parameter block for functions 4Ah and 6Ah:
  7215. Offset    Size    Description    (Table 1236)
  7216.  00h    WORD    length of data
  7217.  02h    WORD    code page ID (see #1446 at INT 21/AX=6602h)
  7218.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  7219.           start/end for each of N ranges (DOS 4.0)
  7220.     WORD    0000h  end of data (DOS 4.0)
  7221.  
  7222. Format of parameter block for function 4Ch:
  7223. Offset    Size    Description    (Table 1237)
  7224.  00h    WORD    flags
  7225.         DISPLAY.SYS = 0000h
  7226.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  7227.             prepare cartridge selection
  7228.  02h    WORD    length of remainder of parameter block
  7229.  04h    WORD    number of code pages following
  7230.  06h  N WORDs    code page 1,...,N
  7231.  
  7232. Format of parameter block for function 4Dh:
  7233. Offset    Size    Description    (Table 1238)
  7234.  00h    WORD    length of data
  7235.  02h    WORD    code page ID (see #1446 at INT 21/AX=6602h)
  7236.  
  7237. Format of parameter block for functions 5Fh and 7Fh:
  7238. Offset    Size    Description    (Table 1239)
  7239.  00h    BYTE    level (0 for DOS 4.x-6.0)
  7240.  01h    BYTE    reserved (0)
  7241.  02h    WORD    length of following data (14)
  7242.  04h    WORD    control flags
  7243.         bit 0 set for blink, clear for intensity
  7244.         bits 1-15 reserved
  7245.  06h    BYTE    mode type (1=text, 2=graphics)
  7246.  07h    BYTE    reserved (0)
  7247.  08h    WORD    colors
  7248.         0000h = monochrome
  7249.         else N bits per pixel
  7250.  0Ah    WORD    pixel columns
  7251.  0Ch    WORD    pixel rows
  7252.  0Eh    WORD    character columns
  7253.  10h    WORD    character rows
  7254.  
  7255. Format of parameter block for function 6Bh:
  7256. Offset    Size    Description    (Table 1240)
  7257.  00h    WORD    length of following data
  7258.  02h    WORD    number of hardware code pages
  7259.  04h  N WORDs    hardware code pages 1,...,N
  7260.     WORD    number of prepared code pages
  7261.       N WORDs    prepared code pages 1,...,N
  7262. --------d-21440C-----------------------------
  7263. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  7264.     AX = 440Ch
  7265.     BX = device handle
  7266.     CH = category code
  7267.         07h tape (ASPITAPE.SYS)
  7268.     CL = function
  7269.         01h "mtop" - perform tape operation
  7270.         02h "mtget" - get tape status
  7271.         03h ignore end-of-tape errors
  7272.         04h enable end-of-tape errors
  7273.     DS:DX -> parameter block (see #1241,#1242)
  7274. Return: CF set on error
  7275.         AX = error code (see #1366 at AH=59h/BX=0000h)
  7276.     CF clear if successful
  7277.         DS:DX -> data block
  7278. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  7279.       SCSI Programming Interface (ASPI).  It provides the following device
  7280.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  7281.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  7282.       also be the following names 'MTx' and 'NMTx' which default to 1024
  7283.       byte blocks.    The names may also have a '$' appended to try and make
  7284.       them unique from file names of 'RMT0' etc.
  7285.     once opend these devices must be put into RAW mode
  7286. SeeAlso: AX=4402h"ASPI"
  7287.  
  7288. Format of ASPITAPE.SYS mtop parameter block:
  7289. Offset    Size    Description    (Table 1241)
  7290.  00h    WORD    operation code
  7291.         00h "MTWEOF" - write an end-of-file record
  7292.         01h "MTFSF" - forward space file
  7293.         02h "MTBSF" - backward space file
  7294.         03h "MTFSR" - forward space record
  7295.         04h "MTBSR" - backward space record
  7296.         05h "MTREW" - rewind
  7297.         06h "MTOFFL" - rewind and unload
  7298.         07h "MTNOP" - perform TEST UNIT READY
  7299.  02h    DWORD    repetition count
  7300.  
  7301. Format of ASPITAPE.SYS mtget parameter block:
  7302. Offset    Size    Description    (Table 1242)
  7303.  00h    BYTE    ASPI host ID
  7304.  01h    BYTE    SCSI target ID
  7305.  02h    BYTE    SCSI logical unit number
  7306.  03h    BYTE    device parameters
  7307.         bit 0: drive must use fixed-block read and write
  7308.         bit 7: drive is an ASPI device
  7309.  04h    BYTE    current device state (see #1243)
  7310.  05h    BYTE    unit number within driver
  7311.  06h    WORD    fixed block blocksize
  7312.  08h    BYTE    last SCSI status
  7313.  09h    BYTE    last SCSI sense key
  7314.  0Ah    WORD    last SCSI opcode (packed) (see #1244)
  7315.  0Ch    WORD    residual bytes from SCSI opcode
  7316.  
  7317. Bitfields for ASPITAPE.SYS current device state:
  7318. Bit(s)    Description    (Table 1243)
  7319.  0    device currently opened in buffered mode
  7320.  1    drive currently opened in nonbuffered mode
  7321.  2    rewind drive on last close
  7322.  3    drive has been written on
  7323.  4    drive has been read from
  7324.  5    next read will return 0 bytes
  7325.  6    EOM will resemble EOF
  7326.  7    drive may be busy rewinding
  7327.  
  7328. Bitfields for SCSI opcode:
  7329. Bit(s)    Description    (Table 1244)
  7330.  0-7    SCSI operation (SCSI packet byte 0)
  7331.  8-10    SCSI flags (SCSI packet byte 1)
  7332.  11-12    ASPI "Direction Bits" (ASPI SRB byte 3)
  7333. --------D-21440D-----------------------------
  7334. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  7335.     AX = 440Dh
  7336.     BL = drive number (00h=default,01h=A:,etc)
  7337.     CH = category code (see #1245)
  7338.     CL = minor code (function) (see #1246)
  7339.     DS:DX -> (DOS) parameter block (see #1247,#1249,#1250,#1251,#1252)
  7340.     SI:DI -> (OS/2 comp box) parameter block (see #1253,#1255,#1256,#1259)
  7341. Return: CF set on error
  7342.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7343.     CF clear if successful
  7344.         DS:DX -> data block if CL=60h or CL=61h
  7345. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  7346.       entries in the BPB for diskettes.
  7347.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  7348.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  7349.     DR DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
  7350.       other minor codes return error code 16h
  7351.     some PCMCIA calls reportedly appear to be dangerous for MS-DOS versions
  7352.       prior to 5.0
  7353.     minor code 60h normally produces no I/O except with AutoMount=1 for
  7354.       DBLSPACE/DRVSPACE
  7355. SeeAlso: AX=440Ch,AX=440Dh/CX=084Ah,AX=440Dh/CX=0871h,AH=69h,INT 2F/AX=0802h
  7356. SeeAlso: INT 2F/AX=122Bh
  7357.  
  7358. (Table 1245)
  7359. Values for block device IOCTL category code:
  7360.  08h    disk drive
  7361.  48h    FAT32 disk drive
  7362.  00h-7Fh reserved for Microsoft
  7363.  80h-FFh reserved for OEM/user-defined
  7364.  
  7365. (Table 1246)
  7366. Values for generic block IOCTL minor code:
  7367.  00h    (OS/2)    \ used to lock/unlock a drive
  7368.  01h    (OS/2)    /
  7369.  40h    set device parameters (see #1247)
  7370.  41h    write logical device track (see #1249)
  7371.  42h    format and verify logical device track (see #1250)
  7372.  46h    (DOS 4.0+) set volume serial number (see #1252,AH=69h)
  7373.  47h    (DOS 4.0+) set access flag (see #1253)
  7374.  48h    (Enh. Disk Drive Spec) set media lock state (see #1254,INT 13/AH=45h)
  7375.  49h    (Enh. Disk Drive Spec) eject media in drive (see INT 13/AH=49h)
  7376.     no parameter block required
  7377.  4Ah    (MS-DOS 7.0) lock logical volume (see AX=440Dh/CX=084Ah)
  7378.  4Bh    (MS-DOS 7.0) lock physical volume (see AX=440Dh/CX=084Bh)
  7379.  50h    (PCMCIA) attribute memory write
  7380.  51h    (PCMCIA) common memory write
  7381.  52h    (PCMCIA) force media change (DOS 5+ ???) (see #1255)
  7382.  53h    (PCMCIA) erase drive
  7383.  54h    (PCMCIA) erase media
  7384.  56h    (PCMCIA) set erase status callback
  7385.  57h    (PCMCIA) append Card Information Structure (CIS) tuple
  7386.  58h    (PCMCIA) erase CIS tuples
  7387.  60h    get device parameters (see #1247)
  7388.  61h    read logical device track (see #1249)
  7389.  62h    verify logical device track (see #1251)
  7390.  66h    (DOS 4.0+) get volume serial number (see #1252,AH=69h)
  7391.  67h    (DOS 4.0+) get access flag (see #1253)
  7392.  68h    (DOS 5.0+) sense media type (see #1256)
  7393.  6Ah    (MS-DOS 7.0) unlock logical volume (see AX=440Dh/CX=086Ah)
  7394.     no parameter block required
  7395.  6Bh    (MS-DOS 7.0) unlock physical volume (see AX=440Dh/CX=086Bh)
  7396.     no parameter block required
  7397.  6Ch    (MS-DOS 7.0) get lock flag (see AX=440Dh/CX=086Ch)
  7398.     no parameter block required
  7399.  6Dh    (MS-DOS 7.0) enumerate open files (see AX=440Dh/CX=086Dh)
  7400.  6Eh    (MS-DOS 7.0) find swap file (see AX=440Dh/CX=086Eh)
  7401.  6Fh    (MS-DOS 7.0) get drive map information (see #1257)
  7402.  70h    (PCMCIA) attribute memory read
  7403.  70h    (MS-DOS 7.0) get current lock state (see AX=440Dh/CX=0870h)
  7404.     no parameter block required
  7405.  71h    (MS-DOS 7.0) get first cluster (see AX=440Dh/CX=0871h)
  7406.  73h    (PCMCIA) get memory media information (DOS 5+ ???) (see #1259)
  7407.  76h    (PCMCIA) get erase status callback
  7408.  77h    (PCMCIA) get first Card Information Structure (CIS) tuple
  7409.  78h    (PCMCIA) get next CIS tuple
  7410.  7Fh    (PCMCIA) get ??? information (see #1260,#1261)
  7411.  
  7412. Format of parameter block for functions 40h, 60h:
  7413. Offset    Size    Description    (Table 1247)
  7414.  00h    BYTE    special functions
  7415.         bit 0 set if function to use current BPB, clear if Device
  7416.               BIOS Parameter Block field contains new default BPB
  7417.         bit 1 set if function to use track layout fields only
  7418.             must be clear if CL=60h
  7419.         bit 2 set if all sectors in track same size (should be set)
  7420.         bits 3-7 reserved (MS-DOS, Novell DOS 7)
  7421.         bit 5: skip head settling time (WinDOS 2.11)
  7422.         bit 6: format access flag (WinDOS 2.11)
  7423.  01h    BYTE    device type (see #1248)
  7424.  02h    WORD    device attributes
  7425.         bit 0 set if nonremovable medium
  7426.         bit 1 set if door lock ("changeline") supported
  7427.         bits 2-15 reserved
  7428.  04h    WORD    number of cylinders
  7429.  06h    BYTE    media type
  7430.         for 1.2M drive
  7431.             00h 1.2M disk (default)
  7432.             01h 320K/360K disk
  7433.         F8h for DUBLDISK.SYS v2.6 expanded drives
  7434.         always 00h for other drive types
  7435.  07h 31 BYTEs    device BPB (see #1349 at AH=53h), bytes after BPB offset 1Eh
  7436.           omitted; final six bytes only transferred on function 40h
  7437.           with BYTE 00h bit 0 set for MS-DOS 5.0
  7438. ---function 40h only---
  7439.  26h    WORD    number of sectors per track (start of track layout field)
  7440.         (maximum 63)
  7441.  28h  N word pairs: number,size of each sector in track
  7442. ---category code 48h (FAT32), function 40h---
  7443.  07h 53 BYTEs    extended BPB (see #1350)
  7444.  3Ch 32 BYTEs    reserved
  7445.  5Ch    WORD    number of track table entries
  7446.  5Eh 2N WORDs    sector table (word pairs: number/size of each sector in track)
  7447. ---category code 48h (FAT32), function 60h---
  7448.  07h 53 BYTEs    extended BPB (see #1350)
  7449.  3Ch 32 BYTEs    reserved
  7450.  
  7451. (Table 1248)
  7452. Values for device type:
  7453.  00h    320K/360K disk
  7454.  01h    1.2M disk
  7455.  02h    720K disk
  7456.  03h    single-density 8-inch disk
  7457.  04h    double-density 8-inch disk
  7458.  05h    fixed disk
  7459.  06h    tape drive
  7460.  07h    (DOS 3.3+) other type of block device, normally 1.44M floppy
  7461.  08h    read/write optical disk
  7462.  09h    (DOS 5+) 2.88M floppy
  7463.  
  7464. Format of parameter block for functions 41h, 61h:
  7465. Offset    Size    Description    (Table 1249)
  7466.  00h    BYTE    special functions (reserved, must be zero)
  7467.  01h    WORD    number of disk head
  7468.  03h    WORD    number of disk cylinder
  7469.  05h    WORD    number of first sector to read/write
  7470.  07h    WORD    number of sectors
  7471.  09h    DWORD    transfer address
  7472. Note:    under Windows95, a volume must be locked (see AX=440Dh/CX=084Bh) in
  7473.       order to perform direct accesses such as track reads and writes
  7474.       with this IOCTL function
  7475.  
  7476. Format of parameter block for function 42h:
  7477. Offset    Size    Description    (Table 1250)
  7478.  00h    BYTE    reserved, must be zero (DOS <3.2)
  7479.           bit 0=0: format/verify track
  7480.             1: format status call (DOS 3.2+), don't actually format
  7481.           bit 1: format multiple tracks, require additional WORD
  7482.               (hard disks only)
  7483.           bits 2-7 reserved, must be zero
  7484.         value on return (DOS 3.3+):
  7485.           00h    specified tracks, sectors/track supported by BIOS
  7486.           01h    function not supported by BIOS
  7487.           02h    specified tracks, sectors/track not allowed for drive
  7488.           03h    no disk in drive
  7489.  01h    WORD    number of disk head
  7490.  03h    WORD    number of disk cylinder
  7491. ---BYTE 00h bit 1 set---
  7492.  05h    WORD    number of tracks to format
  7493.  
  7494. Format of parameter block for function 62h:
  7495. Offset    Size    Description    (Table 1251)
  7496.  00h    BYTE    reserved, must be zero (DOS <3.2)
  7497.           bit 0=0: verify single track
  7498.             1: verify multiple tracks
  7499.           bits 1-7 reserved, must be zero
  7500.         value on return (DOS 3.3+):
  7501.           00h    specified tracks, sectors/track supported by BIOS
  7502.           01h    function not supported by BIOS
  7503.           02h    specified tracks, sectors/track not allowed for drive
  7504.           03h    no disk in drive
  7505.  01h    WORD    number of disk head
  7506.  03h    WORD    number of disk cylinder
  7507.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  7508.  
  7509. Format of parameter block for functions 46h, 66h:
  7510. Offset    Size    Description    (Table 1252)
  7511.  00h    WORD    (call) info level (should be 0000h)
  7512.  02h    DWORD    disk serial number (binary)
  7513.  06h 11 BYTEs    volume label or "NO NAME    "
  7514.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   "
  7515.           (generally CL=66h only, but MS-DOS 5.0 will write the
  7516.           given filesystem type to the disk)
  7517. Note:    under MS-DOS 7.0 or a Windows95 DOS box, the volume label field can
  7518.       return as all blanks even when a volume label has been set (the Win95
  7519.       installation seems to blank the volume label field in the partition
  7520.       boot sector; once LABEL has been run, the volume label is reported
  7521.       correctly)
  7522. SeeAlso: AH=69h
  7523.  
  7524. Format of parameter block for functions 47h, 67h:
  7525. Offset    Size    Description    (Table 1253)
  7526.  00h    BYTE    special-function field (must be zero)
  7527.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  7528.  
  7529. Format of parameter block for function 48h:
  7530. Offset    Size    Description    (Table 1254)
  7531.  00h    BYTE    (call) locking operation
  7532.         00h lock media in drive
  7533.         01h unlock media
  7534.         02h get locking status
  7535.  01h    BYTE    (ret) drive's lock status (number of pending locks on drive)
  7536. Note:    also supported by MS-DOS 7.0
  7537.  
  7538. Format of parameter block for function 52h:
  7539.  00h    BYTE    (call) unused???    (Table 1255)
  7540.         (ret) 00h if flash/ATA drive but no card inserted
  7541.             unchanged otherwise
  7542. Notes:    the absense of a flash card should be tested by checking the DOS error
  7543.       code rather than the returned byte
  7544.     the parameter byte is cleared to 00h erroneously by the Award
  7545.       PCDISK.EXE v1.02c PCMCIA/ATA driver if no ATA card is inserted
  7546.       (bug corrected in PCDISK.EXE v1.02h and later)
  7547.     not supported by the SystemSoft ATADRV.EXE and the Phoenix PCMATA.SYS
  7548.       PCMCIA/ATA drivers
  7549.  
  7550. Format of parameter block for function 68h:
  7551. Offset    Size    Description    (Table 1256)
  7552.  00h    BYTE    01h for default media type, 00h for any other media type
  7553.         (see also INT 13/AH=20h"Compaq")
  7554.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  7555.  
  7556. Format of parameter block for function 6Fh:
  7557. Offset    Size    Description    (Table 1257)
  7558.  00h    BYTE    (call) length of this buffer (in bytes)
  7559.  01h    BYTE    (ret) number of bytes in parameter block actually used
  7560.  02h    BYTE    (ret) drive flags (see #1258)
  7561.  03h    BYTE    (ret) physical drive number
  7562.         00h-7Fh floppy
  7563.         80h-FEh hard
  7564.         FFh no physical drive
  7565.  04h    DWORD    (ret) bitmap of logical drives associated with physical drive
  7566.         bit 0 = drive A:, etc.
  7567.  08h    QWORD    (ret) relative block address of partition start
  7568.  
  7569. Bitfields for Get Drive Map Information drive flags:
  7570. Bit(s)    Description    (Table 1258)
  7571.  0    protected-mode driver for logical drive
  7572.  1    protected-mode driver in use for physical drive corresponding to the
  7573.       logical drive
  7574.  2    drive available only in protected mode
  7575.  3    protected-mode drive supports media ejection
  7576.  4    drive issues media insertion and removal notifications
  7577. SeeAlso: #1257
  7578.  
  7579. Format of parameter block for function 73h:
  7580. Offset    Size    Description    (Table 1259)
  7581.  00h    BYTE    ???
  7582.         00h ATA card inserted ???
  7583.         80h ATA card not inserted ???
  7584.  01h    BYTE    length of parameter block ???
  7585.         apparently always 40h
  7586.  02h    BYTE    ???
  7587.         00h ATA card not inserted ???
  7588.         0Dh ATA card inserted ???
  7589.  03h  2 BYTEs    ??? (apparently always 00h)
  7590.  05h    BYTE    drive number (0=first) ???
  7591.  06h    BYTE    total number of drives ???
  7592.  07h    BYTE    ???
  7593.         00h ATA card not inserted ???
  7594.         01h ATA card inserted ???
  7595.  08h 17 BYTEs    ???
  7596.  19h    BYTE    ???
  7597.         00h ATA card not inserted ???
  7598.         01h ATA card inserted ???
  7599.  1Ah    BYTE    ??? (apparently always 01h)
  7600.  1Bh    BYTE    ???
  7601.         00h ATA card not inserted ???
  7602.         01h ATA card inserted ???
  7603.  1Ch  2 BYTEs    ??? (apparently always 0015h)
  7604.  1Eh  2 BYTEs    ???
  7605.  20h  2 BYTEs    ??? (apparently always 0110h)
  7606.  22h 15 BYTEs    ???
  7607.  31h  2 BYTEs    ??? (apparently always 7000h)
  7608.  33h 11 BYTEs    driver signature
  7609.         "AWARD PDISK" for Award PCDISK.EXE PCMCIA/ATA driver
  7610.         "MS-BIOS    " for HP 200LX generic ATA driver
  7611.  3Eh  2 BYTEs    ???
  7612. Notes:    parameter structure possibly depends on driver
  7613.     this function is not supported by the SystemSoft ATADRV.EXE and the
  7614.       Phoenix PCMATA.SYS PCMCIA/ATA drivers
  7615.  
  7616. Format of parameter block for function 7Fh for SystemSoft ATADRV.EXE:
  7617. Offset    Size    Description    (Table 1260)
  7618.  00h    DWORD    -> unknown location within driver
  7619. Note:    function supported by the SystemSoft ATADRV.EXE PCMCIA/ATA driver
  7620.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  7621. SeeAlso: #1261
  7622.  
  7623. Format of parameter block for function 7Fh for Phoenix PCMATA.SYS:
  7624. Offset    Size    Description    (Table 1261)
  7625.  00h  8 BYTEs    ???
  7626. Note:    this function supported by the Phoenix PCMATA.SYS PCMCIA/ATA driver
  7627.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  7628. SeeAlso: #1260
  7629. --------D-21440DCX084A-----------------------
  7630. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK LOGICAL VOLUME
  7631.     AX = 440Dh
  7632.     CX = 084Ah (category code 08h, minor code 4Ah)
  7633.     BL = drive number (00h=default,01h=A:,etc)
  7634.     BH = lock level (00h-04h)
  7635.     DX = drive permissions (see #1262) for Level 1 lock or second
  7636.         Level 0 lock when formatting
  7637. Return: CF set on error
  7638.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7639.     CF clear if successful
  7640. Notes:    the logical volume must be locked before direct disk accesses are
  7641.       permitted by Windows95
  7642.     the commandline LOCK issues a level 4 lock
  7643. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  7644. SeeAlso: AX=440Dh/CX=086Ch
  7645.  
  7646. Bitfields for drive permissions:
  7647. Bit(s)    Description    (Table 1262)
  7648.  0    allow writes
  7649.  1    disallow new file mappings
  7650.  2    volume locked for formatting
  7651. --------D-21440DCX084B-----------------------
  7652. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK PHYSICAL VOLUME
  7653.     AX = 440Dh
  7654.     CX = 084Bh (category code 08h, minor code 4Bh)
  7655.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  7656.     BH = lock level (00h-03h)
  7657.     DX = drive permissions (see #1262) for Level 1 lock or second
  7658.         Level 0 lock when formatting
  7659. Return: CF set on error
  7660.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7661.     CF clear if successful
  7662. Note:    the physical volume must be locked before direct disk writes via
  7663.       INT 13 are permitted by Windows95
  7664. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  7665. SeeAlso: AX=440Dh/CX=086Ch
  7666. --------D-21440DCX086A-----------------------
  7667. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
  7668.     AX = 440Dh
  7669.     CX = 086Ah (category code 08h, minor code 6Ah)
  7670.     BL = drive number (00h=default,01h=A:,etc)
  7671. Return: CF set on error
  7672.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7673.     CF clear if successful
  7674. Note:    the logical volume must be locked before direct disk accesses via
  7675.       INT 13 are permitted by Windows95
  7676. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  7677. --------D-21440DCX086B-----------------------
  7678. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
  7679.     AX = 440Dh
  7680.     CX = 086Bh (category code 08h, minor code 6Bh)
  7681.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  7682. Return: CF set on error
  7683.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7684.     CF clear if successful
  7685. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  7686. --------D-21440DCX086C-----------------------
  7687. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET LOCK FLAG STATE
  7688.     AX = 440Dh
  7689.     CX = 086Ch (category code 08h, minor code 6Ch)
  7690.     BL = drive number (00h=default,01h=A:,etc)
  7691. Return: CF set on error
  7692.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7693.     CF clear if successful
  7694.         AX = access flag (see #1263)
  7695. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=084Bh
  7696. SeeAlso: AX=440Dh/CX=0870h
  7697.  
  7698. (Table 1263)
  7699. Values for drive access flag:
  7700.  0000h    no writes/file mappings since last call
  7701.  0001h    write operation has occurred since last call
  7702.  0002h    file mapping has occurred since last call
  7703. Note:    function 6Ch resets the access flag every time it is called
  7704. --------D-21440DCX086D-----------------------
  7705. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - ENUMERATE OPEN FILES
  7706.     AX = 440Dh
  7707.     CX = 086Dh (category code 08h, minor code 6Dh)
  7708.     BL = drive number (00h=default,01h=A:,etc)
  7709.     DS:DX -> buffer for ASCIZ pathname
  7710.     SI = file index (0000h to number of open files-1)
  7711.     DI = enumeration type (0000h all files, 0001h unmovable files)
  7712. Return: CF set on error
  7713.         AX = error code (01h,02h,12h,etc.) (see #1366 at AH=59h/BX=0000h)
  7714.         0012h if file index is out of range
  7715.     CF clear if successful
  7716.         AX = file open mode (BX from AX=6C00h or AX=716Ch)
  7717.         CX = file type (see #1264)
  7718. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Ch
  7719. SeeAlso: AX=440Dh/CX=086Eh,AX=6C00h,AX=716Ch
  7720.  
  7721. (Table 1264)
  7722. Values for file type:
  7723.  0000h    normal file
  7724.  0001h    memory-mapped file (unmovable)
  7725.  0002h    unmovable file
  7726.  0004h    swap file
  7727. --------D-21440DCX086E-----------------------
  7728. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - FIND SWAP FILE
  7729.     AX = 440Dh
  7730.     CX = 086Eh (category code 08h, minor code 6Eh)
  7731.     BL = drive number (00h=default,01h=A:,etc)
  7732.     DS:DX -> buffer for ASCIZ pathname
  7733.     SI = file index
  7734.     DI = enumeration type
  7735. Return: CF set on error
  7736.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7737.     CF clear if successful
  7738.         AX = pager type
  7739.         0001h no pager
  7740.         0002h paging through MS-DOS
  7741.         0003h protected-mode pager
  7742.         CX:BX = swap file size in 4K pages
  7743. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Dh
  7744. --------D-21440DCX0870-----------------------
  7745. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET CURRENT LOCK STATE
  7746.     AX = 440Dh
  7747.     CX = 0870h (category code 08h, minor code 70h)
  7748.     BL = drive number (00h=default,01h=A:,etc)
  7749. Return: CF set on error
  7750.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7751.     CF clear if successful
  7752.         AX = current lock level (0-3) or FFFFh if not locked
  7753.         CX = lock permissions if AX<>FFFFh (see #1262)
  7754. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch
  7755. --------D-21440DCX0871-----------------------
  7756. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET FIRST CLUSTER
  7757.     AX = 440Dh
  7758.     CX = 0871h (category code 08h, minor code 71h)
  7759.     BX = filename character set (see #1265)
  7760.     DS:DX -> ASCIZ pathname for file or directory
  7761. Return: CF set on error
  7762.         AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h)
  7763.     CF clear if successful
  7764.         DX:AX = first cluster number
  7765. Note:    this function finds any file or directory regardless of attributes,
  7766.       except that it will not find volume labels
  7767. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch,#1041
  7768.  
  7769. (Table 1265)
  7770. Values for character set:
  7771.  00h    Windows ANSI
  7772.  01h    current OEM character set
  7773.  02h    Unicode
  7774. --------D-21440E-----------------------------
  7775. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  7776.     AX = 440Eh
  7777.     BL = drive number (00h=default,01h=A:,etc)
  7778. Return: CF set on error
  7779.         AX = error code (01h,0Fh) (see #1366 at AH=59h/BX=0000h)
  7780.     CF clear if successful
  7781.         AL = 00h block device has only one logical drive assigned
  7782.          1..26 the last letter used to reference the drive (1=A:,etc)
  7783. Notes:    DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  7784.       always returns AL=00h
  7785.     in addition to the normal operation, if Stacker is installed, this
  7786.       call also sets the volume number at offset 58h in the Stacker
  7787.       device driver (DR DOS 3.41-5.0 only; use AX=4408h otherwise)
  7788.       (see AX=4404h"Stacker",INT 25/AX=CDCDh)
  7789. SeeAlso: AX=4408h,AX=440Fh,INT 2F/AX=122Bh
  7790. --------D-21440F-----------------------------
  7791. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  7792.     AX = 440Fh
  7793.     BL = physical drive number (00h=default,01h=A:,etc))
  7794. Return: CF set on error
  7795.         AX = error code (01h,0Fh) (see #1366 at AH=59h/BX=0000h)
  7796.     CF clear if successful
  7797.         drive now responds to next logical drive number
  7798. Notes:    maps logical drives to physical drives, similar to DOS's treatment of
  7799.       a single physical floppy drive as both A: and B:
  7800.     DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  7801.       always returns an error on this function
  7802. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  7803. --------D-214410-----------------------------
  7804. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  7805.     AX = 4410h
  7806.     BX = handle for device
  7807.     CH = category code (see #1232)
  7808.     CL = function code (see #1233)
  7809. Return: CF clear if successful
  7810.         AX = 0000h    specified IOCTL function is supported
  7811.     CF set on error
  7812.         AL = 01h    IOCTL capability not available
  7813. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  7814.       standard DOS 3.2 set may use this call first to see whether a
  7815.       particular call is supported
  7816. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4411h
  7817. --------d-214410BXFFFF-----------------------
  7818. INT 21 U - NewSpace - ENABLE DRIVER
  7819.     AX = 4410h
  7820.     BX = FFFFh
  7821. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  7822.       all files as they are written and decompresses them as they are read
  7823. Note:    compressed files are not accessible unless the driver is enabled
  7824. SeeAlso: AX=4411h/BX=FFFFh
  7825. --------D-214411-----------------------------
  7826. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  7827.     AX = 4411h
  7828.     BL = drive number
  7829.     CH = category code (see #1245)
  7830.     CL = function code (see #1246)
  7831. Return: CF clear if successful
  7832.         AX = 0000h    specified IOCTL function is supported
  7833.     CF set on error
  7834.         AL = 01h    IOCTL capability not available
  7835. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  7836.       standard DOS 3.2 set may use this call first to see whether a
  7837.       particular call is supported
  7838. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4410h
  7839. --------d-214411BXFFFF-----------------------
  7840. INT 21 U - NewSpace - DISABLE DRIVER
  7841.     AX = 4411h
  7842.     BX = FFFFh
  7843. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  7844.       all files as they are written and decompresses them as they are read
  7845. Note:    compressed files are not accessible unless the driver is enabled
  7846. SeeAlso: AX=4410h/BX=FFFFh
  7847. --------O-214412-----------------------------
  7848. INT 21 O - DR DOS 5.0-6.0 - DETERMINE DOS TYPE
  7849.     AX = 4412h
  7850.     CF set
  7851. Return: CF set if not DR DOS
  7852.         AX = error code (see #1366 at AH=59h/BX=0000h)
  7853.     CF clear if DR DOS
  7854.         DX = AX = version code (see #1267)
  7855. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  7856.       identical to AX=4452h
  7857. SeeAlso: AX=4452h
  7858. --------d-214412BXFFFF-----------------------
  7859. INT 21 U - NewSpace - INSTALLATION CHECK???
  7860.     AX = 4412h
  7861.     BX = FFFFh
  7862. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  7863.     BX:DX -> ???
  7864.     CX = ???
  7865. SeeAlso: AX=4411h/BX=FFFFh
  7866. --------d-214413BXFFFF-----------------------
  7867. INT 21 U - NewSpace - GET ???
  7868.     AX = 4413h
  7869.     BX = FFFFh
  7870. Return: AX = code segment of NewRes (resident driver for NewSpace)
  7871.     BX = offset of ???
  7872. SeeAlso: AX=4412h/BX=FFFFh
  7873. --------O-214414-----------------------------
  7874. INT 21 OU - DR DOS 5.0-6.0 - SET GLOBAL PASSWORD
  7875.     AX = 4414h
  7876.     DS:DX -> password string (blank-padded to 8 characters)
  7877. Desc:    Specify the master password for accessing files.
  7878. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  7879.       identical to AX=4454h
  7880. SeeAlso: AX=4454h
  7881. --------d-214414BXFFFF-----------------------
  7882. INT 21 U - NewSpace - DEBUGGING DUMP
  7883.     AX = 4414h
  7884.     BX = FFFFh
  7885. Return: debugging dump written to X:\NEWSPACE.SMP
  7886. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  7887. --------O-214416-----------------------------
  7888. INT 21 OU - DR DOS 5.0-6.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  7889.     AX = 4416h to 4418h
  7890. Note:    these obsolete subfunctions (which are no longer supported in Novell
  7891.       DOS 7) are identical to AX=4456h through 4458h
  7892. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  7893. --------O-214451-----------------------------
  7894. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  7895.     AX = 4451h
  7896. Return: CF set if not Concurrent DOS
  7897.         AX = error code (see #1366 at AH=59h/BX=0000h)
  7898.     CF clear if successful
  7899.         AH = single-user/multiuser nature (see #3761)
  7900.         10h single-user
  7901.             AL = operating system version ID (see #1267)
  7902.         14h multiuser
  7903.             AL = operating system version ID (see #1266)
  7904. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  7905.       in the environment variable VER
  7906.     use this function if you are looking for multiuser capabilities,
  7907.       AX=4452h for single-user
  7908.     this function should never return the single-user values
  7909. SeeAlso: AX=4452h,AX=4459h
  7910.  
  7911. (Table 1266)
  7912. Values for Digital Research operating system version ID:
  7913.  32h    Concurrent PC DOS 3.2
  7914.  41h    Concurrent DOS 4.1
  7915.  50h    Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  7916.  60h    Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  7917.  62h    Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  7918.  66h    DR Multiuser DOS 5.1
  7919.  67h    Concurrent DOS 5.1
  7920. SeeAlso: #3761,#3694
  7921. --------O-214452-----------------------------
  7922. INT 21 - DR DOS 3.41+ - DETERMINE DOS TYPE/GET DR DOS VERSION
  7923.     AX = 4452h ("DR")
  7924.     CF set
  7925. Return: CF set if not DR DOS
  7926.         AX = error code (see #1366 at AH=59h/BX=0000h)
  7927.     CF clear if DR DOS
  7928.         AX = version code
  7929.         AH = single-user/multiuser nature (see #3761)
  7930.         10h single-user
  7931.             AL = operating system version ID (see #1267)
  7932.         14h multiuser
  7933.             AL = operating system version ID (see #1266)
  7934.         DX modified (refer to note below)
  7935. Notes:    the DR DOS version is stored in the environment variable VER
  7936.     use this function if looking for single-user capabilities, AX=4451h
  7937.       if looking for multiuser; this call should never return multiuser
  7938.       values
  7939.     in DR DOS 3.41-6.0, DX=AX on return; for Novell DOS 7, DH=AH but DL=00h
  7940.       (reportedly, DH=00h when booting NWDOS7 from installation disks)
  7941.     Novell DOS 7 returns error code 0001h if SETVER x.255 is in effect for
  7942.       the calling program, or SETVER /G x.255 is in effect
  7943. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  7944.  
  7945. (Table 1267)
  7946. Values for Digital Research operating system version ID:
  7947.  41h    DOS Plus 1.2
  7948.  60h    DOS Plus 2.0 or 2.1
  7949.  63h    DR DOS 3.41
  7950.  64h    DR DOS 3.42
  7951.  65h    DR DOS 5.0
  7952.  67h    DR DOS 6.0
  7953.  70h    PalmDOS
  7954.  71h    DR DOS 6.0 March 1993 "business update"
  7955.  72h    Novell DOS 7.0
  7956.  73h    OpenDOS 7.02
  7957. SeeAlso: #1266,#3761,#3694
  7958.  
  7959. Bitfields for CP/M type indicator:
  7960. Bit(s)    Description    (Table 3761)
  7961.  7-4    CPU type
  7962.     0000 = 8080
  7963.     0001 = 8086
  7964.  3-0    OS type
  7965.     0000 = CP/M
  7966.     0001 = MP/M
  7967.     0002 = CP/Net
  7968.     0004 = multiuser
  7969. SeeAlso: #1267
  7970. --------O-214454-----------------------------
  7971. INT 21 U - DR DOS 3.41+ - SET GLOBAL PASSWORD
  7972.     AX = 4454h
  7973.     DS:DX -> password string (blank-padded to 8 characters)
  7974. Desc:    Specify the master password for accessing files.
  7975. SeeAlso: AX=4303h,AX=4414h
  7976. --------O-214456-----------------------------
  7977. INT 21 U - DR DOS 5.0+ - HISTORY BUFFER CONTROL
  7978.     AX = 4456h
  7979.     DL = control flags (see #1268)
  7980. Return: AL = previous value of state flags (see #1269)
  7981. Note:    DR DOS 6.0 only checks bit 0 and ignores the rest of DL
  7982. SeeAlso: #1270
  7983.  
  7984. Bitfields for control flags:
  7985. Bit(s)    Description    (Table 1268)
  7986.  0    whose buffer: 0=application, 1=COMMAND.COM
  7987. ---Novell DOS 7---
  7988.  1    toggle HISTORY usage
  7989.  2    toggle INSERT state
  7990. Note:    only one bit at a time may be used
  7991.  
  7992. Bitfields for state flags:
  7993. Bit(s)    Description    (Table 1269)
  7994.  0    HISTORY buffer enabled
  7995.  1    INSERT enabled
  7996.  2-5    unused
  7997.  7    whose buffer: 0=application, 1=COMMAND.COM
  7998. --------O-214457-----------------------------
  7999. INT 21 U - DR DOS 5.0-6.0 - SHARE/HILOAD CONTROL
  8000.     AX = 4457h
  8001.     DH = subfunction
  8002.         00h enable/disable SHARE
  8003.         DL = 00h disable
  8004.            = 01h enable
  8005.            else Return: AX = ???
  8006.         01h get HILOAD status
  8007.         Return: AX = status
  8008.                 0000h off
  8009.                 0001h on
  8010.         02h set HILOAD status
  8011.         DL = new state (00h off, 01h on)
  8012.         Return: AX = ???
  8013.         other
  8014.         Return: AX = ???
  8015. Note:    This was seen called by COMMAND.COM of DR DOS 6.0; it does not seem
  8016.       to be supported by Novell DOS 7
  8017. SeeAlso: AX=4457h/DX=FFFFh
  8018. --------O-214457DXFFFF-----------------------
  8019. INT 21 OU - DR DOS 6.0 - GET SHARE STATUS
  8020.     AX = 4457h
  8021.     DX = FFFFh
  8022. Return: AX = SHARE status
  8023. Note:    not supported by Novell DOS 7
  8024. SeeAlso: INT 2F/AX=1000h
  8025. --------O-214458-----------------------------
  8026. INT 21 U - DR DOS 5.0+ internal - GET POINTER TO INTERNAL VARIABLE TABLE
  8027.     AX = 4458h
  8028. Return: ES:BX -> internal variable table (see #1270,#1271)
  8029.     AX = ??? (0B50h for DR DOS 5.0, 0A56h for DR DOS 6.0, 0FE4h for
  8030.           Novell DOS 7)
  8031. SeeAlso: AX=4452h
  8032.  
  8033. Format of DR DOS 5.0-6.0 internal variable table:
  8034. Offset    Size    Description    (Table 1270)
  8035.  00h    WORD    ???
  8036.  02h    WORD    segment of ???
  8037.  04h    WORD    offset within DOS data segment of history control structure
  8038.           for COMMAND.COM history buffer (see #1272)
  8039.  06h    WORD    offset within DOS data segment of history control structure
  8040.           for application history buffer (see #1272)
  8041.  08h    BYTE    initial history state flags (see #1269)
  8042.  09h  2 BYTEs    ???
  8043.  0Bh    WORD    KB of extended memory at startup
  8044.  0Dh    BYTE    number of far jump entry points
  8045.  0Eh    WORD    segment containing far jumps to DR DOS entry points (see #1273)
  8046.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  8047.           memory block (see #1274) or 0000h if none; segment is FFFFh
  8048.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  8049.           or 0000h if already used
  8050. ---DR DOS 6.0---
  8051.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  8052.         memory block (see #1274) or 0000h if none; segment is FFFFh
  8053.  16h  8 BYTEs    ???
  8054.  1Eh    WORD    offset in DOS data segment of full COUNTRY.SYS filename
  8055.  20h  8 BYTEs    ???
  8056.  28h    WORD    offset in DOS data segment of SHARE hook table
  8057.  2Ah  2 BYTEs    ???
  8058.  2Ch    WORD    offset in DOS data segment of far pointer to INT 2F/AX=1000h
  8059.           handler
  8060. Notes:    the segment used for the DR DOS 6.0 CONFIG environment variables
  8061.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  8062.       called from CONFIG.SYS. The word is set to zero later when the area
  8063.       is copied to the COMMAND.COM environment space.  This allows
  8064.       CONFIG.SYS to pass information to AUTOEXEC.BAT.
  8065.     the Novell DOS 7 KEYB uses offsets 10h,14h, and 2Ch in the same was
  8066.       as for DR DOS 6.0, so it is likely that the entire table is the same
  8067.  
  8068. Format of Novell DOS 7 internal variable table:
  8069. Offset    Size    Description    (Table 1271)
  8070.  00h    ???
  8071.  1Eh    WORD    offset of COUNTRY.SYS filename
  8072.  42h 16 DWORDs    pointers to ??? entry points
  8073.     ???
  8074.  
  8075. Format of history control structure:
  8076. Offset    Size    Description    (Table 1272)
  8077.  00h    WORD    segment of buffer
  8078.  02h    WORD    size of buffer in bytes
  8079.  04h    WORD    ???
  8080.  
  8081. Format of kernel entry jump table for DR DOS 5.0-6.0:
  8082. Offset    Size    Description    (Table 1273)
  8083.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  8084.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  8085.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  8086.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22 (RETF)
  8087.  14h  5 BYTEs    far jump to kernel entry point for INT 23 (RETF)
  8088.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  8089.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  8090.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  8091.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  8092.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  8093.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  8094.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  8095.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  8096.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  8097.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  8098.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  8099. Notes:    all of these entry points are indirected through this jump table
  8100.       to allow the kernel to be relocated into high memory while leaving
  8101.       the actual entry addresses in low memory for maximum compatibility
  8102.     some of these entry points (22h,23h,24h,2Eh,2Fh) are replaced as soon
  8103.       as COMMAND.COM is loaded, and return immediately to the caller, some
  8104.       returning an error code (the original handler for INT 2F returns
  8105.       AL=03h [fail]).
  8106.  
  8107. Format of HMA Memory Block (DR DOS 6.0 kernel loaded in HMA):
  8108. Offset    Size    Description    (Table 1274)
  8109.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  8110.  02h    WORD    size of this block in bytes (at least 10h)
  8111.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  8112.         00h system
  8113.         01h KEYB
  8114.         02h NLSFUNC
  8115.         03h SHARE
  8116.         04h TaskMAX
  8117.         05h COMMAND
  8118.  05h    var    TSR (or system) code and data. DR DOS TSR's, such as KEYB,
  8119.           hooks interrupts using segment FFFEh instead FFFFh.
  8120. --------O-214459-----------------------------
  8121. INT 21 - DR Multiuser DOS 5.0 - API
  8122.     AX = 4459h
  8123.     CL = function (see #3690 at INT E0"CP/M-86")
  8124.     DS,DX = parameters
  8125. Notes:    DR DOS 5.0 and Novell DOS 7 return CF set and AX=0001h
  8126.     this API is also available on INT E0
  8127. SeeAlso: AX=4452h,INT E0"CP/M-86"
  8128. --------v-2144A0-----------------------------
  8129. INT 21 - VIRUS - "Horns" - INSTALLATION CHECK
  8130.     AX = 44A0h
  8131. Return: AH = FFh if installed
  8132. SeeAlso: AX=4243h"VIRUS",AX=4B04h"VIRUS"
  8133. --------N-2144E0-----------------------------
  8134. INT 21 U - Sun PC-NFS - API???
  8135.     AX = 44E0h
  8136.     DS:DX -> ???
  8137.     SS:BP -> stack frame (see #1275)
  8138. Return: ???
  8139. Note:    this function is also supported by Beame&Whiteside's BWPCNFS shim; the
  8140.       description presented here was derived from that shim
  8141.  
  8142. Format of PC-NFS stack frame:
  8143. Offset    Size    Description    (Table 1275)
  8144.  00h    WORD    -> previous stack frame
  8145.  02h    DWORD    return address
  8146. --------d-2144FFBXFFFF-----------------------
  8147. INT 21 U - NewSpace - ???
  8148.     AX = 44FFh
  8149.     BX = FFFFh
  8150.     DX = ???
  8151. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  8152.       all files as they are written and decompresses them as they are read
  8153. SeeAlso: AX=4414h/BX=FFFFh
  8154. --------D-2145-------------------------------
  8155. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  8156.     AH = 45h
  8157.     BX = file handle
  8158. Return: CF clear if successful
  8159.         AX = new handle
  8160.     CF set on error
  8161.         AX = error code (04h,06h) (see #1366 at AH=59h/BX=0000h)
  8162. Notes:    moving file pointer for either handle will also move it for the other,
  8163.       because both will refer to the same system file table
  8164.     for DOS versions prior to 3.3, file writes may be forced to disk by
  8165.       duplicating the file handle and closing the duplicate
  8166. SeeAlso: AH=3Dh,AH=46h
  8167. --------D-2146-------------------------------
  8168. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  8169.     AH = 46h
  8170.     BX = file handle
  8171.     CX = file handle to become duplicate of first handle
  8172. Return: CF clear if successful
  8173.     CF set on error
  8174.         AX = error code (04h,06h) (see #1366 at AH=59h/BX=0000h)
  8175. Notes:    closes file with handle CX if it is still open
  8176.     DOS 3.30 hangs if BX=CX on entry
  8177.     moving file pointer for either handle will also move it for the other,
  8178.       because both will refer to the same system file table
  8179. SeeAlso: AH=3Dh,AH=45h
  8180. --------D-2147-------------------------------
  8181. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  8182.     AH = 47h
  8183.     DL = drive number (00h = default, 01h = A:, etc)
  8184.     DS:SI -> 64-byte buffer for ASCIZ pathname
  8185. Return: CF clear if successful
  8186.         AX = 0100h (undocumented)
  8187.     CF set on error
  8188.         AX = error code (0Fh) (see #1366 at AH=59h/BX=0000h)
  8189. Notes:    the returned path does not include a drive or the initial backslash
  8190.     many Microsoft products for Windows rely on AX being 0100h on success
  8191.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  8192. SeeAlso: AH=19h,AH=3Bh,AH=71h,INT 15/AX=DE25h
  8193. --------D-2148-------------------------------
  8194. INT 21 - DOS 2+ - ALLOCATE MEMORY
  8195.     AH = 48h
  8196.     BX = number of paragraphs to allocate
  8197. Return: CF clear if successful
  8198.         AX = segment of allocated block
  8199.     CF set on error
  8200.         AX = error code (07h,08h) (see #1366 at AH=59h/BX=0000h)
  8201.         BX = size of largest available block
  8202. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  8203.       allocate
  8204.     .COM programs are initially allocated the largest available memory
  8205.       block, and should free some memory with AH=49h before attempting any
  8206.       allocations
  8207.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  8208.       near pointer to the allocated block on a successful return
  8209. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  8210. --------D-2149-------------------------------
  8211. INT 21 - DOS 2+ - FREE MEMORY
  8212.     AH = 49h
  8213.     ES = segment of block to free
  8214. Return: CF clear if successful
  8215.     CF set on error
  8216.         AX = error code (07h,09h) (see #1366 at AH=59h/BX=0000h)
  8217. Notes:    apparently never returns an error 07h, despite official docs; DOS 2.1+
  8218.       code contains only an error 09h exit
  8219.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  8220.       freed, only when a block is allocated or resized
  8221.     the code for this function is identical in DOS 2.1-6.0 except for
  8222.       calls to start/end a critical section in DOS 3.0+
  8223. SeeAlso: AH=48h,AH=4Ah
  8224. --------D-214A-------------------------------
  8225. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  8226.     AH = 4Ah
  8227.     BX = new size in paragraphs
  8228.     ES = segment of block to resize
  8229. Return: CF clear if successful
  8230.     CF set on error
  8231.         AX = error code (07h,08h,09h) (see #1366 at AH=59h/BX=0000h)
  8232.         BX = maximum paragraphs available for specified memory block
  8233. Notes:    under DOS 2.1-6.0, if there is insufficient memory to expand the block
  8234.       as much as requested, the block will be made as large as possible
  8235.     DOS 2.1-6.0 coalesces any free blocks immediately following the block
  8236.       to be resized
  8237. SeeAlso: AH=48h,AH=49h,AH=83h
  8238. --------v-214A--BX00B6-----------------------
  8239. INT 21 - VIRUS???
  8240.     AH = 4Ah
  8241.     BX = 00B6h
  8242.     ES = CX
  8243. Return: ???
  8244. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  8245.       with Novell DOS 7, and is presumably some virus's installation check
  8246. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=FFFFh,AH=D2h"VIRUS"
  8247. --------v-214A--BXFFFF-----------------------
  8248. INT 21 - VIRUS???
  8249.     AH = 4Ah
  8250.     BX = FFFFh
  8251.     CX = 0568h
  8252.     SI = 0129h
  8253.     DI = 0000h
  8254.     ES = BP
  8255. Return: ???
  8256. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  8257.       with Novell DOS 7, and is presumably some virus's installation check
  8258. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=00B6h
  8259. --------D-214B-------------------------------
  8260. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  8261.     AH = 4Bh
  8262.     AL = type of load
  8263.         00h load and execute
  8264.         01h load but do not execute
  8265.         03h load overlay (see #1277)
  8266.         04h load and execute in background (European MS-DOS 4.0 only)
  8267.         "Exec & Go" (see also AH=80h)
  8268.     DS:DX -> ASCIZ program name (must include extension)
  8269.     ES:BX -> parameter block (see #1276,#1277,#1278)
  8270.     CX = mode (subfunction 04h only)
  8271.         0000h child placed in zombie mode after termination
  8272.         0001h child's return code discarded on termination
  8273. Return: CF clear if successful
  8274.         BX,DX destroyed
  8275.         if subfunction 01h, process ID set to new program's PSP; get with
  8276.         INT 21/AH=62h
  8277.     CF set on error
  8278.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see #1366 at AH=59h)
  8279. Notes:    DOS 2.x destroys all registers, including SS:SP
  8280.     under ROM-based DOS, if no disk path characters (colons or slashes)
  8281.       are included in the program name, the name is searched for in the
  8282.       ROM module headers (see #1281) before searching on disk
  8283.     for functions 00h and 01h, the calling process must ensure that there
  8284.       is enough unallocated memory available; if necessary, by releasing
  8285.       memory with AH=49h or AH=4Ah
  8286.     for function 01h, the AX value to be passed to the child program is put
  8287.       on top of the child's stack
  8288.     for function 03h, DOS assumes that the overlay is being loaded into
  8289.       memory allocated by the caller
  8290.     function 01h was undocumented prior to the release of DOS 5.0
  8291.     some versions (such as DR DOS 6.0) check the parameters and parameter
  8292.       block and return an error if an invalid value (such as an offset of
  8293.       FFFFh) is found
  8294.     background programs under European MS-DOS 4.0 must use the new
  8295.       executable format
  8296.     this function ignores the filename extension, instead checking the
  8297.       first two bytes of the file to determine whether there is a valid
  8298.       .EXE header (see #1280); if not, the file is assumed to be in .COM
  8299.       format.  If present, the file may be in any of several formats which
  8300.       are extensions of the original .EXE format (see #1279)
  8301.     .COM-format executables begin running with the following register
  8302.       values:
  8303.         AL = 00h if first FCB has valid drive letter, FFh if not
  8304.         AH = 00h if second FCB has valid drive letter, FFh if not
  8305.         CS,DS,ES,SS = PSP segment
  8306.         SP = offset of last word available in first 64K segment
  8307.         (note: AX is always 0000h under DESQview)
  8308.     old-format executables begin running with the following register
  8309.       values:
  8310.         AL = 00h if first FCB has valid drive letter, FFh if not
  8311.         AH = 00h if second FCB has valid drive letter, FFh if not
  8312.         DS,ES = PSP segment
  8313.         SS:SP as defined in .EXE header
  8314.         (note: AX is always 0000h under DESQview)
  8315.     new executables begin running with the following register values
  8316.         AX = environment segment
  8317.         BX = offset of command tail in environment segment
  8318.         CX = size of automatic data segment (0000h = 64K)
  8319.         ES,BP = 0000h
  8320.         DS = automatic data segment
  8321.         SS:SP = initial stack
  8322.       the command tail corresponds to an old executable's PSP:0081h and
  8323.       following, except that the 0Dh is turned into a NUL (00h); new
  8324.       format executables have no PSP
  8325.     under the FlashTek X-32 DOS extender, only function 00h is supported
  8326.       and the pointers are passed in DS:EDX and ES:EBX
  8327.     DR DOS 6 always loads .EXE-format programs with no fixups and
  8328.       .COM-format programs starting with 9Ch 55h (PUSHF/PUSH BP) above the
  8329.       64K mark to avoid the EXEPACK bug, by extending the memory block
  8330.       containing the program's environment; this code is disabled if the
  8331.       name of the parent program as stored in the MCB is 'WIN'.
  8332.     DR DOS 3.41 and 5.0 check for a valid filename before testing the
  8333.       subfunction number, so the otherwise invalid subfunction 02h will
  8334.       only return error code 01h if the given filename actually exists;
  8335.       otherwise, errors 02h, 03h, or 05h are returned
  8336. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  8337.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  8338.       file contains additional data after the actual overlay
  8339.     Load but Do Not Execute (subfunction 01h) is reported to corrupt the
  8340.       top word of the caller's stack if the loaded module terminates with
  8341.       INT 21/AH=4Ch in some versions of MS-DOS, including v5.00.
  8342. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h/BX=0025h,AH=8Ah,INT 2E,INT 60/DI=0604h
  8343.  
  8344. Format of EXEC parameter block for AL=00h,01h,04h:
  8345. Offset    Size    Description    (Table 1276)
  8346.  00h    WORD    segment of environment to copy for child process (copy caller's
  8347.           environment if 0000h)
  8348.  02h    DWORD    pointer to command tail to be copied into child's PSP
  8349.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  8350.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  8351.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  8352.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  8353. SeeAlso: #1277,#1278
  8354.  
  8355. Format of EXEC parameter block for AL=03h:
  8356. Offset    Size    Description    (Table 1277)
  8357.  00h    WORD    segment at which to load overlay
  8358.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  8359. SeeAlso: #1276,#1278
  8360.  
  8361. Format of EXEC parameter block for FlashTek X-32:
  8362. Offset    Size    Description    (Table 1278)
  8363.  00h    PWORD    48-bit far pointer to environment string
  8364.  06h    PWORD    48-bit far pointer to command tail string
  8365. SeeAlso: #1276,#1277
  8366.  
  8367. (Table 1279)
  8368. Values for the executable types understood by various environments:
  8369.  MZ    old-style DOS executable (see #1280)
  8370.  NE    Windows or OS/2 1.x segmented ("new") executable (see #1282)
  8371.  LE    Windows virtual device driver (VxD) linear executable (see #1295)
  8372.  LX    variant of LE used in OS/2 2.x (see #1295)
  8373.  W3    Windows WIN386.EXE file; a collection of LE files
  8374.  W4    Windows95 VMM32.VXD file
  8375.  PE    Win32 (Windows NT and Win32s) portable executable based on Unix COFF
  8376.  DL    HP 100LX/200LX system manager compliant executable (.EXM)
  8377.  MP    old PharLap .EXP (see #1305)
  8378.  P2    PharLap 286 .EXP (see #1306)
  8379.  P3    PharLap 386 .EXP (see #1306)
  8380.  
  8381. Format of .EXE file header:
  8382. Offset    Size    Description    (Table 1280)
  8383.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  8384.           (see also #1279)
  8385.  02h    WORD    number of bytes in last 512-byte page of executable
  8386.  04h    WORD    total number of 512-byte pages in executable (includes any
  8387.         partial last page)
  8388.  06h    WORD    number of relocation entries
  8389.  08h    WORD    header size in paragraphs
  8390.  0Ah    WORD    minimum paragraphs of memory required to allocate in addition
  8391.           to executable's size
  8392.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  8393.  0Eh    WORD    initial SS relative to start of executable
  8394.  10h    WORD    initial SP
  8395.  12h    WORD    checksum (one's complement of sum of all words in executable)
  8396.  14h    DWORD    initial CS:IP relative to start of executable
  8397.  18h    WORD    offset within header of relocation table
  8398.         40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  8399.  1Ah    WORD    overlay number (normally 0000h = main program)
  8400. ---new executable---
  8401.  1Ch  4 BYTEs    ???
  8402.  20h    WORD    behavior bits
  8403.  22h 26 BYTEs    reserved for additional behavior info
  8404.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  8405.         or 00000000h if plain MZ executable
  8406. ---Borland TLINK---
  8407.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  8408.  1Eh    BYTE    signature FBh
  8409.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  8410.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  8411. ---ARJ self-extracting archive---
  8412.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  8413.         the first 1000 bytes of the file)
  8414. ---LZEXE 0.90 compressed executable---
  8415.  1Ch  4 BYTEs    signature "LZ09"
  8416. ---LZEXE 0.91 compressed executable---
  8417.  1Ch  4 BYTEs    signature "LZ91"
  8418. ---PKLITE compressed executable---
  8419.  1Ch    BYTE    minor version number
  8420.  1Dh    BYTE    bits 0-3: major version
  8421.         bit 4: extra compression
  8422.         bit 5: huge (multi-segment) file
  8423.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  8424. ---LHarc 1.x self-extracting archive---
  8425.  1Ch  4 BYTEs    unused???
  8426.  20h  3 BYTEs    jump to start of extraction code
  8427.  23h  2 BYTEs    ???
  8428.  25h 12 BYTEs    signature "LHarc's SFX "
  8429. ---LHA 2.x self-extracting archive---
  8430.  1Ch  8 BYTEs    ???
  8431.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  8432. ---TopSpeed C 3.0 CRUNCH compressed file---
  8433.  1Ch    DWORD    018A0001h
  8434.  20h    WORD    1565h
  8435. ---PKARCK 3.5 self-extracting archive---
  8436.  1Ch    DWORD    00020001h
  8437.  20h    WORD    0700h
  8438. ---BSA (Soviet archiver) self-extracting archive---
  8439.  1Ch    WORD    000Fh
  8440.  1Eh    BYTE    A7h
  8441. ---LARC self-extracting archive---
  8442.  1Ch  4 BYTEs    ???
  8443.  20h 11 BYTEs    "SFX by LARC "
  8444. ---LH self-extracting archive---
  8445.  1Ch  8 BYTEs    ???
  8446.  24h  8 BYTEs    "LH's SFX "
  8447. ---RAR self-extracting archive---
  8448.  1Ch  4 BYTEs    signature "RSFX"
  8449. ---other linkers---
  8450.  1Ch    var    optional information
  8451. ---
  8452.   N   N DWORDs    relocation items
  8453.         each is the segment:offset from start of load image at which
  8454.           to add the actual load segment to the indicated WORD
  8455. Notes:    if the word at offset 02h is 4, it should be treated as 00h, since
  8456.       pre-1.10 versions of the MS linker set it that way
  8457.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  8458.       program is loaded as high in memory as possible (DOS only checks
  8459.       the maximum allocation, however)
  8460.     the maximum allocation is set to FFFFh by default
  8461.     additional data may be contained in the file beyond the end of the
  8462.       load image described by the .EXE header; this data may be overlays,
  8463.       the actual executable for newer-format executables, or debugging
  8464.       information (see #1286,#1310)
  8465.     relocations entries need not be in any particular order, although they
  8466.       are typically stored in order from beginning to end of the load
  8467.       image
  8468. SeeAlso: #1282
  8469.  
  8470. Format of ROM Module Header:
  8471. Offset    Size    Description    (Table 1281)
  8472.  00h  2 BYTEs    ROM signature 55h, AAh
  8473.  02h    BYTE    size of ROM in 512-byte blocks
  8474.  03h  3 BYTEs    POST initialization entry point (near JMP instruction)
  8475.  06h    ROM Program Name List [array]
  8476.     Offset    Size    Description
  8477.      00h    BYTE    length of ROM program's name (00h if end of name list)
  8478.      01h  N BYTEs    program name
  8479.      N+1  3 BYTEs    program entry point (near JMP instruction)
  8480.  
  8481. Format of new executable header:
  8482. Offset    Size    Description    (Table 1282)
  8483.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  8484.  02h  2 BYTEs    linker version (major, then minor)
  8485.  04h    WORD    offset from start of this header to entry table (see #1289)
  8486.  06h    WORD    length of entry table in bytes
  8487.  08h    DWORD    file load CRC (0 in Borland's TPW)
  8488.  0Ch    BYTE    program flags (see #1283)
  8489.  0Dh    BYTE    application flags (see #1284)
  8490.  0Eh    WORD    auto data segment index
  8491.  10h    WORD    initial local heap size
  8492.  12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
  8493.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  8494.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  8495.         if SS=automatic data segment and SP=0000h, the stack pointer is
  8496.           set to the top of the automatic data segment, just below the
  8497.           local heap
  8498.  1Ch    WORD    segment count
  8499.  1Eh    WORD    module reference count
  8500.  20h    WORD    length of nonresident names table in bytes
  8501.  22h    WORD    offset from start of this header to segment table (see #1287)
  8502.  24h    WORD    offset from start of this header to resource table
  8503.  26h    WORD    offset from start of this header to resident names table
  8504.  28h    WORD    offset from start of this header to module reference table
  8505.  2Ah    WORD    offset from start of this header to imported names table
  8506.         (array of counted strings, terminated with a string of length
  8507.           00h)
  8508.  2Ch    DWORD    offset from start of file to nonresident names table
  8509.  30h    WORD    count of moveable entry point listed in entry table
  8510.  32h    WORD    file alignment size shift count
  8511.         0 is equivalent to 9 (default 512-byte pages)
  8512.  34h    WORD    number of resource table entries
  8513.  36h    BYTE    target operating system
  8514.         00h unknown
  8515.         01h OS/2
  8516.         02h Windows
  8517.         03h European MS-DOS 4.x
  8518.         04h Windows 386
  8519.         05h BOSS (Borland Operating System Services)
  8520.         81h PharLap 286|DOS-Extender, OS/2
  8521.         82h PharLap 286|DOS-Extender, Windows
  8522.  37h    BYTE    other EXE flags (see #1285)
  8523.  38h    WORD    offset to return thunks or start of gangload area
  8524.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  8525.  3Ch    WORD    minimum code swap area size
  8526.  3Eh  2 BYTEs    expected Windows version (minor version first)
  8527. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  8528.       Reference, Vol 4.
  8529. SeeAlso: #1280
  8530.  
  8531. Bitfields for new executable program flags:
  8532. Bit(s)    Description    (Table 1283)
  8533.  0-1    DGROUP type
  8534.       0 = none
  8535.       1 = single shared
  8536.       2 = multiple (unshared)
  8537.       3 = (null)
  8538.  2    global initialization
  8539.  3    protected mode only
  8540.  4    8086 instructions
  8541.  5    80286 instructions
  8542.  6    80386 instructions
  8543.  7    80x87 instructions
  8544.  
  8545. Bitfields for new executable application flags:
  8546. Bit(s)    Description    (Table 1284)
  8547.  0-2    application type
  8548.     001 full screen (not aware of Windows/P.M. API)
  8549.     010 compatible with Windows/P.M. API
  8550.     011 uses Windows/P.M. API
  8551.  3    is a Family Application (OS/2)
  8552.  5    0=executable, 1=errors in image
  8553.  6    non-conforming program (valid stack is not maintained)
  8554.  7    DLL or driver rather than application
  8555.     (SS:SP info invalid, CS:IP points at FAR init routine called with
  8556.       AX=module handle which returns AX=0000h on failure, AX nonzero on
  8557.       successful initialization)
  8558.  
  8559. Bitfields for other new .EXE flags:
  8560. Bit(s)    Description    (Table 1285)
  8561.  0    supports long filenames
  8562.  1    2.X protected mode
  8563.  2    2.X proportional font
  8564.  3    gangload area
  8565.  
  8566. Format of Codeview trailer (at end of executable):
  8567. Offset    Size    Description    (Table 1286)
  8568.  00h    WORD    signature 4E42h ('NB')
  8569.  02h    WORD    Microsoft debug info version number
  8570.  04h    DWORD    Codeview header offset
  8571. SeeAlso: #1310
  8572.  
  8573. Format of new executable segment table record:
  8574. Offset    Size    Description    (Table 1287)
  8575.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  8576.  02h    WORD    length of image in file (0000h = 64K)
  8577.  04h    WORD    segment attributes (see #1288)
  8578.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  8579. Note:    the first segment table entry is entry number 1
  8580. SeeAlso: #1290
  8581.  
  8582. Bitfields for segment attributes:
  8583. Bit(s)    Description    (Table 1288)
  8584.  0    data segment rather than code segment
  8585.  1    unused???
  8586.  2    real mode
  8587.  3    iterated
  8588.  4    movable
  8589.  5    sharable
  8590.  6    preloaded rather than demand-loaded
  8591.  7    execute-only (code) or read-only (data)
  8592.  8    relocations (directly following code for this segment)
  8593.  9    debug info present
  8594.  10,11    80286 DPL bits
  8595.  12    discardable
  8596.  13-15    discard priority
  8597.  
  8598. Format of new executable entry table item (list):
  8599. Offset    Size    Description    (Table 1289)
  8600.  00h    BYTE    number of entry points (00h if end of entry table list)
  8601.  01h    BYTE    segment number (00h if end of entry table list)
  8602.  02h 3N BYTEs    entry records
  8603.         Offset    Size    Description
  8604.          00h    BYTE    flags
  8605.                 bit 0: exported
  8606.                 bit 1: single data
  8607.                 bits 2-7: unused???
  8608.          01h    WORD    offset within segment
  8609.  
  8610. Format of new executable relocation data (immediately follows segment image):
  8611. Offset    Size    Description    (Table 1290)
  8612.  00h    WORD    number of relocation items
  8613.  02h 8N BYTEs    relocation items
  8614.         Offset    Size    Description
  8615.          00h    BYTE    relocation type
  8616.                 00h LOBYTE
  8617.                 02h BASE
  8618.                 03h PTR
  8619.                 05h OFFS
  8620.                 0Bh PTR48
  8621.                 0Dh OFFS32
  8622.          01h    BYTE    flags
  8623.                 bit 2: additive
  8624.          02h    WORD    offset within segment
  8625.          04h    WORD    target address segment
  8626.          06h    WORD    target address offset
  8627. SeeAlso: #1287,#1291
  8628.  
  8629. Format of new executable resource data:
  8630. Offset    Size    Description    (Table 1291)
  8631.  00h    WORD    alignment shift count for resource data
  8632.  02h  N RECORDs resources
  8633.     Format of resource record:
  8634.     Offset    Size    Description
  8635.      00h    WORD    type ID
  8636.             0000h if end of resource records
  8637.             >= 8000h if integer type
  8638.             else offset from start of resource table to type string
  8639.      02h    WORD    number of resources of this type
  8640.      04h    DWORD    reserved for runtime use
  8641.      08h  N Resources (see #1292)
  8642. Note:    resource type and name strings are stored immediately following the
  8643.       resource table, and are not null-terminated
  8644. SeeAlso: #1292
  8645.  
  8646. Format of new executable resource entry:
  8647. Offset    Size    Description    (Table 1292)
  8648.  00h    WORD    offset in alignment units from start of file to contents of
  8649.         the resource data
  8650.  02h    WORD    length of resource image in bytes
  8651.  04h    WORD    flags
  8652.         bit 4: moveable
  8653.         bit 5: shareable
  8654.         bit 6: preloaded
  8655.  06h    WORD    resource ID
  8656.         >= 8000h if integer resource
  8657.         else offset from start of resource table to resource string
  8658.  08h    DWORD    reserved for runtime use
  8659. Notes:    resource type and name strings are stored immediately following the
  8660.       resource table, and are not null-terminated
  8661.     strings are counted strings, with a string of length 0 indicating the
  8662.       end of the resource table
  8663. SeeAlso: #1291,#1293
  8664.  
  8665. Format of new executable module reference table [one bundle of entries]:
  8666. Offset    Size    Description    (Table 1293)
  8667.  00h    BYTE    number of records in this bundle (00h if end of table)
  8668.  01h    BYTE    segment indicator
  8669.         00h unused
  8670.         FFh movable segment, segment number is in entry
  8671.         else segment number of fixed segment
  8672.  02h  N RECORDs
  8673.     Format of segment record
  8674.     Offset    Size    Description
  8675.      00h    BYTE    flags
  8676.             bit 0: entry is exported
  8677.             bit 1: entry uses global (shared) data
  8678.             bits 7-3: number of parameter words
  8679.     ---fixed segment---
  8680.      01h    WORD    offset
  8681.     ---moveable segment---
  8682.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  8683.      03h    BYTE    segment number
  8684.      05h    WORD    offset
  8685. Note:    table entries are numbered starting from 1
  8686. SeeAlso: #1294
  8687.  
  8688. Format of new executable resident/nonresident name table entry:
  8689. Offset    Size    Description    (Table 1294)
  8690.  00h    BYTE    length of string (00h if end of table)
  8691.  01h  N BYTEs    ASCII text of string
  8692.  N+1    WORD    ordinal number (index into entry table)
  8693. Notes:    the first string in the resident name table is the module name; the
  8694.       first entry in the nonresident name table is the module description
  8695.     the strings are case-sensitive; if the executable was linked with
  8696.       /IGNORECASE, all strings are in uppercase
  8697. SeeAlso: #1293
  8698.  
  8699. Format of Linear Executable (enhanced mode executable) header:
  8700. Offset    Size    Description    (Table 1295)
  8701.  00h  2 BYTEs    "LE" (4Ch 45h) signature (Windows)
  8702.         "LX" (4Ch 58h) signature (OS/2)
  8703.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  8704.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  8705.  04h    DWORD    executable format level
  8706.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  8707.         01h Intel 80286 or upwardly compatible
  8708.         02h Intel 80386 or upwardly compatible
  8709.         03h Intel 80486 or upwardly compatible
  8710.         04h Intel Pentium (80586) or upwardly compatible
  8711.         20h Intel i860 (N10) or compatible
  8712.         21h Intel "N11" or compatible
  8713.         40h MIPS Mark I (R2000, R3000) or compatible
  8714.         41h MIPS Mark II (R6000) or compatible
  8715.         42h MIPS Mark III (R4000) or compatible
  8716.  0Ah    WORD    target operating system
  8717.         01h OS/2
  8718.         02h Windows
  8719.         03h European DOS 4.0
  8720.         04h Windows 386
  8721.  0Ch    DWORD    module version
  8722.  10h    DWORD    module type (see #1296)
  8723.  14h    DWORD    number of memory pages
  8724.  18h    Initial CS:EIP
  8725.     DWORD    object number
  8726.     DWORD    offset
  8727.  20h    Initial SS:ESP
  8728.     DWORD    object number
  8729.     DWORD    offset
  8730.  28h    DWORD    memory page size
  8731.  2Ch    DWORD    (Windows LE) bytes on last page
  8732.         (OS/2 LX) page offset shift count
  8733.  30h    DWORD    fixup section size
  8734.  34h    DWORD    fixup section checksum
  8735.  38h    DWORD    loader section size
  8736.  3Ch    DWORD    loader section checksum
  8737.  40h    DWORD    offset of object table (see #1297)
  8738.  44h    DWORD    object table entries
  8739.  48h    DWORD    object page map table offset (see #1299)
  8740.  4Ch    DWORD    object iterate data map offset
  8741.  50h    DWORD    resource table offset
  8742.  54h    DWORD    resource table entries
  8743.  58h    DWORD    resident names table offset (see #1300)
  8744.  5Ch    DWORD    entry table offset (see #1301,#1302)
  8745.  60h    DWORD    module directives table offset
  8746.  64h    DWORD    Module Directives entries
  8747.  68h    DWORD    Fixup page table offset
  8748.  6Ch    DWORD    Fixup record table offset (see #1304)
  8749.  70h    DWORD    imported modules name table offset
  8750.  74h    DWORD    imported modules count
  8751.  78h    DWORD    imported procedures name table offset
  8752.  7Ch    DWORD    per-page checksum table offset
  8753.  80h    DWORD    data pages offset
  8754.  84h    DWORD    preload page count
  8755.  88h    DWORD    non-resident names table offset
  8756.  8Ch    DWORD    non-resident names table length
  8757.  90h    DWORD    non-resident names checksum
  8758.  94h    DWORD    automatic data object
  8759.  98h    DWORD    debug information offset
  8760.  9Ch    DWORD    debug information length
  8761.  A0h    DWORD    preload instance pages number
  8762.  A4h    DWORD    demand instance pages number
  8763.  A8h    DWORD    extra heap allocation
  8764.  ACh 12 BYTEs    reserved
  8765.  B8h    DWORD    offset of VERSIONINFO resource (MS-Windows VxD only)
  8766.  BCh    DWORD    pointer to ??? (dynamically-loadable VxDs only???)
  8767.  C0h    WORD    device ID (MS-Windows VxD only)
  8768.  C2h    WORD    DDK version (MS-Windows VxD only)
  8769. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  8770.  
  8771. Bitfields for Linear Executable module type:
  8772. Bit(s)    Description    (Table 1296)
  8773.  2    initialization (only for DLLs) 0 = global, 1 = per-process
  8774.  4    no internal fixups in executable image
  8775.  5    no external fixups in executable image
  8776.  8-10    API compatibility
  8777.     0 = unknown
  8778.     1 = incompatible with PM windowing \
  8779.     2 = compatible with PM windowing    > (only for
  8780.     3 = uses PM windowing API       /    programs)
  8781.  13    module not loadable (only for programs)
  8782.  15-17    module type
  8783.     000 program
  8784.     001 library (DLL)
  8785.     011 protected memory library module
  8786.     100 physical device driver
  8787.     110 virtual device driver
  8788.  30    per-process library termination
  8789.     (requires valid CS:EIP, can't be set for .EXE)
  8790.  
  8791. Format of object table entry:
  8792. Offset    Size    Description    (Table 1297)
  8793.  00h    DWORD    virtual size in bytes
  8794.  04h    DWORD    relocation base address
  8795.  08h    DWORD    object flags (see #1298)
  8796.  0Ch    DWORD    page map index
  8797.  10h    DWORD    page map entries (see #1299)
  8798.  14h  4 BYTEs    reserved??? (apparently always zeros)
  8799.  
  8800. Bitfields for object flags:
  8801. Bit(s)    Description    (Table 1298)
  8802.  0    readable
  8803.  1    writable
  8804.  2    executable
  8805.  3    resource
  8806.  4    discardable
  8807.  5    shared
  8808.  6    preloaded
  8809.  7    invalid
  8810.  8-9    type
  8811.     00 normal
  8812.     01 zero-filled
  8813.     10 resident
  8814.     11 resident and contiguous
  8815.  10    resident and long-lockable
  8816.  11    reserved
  8817.  12    16:16 alias required
  8818.  13    "BIG" (Huge: 32-bit)
  8819.  14    conforming
  8820.  15    "OBJECT_I/O_PRIVILEGE_LEVEL"
  8821.  16-31    reserved
  8822.  
  8823. Format of object page map table entry:
  8824. Offset    Size    Description    (Table 1299)
  8825.  00h    BYTE    ??? (usually 00h)
  8826.  01h    WORD    (big-endian) index to fixup table
  8827.         0000h if no relocation info
  8828.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  8829.  
  8830. Format of resident names table entry:
  8831. Offset    Size    Description    (Table 1300)
  8832.  00h    BYTE    length of name
  8833.  01h  N BYTEs    name
  8834.  N+1  3 BYTEs    ???
  8835.  
  8836. Format of LE linear executable entry table:
  8837. Offset    Size    Description    (Table 1301)
  8838.  00h    BYTE    number of entries in table
  8839.  01h 10 BYTEs per entry
  8840.         Offset    Size    Description
  8841.          00h    BYTE    bit flags
  8842.                 bit 0: non-empty bundle
  8843.                 bit 1: 32-bit entry
  8844.          01h    WORD    object number
  8845.          03h    BYTE    entry type flags
  8846.                 bit 0: exported
  8847.                 bit 1: uses single data rather than instance
  8848.                 bit 2: reserved
  8849.                 bits 3-7: number of stack parameters
  8850.          04h    DWORD    offset of entry point
  8851.          08h  2 BYTEs    ???
  8852. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  8853.       and do not contain the remaining nine bytes
  8854.  
  8855. Format of LX linear executable entry table [array]:
  8856. Offset    Size    Description    (Table 1302)
  8857.  00h    BYTE    number of bundles following (00h = end of entry table)
  8858.  01h    BYTE    bundle type
  8859.         00h empty
  8860.         01h 16-bit entry
  8861.         02h 286 callgate entry
  8862.         03h 32-bit entry
  8863.         04h forwarder entry
  8864.         bit 7 set if additional parameter typing information is present
  8865. ---bundle type 00h---
  8866.  no additional fields
  8867. ---bundle type 01h---
  8868.  02h    WORD    object number
  8869.  04h    BYTE    entry flags
  8870.         bit 0: exported
  8871.         bits 7-3: number of stack parameters
  8872.  05h    WORD    offset of entry point in object (shifted by page size shift)
  8873. ---bundle type 02h---
  8874.  02h    WORD    object number
  8875.  04h    BYTE    entry flags
  8876.         bit 0: exported
  8877.         bits 7-3: number of stack parameters
  8878.  05h    WORD    offset of entry point in object
  8879.  07h    WORD    reserved for callgate selector (used by loader)
  8880. ---bundle type 03h---
  8881.  02h    WORD    object number
  8882.  04h    BYTE    entry flags
  8883.         bit 0: exported
  8884.         bits 7-3: number of stack parameters
  8885.  05h    DWORD    offset of entry point in object
  8886. ---bundle type 04h---
  8887.  02h    WORD    reserved
  8888.  04h    BYTE    forwarder flags
  8889.         bit 0: import by ordinal
  8890.         bits 7-1 reserved
  8891.  05h    WORD    module ordinal
  8892.         (forwarder's index into Import Module Name table)
  8893.  07h    DWORD    procedure name offset or import ordinal number
  8894. Note:    all fields after the first two bytes are repeated N times
  8895.  
  8896. Bitfields for linear executable fixup type:
  8897. Bit(s)    Description    (Table 1303)
  8898.  7    ordinal is BYTE rather than WORD
  8899.  6    16-rather than 8-object number/module ordinal
  8900.  5    addition with DWORD rather than WORD
  8901.  4    relocation info has size with new two bytes at end
  8902.  3    reserved (0)
  8903.  2    set if add to destination, clear to replace destination
  8904.  1-0    type
  8905.     00 internal fixup
  8906.     01 external fixup, imported by ordinal
  8907.     10 external fixup, imported by name
  8908.     11 internal fixup via entry table
  8909.  
  8910. Format of linear executable fixup record:
  8911. Offset    Size    Description    (Table 1304)
  8912.  00h    BYTE    type
  8913.         bits 7-4: modifier (0001 single, 0011 multiple)
  8914.         bits 3-0: type
  8915.             0000 byte offset
  8916.             0010 word segment
  8917.             0011 16-bit far pointer (DWORD)
  8918.             0101 16-bit offset
  8919.             0110 32-bit far pointer (PWORD)
  8920.             0111 32-bit offset
  8921.             1000 near call or jump, WORD/DWORD based on seg attrib
  8922.  01h    BYTE    linear executable fixup type (see #1303)
  8923. ---if single type---
  8924.  02h    WORD    offset within page
  8925.  04h    relocation information
  8926.     ---internal fixup---
  8927.     BYTE    object number
  8928.     ---external,ordinal---
  8929.     BYTE    one-based module number in Import Module table
  8930.     BYTE/WORD ordinal number
  8931.     WORD/DWORD value to add (only present if modifier bit 4 set)
  8932.     ---external,name---
  8933.     BYTE    one-based module number in Import Module table
  8934.     WORD    offset in Import Procedure names
  8935.     WORD/DWORD value to add (only present if modifier bit 4 set)
  8936. ---if multiple type---
  8937.  02h    BYTE    number of items
  8938.  03h    var    relocation info as for "single" type (above)
  8939.       N WORDs    offsets of items to relocate
  8940.  
  8941. Format of old Phar Lap .EXP file header:
  8942. Offset    Size    Description    (Table 1305)
  8943.  00h  2 BYTEs    "MP" (4Dh 50h) signature
  8944.  02h    WORD    remainder of image size / page size (page size = 512h)
  8945.  04h    WORD    size of image in pages
  8946.  06h    WORD    number of relocation items
  8947.  08h    WORD    header size in paragraphs
  8948.  0Ah    WORD    minimum number of extra 4K pages to be allocated at the end
  8949.           of program, when it is loaded
  8950.  0Ch    WORD    maximum number of extra 4K pages to be allocated at the end
  8951.           of program, when it is loaded
  8952.  0Eh    DWORD    initial ESP
  8953.  12h    WORD    word checksum of file
  8954.  14h    DWORD    initial EIP
  8955.  18h    WORD    offset of first relocation item
  8956.  1Ah    WORD    overlay number
  8957.  1Ch    WORD    ??? (wants to be 1)
  8958. SeeAlso: #1306
  8959.  
  8960. Format of new Phar Lap .EXP file header:
  8961. Offset    Size    Description    (Table 1306)
  8962.  00h  2 BYTEs    signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
  8963.  02h    WORD    level (01h flat-model file, 02h multisegmented file)
  8964.  04h    WORD    header size
  8965.  06h    DWORD    file size in bytes
  8966.  0Ah    WORD    checksum
  8967.  0Ch    DWORD    offset of run-time parameters within file (see #1308)
  8968.  10h    DWORD    size of run-time parameters in bytes
  8969.  14h    DWORD    offset of relocation table within file
  8970.  18h    DWORD    size of relocation table in bytes
  8971.  1Ch    DWORD    offset of segment information table within file (see #1307)
  8972.  20h    DWORD    size of segment information table in bytes
  8973.  24h    WORD    size of segment information table entry in bytes
  8974.  26h    DWORD    offset of load image within file
  8975.  2Ah    DWORD    size of load image on disk
  8976.  2Eh    DWORD    offset of symbol table within file or 00000000h
  8977.  32h    DWORD    size of symbol table in bytes
  8978.  36h    DWORD    offset of GDT within load image
  8979.  3Ah    DWORD    size of GDT in bytes
  8980.  3Eh    DWORD    offset of LDT within load image
  8981.  42h    DWORD    size of LDT in bytes
  8982.  46h    DWORD    offset of IDT within load image
  8983.  4Ah    DWORD    size of IDT in bytes
  8984.  4Eh    DWORD    offset of TSS within load image
  8985.  52h    DWORD    size of TSS in bytes
  8986.  56h    DWORD    minimum number of extra bytes to be allocated at end of program
  8987.         (level 1 executables only)
  8988.  5Ah    DWORD    maximum number of extra bytes to be allocated at end of program
  8989.         (level 1 executables only)
  8990.  5Eh    DWORD    base load offset (level 1 executables only)
  8991.  62h    DWORD    initial ESP
  8992.  66h    WORD    initial SS
  8993.  68h    DWORD    initial EIP
  8994.  6Ch    WORD    initial CS
  8995.  6Eh    WORD    initial LDT
  8996.  70h    WORD    initial TSS
  8997.  72h    WORD    flags
  8998.         bit 0: load image is packed
  8999.         bit 1: 32-bit checksum is present
  9000.         bits 4-2: type of relocation table
  9001.  74h    DWORD    memory requirements for load image
  9002.  78h    DWORD    32-bit checksum (optional)
  9003.  7Ch    DWORD    size of stack segment in bytes
  9004.  80h 256 BYTEs    reserved (0)
  9005. SeeAlso: #1305,#1309
  9006.  
  9007. Format of Phar Lap segment information table entry:
  9008. Offset    Size    Description    (Table 1307)
  9009.  00h    WORD    selector number
  9010.  02h    WORD    flags
  9011.  04h    DWORD    base offset of selector
  9012.  08h    DWORD    minimum number of extra bytes to be allocated to the segment
  9013.  
  9014. Format of 386|DOS-Extender run-time parameters:
  9015. Offset    Size    Description    (Table 1308)
  9016.  00h  2 BYTEs    signature "DX" (44h 58h)
  9017.  02h    WORD    minimum number of real-mode params to leave free at run time
  9018.  04h    WORD    maximum number of real-mode params to leave free at run time
  9019.  06h    WORD    minimum interrupt buffer size in KB
  9020.  08h    WORD    maximum interrupt buffer size in KB
  9021.  0Ah    WORD    number of interrupt stacks
  9022.  0Ch    WORD    size in KB of each interrupt stack
  9023.  0Eh    DWORD    offset of byte past end of real-mode code and data
  9024.  12h    WORD    size in KB of call buffers
  9025.  14h    WORD    flags
  9026.         bit 0: file is virtual memory manager
  9027.         bit 1: file is a debugger
  9028.  16h    WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
  9029.  18h 104 BYTEs    reserved (0)
  9030.  
  9031. Format of Phar Lap repeat block header:
  9032. Offset    Size    Description    (Table 1309)
  9033.  00h    WORD    byte count
  9034.  02h    BYTE    repeat string length
  9035.  
  9036. Format of Borland debugging information header (following load image):
  9037. Offset    Size    Description    (Table 1310)
  9038.  00h    WORD    signature 52FBh
  9039.  02h    WORD    version ID
  9040.  04h    DWORD    size of name pool in bytes
  9041.  08h    WORD    number of names in name pool
  9042.  0Ah    WORD    number of type entries
  9043.  0Ch    WORD    number of structure members
  9044.  0Eh    WORD    number of symbols
  9045.  10h    WORD    number of global symbols
  9046.  12h    WORD    number of modules
  9047.  14h    WORD    number of locals (optional)
  9048.  16h    WORD    number of scopes in table
  9049.  18h    WORD    number of line-number entries
  9050.  1Ah    WORD    number of include files
  9051.  1Ch    WORD    number of segment records
  9052.  1Eh    WORD    number of segment/file correlations
  9053.  20h    DWORD    size of load image after removing uninitialized data and debug
  9054.           information
  9055.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  9056.           depends on program flags
  9057.  28h    BYTE    program flags
  9058.         bit 0: case-sensitive link
  9059.         bit 1: pascal overlay program
  9060.  29h    WORD    no longer used
  9061.  2Bh    WORD    size of data pool in bytes
  9062.  2Dh    BYTE    padding
  9063.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  9064.  30h    WORD    number of classes
  9065.  32h    WORD    number of parents
  9066.  34h    WORD    number of global classes (currently unused)
  9067.  36h    WORD    number of overloads (currently unused)
  9068.  38h    WORD    number of scope classes
  9069.  3Ah    WORD    number of module classes
  9070.  3Ch    WORD    number of coverage offsets
  9071.  3Eh    DWORD    offset relative to symbol base of name pool
  9072.  42h    WORD    number of browser information records
  9073.  44h    WORD    number of optimized symbol records
  9074.  46h    WORD    debugging flags
  9075.  48h  8 BYTEs    padding
  9076. Note:    additional information on the Borland debugging info may be found in
  9077.       Borland's Open Architecture Handbook
  9078. SeeAlso: #1286
  9079. --------U-214B-------------------------------
  9080. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  9081.     AH = 4Bh
  9082.     DS:DX = 0000h:0000h
  9083. Return: ES:BX -> ELRES history structure (see #1069 at AH=2Bh/CX=454Ch)
  9084.     DX = DABEh (signature, DAve BEnnett)
  9085. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  9086.       Bennett
  9087. SeeAlso: AH=2Bh/CX=454Ch
  9088. --------v-214B04-----------------------------
  9089. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  9090.     AX = 4B04h
  9091. Return: CF clear if "MG" resident
  9092.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  9093. SeeAlso: AX=4243h,AH=4Ah/BX=FFFFh,AX=4B21h
  9094. --------D-214B05-----------------------------
  9095. INT 21 - DOS 5+ - SET EXECUTION STATE
  9096.     AX = 4B05h
  9097.     DS:DX -> execution state structure (see #1311)
  9098. Return: CF clear if successful
  9099.         AX = 0000h
  9100.     CF set on error
  9101.         AX = error code (see #1366 at AH=59h/BX=0000h)
  9102. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  9103.       execution (including setting the DOS version number).     No DOS, BIOS
  9104.       or other software interrupt may be called after return from this call
  9105.       before commencement of the child process.  If DOS is running in the
  9106.       HMA, A20 is turned off on return from this call.
  9107. SeeAlso: AH=4Bh
  9108.  
  9109. Format of execution state structure:
  9110. Offset    Size    Description    (Table 1311)
  9111.  00h    WORD    reserved (00h)
  9112.  02h    WORD    type flags
  9113.         bit 0: program is an .EXE
  9114.         bit 1: program is an overlay
  9115.  04h    DWORD    pointer to ASCIZ name of program file
  9116.  08h    WORD    PSP segment of new program
  9117.  0Ah    DWORD    starting CS:IP of new program
  9118.  0Eh    DWORD    program size including PSP
  9119. ----------214B18DX0010-----------------------
  9120. INT 21 U - FBOOT v2.13 - PERFORM FAST BOOTSTRAP
  9121.     AX = 4B18h
  9122.     DX = 0010h
  9123.     BX = disk selector
  9124.         0000h boot from floppy
  9125.         0080h boot from hard disk
  9126. Return: never if FastBoot installed
  9127. Program: CyberWare FastBoot allows fast warm boots by skipping CMOS
  9128.       checking, ROM scan, RAM & peripheral components test
  9129. InstallCheck:    search for a character device driver called "FBOOT$$$"
  9130. --------v-214B20-----------------------------
  9131. INT 21 - VIRUS - "Holocaust"/"Telefonica" - ???
  9132.     AX = 4B20h
  9133. SeeAlso: AX=4B04h,AX=4B21h
  9134. --------v-214B21-----------------------------
  9135. INT 21 C - VIRUS - "Holocaust"/"Telefonica" - ???
  9136.     AX = 4B21h
  9137. Note:    called at completion of virus installation
  9138. SeeAlso: AX=4B04h,AX=4B20h,AX=4B25h
  9139. --------v-214B25-----------------------------
  9140. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  9141.     AX = 4B25h
  9142. Return: DI = 1234h if resident
  9143. SeeAlso: AX=4B21h,AX=4B40h
  9144. --------v-214B40-----------------------------
  9145. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  9146.     AX = 4B40h
  9147. Return: AX = 5678h if resident
  9148. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  9149. --------v-214B41-----------------------------
  9150. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  9151.     AX = 4B41h
  9152.     ???
  9153. Return: ???
  9154. SeeAlso: AX=4B40h
  9155. --------v-214B4A-----------------------------
  9156. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  9157.     AX = 4B4Ah
  9158. Return: AL = 57h if resident
  9159. SeeAlso: AX=4B40h,AX=4B4Bh
  9160. --------v-214B4B-----------------------------
  9161. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  9162.     AX = 4B4Bh
  9163. Return: CF clear if resident
  9164. SeeAlso: AX=4B4Ah,AX=4B4Dh
  9165. --------v-214B4D-----------------------------
  9166. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  9167.     AX = 4B4Dh
  9168. Return: CF clear if resident
  9169. SeeAlso: AX=4B4Ah,AX=4B50h
  9170. --------v-214B50-----------------------------
  9171. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  9172.     AX = 4B50h
  9173. Return: AX = 1234h if resident
  9174. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  9175. --------v-214B53-----------------------------
  9176. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  9177.     AX = 4B53h
  9178. Return: CF clear if resident
  9179. SeeAlso: AX=4B50h,AX=4B53h/BX=2121h,AX=4B55h
  9180. --------v-214B53BX2121-----------------------
  9181. INT 21 - VIRUS - "One Half" - INSTALLATION CHECK
  9182.     AX = 4B53h
  9183.     BX = 2121h
  9184.     CX = 1212h
  9185.     DX = 0236h
  9186. Return: AX = 454Bh if installed
  9187. SeeAlso: AX=4B50h,AX=4B53h,AX=4B55h
  9188. --------v-214B55-----------------------------
  9189. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  9190.     AX = 4B55h
  9191. Return: AX = 1231h if resident
  9192. SeeAlso: AX=4B53h,AX=4B59h
  9193. --------v-214B59-----------------------------
  9194. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  9195.     AX = 4B59h
  9196. Return: CF clear if resident
  9197. SeeAlso: AX=4B50h,AX=4B5Eh
  9198. --------v-214B5E-----------------------------
  9199. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  9200.     AX = 4B5Eh
  9201. Return: CF clear if resident
  9202. SeeAlso: AX=4B59h,AX=4B87h
  9203. --------v-214B60-----------------------------
  9204. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  9205.     AX = 4B60h
  9206.     ???
  9207. Return: ???
  9208. SeeAlso: AX=4B50h
  9209. --------O-214B80-----------------------------
  9210. INT 21 - DR DOS v3.41 - RUN ALREADY-LOADED KERNEL FILE
  9211.     AX = 4B80h
  9212.     DS:DX -> ASCIZ name of program to EXEC
  9213.     ES = segment of PSP for kernel file
  9214. Return: only if call failed
  9215. Note:    DR DOS uses this call after an AX=4B01h to load the kernel file into
  9216.       memory and patching the program's parent-PSP field to point at itself
  9217. SeeAlso: AH=4Bh"EXEC"
  9218. --------v-214B87-----------------------------
  9219. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  9220.     AX = 4B87h
  9221. Return: AX = 6663h if resident
  9222. SeeAlso: AX=4B5Eh,AX=4B95h
  9223. --------v-214B95-----------------------------
  9224. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  9225.     AX = 4B95h
  9226. Return: AX = 1973h if resident
  9227. SeeAlso: AX=4B87h,AX=4BA7h
  9228. --------v-214BA7-----------------------------
  9229. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  9230.     AX = 4BA7h
  9231. Return: AX = B459h if resident
  9232. SeeAlso: AX=4B95h,AX=4BAAh
  9233. --------v-214BAA-----------------------------
  9234. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  9235.     AX = 4BAAh
  9236. Return: CF clear if resident
  9237. SeeAlso: AX=4BA7h,AX=4BAFh
  9238. --------v-214BAF-----------------------------
  9239. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  9240.     AX = 4BAFh
  9241. Return: AL = AFh if "Magnitogorsk" resident
  9242.     AL = FAh if "948"/"Screenplus1" resident
  9243. SeeAlso: AX=4BAAh,AX=4BB1h"VIRUS"
  9244. --------v-214BB1-----------------------------
  9245. INT 21 - VIRUS - "UZZY" -INSTALLATION CHECK
  9246.     AX = 4BB1h
  9247. Return: CL = 04h if resident
  9248. SeeAlso: AX=4BAFh"VIRUS",AX=4BDDh"VIRUS"
  9249. --------v-214BDD-----------------------------
  9250. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  9251.     AX = 4BDDh
  9252. Return: AX = 1234h
  9253. SeeAlso: AX=4BB1h"VIRUS",AX=4BFEh
  9254. --------v-214BEE-----------------------------
  9255. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  9256.     AX = 4BEEh
  9257. Return: AX = status
  9258.         1234h grab was successful
  9259.         2345h failed (INT 21 grabbed previously)
  9260. Program: F-DRIVER.SYS is part of the shareware F-PROT virus/trojan protection
  9261.       package by Fridrik Skulason
  9262. Note:    when called the first time, this function moves the INT 21 monitoring
  9263.       code from its original location in the INT 21 chain to be the first
  9264.       thing called by INT 21.  This is the mechanism used by F-NET.
  9265. SeeAlso: INT 2F/AX=4653h/CX=0002h,INT 2F/AX=4653h/CX=0007h
  9266. --------k-214BF0-----------------------------
  9267. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  9268.     AX = 4BF0h
  9269. Return: CF clear if installed
  9270.         AX = 899Dh
  9271. Program: DIET is an executable-compression program by Teddy Matsumoto
  9272. SeeAlso: AX=37D0h,AX=4BF1h
  9273. --------k-214BF1-----------------------------
  9274. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  9275.     AX = 4BF1h
  9276. Return: ???
  9277. SeeAlso: AX=37D0h,AX=4BF0h
  9278. --------v-214BF1-----------------------------
  9279. INT 21 - VIRUS - "Jerusalem 2" - INSTALLATION CHECK
  9280.     AX = 4BF1h
  9281. Return: AX = 1FB4h if resident
  9282. SeeAlso: AH=3Fh/BX=FEB0h"VIRUS",AX=4BDDh"VIRUS",AX=4BFEh"VIRUS"
  9283. --------v-214BFE-----------------------------
  9284. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  9285.     AX = 4BFEh
  9286. Return: AX = 1234h if "Hitchcock" or "Storm" resident
  9287.     AX = ABCDh if "1193"/"Copyright" resident
  9288.     DI = 55BBh if "Dark Avenger-1028" resident
  9289. SeeAlso: AX=4BDDh,AX=4BF1h"VIRUS",AX=4BFFh"Justice"
  9290. --------v-214BFF-----------------------------
  9291. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  9292.     AX = 4BFFh
  9293. Return: BL = FFh if "USSR-707" resident
  9294.     DI = 55AAh if "Justice" resident
  9295.     AX = 1234h if "Hitchcock.1238" resident
  9296.     CF clear if "Europe 92" resident
  9297. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  9298. --------v-214BFFSI0000-----------------------
  9299. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  9300.     AX = 4BFFh
  9301.     SI = 0000h
  9302.     DI = 0000h
  9303. Return: DI = 55AAh if installed
  9304. SeeAlso: AX=4BFFh"Justice",AX=5252h
  9305. --------D-214C-------------------------------
  9306. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  9307.     AH = 4Ch
  9308.     AL = return code
  9309. Return: never returns
  9310. Notes:    unless the process is its own parent
  9311.       (see #1066 [offset 16h] at AH=26h), all open files are closed and
  9312.       all memory belonging to the process is freed
  9313.     all network file locks should be removed before calling this function
  9314. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  9315. SeeAlso: INT 60/DI=0601h
  9316. --------m-214C57-----------------------------
  9317. INT 21 - Headroom - ???
  9318.     AX = 4C57h
  9319.     DS:DX -> target address
  9320. Note:    jumps to target address instead of terminating program
  9321. SeeAlso: AX=5758h
  9322. --------D-214D-------------------------------
  9323. INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
  9324.     AH = 4Dh
  9325. Return: AH = termination type
  9326.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  9327.         01h control-C abort
  9328.         02h critical error abort
  9329.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  9330.     AL = return code
  9331.     CF clear
  9332. Notes:    the word in which DOS stores the return code is cleared after being
  9333.       read by this function, so the return code can only be retrieved once
  9334.     COMMAND.COM stores the return code of the last external command it
  9335.       executed as ERRORLEVEL
  9336.     this call should not be used if the child was started with AX=4B04h;
  9337.       use AH=8Ah instead
  9338.     the following sequence will close a Virtual DOS Machine under OS/2 2.0
  9339.       through OS/2 Merlin (but may change in the future):
  9340.         MOV    AH,4Dh
  9341.         INT    21h
  9342.         HLT
  9343.         DB    02h,0FDh
  9344.       This sequence is the only way to close a specific VDM which was
  9345.       booted from floppy or a disk image.
  9346. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  9347. --------D-214E-------------------------------
  9348. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  9349.     AH = 4Eh
  9350.     AL = special flag for use by APPEND (refer to note below)
  9351.     CX = file attribute mask (see #1107 at AX=4301h) (bits 0 and 5 ignored)
  9352.         0088h (Novell DOS 7) find first deleted file
  9353.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  9354. Return: CF clear if successful
  9355.         Disk Transfer Area filled with FindFirst data block (see #1312)
  9356.     CF set on error
  9357.         AX = error code (02h,03h,12h) (see #1366 at AH=59h/BX=0000h)
  9358. Notes:    for search attributes other than 08h, all files with at MOST the
  9359.       specified combination of hidden, system, and directory attributes
  9360.       will be returned.  Under DOS 2.x, searching for attribute 08h
  9361.       (volume label) will also return normal files, while under DOS 3.0+
  9362.       only the volume label (if any) will be returned.
  9363.     this call also returns successfully if given the name of a character
  9364.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  9365.       and the current date and time.  DOS 3.0+ returns attribute 40h and
  9366.       the current date and time.
  9367.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  9368.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  9369.       found pathname will be stored, otherwise, the actual found path
  9370.       will be prepended to the original filespec without a path.
  9371.     under LANtastic, this call may be used to obtain a list of a server's
  9372.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  9373.       resources may be obtained by searching for "\\SERVER\@*.*"
  9374.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  9375. BUGS:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  9376.       with a character device name (no wildcards) and search attributes
  9377.       which include the volume-label bit (08h) will fail unless there is
  9378.       an intervening DOS call which implicitly or explicity performs a
  9379.       directory search without the volume-label bit.  Such implicit
  9380.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  9381.       (AH=41h), and RENAME (AH=56h)
  9382.     DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  9383. SeeAlso: AH=11h,AH=4Fh,AX=4301h,AX=714Eh,AX=71A1h,AX=F257h/SF=02h
  9384. SeeAlso: INT 2F/AX=111Bh,INT 2F/AX=B711h
  9385.  
  9386. Format of FindFirst data block:
  9387. Offset    Size    Description    (Table 1312)
  9388. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  9389.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  9390.  01h 11 BYTEs    search template
  9391.  0Ch    BYTE    search attributes
  9392. ---DOS 2.x (and some DOS 3.x???)---
  9393.  00h    BYTE    search attributes
  9394.  01h    BYTE    drive letter
  9395.  02h 11 BYTEs    search template
  9396. ---WILDUNIX.COM---
  9397.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  9398.  0Ch    BYTE    search attributes
  9399. ---DOS 2.x and most 3.x---
  9400.  0Dh    WORD    entry count within directory
  9401.  0Fh    DWORD    pointer to DTA???
  9402.  13h    WORD    cluster number of start of parent directory
  9403. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  9404.  0Dh    WORD    entry count within directory
  9405.  0Fh    WORD    cluster number of start of parent directory
  9406.  11h  4 BYTEs    reserved
  9407. ---OS/2 MVDM---
  9408.  00h    WORD    "OS2_BMP_handle"
  9409.  02h    WORD    "OS2_LastEnt"
  9410.  04h    DWORD    "OS2_Checksum"
  9411.  08h    BYTE    "OS2_usi_flag"
  9412.  09h    DWORD    used by DOS emulator for second pass for volume-label searches
  9413.  0Dh    WORD    (ret) "DOS_LastEnt" entry count within directory
  9414.  0Fh    BYTE    OS/2 Processed-FindFirst flag
  9415.         00h FindFirst processed by DOS
  9416.         42h FindFirst processed by OS/2
  9417.  10h  5 BYTEs    reserved for future use
  9418. ---all versions, documented fields---
  9419.  15h    BYTE    attribute of file found
  9420.  16h    WORD    file time (see #1351 at AX=5700h)
  9421.  18h    WORD    file date (see #1352 at AX=5700h)
  9422.  1Ah    DWORD    file size
  9423.  1Eh 13 BYTEs    ASCIZ filename+extension
  9424. --------f-214E-------------------------------
  9425. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  9426.     AH = 4Eh
  9427.     DS:DX = 0000h:0000h
  9428. Return: AH = 99h if installed
  9429. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  9430.       Hosgood and Terry Barnaby
  9431. --------D-214F-------------------------------
  9432. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  9433.     AH = 4Fh
  9434.     Disk Transfer Area contains data block from previous FindFirst or
  9435.       FindNext call
  9436. Return: CF clear if successful
  9437.         Disk Transfer Area updated
  9438.     CF set on error
  9439.         AX = error code (12h) (see #1366 at AH=59h/BX=0000h)
  9440. Notes:    under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
  9441.       the next matching deleted file will be returned
  9442.     since the entire state of a FindFirst/FindNext sequence is contained
  9443.       in the data block in the DTA, other disk operations such as renaming,
  9444.       moving, deleting, or creating files can cause inaccurate directory
  9445.       searches, such as finding the same file twice
  9446. BUG:    DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  9447. SeeAlso: AH=12h,AH=4Eh,AX=714Fh,AX=71A1h
  9448. --------D-2150-------------------------------
  9449. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  9450.     AH = 50h
  9451.     BX = segment of PSP for new process
  9452. Notes:    DOS uses the current PSP address to determine which processes own files
  9453.       and memory; it corresponds to process identifiers used by other OSs
  9454.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  9455.       handler without setting the Critical Error flag
  9456.     under MS-DOS 3.0+ and DR DOS 3.41+, this function does not use any of
  9457.       the DOS-internal stacks and may thus be called at any time, even
  9458.       during another INT 21h call
  9459.     some Microsoft applications such as Quick C 2.51 use segments of 0000h
  9460.       and FFFFh and direct access to the SDA (see #1373 at AX=5D06h) to
  9461.       test whether they are running under MS-DOS rather than a compatible
  9462.       OS; although one should only call this function with valid PSP
  9463.       addresses, any program hooking it should be prepared to handle
  9464.       invalid addresses
  9465.     this function is supported by the OS/2 compatibility box
  9466.     this call was undocumented prior to the release of DOS 5.0
  9467. SeeAlso: AH=26h,AH=51h,AH=62h
  9468. --------v-2150FD-----------------------------
  9469. INT 21 - VIRUS - "Predator 2" - INSTALLATION CHECK
  9470.     AX = 50FDh
  9471. Return: AX = FD50h if resident
  9472. SeeAlso: AX=4BFFh"VIRUS",AX=5454h"VIRUS"
  9473. --------D-2151-------------------------------
  9474. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  9475.     AH = 51h
  9476. Return: BX = segment of PSP for current process
  9477. Notes:    DOS uses the current PSP address to determine which processes own files
  9478.       and memory; it corresponds to process identifiers used by other OSs
  9479.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  9480.       handler without setting the Critical Error flag
  9481.     under DOS 3.0+, this function does not use any of the DOS-internal
  9482.       stacks and may thus be called at any time, even during another
  9483.       INT 21h call
  9484.     supported by OS/2 compatibility box
  9485.     identical to the documented AH=62h
  9486.     this call was undocumented prior to the release of DOS 5.0
  9487. SeeAlso: AH=26h,AH=50h,AH=62h
  9488. --------!---Section--------------------------
  9489.