home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / INTER40A.ZIP / INTERRUP.E < prev    next >
Text File  |  1994-04-03  |  272KB  |  7,174 lines

  1. Interrupt List, part 5 of 11
  2. This compilation is Copyright (c) 1989,1990,1991,1992,1993,1994 Ralf Brown
  3. --------D-2145-------------------------------
  4. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  5.     AH = 45h
  6.     BX = file handle
  7. Return: CF clear if successful
  8.         AX = new handle
  9.     CF set on error
  10.         AX = error code (04h,06h) (see AH=59h)
  11. Notes:    moving file pointer for either handle will also move it for the other,
  12.       because both will refer to the same system file table
  13.     for DOS versions prior to 3.3, file writes may be forced to disk by
  14.       duplicating the file handle and closing the duplicate
  15. SeeAlso: AH=3Dh,AH=46h
  16. --------D-2146-------------------------------
  17. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  18.     AH = 46h
  19.     BX = file handle
  20.     CX = file handle to become duplicate of first handle
  21. Return: CF clear if successful
  22.     CF set on error
  23.         AX = error code (04h,06h) (see AH=59h)
  24. Notes:    closes file with handle CX if it is still open
  25.     DOS 3.30 hangs if BX=CX on entry
  26.     moving file pointer for either handle will also move it for the other,
  27.       because both will refer to the same system file table
  28. SeeAlso: AH=3Dh,AH=45h
  29. --------D-2147-------------------------------
  30. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  31.     AH = 47h
  32.     DL = drive number (00h = default, 01h = A:, etc)
  33.     DS:SI -> 64-byte buffer for ASCIZ pathname
  34. Return: CF clear if successful
  35.         AX = 0100h (undocumented)
  36.     CF set on error
  37.         AX = error code (0Fh) (see AH=59h)
  38. Notes:    the returned path does not include a drive or the initial backslash
  39.     many Microsoft products for Windows rely on AX being 0100h on success
  40.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  41. SeeAlso: AH=19h,AH=3Bh,AH=71h,INT 15/AX=DE25h
  42. --------D-2148-------------------------------
  43. INT 21 - DOS 2+ - ALLOCATE MEMORY
  44.     AH = 48h
  45.     BX = number of paragraphs to allocate
  46. Return: CF clear if successful
  47.         AX = segment of allocated block
  48.     CF set on error
  49.         AX = error code (07h,08h) (see AH=59h)
  50.         BX = size of largest available block
  51. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  52.       allocate
  53.     .COM programs are initially allocated the largest available memory
  54.       block, and should free some memory with AH=49h before attempting any
  55.       allocations
  56.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  57.       near pointer to the allocated block on a successful return
  58. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  59. --------D-2149-------------------------------
  60. INT 21 - DOS 2+ - FREE MEMORY
  61.     AH = 49h
  62.     ES = segment of block to free
  63. Return: CF clear if successful
  64.     CF set on error
  65.         AX = error code (07h,09h) (see AH=59h)
  66. Notes:    apparently never returns an error 07h, despite official docs; DOS 2.1+
  67.       code contains only an error 09h exit
  68.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  69.       freed, only when a block is allocated or resized
  70.     the code for this function is identical in DOS 2.1-6.0 except for
  71.       calls to start/end a critical section in DOS 3+
  72. SeeAlso: AH=48h,AH=4Ah
  73. --------D-214A-------------------------------
  74. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  75.     AH = 4Ah
  76.     BX = new size in paragraphs
  77.     ES = segment of block to resize
  78. Return: CF clear if successful
  79.     CF set on error
  80.         AX = error code (07h,08h,09h) (see AH=59h)
  81.         BX = maximum paragraphs available for specified memory block
  82. Notes:    under DOS 2.1-6.0, if there is insufficient memory to expand the block
  83.       as much as requested, the block will be made as large as possible
  84.     DOS 2.1-6.0 coalesces any free blocks immediately following the block
  85.       to be resized
  86. SeeAlso: AH=48h,AH=49h,AH=83h
  87. --------v-214A--BX00B6-----------------------
  88. INT 21 - VIRUS???
  89.     AH = 4Ah
  90.     BX = 00B6h
  91.     ES = CX
  92. Return: ???
  93. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  94.       with Novell DOS 7, and is presumably some virus's installation check
  95. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=FFFFh,AH=D2h"VIRUS"
  96. --------v-214A--BXFFFF-----------------------
  97. INT 21 - VIRUS???
  98.     AH = 4Ah
  99.     BX = FFFFh
  100.     CX = 0568h
  101.     SI = 0129h
  102.     DI = 0000h
  103.     ES = BP
  104. Return: ???
  105. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  106.       with Novell DOS 7, and is presumably some virus's installation check
  107. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=00B6h
  108. --------D-214B-------------------------------
  109. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  110.     AH = 4Bh
  111.     AL = type of load
  112.         00h load and execute
  113.         01h load but do not execute
  114.         03h load overlay
  115.         04h load and execute in background (European MS-DOS 4.0 only)
  116.         "Exec & Go" (see also AH=80h)
  117.     DS:DX -> ASCIZ program name (must include extension)
  118.     ES:BX -> parameter block (see below)
  119.     CX = mode (subfunction 04h only)
  120.         0000h child placed in zombie mode after termination
  121.         0001h child's return code discarded on termination
  122. Return: CF clear if successful
  123.         BX,DX destroyed
  124.         if subfunction 01h, process ID set to new program's PSP; get with
  125.         INT 21/AH=62h
  126.     CF set on error
  127.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  128. Notes:    DOS 2.x destroys all registers, including SS:SP
  129.     under ROM-based DOS, if no disk path characters (colons or slashes)
  130.       are included in the program name, the name is searched for in the
  131.       ROM module headers (see below) before searching on disk
  132.     for functions 00h and 01h, the calling process must ensure that there
  133.       is enough unallocated memory available; if necessary, by releasing
  134.       memory with AH=49h or AH=4Ah
  135.     for function 01h, the AX value to be passed to the child program is put
  136.       on top of the child's stack
  137.     for function 03h, DOS assumes that the overlay is being loaded into
  138.       memory allocated by the caller
  139.     function 01h was undocumented prior to the release of DOS 5.0
  140.     some versions (such as DR-DOS 6.0) check the parameters and parameter
  141.       block and return an error if an invalid value (such as an offset of
  142.       FFFFh) is found
  143.     background programs under European MS-DOS 4.0 must use the new
  144.       executable format
  145.     .COM-format executables begin running with the following register
  146.       values:
  147.         AL = 00h if first FCB has valid drive letter, FFh if not
  148.         AH = 00h if second FCB has valid drive letter, FFh if not
  149.         CS,DS,ES,SS = PSP segment
  150.         SP = offset of last word available in first 64K segment
  151.         (note: AX is always 0000h under DESQview)
  152.     old-format executables begin running with the following register
  153.       values:
  154.         AL = 00h if first FCB has valid drive letter, FFh if not
  155.         AH = 00h if second FCB has valid drive letter, FFh if not
  156.         DS,ES = PSP segment
  157.         SS:SP as defined in .EXE header
  158.         (note: AX is always 0000h under DESQview)
  159.     new executables begin running with the following register values
  160.         AX = environment segment
  161.         BX = offset of command tail in environment segment
  162.         CX = size of automatic data segment (0000h = 64K)
  163.         ES,BP = 0000h
  164.         DS = automatic data segment
  165.         SS:SP = initial stack
  166.       the command tail corresponds to an old executable's PSP:0081h and
  167.       following, except that the 0Dh is turned into a NUL (00h); new
  168.       format executables have no PSP
  169.     under the FlashTek X-32 DOS extender, only function 00h is supported
  170.       and the pointers are passed in DS:EDX and ES:EBX
  171.     DR-DOS 6 always loads .EXE-format programs with no fixups and 
  172.       .COM-format programs starting with 9Ch 55h (PUSHF/PUSH BP) above the
  173.       64K mark to avoid the EXEPACK bug, by extending the memory block
  174.       containing the program's environment; this code is disabled if the
  175.       name of the parent program as stored in the MCB is 'WIN'.
  176.     names for the various executable type understood by various
  177.       environments:
  178.         MZ  old-style DOS executable
  179.         NE  Windows or OS/2 1.x segmented ("new") executable
  180.         LE  Windows virtual device driver (VxD) linear executable
  181.         LX  variant of LE used in OS/2 2.x
  182.         W3  Windows WIN386.EXE file; a collection of LE files
  183.         PE  Win32 (Windows NT and Win32s) portable executable based on
  184.             Unix COFF
  185. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  186.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  187.       file contains additional data after the actual overlay
  188. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  189.  
  190. Format of EXEC parameter block for AL=00h,01h,04h:
  191. Offset    Size    Description
  192.  00h    WORD    segment of environment to copy for child process (copy caller's
  193.         environment if 0000h)
  194.  02h    DWORD    pointer to command tail to be copied into child's PSP
  195.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  196.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  197.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  198.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  199.  
  200. Format of EXEC parameter block for AL=03h:
  201. Offset    Size    Description
  202.  00h    WORD    segment at which to load overlay
  203.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  204.  
  205. Format of EXEC parameter block for FlashTek X-32:
  206. Offset    Size    Description
  207.  00h    PWORD    48-bit far pointer to environment string
  208.  06h    PWORD    48-bit far pointer to command tail string
  209.  
  210. Format of .EXE file header:
  211. Offset    Size    Description
  212.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  213.  02h    WORD    number of bytes in last 512-byte page of executable
  214.  04h    WORD    total number of 512-byte pages in executable (includes any
  215.         partial last page)
  216.  06h    WORD    number of relocation entries
  217.  08h    WORD    header size in paragraphs
  218.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  219.         executable's size
  220.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  221.  0Eh    WORD    initial SS relative to start of executable
  222.  10h    WORD    initial SP
  223.  12h    WORD    checksum (one's complement of sum of all words in executable)
  224.  14h    DWORD    initial CS:IP relative to start of executable
  225.  18h    WORD    offset within header of relocation table
  226.         40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  227.  1Ah    WORD    overlay number (normally 0000h = main program)
  228. ---new executable---
  229.  1Ch  4 BYTEs    ???
  230.  20h    WORD    behavior bits
  231.  22h 26 BYTEs    reserved for additional behavior info
  232.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  233.         or 00000000h if plain MZ executable
  234. ---Borland TLINK---
  235.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  236.  1Eh    BYTE    signature FBh
  237.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  238.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  239. ---ARJ self-extracting archive---
  240.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  241.         the first 1000 bytes of the file)
  242. ---LZEXE 0.90 compressed executable---
  243.  1Ch  4 BYTEs    signature "LZ09"
  244. ---LZEXE 0.91 compressed executable---
  245.  1Ch  4 BYTEs    signature "LZ91"
  246. ---PKLITE compressed executable---
  247.  1Ch    BYTE    minor version number
  248.  1Dh    BYTE    bits 0-3: major version
  249.         bit 4: extra compression
  250.         bit 5: huge (multi-segment) file
  251.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  252. ---LHarc 1.x self-extracting archive---
  253.  1Ch  4 BYTEs    unused???
  254.  20h  3 BYTEs    jump to start of extraction code
  255.  23h  2 BYTEs    ???
  256.  25h 12 BYTEs    signature "LHarc's SFX "
  257. ---LHA 2.x self-extracting archive---
  258.  1Ch  8 BYTEs    ???
  259.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  260. ---TopSpeed C 3.0 CRUNCH compressed file---
  261.  1Ch    DWORD    018A0001h
  262.  20h    WORD    1565h
  263. ---PKARCK 3.5 self-extracting archive---
  264.  1Ch    DWORD    00020001h
  265.  20h    WORD    0700h
  266. ---BSA (Soviet archiver) self-extracting archive---
  267.  1Ch    WORD    000Fh
  268.  1Eh    BYTE    A7h
  269. ---LARC self-extracting archive---
  270.  1Ch  4 BYTEs    ???
  271.  20h 11 BYTEs    "SFX by LARC "
  272. ---LH self-extracting archive---
  273.  1Ch  8 BYTEs    ???
  274.  24h  8 BYTEs    "LH's SFX "
  275. ---other linkers---
  276.  1Ch    var    optional information
  277. ---
  278.   N   N DWORDs    relocation items
  279. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  280.       versions of the MS linker set it that way
  281.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  282.       program is loaded as high in memory as possible
  283.     the maximum allocation is set to FFFFh by default
  284.  
  285. Format of ROM Module Header:
  286. Offset    Size    Description
  287.  00h  2 BYTEs    ROM signature 55h, AAh
  288.  02h    BYTE    size of ROM in 512-byte blocks
  289.  03h  3 BYTEs    POST initialization entry point (near JMP instruction)
  290.  06h    ROM Program Name List [array]
  291.     Offset    Size    Description
  292.      00h    BYTE    length of ROM program's name (00h if end of name list)
  293.      01h  N BYTEs    program name
  294.      N+1  3 BYTEs    program entry point (near JMP instruction)
  295.  
  296. Format of new executable header:
  297. Offset    Size    Description
  298.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  299.  02h  2 BYTEs    linker version (major, then minor)
  300.  04h    WORD    offset from start of this header to entry table (see below)
  301.  06h    WORD    length of entry table in bytes
  302.  08h    DWORD    file load CRC (0 in Borland's TPW)
  303.  0Ch    BYTE    program flags (see below)
  304.  0Dh    BYTE    application flags (see below)
  305.  0Eh    WORD    auto data segment index
  306.  10h    WORD    initial local heap size
  307.  12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
  308.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  309.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  310.         if SS=automatic data segment and SP=0000h, the stack pointer is
  311.           set to the top of the automatic data segment, just below the
  312.           local heap
  313.  1Ch    WORD    segment count
  314.  1Eh    WORD    module reference count
  315.  20h    WORD    length of nonresident names table in bytes
  316.  22h    WORD    offset from start of this header to segment table (see below)
  317.  24h    WORD    offset from start of this header to resource table
  318.  26h    WORD    offset from start of this header to resident names table
  319.  28h    WORD    offset from start of this header to module reference table
  320.  2Ah    WORD    offset from start of this header to imported names table
  321.         (array of counted strings, terminated with a string of length
  322.           00h)
  323.  2Ch    DWORD    offset from start of file to nonresident names table
  324.  30h    WORD    count of moveable entry point listed in entry table
  325.  32h    WORD    file alignment size shift count
  326.         0 is equivalent to 9 (default 512-byte pages)
  327.  34h    WORD    number of resource table entries
  328.  36h    BYTE    target operating system
  329.         00h unknown
  330.         01h OS/2
  331.         02h Windows
  332.         03h European MS-DOS 4.x
  333.         04h Windows 386
  334.         05h BOSS (Borland Operating System Services)
  335.  37h    BYTE    other EXE flags
  336.         bit 0: supports long filenames
  337.         bit 1: 2.X protected mode
  338.         bit 2: 2.X proportional font
  339.         bit 3: gangload area
  340.  38h    WORD    offset to return thunks or start of gangload area
  341.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  342.  3Ch    WORD    minimum code swap area size
  343.  3Eh  2 BYTEs    expected Windows version (minor version first)
  344. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  345.       Reference, Vol 4.
  346.  
  347. Bitfields for new executable program flags:
  348. Bit(s)    Description
  349.  0-1    DGROUP type
  350.       0 = none
  351.       1 = single shared
  352.       2 = multiple (unshared)
  353.       3 = (null)
  354.  2    global initialization
  355.  3    protected mode only
  356.  4    8086 instructions
  357.  5    80286 instructions
  358.  6    80386 instructions
  359.  7    80x87 instructions
  360.  
  361. Bitfields for new executable application flags:
  362. Bit(s)    Description
  363.  0-2    application type
  364.     001 full screen (not aware of Windows/P.M. API)
  365.     010 compatible with Windows/P.M. API
  366.     011 uses Windows/P.M. API
  367.  3    is a Family Application (OS/2)
  368.  5    0=executable, 1=errors in image
  369.  6    non-conforming program (valid stack is not maintained)
  370.  7    DLL or driver rather than application
  371.     (SS:SP info invalid, CS:IP points at FAR init routine called with
  372.       AX=module handle which returns AX=0000h on failure, AX nonzero on
  373.       successful initialization)
  374.  
  375. Format of Codeview trailer (at end of executable):
  376. Offset    Size    Description
  377.  00h    WORD    signature 4E42h ('NB')
  378.  02h    WORD    Microsoft debug info version number
  379.  04h    DWORD    Codeview header offset
  380.  
  381. Format of new executable segment table record:
  382.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  383.  02h    WORD    length of image in file (0000h = 64K)
  384.  04h    WORD    segment attributes (see below)
  385.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  386. Note:    the first segment table entry is entry number 1
  387.  
  388. Bitfields for segment attributes:
  389. Bit(s)    Description
  390.  0    data segment rather than code segment
  391.  1    unused???
  392.  2    real mode
  393.  3    iterated
  394.  4    movable
  395.  5    sharable
  396.  6    preloaded rather than demand-loaded
  397.  7    execute-only (code) or read-only (data)
  398.  8    relocations (directly following code for this segment)
  399.  9    debug info present
  400.  10,11    80286 DPL bits
  401.  12    discardable
  402.  13-15    discard priority
  403.  
  404. Format of new executable entry table item (list):
  405. Offset    Size    Description
  406.  00h    BYTE    number of entry points (00h if end of entry table list)
  407.  01h    BYTE    segment number (00h if end of entry table list)
  408.  02h 3N BYTEs    entry records
  409.         Offset    Size    Description
  410.          00h    BYTE    flags
  411.                 bit 0: exported
  412.                 bit 1: single data
  413.                 bits 2-7: unused???
  414.          01h    WORD    offset within segment
  415.  
  416. Format of new executable relocation data (immediately follows segment image):
  417. Offset    Size    Description
  418.  00h    WORD    number of relocation items
  419.  02h 8N BYTEs    relocation items
  420.         Offset    Size    Description
  421.          00h    BYTE    relocation type
  422.                 00h LOBYTE
  423.                 02h BASE
  424.                 03h PTR
  425.                 05h OFFS
  426.                 0Bh PTR48
  427.                 0Dh OFFS32
  428.          01h    BYTE    flags
  429.                 bit 2: additive
  430.          02h    WORD    offset within segment
  431.          04h    WORD    target address segment
  432.          06h    WORD    target address offset
  433.  
  434. Format of new executable resource data:
  435. Offset    Size    Description
  436.  00h    WORD    alignment shift count for resource data
  437.  02h  N RECORDs resources
  438.     Format of resource record:
  439.     Offset    Size    Description
  440.      00h    WORD    type ID
  441.             0000h if end of resource records
  442.             >= 8000h if integer type
  443.             else offset from start of resource table to type string
  444.      02h    WORD    number of resources of this type
  445.      04h    DWORD    reserved for runtime use
  446.      08h  N Resources (see below)
  447. Note:    resource type and name strings are stored immediately following the
  448.       resource table, and are not null-terminated
  449.  
  450. Format of new executable resource entry:
  451. Offset    Size    Description
  452.  00h    WORD    offset in alignment units from start of file to contents of
  453.         the resource data
  454.  02h    WORD    length of resource image in bytes
  455.  04h    WORD    flags
  456.         bit 4: moveable
  457.         bit 5: shareable
  458.         bit 6: preloaded
  459.  06h    WORD    resource ID
  460.         >= 8000h if integer resource
  461.         else offset from start of resource table to resource string
  462.  08h    DWORD    reserved for runtime use
  463. Notes:    resource type and name strings are stored immediately following the
  464.       resource table, and are not null-terminated
  465.     strings are counted strings, with a string of length 0 indicating the
  466.       end of the resource table
  467.  
  468. Format of new executable module reference table [one bundle of entries]:
  469. Offset    Size    Description
  470.  00h    BYTE    number of records in this bundle (00h if end of table)
  471.  01h    BYTE    segment indicator
  472.         00h unused
  473.         FFh movable segment, segment number is in entry
  474.         else segment number of fixed segment
  475.  02h  N RECORDs
  476.     Format of segment record
  477.     Offset    Size    Description
  478.      00h    BYTE    flags
  479.             bit 0: entry is exported
  480.             bit 1: entry uses global (shared) data
  481.             bits 7-3: number of parameter words
  482.     ---fixed segment---
  483.      01h    WORD    offset
  484.     ---moveable segment---
  485.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  486.      03h    BYTE    segment number
  487.      05h    WORD    offset
  488. Note:    table entries are numbered starting from 1
  489.  
  490. Format of new executable resident/nonresident name table entry:
  491. Offset    Size    Description
  492.  00h    BYTE    length of string (00h if end of table)
  493.  01h  N BYTEs    ASCII text of string
  494.  N+1    WORD    ordinal number (index into entry table)
  495. Notes:    the first string in the resident name table is the module name; the
  496.       first entry in the nonresident name table is the module description
  497.     the strings are case-sensitive; if the executable was linked with
  498.       /IGNORECASE, all strings are in uppercase
  499.  
  500. Format of Linear Executable (enhanced mode executable) header:
  501. Offset    Size    Description
  502.  00h  2 BYTEs    "LE" (4Ch 45h) signature (Windows)
  503.         "LX" (4Ch 58h) signature (OS/2)
  504.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  505.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  506.  04h    DWORD    executable format level
  507.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  508.         01h Intel 80286 or upwardly compatible
  509.         02h Intel 80386 or upwardly compatible
  510.         03h Intel 80486 or upwardly compatible
  511.         04h Intel Pentium (80586) or upwardly compatible
  512.         20h Intel i860 (N10) or compatible
  513.         21h Intel "N11" or compatible
  514.         40h MIPS Mark I (R2000, R3000) or compatible
  515.         41h MIPS Mark II (R6000) or compatible
  516.         42h MIPS Mark III (R4000) or compatible
  517.  0Ah    WORD    target operating system
  518.         01h OS/2
  519.         02h Windows
  520.         03h European DOS 4.0
  521.         04h Windows 386
  522.  0Ch    DWORD    module version
  523.  10h    DWORD    module type (see below)
  524.  14h    DWORD    number of memory pages
  525.  18h    Initial CS:EIP
  526.     DWORD    object number
  527.     DWORD    offset
  528.  20h    Initial SS:ESP
  529.     DWORD    object number
  530.     DWORD    offset
  531.  28h    DWORD    memory page size
  532.  2Ch    DWORD    (Windows LE) bytes on last page
  533.         (OS/2 LX) page offset shift count
  534.  30h    DWORD    fixup section size
  535.  34h    DWORD    fixup section checksum
  536.  38h    DWORD    loader section size
  537.  3Ch    DWORD    loader section checksum
  538.  40h    DWORD    offset of object table (see below)
  539.  44h    DWORD    object table entries
  540.  48h    DWORD    object page map table offset
  541.  4Ch    DWORD    object iterate data map offset
  542.  50h    DWORD    resource table offset
  543.  54h    DWORD    resource table entries
  544.  58h    DWORD    resident names table offset
  545.  5Ch    DWORD    entry table offset
  546.  60h    DWORD    module directives table offset
  547.  64h    DWORD    Module Directives entries
  548.  68h    DWORD    Fixup page table offset
  549.  6Ch    DWORD    Fixup record table offset
  550.  70h    DWORD    imported modules name table offset
  551.  74h    DWORD    imported modules count
  552.  78h    DWORD    imported procedures name table offset
  553.  7Ch    DWORD    per-page checksum table offset
  554.  80h    DWORD    data pages offset
  555.  84h    DWORD    preload page count
  556.  88h    DWORD    non-resident names table offset
  557.  8Ch    DWORD    non-resident names table length
  558.  90h    DWORD    non-resident names checksum
  559.  94h    DWORD    automatic data object
  560.  98h    DWORD    debug information offset
  561.  9Ch    DWORD    debug information length
  562.  A0h    DWORD    preload instance pages number
  563.  A4h    DWORD    demand instance pages number
  564.  A8h    DWORD    extra heap allocation
  565.  ACh 20 BYTEs    reserved
  566.  C0h    WORD    device ID (MS-Windows VxD only)
  567.  C2h    WORD    DDK version (MS-Windows VxD only)
  568. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  569.  
  570. Bitfields for Linear Executable module type:
  571. Bit(s)    Description
  572.  2    initialization (only for DLLs) 0 = global, 1 = per-process
  573.  4    no internal fixups in executable image
  574.  5    no external fixups in executable image
  575.  8-10    API compatibility
  576.     0 = unknown
  577.     1 = incompatible with PM windowing \
  578.     2 = compatible with PM windowing    > (only for
  579.     3 = uses PM windowing API       /    programs)
  580.  13    module not loadable (only for programs)
  581.  15-17    module type
  582.     000 program
  583.     001 library (DLL)
  584.     011 protected memory library module
  585.     100 physical device driver
  586.     110 virtual device driver
  587.  30    per-process library termination
  588.     (requires valid CS:EIP, can't be set for .EXE)
  589.  
  590. Format of object table entry:
  591. Offset    Size    Description
  592.  00h    DWORD    virtual size in bytes
  593.  04h    DWORD    relocation base address
  594.  08h    DWORD    object flags (see below)
  595.  0Ch    DWORD    page map index
  596.  10h    DWORD    page map entries
  597.  14h  4 BYTEs    reserved??? (apparently always zeros)
  598.  
  599. Bitfields for object flags:
  600. Bit(s)    Description
  601.  0    readable
  602.  1    writable
  603.  2    executable
  604.  3    resource
  605.  4    discardable
  606.  5    shared
  607.  6    preloaded
  608.  7    invalid
  609.  8-9    type
  610.     00 normal
  611.     01 zero-filled
  612.     10 resident
  613.     11 resident and contiguous
  614.  10    resident and long-lockable
  615.  11    reserved
  616.  12    16:16 alias required
  617.  13    "BIG" (Huge: 32-bit)
  618.  14    conforming
  619.  15    "OBJECT_I/O_PRIVILEGE_LEVEL"
  620.  16-31    reserved
  621.  
  622. Format of object page map table entry:
  623. Offset    Size    Description
  624.  00h    BYTE    ??? (usually 00h)
  625.  01h    WORD    (big-endian) index to fixup table
  626.         0000h if no relocation info
  627.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  628.  
  629. Format of resident names table entry:
  630. Offset    Size    Description
  631.  00h    BYTE    length of name
  632.  01h  N BYTEs    name
  633.  N+1  3 BYTEs    ???
  634.  
  635. Format of LE linear executable entry table:
  636. Offset    Size    Description
  637.  00h    BYTE    number of entries in table
  638.  01h 10 BYTEs per entry
  639.         Offset    Size    Description
  640.          00h    BYTE    bit flags
  641.                 bit 0: non-empty bundle
  642.                 bit 1: 32-bit entry
  643.          01h    WORD    object number
  644.          03h    BYTE    entry type flags
  645.                 bit 0: exported
  646.                 bit 1: uses single data rather than instance
  647.                 bit 2: reserved
  648.                 bits 3-7: number of stack parameters
  649.          04h    DWORD    offset of entry point
  650.          08h  2 BYTEs    ???
  651. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  652.       and do not contain the remaining nine bytes
  653.  
  654. Format of LX linear executable entry table [array]:
  655. Offset    Size    Description
  656.  00h    BYTE    number of bundles following (00h = end of entry table)
  657.  01h    BYTE    bundle type
  658.         00h empty
  659.         01h 16-bit entry
  660.         02h 286 callgate entry
  661.         03h 32-bit entry
  662.         04h forwarder entry
  663.         bit 7 set if additional parameter typing information is present
  664. ---bundle type 00h---
  665.  no additional fields
  666. ---bundle type 01h---
  667.  02h    WORD    object number
  668.  04h    BYTE    entry flags
  669.         bit 0: exported
  670.         bits 7-3: number of stack parameters
  671.  05h    WORD    offset of entry point in object (shifted by page size shift)
  672. ---bundle type 02h---
  673.  02h    WORD    object number
  674.  04h    BYTE    entry flags
  675.         bit 0: exported
  676.         bits 7-3: number of stack parameters
  677.  05h    WORD    offset of entry point in object
  678.  07h    WORD    reserved for callgate selector (used by loader)
  679. ---bundle type 03h---
  680.  02h    WORD    object number
  681.  04h    BYTE    entry flags
  682.         bit 0: exported
  683.         bits 7-3: number of stack parameters
  684.  05h    DWORD    offset of entry point in object
  685. ---bundle type 04h---
  686.  02h    WORD    reserved
  687.  04h    BYTE    forwarder flags
  688.         bit 0: import by ordinal
  689.         bits 7-1 reserved
  690.  05h    WORD    module ordinal
  691.         (forwarder's index into Import Module Name table)
  692.  07h    DWORD    procedure name offset or import ordinal number
  693. Note:    all fields after the first two bytes are repeated N times
  694.  
  695. Bitfields for linear executable fixup type:
  696. Bit(s)    Description
  697.  7    ordinal is BYTE rather than WORD
  698.  6    16-rather than 8-object number/module ordinal
  699.  5    addition with DWORD rather than WORD
  700.  4    relocation info has size with new two bytes at end
  701.  3    reserved (0)
  702.  2    set if add to destination, clear to replace destination
  703.  1-0    type
  704.     00 internal fixup
  705.     01 external fixup, imported by ordinal
  706.     10 external fixup, imported by name
  707.     11 internal fixup via entry table
  708.  
  709. Format of linear executable fixup record:
  710. Offset    Size    Description
  711.  00h    BYTE    type
  712.         bits 7-4: modifier (0001 single, 0011 multiple)
  713.         bits 3-0: type
  714.             0000 byte offset
  715.             0010 word segment
  716.             0011 16-bit far pointer (DWORD)
  717.             0101 16-bit offset
  718.             0110 32-bit far pointer (PWORD)
  719.             0111 32-bit offset
  720.             1000 near call or jump, WORD/DWORD based on seg attrib
  721.  01h    BYTE    linear executable fixup type (see above)
  722. ---if single type---
  723.  02h    WORD    offset within page
  724.  04h    relocation information
  725.     ---internal fixup---
  726.     BYTE    object number
  727.     ---external,ordinal---
  728.     BYTE    one-based module number in Import Module table
  729.     BYTE/WORD ordinal number
  730.     WORD/DWORD value to add (only present if modifier bit 4 set)
  731.     ---external,name---
  732.     BYTE    one-based module number in Import Module table
  733.     WORD    offset in Import Procedure names
  734.     WORD/DWORD value to add (only present if modifier bit 4 set)
  735. ---if multiple type---
  736.  02h    BYTE    number of items
  737.  03h    var    relocation info as for "single" type (see above)
  738.       N WORDs    offsets of items to relocate
  739.  
  740. Format of old Phar Lap .EXP file header:
  741. Offset    Size    Description
  742.  00h  2 BYTEs    "MP" (4Dh 50h) signature
  743.  02h    WORD    remainder of image size / page size (page size = 512h)
  744.  04h    WORD    size of image in pages
  745.  06h    WORD    number of relocation items
  746.  08h    WORD    header size in paragraphs
  747.  0Ah    WORD    minimum number of extra 4K pages to be allocated at the end
  748.         of program, when it is loaded
  749.  0Ch    WORD    maximum number of extra 4K pages to be allocated at the end
  750.         of program, when it is loaded
  751.  0Eh    DWORD    initial ESP
  752.  12h    WORD    word checksum of file
  753.  14h    DWORD    initial EIP
  754.  18h    WORD    offset of first relocation item
  755.  1Ah    WORD    overlay number
  756.  1Ch    WORD    ??? (wants to be 1)
  757.  
  758. Format of new Phar Lap .EXP file header:
  759. Offset    Size    Description
  760.  00h  2 BYTEs    signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
  761.  02h    WORD    level (01h flat-model file, 02h multisegmented file)
  762.  04h    WORD    header size
  763.  06h    DWORD    file size in bytes
  764.  0Ah    WORD    checksum
  765.  0Ch    DWORD    offset of run-time parameters within file
  766.  10h    DWORD    size of run-time parameters in bytes
  767.  14h    DWORD    offset of relocation table within file
  768.  18h    DWORD    size of relocation table in bytes
  769.  1Ch    DWORD    offset of segment information table within file
  770.  20h    DWORD    size of segment information table in bytes
  771.  24h    WORD    size of segment information table entry in bytes
  772.  26h    DWORD    offset of load image within file
  773.  2Ah    DWORD    size of load image on disk
  774.  2Eh    DWORD    offset of symbol table within file
  775.  32h    DWORD    size of symbol table in bytes
  776.  36h    DWORD    offset of GDT within load image
  777.  3Ah    DWORD    size of GDT in bytes
  778.  3Eh    DWORD    offset of LDT within load image
  779.  42h    DWORD    size of LDT in bytes
  780.  46h    DWORD    offset of IDT within load image
  781.  4Ah    DWORD    size of IDT in bytes
  782.  4Eh    DWORD    offset of TSS within load image
  783.  52h    DWORD    size of TSS in bytes
  784.  56h    DWORD    minimum number of extra bytes to be allocated at end of program
  785.         (level 1 executables only)
  786.  5Ah    DWORD    maximum number of extra bytes to be allocated at end of program
  787.         (level 1 executables only)
  788.  5Eh    DWORD    base load offset (level 1 executables only)
  789.  62h    DWORD    initial ESP
  790.  66h    WORD    initial SS
  791.  68h    DWORD    initial EIP
  792.  6Ch    WORD    initial CS
  793.  6Eh    WORD    initial LDT
  794.  70h    WORD    initial TSS
  795.  72h    WORD    flags
  796.         bit 0: load image is packed
  797.         bit 1: 32-bit checksum is present
  798.         bits 4-2: type of relocation table
  799.  74h    DWORD    memory requirements for load image
  800.  78h    DWORD    32-bit checksum (optional)
  801.  7Ch    DWORD    size of stack segment in bytes
  802.  80h 256 BYTEs    reserved (0)
  803.  
  804. Format of Phar Lap segment information table entry:
  805. Offset    Size    Description
  806.  00h    WORD    selector number
  807.  02h    WORD    flags
  808.  04h    DWORD    base offset of selector
  809.  08h    DWORD    minimum number of extra bytes to be allocated to the segment
  810.  
  811. Format of 386|DOS-Extender run-time parameters:
  812. Offset    Size    Description
  813.  00h  2 BYTEs    signature "DX" (44h 58h)
  814.  02h    WORD    minimum number of real-mode params to leave free at run time
  815.  04h    WORD    maximum number of real-mode params to leave free at run time
  816.  06h    WORD    minimum interrupt buffer size in KB
  817.  08h    WORD    maximum interrupt buffer size in KB
  818.  0Ah    WORD    number of interrupt stacks
  819.  0Ch    WORD    size in KB of each interrupt stack
  820.  0Eh    DWORD    offset of byte past end of real-mode code and data
  821.  12h    WORD    size in KB of call buffers
  822.  14h    WORD    flags
  823.         bit 0: file is virtual memory manager
  824.         bit 1: file is a debugger
  825.  16h    WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
  826.  18h 104 BYTEs    reserved (0)
  827.  
  828. Format of Phar Lap repeat block header:
  829. Offset    Size    Description
  830.  00h    WORD    byte count
  831.  02h    BYTE    repeat string length
  832.  
  833. Format of Borland debugging information header (following load image):
  834. Offset    Size    Description
  835.  00h    WORD    signature 52FBh
  836.  02h    WORD    version ID
  837.  04h    DWORD    size of name pool in bytes
  838.  08h    WORD    number of names in namem pool
  839.  0Ah    WORD    number of type entries
  840.  0Ch    WORD    number of structure members
  841.  0Eh    WORD    number of symbols
  842.  10h    WORD    number of global symbols
  843.  12h    WORD    number of modules
  844.  14h    WORD    number of locals (optional)
  845.  16h    WORD    number of scopes in table
  846.  18h    WORD    number of line-number entries
  847.  1Ah    WORD    number of include files
  848.  1Ch    WORD    number of segment records
  849.  1Eh    WORD    number of segment/file correlations
  850.  20h    DWORD    size of load image after removing uninitialized data and debug
  851.         info
  852.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  853.         depends on program flags
  854.  28h    BYTE    program flags
  855.         bit 0: case-sensitive link
  856.         bit 1: pascal overlay program
  857.  29h    WORD    no longer used
  858.  2Bh    WORD    size of data pool in bytes
  859.  2Dh    BYTE    padding
  860.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  861.  30h    WORD    number of classes
  862.  32h    WORD    number of parents
  863.  34h    WORD    number of global classes (currently unused)
  864.  36h    WORD    number of overloads (currently unused)
  865.  38h    WORD    number of scope classes
  866.  3Ah    WORD    number of module classes
  867.  3Ch    WORD    number of coverage offsets
  868.  3Eh    DWORD    offset relative to symbol base of name pool
  869.  42h    WORD    number of browser information records
  870.  44h    WORD    number of optimized symbol records
  871.  46h    WORD    debugging flags
  872.  48h  8 BYTEs    padding
  873. Note:    additional information on the Borland debugging info may be found in
  874.       Borland's Open Architecture Handbook
  875. --------U-214B-------------------------------
  876. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  877.     AH = 4Bh
  878.     DS:DX = 0000h:0000h
  879. Return: ES:BX -> ELRES history structure (see AH=2Bh/CX=454Ch)
  880.     DX = DABEh (signature, DAve BEnnett)
  881. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  882.       Bennett
  883. SeeAlso: AH=2Bh/CX=454Ch
  884. --------v-214B04-----------------------------
  885. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  886.     AX = 4B04h
  887. Return: CF clear if "MG" resident
  888.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  889. SeeAlso: AX=4243h,AH=4Ah/BX=FFFFh,AX=4B21h
  890. --------D-214B05-----------------------------
  891. INT 21 - DOS 5+ - SET EXECUTION STATE
  892.     AX = 4B05h
  893.     DS:DX -> execution state structure (see below)
  894. Return: CF clear if successful
  895.         AX = 0000h
  896.     CF set on error
  897.         AX = error code (see AH=59h)
  898. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  899.       execution (including setting the DOS version number).     No DOS, BIOS
  900.       or other software interrupt may be called after return from this call
  901.       before commencement of the child process.  If DOS is running in the
  902.       HMA, A20 is turned off on return from this call.
  903. SeeAlso: AH=4Bh
  904.  
  905. Format of execution state structure:
  906. Offset    Size    Description
  907.  00h    WORD    reserved (00h)
  908.  02h    WORD    type flags
  909.         bit 0: program is an .EXE
  910.         bit 1: program is an overlay
  911.  04h    DWORD    pointer to ASCIZ name of program file
  912.  08h    WORD    PSP segment of new program
  913.  0Ah    DWORD    starting CS:IP of new program
  914.  0Eh    DWORD    program size including PSP
  915. --------v-214B20-----------------------------
  916. INT 21 - VIRUS - "Holocaust"/"Telefonica" - ???
  917.     AX = 4B20h
  918. SeeAlso: AX=4B04h,AX=4B21h
  919. --------v-214B21-----------------------------
  920. INT 21 C - VIRUS - "Holocaust"/"Telefonica" - ???
  921.     AX = 4B21h
  922. Note:    called at completion of virus installation
  923. SeeAlso: AX=4B04h,AX=4B20h,AX=4B25h
  924. --------v-214B25-----------------------------
  925. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  926.     AX = 4B25h
  927. Return: DI = 1234h if resident
  928. SeeAlso: AX=4B21h,AX=4B40h
  929. --------v-214B40-----------------------------
  930. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  931.     AX = 4B40h
  932. Return: AX = 5678h if resident
  933. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  934. --------v-214B41-----------------------------
  935. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  936.     AX = 4B41h
  937.     ???
  938. Return: ???
  939. SeeAlso: AX=4B40h
  940. --------v-214B4A-----------------------------
  941. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  942.     AX = 4B4Ah
  943. Return: AL = 57h if resident
  944. SeeAlso: AX=4B40h,AX=4B4Bh
  945. --------v-214B4B-----------------------------
  946. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  947.     AX = 4B4Bh
  948. Return: CF clear if resident
  949. SeeAlso: AX=4B4Ah,AX=4B4Dh
  950. --------v-214B4D-----------------------------
  951. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  952.     AX = 4B4Dh
  953. Return: CF clear if resident
  954. SeeAlso: AX=4B4Ah,AX=4B50h
  955. --------v-214B50-----------------------------
  956. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  957.     AX = 4B50h
  958. Return: AX = 1234h if resident
  959. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  960. --------v-214B53-----------------------------
  961. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  962.     AX = 4B53h
  963. Return: CF clear if resident
  964. SeeAlso: AX=4B50h,AX=4B55h
  965. --------v-214B55-----------------------------
  966. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  967.     AX = 4B55h
  968. Return: AX = 1231h if resident
  969. SeeAlso: AX=4B53h,AX=4B59h
  970. --------v-214B59-----------------------------
  971. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  972.     AX = 4B59h
  973. Return: CF clear if resident
  974. SeeAlso: AX=4B50h,AX=4B5Eh
  975. --------v-214B5E-----------------------------
  976. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  977.     AX = 4B5Eh
  978. Return: CF clear if resident
  979. SeeAlso: AX=4B59h,AX=4B87h
  980. --------v-214B60-----------------------------
  981. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  982.     AX = 4B60h
  983.     ???
  984. Return: ???
  985. SeeAlso: AX=4B50h
  986. --------v-214B87-----------------------------
  987. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  988.     AX = 4B87h
  989. Return: AX = 6663h if resident
  990. SeeAlso: AX=4B5Eh,AX=4B95h
  991. --------v-214B95-----------------------------
  992. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  993.     AX = 4B95h
  994. Return: AX = 1973h if resident
  995. SeeAlso: AX=4B87h,AX=4BA7h
  996. --------v-214BA7-----------------------------
  997. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  998.     AX = 4BA7h
  999. Return: AX = B459h if resident
  1000. SeeAlso: AX=4B95h,AX=4BAAh
  1001. --------v-214BAA-----------------------------
  1002. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  1003.     AX = 4BAAh
  1004. Return: CF clear if resident
  1005. SeeAlso: AX=4BA7h,AX=4BAFh
  1006. --------v-214BAF-----------------------------
  1007. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  1008.     AX = 4BAFh
  1009. Return: AL = AFh if "Magnitogorsk" resident
  1010.     AL = FAh if "948"/"Screenplus1" resident
  1011. SeeAlso: AX=4BAAh,AX=4BDDh
  1012. --------v-214BDD-----------------------------
  1013. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  1014.     AX = 4BDDh
  1015. Return: AX = 1234h
  1016. SeeAlso: AX=4BAFh,AX=4BFEh
  1017. --------v-214BEE-----------------------------
  1018. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  1019.     AX = 4BEEh
  1020. Return: AX = 1234h if grab successful
  1021.        = 2345h if failed (INT 21 grabbed previously)
  1022. Notes:    F-DRIVER.SYS is part of the F-PROT virus/trojan protection package by
  1023.       Fridrik Skulason
  1024.     when called the first time, this function moves the INT 21 monitoring
  1025.       code from its original location in the INT 21 chain to be the first
  1026.       thing called by INT 21.  This is the mechanism used by F-NET.
  1027. SeeAlso: INT 2F/AX=4653h
  1028. --------k-214BF0-----------------------------
  1029. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  1030.     AX = 4BF0h
  1031. Return: CF clear if installed
  1032.         AX = 899Dh
  1033. Program: DIET is an executable-compression program by Teddy Matsumoto
  1034. SeeAlso: AX=37D0h,AX=4BF1h
  1035. --------k-214BF1-----------------------------
  1036. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  1037.     AX = 4BF1h
  1038. Return: ???
  1039. SeeAlso: AX=37D0h,AX=4BF0h
  1040. --------v-214BFE-----------------------------
  1041. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  1042.     AX = 4BFEh
  1043. Return: AX = 1234h if "Hitchcock" resident
  1044.     AX = ABCDh if "1193"/"Copyright" resident
  1045.     DI = 55BBh if "Dark Avenger-1028" resident
  1046. SeeAlso: AX=4BDDh,AX=4BFFh"Justice"
  1047. --------v-214BFF-----------------------------
  1048. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  1049.     AX = 4BFFh
  1050. Return: BL = FFh if "USSR-707" resident
  1051.     DI = 55AAh if "Justice" resident
  1052.     CF clear if "Europe 92" resident
  1053. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  1054. --------v-214BFFSI0000-----------------------
  1055. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  1056.     AX = 4BFFh
  1057.     SI = 0000h
  1058.     DI = 0000h
  1059. Return: DI = 55AAh if installed
  1060. SeeAlso: AX=4BFFh"Justice",AX=5252h
  1061. --------D-214C-------------------------------
  1062. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  1063.     AH = 4Ch
  1064.     AL = return code
  1065. Return: never returns
  1066. Notes:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  1067.       all open files are closed and all memory belonging to the process
  1068.       is freed
  1069.     all network file locks should be removed before calling this function
  1070. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  1071. SeeAlso: INT 60/DI=0601h
  1072. ----------214C57-----------------------------
  1073. INT 21 - Headroom - ???
  1074.     AX = 4C57h
  1075.     DS:DX -> target address
  1076. Note:    jumps to target address instead of terminating program
  1077. SeeAlso: AX=5758h
  1078. --------D-214D-------------------------------
  1079. INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
  1080.     AH = 4Dh
  1081. Return: AH = termination type
  1082.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  1083.         01h control-C abort
  1084.         02h critical error abort
  1085.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  1086.     AL = return code
  1087. Notes:    the word in which DOS stores the return code is cleared after being
  1088.       read by this function, so the return code can only be retrieved once
  1089.     COMMAND.COM stores the return code of the last external command it
  1090.       executed as ERRORLEVEL
  1091.     this call should not be used if the child was started with AX=4B04h;
  1092.       use AH=8Ah instead
  1093.     the following sequence will close a Virtual DOS Machine under OS/2 2.0:
  1094.       MOV    AH,4Dh
  1095.       INT    21h
  1096.       HLT
  1097.       DB    02h,0FDh
  1098.       This sequence is the only way to close a specific VDM which was
  1099.       booted from floppy or a disk image.
  1100. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  1101. --------D-214E-------------------------------
  1102. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  1103.     AH = 4Eh
  1104.     AL = special flag for use by APPEND (see note below)
  1105.     CX = file attribute mask (see AX=4301h) (bits 0 and 5 ignored)
  1106.         0088h (Novell DOS 7) find first deleted file
  1107.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  1108. Return: CF clear if successful
  1109.         [DTA] = FindFirst data block (see below)
  1110.     CF set on error
  1111.         AX = error code (02h,03h,12h) (see AH=59h)
  1112. Notes:    for search attributes other than 08h, all files with at MOST the
  1113.       specified combination of hidden, system, and directory attributes
  1114.       will be returned.  Under DOS 2.x, searching for attribute 08h
  1115.       (volume label) will also return normal files, while under DOS 3+
  1116.       only the volume label (if any) will be returned.
  1117.     this call also returns successfully if given the name of a character
  1118.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  1119.       and the current date and time.  DOS 3+ returns attribute 40h and the
  1120.       current date and time.
  1121.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  1122.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  1123.       found pathname will be stored, otherwise, the actual found path
  1124.       will be prepended to the original filespec without a path.
  1125.     under LANtastic, this call may be used to obtain a list of a server's
  1126.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  1127.       resources may be obtained by searching for "\\SERVER\@*.*"
  1128.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  1129. BUGS:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  1130.       with a character device name (no wildcards) and search attributes
  1131.       which include the volume-label bit (08h) will fail unless there is
  1132.       an intervening DOS call which implicitly or explicity performs a
  1133.       directory search without the volume-label bit.  Such implicit
  1134.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  1135.       (AH=41h), and RENAME (AH=56h)
  1136.     DR-DOS 3.41 and 5.0 return the Directory attribute for the volume label
  1137. SeeAlso: AH=11h,AH=4Fh,AX=4301h,AH=71h,INT 2F/AX=111Bh,INT 2F/AX=B711h
  1138.  
  1139. Format of FindFirst data block:
  1140. Offset    Size    Description
  1141. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  1142.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  1143.  01h 11 BYTEs    search template
  1144.  0Ch    BYTE    search attributes
  1145. ---DOS 2.x (and some DOS 3.x???)---
  1146.  00h    BYTE    search attributes
  1147.  01h    BYTE    drive letter
  1148.  02h 11 BYTEs    search template
  1149. ---WILDUNIX.COM---
  1150.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  1151.  0Ch    BYTE    search attributes
  1152. ---DOS 2.x and most 3.x---
  1153.  0Dh    WORD    entry count within directory
  1154.  0Fh    DWORD    pointer to DTA???
  1155.  13h    WORD    cluster number of start of parent directory
  1156. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  1157.  0Dh    WORD    entry count within directory
  1158.  0Fh    WORD    cluster number of start of parent directory
  1159.  11h  4 BYTEs    reserved
  1160. ---all versions, documented fields---
  1161.  15h    BYTE    attribute of file found
  1162.  16h    WORD    file time (see below)
  1163.  18h    WORD    file date (see below)
  1164.  1Ah    DWORD    file size
  1165.  1Eh 13 BYTEs    ASCIZ filename+extension
  1166.  
  1167. Bitfields for file time:
  1168. Bit(s)    Description
  1169.  11-15    hour
  1170.  5-10    minute
  1171.  0-4    seconds/2
  1172.  
  1173. Bitfields for file date:
  1174. Bit(s)    Description
  1175.  9-15    year-1980
  1176.  5-8    month
  1177.  0-4    day
  1178. --------f-214E-------------------------------
  1179. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  1180.     AH = 4Eh
  1181.     DS:DX = 0000h:0000h
  1182. Return: AH = 99h if installed
  1183. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  1184.       Hosgood and Terry Barnaby
  1185. --------D-214F-------------------------------
  1186. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  1187.     AH = 4Fh
  1188.     [DTA] = data block from previous FindFirst or FindNext call
  1189. Return: CF clear if successful
  1190.     CF set on error
  1191.         AX = error code (12h) (see AH=59h)
  1192. Note:    under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
  1193.       the next matching deleted file will be returned
  1194. BUG:    DR-DOS 3.41 and 5.0 return the Directory attribute for the volume label
  1195. SeeAlso: AH=12h,AH=4Eh,AH=71h,AH=72h
  1196. --------D-2150-------------------------------
  1197. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  1198.     AH = 50h
  1199.     BX = segment of PSP for new process
  1200. Notes:    DOS uses the current PSP address to determine which processes own files
  1201.       and memory; it corresponds to process identifiers used by other OSs
  1202.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  1203.       handler without setting the Critical Error flag
  1204.     under MS-DOS 3+ and DR-DOS 3.41+, this function does not use any of
  1205.       the DOS-internal stacks and may thus be called at any time, even
  1206.       during another INT 21h call
  1207.     some Microsoft applications such as Quick C 2.51 use segments of 0000h
  1208.       and FFFFh and direct access to the SDA (see AX=5D06h) to test whether
  1209.       they are running under MS-DOS rather than a compatible OS; although
  1210.       one should only call this function with valid PSP addresses, any
  1211.       program hooking it should be prepared to handle invalid addresses
  1212.     supported by OS/2 compatibility box
  1213.     this call was undocumented prior to the release of DOS 5.0
  1214. SeeAlso: AH=26h,AH=51h,AH=62h
  1215. --------D-2151-------------------------------
  1216. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  1217.     AH = 51h
  1218. Return: BX = segment of PSP for current process
  1219. Notes:    DOS uses the current PSP address to determine which processes own files
  1220.       and memory; it corresponds to process identifiers used by other OSs
  1221.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  1222.       handler without setting the Critical Error flag
  1223.     under DOS 3+, this function does not use any of the DOS-internal stacks
  1224.       and may thus be called at any time, even during another INT 21h call
  1225.     supported by OS/2 compatibility box
  1226.     identical to the documented AH=62h
  1227.     this call was undocumented prior to the release of DOS 5.0
  1228. SeeAlso: AH=26h,AH=50h,AH=62h
  1229. --------D-2152-------------------------------
  1230. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  1231.     AH = 52h
  1232. Return: ES:BX -> DOS list of lists
  1233. Notes:    partially supported by OS/2 v1.1 compatibility box (however, most
  1234.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  1235.       pointer is FFFFh:FFFFh).
  1236.     on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
  1237.     Quarterdeck's suggested check for the use of its DOSDATA.SYS or
  1238.       DOS-UP.SYS is to test whether the list-of-lists segment is greater
  1239.       than the segment of the first memory block; a better check for
  1240.       DOS-UP.SYS is INT 21/AX=2B01h/CX=444Dh
  1241. SeeAlso: INT 2F/AX=1203h
  1242.  
  1243. Format of List of Lists:
  1244. Offset    Size    Description
  1245.  -24    WORD    (DOS 3.1+) contents of CX from INT 21/AX=5E01h
  1246.  -22    WORD    (DOS ???+) LRU counter for FCB caching
  1247.  -20    WORD    (DOS ???+) LRU counter for FCB opens
  1248.  -18    DWORD    (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
  1249.             FFFFh:FFFFh if not installed or not available
  1250.  -14    WORD    (DOS ???+) offset in DOS CS of code to return from INT 21 call
  1251.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  1252.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  1253.  -8    DWORD    (DOS 3+) pointer to current disk buffer
  1254.  -4    WORD    (DOS 3+) pointer in DOS data segment of unread CON input
  1255.         when CON is read via a handle, DOS reads an entire line,
  1256.           and returns the requested portion, buffering the rest
  1257.           for the next read.  0000h indicates no unread input
  1258.  -2    WORD    segment of first memory control block
  1259.  00h    DWORD    pointer to first Drive Parameter Block (see AH=32h)
  1260.  04h    DWORD    pointer to first System File Table (see below)
  1261.  08h    DWORD    pointer to active CLOCK$ device's header (most recently loaded
  1262.         driver with CLOCK bit set)
  1263.  0Ch    DWORD    pointer to active CON device's header (most recently loaded
  1264.         driver with STDIN bit set)
  1265. ---DOS 2.x---
  1266.  10h    BYTE    number of logical drives in system
  1267.  11h    WORD    maximum bytes/block of any block device
  1268.  13h    DWORD    pointer to first disk buffer (see below)
  1269.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  1270.         NUL is always the first device on DOS's linked list of device
  1271.         drivers. (see below)
  1272. ---DOS 3.0---
  1273.  10h    BYTE    number of block devices
  1274.  11h    WORD    maximum bytes/block of any block device
  1275.  13h    DWORD    pointer to first disk buffer (see below)
  1276.  17h    DWORD    pointer to array of current directory structures (see below)
  1277.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  1278.  1Ch    DWORD    pointer to STRING= workspace area
  1279.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  1280.  22h    DWORD    pointer to FCB table
  1281.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  1282.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  1283.         NUL is always the first device on DOS's linked list of device
  1284.         drivers. (see below)
  1285. ---DOS 3.1-3.3---
  1286.  10h    WORD    maximum bytes per sector of any block device
  1287.  12h    DWORD    pointer to first disk buffer in buffer chain (see below)
  1288.  16h    DWORD    pointer to array of current directory structures (see below)
  1289.  1Ah    DWORD    pointer to system FCB tables (see below)
  1290.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  1291.  20h    BYTE    number of block devices installed
  1292.  21h    BYTE    number of available drive letters (largest of 5, installed
  1293.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  1294.         current directory structure array.
  1295.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  1296.         NUL is always the first device on DOS's linked list of device
  1297.         drivers. (see below)
  1298.  34h    BYTE    number of JOIN'ed drives
  1299. ---DOS 4.x---
  1300.  10h    WORD    maximum bytes per sector of any block device
  1301.  12h    DWORD    pointer to disk buffer info record (see below)
  1302.         Note: although the initialization code in IO.SYS uses this
  1303.         pointer, MSDOS.SYS does not, instead using the hardcoded    
  1304.         address of the info record
  1305.  16h    DWORD    pointer to array of current directory structures (see below)
  1306.  1Ah    DWORD    pointer to system FCB tables (see below)
  1307.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  1308.         (always 00h for DOS 5.0)
  1309.  20h    BYTE    number of block devices installed
  1310.  21h    BYTE    number of available drive letters (largest of 5, installed
  1311.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  1312.         current directory structure array.
  1313.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  1314.         NUL is always the first device on DOS's linked list of device
  1315.         drivers. (see below)
  1316.  34h    BYTE    number of JOIN'ed drives
  1317.  35h    WORD    pointer within IBMDOS code segment to list of special program
  1318.         names (see below)
  1319.         (always 0000h for DOS 5.0)
  1320.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  1321.         (see below)
  1322.         may be called by any IFS driver which does not wish to
  1323.         service functions 20h or 24h-28h itself
  1324.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  1325.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  1326.  41h    WORD    number of lookahead buffers (the y in BUFFERS x,y)
  1327.  43h    BYTE    boot drive (1=A:)
  1328.  44h    BYTE    flag: 01h to use DWORD moves (80386+), 00h otherwise
  1329.  45h    WORD    extended memory size in KB
  1330. ---DOS 5.0-6.0---
  1331.  10h 39 BYTEs    as for DOS 4.x (see above)
  1332.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  1333.  3Bh    WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
  1334.         when executing special .COM format
  1335.  3Dh    WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
  1336.         used for maintaining count of INT 21 calls which disable A20
  1337.         on return
  1338.  3Fh  8 BYTEs    as for DOS 4.x (see above)
  1339.  
  1340. Format of memory control block (see also below):
  1341. Offset    Size    Description
  1342.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  1343.  01h    WORD    PSP segment of owner or
  1344.         0000h if free
  1345.         0006h if DR-DOS XMS UMB
  1346.         0007h if DR-DOS excluded upper memory ("hole")
  1347.         0008h if belongs to DOS
  1348.         FFFAh if 386MAX UMB control block (see AX=4402h"386MAX")
  1349.         FFFDh if 386MAX locked-out memory
  1350.         FFFEh if 386MAX UMB (immediately follows its control block)
  1351.         FFFFh if 386MAX 6.01 device driver
  1352.  03h    WORD    size of memory block in paragraphs
  1353.  05h  3 BYTEs    unused by MS-DOS
  1354.         (386MAX) if locked-out block, region start/prev region end
  1355. ---DOS 2.x,3.x---
  1356.  08h  8 BYTEs    unused
  1357. ---DOS 4+ ---
  1358.  08h  8 BYTEs    ASCII program name if PSP memory block or DR-DOS UMB,
  1359.           else garbage
  1360.         null-terminated if less than 8 characters
  1361. Notes:    the next MCB is at segment (current + size + 1)
  1362.     under DOS 3.1+, the first memory block is the DOS data segment,
  1363.       containing installable drivers, buffers, etc.     Under DOS 4+ it is
  1364.       divided into subsegments, each with its own memory control block
  1365.       (see below), the first of which is at offset 0000h.
  1366.     for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
  1367.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  1368.       "SD" is system data, device drivers, etc.
  1369.     Some versions of DR-DOS use only seven characters of the program name,
  1370.       placing a NUL in the eighth byte.
  1371.  
  1372. Format of MS-DOS 5+ UMB control block:
  1373. Offset    Size    Description
  1374.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  1375.  01h    WORD    first available paragraph in UMB if control block at start
  1376.         of UMB, 000Ah if control block at end of UMB
  1377.  03h    WORD    length in paragraphs of following UMB or locked-out region
  1378.  05h  3 BYTEs    unused
  1379.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  1380.  
  1381. Format of STARLITE (General Software's Embedded DOS) memory control block:
  1382. Offset    Size    Description
  1383.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  1384.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  1385.  03h    WORD    size of memory block in paragraphs
  1386.  05h    BYTE    unused
  1387.  06h    WORD    segment address of next memory control block (0000h if last)
  1388.  08h    WORD    segment address of previous memory control block or 0000h
  1389.  0Ah  6 BYTEs    reserved
  1390.  
  1391. Format of DOS 4+ data segment subsegment control blocks:
  1392. Offset    Size    Description
  1393.  00h    BYTE    subsegment type (blocks typically appear in this order)
  1394.         "D"  device driver
  1395.         "E"  device driver appendage
  1396.         "I"  IFS (Installable File System) driver
  1397.         "F"  FILES=  control block storage area (for FILES>5)
  1398.         "X"  FCBS=   control block storage area, if present
  1399.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  1400.         "B"  BUFFERS=  storage area
  1401.         "L"  LASTDRIVE=     current directory structure array storage area
  1402.         "S"  STACKS=  code and data area, if present (see below)
  1403.         "T"  INSTALL= transient code
  1404.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  1405.  03h    WORD    size of subsegment in paragraphs
  1406.  05h  3 BYTEs    unused
  1407.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  1408.           was loaded (unused for other types)
  1409.  
  1410. Format of data at start of STACKS code segment (if present):
  1411. Offset    Size    Description
  1412.  00h    WORD    ???
  1413.  02h    WORD    number of stacks (the x in STACKS=x,y)
  1414.  04h    WORD    size of stack control block array (should be 8*x)
  1415.  06h    WORD    size of each stack (the y in STACKS=x,y)
  1416.  08h    DWORD    pointer to STACKS data segment
  1417.  0Ch    WORD    offset in STACKS data segment of stack control block array
  1418.  0Eh    WORD    offset in STACKS data segment of last element of that array
  1419.  10h    WORD    offset in STACKS data segment of the entry in that array for
  1420.         the next stack to be allocated (initially same as value in 0Eh
  1421.         and works its way down in steps of 8 to the value in 0Ch as
  1422.         hardware interrupts pre-empt each other)
  1423. Note:    the STACKS code segment data may, if present, be located as follows:
  1424.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  1425.         in the IBMBIO segment (seen at 0070:0190h)
  1426.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  1427.         segment, which may be determined by inspecting the segment
  1428.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  1429.         70h, 72-77h which have not been redirected by device drivers or
  1430.         TSRs.
  1431.     DOS 4+    Identified by sub-segment control block type "S" within the DOS
  1432.         data segment.
  1433. SeeAlso: INT B4"STACKMAN"
  1434.  
  1435. Format of array elements in STACKS data segment:
  1436. Offset    Size    Description
  1437.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  1438.         higher stack.
  1439.  01h    BYTE    not used
  1440.  02h    WORD    previous SP
  1441.  04h    WORD    previous SS
  1442.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  1443.         top of the stack is preset to point back to this control block.
  1444.  
  1445. SHARE.EXE hooks (DOS 3.1-6.00):
  1446. (offsets from first system file table--pointed at by ListOfLists+04h)
  1447. Offset    Size    Description
  1448. -3Ch    DWORD    pointer to FAR routine for ???
  1449.         Note: not called by MS-DOS 3.3, set to 0000h:0000h by
  1450.             SHARE 3.3+
  1451. -38h    DWORD    pointer to FAR routine called on opening file
  1452.         on call, internal DOS location points at filename(see AX=5D06h)
  1453.         Return: CF clear if successful
  1454.             CF set on error
  1455.                 AX = DOS error code (24h) (see AH=59h)
  1456.         Note: SHARE directly accesses DOS-internal data to get name of
  1457.             file just opened
  1458. -34h    DWORD    pointer to FAR routine called on closing file
  1459.         ES:DI -> system file table
  1460.         Note: does something to every Record Lock Record for file
  1461. -30h    DWORD    pointer to FAR routine to close all files for given computer
  1462.         (called by AX=5D03h)
  1463. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  1464.         (called by AX=5D04h)
  1465. -28h    DWORD    pointer to FAR routine to close file by name
  1466.         (called by AX=5D02h)
  1467.         DS:SI -> DOS parameter list (see AX=5D00h)
  1468.            DPL's DS:DX -> name of file to close
  1469.         Return: CF clear if successful
  1470.             CF set on error
  1471.                 AX = DOS error code (03h) (see AH=59h)
  1472. -24h    DWORD    pointer to FAR routine to lock region of file
  1473.         call with BX = file handle
  1474.               ---DOS 3.x---
  1475.               CX:DX = starting offset
  1476.               SI:AX = size
  1477.               ---DOS 4+---
  1478.               DS:DX -> lock range
  1479.                     DWORD start offset
  1480.                     DWORD size in bytes
  1481.         Return: CF set on error
  1482.                 AL = DOS error code (21h) (see AH=59h)
  1483.         Note: not called if file is marked as remote
  1484. -20h    DWORD    pointer to FAR routine to unlock region of file
  1485.         call with BX = file handle
  1486.               ---DOS 3.x---
  1487.               CX:DX = starting offset
  1488.               SI:AX = size
  1489.               ---DOS 4+---
  1490.               DS:DX -> lock range
  1491.                     DWORD start offset
  1492.                     DWORD size in bytes
  1493.         Return: CF set on error
  1494.                 AL = DOS error code (21h) (see AH=59h)
  1495.         Note: not called if file is marked as remote
  1496. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  1497.         call with ES:DI -> system file table entry for file
  1498.             CX = length of region from current position in file
  1499.         Return: CF set if any portion of region locked
  1500.                 AX = 0021h
  1501. -18h    DWORD    pointer to FAR routine to get open file list entry
  1502.         (called by AX=5D05h)
  1503.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  1504.             DPL's BX = index of sharing record
  1505.             DPL's CX = index of SFT in SFT chain of sharing rec
  1506.         Return: CF set on error or not loaded
  1507.                 AX = DOS error code (12h) (see AH=59h)
  1508.             CF clear if successful
  1509.                 ES:DI -> filename
  1510.                 CX = number of locks owned by specified SFT
  1511.                 BX = network machine number
  1512.                 DX destroyed
  1513. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  1514.         call with DS:SI -> unopened FCB
  1515.               ES:DI -> system file table entry
  1516.         Return: BL = C0h???
  1517.         Note: copies following fields from SFT to FCB:
  1518.            starting cluster of file      0Bh     1Ah
  1519.            sharing record offset      33h     1Ch
  1520.            file attribute          04h     1Eh
  1521. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  1522.         call with ES:DI -> system file table entry
  1523.               DS:SI -> FCB
  1524.         Return: CF set if SFT closed or sharing record offsets
  1525.                 mismatched
  1526.             CF clear if successful
  1527.                 BX = starting cluster number from FCB
  1528. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  1529.         DS:SI -> system file table
  1530.         Return: AX = number of handle in JFT which already uses SFT
  1531.         Note: called during open/create of a file
  1532.         Note: if SFT was opened with inheritance enabled and sharing
  1533.             mode 111, does something to all other SFTs owned by
  1534.             same process which have the same file open mode and
  1535.             sharing record
  1536. -08h    DWORD    pointer to FAR routine for closing file
  1537.         Note: closes various handles referring to file most-recently
  1538.             opened
  1539. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  1540.           entries
  1541.         call with ES:DI -> system file table entry for file (see below)
  1542.               AX = subfunction (apply to each related SFT)
  1543.                 00h: update time stamp (offset 0Dh) and date
  1544.                      stamp (offset 0Fh)
  1545.                 01h: update file size (offset 11h) and starting
  1546.                      cluster (offset 0Bh).  Sets last-accessed
  1547.                      cluster fields to start of file if file
  1548.                      never accessed
  1549.                 02h: as function 01h, but last-accessed fields
  1550.                      always changed
  1551.                 03h: do both functions 00h and 02h
  1552.         Note: follows ptr at offset 2Bh in system file table entries
  1553.         Note: NOP if opened with no-inherit or via FCB
  1554. Notes:    most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
  1555.       either that SS=DOS DS or SS=DS=DOS DS and directly access
  1556.       DOS-internal data
  1557.     sharing hooks are not supported by DR-DOS 5-6; they appear to be
  1558.       supported by Novell DOS 7, with a segment of 0000h indicating the
  1559.       DOS data segment
  1560.  
  1561. Format of sharing record:
  1562. Offset    Size    Description
  1563.  00h    BYTE    flag
  1564.         00h free block
  1565.         01h allocated block
  1566.         FFh end marker
  1567.  01h    WORD    size of block
  1568.  03h    BYTE    checksum of pathname (including NUL)
  1569.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  1570.  04h    WORD    offset in SHARE's DS of first Record Lock Record (see below)
  1571.  06h    DWORD    pointer to start of system file table chain for file
  1572.  0Ah    WORD    unique sequence number
  1573.  0Ch    var    ASCIZ full pathname
  1574. Note:    not supported by DR-DOS SHARE 1.1 and 2.0; will reportedly be
  1575.       supported by Novell DOS 7
  1576.  
  1577. Format of Record Lock Record (SHARE.EXE):
  1578. Offset    Size    Description
  1579.  00h    WORD    offset in SHARE's DS of next lock table in list or 0000h
  1580.  02h    DWORD    offset in file of start of locked region
  1581.  06h    DWORD    offset in file of end of locked region
  1582.  0Ah    DWORD    pointer to System File Table entry for this file
  1583.  0Eh    WORD    PSP segment of lock's owner
  1584. ---DOS 5+ ---
  1585.  10h    WORD    lock type: (00h lock all, 01h lock writes only)
  1586.  
  1587. Format of DOS 2.x system file tables:
  1588. Offset    Size    Description
  1589.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  1590.  04h    WORD    number of files in this table
  1591.  06h  28h bytes per file
  1592.     Offset    Size    Description
  1593.      00h    BYTE    number of file handles referring to this file
  1594.      01h    BYTE    file open mode (see AH=3Dh)
  1595.      02h    BYTE    file attribute
  1596.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  1597.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  1598.      0Fh    WORD    ???
  1599.      11h    WORD    ???
  1600.      13h    DWORD    file size???
  1601.      17h    WORD    file date in packed format (see AX=5700h)
  1602.      19h    WORD    file time in packed format (see AX=5700h)
  1603.      1Bh    BYTE    device attribute (see AX=4400h)
  1604.     ---character device---
  1605.      1Ch    DWORD    pointer to device driver
  1606.     ---block device---
  1607.      1Ch    WORD    starting cluster of file
  1608.      1Eh    WORD    relative cluster in file of last cluster accessed
  1609.     ------
  1610.      20h    WORD    absolute cluster number of current cluster
  1611.      22h    WORD    ???
  1612.      24h    DWORD    current file position???
  1613.  
  1614. Format of DOS 3.0 system file tables and FCB tables:
  1615. Offset    Size    Description
  1616.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  1617.  04h    WORD    number of files in this table
  1618.  06h  38h bytes per file
  1619.     Offset    Size    Description
  1620.      00h-1Eh as for DOS 3.1+ (see below)
  1621.      1Fh    WORD    byte offset of directory entry within sector
  1622.      21h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  1623.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  1624.      30h    WORD    (SHARE.EXE) network machine number which opened file
  1625.             (Windows Enhanced mode DOSMGR uses the virtual machine
  1626.             ID as the machine number; see INT 2F/AX=1683h)
  1627.      32h    WORD    PSP segment of file's owner (first three entries for
  1628.             AUX/CON/PRN contain segment of IO.SYS startup code)
  1629.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  1630.      36h    WORD    ??? apparently always 0000h
  1631.  
  1632. Format of DOS 3.1-3.3x, DR-DOS 5.0-6.0 system file tables and FCB tables:
  1633. Offset    Size    Description
  1634.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  1635.  04h    WORD    number of files in this table
  1636.  06h  35h bytes per file
  1637.     Offset    Size    Description
  1638.      00h    WORD    number of file handles referring to this file
  1639.      02h    WORD    file open mode (see AH=3Dh)
  1640.             bit 15 set if this file opened via FCB
  1641.      04h    BYTE    file attribute (see AX=4301h)
  1642.      05h    WORD    device info word (see AX=4400h)
  1643.             bit 15 set if remote file
  1644.             bit 14 set means do not set file date/time on closing
  1645.             bit 12 set means don't inherit on EXEC
  1646.             bits 5-0 drive number for disk files
  1647.      07h    DWORD    pointer to device driver header if character device
  1648.             else pointer to DOS Drive Parameter Block (see AH=32h)
  1649.      0Bh    WORD    starting cluster of file
  1650.      0Dh    WORD    file time in packed format (see AX=5700h)
  1651.             not used for character devices in DR-DOS
  1652.      0Fh    WORD    file date in packed format (see AX=5700h)
  1653.             not used for character devices in DR-DOS
  1654.      11h    DWORD    file size
  1655.     ---system file table---
  1656.      15h    DWORD    current offset in file (may be larger than size of
  1657.             file; INT 21/AH=42h does not check new position)
  1658.     ---FCB table---
  1659.      15h    WORD    counter for last I/O to FCB
  1660.      17h    WORD    counter for last open of FCB
  1661.             (these are separate to determine the times of the
  1662.             latest I/O and open)
  1663.     ---
  1664.      19h    WORD    relative cluster within file of last cluster accessed
  1665.      1Bh    WORD    absolute cluster number of last cluster accessed
  1666.             0000h if file never read or written???
  1667.      1Dh    WORD    number of sector containing directory entry
  1668.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  1669.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  1670.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  1671.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  1672.             (Windows Enhanced mode DOSMGR uses the virtual machine
  1673.             ID as the machine number; see INT 2F/AX=1683h)
  1674.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  1675.             entries for AUX/CON/PRN contain segment of IO.SYS
  1676.             startup code)
  1677.      33h    WORD    offset within SHARE.EXE code segment of
  1678.             sharing record (see above)  0000h = none
  1679.  
  1680. Format of DOS 4.0-6.0 system file tables and FCB tables:
  1681. Offset    Size    Description
  1682.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  1683.  04h    WORD    number of files in this table
  1684.  06h  3Bh bytes per file
  1685.     Offset    Size    Description
  1686.      00h    WORD    number of file handles referring to this file
  1687.             FFFFh if in use but not referenced
  1688.      02h    WORD    file open mode (see AH=3Dh)
  1689.             bit 15 set if this file opened via FCB
  1690.      04h    BYTE    file attribute (see AX=4301h)
  1691.      05h    WORD    device info word (see also AX=4400h)
  1692.             bit 15 set if remote file
  1693.             bit 14 set means do not set file date/time on closing
  1694.             bit 13 set if named pipe
  1695.             bit 12 set if no inherit
  1696.             bit 11 set if network spooler
  1697.             bit 7  set if device, clear if file (only if local)
  1698.             bits 6-0 as for AX=4400h
  1699.      07h    DWORD    pointer to device driver header if character device
  1700.             else pointer to DOS Drive Parameter Block (see AH=32h)
  1701.             or REDIR data
  1702.      0Bh    WORD    starting cluster of file (local files only)
  1703.      0Dh    WORD    file time in packed format (see AX=5700h)
  1704.      0Fh    WORD    file date in packed format (see AX=5700h)
  1705.      11h    DWORD    file size
  1706.      15h    DWORD    current offset in file (SFT)
  1707.             LRU counters (FCB table, two WORDs)
  1708.     ---local file---
  1709.      19h    WORD    relative cluster within file of last cluster accessed
  1710.      1Bh    DWORD    number of sector containing directory entry
  1711.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  1712.     ---network redirector---
  1713.      19h    DWORD    pointer to REDIRIFS record
  1714.      1Dh  3 BYTEs    ???
  1715.     ------
  1716.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  1717.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  1718.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  1719.             (Windows Enhanced mode DOSMGR uses the virtual machine
  1720.             ID as the machine number; see INT 2F/AX=1683h)
  1721.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  1722.             entries for AUX/CON/PRN contain segment of IO.SYS
  1723.             startup code)
  1724.      33h    WORD    offset within SHARE.EXE code segment of
  1725.             sharing record (see above)  0000h = none
  1726.      35h    WORD    (local) absolute cluster number of last clustr accessed
  1727.             (redirector) ???
  1728.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  1729. Note:    the OS/2 2.0 DOS Boot Session does not properly fill in the filename
  1730.       field due to incomplete support for SFTs; the OS/2 2.0 DOS Window
  1731.       does not appear to support SFTs at all
  1732.  
  1733. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  1734. Offset    Size    Description
  1735.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or \\MACH\PATH (network)
  1736.  43h    WORD    drive attributes (see also note below and AX=5F07h)
  1737.         bit 15: uses network redirector     \ invalid if 00, installable
  1738.         bit 14: physical drive         / file system if 11
  1739.         bit 13: JOIN'ed      \ path above is true path that would be
  1740.         bit 12: SUBST'ed  / needed if not under SUBST or JOIN
  1741.         bit  7: remote drive hidden from redirector's assign-list and
  1742.               exempt from network connection make/break commands;
  1743.               set for CD-ROM drives
  1744.  45h    DWORD    pointer to Drive Parameter Block for drive (see AH=32h)
  1745. ---local drives---
  1746.  49h    WORD    starting cluster of current directory
  1747.         0000h = root, FFFFh = never accessed
  1748.  4Bh    WORD    ??? seems to be FFFFh always
  1749.  4Dh    WORD    ??? seems to be FFFFh always
  1750. ---network drives---
  1751.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  1752.         (DOS 4 only) available for use by IFS driver
  1753.  4Dh    WORD    stored user data from INT 21/AX=5F03h
  1754. ------
  1755.  4Fh    WORD    offset in current directory path of backslash corresponding to
  1756.           root directory for drive
  1757.         this value specifies how many characters to hide from the
  1758.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  1759.           drive letter and colon, SUBST, JOIN, and networks change it
  1760.           so that only the appropriate portion of the true path is
  1761.           visible to the user
  1762. ---DOS 4+ ---
  1763.  51h    BYTE    (DOS 4 only, remote drives) device type
  1764.         04h network drive
  1765.  52h    DWORD    pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
  1766.         this drive, 00000000h if native DOS
  1767.  56h    WORD    available for use by IFS driver
  1768. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  1769.       after JOIN x: /D in DR-DOS 5.0 or NET USE x: /D in older LAN versions
  1770.     normally, only one of bits 13&12 may be set together with bit 14, but
  1771.       DR-DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  1772.       0001 SUBST, 0101 ASSIGN (see below)
  1773.  
  1774. Format of DR-DOS 5.0-6.0 current directory structure entry (array):
  1775. Offset    Size    Description
  1776.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  1777.  43h    WORD    drive attributes
  1778.         1000h SUBSTed drive
  1779.         3000h??? JOINed drive
  1780.         4000h physical drive
  1781.         5000h ASSIGNed drive
  1782.         7000h JOINed drive
  1783.         8000h network drive
  1784.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  1785.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  1786.  47h    WORD    cluster number of start of parent directory (0000h = root)
  1787.  49h    WORD    entry number of current directory in parent directory
  1788.  4Bh    WORD    cluster number of start of current directory
  1789.  4Dh    WORD    used for media change detection (details not available)
  1790.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  1791.         0000h if physical root directory
  1792.  
  1793. Bitfields for device attributes (character device):
  1794. Bit(s)    Description
  1795.  15    set (indicates character device)
  1796.  14    IOCTL supported (see AH=44h)
  1797.  13    (DOS 3+) output until busy supported
  1798.  12    reserved
  1799.  11    (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  1800.  10-8    reserved
  1801.  7    (DOS 5+) Generic IOCTL check call supported (driver command 19h)
  1802.     (see AX=4410h,AX=4411h)
  1803.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  1804.     (see AX=440Ch,AX=440Dh)
  1805.  5    reserved
  1806.  4    device is special (use INT 29 "fast console output")
  1807.  3    device is CLOCK$ (all reads/writes use transfer record described
  1808.       below)
  1809.  2    device is NUL
  1810.  1    device is standard output
  1811.  0    device is standard input
  1812. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  1813.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  1814.       010 = European DOS 4.0)
  1815.  
  1816. Bitfields for device attributes (block device):
  1817. Bit(s)    Description
  1818.  15    clear (indicates block device)
  1819.  14    IOCTL supported
  1820.  13    non-IBM format
  1821.  12    network device (device is remote)
  1822.  11    (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  1823.  10    reserved
  1824.  9    direct I/O not allowed??? (set by DOS 3.3 DRIVER.SYS for "new" drives)
  1825.  8    ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  1826.  7    (DOS 5+) Generic IOCTL check call supported (driver command 19h)
  1827.     (see AX=4410h,AX=4411h)
  1828.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  1829.     implies support for commands 17h and 18h
  1830.       (see AX=440Ch,AX=440Dh,AX=440Eh,AX=440Fh)
  1831.  5-2    reserved
  1832.  1    driver supports 32-bit sector addressing (DOS 3.31+)
  1833.  0     reserved
  1834. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  1835.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  1836.       010 = European DOS 4.0)
  1837.  
  1838. Format of device driver header:
  1839. Offset    Size    Description
  1840.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  1841.  04h    WORD    device attributes (see above)
  1842.  06h    WORD    device strategy entry point
  1843.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  1844.  08h    WORD    device interrupt entry point
  1845. ---character device---
  1846.  0Ah  8 BYTEs    blank-padded character device name
  1847. ---block device---
  1848.  0Ah    BYTE    number of subunits (drives) supported by driver
  1849.  0Bh  7 BYTEs    unused
  1850. ---
  1851.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  1852.         appears to be another device chain
  1853.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  1854.  15h    BYTE    (CD-ROM driver) number of units
  1855.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version
  1856.             (currently '00')
  1857.  
  1858. Format of CLOCK$ transfer record:
  1859. Offset    Size    Description
  1860.  00h    WORD    number of days since 1-Jan-1980
  1861.  02h    BYTE    minutes
  1862.  03h    BYTE    hours
  1863.  04h    BYTE    hundredths of second
  1864.  05h    BYTE    seconds
  1865.  
  1866. Format of DOS 2.x disk buffer:
  1867. Offset    Size    Description
  1868.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  1869.         least-recently used buffer is first in chain
  1870.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  1871.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  1872.  08h    WORD    logical sector number
  1873.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  1874.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  1875.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  1876.  10h        buffered data
  1877.  
  1878. Format of DOS 3.x disk buffer:
  1879. Offset    Size    Description
  1880.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  1881.         least-recently used buffer is first in chain
  1882.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  1883.  05h    BYTE    buffer flags (see below)
  1884.  06h    WORD    logical sector number
  1885.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  1886.  09h    BYTE    sector offset between copies if multiple copies to be written
  1887.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  1888.  0Eh    WORD    unused??? (almost always 0)
  1889.  10h        buffered data
  1890.  
  1891. Bitfields for DOS 3.x disk buffer flags:
  1892. Bit(s)    Description
  1893.  7    ???
  1894.  6    buffer dirty
  1895.  5    buffer has been referenced
  1896.  4    ???
  1897.  3    sector in data area
  1898.  2    sector in a directory, either root or subdirectory
  1899.  1    sector in FAT
  1900.  0    boot sector??? (guess)
  1901.  
  1902. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  1903. Offset    Size    Description
  1904.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  1905.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  1906.  06h    DWORD    pointer to lookahead buffer, zero if not present
  1907.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  1908.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  1909.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  1910.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  1911.  11h    WORD    ??? seems always to be 0001h
  1912.  13h    WORD    segment of EMS physical page frame
  1913.  15h    WORD    ??? seems always to be zero
  1914.  17h  4 WORDs    EMS partial page mapping information???
  1915.  
  1916. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  1917. Offset    Size    Description
  1918.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  1919.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  1920.  06h    DWORD    pointer to lookahead buffer, zero if not present
  1921.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  1922.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  1923.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  1924.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  1925.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  1926.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  1927.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  1928.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  1929.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  1930.           into EMS
  1931.  18h    WORD    EMS handle for buffers, zero if not in EMS
  1932.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  1933.  1Ch    WORD    ??? appears always to be 0001h
  1934.  1Eh    WORD    segment of EMS physical page frame
  1935.  20h    WORD    ??? appears always to be zero
  1936.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  1937.  
  1938. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  1939. Offset    Size    Description
  1940.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  1941.         in EMS
  1942.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  1943.         this chain are in the same segment.
  1944.  06h    BYTE    number of dirty buffers on this chain
  1945.  07h    BYTE    reserved (00h)
  1946. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  1947.       address modulo NDBCH,     0 <= N <= NDBCH-1
  1948.     each chain resides completely within one EMS page
  1949.     this structure is in main memory even if buffers are in EMS
  1950.  
  1951. Format of DOS 4.0-6.0 disk buffer:
  1952. Offset    Size    Description
  1953.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  1954.  02h    WORD    backward ptr, offset only
  1955.  04h    BYTE    drive (0=A,1=B, etc) if bit 7 clear
  1956.         SFT index if bit 7 set
  1957.         FFh if not in use
  1958.  05h    BYTE    buffer flags (see below)
  1959.  06h    DWORD    logical sector number (local buffers only)
  1960.  0Ah    BYTE    number of copies to write
  1961.         for FAT sectors, same as number of FATs
  1962.         for data and directory sectors, usually 1
  1963.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  1964.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  1965.  11h    WORD    size of data in buffer if remote buffer (see flags above)
  1966.  13h    BYTE    reserved (padding)
  1967.  14h        buffered data
  1968. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  1969.       (computed as the sum of high and low words of the logical sector
  1970.       number divided by the number of disk buffer chains) are on the same
  1971.       doubly-linked circular chain; for DOS 5+, only a single circular
  1972.       chain exists.
  1973.     the links consist of offset addresses only, the segment being the same
  1974.       for all buffers in the chain.
  1975.  
  1976. Bitfields for DOS 4.0-6.0 disk buffer flags:
  1977. Bit(s)    Description
  1978.  7    remote buffer
  1979.  6    buffer dirty
  1980.  5    buffer has been referenced (reserved in DOS 5+)
  1981.  4    search data buffer (only valid if remote buffer)
  1982.  3    sector in data area
  1983.  2    sector in a directory, either root or subdirectory
  1984.  1    sector in FAT
  1985.  0    reserved
  1986.  
  1987. Format of DOS 5.0-6.0 disk buffer info:
  1988. Offset    Size    Description
  1989.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  1990.         (see above)
  1991.  04h    WORD    number of dirty disk buffers
  1992.  06h    DWORD    pointer to lookahead buffer, zero if not present
  1993.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  1994.  0Ch    BYTE    buffer location
  1995.         00h base memory, no workspace buffer
  1996.         01h HMA, workspace buffer in base memory
  1997.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  1998.  11h  3 BYTEs    unused
  1999.  14h    WORD    ???
  2000.  16h    BYTE    flag: INT 24 fail while making an I/O status call
  2001.  17h    BYTE    temp storage for user memory allocation strategy during EXEC
  2002.  18h    BYTE    counter: number of INT 21 calls for which A20 is off
  2003.  19h    BYTE    bit flags
  2004.         bit 0: ???
  2005.         bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
  2006.             WINA20.SYS when MS Windows 3.0 starts)
  2007.         bit 2: in EXEC state (INT 21/AX=4B05h)
  2008.  1Ah    WORD    offset of unpack code start (used only during INT 21/AX=4B05h)
  2009.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  2010.  1Dh    WORD    minimum paragraphs of memory required by program being EXECed
  2011.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  2012.         memory chain in base 640K only (first UMB MCB usually at 9FFFh,
  2013.         locking out video memory with a DOS-owned memory block)
  2014.  21h    WORD    paragraph from which to start scanning during memory allocation
  2015.  
  2016. Format of IFS driver list:
  2017. Offset    Size    Description
  2018.  00h    DWORD    pointer to next driver header
  2019.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  2020.  0Ch  4 BYTEs    ???
  2021.  10h    DWORD    pointer to IFS utility function entry point (see below)
  2022.         call with ES:BX -> IFS request (see below)
  2023.  14h    WORD    offset in header's segment of driver entry point
  2024.     ???
  2025.  
  2026. Call IFS utility function entry point with:
  2027.     AH = 20h miscellaneous functions
  2028.         AL = 00h get date
  2029.         Return: CX = year
  2030.             DH = month
  2031.             DL = day
  2032.         AL = 01h get process ID and computer ID
  2033.         Return: BX = current PSP segment
  2034.             DX = active network machine number
  2035.         AL = 05h get file system info
  2036.         ES:DI -> 16-byte info buffer
  2037.         Return: buffer filled
  2038.             Offset    Size    Description
  2039.              00h  2 BYTEs    unused
  2040.              02h    WORD    number of SFTs (actually counts only
  2041.                     the first two file table arrays)
  2042.              04h    WORD    number of FCB table entries
  2043.              06h    WORD    number of proctected FCBs
  2044.              08h  6 BYTEs    unused
  2045.              0Eh    WORD    largest sector size supported
  2046.         AL = 06h get machine name
  2047.         ES:DI -> 18-byte buffer for name
  2048.         Return: buffer filled with name starting at offset 02h
  2049.         AL = 08h get sharing retry count
  2050.         Return: BX = sharing retry count
  2051.         AL = other
  2052.         Return: CF set
  2053.     AH = 21h get redirection state
  2054.         BH = type (03h disk, 04h printer)
  2055.         Return: BH = state (00h off, 01h on)
  2056.     AH = 22h ??? some sort of time calculation
  2057.         AL = 00h ???
  2058.             nonzero ???
  2059.     AH = 23h ??? some sort of time calculation
  2060.     AH = 24h compare filenames
  2061.         DS:SI -> first ASCIZ filename
  2062.         ES:DI -> second ASCIZ filename
  2063.         Return: ZF set if files are same ignoring case and / vs \
  2064.     AH = 25h normalize filename
  2065.         DS:SI -> ASCIZ filename
  2066.         ES:DI -> buffer for result
  2067.         Return: filename uppercased, forward slashes changed to backslashes
  2068.     AH = 26h get DOS stack
  2069.         Return: DS:SI -> top of stack
  2070.             CX = size of stack in bytes
  2071.     AH = 27h increment InDOS flag
  2072.     AH = 28h decrement InDOS flag
  2073. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  2074.       pass them on to the default handler pointed at by [LoL+37h]
  2075.  
  2076. Format of IFS request block:
  2077. Offset    Size    Description
  2078.  00h    WORD    total size in bytes of request
  2079.  02h    BYTE    class of request
  2080.         02h ???
  2081.         03h redirection
  2082.         04h ???
  2083.         05h file access
  2084.         06h convert error code to string
  2085.         07h ???
  2086.  03h    WORD    returned DOS error code
  2087.  05h    BYTE    IFS driver exit status
  2088.         00h success
  2089.         01h ???
  2090.         02h ???
  2091.         03h ???
  2092.         04h ???
  2093.         FFh internal failure
  2094.  06h 16 BYTEs    ???
  2095. ---request class 02h---
  2096.  16h    BYTE    function code
  2097.         04h ???
  2098.  17h    BYTE    unused???
  2099.  18h    DWORD    pointer to ???
  2100.  1Ch    DWORD    pointer to ???
  2101.  20h  2 BYTEs    ???
  2102. ---request class 03h---
  2103.  16h    BYTE    function code
  2104.  17h    BYTE    ???
  2105.  18h    DWORD    pointer to ???
  2106.  1Ch    DWORD    pointer to ???
  2107.  22h    WORD    returned ???
  2108.  24h    WORD    returned ???
  2109.  26h    WORD    returned ???
  2110.  28h    BYTE    returned ???
  2111.  29h    BYTE    unused???
  2112. ---request class 04h---
  2113.  16h    DWORD    pointer to ???
  2114.  1Ah    DWORD    pointer to ???
  2115. ---request class 05h---
  2116.  16h    BYTE    function code
  2117.         01h flush disk buffers
  2118.         02h get disk space
  2119.         03h MKDIR
  2120.         04h RMDIR
  2121.         05h CHDIR
  2122.         06h delete file
  2123.         07h rename file
  2124.         08h search directory
  2125.         09h file open/create
  2126.         0Ah LSEEK
  2127.         0Bh read from file
  2128.         0Ch write to file
  2129.         0Dh lock region of file
  2130.         0Eh commit/close file
  2131.         0Fh get/set file attributes
  2132.         10h printer control
  2133.         11h ???
  2134.         12h process termination
  2135.         13h ???
  2136.     ---class 05h function 01h---
  2137.      17h  7 BYTEs    ???
  2138.      1Eh    DWORD    pointer to ???
  2139.      22h  4 BYTEs    ???
  2140.      26h    BYTE    ???
  2141.      27h    BYTE    ???
  2142.     ---class 05h function 02h---
  2143.      17h  7 BYTEs    ???
  2144.      1Eh    DWORD    pointer to ???
  2145.      22h  4 BYTEs    ???
  2146.      26h    WORD    returned total clusters
  2147.      28h    WORD    returned sectors per cluster
  2148.      2Ah    WORD    returned bytes per sector
  2149.      2Ch    WORD    returned available clusters
  2150.      2Eh    BYTE    returned ???
  2151.      2Fh    BYTE    ???
  2152.     ---class 05h functions 03h,04h,05h---
  2153.      17h  7 BYTEs    ???
  2154.      1Eh    DWORD    pointer to ???
  2155.      22h  4 BYTEs    ???
  2156.      26h    DWORD    pointer to directory name
  2157.     ---class 05h function 06h---
  2158.      17h  7 BYTEs    ???
  2159.      1Eh    DWORD    pointer to ???
  2160.      22h  4 BYTEs    ???
  2161.      26h    WORD    attribute mask
  2162.      28h    DWORD    pointer to filename
  2163.     ---class 05h function 07h---
  2164.      17h  7 BYTEs    ???
  2165.      1Eh    DWORD    pointer to ???
  2166.      22h  4 BYTEs    ???
  2167.      26h    WORD    attribute mask
  2168.      28h    DWORD    pointer to source filespec
  2169.      2Ch    DWORD    pointer to destination filespec
  2170.     ---class 05h function 08h---
  2171.      17h  7 BYTEs    ???
  2172.      1Eh    DWORD    pointer to ???
  2173.      22h  4 BYTEs    ???
  2174.      26h    BYTE    00h FINDFIRST
  2175.             01h FINDNEXT
  2176.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  2177.      2Ch    WORD    search attribute if FINDFIRST
  2178.      2Eh    DWORD    pointer to filespec if FINDFIRST
  2179.     ---class 05h function 09h---
  2180.      17h  7 BYTEs    ???
  2181.      1Eh    DWORD    pointer to ???
  2182.      22h    DWORD    pointer to IFS open file structure (see below)
  2183.      26h    WORD    ???  \ together, specify open vs. create, whether or
  2184.      28h    WORD    ???  / not to truncate
  2185.      2Ah  4 BYTEs    ???
  2186.      2Eh    DWORD    pointer to filename
  2187.      32h  4 BYTEs    ???
  2188.      36h    WORD    file attributes on call
  2189.             returned ???
  2190.      38h    WORD    returned ???
  2191.     ---class 05h function 0Ah---
  2192.      17h  7 BYTEs    ???
  2193.      1Eh    DWORD    pointer to ???
  2194.      22h    DWORD    pointer to IFS open file structure (see below)
  2195.      26h    BYTE    seek type (02h = from end)
  2196.      28h    DWORD    offset on call
  2197.             returned new absolute position
  2198.     ---class 05h functions 0Bh,0Ch---
  2199.      17h  7 BYTEs    ???
  2200.      1Eh    DWORD    pointer to ???
  2201.      22h    DWORD    pointer to IFS open file structure (see below)
  2202.      28h    WORD    number of bytes to transfer
  2203.             returned bytes actually transferred
  2204.      2Ah    DWORD    transfer address
  2205.     ---class 05h function 0Dh---
  2206.      17h  7 BYTEs    ???
  2207.      1Eh    DWORD    pointer to ???
  2208.      22h    DWORD    pointer to IFS open file structure (see below)
  2209.      26h    BYTE    file handle???
  2210.      27h    BYTE    unused???
  2211.      28h    WORD    ???
  2212.      2Ah    WORD    ???
  2213.      2Ch    WORD    ???
  2214.      2Eh    WORD    ???
  2215.     ---class 05h function 0Eh---
  2216.      17h  7 BYTEs    ???
  2217.      1Eh    DWORD    pointer to ???
  2218.      22h    DWORD    pointer to IFS open file structure (see below)
  2219.      26h    BYTE    00h commit file
  2220.             01h close file
  2221.      27h    BYTE    unused???
  2222.     ---class 05h function 0Fh---
  2223.      17h  7 BYTEs    ???
  2224.      1Eh    DWORD    pointer to ???
  2225.      22h  4 BYTEs    ???
  2226.      26h    BYTE    02h GET attributes
  2227.             03h PUT attributes
  2228.      27h    BYTE    unused???
  2229.      28h 12 BYTEs    ???
  2230.      34h    WORD    search attributes???
  2231.      36h    DWORD    pointer to filename
  2232.      3Ah    WORD    (GET) returned ???
  2233.      3Ch    WORD    (GET) returned ???
  2234.      3Eh    WORD    (GET) returned ???
  2235.      40h    WORD    (GET) returned ???
  2236.      42h    WORD    (PUT) new attributes
  2237.             (GET) returned attributes
  2238.     ---class 05h function 10h---
  2239.      17h  7 BYTEs    ???
  2240.      1Eh    DWORD    pointer to ???
  2241.      22h    DWORD    pointer to IFS open file structure (see below)
  2242.      26h    WORD    ???
  2243.      28h    DWORD    pointer to ???
  2244.      2Ch    WORD    ???
  2245.      2Eh    BYTE    ???
  2246.      2Fh    BYTE    subfunction
  2247.             01h get printer setup
  2248.             03h ???
  2249.             04h ???
  2250.             05h ???
  2251.             06h ???
  2252.             07h ???
  2253.             21h set printer setup
  2254.     ---class 05h function 11h---
  2255.      17h  7 BYTEs    ???
  2256.      1Eh    DWORD    pointer to ???
  2257.      22h    DWORD    pointer to IFS open file structure (see below)
  2258.      26h    BYTE    subfunction
  2259.      27h    BYTE    unused???
  2260.      28h    WORD    ???
  2261.      2Ah    WORD    ???
  2262.      2Ch    WORD    ???
  2263.      2Eh    BYTE    ???
  2264.      2Fh    BYTE    ???
  2265.     ---class 05h function 12h---
  2266.      17h 15 BYTEs    unused???
  2267.      26h    WORD    PSP segment
  2268.      28h    BYTE    type of process termination
  2269.      29h    BYTE    unused???
  2270.     ---class 05h function 13h---
  2271.      17h 15 BYTEs    unused???
  2272.      26h    WORD    PSP segment
  2273. ---request class 06h---
  2274.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  2275.  1Ah    BYTE    returned ???
  2276.  1Bh    BYTE    unused
  2277. ---request class 07h---
  2278.  16h    DWORD    pointer to IFS open file structure (see below)
  2279.  1Ah    BYTE    ???
  2280.  1Bh    BYTE    unused???
  2281.  
  2282. Format of IFS open file structure:
  2283. Offset    Size    Description
  2284.  00h    WORD    ???
  2285.  02h    WORD    device info word
  2286.  04h    WORD    file open mode
  2287.  06h    WORD    ???
  2288.  08h    WORD    file attributes
  2289.  0Ah    WORD    owner's network machine number
  2290.  0Ch    WORD    owner's PSP segment
  2291.  0Eh    DWORD    file size
  2292.  12h    DWORD    current offset in file
  2293.  16h    WORD    file time
  2294.  18h    WORD    file date
  2295.  1Ah 11 BYTEs    filename in FCB format
  2296.  25h    WORD    ???
  2297.  27h    WORD    hash value of SFT address
  2298.         (low word of linear address + segment&F000h)
  2299.  29h  3 WORDs    network info from SFT
  2300.  2Fh    WORD    ???
  2301.  
  2302. Format of one item in DOS 4+ list of special program names:
  2303. Offset    Size    Description
  2304.  00h    BYTE    length of name (00h = end of list)
  2305.  01h  N BYTEs    name in format name.ext
  2306.  N    2 BYTEs    DOS version to return for program (major,minor)
  2307.         (see AH=30h,INT 2F/AX=122Fh)
  2308. ---DOS 4 only---
  2309.  N+2    BYTE    number of times to return fake version number (FFh = always)
  2310. Note:    if the name of the executable for the program making the DOS "get
  2311.       version" call matches one of the names in this list, DOS returns the
  2312.       specified version rather than the true version number
  2313. --------v-215252-----------------------------
  2314. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  2315.     AX = 5252h
  2316. Return: BX = FFEEh if resident
  2317. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  2318. --------D-2153-------------------------------
  2319. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  2320.     AH = 53h
  2321.     DS:SI -> BIOS Parameter Block (see below)
  2322.     ES:BP -> buffer for Drive Parameter Block (see AH=32h for format)
  2323. Return: ES:BP buffer filled
  2324. Note:    for DOS 3+, the cluster at which to start searching is set to 0000h
  2325.       and the number of free clusters is set to FFFFh (unknown)
  2326.  
  2327. Format of BIOS Parameter Block:
  2328. Offset    Size    Description
  2329.  00h    WORD    number of bytes per sector
  2330.  02h    BYTE    number of sectors per cluster
  2331.  03h    WORD    number of reserved sectors at start of disk
  2332.  05h    BYTE    number of FATs
  2333.  06h    WORD    number of entries in root directory
  2334.  08h    WORD    total number of sectors
  2335.         for DOS 4+, set to zero if partition >32M, then set DWORD at
  2336.           15h to actual number of sectors
  2337.  0Ah    BYTE    media ID byte
  2338.  0Bh    WORD    number of sectors per FAT
  2339. ---DOS 3+---
  2340.  0Dh    WORD    number of sectors per track
  2341.  0Fh    WORD    number of heads
  2342.  11h    DWORD    number of hidden sectors
  2343.  15h 11 BYTEs    reserved
  2344. ---DOS 4+ ---
  2345.  15h    DWORD    total number of sectors if word at 08h contains zero
  2346.  19h  6 BYTEs    ???
  2347.  1Fh    WORD    number of cylinders
  2348.  21h    BYTE    device type
  2349.  22h    WORD    device attributes (removable or not, etc)
  2350. ---DR-DOS 5+ ---
  2351.  15h    DWORD    total number of sectors if word at 08h contains zero
  2352.  19h  6 BYTEs    reserved
  2353. ---European MS-DOS 4.00---
  2354.  15h    DWORD    total number of sectors if word at 08h contains zero
  2355.         (however, this DOS does not actually implement >32M partitions)
  2356. --------D-2154-------------------------------
  2357. INT 21 - DOS 2+ - GET VERIFY FLAG
  2358.     AH = 54h
  2359. Return: AL = verify flag
  2360.         00h off
  2361.         01h on (all disk writes verified after writing)
  2362. SeeAlso: AH=2Eh
  2363. --------D-2155-------------------------------
  2364. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  2365.     AH = 55h
  2366.     DX = segment at which to create new PSP
  2367.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  2368. Return: CF clear if successful
  2369.  
  2370. Notes:    creates a "child" PSP rather than making an exact copy of the current
  2371.       PSP; the new PSP's parent pointer is set to the current PSP and the
  2372.       reference count for each inherited file is incremented
  2373.     (DOS 2+) sets current PSP to DX
  2374.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  2375. SeeAlso: AH=26h,AH=50h
  2376. --------D-2156-------------------------------
  2377. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  2378.     AH = 56h
  2379.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  2380.     ES:DI -> ASCIZ new filename (no wildcards)
  2381.     CL = attribute mask (server call only, see below)
  2382. Return: CF clear if successful
  2383.     CF set on error
  2384.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  2385. Notes:    allows move between directories on same logical volume
  2386.     does not set the archive attribute (see AX=4300h), which results in
  2387.       incremental backups not backing up the file under its new name
  2388.     open files should not be renamed
  2389.     (DOS 3+) allows renaming of directories
  2390.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  2391.       error 12h (no more files) is returned on success, and both source and
  2392.       destination specs must be canonical (as returned by AH=60h).
  2393.       Wildcards in the destination are replaced by the corresponding char
  2394.       of each source file being renamed.  Under DOS 3.x, the call will fail
  2395.       if the destination wildcard is *.* or equivalent; under DR-DOS 5.0,
  2396.       the call will fail if any wildcards are used.     When invoked via
  2397.       AX=5D00h, only those files matching the attribute mask in CL are
  2398.       renamed.
  2399.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  2400.       and the new-name pointer is in ES:EDI (DS must equal ES)
  2401. BUG:    under DR-DOS 3.41, this function will generate a new directory entry
  2402.       with the new name (including any wildcards) which can only be removed
  2403.       with a sector editor when invoked via AX=5D00h
  2404. SeeAlso: AH=17h,AX=4301h,AX=5D00h,AH=60h,AH=71h
  2405. --------D-215700-----------------------------
  2406. INT 21 - DOS 2+ - GET FILE'S DATE AND TIME
  2407.     AX = 5700h
  2408.     BX = file handle
  2409. Return: CF clear if successful
  2410.         CX = file's time (see below)
  2411.         DX = file's date (see below)
  2412.     CF set on error
  2413.         AX = error code (01h,06h) (see AH=59h)
  2414. Note:    under DR-DOS 3.41 and 5.0, this function returns 0 (no date/time) for
  2415.       character devices; MS-DOS returns date and time of opening
  2416. SeeAlso: AX=5701h
  2417.  
  2418. Bitfields for file time:
  2419. Bit(s)    Description
  2420.  15-11    hours (0-23)
  2421.  10-5    minutes
  2422.  4-0    seconds/2
  2423.  
  2424. Bitfields for file date:
  2425. Bit(s)    Description
  2426.  15-9    year - 1980
  2427.  8-5    month
  2428.  4-0    day
  2429. --------D-215701-----------------------------
  2430. INT 21 - DOS 2+ - SET FILE'S DATE AND TIME
  2431.     AX = 5701h
  2432.     BX = file handle
  2433.     CX = new time (see AX=5700h)
  2434.     DX = new date (see AX=5700h)
  2435. Return: CF clear if successful
  2436.     CF set on error
  2437.         AX = error code (01h,06h) (see AH=59h)
  2438. SeeAlso: AX=5700h
  2439. --------D-215702-----------------------------
  2440. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
  2441.     AX = 5702h
  2442.     BX = file handle
  2443.     CX = size of result buffer or 0000h
  2444.     DS:SI -> EAP list (see below)
  2445.     ES:DI -> buffer for returned EAV list (see below)
  2446. Return: CF clear if successful
  2447.         CX = size of returned data
  2448.     CF set on error
  2449.         AX = error code (see AH=59h)
  2450. Desc:    get the current value of one or more extended attributes
  2451. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  2452.       returned, only the amount of data which is available
  2453.     the default DOS 4 behavior is to return a single word of 0000h (no
  2454.       structures) in the result buffer if CX>=0002h on entry
  2455. SeeAlso: AX=5703h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  2456.  
  2457. Format of EAP (extended attribute properties) list:
  2458. Offset    Size    Description
  2459.  00h    WORD    number of EAP structures following
  2460.  02h    var    array of EAP structures (see below)
  2461.  
  2462. Format of EAP (extended attribute property) structure:
  2463. Offset    Size    Description
  2464.  00h    BYTE    attribute type
  2465.         01h boolean (either 00h or 01h)
  2466.         02h number (BYTE, WORD, or DWORD)
  2467.         03h string
  2468.         04h date stamp
  2469.         05h time stamp
  2470.  01h    WORD    EAP flags (see below)
  2471.  03h    BYTE    size of reference string (name)
  2472.  04h  N BYTEs    reference string
  2473.  
  2474. Bitfields for EAP flags:
  2475. Bit(s)    Description
  2476.  12    unchangeable
  2477.  13    ignore
  2478.  14    unchangeable
  2479.  15    used by COMMAND.COM for code page, but not understood by ATTRIB
  2480.  
  2481. Format of EAV (extended attribute value) list:
  2482. Offset    Size    Description
  2483.  00h    WORD    number of EAV structures following
  2484.  02h    var    array of Extended Attribute Value structures
  2485.  
  2486. Format of Extended Attribute Value structures:
  2487. Offset    Size    Description
  2488.  00h  4 BYTEs    ???
  2489.  04h    BYTE    size of reference string
  2490.  05h    WORD    size of value
  2491.  07h    var    reference string
  2492.     var    value
  2493. --------O-215702-----------------------------
  2494. INT 21 - OS/2 v1.1+ Family API - DosQFileInfo
  2495.     AX = 5702h
  2496.     BX = file handle
  2497.     CX = size of buffer for information
  2498.     DX = level of information
  2499.     ES:DI -> buffer for information
  2500. Return: CF clear if successful
  2501.     CF set on error
  2502.         AX = error code
  2503. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  2504. --------O-215702BXFFFF-----------------------
  2505. INT 21 - OS/2 v1.1+ Compatibility Box Family API - DosQPathInfo
  2506.     AX = 5702h
  2507.     BX = FFFFh
  2508.     CX = size of buffer for information
  2509.     DX = level of information (0002h)
  2510.     DS:SI -> filename
  2511.     ES:DI -> buffer for information (see below)
  2512. Return: CF clear if successful
  2513.         AL = 00h
  2514.     CF set on error
  2515.         AX = error code
  2516. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  2517.  
  2518. Format of path information:
  2519. Offset    Size    Description
  2520.  00h 22 BYTEs    ???
  2521.  16h    DWORD    extended attribute size (none present if less than 5)
  2522. --------D-215703-----------------------------
  2523. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
  2524.     AX = 5703h
  2525.     BX = file handle
  2526.     CX = size of result buffer or 0000h
  2527.     ES:DI -> result buffer
  2528. Return: CF clear if successful
  2529.         CX = size of returned data
  2530.     CF set on error
  2531.         AX = error code (see AH=59h)
  2532.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  2533. Desc:    get a list of the extended attributes which are defined for the
  2534.       specified file
  2535. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  2536.       returned, only the amount of data which is available
  2537.     the default DOS 4 behavior is to return a trivial EAP list consisting
  2538.       of the single word 0000h (no EAP structures) if CX>=0002h on entry
  2539. SeeAlso: AX=5702h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  2540. --------O-215703-----------------------------
  2541. INT 21 - OS/2 v1.1+ Family API - DosSetFileInfo
  2542.     AX = 5703h
  2543.     BX = file handle
  2544.     CX = size of information buffer
  2545.     DX = level of information
  2546.     ES:DI -> information buffer
  2547. Return: CF clear if successful
  2548.     CF set on error
  2549.         AX = error code
  2550. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  2551. --------O-215703BXFFFF-----------------------
  2552. INT 21 - OS/2 v1.1+ Family API - DosSetPathInfo
  2553.     AX = 5703h
  2554.     BX = FFFFh
  2555.     CX = size of information buffer
  2556.     DX = level of information
  2557.     DS:SI -> filename
  2558.     ES:DI -> information buffer
  2559. Return: CF clear if successful
  2560.     CF set on error
  2561.         AX = error code
  2562. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  2563. --------D-215704-----------------------------
  2564. INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
  2565.     AX = 5704h
  2566.     BX = file handle
  2567.     ES:DI -> EAV list (see AX=5702h)
  2568. Return: CF clear if successful
  2569.     CF set on error
  2570.         AX = error code (see AH=59h)
  2571. Note:    the default DOS 4 behavior is to do nothing and return successfully
  2572. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  2573. ----------215757BX5757-----------------------
  2574. INT 21 U - IBM Genie - Resident Manager - INSTALLATION CHECK
  2575.     AX = 5757h
  2576.     BX = 5757h
  2577. Return: AX = 0000h if installed
  2578.         BX = ???
  2579.         DX = ???
  2580.         DS:SI -> list of 27 DWORD entry point addresses
  2581. Program: IBM Genie is a set of utility TSRs by Helix Software
  2582. Note:    other functions possible if BX <> 5757h, but details not yet available
  2583. ----------215758-----------------------------
  2584. INT 21 U - Headroom - API
  2585.     AX = 5758h
  2586.     BL = function
  2587.         00h ???
  2588.         01h get Headroom location
  2589.         Return: CF clear if installed
  2590.                 AX = PSP segment of Headroom TSR
  2591.                 BX = paragraphs of memory used by Headroom
  2592.             CF set if not (normal DOS return)
  2593.         Note:    this function is also used as an installation check
  2594.         02h get INT 21 handler
  2595.         Return: CF clear
  2596.             ES:BX -> Headroom's INT 21 handler
  2597.         Note: also sets unknown flag
  2598.         03h launch application???
  2599.         DS:SI -> 233-byte application record
  2600.         Return: ???
  2601.         04h ???
  2602.         ???
  2603.         Return: CF clear
  2604.         05h get swap directory
  2605.         Return: CF clear
  2606.             DX:AX -> ASCIZ swap directory name
  2607.         06h ???
  2608.         DX = ???
  2609.         Return: CF clear
  2610.         07h ???
  2611.         08h ???
  2612.         09h get current application
  2613.         Return: BX = application number
  2614.         0Ah ???
  2615.         DX = application number
  2616.         DS:SI = ???
  2617.         Return: ???
  2618.         0Bh ???
  2619.         0Ch ???
  2620.         DX = application number
  2621.         ???
  2622.         Return: ???
  2623.         0Dh ???
  2624.         DX = application number
  2625.         ???
  2626.         Return: ???
  2627.         0Eh get ???
  2628.         Return: CF clear
  2629.             AX = ???
  2630.         0Fh set ??? flag
  2631.         10h clear ??? flag
  2632.         11h find application by name
  2633.         DS:SI -> ASCIZ application name
  2634.         Return: CF clear
  2635.             AX = application number or FFFFh if not loaded
  2636.         12h ???
  2637.         DX = application number
  2638.         Return: CF clear
  2639.             ???
  2640.         13h ???
  2641.         Return: CF clear
  2642.         14h ???
  2643.         same as function 13h
  2644.         15h set ???
  2645.         DX = ???
  2646.         16h get ???
  2647.         Return: AX = ??? set by function 15h
  2648.         17h get ???
  2649.         Return: BX = ???
  2650.             CX = ??? (may be pointer in BX:CX)
  2651.         18h BUG: branches incorrectly due to fencepost error
  2652. Program: Headroom is a TSR/task switcher by Helix Software
  2653. SeeAlso: AX=4C57h,AX=5757h
  2654. --------D-2158-------------------------------
  2655. INT 21 - DOS 3+ - GET OR SET MEMORY ALLOCATION STRATEGY
  2656.     AH = 58h
  2657.     AL = subfunction
  2658.         00h get allocation strategy
  2659.         Return: AX = current strategy
  2660.                 00h low memory first fit
  2661.                 01h low memory best fit
  2662.                 02h low memory last fit
  2663.              ---DOS 5+ ---
  2664.                 40h high memory first fit
  2665.                 41h high memory best fit
  2666.                 42h high memory last fit
  2667.                 80h first fit, try high then low memory
  2668.                 81h best fit, try high then low memory
  2669.                 82h last fit, try high then low memory
  2670.         01h set allocation strategy
  2671.         BL = new allocation strategy (see above)
  2672.         BH = 00h (DOS 5+)
  2673. Return: CF clear if successful
  2674.     CF set on error
  2675.         AX = error code (01h) (see AH=59h)
  2676. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  2677.       2 or greater means last fit
  2678.     the Get subfunction returns the last value set
  2679.     setting an allocation strategy involving high memory does not
  2680.       automatically link in the UMB memory chain; this must be done
  2681.       explicitly with AX=5803h in order to actually allocate high memory
  2682.     a program which changes the allocation strategy should restore it
  2683.       before terminating
  2684.     Toshiba MS-DOS 2.11 supports subfunctions 00h and 01h
  2685.     DR-DOS 3.41 reportedly reverses subfunctions 00h and 01h
  2686. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  2687. --------D-2158-------------------------------
  2688. INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
  2689.     AH = 58h
  2690.     AL = subfunction
  2691.         02h get UMB link state
  2692.         Return: AL = 00h UMBs not part of DOS memory chain
  2693.                = 01h UMBs in DOS memory chain
  2694.         03h set UMB link state
  2695.         BX = 0000h remove UMBs from DOS memory chain
  2696.            = 0001h add UMBs to DOS memory chain
  2697. Return: CF clear if successful
  2698.     CF set on error
  2699.         AX = error code (01h) (see AH=59h)
  2700. Note:    a program which changes the UMB link state should restore it before
  2701.       terminating
  2702. --------v-2158CC-----------------------------
  2703. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  2704.     AX = 58CCh
  2705. Return: CF clear if resident
  2706. SeeAlso: AX=5252h,AX=58DDh,AX=6969h
  2707. --------v-2158DD-----------------------------
  2708. INT 21 - VIRUS - "1067"/"Headcrash" - GET ORIGINAL INT 21h VECTOR
  2709.     AX = 58DDh
  2710. Return: CX = code segment of virus
  2711.     ES:BX = old INT 21h vector
  2712. SeeAlso: AX=5252h,AX=58CCh,AX=6969h
  2713. --------D-2159--BX0000-----------------------
  2714. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  2715.     AH = 59h
  2716.     BX = 0000h
  2717. Return: AX = extended error code (see below)
  2718.     BH = error class (see below)
  2719.     BL = recommended action (see below)
  2720.     CH = error locus (see below)
  2721.     ES:DI may be pointer (see error code list below)
  2722.     CL, DX, SI, BP, and DS destroyed
  2723. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  2724.       one supported under DOS 2.x
  2725.     you should call this function to retrieve the true error code when an
  2726.       FCB or DOS 2.x call returns an error
  2727.     under DR-DOS 5.0, this function does not use any of the DOS-internal
  2728.       stacks and may thus be called at any time
  2729. SeeAlso: AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh
  2730.  
  2731. Values for extended error code:
  2732.  00h (0)   no error
  2733.  01h (1)   function number invalid
  2734.  02h (2)   file not found
  2735.  03h (3)   path not found
  2736.  04h (4)   too many open files (no handles available)
  2737.  05h (5)   access denied
  2738.  06h (6)   invalid handle
  2739.  07h (7)   memory control block destroyed
  2740.  08h (8)   insufficient memory
  2741.  09h (9)   memory block address invalid
  2742.  0Ah (10)  environment invalid (usually >32K in length)
  2743.  0Bh (11)  format invalid
  2744.  0Ch (12)  access code invalid
  2745.  0Dh (13)  data invalid
  2746.  0Eh (14)  reserved
  2747.  0Fh (15)  invalid drive
  2748.  10h (16)  attempted to remove current directory
  2749.  11h (17)  not same device
  2750.  12h (18)  no more files
  2751. ---DOS 3+---
  2752.  13h (19)  disk write-protected
  2753.  14h (20)  unknown unit
  2754.  15h (21)  drive not ready
  2755.  16h (22)  unknown command
  2756.  17h (23)  data error (CRC)
  2757.  18h (24)  bad request structure length
  2758.  19h (25)  seek error
  2759.  1Ah (26)  unknown media type (non-DOS disk)
  2760.  1Bh (27)  sector not found
  2761.  1Ch (28)  printer out of paper
  2762.  1Dh (29)  write fault
  2763.  1Eh (30)  read fault
  2764.  1Fh (31)  general failure
  2765.  20h (32)  sharing violation
  2766.  21h (33)  lock violation
  2767.  22h (34)  disk change invalid (ES:DI -> media ID structure)(see below)
  2768.  23h (35)  FCB unavailable
  2769.  24h (36)  sharing buffer overflow
  2770.  25h (37)  (DOS 4+) code page mismatch
  2771.  26h (38)  (DOS 4+) cannot complete file operation (out of input)
  2772.  27h (39)  (DOS 4+) insufficient disk space
  2773.  28h-31h   reserved
  2774.  32h (50)  network request not supported
  2775.  33h (51)  remote computer not listening
  2776.  34h (52)  duplicate name on network
  2777.  35h (53)  network name not found
  2778.  36h (54)  network busy
  2779.  37h (55)  network device no longer exists
  2780.  38h (56)  network BIOS command limit exceeded
  2781.  39h (57)  network adapter hardware error
  2782.  3Ah (58)  incorrect response from network
  2783.  3Bh (59)  unexpected network error
  2784.  3Ch (60)  incompatible remote adapter
  2785.  3Dh (61)  print queue full
  2786.  3Eh (62)  queue not full
  2787.  3Fh (63)  not enough space to print file
  2788.  40h (64)  network name was deleted
  2789.  41h (65)  network: Access denied
  2790.  42h (66)  network device type incorrect
  2791.  43h (67)  network name not found
  2792.  44h (68)  network name limit exceeded
  2793.  45h (69)  network BIOS session limit exceeded
  2794.  46h (70)  temporarily paused
  2795.  47h (71)  network request not accepted
  2796.  48h (72)  network print/disk redirection paused
  2797.  49h (73)  network software not installed
  2798.        (LANtastic) invalid network version
  2799.  4Ah (74)  unexpected adapter close
  2800.        (LANtastic) account expired
  2801.  4Bh (75)  (LANtastic) password expired
  2802.  4Ch (76)  (LANtastic) login attempt invalid at this time
  2803.  4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
  2804.  4Eh (78)  (LANtastic v3+) not logged in to network node
  2805.  4Fh (79)  reserved
  2806.  50h (80)  file exists
  2807.  51h (81)  reserved
  2808.  52h (82)  cannot make directory
  2809.  53h (83)  fail on INT 24h
  2810.  54h (84)  (DOS 3.3+) too many redirections
  2811.  55h (85)  (DOS 3.3+) duplicate redirection
  2812.  56h (86)  (DOS 3.3+) invalid password
  2813.  57h (87)  (DOS 3.3+) invalid parameter
  2814.  58h (88)  (DOS 3.3+) network write fault
  2815.  59h (89)  (DOS 4+) function not supported on network
  2816.  5Ah (90)  (DOS 4+) required system component not installed
  2817.  64h (100) (MSCDEX) unknown error
  2818.  65h (101) (MSCDEX) not ready
  2819.  66h (102) (MSCDEX) EMS memory no longer valid
  2820.  67h (103) (MSCDEX) not High Sierra or ISO-9660 format
  2821.  68h (104) (MSCDEX) door open
  2822.  
  2823. Format of media ID structure:
  2824. Offset    Size    Description
  2825.  00h 12 BYTEs    ASCIZ volume label of required disk
  2826.  0Ch    DWORD    serial number (DOS 4+)
  2827.  
  2828. Values for Error Class:
  2829.  01h    out of resource (storage space or I/O channels)
  2830.  02h    temporary situation (file or record lock)
  2831.  03h    authorization (denied access)
  2832.  04h    internal (system software bug)
  2833.  05h    hardware failure
  2834.  06h    system failure (configuration file missing or incorrect)
  2835.  07h    application program error
  2836.  08h    not found
  2837.  09h    bad format
  2838.  0Ah    locked
  2839.  0Bh    media error
  2840.  0Ch    already exists
  2841.  0Dh    unknown
  2842.  
  2843. Values for Suggested Action:
  2844.  01h    retry
  2845.  02h    delayed retry
  2846.  03h    prompt user to reenter input
  2847.  04h    abort after cleanup
  2848.  05h    immediate abort
  2849.  06h    ignore
  2850.  07h    retry after user intervention
  2851.  
  2852. Values for Error Locus:
  2853.  01h    unknown or not appropriate
  2854.  02h    block device (disk error)
  2855.  03h    network related
  2856.  04h    serial device (timeout)
  2857.  05h    memory related
  2858. --------D-2159--BX0001-----------------------
  2859. INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
  2860.     AH = 59h
  2861.     BX = 0001h
  2862. Return: ES:DI -> hard error information packet (see below) for most recent
  2863.         hard (critical) error
  2864. SeeAlso: AH=59h/BX=0000h,AH=95h,INT 24
  2865.  
  2866. Format of hard error information packet:
  2867. Offset    Size    Description
  2868.  00h    WORD    contents of AX at system entry
  2869.  02h    WORD    Process ID which encountered error
  2870.  04h    WORD    contents of AX at time of error
  2871.  06h    BYTE    error type
  2872.         00h physical I/O error
  2873.         01h disk change request
  2874.         02h file sharing violation
  2875.         03h FCB problem
  2876.         04h file locking violation
  2877.         05h bad FAT
  2878.         06h network detected error
  2879.  07h    BYTE    INT 24 error code
  2880.  08h    WORD    extended error code (see AH=59h/BX=0000h)
  2881.  0Ah    DWORD    pointer to associated device
  2882. --------D-215A-------------------------------
  2883. INT 21 - DOS 3+ - CREATE TEMPORARY FILE
  2884.     AH = 5Ah
  2885.     CX = file attribute (see AX=4301h)
  2886.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  2887.         generated filename
  2888. Return: CF clear if successful
  2889.         AX = file handle opened for read/write in compatibility mode
  2890.         DS:DX pathname extended with generated name for temporary file
  2891.     CF set on error
  2892.         AX = error code (03h,04h,05h) (see AH=59h)
  2893. Desc:    creates a file with a unique name which must be explicitly deleted
  2894. BUGS:    COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  2895.       wraps around to the end of the segment
  2896.     MS-DOS 5.00 revisions A and B and PC-DOS 5.00 revision A reportedly
  2897.       hang the system if the specified path is the root directory and the
  2898.       root directory is full (no free directory entries)
  2899. Note:    under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  2900. SeeAlso: AH=3Ch,AH=5Bh
  2901. --------D-215B-------------------------------
  2902. INT 21 - DOS 3+ - CREATE NEW FILE
  2903.     AH = 5Bh
  2904.     CX = file attribute (see AX=4301h)
  2905.     DS:DX -> ASCIZ filename
  2906. Return: CF clear if successful
  2907.         AX = file handle opened for read/write in compatibility mode
  2908.     CF set on error
  2909.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  2910. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  2911.       rather than truncating it; this permits its use in creating semaphore
  2912.       files because it is an atomic "test and set" operation
  2913.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2914. SeeAlso: AH=3Ch,AH=5Ah
  2915. --------D-215C-------------------------------
  2916. INT 21 - DOS 3+ - "FLOCK" - RECORD LOCKING
  2917.     AH = 5Ch
  2918.     AL = subfunction
  2919.         00h lock region of file
  2920.         01h unlock region of file
  2921.     BX = file handle
  2922.     CX:DX = start offset of region within file
  2923.     SI:DI = length of region in bytes
  2924. Return: CF clear if successful
  2925.     CF set on error
  2926.         AX = error code (01h,06h,21h,24h) (see AH=59h)
  2927. Notes:    error returned unless SHARE or network installed
  2928.     an unlock call must specify the same region as some prior lock call
  2929.     locked regions become entirely inaccessible to other processes
  2930.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  2931.       handles inherited by child processes (see AH=4Bh) do not
  2932.     under DR-DOS 3.41 and 5.0, if a process opens a file without the no-
  2933.       inherit flag and then starts a child, any locks set by the parent
  2934.       are ignored, and the child will only get an error if it tries to
  2935.       lock an area previously locked by the parent process
  2936. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  2937. --------D-215D00-----------------------------
  2938. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  2939.     AX = 5D00h
  2940.     DS:DX -> DOS parameter list (see below)
  2941.     DPL contains all register values for a call to INT 21h
  2942. Return: as appropriate for function being called
  2943. Notes:    does not check AH.  Out of range values will crash the system
  2944.     executes using specified computer ID and process ID
  2945.     sharing delay loops skipped
  2946.     a special sharing mode is enabled to handle FCBs opened across network
  2947.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h) under
  2948.       MS-DOS; under DR-DOS 3.41, wildcards corrupt the filesystem; and
  2949.       under DR-DOS 5.0-6.0, the call returns error code 03h due to improper
  2950.       support for the server function call (see below)
  2951.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  2952.       DELETE (AH=41h), and RENAME (AH=56h)
  2953.     functions which take filenames require canonical names (as returned
  2954.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  2955. BUGS:    the OS/2 2.0 DOS Boot Session incorrectly maps DOS drive letters,
  2956.       seemingly ignoring HPFS drives
  2957.     DR-DOS 5.0-6.0 merely recursively call INT 21 after loading the
  2958.       registers from the DPL, leading to problems for peer-to-peer
  2959.       networks
  2960. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  2961.  
  2962. Format of DOS parameter list:
  2963. Offset    Size    Description
  2964.  00h    WORD    AX
  2965.  02h    WORD    BX
  2966.  04h    WORD    CX
  2967.  06h    WORD    DX
  2968.  08h    WORD    SI
  2969.  0Ah    WORD    DI
  2970.  0Ch    WORD    DS
  2971.  0Eh    WORD    ES
  2972.  10h    WORD    reserved (0)
  2973.  12h    WORD    computer ID (0 = current system)
  2974.  14h    WORD    process ID (PSP segment on specified computer)
  2975. Note:    under Windows Enhanced mode, the computer ID is normally the virtual
  2976.       machine ID (see INT 2F/AX=1683h), though this can reportedly be
  2977.       changed by setting UniqueDOSPSP= in SYSTEM.INI
  2978. --------D-215D01-----------------------------
  2979. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  2980.     AX = 5D01h
  2981.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  2982.         process ID fields used
  2983. Return: CF set on error
  2984.         AX = error code (see AH=59h)
  2985.     CF clear if successful
  2986. Notes:    flushes buffers and updates directory entries for each file which has
  2987.       been written to; if remote file, calls INT 2F/AX=1107h
  2988.     the computer ID and process ID are stored but ignored under DOS 3.3
  2989.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  2990. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  2991. --------D-215D02-----------------------------
  2992. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  2993.     AX = 5D02h
  2994.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  2995.         computer ID, and process ID used
  2996.     DPL's DS:DX -> ASCIZ name of file to close
  2997. Return: CF set on error
  2998.         AX = error code (see AH=59h)
  2999.     CF clear if successful
  3000. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  3001.     name must be canonical fully-qualified, such as returned by AH=60h
  3002.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  3003. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  3004. --------D-215D03-----------------------------
  3005. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  3006.     AX = 5D03h
  3007.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  3008. Return: CF set on error
  3009.         AX = error code (see AH=59h)
  3010.     CF clear if successful
  3011. Notes:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  3012.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  3013. SeeAlso: AX=5D02h,AX=5D04h
  3014. --------D-215D04-----------------------------
  3015. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  3016.     AX = 5D04h
  3017.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  3018.         process ID fields used
  3019. Return: CF set on error
  3020.         AX = error code (see AH=59h)
  3021.     CF clear if successful
  3022. Notes:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  3023.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  3024. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  3025. --------D-215D05-----------------------------
  3026. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  3027.     AX = 5D05h
  3028.     DS:DX -> DOS parameter list (see AX=5D00h)
  3029.     DPL's BX = index of sharing record (see AH=52h)
  3030.     DPL's CX = index of SFT in sharing record's SFT list
  3031. Return: CF clear if successful
  3032.         ES:DI -> ASCIZ filename
  3033.         BX = network machine number of SFT's owner
  3034.         CX = number of locks held by SFT's owner
  3035.     CF set if either index out of range
  3036.         AX = 0012h (no more files)
  3037. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  3038.     names are always canonical fully-qualified, such as returned by AH=60h
  3039.     not supported by DR-DOS 3.41 and 5.0, but does not return an error
  3040. SeeAlso: AH=5Ch,AH=60h
  3041. --------D-215D06-----------------------------
  3042. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  3043.     AX = 5D06h
  3044. Return: CF set on error
  3045.        AX = error code (see AH=59h)
  3046.     CF clear if successful
  3047.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  3048.         (critical error flag is first byte)
  3049.         CX = size in bytes of area which must be swapped while in DOS
  3050.         DX = size in bytes of area which must always be swapped
  3051. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  3052.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  3053.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  3054.       DOS 2.x by forcing use of correct stack
  3055.     swapping the data area allows reentering DOS unless DOS is in a
  3056.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  3057.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  3058.     SHARE and other DOS utilities consult the byte at offset 04h in the
  3059.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  3060.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  3061.     DR-DOS 3.41+ supports this function, but the SDA format beyond the
  3062.       first 18h bytes is completely different from MS-DOS
  3063. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  3064.  
  3065. Format of DOS 3.10-3.30 Swappable Data Area:
  3066. Offset    Size    Description
  3067.  -34    BYTE    (DOS 3.10+) printer echo flag (00h off, FFh active)
  3068.  -31    BYTE    (DOS 3.30) current switch character
  3069.  -28    BYTE    (DOS 3.30) incremented on each INT 21/AX=5E01h call
  3070.  -27 16 BYTEs    (DOS 3.30) machine name set by INT 21/AX=5E01h
  3071.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  3072.         enable critical-section calls (see INT 2A/AH=80h)
  3073.  -1    BYTE    unused padding
  3074. ---start of actual SDA---
  3075.  00h    BYTE    critical error flag ("ErrorMode")
  3076.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  3077.  02h    BYTE    drive on which current critical error occurred, or FFh
  3078.         (DR-DOS sets to drive number during INT 24, 00h otherwise)
  3079.  03h    BYTE    locus of last error
  3080.  04h    WORD    extended error code of last error
  3081.  06h    BYTE    suggested action for last error
  3082.  07h    BYTE    class of last error
  3083.  08h    DWORD    ES:DI pointer for last error
  3084.  0Ch    DWORD    current DTA
  3085.  10h    WORD    current PSP
  3086.  12h    WORD    stores SP across an INT 23
  3087.  14h    WORD    return code from last process termination (zerod after reading
  3088.         with AH=4Dh)
  3089.  16h    BYTE    current drive
  3090.  17h    BYTE    extended break flag
  3091. ---remainder need only be swapped if in DOS---
  3092.  18h    WORD    value of AX on call to INT 21
  3093.  1Ah    WORD    PSP segment for sharing/network
  3094.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  3095.  1Eh    WORD    first usable memory block found when allocating memory
  3096.  20h    WORD    best usable memory block found when allocating memory
  3097.  22h    WORD    last usable memory block found when allocating memory
  3098.  24h    WORD    memory size in paragraphs (used only during initialization)
  3099.  26h    WORD    last entry checked during directory search
  3100.  28h    BYTE    flag: INT 24 returned Fail
  3101.  29h    BYTE    flags: allowable INT 24 actions (passed to INT 24 in AH)
  3102.  2Ah    BYTE    directory flag (00h directory, 01h file)
  3103.  2Bh    BYTE    flag: FFh if Ctrl-Break termination, 00h otherwise
  3104.  2Ch    BYTE    flag: allow embedded blanks in FCB
  3105.  2Dh    BYTE    padding (unused)
  3106.  2Eh    BYTE    day of month
  3107.  2Fh    BYTE    month
  3108.  30h    WORD    year - 1980
  3109.  32h    WORD    number of days since 1-1-1980
  3110.  34h    BYTE    day of week (0 = Sunday)
  3111.  35h    BYTE    flag: console swapped during read from device
  3112.  36h    BYTE    flag: safe to call INT 28 if nonzero
  3113.  37h    BYTE    flag: if nonzero, INT 24 Abort turned into INT 24 Fail
  3114.         (set only during process termination)
  3115.  38h 26 BYTEs    device driver request header (see INT 2F/AX=0802h)
  3116.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  3117.  56h 22 BYTEs    device driver request header for I/O calls
  3118.  6Ch 14 BYTEs    device driver request header for disk status check
  3119.  7Ah    DWORD    pointer to device I/O buffer???
  3120.  7Eh    WORD    ???
  3121.  80h    WORD    ???
  3122.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  3123.  83h    BYTE    padding (unused)
  3124.  84h  3 BYTEs    24-bit user number (see AH=30h)
  3125.  87h    BYTE    OEM number (see AH=30h)
  3126.  88h    WORD    offset to error code conversion table for INT 25/INT 26
  3127.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  3128.  90h    BYTE    device I/O buffer for single-byte I/O functions
  3129.  91h    BYTE    padding??? (unused)
  3130.  92h 128 BYTEs    buffer for filename
  3131. 112h 128 BYTEs    buffer for filename
  3132. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  3133. 1A7h 32 BYTEs    directory entry for found file (see AH=11h)
  3134. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  3135. 218h 11 BYTEs    FCB-format filename for device name comparison
  3136. 223h    BYTE    terminating NUL for above filename
  3137. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  3138. 22Fh    BYTE    terminating NUL for above spec
  3139. 230h    BYTE    ???
  3140. 231h    WORD    destination file/directory starting sector
  3141. 233h  5 BYTEs    ???
  3142. 238h    BYTE    extended FCB file attribute
  3143. 239h    BYTE    type of FCB (00h regular, FFh extended)
  3144. 23Ah    BYTE    directory search attributes
  3145. 23Bh    BYTE    file open/access mode
  3146. 23Ch    BYTE    file found/delete flag
  3147.         bit 0: file found
  3148.         bit 4: file deleted
  3149. 23Dh    BYTE    flag: device name found on rename, or file not found
  3150. 23Eh    BYTE    splice flag (file name and directory name together)
  3151. 23Fh    BYTE    flag indicating how DOS function was invoked
  3152.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  3153. 240h    BYTE    sector position within cluster
  3154. 241h    BYTE    flag: translate sector/cluster (00h no, 01h yes)
  3155. 242h    BYTE    flag: 00h if read, 01h if write
  3156. 243h    BYTE    current working drive number
  3157. 244h    BYTE    cluster factor
  3158. 245h    BYTE    flag: cluster split mode
  3159. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  3160. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  3161. 248h    BYTE    volume ID flag
  3162. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  3163. 24Ah    BYTE    file create flag (00h = no, search only)
  3164. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  3165.         (normally E5h, but 00h as described under INT 21/AH=13h)
  3166. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  3167.         temp: used during process termination
  3168. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  3169. 254h    WORD    stores SP across INT 24
  3170. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  3171. 25Ah    WORD    saving partial cluster number
  3172. 25Ch    WORD    temp: sector of work current cluster
  3173. 25Eh    WORD    high part of cluster number (only low byte referenced)
  3174. 260h    WORD    ??? temp
  3175. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  3176. 263h    BYTE    padding (unused)
  3177. 264h    DWORD    pointer to device header when filename is character device
  3178. 268h    DWORD    pointer to current SFT
  3179. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  3180. 270h    DWORD    pointer to caller's FCB
  3181. 274h    WORD    number of SFT to which file being opened will refer
  3182. 276h    WORD    temporary storage for file handle
  3183. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  3184. 27Ch    WORD    offset in DOS DS of first filename argument
  3185. 27Eh    WORD    offset in DOS DS of second filename argument
  3186. 280h    WORD    offset of last component in pathname or FFFFh
  3187. 282h    WORD    offset of transfer address to add
  3188. 284h    WORD    last relative cluster within file being accessed
  3189. 286h    WORD    temp: absolute cluster number being accessed
  3190. 288h    WORD    directory sector number
  3191. 28Ah    WORD    ??? current cluster number
  3192. 28Ch    WORD    current relative sector number within file
  3193. 28Eh    WORD    current sector number
  3194. 290h    WORD    current byte offset within sector
  3195. 292h    DWORD    current offset in file
  3196. 296h    DWORD    temp: file byte count
  3197. 29Ah    WORD    temp: file byte count
  3198. 29Ch    WORD    free file cluster entry
  3199. 29Eh    WORD    last file cluster entry
  3200. 2A0h    WORD    next file cluster number
  3201. 2A2h    DWORD    number of bytes appended to file
  3202. 2A6h    DWORD    pointer to current work disk buffer
  3203. 2AAh    DWORD    pointer to working SFT
  3204. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  3205. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  3206. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  3207. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  3208.         also switched to for duration of INT 24
  3209. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  3210.         (see AH=4Eh)
  3211. 2CDh 32 BYTEs    directory entry for file being renamed (see AH=11h for format)
  3212. 2EDh 331 BYTEs    critical error stack
  3213.    403h     35 BYTEs scratch SFT
  3214. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  3215. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  3216. ---DOS 3.2,3.3x only---
  3217. 738h    BYTE    device driver lookahead flag (usually printer) (see AH=64h)
  3218. 739h    BYTE    volume change flag
  3219. 73Ah    BYTE    flag: virtual open
  3220. 73Bh    BYTE    ???
  3221. --------D-215D07-----------------------------
  3222. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  3223.     AX = 5D07h
  3224. Return: DL = mode
  3225.         00h redirected output is combined
  3226.         01h redirected output in separate print jobs
  3227. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  3228. --------D-215D08-----------------------------
  3229. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  3230.     AX = 5D08h
  3231.     DL = mode
  3232.         00h redirected output is combined
  3233.         01h redirected output placed in separate jobs, start new print job
  3234.         now
  3235. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  3236. --------D-215D09-----------------------------
  3237. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  3238.     AX = 5D09h
  3239. Notes:    forces redirected printer output to be printed, and starts a new print
  3240.       job
  3241.     this function is also supported by 10Net, which calls it Terminate All
  3242.       Spool Jobs, and does not flush if in "combine" mode
  3243. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  3244. --------D-215D0A-----------------------------
  3245. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  3246.     AX = 5D0Ah
  3247.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  3248. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  3249.       DX,DI, and ES in corresponding registers
  3250. Notes:    documented for DOS 5+, but undocumented in earlier versions
  3251.     the MS-DOS Programmer's Reference incorrectly states that this call was
  3252.       introduced in DOS 4, and fails to mention that the ERROR structure
  3253.       passed to this function is a DOS parameter list.
  3254. BUG:    DR-DOS 3.41 and 5.0 read the value for ES from the DS field of the DPL;
  3255.       fortunately, MS-DOS ignores the DS field, allowing a generic routine
  3256.       which sets both DS and ES fields to the same value
  3257. SeeAlso: AH=59h
  3258. --------D-215D0B-----------------------------
  3259. INT 21 OU - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  3260.     AX = 5D0Bh
  3261. Return: CF set on error
  3262.         AX = error code (see AH=59h)
  3263.     CF clear if successful
  3264.         DS:SI -> swappable data area list (see below)
  3265. Notes:    copying and restoring the swappable data areas allows DOS to be
  3266.       reentered unless it is in a critical section delimited by calls to
  3267.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  3268.     SHARE and other DOS utilities consult the byte at offset 04h in the
  3269.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  3270.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  3271.     DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
  3272.       call for finding the SDA (see AX=5D06h)
  3273. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h
  3274.  
  3275. Format of DOS 4.x swappable data area list:
  3276. Offset    Size    Description
  3277.  00h    WORD    count of data areas
  3278.  02h  N BYTEs    "count" copies of data area record
  3279.         Offset    Size    Description
  3280.          00h    DWORD    address
  3281.          04h    WORD    length and type
  3282.                 bit 15 set if swap always, clear if swap in DOS
  3283.                 bits 14-0: length in bytes
  3284.  
  3285. Format of DOS 4.0-6.0 swappable data area:
  3286. Offset    Size    Description
  3287.  -34    BYTE    printer echo flag (00h off, FFh active)
  3288.  -31    BYTE    current switch character (ignored by DOS 5+)
  3289.  -28    BYTE    incremented on each INT 21/AX=5E01h call
  3290.  -27 16 BYTEs    machine name set by INT 21/AX=5E01h
  3291.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  3292.         enable critical-section calls (see INT 2A/AH=80h)
  3293.         (all offsets are 0D0Ch, but this list is still present for
  3294.         DOS 3.x compatibility)
  3295.  -1    BYTE    unused padding
  3296. ---start of actual SDA---
  3297.  00h    BYTE    critical error flag ("ErrorMode")
  3298.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  3299.  02h    BYTE    drive on which current critical error occurred or FFh
  3300.  03h    BYTE    locus of last error
  3301.  04h    WORD    extended error code of last error
  3302.  06h    BYTE    suggested action for last error
  3303.  07h    BYTE    class of last error
  3304.  08h    DWORD    ES:DI pointer for last error
  3305.  0Ch    DWORD    current DTA
  3306.  10h    WORD    current PSP
  3307.  12h    WORD    stores SP across an INT 23
  3308.  14h    WORD    return code from last process termination (zerod after reading
  3309.         with AH=4Dh)
  3310.  16h    BYTE    current drive
  3311.  17h    BYTE    extended break flag
  3312.  18h    BYTE    flag: code page switching
  3313.  19h    BYTE    flag: copy of previous byte in case of INT 24 Abort
  3314. ---remainder need only be swapped if in DOS---
  3315.  1Ah    WORD    value of AX on call to INT 21
  3316.  1Ch    WORD    PSP segment for sharing/network
  3317.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  3318.  20h    WORD    first usable memory block found when allocating memory
  3319.  22h    WORD    best usable memory block found when allocating memory
  3320.  24h    WORD    last usable memory block found when allocating memory
  3321.  26h    WORD    memory size in paragraphs (used only during initialization)
  3322.  28h    WORD    last entry checked during directory search
  3323.  2Ah    BYTE    flag: nonzero if INT 24 Fail
  3324.  2Bh    BYTE    flags: allowable INT 24 responses (passed to INT 24 in AH)
  3325.  2Ch    BYTE    flag: do not set directory if nonzero
  3326.  2Dh    BYTE    flag: program aborted by ^C
  3327.  2Eh    BYTE    flag: allow embedded blanks in FCB
  3328.         may also allow use of "*" wildcard in FCBs
  3329.  2Fh    BYTE    padding (unused)
  3330.  30h    BYTE    day of month
  3331.  31h    BYTE    month
  3332.  32h    WORD    year - 1980
  3333.  34h    WORD    number of days since 1-1-1980
  3334.  36h    BYTE    day of week (0 = Sunday)
  3335.  37h    BYTE    flag: console swapped during read from device
  3336.  38h    BYTE    flag: safe to call INT 28 if nonzero
  3337.  39h    BYTE    flag: abort currently in progress, turn INT 24 Abort into Fail
  3338.  3Ah 30 BYTEs    device driver request header (see INT 2F/AX=0802h) for
  3339.         device calls
  3340.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  3341.  5Ch 22 BYTEs    device driver request header for I/O calls
  3342.  72h 14 BYTEs    device driver request header for disk status check
  3343.  80h    DWORD    pointer to device I/O buffer
  3344.  84h    WORD    ???
  3345.  86h    WORD    ??? (0)
  3346.  88h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  3347.  89h    DWORD    start offset of file region to lock/unlock
  3348.  8Dh    DWORD    length of file region to lock/unlock
  3349.  91h    BYTE    padding (unused)
  3350.  92h  3 BYTEs    24-bit user number (see AH=30h)
  3351.  95h    BYTE    OEM number (see AH=30h)
  3352.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  3353.  9Ch    BYTE    device I/O buffer for single-byte I/O functions
  3354.  9Dh    BYTE    padding???
  3355.  9Eh 128 BYTEs    buffer for filename
  3356. 11Eh 128 BYTEs    buffer for filename
  3357. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  3358. 1B3h 32 BYTEs    directory entry for found file (see AH=11h)
  3359. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  3360. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  3361. 236h    BYTE    terminating NUL for above filename
  3362. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  3363. 242h    BYTE    terminating NUL for above filespec
  3364. 243h    BYTE    ???
  3365. 244h    WORD    ???
  3366. 246h  5 BYTEs    ???
  3367. 24Bh    BYTE    extended FCB file attributes
  3368. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  3369. 24Dh    BYTE    directory search attributes
  3370. 24Eh    BYTE    file open/access mode
  3371. 24Fh    BYTE    ??? flag bits
  3372.         reportedly 00h when deleting a file under MSDOS 5.0
  3373. 250h    BYTE    flag: device name found on rename, or file not found
  3374. 251h    BYTE    splice flag??? (file name and directory name together)
  3375. 252h    BYTE    flag indicating how DOS function was invoked
  3376.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  3377. 253h    BYTE    sector position within cluster
  3378. 254h    BYTE    ??? (flag: translate sector/cluster)
  3379. 255h    BYTE    ??? (flag: 00h if read, 01h if write)
  3380. 256h    BYTE    current working drive number
  3381. 257h    BYTE    cluster factor
  3382. 258h    BYTE    ???
  3383. 259h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  3384. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  3385. 25Bh    BYTE    volume ID flag
  3386. 25Ch    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  3387. 25Dh    BYTE    ???
  3388. 25Eh    BYTE    ??? file create flag (00h = no, search only)
  3389. 25Fh    BYTE    ??? (value for deleted file's first byte)
  3390. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  3391. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  3392. 268h    WORD    stores SP across INT 24
  3393. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  3394. 26Eh    WORD    segment of disk buffer
  3395. 270h    WORD    ??? (saving partial cluster number)
  3396. 272h    WORD    ??? (temp: sector of work current cluster)
  3397. 274h    WORD    ??? (high part of cluster number)
  3398. 276h    WORD    ??? (temp)
  3399. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  3400. 279h    BYTE    ??? (doesn't seem to be referenced)
  3401. 27Ah    DWORD    pointer to device header if filename is character device
  3402. 27Eh    DWORD    pointer to current SFT
  3403. 282h    DWORD    pointer to current directory structure for drive being accessed
  3404. 286h    DWORD    pointer to caller's FCB
  3405. 28Ah    WORD    SFT index to which file being opened will refer
  3406. 28Ch    WORD    temporary storage for file handle
  3407. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  3408. 292h    WORD    offset in DOS DS of first filename argument
  3409. 294h    WORD    offset in DOS DS of second filename argument
  3410. 296h    WORD    ??? (offset of last component in pathname or FFFFh)
  3411. 298h    WORD    offset of transfer address to add
  3412. 29Ah    WORD    last relative cluster within file being accessed
  3413. 29Ch    WORD    temp: absolute cluster number being accessed
  3414. 29Eh    WORD    directory sector number
  3415. 2A0h    WORD    ???
  3416. 2A2h    WORD    ??? directory cluster number
  3417. 2A4h    DWORD    current relative sector number within file
  3418. 2A8h    DWORD    ??? (current sector number)
  3419. 2ACh    WORD    ??? (current byte offset within sector)
  3420. 2AEh    DWORD    current offset in file
  3421. 2B2h    WORD    ???
  3422. 2B4h    WORD    bytes in partial sector
  3423. 2B6h    WORD    number of sectors
  3424. 2B8h    WORD    ??? (free file cluster entry)
  3425. 2BAh    WORD    ??? (last file cluster entry)
  3426. 2BCh    WORD    ??? (next file cluster number)
  3427. 2BEh    DWORD    number of bytes appended to file
  3428. 2C2h    DWORD    pointer to current work disk buffer
  3429. 2C6h    DWORD    pointer to working SFT
  3430. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  3431. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  3432. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  3433. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  3434.         also switched to for duration of INT 24
  3435. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  3436. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  3437.         performed, and 01h or 03h by INT 21/AX=6C00h)
  3438. 2D7h    WORD    ??? apparently unused
  3439. 2D9h    DWORD    stored ES:DI for AX=6C00h
  3440. 2DDh    WORD    extended file open action code (see AX=6C00h)
  3441. 2DFh    WORD    extended file open attributes (see AX=6C00h)
  3442. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  3443. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  3444. 2E7h    WORD    ??? temp DX storage or 0000h or temp data buffer size from
  3445.           disk buffer
  3446. 2E9h    WORD    ???
  3447. 2EBh    BYTE    ???
  3448. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  3449. 2EEh    WORD    ???
  3450. 2F0h    BYTE    ???
  3451. 2F1h    WORD    ??? bit flags
  3452. 2F3h    DWORD    pointer to user-supplied filename
  3453. 2F7h    DWORD    pointer to ???
  3454. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  3455. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  3456. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  3457. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  3458.         (see AH=4Eh)
  3459. 315h 32 BYTEs    directory entry for file being renamed (see AH=11h)
  3460. 335h 331 BYTEs    critical error stack
  3461. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  3462. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  3463. 780h    BYTE    device driver lookahead flag (usually printer) (see AH=64h)
  3464. 781h    BYTE    volume change flag
  3465. 782h    BYTE    flag: virtual open
  3466. 783h    BYTE    ???
  3467. 784h    WORD    ???
  3468. 786h    WORD    ???
  3469. 788h    WORD    ???
  3470. 78Ah    WORD    ???
  3471. --------D-215E00-----------------------------
  3472. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  3473.     AX = 5E00h
  3474.     DS:DX -> 16-byte buffer for ASCIZ machine name
  3475. Return: CF clear if successful
  3476.         CH = validity
  3477.         00h name invalid
  3478.         nonzero valid
  3479.             CL = NetBIOS number for machine name
  3480.             DS:DX buffer filled with blank-paded name
  3481.     CF set on error
  3482.         AX = error code (01h) (see AH=59h)
  3483. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  3484. SeeAlso: AX=5E01h
  3485. --------N-215E00-----------------------------
  3486. INT 21 - 10NET v5.0 - GET MACHINE NAME
  3487.     AX = 5E00h
  3488. Return: CL = redirector's NetBIOS name number
  3489.     ES:DI -> network node ID
  3490. SeeAlso: AX=5E01h"10NET"
  3491. --------D-215E01CH00-------------------------
  3492. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  3493.     AX = 5E01h
  3494.     CH = 00h undefine name (make it invalid)
  3495.        <> 0     define name
  3496.     CL = name number
  3497.     DS:DX -> 15-character blank-padded ASCIZ name
  3498. SeeAlso: AX=5E00h
  3499. --------N-215E01-----------------------------
  3500. INT 21 - 10NET v5.0 - GET LOCAL 10NET CONFIGURATION TABLE
  3501.     AX = 5E01h
  3502.     CX = length of buffer
  3503.     DS:DX -> buffer for 10Net configuration table
  3504. SeeAlso: AX=5E00h"10NET",INT 6F/AH=02h,INT 6F/AH=03h
  3505.  
  3506. Format of 10Net Configuration Table:
  3507. Offset    Size    Description
  3508.  00h  8 BYTEs    user name
  3509.  08h 15 BYTEs    node ID
  3510.  17h  3 BYTEs    unique portion of Ethernet address
  3511.  1Ah    BYTE    Who group number
  3512.  1Bh    WORD    services mask (see below)
  3513.  1Dh    DWORD    serial number
  3514.  21h    BYTE    maximum concurrent users with same serial number allowed on net
  3515.  22h    BYTE    chat mask (see below)
  3516.  23h    BYTE    internal system bits (see below)
  3517.  24h  9 BYTEs    version number in format MM.mm.xxx
  3518.  2Dh    BYTE    flag: 01h if machine is a PS/2
  3519.  2Eh    BYTE    flag: 03h if 80386
  3520.  2Fh    BYTE    spool termination mode: 01h concatenate, 02h truncate
  3521.         (see AX=5D09h)
  3522.  30h    WORD    autospool timeout in clock ticks
  3523.  32h    WORD    monitor timeout in clock ticks
  3524.  34h    WORD    unused
  3525.  36h    WORD    chat timeout in clock ticks
  3526.  38h    WORD    netBIOS session timeout in half-seconds
  3527.  3Ah    WORD    datagram send timeout in seconds
  3528.  3Ch    WORD    keyboard value for initiating chat mode
  3529.  3Eh    WORD    Who timeout in clock ticks
  3530.  40h    BYTE    flag: 01h if server should process rom NetBIOS Post return
  3531.  41h    BYTE    flag: 01h if FCBs should be recycled
  3532.  42h  3 BYTEs    signature "DBG"
  3533.  45h    BYTE    last interrupt (21h or 6Fh)
  3534.  46h    BYTE    last INT 21 AH value
  3535.  47h    BYTE    last INT 6F AH value
  3536.  48h    WORD    last item posted
  3537.  4Ah    WORD    last item free-posted
  3538.  4Ch    WORD    last item handled by server
  3539.  4Eh    WORD    last redirector send NCB
  3540.  50h    WORD    last redirector receive NCB
  3541.  52h  4 BYTEs    signature "TABL"
  3542.  56h    WORD    offset of datagram buffer table header
  3543.  58h    WORD    offset of chat buffer table header
  3544.  5Ah    WORD    offset of Raw buffer table header
  3545.  5Ch    WORD    offset of Workstation buffer table header
  3546.  5Eh    WORD    offset of server receive-any table header
  3547.  60h    WORD    offset of Tiny buffer table header
  3548.  62h    WORD    offset of zero-length buffer table (NCBs)
  3549.  64h    WORD    offset of Rdr (Redirector Mount) table header
  3550.  66h    WORD    offset of Ntab (Redirector Session) table header
  3551.  68h    WORD    offset of FCB table header
  3552.  6Ah    WORD    offset of user file handle table header
  3553.  6Ch    WORD    offset of workstation printer RDR extension table header
  3554.  6Eh    WORD    offset of server shared device table header
  3555.  70h    WORD    offset of server connection table header
  3556.  72h    WORD    offset of server login table header
  3557.  74h    WORD    offset of server file table header
  3558.  76h    WORD    offset of server shared file table header
  3559.  78h    WORD    offset of server record lock table header
  3560.  7Ah    WORD    offset of remote printer claim table header
  3561.  7Ch    WORD    offset of remote printer device table header
  3562.  7Eh    WORD    offset of print server mount table header
  3563.  80h    WORD    offset of print server sessions table header
  3564.  82h    WORD    offset of print server print job structure table header
  3565.  84h    WORD    offset of print server pooled device table header
  3566.  86h    WORD    size of workstation buffer
  3567.  88h    WORD    size of server receive-any buffer
  3568.  8Ah    WORD    size of server raw I/O buffer
  3569.  8Ch  6 BYTEs    reserved
  3570.  92h    DWORD    pointer to profile pathname
  3571.  96h    BYTE    datagram retry count
  3572.  97h    BYTE    NetBIOS LAN adapter number
  3573.  98h  6 BYTEs    physical Ethernet address
  3574.  9Eh    BYTE    NetBIOS server name number
  3575.  9Fh    BYTE    NetBIOS redirector name number
  3576.  A0h    BYTE    10Net interrupt number
  3577.  A1h    BYTE    flag: chat is loaded
  3578.  A2h    BYTE    flag: INT 6F APIs permanently loaded
  3579.  A3h    BYTE    flag: file security present
  3580.  A4h    WORD    reserved
  3581.  A6h    BYTE    fixed mount bitmask for drives A:-H:
  3582.  A7h    BYTE    reserved
  3583.  A8h    WORD    10Net system flags (see below)
  3584.  AAh    BYTE    monitor flags (see below)
  3585.  ABh  5 BYTEs    reserved
  3586.  B0h    WORD    offset of monitor timer block
  3587.  B2h    WORD    offset of server timer block
  3588.  B4h    WORD    offset of chat timer block
  3589.  B6h    WORD    timer chain
  3590.  B8h  4 BYTEs    signature "TALS"
  3591.  BCh    WORD    number of 10Net sends
  3592.  BEh    WORD    number of 10Net receives
  3593.  C0h    WORD    number of no-buffer conditions
  3594.  C2h    WORD    number of dropped posted messages
  3595.  C4h    WORD    number of server NCB errors
  3596.  C6h    WORD    number of redirector NCB errors
  3597.  C8h    WORD    number of datagram send/receive errors
  3598.  CAh    WORD    number of dropped Whos
  3599.  CCh    WORD    number of dropped submits
  3600.  CEh    WORD    number of session aborts
  3601.  D0h    BYTE    number of NetBIOS interface-busy errors
  3602.  D1h    BYTE    last NetBIOS bad post command
  3603.  D2h    BYTE    last NetBIOS bad redirector command
  3604.  D3h    BYTE    do send datagram send/receive error command
  3605.  D4h    DWORD    -> DOS system parameter table
  3606.  D8h    WORD    number of DOS physical drives
  3607.  DAh    WORD    offset of DOS PSP field in DOS data segment
  3608.  DCh    WORD    offset of in-DOS flag in DOS data segment
  3609.  DEh    WORD    DOS data segment
  3610.  E0h    WORD    offset of DOS SFT in DOS data segment
  3611.  E2h    WORD    offset of number-of-physical-units field in DOS data segment
  3612.  E4h    WORD    10Net code segment
  3613.  E6h    WORD    10Net data segment
  3614.  E8h    WORD    10Net common server segment
  3615.  EAh    WORD    10Net file server segment
  3616.  ECh    WORD    10Net print server segment
  3617.  EEh    WORD    10Net remote printer segment
  3618. Note:    documentation lists field at offset D0h as a WORD, but all following
  3619.       offsets are as though it were a BYTE; if it is indeed a WORD, all
  3620.       offsets after D0h must be increased by one byte
  3621.  
  3622. Format of 10Net Table Header:
  3623. Offset    Size    Description
  3624.  -16  4 BYTEs    table identifier
  3625.  -12    WORD    peak number of tables allocated
  3626.  -10    WORD    number of tables currently in use
  3627.  -8    WORD    total number of tables
  3628.  -6    WORD    size of each table
  3629.  -4    WORD    offset of first allocated table
  3630.  -2    WORD    offset of first free table
  3631.  
  3632. Bitfields for services mask:
  3633. Bit(s)    Description
  3634.  0    workstation
  3635.  1    file server
  3636.  2    print queue server
  3637.  3    de-spool server
  3638.  
  3639. Bitfields for chat mask:
  3640. Bit(s)    Description
  3641.  0    chat permitted
  3642.  1    bell enabled
  3643.  2    chat keyboard initiated
  3644.  3    in INT 16 handler
  3645.  4    in Get Input
  3646.  5    display has timed out
  3647.  6    chat is idle
  3648.  
  3649. Bitfields for internal system bits:
  3650. Bit(s)    Description
  3651.  0    submit permitted
  3652.  1    submit initiated
  3653.  2    submit executing
  3654.  3    internal client call/chat/spool/autospool
  3655.  4    in spool termination
  3656.  5    print permitted
  3657.  6    waiting for keyboard input
  3658.  
  3659. Bitfields for 10Net System Flags:
  3660. Bit(s)    Description
  3661.  0    in NetBIOS
  3662.  1    processing INT 28
  3663.  2    is server
  3664.  3    in net user-DOS function
  3665.  4    in DOS user-DOS function
  3666.  5    in net for user non-DOS function
  3667.  6    in server DOS function
  3668.  7    in server non-DOS function
  3669.  8    in terminate
  3670.  10    in user on server request
  3671.  13    in DOS for user on server
  3672.  14    disable critical error handler
  3673.  
  3674. Bitfields for Monitor Flags:
  3675. Bit(s)    Description
  3676.  0    waiting for monitor response
  3677.  4    in monitor get-input routine
  3678.  5    monitor display timeout
  3679.  6    sensing for escape key
  3680. --------D-215E02-----------------------------
  3681. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  3682.     AX = 5E02h
  3683.     BX = redirection list index (see AX=5F02h)
  3684.     CX = length of setup string
  3685.     DS:SI -> setup string
  3686. Return: CF clear if successful
  3687.     CF set on error
  3688.         AX = error code (01h) (see AH=59h)
  3689. Note:    also supported by 10NET v5.0
  3690. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  3691. --------D-215E03-----------------------------
  3692. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  3693.     AX = 5E03h
  3694.     BX = redirection list index (see AX=5F02h)
  3695.     ES:DI -> 64-byte buffer for setup string
  3696. Return: CF clear if successful
  3697.         CX = length of setup string
  3698.         ES:DI buffer filled
  3699.     CF set on error
  3700.         AX = error code (01h) (see AH=59h)
  3701. Note:    also supported by 10NET v5.0, but 10NET is documented as using DS:SI
  3702.       instead of ES:DI
  3703. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  3704. --------D-215E04-----------------------------
  3705. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  3706.     AX = 5E04h
  3707.     BX = redirection list index (see AX=5F02h)
  3708.     DX = mode
  3709.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  3710. Return: CF set on error
  3711.         AX = error code (see AH=59h)
  3712.     CF clear if successful
  3713. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  3714. SeeAlso: AX=5E05h"DOS",INT 2F/AX=111Fh
  3715. --------N-215E04-----------------------------
  3716. INT 21 - 10NET v5.0 - INITIATE PRINT JOB
  3717.     AX = 5E04h
  3718.     BX = zero-based redirection list index (see AX=5F02h)
  3719.     DS:DX -> extended workstation printer setup structure (see below)
  3720. Return: CF clear if successful
  3721.     CF set on error
  3722.         AX = error code (see AH=59h)
  3723. SeeAlso: AX=5E05h"10NET",AX=5E06h"10NET"
  3724.  
  3725. Format of extended workstation printer setup structure:
  3726. Offset    Size    Description
  3727.  00h    BYTE    notification flags (see below)
  3728.  01h    BYTE    job control mask (see below)
  3729.  02h    WORD    days to retain file
  3730.  04h    WORD    test print length
  3731.  06h    BYTE    number of copies to print
  3732.  07h    BYTE    compression algorithm
  3733.  08h    BYTE    tab width (00h = don't expand)
  3734.  09h    BYTE    initiation type (00h normal, 01h non-spooled)
  3735.  0Ah 38 BYTEs    job start operation notification instructions
  3736.  30h 32 BYTEs    comment for job
  3737.  50h 64 BYTEs    output filename or non-spooled file
  3738.  
  3739. Bitfields for notification flags:
  3740. Bit(s)    Description
  3741.  0    user at print start
  3742.  1    operator at start, with reply
  3743.  2    user at print completion
  3744.  3    operator at completion, with reply
  3745.  4    user on queue switch
  3746.  5    operator on queue switch, with reply
  3747.  6    user on print error
  3748.  
  3749. Bitfields for job control mask:
  3750. Bit(s)    Description
  3751.  0    print banner page
  3752.  1    eject page at end of job
  3753.  2    mark as "held" (queue but don't print)
  3754.  3    rush job (queue at top)
  3755.  4    overwrite file with zeros before deletion
  3756.  5    hyperspool if possible
  3757. --------D-215E05-----------------------------
  3758. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  3759.     AX = 5E05h
  3760.     BX = redirection list index (see AX=5F02h)
  3761. Return: CF set on error
  3762.         AX = error code (see AH=59h)
  3763.     CF clear if successful
  3764.         DX = printer mode (see AX=5E04h)
  3765. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  3766. SeeAlso: AX=5E04h"DOS",INT 2F/AX=111Fh
  3767. --------N-215E05-----------------------------
  3768. INT 21 - 10NET v5.0 - TERMINATE PRINT JOB
  3769.     AX = 5E05h
  3770.     BX = zero-based redirection list index (see AX=5F02h)
  3771. Return: CF clear if successful
  3772.     CF set on error
  3773.         AX = error code (see AH=59h)
  3774. Note:    this call resets the spool termination mode to "truncate"
  3775.       (see AX=5D08h)
  3776. SeeAlso: AX=5E04h"10NET",AX=5E06h
  3777. --------N-215E06-----------------------------
  3778. INT 21 - 10NET v5.0 - GET/SET 10NET WORKSTATION PRINTER SETUP STRUCTURE
  3779.     AX = 5E06h
  3780.     BX = zero-based redirection list index (see AX=5F02h)
  3781.     CX = operation (06h set, 07h get)
  3782.     DS:DX -> buffer for setup structure (same as first nine bytes of
  3783.         workstation printer setup) (see AX=5E04h"10NET")
  3784. Return: CF clear if successful
  3785.         DS:DX buffer updated on get
  3786.     CF set on error
  3787.         AX = error code (see AH=59h)
  3788. SeeAlso: AX=5E04h"10NET",AX=5E05h"10NET"
  3789. --------D-215F00-----------------------------
  3790. INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
  3791.     AX = 5F00h
  3792.     BL = redirection type
  3793.         03h printer
  3794.         04h disk drive
  3795. Return: CF set on error
  3796.         AX = error code (see AH=59h)
  3797.     CF clear if successful
  3798.         BH = redirection state
  3799.         00h off
  3800.         01h on
  3801. Note:    calls INT 2F/AX=111Eh with AX on top of the stack
  3802. SeeAlso: AX=5F01h,INT 2F/AX=111Eh
  3803. --------D-215F01-----------------------------
  3804. INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
  3805.     AX = 5F01h
  3806.     BL = redirection type
  3807.         03h printer
  3808.         04h disk drive
  3809.     BH = redirection state
  3810.         00h off
  3811.         01h on
  3812. Return: CF set on error
  3813.         AX = error code (see AH=59h)
  3814.     CF clear if successful
  3815. Notes:    when redirection is off, the local device (if any) rather than the
  3816.       remote device is used
  3817.     calls INT 2F/AX=111Eh with AX on top of the stack
  3818. SeeAlso: AX=5F00h,INT 2F/AX=111Eh
  3819. --------D-215F02-----------------------------
  3820. INT 21 - DOS 3.1+ network - GET REDIRECTION LIST ENTRY
  3821.     AX = 5F02h
  3822.     BX = zero-based redirection list index
  3823.     CX = 0000h (LANtastic)
  3824.     DS:SI -> 16-byte buffer for ASCIZ local device name
  3825.     ES:DI -> 128-byte buffer for ASCIZ network name
  3826. Return: CF clear if successful
  3827.         BH = device status
  3828.         00h valid
  3829.         01h invalid
  3830.         BL = device type
  3831.         03h printer
  3832.         04h disk drive
  3833.         CX = user data previously set with AX=5F03h
  3834.         DS:SI and ES:DI buffers filled
  3835.         DX,BP destroyed
  3836.     CF set on error
  3837.         AX = error code (01h,12h) (see AH=59h)
  3838. Notes:    this function is passed through to INT 2F/AX=111Eh by the DOS kernel
  3839.     error code 12h is returned if BX is greater than the size of the list
  3840.     also supported by Banyan VINES, PC-NFS, LANtastic, and 10NET
  3841. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  3842. --------D-215F03-----------------------------
  3843. INT 21 - DOS 3.1+ network - REDIRECT DEVICE
  3844.     AX = 5F03h
  3845.     BL = device type
  3846.         03h printer
  3847.         04h disk drive
  3848.     CX = user data to save
  3849.         0000h for LANtastic
  3850.         4E57h ("NW") for NetWare 4.0 requester
  3851.     DS:SI -> ASCIZ local device name (16 bytes max)
  3852.     ES:DI -> ASCIZ network name + ASCIZ password (128 bytes max total)
  3853. Return: CF clear if successful
  3854.     CF set on error
  3855.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  3856. Notes:    if device type is disk drive, DS:SI must point at either a null string
  3857.       or a string consisting the drive letter followed by a colon; if a
  3858.       null string, the network attempts to access the destination without
  3859.       redirecting a local drive
  3860.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  3861.     also supported by Banyan VINES, LANtastic, and 10NET
  3862. SeeAlso: AX=5F02h,AX=5F04h,INT 2F/AX=111Eh
  3863. --------D-215F04-----------------------------
  3864. INT 21 - DOS 3.1+ network - CANCEL REDIRECTION
  3865.     AX = 5F04h
  3866.     DS:SI -> ASCIZ local device name or path
  3867.     CX = 4E57h ("NW") for NetWare 4.0 requester
  3868. Return: CF clear if successful
  3869.     CF set on error
  3870.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  3871. Notes:    the DS:SI string must be either a local device name, a drive letter
  3872.       followed by a colon, or a network directory beginning with two
  3873.       backslashes
  3874.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  3875.     also supported by Banyan VINES, LANtastic, and 10NET
  3876. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  3877. --------D-215F05-----------------------------
  3878. INT 21 - DOS 4+ network - GET EXTENDED REDIRECTION LIST ENTRY
  3879.     AX = 5F05h
  3880.     BX = redirection list index
  3881.     DS:SI -> buffer for ASCIZ source device name
  3882.     ES:DI -> buffer for destination ASCIZ network path
  3883. Return: CF set on error
  3884.         AX = error code (see AH=59h)
  3885.     CF clear if successful
  3886.         AX = server's network process ID handle (10NET)
  3887.         BH = device status flag (bit 0 clear if valid)
  3888.         BL = device type (03h if printer, 04h if drive)
  3889.         CX = stored parameter value (user data) from AX=5F03h
  3890.         BP = NETBIOS local session number
  3891.         DS:SI buffer filled
  3892.         ES:DI buffer filled
  3893. Notes:    the local session number allows sharing the redirector's session number
  3894.     if an error is caused on the NETBIOS LSN, the redirector may be unable
  3895.       to correctly recover from errors
  3896.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  3897.     supported by DR-DOS 5.0
  3898.     also supported by 10NET v5.0
  3899. SeeAlso: AX=5F06h"Network",INT 2F/AX=111Eh
  3900. --------O-215F05-----------------------------
  3901. INT 21 - STARLITE architecture - MAP LOCAL DRIVE LETTER TO REMOTE FILE SYSTEM
  3902.     AX = 5F05h
  3903.     DL = drive number (0=A:)
  3904.     DS:SI -> ASCIZ name of the object to map the drive to
  3905. Return: CF set on error
  3906.         AX = error code (see AH=59h)
  3907.     CF clear if successful
  3908. SeeAlso: AX=5F06h"STARLITE"
  3909. --------N-215F06-----------------------------
  3910. INT 21 U - Network - GET FULL REDIRECTION LIST
  3911.     AX = 5F06h
  3912.     ???
  3913. Return: ???
  3914. Notes:    similar to AX=5F02h and AX=5F05h, but also returns redirections
  3915.       excluded from those calls for various reasons
  3916.     calls INT 2F/AX=111Eh with AX on top of the stack
  3917. SeeAlso: AX=5F05h"DOS",INT 2F/AX=111Eh
  3918. --------O-215F06-----------------------------
  3919. INT 21 - STARLITE architecture - UNMAP DRIVE LETTER
  3920.     AX = 5F06h
  3921.     DL = drive to be unmapped (0=A:)
  3922. Return: CF set on error
  3923.         AX = error code (see AH=59h)
  3924.     CF clear if successful
  3925. SeeAlso: AX=5F05h"STARLITE"
  3926. --------D-215F07-----------------------------
  3927. INT 21 - DOS 5+ - ENABLE DRIVE
  3928.     AX = 5F07h
  3929.     DL = drive number (0=A:)
  3930. Return: CF clear if successful
  3931.     CF set on error
  3932.         AX = error code (0Fh) (see AH=59h)
  3933. Notes:    simply sets the "valid" bit in the drive's CDS
  3934.     this function is not supported by Novell DOS 7
  3935. SeeAlso: AH=52h,AX=5F08h"DOS"
  3936. --------O-215F07-----------------------------
  3937. INT 21 - STARLITE architecture - MAKE NAMED OBJECT AVAILABLE ON NETWORK
  3938.     AX = 5F07h
  3939.     DS:SI -> ASCIZ name of object to offer to network
  3940.     ES:DI -> ASCIZ name under which object will be known on the network
  3941.         MUST begin with three slashes
  3942. Return: CF set on error
  3943.         AX = error code (see AH=59h)
  3944.     CF clear if successful
  3945. SeeAlso: AX=5F08h"STARLITE"
  3946. --------D-215F08-----------------------------
  3947. INT 21 - DOS 5+ - DISABLE DRIVE
  3948.     AX = 5F08h
  3949.     DL = drive number (0=A:)
  3950. Return: CF clear if successful
  3951.     CF set on error
  3952.         AX = error code (0Fh) (see AH=59h)
  3953. Notes:    simply clears the "valid" bit in the drive's CDS
  3954.     this function is not supported by Novell DOS 7
  3955. SeeAlso: AH=52h,AX=5F07h"DOS"
  3956. --------O-215F08-----------------------------
  3957. INT 21 - STARLITE architecture - REMOVE GLOBAL NETWORK NAME OF OBJECT
  3958.     AX = 5F08h
  3959.     DS:SI -> ASCIZ network name (not local name) of object to unshare
  3960. Return: CF set on error
  3961.         AX = error code (see AH=59h)
  3962.     CF clear if successful
  3963. SeeAlso: AX=5F07h"STARLITE"
  3964. --------O-215F09-----------------------------
  3965. INT 21 - STARLITE architecture - BIND TO NETWORK DEVICE
  3966.     AX = 5F09h
  3967.     DS:DX -> ASCIZ name of the device driver to attach to
  3968. Return: CF set on error
  3969.         AX = error code (see AH=59h)
  3970.     CF clear if successful
  3971. Note:    the STARLITE distributed file system can attach to multiple networks
  3972.       simultaneously
  3973. SeeAlso: AX=5F0Ah
  3974. --------O-215F0A-----------------------------
  3975. INT 21 - STARLITE architecture - DETACH FROM NETWORK DEVICE
  3976.     AX = 5F0Ah
  3977.     DS:DX -> ASCIZ name of device driver to detach from
  3978. Return: CF set on error
  3979.         AX = error code (see AH=59h)
  3980.     CF clear if successful
  3981. SeeAlso: AX=5F09h
  3982. --------N-215F30-----------------------------
  3983. INT 21 U - LAN Manager Enhanced DOS - GET REDIRECTOR VERSION
  3984.     AX = 5F30h
  3985. Return: AX = version (AH=major,AL=minor)
  3986. --------N-215F32-----------------------------
  3987. INT 21 u - Named Pipes - LOCAL DosQNmPipeInfo
  3988.     AX = 5F32h
  3989.     BX = handle
  3990.     CX = size of _PIPEINFO structure
  3991.     DX = level (must be 0001h)
  3992.     DS:SI -> _PIPEINFO structure (see below)
  3993. Return: CF clear if successful
  3994.         _PIPEINFO structure filled in
  3995.     CF set on error
  3996.         AX = error code
  3997. Note:    this function was introduced by LAN Manager but is also supported by
  3998.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  3999.       Machines, and others
  4000. SeeAlso: AX=5F33h,AX=5F34h
  4001.  
  4002. Format of _PIPEINFO structure:
  4003. Offset    Size    Description
  4004.  00h    WORD    size of outgoing buffer
  4005.  02h    WORD    size of incoming buffer
  4006.  04h    BYTE    maximum number of instances allowed
  4007.  05h    BYTE    current number of instances
  4008.  06h    BYTE    length of the name (including terminating NUL)
  4009.  07h  N BYTEs    name
  4010. --------N-215F33-----------------------------
  4011. INT 21 u - Named Pipes - LOCAL DosQNmPHandState
  4012.     AX = 5F33h
  4013.     BX = handle
  4014. Return: CF clear if successful
  4015.         AH = pipe mode bit mask (see below)
  4016.         AL = maximum number of instances
  4017.     CF set on error
  4018.         AX = error code
  4019. Note:    this function was introduced by LAN Manager but is also supported by
  4020.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4021.       Machines, and others
  4022. SeeAlso: AX=5F32h,AX=5F34h
  4023.  
  4024. Bitfields for pipe mode:
  4025. Bit(s)    Description
  4026.  7    set if nonblocking, clear if blocking
  4027.  6    set if server end, clear if client end
  4028.  2    set if write in message mode, clear if write in byte mode
  4029.  0    set if read in message mode, clear if read in byte mode
  4030. --------N-215F34-----------------------------
  4031. INT 21 u - Named Pipes - LOCAL DosSetNmPHandState
  4032.     AX = 5F34h
  4033.     BX = handle
  4034.     CX = pipe mode bit mask
  4035.         bit 15: set if nonblocking, clear if blocking
  4036.         bit     8: set if read in message mode, clear if read in byte mode
  4037. Return: CF clear if successful
  4038.     CF set if error
  4039.         AX = error code
  4040. Note:    this function was introduced by LAN Manager but is also supported by
  4041.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4042.       Machines, and others
  4043. SeeAlso: AX=5F32h,AX=5F33h,AX=5F36h
  4044. --------N-215F35-----------------------------
  4045. INT 21 u - Named Pipes - LOCAL DosPeekNmPipe
  4046.     AX = 5F35h
  4047.     BX = handle
  4048.     CX = buffer length
  4049.     DS:SI -> buffer
  4050. Return: CF clear if successful
  4051.         CX = bytes read
  4052.         SI = bytes left in the pipe
  4053.         DX = bytes left in the current message
  4054.         DI = pipe status
  4055.         0001h disconnected
  4056.         0002h listening
  4057.         0003h connected
  4058.         0004h closing
  4059.     CF set if error
  4060.         AX = error code
  4061. Note:    this function was introduced by LAN Manager but is also supported by
  4062.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4063.       Machines, and others
  4064. SeeAlso: AX=5F38h,AX=5F39h,AX=5F51h
  4065. --------N-215F36-----------------------------
  4066. INT 21 u - Named Pipes - LOCAL DosTransactNmPipe
  4067.     AX = 5F36h
  4068.     BX = handle
  4069.     CX = in buffer length
  4070.     DS:SI -> in buffer
  4071.     DX = out buffer length
  4072.     ES:DI -> out buffer
  4073. Return: CF clear if successful
  4074.         CX = bytes read
  4075.     CF set on error
  4076.         AX = error code
  4077. Note:    this function was introduced by LAN Manager but is also supported by
  4078.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4079.       Machines, and others
  4080. SeeAlso: AX=5F34h,AX=5F37h
  4081. --------N-215F37-----------------------------
  4082. INT 21 u - Named Pipes - DosCallNmPipe
  4083.     AX = 5F37h
  4084.     DS:SI -> DosCallNmPipe stack frame (see below)
  4085. Return: CF clear if successful
  4086.         CX = bytes read
  4087.     CF set on error
  4088.         AX = error code
  4089. Note:    this function was introduced by LAN Manager but is also supported by
  4090.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4091.       Machines, and others
  4092. SeeAlso: AX=5F36h,AX=5F38h
  4093.  
  4094. Format of DosCallNmPipe stack frame:
  4095. Offset    Size    Description
  4096.  00h    DWORD    timeout
  4097.  04h    DWORD    -> bytes read WORD (not used!!)
  4098.  08h    WORD    out buffer length
  4099.  0Ah    DWORD    address of out buffer
  4100.  0Eh    WORD    in buffer length
  4101.  10h    DWORD    address of in buffer
  4102.  14h    DWORD    address of pipe name
  4103. --------N-215F38-----------------------------
  4104. INT 21 u - Named Pipes - LOCAL DosWaitNmPipe - AWAIT AVAIL. OF PIPE INSTANCE
  4105.     AX = 5F38h
  4106.     DS:DX -> pipe name
  4107.     BX:CX = timeout value
  4108. Return: CF clear if successful
  4109.     CF set if error
  4110.         AX = error code
  4111. Notes:    when a client gets a return code of ERROR_PIPE_BUSY on attempting to
  4112.       open a pipe, it should issue this call to wait until the pipe
  4113.       instance becomes available again; on return from this call, the
  4114.       client must attempt to open the pipe once again
  4115.     this function was introduced by LAN Manager but is also supported by
  4116.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4117.       Machines, and others
  4118. SeeAlso: AX=5F37h,AX=5F39h
  4119. --------N-215F39-----------------------------
  4120. INT 21 U - Named Pipes - LOCAL DosRawReadNmPipe
  4121.     AX = 5F39h
  4122.     BX = handle
  4123.     CX = buffer length
  4124.     DS:DX -> buffer
  4125. Return: CF clear if successful
  4126.         CX = bytes read
  4127.     CF set if error
  4128.         AX = error code
  4129. Notes:    this function was introduced by LAN Manager but is also supported by
  4130.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4131.       Machines, and others
  4132.     not documented in the LAN Manager Toolkit
  4133. SeeAlso: AX=5F35h,AX=5F3Ah,INT 2F/AX=1186h
  4134. --------N-215F3A-----------------------------
  4135. INT 21 U - Named Pipes - LOCAL DosRawWriteNmPipe
  4136.     AX = 5F3Ah
  4137.     BX = handle
  4138.     CX = buffer length
  4139.     DS:DX -> buffer
  4140. Return: CF clear if successful
  4141.         CX = bytes written
  4142.     CF set if error
  4143.         AX = error code
  4144. Notes:    this function was introduced by LAN Manager but is also supported by
  4145.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  4146.       Machines, and others
  4147.     not documented in the LAN Manager Toolkit
  4148. SeeAlso: AX=5F39h,AX=5F3Bh,INT 2F/AX=118Fh
  4149. --------N-215F3B-----------------------------
  4150. INT 21 u - LAN Manager Enhanced DOS - NetHandleSetInfo
  4151.     AX = 5F3Bh
  4152.     BX = handle
  4153.     CX = handle_info_1 structure length or sizeof DWORD
  4154.     DI = parameter number to set
  4155.         0000h all
  4156.         0001h number of milliseconds
  4157.         0002h number of characters
  4158.     DS:DX -> handle_info_1 structure (DI=0000h) (see below)
  4159.         or DWORD (DI=0001h or 0002h)
  4160.     SI = level of information (0001h)
  4161. Return: CF clear if successful
  4162.         CX = total bytes available
  4163.     CF set if error
  4164.         AX = error code
  4165. SeeAlso: AX=5F3Ch
  4166.  
  4167. Format of handle_info_1 structure:
  4168. Offset    Size    Description
  4169.  00h    DWORD    number of milliseconds which workstation collects data before
  4170.         it sends the data to the named pipe
  4171.  04h    DWORD    number of characters which workstation collects before it
  4172.         sends the data to the named pipe
  4173. --------N-215F3C-----------------------------
  4174. INT 21 u - LAN Manager Enhanced DOS - NetHandleGetInfo
  4175.     AX = 5F3Ch
  4176.     BX = handle
  4177.     CX = length of handle_info_1 structure
  4178.     DS:DX -> handle_info_1 structure (see AX=5F3Bh)
  4179.     SI = level of information (must be 0001h)
  4180. Return: CF clear if successful
  4181.         CX = total bytes available
  4182.     CF set if error
  4183.         AX = error code
  4184. SeeAlso: AX=5F3Bh
  4185. --------N-215F3D-----------------------------
  4186. INT 21 U - LAN Manager Enhanced DOS - WRITE MAILSLOT???
  4187.     AX = 5F3Dh
  4188.     ???
  4189. Return: ???
  4190. --------N-215F3E-----------------------------
  4191. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetSpecialSMB
  4192.     AX = 5F3Eh
  4193.     ???
  4194. Return: ???
  4195. Note:    This function is not documented anywhere in the LAN Manager 2.x Toolkit
  4196.       but was documented in LAN Manager 1.x manuals.
  4197. --------N-215F3F-----------------------------
  4198. INT 21 U - LAN Manager Enhanced DOS - REMOTE API CALL
  4199.     AX = 5F3Fh
  4200.     CX = api number
  4201.     ES:DI -> data descriptor
  4202.     ES:SI -> parameter descriptor
  4203.     ES:DX -> auxiliary descriptor (if DX <> 0)
  4204.     ???
  4205. Return: ???
  4206. --------N-215F40-----------------------------
  4207. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetMessageBufferSend
  4208.     AX = 5F40h
  4209.     DS:DX -> NetMessageBufferSend parameter structure (see below)
  4210. Return: AX = error code
  4211.  
  4212. Format of NetMessageBufferSend parameter structure:
  4213. Offset    Size    Description
  4214.  00h    DWORD    -> recipient name (name for specific user, name* for domain
  4215.             wide name, * for broadcast)
  4216.  04h    DWORD    -> buffer
  4217.  08h    WORD    length of buffer
  4218. --------N-215F41-----------------------------
  4219. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServiceEnum
  4220.     AX = 5F41h
  4221.     BL = level of detail (0000h, 0001h or 0002h)
  4222.     CX = buffer length
  4223.     ES:DI -> buffer of service_info_0, service_info_1, or service_info_2
  4224.         (see below)
  4225. Return: CF clear if successful
  4226.         CX = entries read
  4227.         DX = total available
  4228.     CF set on error
  4229.         AX = error code
  4230.  
  4231. Format of service_info_0 structure:
  4232. Offset    Size    Description
  4233.  00h 16 BYTEs    name
  4234.  
  4235. Format of service_info_1 structure:
  4236. Offset    Size    Description
  4237.  00h 16 BYTEs    name
  4238.  10h    WORD    status bitmask (see below)
  4239.  12h    DWORD    status code (see below)
  4240.         (also see Microsoft LAN Manager Programmer's Reference)
  4241.  16h    WORD    process id
  4242.  
  4243. Format of service_info_2 structure:
  4244. Offset    Size    Description
  4245.  00h 16 BYTEs    name
  4246.  10h    WORD    status bitmask (see below)
  4247.  12h    DWORD    status code (see below)
  4248.  16h    WORD    process id
  4249.  18h 64 BYTEs    text
  4250.  
  4251. Bitfields for status bitmask:
  4252. Bit(s)    Description
  4253.  0,1    00 uninstall
  4254.         01 install pending
  4255.         10 uninstall pending
  4256.         11 installed
  4257.  2,3    00 active
  4258.         01 Continue pending
  4259.         10 Pause pending
  4260.         11 paused
  4261.  4    uninstallable
  4262.  5    pausable
  4263.  8    disk redirector paused
  4264.  9    spooled device redirector paused (printing)
  4265.  10    communication device redirector paused
  4266.  
  4267. Values for status code:
  4268.  high word
  4269.     3051 Bad parameter value
  4270.     3052 A parameter is missing
  4271.     3053 An unknown parameter was specified
  4272.     3054 The resource is insufficient
  4273.     3055 Configuration is faulty
  4274.     3056 An MS-DOS or MS OS/2 error occured
  4275.     3057 An internal error occured
  4276.     3058 An ambiguous parameter name was given
  4277.     3059 A duplicate parameter exists
  4278.     3060 The service was terminated by NetSeviceControl when it did not respond
  4279.     3061 The service program file could not be executed
  4280.     3062 The subservice failed to start
  4281.     3063 There is a conflict in the value or use of these parameters
  4282.     3064 There is a problem with the file
  4283.  low word
  4284.     3070 There is insufficient memory
  4285.     3071 There is insufficeient disk space
  4286.     3072 Unable to create thread
  4287.     3073 Unable to create process
  4288.     3074 A security failure occured
  4289.     3075 There is bad or missing default path
  4290.     3076 Network software is not installed
  4291.     3077 Server software is not installed
  4292.     3078 The server could not access the UAS database
  4293.     3079 The action requires user-level security
  4294.     3080 The log directory is invalid
  4295.     3081 The LAN group specificed could not be used
  4296.     3082 The computername is being used as a message alias on another computer
  4297.     3083 The workstation failed to announce the servername
  4298.     3084 The user accounts system is not configured properly
  4299. --------N-215F42-----------------------------
  4300. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServiceControl
  4301.     AX = 5F42h
  4302.     DH = opcode
  4303.         00h interrogate status
  4304.         01h pause
  4305.         02h continue
  4306.         03h uninstall
  4307.     DL = argument
  4308.         01h disk resource
  4309.         02h print resource
  4310.         04h communications resource (not implemented for DOS)
  4311.     ES:BX -> NetServiceControl parameter structure (see below)
  4312. Return: CF clear if successful
  4313.     CF set on error
  4314.         AX = error code
  4315.  
  4316. Format of NetServiceControl parameter structure:
  4317. Offset    Size    Description
  4318.  00h    DWORD    -> service name
  4319.  04h    WORD    result buffer size
  4320.  06h    DWORD    -> result buffer as service_info_2 structure
  4321. --------N-215F43-----------------------------
  4322. INT 21 u - LAN Manager Enhanced DOS - LOCAL DosPrintJobGetId
  4323.     AX = 5F43h
  4324.     BX = handle of remote print job
  4325.     CX = size of PRIDINFO struture
  4326.     ES:DI -> PRIDINFO structure (see below)
  4327. Return: CF clear if successful
  4328.         PRIDINFO filled in
  4329.     CF set on error
  4330.         AX = error code
  4331.  
  4332. Format of PRIDINFO structure:
  4333. Offset    Size    Description
  4334.  00h    WORD    job id
  4335.  02h 16 BYTEs    server name
  4336.  12h 13 BYTEs    queue name
  4337.  1Fh  1 BYTE    pad
  4338. --------N-215F44-----------------------------
  4339. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetWkstaGetInfo
  4340.     AX = 5F44h
  4341.     BX = information level (00h, 01h, or 0Ah)
  4342.     CX = buffer size
  4343.     ES:DI -> buffer in which to store info
  4344. Return: AX = error code
  4345.     DX = amount of buffer used (or required)
  4346. SeeAlso: AX=5F45h,AX=5F49h
  4347. --------N-215F45-----------------------------
  4348. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetWkstaSetInfo
  4349.     AX = 5F45h
  4350.     BX = level (0000h or 0001h)
  4351.     CX = buffer size
  4352.     DX = parameter to set
  4353.     ES:DI -> buffer
  4354. Return: CF clear if successful
  4355.     CF set if error
  4356.         AX = error code
  4357. SeeAlso: AX=5F44h
  4358. --------N-215F46-----------------------------
  4359. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseEnum
  4360.     AX = 5F46h
  4361.     BX = level (0000h or 0001h)
  4362.     CX = size of buffer
  4363.     ES:DI -> buffer of use_info_0 or use_info_1 structures (see below)
  4364. Return: CF clear if successful
  4365.         CX = entries read
  4366.         DX = total available entries
  4367.     CF set if error
  4368.         AX = error code
  4369. SeeAlso: AX=5F47h,AX=5F48h,AX=5F4Ch
  4370.  
  4371. Format of use_info_0 structure:
  4372. Offset    Size    Description
  4373.  00h  9 BYTEs    local device name
  4374.  09h    BYTE    padding
  4375.  0Ah    DWORD    -> remote device name in UNC form \\server\share
  4376.  
  4377. Format of use_info_1 structure:
  4378. Offset    Size    Description
  4379.  00h  9 BYTEs    Local device name
  4380.  09h    BYTE    padding
  4381.  0Ah    DWORD    -> remote device name in UNC form \\server\share
  4382.  0Eh    DWORD    -> password
  4383.  12h    WORD    ignored
  4384.  14h    WORD    use type (-1 wildcard, 0 disk, 1 print, 2 com, 3 ipc)
  4385.  16h    WORD    ignored
  4386.  18h    WORD    ignored
  4387. --------N-215F47-----------------------------
  4388. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseAdd
  4389.     AX = 5F47h
  4390.     BX = level (0001h)
  4391.     CX = size of use_info_1 structure
  4392.     ES:DI -> use_info_1 structure (see AX=5F46h)
  4393. Return: CF clear on success
  4394.     CF set on error
  4395.         AX = error code
  4396. SeeAlso: AX=5F46h,AX=5F48h
  4397. --------N-215F48-----------------------------
  4398. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseDel
  4399.     AX = 5F48h
  4400.     BX = force level
  4401.         0000h no force
  4402.         0001h force
  4403.         0002h lots of force
  4404.     ES:DI -> buffer as either the local device name or UNC remote name
  4405. Return: CF clear on success
  4406.     CF set on error
  4407.         AX = error code
  4408. SeeAlso: AX=5F46h,AX=5F48h,AX=5F49h
  4409. --------N-215F49-----------------------------
  4410. INT 21 u - LAN Manager Enhanced DOS - NetUseGetInfo
  4411.     AX = 5F49h
  4412.     DS:DX -> NetUseGetInfo parameter structure
  4413. Return: CF clear on success
  4414.         DX = total available
  4415.     CF set on error
  4416.         AX = error code
  4417. SeeAlso: AX=5F44h,AX=5F47h
  4418.  
  4419. Format of NetUseGetInfo parameter structure:
  4420. Offset    Size    Description
  4421.  00h    DWORD    pointer to either the local device name or UNC remote name
  4422.  04h    WORD    level of information (0000h or 0001h)
  4423.  06h    DWORD    pointer to buffer of use_info_0 or use_info_1 structures
  4424.  0Ah    WORD    length of buffer
  4425. --------N-215F4A-----------------------------
  4426. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetRemoteCopy
  4427.     AX = 5F4Ah
  4428.     DS:DX -> NetRemoteCopy parameter structure
  4429. Return: CF clear if successful
  4430.     CF set on error
  4431.         AX = error code
  4432. SeeAlso: AX=5F4Bh
  4433.  
  4434. Format of NetRemoteCopy parameter structure:
  4435. Offset    Size    Description
  4436.  00h    DWORD    -> source name as UNC
  4437.  04h    DWORD    -> destination name as UNC
  4438.  08h    DWORD    -> source password
  4439.  0Ch    DWORD    -> destination password
  4440.  10h    WORD    destination open bitmap
  4441.         if destination path exists
  4442.             0000h open fails
  4443.             0001h file is appended
  4444.             0002h file is overwritten
  4445.         if destination path doesn't exist
  4446.             0000h open fails
  4447.             0010h file is created
  4448.  12h    WORD    copy control bitmap (see below)
  4449.  14h    DWORD    -> copy_info buffer
  4450.  18h    WORD    length of copy_info buffer
  4451.  
  4452. Bitfields for copy control:
  4453. Bit(s)    Description
  4454.  0    destination must be a file
  4455.  1    destination must be a directory
  4456.  2    destination is opened in ascii mode instead of binary
  4457.  3    source is opened in ascii mode instead of binary
  4458.  4    verify all write operations
  4459. --------N-215F4B-----------------------------
  4460. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetRemoteMove
  4461.     AX = 5F4Bh
  4462.     DS:DX -> NetRemoteMove parameter structure
  4463. Return: CF clear if successful
  4464.     CF set on error
  4465.         AX = error code
  4466. SeeAlso: AX=5F4Ah
  4467.  
  4468. Format of NetRemoteMove parameter structure:
  4469. Offset    Size    Description
  4470.  00h    DWORD    -> source name as UNC
  4471.  04h    DWORD    -> destination name as UNC
  4472.  08h    DWORD    -> source password
  4473.  0Ch    DWORD    -> destination password
  4474.  10h    WORD    destination open bitmap
  4475.         if destination path exists
  4476.             0000h open fails
  4477.             0001h file is appended
  4478.             0002h file is overwritten
  4479.         if destination path doesn't exist
  4480.             0000h open fails
  4481.             0010h file is created
  4482.  12h    WORD    move control bitmap
  4483.             0001h destination must be a file
  4484.             0002h destination must be a directory
  4485.  14h    DWORD    -> move_info buffer
  4486.  18h    WORD    length of move_info buffer
  4487. --------N-215F4C-----------------------------
  4488. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServerEnum
  4489.     AX = 5F4Ch
  4490.     BX = level (0000h or 0001h)
  4491.     CX = buffer length
  4492.     ES:DI -> buffer in which to store information
  4493. Return: CF clear if successful
  4494.         ES:DI -> server_info_X structures (depending on level) (see below)
  4495.         BX = entries read
  4496.         CX = total entries available
  4497.     CF set on error
  4498.         AX = error code
  4499. Notes:    this function is also supported by the Novell DOS Named Pipe Extender
  4500.     this function has been obseleted by NetServerEnum2
  4501. SeeAlso: AX=5F53h
  4502.  
  4503. Format of server_info_0 structure:
  4504. Offset    Size    Description
  4505.  00h 16 BYTEs    name
  4506.  
  4507. Format of server_info_1 structure:
  4508. Offset    Size    Description
  4509.  00h 16 BYTEs    name
  4510.  10h    BYTE    major version in lower nibble
  4511.  11h    BYTE    minor version
  4512.  12h    DWORD    server type bitmask (see below)
  4513.  16h    DWORD    -> comment string
  4514.  
  4515. Bitfields for server type:
  4516. Bit(s)    Description
  4517.  0    workstation
  4518.  1    server
  4519.  2    SQL server
  4520.  3    primary domain controller
  4521.  4    backup domain controller
  4522.  5    time server
  4523.  6    Apple File Protocol (AFP) server
  4524.  7    Novell server
  4525.  8    Domain Member (v2.1+)
  4526.  9    Print Queue server (v2.1+)
  4527.  10    Dialin server (v2.1+)
  4528.  11    Unix server (v2.1+)
  4529. --------N-215F4D-----------------------------
  4530. INT 21 u - LAN Manager Enhanced DOS - DosMakeMailslot
  4531.     AX = 5F4Dh
  4532.     BX = message size
  4533.     CX = mailslot size (must be bigger than message size by at least 1)
  4534.                (minimum 1000h, maximum FFF6h)
  4535.                (buffer must be 9 bytes bigger than this)
  4536.     DS:SI -> name
  4537.     ES:DI -> memory buffer
  4538. Return: CF clear if successful
  4539.         AX = handle
  4540.     CF set on error
  4541.         AX = error code
  4542. SeeAlso: AX=5F4Eh,AX=5F4Fh,AX=5F50h,AX=5F51h
  4543. --------N-215F4E-----------------------------
  4544. INT 21 u - LAN Manager Enhanced DOS - DosDeleteMailslot
  4545.     AX = 5F4Eh
  4546.     BX = handle
  4547. Return: CF clear if successful
  4548.         ES:DI -> memory to be freed (allocated during DosMakeMailslot)
  4549.     CF set on error
  4550.         AX = error code
  4551. SeeAlso: AX=5F4Dh,AX=5F4Fh
  4552. --------N-215F4F-----------------------------
  4553. INT 21 u - LAN Manager Enhanced DOS - DosMailslotInfo
  4554.     AX = 5F4Fh
  4555.     BX = handle
  4556. Return: CF clear if successful
  4557.         AX = max message size
  4558.         BX = mailslot size
  4559.         CX = next message size
  4560.         DX = next message priority
  4561.         SI = number of messages waiting
  4562.     CF set on error
  4563.         AX = error code
  4564. SeeAlso: AX=5F4Dh,AX=5F4Eh,AX=5F50h
  4565. --------N-215F50-----------------------------
  4566. INT 21 u - LAN Manager Enhanced DOS - DosReadMailslot
  4567.     AX = 5F50h
  4568.     BX = handle
  4569.     DX:CX = timeout
  4570.     ES:DI -> buffer
  4571. Return: CF clear if successful
  4572.         AX = bytes read
  4573.         CX = next item's size
  4574.         DX = next item's priority
  4575.     CF set on error
  4576.         AX = error code
  4577. SeeAlso: AX=5F4Dh,AX=5F4Fh,AX=5F51h,AX=5F52h
  4578. --------N-215F51-----------------------------
  4579. INT 21 u - LAN Manager Enhanced DOS - DosPeekMailslot
  4580.     AX = 5F51h
  4581.     BX = handle
  4582.     ES:DI -> buffer
  4583. Return: CF clear if successful
  4584.         AX = bytes read
  4585.         CX = next item's size
  4586.         DX = next item's priority
  4587.     CF set on error
  4588.         AX = error code
  4589. SeeAlso: AX=5F35h,AX=5F4Fh,AX=5F50h,AX=5F52h
  4590. --------N-215F52-----------------------------
  4591. INT 21 u - LAN Manager Enhanced DOS - DosWriteMailslot
  4592.     AX = 5F52h
  4593.     BX = class
  4594.     CX = length of buffer
  4595.     DX = priority
  4596.     ES:DI -> DosWriteMailslot parameter structure (see below)
  4597.     DS:SI -> mailslot name
  4598. Return: CF clear if successful
  4599.     CF set on error
  4600.         AX = error code
  4601. SeeAlso: AX=5F4Fh,AX=5F50h,AX=5F51h
  4602.  
  4603. Format of DosWriteMailslot parameter structure:
  4604. Offset    Size    Description
  4605.  00h    DWORD    timeout
  4606.  04h    DWORD    -> buffer
  4607. --------N-215F53-----------------------------
  4608. INT 21 u - LAN Manager Enhanced DOS - NetServerEnum2
  4609.     AX = 5F53h
  4610.     DS:SI -> NetServerEnum2 parameter structure (see below)
  4611. Return: CF clear if successful
  4612.         BX = entries read
  4613.         CX = total entries available
  4614.     CF set on error
  4615.         AX = error code
  4616. SeeAlso: AX=5F4Ch
  4617.  
  4618. Format of NetServerEnum2 parameter structure:
  4619. Offset    Size    Description
  4620.  00h    WORD    level (0000h or 0001h)
  4621.  02h    DWORD    -> buffer as array of server_info_??? structures
  4622.  06h    WORD    length of buffer
  4623.  08h    DWORD    server type bitmask (see below)
  4624.  0Ch    DWORD    -> Domain name (may be 0000h:0000h for all local domains)
  4625.  
  4626. Bitfields for server type:
  4627. Bit(s)    Description
  4628.  0    workstation
  4629.  1    server
  4630.  2    SQL server
  4631.  3    primary domain controller
  4632.  4    backup domain controller
  4633.  5    time server
  4634.  6    Apple File Protocol (AFP) server
  4635.  7    Novell server
  4636.  8    Domain Member (v2.1+)
  4637.  9    Print Queue server (v2.1+)
  4638.  10    Dialin server (v2.1+)
  4639.  11    Unix server (v2.1+)
  4640. Note:    set all (FFFFFFFFh) for All Types
  4641.  
  4642. Format of server_info_0 structure:
  4643. Offset    Size    Description
  4644.  00h 16 BYTEs    name
  4645.  
  4646. Format of server_info_1 structure:
  4647. Offset    Size    Description
  4648.  00h 16 BYTEs    name
  4649.  10h    BYTE    major version in lower nibble
  4650.  11h    BYTE    minor version
  4651.  12h    DWORD    server type (bits 0-11) (see above)
  4652.  16h    DWORD    -> comment string
  4653. --------N-215F55----------------------------
  4654. INT 21 U - LAN Manager Enhanced DOS - KILL ALL CONNECTIONS???
  4655.     AX = 5F55h
  4656.     BX = ???
  4657. Return: CF clear if successful
  4658.     CF set on error
  4659.         AX = error code
  4660. --------N-215F80-----------------------------
  4661. INT 21 - LANtastic - GET LOGIN ENTRY
  4662.     AX = 5F80h
  4663.     BX = login entry index (0-based)
  4664.     ES:DI -> 16-byte buffer for machine name
  4665. Return: CF clear if successful
  4666.         buffer filled with machine name ("\\" prefix removed)
  4667.         DL = adapter number (v3+)
  4668.     CF set on error
  4669.         AX = error code
  4670. Note:    the login entry index corresponds to the value BX used in AX=5F83h
  4671. SeeAlso: AX=5F83h
  4672. --------N-215F81-----------------------------
  4673. INT 21 - LANtastic - LOGIN TO SERVER
  4674.     AX = 5F81h
  4675.     ES:DI -> ASCIZ login path followed immediately by ASCIZ password
  4676.     BL = adapter number
  4677.         FFh try all valid adapters
  4678.         00h-07h try only specified adapter
  4679. Return: CF clear if successful
  4680.     CF set on error
  4681.         AX = error code
  4682. Notes:    login path is of form "\\machine\username"
  4683.     if no password is used, the string at ES:DI must be terminated with
  4684.       three NULs for compatibility with LANtastic v3.0.
  4685. SeeAlso: AX=5F82h,AX=5F84h
  4686. --------N-215F82-----------------------------
  4687. INT 21 - LANtastic - LOGOUT FROM SERVER
  4688.     AX = 5F82h
  4689.     ES:DI -> ASCIZ server name (in form "\\machine")
  4690. Return: CF clear if successful
  4691.     CF set on error
  4692.         AX = error code
  4693. SeeAlso: AX=5F81h,AX=5F88h,AX=5FCBh
  4694. --------N-215F83-----------------------------
  4695. INT 21 - LANtastic - GET USERNAME ENTRY
  4696.     AX = 5F83h
  4697.     BX = login entry index (0-based)
  4698.     ES:DI -> 16-byte buffer for username currently logged into
  4699. Return: CF clear if successful
  4700.         DL = adapter number (v3+)
  4701.     CF set on error
  4702.         AX = error code
  4703. Note:    the login entry index corresponds to the value BX used in AX=5F80h
  4704. SeeAlso: AX=5F80h
  4705. --------N-215F84-----------------------------
  4706. INT 21 - LANtastic - GET INACTIVE SERVER ENTRY
  4707.     AX = 5F84h
  4708.     BX = server index not currently logged into
  4709.     ES:DI -> 16-byte buffer for server name which is available for logging
  4710.         in to ("\\" prefix omitted)
  4711. Return: CF clear if successful
  4712.         DL = adapter number to non-logged in server is on
  4713.     CF set on error
  4714.         AX = error code
  4715. SeeAlso: AX=5F81h
  4716. --------N-215F85-----------------------------
  4717. INT 21 - LANtastic - CHANGE PASSWORD
  4718.     AX = 5F85h
  4719.     ES:DI -> buffer containing "\\machine\oldpassword" 00h "newpassword"00h
  4720. Return: CF clear if successful
  4721.     CF set on error
  4722.         AX = error code
  4723. Notes:    must be logged into the named machine
  4724.     this function is illegal for group accounts
  4725. --------N-215F86-----------------------------
  4726. INT 21 - LANtastic - DISABLE ACCOUNT
  4727.     AX = 5F86h
  4728.     ES:DI -> ASCIZ machine name and password in form "\\machine\password"
  4729. Return: CF clear if successful
  4730.     CF set on error
  4731.         AX = error code
  4732. Note:    must be logged into the named machine and concurrent logins set to 1
  4733.       by NET_MGR.  Requires system manager to re-enable account.
  4734. --------N-215F87-----------------------------
  4735. INT 21 - LANtastic v3+ - GET ACCOUNT
  4736.     AX = 5F87h
  4737.     DS:SI -> 128-byte buffer for account information (see below)
  4738.     ES:DI -> ASCIZ machine name in form "\\machine"
  4739. Return: CF clear if successful
  4740.     CF set on error
  4741.         AX = error code
  4742.     BX destroyed
  4743. Note:    must be logged into the specified machine
  4744.  
  4745. Format of user account structure:
  4746. Offset    Size    Description
  4747.  00h 16 BYTEs    blank-padded username (zero-padded for v4.x)
  4748.  10h 16 BYTEs    reserved (00h)
  4749.  20h 32 BYTEs    user description
  4750.  40h    BYTE    privilege bits (see below)
  4751.  41h    BYTE    maximum concurrent users
  4752.  42h 42 BYTEs    bit map for disallowed half hours, beginning on Sunday
  4753.         (bit set if half-hour not an allowed time)
  4754.  6Ch    WORD    internal (0002h)
  4755.  6Eh  2 WORDs    last login time
  4756.  72h  2 WORDs    account expiration date (MS-DOS-format year/month:day)
  4757.  76h  2 WORDs    password expiration date (0 = none)
  4758.  7Ah    BYTE    number of days to extend password after change (1-31)
  4759.         00h if no extension required
  4760. ---v3.x---
  4761.  7Bh  5 BYTEs    reserved
  4762. ---v4.x---
  4763.  7Bh    BYTE    storage for first letter of user name when deleted (first
  4764.         character is changed to 00h when deleting account)
  4765.  7Ch    BYTE    extended privileges
  4766.  7Dh  3 BYTEs    reserved
  4767.  
  4768. Bitfields for privilege bits:
  4769. Bit(s)    Description
  4770.  7    bypass access control lists
  4771.  6    bypass queue protection
  4772.  5    treat as local process
  4773.  4    bypass mail protection
  4774.  3    allow audit entry creation
  4775.  2    system manager
  4776.  0    user cannot change password
  4777. --------N-215F88-----------------------------
  4778. INT 21 - LANtastic v4.0+ - LOGOUT FROM ALL SERVERS
  4779.     AX = 5F88h
  4780. Return: CF clear if successful
  4781.     CF set on error
  4782.         AX = error code
  4783. SeeAlso: AX=5F82h
  4784. --------N-215F97-----------------------------
  4785. INT 21 - LANtastic - COPY FILE
  4786.     AX = 5F97h
  4787.     CX:DX = number of bytes to copy (FFFFFFFFh = entire file)
  4788.     SI = source file handle
  4789.     DI = destination file handle
  4790. Return: CF clear if successful
  4791.         DX:AX = number of bytes copied
  4792.     CF set on error
  4793.         AX = error code
  4794. Note:    copy is performed by server
  4795. --------N-215F98-----------------------------
  4796. INT 21 - LANtastic - SEND UNSOLICITED MESSAGE
  4797.     AX = 5F98h
  4798.     DS:SI -> message buffer (see below)
  4799. Return: CF clear if successful
  4800.     CF set on error
  4801.         AX = error code
  4802. Note:    v4.1- return no errors
  4803. SeeAlso: AX=5F99h
  4804.  
  4805. Format of message buffer:
  4806. Offset    Size    Description
  4807.  00h    BYTE    reserved
  4808.  01h    BYTE    message type
  4809.         00h general
  4810.         01h server warning
  4811.         02h-7Fh reserved
  4812.         80h-FFh user-defined
  4813.  02h 16 BYTEs    ASCIZ destination machine name
  4814.  12h 16 BYTEs    ASCIZ server name which user must be logged into
  4815.  22h 16 BYTEs    ASCIZ user name
  4816.  32h 16 BYTEs    ASCIZ originating machine name (filled in when received)
  4817.  42h 80 BYTEs    message text
  4818. --------N-215F99-----------------------------
  4819. INT 21 - LANtastic - GET LAST RECEIVED UNSOLICITED MESSAGE
  4820.     AX = 5F99h
  4821.     ES:DI -> messsage buffer (see AX=5F98h for format)
  4822. Return: CF clear if successful
  4823.     CF set on error
  4824.         AX = error code
  4825. SeeAlso: AX=5F98h
  4826. --------N-215F9A-----------------------------
  4827. INT 21 - LANtastic - GET MESSAGE PROCESSING FLAGS
  4828.     AX = 5F9Ah
  4829. Return: CF clear if successful
  4830.         DL = bits describing processing for received unsolicited messages
  4831.         bit 0: beep before message is delivered
  4832.         bit 1: deliver message to message service
  4833.         bit 2: pop up message automatically (v3+)
  4834.     CF set on error
  4835.         AX = error code
  4836. SeeAlso: AX=5F9Bh,AX=5F9Ch,AX=5F9Dh
  4837. --------N-215F9B-----------------------------
  4838. INT 21 - LANtastic - SET MESSAGE PROCESSING FLAGS
  4839.     AX = 5F9Bh
  4840.     DL = bits describing processing for received unsolicited messages
  4841.          (see AX=5F9Ah)
  4842. Return: CF clear if successful
  4843.     CF set on error
  4844.         AX = error code
  4845. SeeAlso: AX=5F9Ah,AX=5F9Eh
  4846. --------N-215F9C-----------------------------
  4847. INT 21 - LANtastic v3+ - POP UP LAST RECEIVED MESSAGE
  4848.     AX = 5F9Ch
  4849.     CX = time to leave on screen in clock ticks
  4850.     DH = 0-based screen line on which to place message
  4851. Return: CF clear if successful
  4852.     CF set on error
  4853.         AX = error code (0Bh)
  4854. Notes:    the original screen contents are restored when the message is removed
  4855.     the message will not appear, and an error will be returned, if the
  4856.       screen is in a graphics mode
  4857. SeeAlso: AX=5F9Ah
  4858. --------N-215F9D-----------------------------
  4859. INT 21 - LANtastic v4.1+ - GET REDIRECTOR CONTROL BITS
  4860.     AX = 5F9Dh
  4861. Return: DL = redirector control bits
  4862.         bit 7: set to notify on print job completion
  4863. SeeAlso: AX=5F9Ah,AX=5F9Eh
  4864. --------N-215F9E-----------------------------
  4865. INT 21 - LANtastic v4.1+ - SET REDIRECTOR CONTROL BITS
  4866.     AX = 5F9Eh
  4867.     DL = redirector control bits (see AX=5F9Dh)
  4868. Return: nothing
  4869. SeeAlso: AX=5F9Bh,AX=5F9Dh
  4870. --------N-215FA0-----------------------------
  4871. INT 21 - LANtastic - GET QUEUE ENTRY
  4872.     AX = 5FA0h
  4873.     BX = queue entry index (0000h is first entry)
  4874.     DS:SI -> buffer for queue entry (see below)
  4875.     ES:DI -> ASCIZ server name in form "\\name"
  4876. Return: CF clear if successful
  4877.     CF set on error
  4878.         AX = error code
  4879.     BX = entry index for next queue entry (BX-1 is current index)
  4880. SeeAlso: AX=5FA1h,AX=5FA2h
  4881.  
  4882. Values for status of entry:
  4883.  00h    empty
  4884.  01h    being updated
  4885.  02h    being held
  4886.  03h    waiting for despool
  4887.  04h    being despooled
  4888.  05h    canceled
  4889.  06h    spooled file could not be accessed
  4890.  07h    destination could not be accessed
  4891.  08h    rush job
  4892.  
  4893. Values for type of entry:
  4894.  00h    printer queue file
  4895.  01h    message
  4896.  02h    local file
  4897.  03h    remote file
  4898.  04h    to remote modem
  4899.  05h    batch processor file
  4900.  
  4901. Format of queue entry:
  4902. Offset    Size    Description
  4903.  00h    BYTE    status of entry (see above)
  4904.  01h    DWORD    size of spooled file
  4905.  05h    BYTE    type of entry (see above)
  4906.  06h    BYTE    output control
  4907.         bit 6: don't delete (for mail)
  4908.         bit 5: mail file contains voice mail (v3+)
  4909.         bit 4: mail message has been read
  4910.         bit 3: response has been requested for this mail
  4911.  07h    WORD    number of copies
  4912.  09h    DWORD    sequence number of queue entry
  4913.  0Dh 48 BYTEs    pathname of spooled file
  4914.  3Dh 16 BYTEs    user who spooled file
  4915.  4Dh 16 BYTEs    name of machine from which file was spooled
  4916.  5Dh    WORD    date file was spooled (see AX=5700h)
  4917.  5Fh    WORD    time file was spooled (see AX=5700h)
  4918.  61h 17 BYTEs    ASCIZ destination device or user name
  4919.  72h 48 BYTEs    comment field
  4920. --------N-215FA1-----------------------------
  4921. INT 21 - LANtastic - SET QUEUE ENTRY
  4922.     AX = 5FA1h
  4923.     BX = handle of opened queue entry
  4924.     DS:SI -> queue entry (see AX=5FA0h)
  4925. Return: CF clear if successful
  4926.     CF set on error
  4927.         AX = error code
  4928. Notes:    the only queue entry fields which may be changed are output control,
  4929.       number of copies, destination device, and comment
  4930.     the handle in BX is that from a create or open (INT 21/AH=3Ch,3Dh)
  4931.       call on the file "\\server\\@MAIL" or "\\server\@name" (for
  4932.       printer queue entries)
  4933. SeeAlso: AX=5FA0h,AX=5FA2h,AX=5FA9h
  4934. --------N-215FA2-----------------------------
  4935. INT 21 - LANtastic - CONTROL QUEUE
  4936.     AX = 5FA2h
  4937.     BL = control command
  4938.         00h start despooling (privileged)
  4939.         01h halt despooling (privileged)
  4940.         02h halt despooling at end of job (privileged)
  4941.         03h pause despooler at end of job (privileged)
  4942.         04h print single job (privileged)
  4943.         05h restart current job (privileged)
  4944.         06h cancel the current job
  4945.         07h hold queue entry
  4946.         08h release a held queue entry
  4947.         09h make queue entry a rushed job (privileged)
  4948.     CX:DX = sequence number to control (commands 06h-09h)
  4949.     DX = physical printer number (commands 00h-05h)
  4950.         00h-02h LPT1-LPT3
  4951.         03h,04h COM1,COM2
  4952.         other    all printers
  4953.     ES:DI -> ASCIZ server name in form "\\machine"
  4954. Return: CF clear if successful
  4955.     CF set on error
  4956.         AX = error code
  4957. --------N-215FA3-----------------------------
  4958. INT 21 - LANtastic v3+ - GET PRINTER STATUS
  4959.     AX = 5FA3h
  4960.     BX = physical printer number (00h-02h = LPT1-LPT3, 03h-04h = COM1-COM2)
  4961.     DS:SI -> buffer for printer status (see below)
  4962.     ES:DI -> ASCIZ server name in form "\\machine"
  4963. Return: CF clear if successful
  4964.     CF set on error
  4965.         AX = error code
  4966.     BX = next physical printer number
  4967. Note:    you must be logged in to the specified server
  4968.  
  4969. Format of printer status:
  4970. Offset    Size    Description
  4971.  00h    BYTE    printer state
  4972.         bit 7: printer paused
  4973.         bits 0-6: 0 printer disabled
  4974.               1 will stop at end of job
  4975.               2 print multiple jobs
  4976.  01h    WORD    queue index of print job being despooled
  4977.         FFFFh if not despooling--ignore all following fields
  4978.  03h    WORD    actual characters per second being output
  4979.  05h    DWORD    number of characters actually output so far
  4980.  09h    DWORD    number of bytes read from spooled file so far
  4981.  0Dh    WORD    copies remaining to print
  4982. --------N-215FA4-----------------------------
  4983. INT 21 - LANtastic v3+ - GET STREAM INFO
  4984.     AX = 5FA4h
  4985.     BX = 0-based stream index number
  4986.     DS:SI -> buffer for stream information (see below)
  4987.     ES:DI -> ASCIZ machine name in form "\\machine"
  4988. Return: CF clear if successful
  4989.     CF set on error
  4990.         AX = error code
  4991.     BX = next stream number
  4992. SeeAlso: AX=5FA5h
  4993.  
  4994. Format of stream information:
  4995. Offset    Size    Description
  4996.  00h    BYTE    queueing of jobs for logical printer (0=disabled,other=enabled)
  4997.  01h 11 BYTEs    logical printer resource template (may contain ? wildcards)
  4998. --------N-215FA5-----------------------------
  4999. INT 21 - LANtastic v3+ - SET STREAM INFO
  5000.     AX = 5FA5h
  5001.     BX = 0-based stream index number
  5002.     DS:SI -> buffer containing stream information (see AX=5FA4h)
  5003.     ES:DI -> ASCIZ machine name in form "\\machine"
  5004. Return: CF clear if successful
  5005.     CF set on error
  5006.         AX = error code
  5007. SeeAlso: AX=5FA4h
  5008. --------N-215FA7-----------------------------
  5009. INT 21 - LANtastic - CREATE USER AUDIT ENTRY
  5010.     AX = 5FA7h
  5011.     DS:DX -> ASCIZ reason code (max 8 bytes)
  5012.     DS:SI -> ASCIZ variable reason string (max 128 bytes)
  5013.     ES:DI -> ASCIZ machine name in form "\\machine"
  5014. Return: CF clear if successful
  5015.     CF set on error
  5016.         AX = error code
  5017. Note:    you must be logged in to the specified server and have the "U"
  5018.       privilege to execute this call
  5019. --------N-215FA9-----------------------------
  5020. INT 21 - LANtastic v4.1+ - SET EXTENDED QUEUE ENTRY
  5021.     AX = 5FA9h
  5022.     BX = handle of opened queue entry
  5023.     DS:SI -> queue entry (see AX=5FA0h)
  5024. Return: CF clear if successful
  5025.     CF set on error
  5026.         AX = error code
  5027. Note:    functions exactly the same as AX=5FA1h except the spooled filename is
  5028.       also set.  This call supports direct despooling.
  5029. SeeAlso: AX=5FA1h
  5030. --------N-215FB0-----------------------------
  5031. INT 21 - LANtastic - GET ACTIVE USER INFORMATION
  5032.     AX = 5FB0h
  5033.     BX = server login entry index
  5034.     DS:SI -> buffer for active user entry (see below)
  5035.     ES:DI -> ASCIZ machine name in form "\\server"
  5036. Return: CF clear if successful
  5037.     CF set on error
  5038.         AX = error code
  5039.     BX = next login index
  5040. SeeAlso: AX=5FB2h
  5041.  
  5042. Format of active user entry:
  5043. Offset    Size    Description
  5044.  00h    WORD    virtual circuit number
  5045.  02h    BYTE    login state (see below)
  5046.  03h    BYTE    last command issued (see below)
  5047.  04h  5 BYTEs    number of I/O bytes (40-bit unsigned number)
  5048.  09h  3 BYTEs    number of server requests (24-bit unsigned)
  5049.  0Ch 16 BYTEs    name of user who is logged in
  5050.  1Ch 16 BYTEs    name of remote logged in machine
  5051.  2Ch    BYTE    extended privileges (v4+???)
  5052.         bit 0: user cannot change his password
  5053.  2Dh    WORD    time left in minutes (0000h = unlimited) (v4+???)
  5054.  
  5055. Bitfields for login state:
  5056. Bit(s)    Description
  5057.  0    fully logged in
  5058.  1    remote program load login
  5059.  2    user has system manager privileges
  5060.  3    user can create audit entries
  5061.  4    bypass mail protection
  5062.  5    treat as local process
  5063.  6    bypass queue protection
  5064.  7    bypass access control lists
  5065.  
  5066. Values for last command:
  5067.  00h    login
  5068.  01h    process termination
  5069.  02h    open file
  5070.  03h    close file
  5071.  04h    create file
  5072.  05h    create new file
  5073.  06h    create unique file
  5074.  07h    commit data to disk
  5075.  08h    read file
  5076.  09h    write file
  5077.  0Ah    delete file
  5078.  0Bh    set file attributes
  5079.  0Ch    lock byte range
  5080.  0Dh    unlock byte range
  5081.  0Eh    create subdirectory
  5082.  0Fh    remove subdirectory
  5083.  10h    rename file
  5084.  11h    find first matching file
  5085.  12h    find next matching file
  5086.  13h    get disk free space
  5087.  14h    get a queue entry
  5088.  15h    set a queue entry
  5089.  16h    control the queue
  5090.  17h    return login information
  5091.  18h    return link description
  5092.  19h    seek on file
  5093.  1Ah    get server's time
  5094.  1Bh    create audit entry
  5095.  1Ch    open file in multitude of modes
  5096.  1Dh    change password
  5097.  1Eh    disable account
  5098.  1Fh    local server file copy
  5099. ---v3+---
  5100.  20h    get username from account file
  5101.  21h    translate server's logical path
  5102.  22h    make indirect file
  5103.  23h    get indirect file contents
  5104.  24h    get physical printer status
  5105.  25h    get logical print stream info
  5106.  26h    set logical print stream info
  5107.  27h    get user's account record
  5108. ---v4+---
  5109.  28h    request server shutdown
  5110.  29h    cancel server shutdown
  5111.  2Ah    stuff server's keyboard
  5112.  2Bh    write then commit data to disk
  5113.  2Ch    set extended queue entry
  5114.  2Dh    terminate user from server
  5115.  2Eh    enable/disable logins
  5116.  2Fh    flush server caches
  5117.  30h    change username
  5118.  31h    get extended queue entry
  5119.     (same as get queue, but can return named fields blanked)
  5120. --------N-215FB1-----------------------------
  5121. INT 21 - LANtastic - GET SHARED DIRECTORY INFORMATION
  5122.     AX = 5FB1h
  5123.     DS:SI -> 64-byte buffer for link description
  5124.     ES:DI -> ASCIZ machine and shared directory name in form
  5125.          "\\machine\shared-resource"
  5126. Return: CF clear if successful
  5127.         CX = access control list privileges for requesting user (see below)
  5128.     CF set on error
  5129.         AX = error code
  5130.  
  5131. Bitfields for access control list:
  5132. Bit(s)    Description
  5133.  4    (I) allow expansion of indirect files
  5134.  5    (A) allow attribute changing
  5135.  6    (P) allow physical access to device
  5136.  7    (E) allow program execution
  5137.  8    (N) allow file renaming
  5138.  9    (K) allow directory deletion
  5139.  10    (D) allow file deletion
  5140.  11    (L) allow file/directory lookups
  5141.  12    (M) allow directory creation
  5142.  13    (C) allow file creation
  5143.  14    (W) allow open for write and writing
  5144.  15    (R) allow open for read and reading
  5145. --------N-215FB2-----------------------------
  5146. INT 21 - LANtastic v3+ - GET USERNAME FROM ACCOUNT FILE
  5147.     AX = 5FB2h
  5148.     BX = username entry index (0 for first)
  5149.     DS:SI -> 16-byte buffer for username
  5150.     ES:DI -> ASCIZ server name in form "\\machine"
  5151. Return: CF clear if successful
  5152.     CF set on error
  5153.         AX = error code
  5154.     BX = next queue entry index
  5155. SeeAlso: AX=5FB0h
  5156. --------N-215FB3-----------------------------
  5157. INT 21 - LANtastic v3+ - TRANSLATE PATH
  5158.     AX = 5FB3h
  5159.     DS:SI -> 128-byte buffer for ASCIZ result
  5160.     ES:DI -> full ASCIZ path, including server name
  5161.     DX = types of translation to be performed
  5162.         bit 0: expand last component as indirect file
  5163.         bit 1: return actual path relative to server's physical disk
  5164. Return: CF clear if successful
  5165.     CF set on error
  5166.         AX = error code
  5167. Note:    always expands any indirect files along the path
  5168. SeeALso: AX=5FB4h,INT 21/AH=60h
  5169. --------N-215FB4-----------------------------
  5170. INT 21 - LANtastic v3+ - CREATE INDIRECT FILE
  5171.     AX = 5FB4h
  5172.     DS:SI -> 128-byte buffer containing ASCIZ contents of indirect file
  5173.     ES:DI -> full ASCIZ path of indirect file to create, incl machine name
  5174. Return: CF clear if successful
  5175.     CF set on error
  5176.         AX = error code
  5177. Note:    the contents of the indirect file may be any valid server-relative path
  5178. SeeAlso: AX=5FB3h,AX=5FB5h
  5179. --------N-215FB5-----------------------------
  5180. INT 21 - LANtastic v3+ - GET INDIRECT FILE CONTENTS
  5181.     AX = 5FB5h
  5182.     DS:SI -> 128-byte buffer for ASCIZ indirect file contents
  5183.     ES:DI -> full ASCIZ path of indirect file
  5184. Return: CF clear if successful
  5185.     CF set on error
  5186.         AX = error code
  5187. SeeAlso: AX=5FB4h
  5188. --------N-215FB6-----------------------------
  5189. INT 21 - LANtastic v4.1+ - SET AUTO-LOGIN DEFAULTS
  5190.     AX = 5FB6h
  5191.     ES:DI -> pointer to ASCIZ default user name, immediately followed by
  5192.         ASCIZ password
  5193.     BL = adapter number to use for default login attempt
  5194.         FFh try all valid adapters
  5195.         00h-05h try adapter 0-5 explicitly
  5196. Return: CF clear if successful
  5197.     CF set on error
  5198.         AX = error code
  5199. Notes:    call with ES:DI -> two nulls to disable auto-login
  5200. SeeAlso: AX=5FB7h
  5201. --------N-215FB7-----------------------------
  5202. INT 21 - LANtastic v4.1+ - GET AUTO-LOGIN DEFAULTS
  5203.     AX = 5FB7h
  5204.     ES:DI -> pointer to 16-byte buffer to store ASCIZ auto-login user name
  5205. Return: CF clear if successful
  5206.         DL = adapter number used for default login attempt
  5207.         FFh all valid adapters will be tried
  5208.         00h-05h specified adapter will be tried explicitly
  5209.     CF set on error
  5210.         AX = error code
  5211. SeeAlso: AX=5F81h,AX=5FB6h
  5212. --------N-215FC0-----------------------------
  5213. INT 21 - LANtastic - GET TIME FROM SERVER
  5214.     AX = 5FC0h
  5215.     DS:SI -> time block (see below)
  5216.     ES:DI -> ASCIZ server name to get time from
  5217. Return: CF clear if successful
  5218.     CF set on error
  5219.         AX = error code
  5220. SeeAlso: AH=E7h
  5221.  
  5222. Format of time block:
  5223. Offset    Size    Description
  5224.  00h    WORD    year
  5225.  02h    BYTE    day
  5226.  03h    BYTE    month
  5227.  04h    BYTE    minutes
  5228.  05h    BYTE    hour
  5229.  06h    BYTE    hundredths of second
  5230.  07h    BYTE    second
  5231. --------N-215FC8-----------------------------
  5232. INT 21 - LANtastic v4.0+ - SCHEDULE SERVER SHUTDOWN
  5233.     AX = 5FC8h
  5234.     ES:DI -> ASCIZ server name in form "\\machine"
  5235.     DS:SI -> ASCIZ reason string (80 characters)
  5236.     CX = number of minutes until shutdown (0 = immediate)
  5237.     DX = option flags (see below)
  5238. Return: CF clear if successful
  5239.     CF set on error
  5240.         AX = error code
  5241. SeeAlso: AX=5FC9h
  5242.  
  5243. Bitfields for option flags:
  5244. Bit(s)    Description
  5245.  0    auto reboot
  5246.  1    do not notify users
  5247.  2    halt after shutdown
  5248.  3    shutdown due to power fail (used by UPS)
  5249.  4-7    reserved
  5250.  8-14    user definable
  5251.  15    reserved
  5252. --------N-215FC9-----------------------------
  5253. INT 21 - LANtastic v4.0+ - CANCEL SERVER SHUTDOWN
  5254.     AX = 5FC9h
  5255.     ES:DI -> ASCIZ server name in form "\\machine"
  5256. Return: CF clear if successful
  5257.     CF set on error
  5258.         AX = error code
  5259. Note:    you must have the "S" privilege to use this call
  5260. SeeAlso: AX=5FC8h
  5261. --------N-215FCA-----------------------------
  5262. INT 21 - LANtastic v4.0+ - STUFF SERVER KEYBOARD BUFFER
  5263.     AX = 5FCAh
  5264.     ES:DI -> ASCIZ server name in form "\\machine"
  5265.     DS:SI -> ASCIZ string to stuff (128 bytes)
  5266. Return: CF clear if successful
  5267.     CF set on error
  5268.         AX = error code
  5269. Note:    you must have the "S" privilege to use this call
  5270.     maximum number of characters that can be stuffed is determined by the
  5271.       server's RUN BUFFER SIZE.
  5272. SeeAlso: INT 16/AH=05h
  5273. --------N-215FCB-----------------------------
  5274. INT 21 - LANtastic v4.1+ - TERMINATE USER
  5275.     AX = 5FCBh
  5276.     ES:DI -> ASCIZ server name in form "\\machine"
  5277.     DS:SI -> blank-padded username.     A null char = wildcard.
  5278.     DS:DX -> blank-padded machine name.  A null char = wildcard.
  5279.     CX = minutes until termination (0 = immediate)
  5280. Return: CF clear if successful
  5281.     CF set on error
  5282.         AX = error code
  5283. Note:    you must have the "S" privilege to use this call
  5284.     you cannot log yourself out using this call
  5285. SeeAlso: AX=5F82h
  5286. --------N-215FCC-----------------------------
  5287. INT 21 - LANtastic v4.1+ - GET/SET SERVER CONTROL BITS
  5288.     AX = 5FCCh
  5289.     ES:DI -> ASCIZ server name in form "\\machine"
  5290.     CX = bit values (value of bits you want to set) (see below)
  5291.     DX = bit mask (bits you are interested in, 0 = get only) (see below)
  5292. Return: CF clear if successful
  5293.         CX = control bits after call
  5294.         bit 0: disable logins
  5295.     CF set on error
  5296.         AX = error code
  5297. Note:    you must have the "S" privilege to SET, anyone can GET.
  5298. --------N-215FCD-----------------------------
  5299. INT 21 - LANtastic v4.1+ - FLUSH SERVER CACHES
  5300.     AX = 5FCDh
  5301.     ES:DI -> ASCIZ server name in form "\\machine"
  5302. Return: CF clear if successful
  5303.     CF set on error
  5304.         AX = error code
  5305. Note:    you must have the "S" privilege to use this call.
  5306. --------N-215FD0-----------------------------
  5307. INT 21 - LANtastic - GET REDIRECTED PRINTER TIMEOUT
  5308.     AX = 5FD0h
  5309. Return: CF clear if successful
  5310.         CX = redirected printer timeout in clock ticks of 55ms
  5311.         0000h if timeout disabled
  5312.     CF set on error
  5313.         AX = error code
  5314. SeeAlso: AX=5FD1h
  5315. --------N-215FD1-----------------------------
  5316. INT 21 - LANtastic - SET REDIRECTED PRINTER TIMEOUT
  5317.     AX = 5FD1h
  5318.     CX = printer timeout in clock ticks of 55ms, 0000h to disable timeouts
  5319. Return: CF clear if successful
  5320.     CF set on error
  5321.         AX = error code
  5322. SeeAlso: AX=5FD0h
  5323. --------N-215FE0-----------------------------
  5324. INT 21 C - LANtastic - GET DOS SERVICE VECTOR
  5325.     AX = 5FE0h
  5326. Return: CF clear if successful
  5327.         ES:BX -> current FAR service routine
  5328.     CF set on error
  5329.         AX = error code
  5330. Note:    the service routine is called by the LANtastic redirector whenever DOS
  5331.       may safely be called, permitting external TSRs and drivers to hook
  5332.       into LANtastic's DOS busy flag checking
  5333. SeeAlso: AX=5FE1h,INT 28,INT 2A/AH=84h
  5334. --------N-215FE1-----------------------------
  5335. INT 21 - LANtastic - SET DOS SERVICE VECTOR
  5336.     AX = 5FE1h
  5337.     ES:BX -> FAR routine to call when DOS services are available
  5338. Return: CF clear if successful
  5339.     CF set on error
  5340.         AX = error code
  5341. Note:    new handler must chain to previous handler as its first action
  5342. SeeAlso: AX=5FE0h
  5343. --------N-215FE2-----------------------------
  5344. INT 21 - LANtastic - GET MESSAGE SERVICE VECTOR
  5345.     AX = 5FE2h
  5346. Return: CF clear if successful
  5347.         ES:BX -> current FAR message service routine
  5348.     CF set on error
  5349.         AX = error code
  5350. SeeAlso: AX=5FE0h,AX=5FE3h
  5351. --------N-215FE3-----------------------------
  5352. INT 21 - LANtastic - SET MESSAGE SERVICE VECTOR
  5353.     AX = 5FE3h
  5354.     ES:BX -> FAR routine for processing network messages
  5355. Return: CF clear if successful
  5356.     CF set on error
  5357.         AX = error code
  5358. Notes:    handler must chain to previous handler as its first action
  5359.     on invocation, ES:BX -> just-received message
  5360. SeeAlso: AX=5FE2h
  5361. --------D-2160-------------------------------
  5362. INT 21 - DOS 3.0+ - "TRUENAME" - CANONICALIZE FILENAME OR PATH
  5363.     AH = 60h
  5364.     DS:SI -> ASCIZ filename or path
  5365.     ES:DI -> 128-byte buffer for canonicalized name
  5366. Return: CF set on error
  5367.         AX = error code
  5368.         02h invalid component in directory path or drive letter only
  5369.         03h malformed path or invalid drive letter
  5370.         ES:DI buffer unchanged
  5371.     CF clear if successful
  5372.         AH = 00h
  5373.         AL = destroyed (00h or 5Ch or last char of current dir on drive)
  5374.         buffer filled with qualified name of form D:\PATH\FILE.EXT or
  5375.           \\MACHINE\PATH\FILE.EXT
  5376. Desc:    determine the canonical name of the specified filename or path,
  5377.       corresponding to the undocumented TRUENAME command in COMMAND.COM
  5378. Notes:    the input path need not actually exist
  5379.     letters are uppercased, forward slashes converted to backslashes,
  5380.       asterisks converted to appropriate number of question marks, and
  5381.       file and directory names are truncated to 8.3 if necessary.  (DR-DOS
  5382.       3.41 and 5.0 do not expand asterisks)
  5383.     '.' and '..' in the path are resolved
  5384.     filespecs on local drives always start with "d:", those on network
  5385.       drives always start with "\\"
  5386.     if path string is on a JOINed drive, the returned name is the one that
  5387.       would be needed if the drive were not JOINed; similarly for a
  5388.       SUBSTed, ASSIGNed, or network drive letter.    Because of this, it is
  5389.       possible to get a qualified name that is not legal under the current
  5390.       combination of SUBSTs, ASSIGNs, JOINs, and network redirections
  5391.     under DOS 3.3 through 6.00, a device name is translated differently if
  5392.       the device name does not have an explicit directory or the directory
  5393.       is \DEV (relative directory DEV from the root directory works
  5394.       correctly).  In these cases, the returned string consists of the
  5395.       unchanged device name and extension appended to the string X:/
  5396.       (forward slash instead of backward slash as in all other cases) where
  5397.       X is the default or explicit drive letter.
  5398.     functions which take pathnames require canonical paths if invoked via
  5399.       INT 21/AX=5D00h
  5400.     supported by OS/2 v1.1 compatibility box
  5401.     NetWare 2.1x does not support characters with the high bit set; early
  5402.       versions of NetWare 386 support such characters except in this call.
  5403.       In addition, NetWare returns error code 3 for the path "X:\"; one
  5404.       should use "X:\." instead.
  5405.     for DOS 3.3-6.0, the input and output buffers may be the same, as the
  5406.       canonicalized name is built in an internal buffer and copied to the
  5407.       specified output buffer as the very last step
  5408.     for DR DOS 6.0, this function is not automatically called when on a
  5409.       network.  Device drivers reportedly cannot make this call from their
  5410.       INIT function.  Using the same pointer for both input and output
  5411.       buffers is not supported in the April 1992 and earlier versions of
  5412.       DR DOS
  5413. SeeAlso: AX=5FB3h,INT 2F/AX=1123h,INT 2F/AX=1221h
  5414. --------D-2161-------------------------------
  5415. INT 21 - DOS 3+ - UNUSED
  5416.     AH = 61h
  5417. Return: AL = 00h
  5418. Note:    this function does nothing and returns immediately
  5419. --------O-2161--BP6467-----------------------
  5420. INT 21 U - OS/2 v1.x FAPI - OS/2 FILE SYSTEM JOIN/SUBST
  5421.     AH = 61h
  5422.     BP = 6467h ("dg")
  5423.     AL = function
  5424.         00h list
  5425.         01h add
  5426.         02h delete
  5427.     BX = drive number
  5428.     CX = size of buffer
  5429.     SI = type (0002h JOIN, 0003h SUBST)
  5430.     ES:DI -> buffer
  5431. Return: ???
  5432. Notes:    used by JOIN and SUBST to communicate with the OS/2 file system
  5433.     also supported by OS/2 v2.0+ Virtual DOS Machines
  5434. --------D-2162-------------------------------
  5435. INT 21 - DOS 3+ - GET CURRENT PSP ADDRESS
  5436.     AH = 62h
  5437. Return: BX = segment of PSP for current process
  5438. Notes:    under DOS 3+, this function does not use any of the DOS-internal stacks
  5439.       and may thus be called at any time, even during another INT 21h call
  5440.     the current PSP is not necessarily the caller's PSP
  5441.     identical to the undocumented AH=51h
  5442. SeeAlso: AH=50h,AH=51h
  5443. --------D-216300-----------------------------
  5444. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
  5445.     AX = 6300h
  5446. Return: CF clear if successful
  5447.         DS:SI -> lead byte table (see below)
  5448.     CF set on error
  5449.         AX = error code (01h) (see AH=59h)
  5450. Notes:    does not preserve any registers other than SS:SP
  5451.     the US version of MS-DOS 3.30 treats this as an unused function,
  5452.       setting AL=00h and returning immediately
  5453. SeeAlso: AX=6301h,AH=07h,AH=08h,AH=0Bh
  5454.  
  5455. Format of lead byte table entry:
  5456. Offset    Size    Description
  5457.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  5458.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  5459.     ...
  5460.   N   2 BYTEs    00h,00h end flag
  5461. --------D-216300-----------------------------
  5462. INT 21 - Far East DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE
  5463.     AX = 6300h
  5464. Return: AL = error code
  5465.         00h successful
  5466.         DS:SI -> DBCS table (see below)
  5467.         all other registers except CS:IP and SS:SP destroyed
  5468.         FFh not supported
  5469. Notes:    probably identical to AH=63h/AL=00h for DOS 2.25
  5470.     the US version of MS-DOS 3.30 treats this as an unused function,
  5471.       setting AL=00h and returning immediately
  5472.     the US version of DOS 4.0+ accepts this function, but returns an empty
  5473.       list
  5474. SeeAlso: AX=6300h"DOS 2.25"
  5475.  
  5476. Format of DBCS table:
  5477. Offset    Size    Description
  5478.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  5479.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  5480.     ...
  5481.   N   2 BYTEs    00h,00h end flag
  5482. --------D-216301-----------------------------
  5483. INT 21 - DOS 2.25, Far East DOS 3.2+ - SET KOREAN (HANGEUL) INPUT MODE
  5484.     AX = 6301h
  5485.     DL = new mode
  5486.         00h return only full characters on DOS keyboard input functions
  5487.         01h return partially-formed (interim) characters also
  5488. Return: AL = status
  5489.         00h successful
  5490.         FFh invalid mode
  5491. Note:    Novell DOS 7 simply stores DL in the caller's PSP (see AH=26h)
  5492. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6302h
  5493. --------D-216302-----------------------------
  5494. INT 21 - DOS 2.25, Far East DOS 3.2+ - GET KOREAN (HANGEUL) INPUT MODE
  5495.     AX = 6302h
  5496. Return: AL = status
  5497.         00h successful
  5498.         DL = current input mode
  5499.             00h return only full characters (clears interim flag)
  5500.             01h return partial characters (sets interim flag)
  5501.         FFh not supported
  5502. Note:    Novell DOS 7 simply reads the value out of the caller's PSP, so it
  5503.       can return values other than 00h or 01h if the last call to AX=6301h
  5504.       used another value
  5505. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6301h
  5506. --------D-2164-------------------------------
  5507. INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
  5508.     AH = 64h
  5509.     AL = flag
  5510.         00h (default) call device driver function 5 (non-dest read)
  5511.             before INT 21/AH=01h,08h,0Ah
  5512.         nonzero don't call driver function 5
  5513. Return: nothing (MS-DOS)
  5514.     CF set, AX=error code??? (DR-DOS 5.0, which does not support this call)
  5515. Notes:    this function is called by the DOS 3.3+ PRINT.COM
  5516.     under MS-DOS, this function does not use any of the DOS-internal stacks
  5517.       and may thus be called at any time, even during another DOS call
  5518. SeeAlso: AH=01h,AH=08h,AH=0Ah,AX=5D06h
  5519. --------O-2164--DX0000-----------------------
  5520. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - ENABLE AUTOMATIC TITLE SWITCH
  5521.     AH = 64h
  5522.     DX = 0000h (function number)
  5523.     CX = 636Ch (magic value, "cl")
  5524.     BX = 0000h (indicates special request)
  5525. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5526.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5527. SeeAlso: AH=64h/BX=0001h,INT 21/AH=4Bh
  5528. --------O-2164--DX0001-----------------------
  5529. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - SET SESSION TITLE
  5530.     AH = 64h
  5531.     DX = 0001h (function number)
  5532.     CX = 636Ch (magic value, "cl")
  5533.     BX = 0000h (indicates special request)
  5534.     ES:DI -> new ASCIZ title (max 12 char) or "" to restore default title
  5535. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5536.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5537. SeeAlso: AH=64h/BX=0000h,AH=64h/BX=0002h,INT 15/AH=12h/BH=05h
  5538. --------O-2164--DX0002-----------------------
  5539. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - GET SESSION TITLE
  5540.     AH = 64h
  5541.     DX = 0002h (function number)
  5542.     CX = 636Ch (magic value, "cl")
  5543.     BX = 0000h (indicates special request)
  5544.     ES:DI -> 13-byte buffer for current title
  5545. Return: buffer filled (single 00h if title never changed)
  5546. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5547.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5548. SeeAlso: AH=64h/BX=0000h,AH=64h/BX=0001h,INT 15/AH=12h/BH=05h
  5549. --------O-2164--DX0003-----------------------
  5550. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET LASTDRIVE
  5551.     AH = 64h
  5552.     DX = 0003h (function number)
  5553.     CX = 636Ch (magic value, "cl")
  5554.     BX = 0000h (indicates special request)
  5555. Return: AL = highest drive supported
  5556. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5557.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5558.     used by WinOS2
  5559. --------O-2164--DX0004-----------------------
  5560. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET SIZE OF PTDA JFT
  5561.     AH = 64h
  5562.     DX = 0004h (function number)
  5563.     CX = 636Ch (magic value, "cl")
  5564.     BX = 0000h (indicates special request)
  5565. Return: AX = number of entries in OS/2 JFT for VDM
  5566. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5567.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5568.     in an OS/2 VDM, the DOS Job File Table in the PSP contains an index
  5569.       into the OS/2 JFT in the Per-Task Data Area rather than an SFT index
  5570.       because the OS/2 SFT can contain more than 255 entries
  5571. --------O-2164--DX0005-----------------------
  5572. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET SECOND SFT FLAGS WORD
  5573.     AH = 64h
  5574.     DX = 0005h (function number)
  5575.     CX = 636Ch (magic value, "cl")
  5576.     BX = 0000h (indicates special request)
  5577.     DI = DOS file handle
  5578. Return: AX = value of second flags word from OS/2 SFT entry for file
  5579. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5580.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5581.     the OS/2 SFT has two flags words rather than DOS's one word, and this
  5582.       function provides access to the word which is not present in DOS
  5583. --------O-2164--DX0006-----------------------
  5584. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - UNLOAD DOSKRNL SYMBOLS & LOAD PROGR
  5585.     AH = 64h
  5586.     DX = 0006h (function number)
  5587.     CX = 636Ch (magic value, "cl")
  5588.     BX = 0000h (indicates special request)
  5589.     ES:DI -> ASCIZ filespec
  5590.     DS = base address for loading
  5591. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5592.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5593.     this function is only supported by the kernel debugging version of
  5594.       OS2KRNL
  5595. --------O-2164--DX0007-----------------------
  5596. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET WinOS2 CALL GATE ADDRESS
  5597.     AH = 64h
  5598.     DX = 0007h (function number)
  5599.     CX = 636Ch (magic value, "cl")
  5600.     BX = 0000h (indicates special request)
  5601. Return: AX = call gate address
  5602. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5603.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5604.     used by WinOS2 to make direct calls to OS2KRNL, bypassing the overhead
  5605.       of DOSKRNL
  5606. --------O-2164--DX0008-----------------------
  5607. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET LOADING MESSAGE
  5608.     AH = 64h
  5609.     DX = 0008h (function number)
  5610.     CX = 636Ch (magic value, "cl")
  5611.     BX = 0000h (indicates special request)
  5612. Return: DS:DX -> '$'-terminated message "Loading.  Please wait."
  5613. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  5614.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  5615.     this function permits National Language Support for the initial message
  5616.       displayed while WinOS2 starts a full-screen session
  5617. --------O-2164--CX636C-----------------------
  5618. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - OS/2 API support
  5619.     AH = 64h
  5620.     CX = 636Ch ("cl")
  5621.     BX = API ordinal (see below)
  5622.     other registers as appropriate for API call
  5623. Return: as appropriate for API call
  5624. SeeAlso: AH=64h/BX=0025h,AH=64h/BX=00B6h
  5625.  
  5626. Values for API ordinal:
  5627.  0025h    DOS32StartSession
  5628.  0082h    DosGetCP
  5629.  00B6h    DosQFSAttach
  5630.  00BFh    DosEditName
  5631.  00CBh    DosForceDelete
  5632.  0144h    Dos32CreateEventSem
  5633.  0145h    Dos32OpenEvenSem
  5634.  0146h    Dos32CloseEventSem
  5635.  0147h    Dos32ResetEventSem
  5636.  0148h    Dos32PostEventSem
  5637.  0149h    Dos32WaitEventSem
  5638.  014Ah    Dos32QueryEventSem
  5639.  014Bh    Dos32CreateMutexSem
  5640.  014Ch    Dos32OpenMutexSem
  5641.  014Dh    Dos32CloseMutexSem
  5642.  014Eh    Dos32RequestMutexSem
  5643.  014Fh    Dos32ReleaseMutexSem
  5644.  0150h    Dos32QueryMutexSem
  5645.  0151h    Dos32CreateMuxWaitSem
  5646.  0152h    Dos32OpenMuxWaitSem
  5647.  0153h    Dos32CloseMuxWaitSem
  5648.  0154h    Dos32WaitMuxWaitSem
  5649.  0155h    Dos32AddMuxWaitSem
  5650.  0156h    Dos32DeleteMuxWaitSem
  5651.  0157h    Dos32QueryMuxWaitSem
  5652. --------O-2164--BX0025-----------------------
  5653. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - OS/2 API DOS32StartSession
  5654.     AH = 64h
  5655.     BX = 0025h (API ordinal)
  5656.     CX = 636Ch ("cl")
  5657.     DS:SI -> STARTDATA structure (see below)
  5658. Return: AX = return code
  5659. SeeAlso: AH=64h/CX=636Ch,AH=64h/BX=00B6h
  5660.  
  5661. Format of STARTDATA structure:
  5662. Offset    Size    Description
  5663.  00h    WORD    length of structure (must be 0018h,001Eh,0020h,0032h,or 003Ch)
  5664.  02h    WORD    relation of new process to caller (00h independent, 01h child)
  5665.  04h    WORD    fore/background (00h foreground, 01h background)
  5666.  06h    WORD    trace options (00h-02h, 00h = no trace)
  5667.  08h    DWORD    pointer to ASCIZ program title (max 62 chars) or 0000h:0000h
  5668.  0Ch    DWORD    pointer to ASCIZ program name (max 128 chars) or 0000h:0000h
  5669.  10h    DWORD    pointer to ASCIZ program args (max 144 chars) or 0000h:0000h
  5670.  14h    DWORD    "TermQ" (currently reserved, must be 00000000h)
  5671.  18h    DWORD    pointer to environment (max 486 bytes) or 0000h:0000h
  5672.  1Ch    WORD    inheritance (00h or 01h)
  5673.  1Eh    WORD    session type
  5674.         00h OS/2 session manager determines type (default)
  5675.         01h OS/2 full-screen
  5676.         02h OS/2 window
  5677.         03h PM
  5678.         04h VDM full-screen
  5679.         07h VDM window
  5680.  20h    DWORD    pointer to ASCIZ icon filename (max 128 chars) or 0000h:0000h
  5681.  24h    DWORD    "PgmHandle" (currently reserved, must be 00000000h)
  5682.  28h    WORD    "PgmControl"
  5683.  2Ah    WORD    initial column
  5684.  2Ch    WORD    initial row
  5685.  2Eh    WORD    initial width
  5686.  30h    WORD    initial height
  5687.  32h    WORD    reserved (0)
  5688.  34h    DWORD    "ObjectBuffer" (currently reserved, must be 00000000h)
  5689.  38h    DWORD    "ObjectBufferLen" (currently reserved, must be 00000000h)
  5690. --------O-2164--BX00B6-----------------------
  5691. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - OS/2 API DosQFSAttach
  5692.     AH = 64h
  5693.     BX = 00B6h (API ordinal)
  5694.     CX = 636Ch ("cl")
  5695.     DS = user's data segment
  5696.     ES:DI -> FSQAttachStruc (see below)
  5697. Return: CF set on error
  5698.         AX = error code (see AH=59h)
  5699.     CF clear if successful
  5700.         AX = 0000h
  5701.         data buffer filled
  5702. SeeAlso: AH=64h/CX=636Ch
  5703.  
  5704. Format of FSQAttachStruc:
  5705. Offset    Size    Description
  5706.  00h    DWORD    reserved
  5707.  04h    DWORD    pointer to the offset of the data buffer length
  5708.  08h    DWORD    pointer to the offset of the data buffer
  5709.  0Ch    WORD    FSA Info level
  5710.  0Eh    WORD    ordinal index into table
  5711.  10h    DWORD    pointer to the offset of the device name
  5712. Notes:    The segment value of the buffer, buffer length, and device
  5713.       name MUST all be the same.  It is defined on entry in the DS
  5714.       register.  The details of each info level are defined in the
  5715.       OS/2 CP Reference.
  5716. --------D-2165-------------------------------
  5717. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  5718.     AH = 65h
  5719.     AL = info ID
  5720.         01h get general internationalization info
  5721.         02h get pointer to uppercase table
  5722.         04h get pointer to filename uppercase table
  5723.         05h get pointer to filename terminator table
  5724.         06h get pointer to collating sequence table
  5725.         07h (DOS 4+) get pointer to Double-Byte Character Set table
  5726.     BX = code page (FFFFh=global code page)
  5727.     DX = country ID (FFFFh=current country)
  5728.     ES:DI -> country information buffer (see below)
  5729.     CX = size of buffer (>= 5)
  5730. Return: CF set on error
  5731.         AX = error code (see AH=59h)
  5732.     CF clear if successful
  5733.         CX = size of country information returned
  5734.         ES:DI -> country information
  5735. Notes:    AL=05h appears to return same info for all countries and codepages; it
  5736.       has been documented for DOS 5+, but was undocumented in ealier
  5737.       versions
  5738.     NLSFUNC must be installed to get info for countries other than the
  5739.       default
  5740.     subfunctions 02h and 04h are identical under OS/2
  5741. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h,INT 2F/AX=14FEh
  5742.  
  5743. Format of country information:
  5744. Offset    Size    Description
  5745.  00h    BYTE    info ID
  5746. ---if info ID = 01h---
  5747.  01h    WORD    size
  5748.  03h    WORD    country ID
  5749.  05h    WORD    code page
  5750.  07h 34 BYTEs    country-dependent info (see AH=38h)
  5751. ---if info ID = 02h---
  5752.  01h    DWORD    pointer to uppercase table (see below)
  5753. ---if info ID = 04h---
  5754.  01h    DWORD    pointer to filename uppercase table (see below)
  5755. ---if info ID = 05h---
  5756.  01h    DWORD    pointer to filename character table (see below)
  5757. ---if info ID = 06h---
  5758.  01h    DWORD    pointer to collating table (see below)
  5759. ---if info ID = 07h (DOS 4+)---
  5760.  01h    DWORD    pointer to DBCS lead byte table (see below)
  5761.  
  5762. Format of uppercase table:
  5763. Offset    Size    Description
  5764.  00h    WORD    table size
  5765.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  5766.  
  5767. Format of collating table:
  5768. Offset    Size    Description
  5769.  00h    WORD    table size
  5770.  02h 256 BYTEs    values used to sort characters 00h to FFh
  5771.  
  5772. Format of filename terminator table:
  5773. Offset    Size    Description
  5774.  00h    WORD    table size (not counting this word)
  5775.  02h    BYTE    ??? (01h for MS-DOS 3.30-6.00)
  5776.  03h    BYTE    lowest permissible character value for filename
  5777.  04h    BYTE    highest permissible character value for filename
  5778.  05h    BYTE    ??? (00h for MS-DOS 3.30-6.00)
  5779.  06h    BYTE    first excluded character in range \ all characters in this
  5780.  07h    BYTE    last excluded character in range  / range are illegal
  5781.  08h    BYTE    ??? (02h for MS-DOS 3.30-6.00)
  5782.  09h    BYTE    number of illegal (terminator) characters
  5783.  0Ah  N BYTEs    characters which terminate a filename:    ."/\[]:|<>+=;,
  5784. Note:    partially documented for DOS 5+, but undocumented for earlier versions
  5785.  
  5786. Format of filename uppercase table:
  5787. Offset    Size    Description
  5788.  00h    WORD    table size
  5789.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  5790.  
  5791. Format of DBCS lead byte table:
  5792. Offset    Size    Description
  5793.  00h    WORD    length
  5794.  02h 2N BYTEs    start/end for N lead byte ranges
  5795.     WORD    0000h    (end of table)
  5796. --------D-2165-------------------------------
  5797. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  5798.     AH = 65h
  5799.     AL = function
  5800.         20h capitalize character
  5801.         DL = character to capitalize
  5802.         Return: DL = capitalized character
  5803.         21h capitalize string
  5804.         DS:DX -> string to capitalize
  5805.         CX = length of string
  5806.         22h capitalize ASCIZ string
  5807.         DS:DX -> ASCIZ string to capitalize
  5808. Return: CF set on error
  5809.         AX = error code (see AH=59h)
  5810.     CF clear if successful
  5811. Note:    these calls have been documented for DOS 5+, but were undocumented in
  5812.       DOS 4.x.
  5813. --------D-216523-----------------------------
  5814. INT 21 U - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  5815.     AX = 6523h
  5816.     DL = character
  5817.     DH = second character of double-byte character (if applicable)
  5818. Return: CF set on error
  5819.     CF clear if successful
  5820.         AX = type
  5821.         00h no
  5822.         01h yes
  5823.         02h neither yes nor no
  5824. --------D-2165-------------------------------
  5825. INT 21 U - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  5826.     AH = 65h
  5827.     AL = function
  5828.         A0h capitalize filename character
  5829.         DL = character to capitalize
  5830.         Return: DL = capitalized character
  5831.         A1h capitalize counted filename string
  5832.         DS:DX -> filename string to capitalize
  5833.         CX = length of string
  5834.         A2h capitalize ASCIZ filename
  5835.         DS:DX -> ASCIZ filename to capitalize
  5836. Return: CF set on error
  5837.         AX = error code (see AH=59h)
  5838.     CF clear if successful
  5839. Note:    nonfunctional in DOS 4.00 through 6.00 due to a bug (the code sets a
  5840.       pointer depending on the high bit of AL, but doesn't clear the
  5841.       bit before branching by function number).
  5842. --------D-216601-----------------------------
  5843. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  5844.     AX = 6601h
  5845. Return: CF set on error
  5846.         AX = error code (see AH=59h)
  5847.     CF clear if successful
  5848.         BX = active code page (see AX=6602h)
  5849.         DX = system code page
  5850. SeeAlso: AX=6602h
  5851. --------D-216602-----------------------------
  5852. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  5853.     AX = 6602h
  5854.     BX = active code page (see below)
  5855.     DX = system code page (active page at boot time)
  5856. Return: CF set on error
  5857.         AX = error code (see AH=59h)
  5858.     CF clear if successful
  5859. SeeAlso: AX=6601h,INT 2F/AX=14FFh
  5860.  
  5861. Values for code page:
  5862.  437    US
  5863.  850    Multilingual
  5864.  852    Slavic/Latin II (DOS 5+)
  5865.  857    Turkish
  5866.  860    Portugal
  5867.  861    Iceland
  5868.  863    Canada (French)
  5869.  865    Norway/Denmark
  5870. --------D-2167-------------------------------
  5871. INT 21 - DOS 3.3+ - SET HANDLE COUNT
  5872.     AH = 67h
  5873.     BX = size of new file handle table for process
  5874. Return: CF clear if successful
  5875.     CF set on error
  5876.         AX = error code (see AH=59h)
  5877. Desc:    adjust the size of the per-process open file table, thus raising or
  5878.       lowering the limit on the number of files the caller can open
  5879.       simultaneously
  5880. Notes:    if BX <= 20, no action is taken if the handle limit has not yet been
  5881.       increased, and the table is copied back into the PSP if the limit
  5882.       is currently > 20 handles
  5883.     for file handle tables of > 20 handles, DOS 3.30 never reuses the
  5884.       same memory block, even if the limit is being reduced; this can lead
  5885.       to memory fragmentation as a new block is allocated and the existing
  5886.       one freed
  5887.     only the first 20 handles are copied to child processes in DOS 3.3-6.0
  5888.     increasing the file handles here will not, in general, increase the
  5889.       number of files that can be opened using the runtime library of a
  5890.       high-level language such as C
  5891. BUGS:    the original release of DOS 3.30 allocates a full 64K for the handle
  5892.       table on requests for an even number of handles
  5893.     DR-DOS 3.41 and 5.0 will lose track of any open file handles beyond
  5894.       the portion of the JFT retained after the call; MS-DOS will indicate
  5895.       error 04h if any of the JFT entries to be removed are open
  5896. SeeAlso: AH=26h,AH=86h
  5897. --------D-2168-------------------------------
  5898. INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
  5899.     AH = 68h
  5900.     BX = file handle
  5901. Return: CF clear if successful
  5902.         all data still in DOS disk buffers is written to disk immediately,
  5903.           and the file's directory entry is updated
  5904.     CF set on error
  5905.         AX = error code (see AH=59h)
  5906. SeeAlso: AX=5D01h,AH=6Ah,INT 2F/AX=1107h
  5907. --------D-2169-------------------------------
  5908. INT 21 U - DOS 4+ internal - GET/SET DISK SERIAL NUMBER
  5909.     AH = 69h
  5910.     AL = subfunction
  5911.         00h get serial number
  5912.         01h set serial number
  5913.     BL = drive (0=default, 1=A, 2=B, etc)
  5914.     DS:DX -> disk info (see below)
  5915. Return: CF set on error
  5916.         AX = error code (see AH=59h)
  5917.     CF clear if successful
  5918.         AX destroyed
  5919.         (AL = 00h) buffer filled with appropriate values from extended BPB
  5920.         (AL = 01h) extended BPB on disk set to values from buffer
  5921. Notes:    does not generate a critical error; all errors are returned in AX
  5922.     error 0005h given if no extended BPB on disk
  5923.     does not work on network drives (error 0001h)
  5924.     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
  5925.       extended BPB on disk
  5926.     this function is supported under Novell NetWare versions 2.0A through
  5927.       3.11; the returned serial number is the one a DIR would display,
  5928.       the volume label is the NetWare volume label, and the file system
  5929.       is set to "FAT16".
  5930.     the serial number is computed from the current date and time when the
  5931.       disk is created; the first part is the sum of the seconds/hundredths
  5932.       and month/day, the second part is the sum of the hours/minutes and
  5933.       year
  5934.     the volume label which is read or set is the one stored in the extended
  5935.       BPB on disks formatted with DOS 4.0+, rather than the special root
  5936.       directory entry used by the DIR command in COMMAND.COM (use AH=11h
  5937.       to find that volume label)
  5938. SeeAlso: AX=440Dh
  5939.  
  5940. Format of disk info:
  5941. Offset    Size    Description
  5942.  00h    WORD    info level (zero)
  5943.  02h    DWORD    disk serial number (binary)
  5944.  06h 11 BYTEs    volume label or "NO NAME    " if none present
  5945.  11h  8 BYTEs    (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "
  5946. --------O-2169-------------------------------
  5947. INT 21 - DR-DOS 5.0 - NULL FUNCTION
  5948.     AH = 69h
  5949. Return: AL = 00h
  5950. SeeAlso: AH=18h
  5951. --------v-216969-----------------------------
  5952. INT 21 - VIRUS - "Rape-747" - INSTALLATION CHECK
  5953.     AX = 6969h
  5954. Return: AX = 0666h if resident
  5955. SeeAlso: AX=58CCh,AH=76h"VIRUS"
  5956. --------d-2169FFDX0000-----------------------
  5957. INT 21 U - CUBIT v4.00 - GET CUBIT INT 21 HANDLER
  5958.     AX = 69FFh
  5959.     DX = 0000h
  5960.     BX = CB00h (magic value)
  5961. Return: ES:BX -> CUBITR.EXE handler for INT 21
  5962. Note:    the installation check consists of testing that the first eight bytes
  5963.       at the returned interrupt handler are EBh 07h "CUBITR" (a short
  5964.       jump around the signature followed by the signature); the byte
  5965.       following the signature (i.e. ES:[BX+8]) indicates whether CUBITR
  5966.       is active (01h) or disabled (00h)
  5967. SeeAlso: AX=69FFh/DX=CFBFh
  5968. Index:    installation check;CUBIT
  5969. --------d-2169FFDXCFBF-----------------------
  5970. INT 21 U - CUBIT v4.00 - UNINSTALL
  5971.     AX = 69FFh
  5972.     DX = CFBFh
  5973.     CX = EFCFh
  5974.     BX = CB00h (magic value)
  5975. Return: ES:BX -> CUBITR.EXE handler for INT 21
  5976.     CX = status
  5977.         2020h successful
  5978.         2222h failed
  5979. Note:    if DX is neither 0000h nor CFBFh on entry, some other code is executed
  5980. SeeAlso: AX=69FFh/DX=0000h
  5981. --------D-216A-------------------------------
  5982. INT 21 U - DOS 4+ - COMMIT FILE
  5983.     AH = 6Ah
  5984.     BX = file handle
  5985. Return: CF clear if successful
  5986.         AH = 68h
  5987.     CF set on error
  5988.         AX = error code (06h) (see AH=59h)
  5989. Note:    identical to AH=68h in DOS 5.0-6.0; not known whether this is the case
  5990.       in DOS 4.x
  5991. SeeAlso: AH=68h
  5992. --------D-216B-------------------------------
  5993. INT 21 U - DOS 4.0 internal - IFS IOCTL
  5994.     AH = 6Bh
  5995.     AL = subfunction
  5996.         00h ???
  5997.         DS:SI -> Current Directory Structure???
  5998.         CL = drive (1=A:)
  5999.         01h ???
  6000.         DS:SI -> ???
  6001.         CL = file handle???
  6002.         02h ???
  6003.         DS:SI -> Current Directory Structure???
  6004.         DI = ???
  6005.         CX = drive (1=A:)
  6006. Return: CF set on error
  6007.         AX = error code (see INT 21/AH=59h)
  6008.     CF clear if successful
  6009. Note:    passed through to INT 2F/AX=112Fh with AX on top of stack
  6010. SeeAlso: AH=6Bh"DOS 5",INT 2F/AX=112Fh
  6011. --------D-216B-------------------------------
  6012. INT 21 U - DOS 5+ - NULL FUNCTION
  6013.     AH = 6Bh
  6014. Return: AL = 00h
  6015. Note:    this function does nothing and returns immediately
  6016. SeeAlso: AH=6Bh"DOS 4"
  6017. --------D-216C00-----------------------------
  6018. INT 21 - DOS 4+ - EXTENDED OPEN/CREATE
  6019.     AX = 6C00h
  6020.     BL = open mode as in AL for normal open (see INT 21/AH=3Dh)
  6021.         bit 7: inheritance
  6022.         bits 4-6: sharing mode
  6023.         bit 3 reserved
  6024.         bits 0-2: access mode
  6025.     BH = flags
  6026.         bit 6 = auto commit on every write (see also AH=68h)
  6027.         bit 5 = return error rather than doing INT 24h
  6028.     CX = create attribute (see below)
  6029.     DL = action if file exists/does not exist
  6030.         bits 7-4 action if file does not exist
  6031.             0000 fail
  6032.             0001 create
  6033.         bits 3-0 action if file exists
  6034.             0000 fail
  6035.             0001 open
  6036.             0010 replace/open
  6037.     DH = 00h (reserved)
  6038.     DS:SI -> ASCIZ file name
  6039. Return: CF set on error
  6040.        AX = error code (see AH=59h)
  6041.     CF clear if successful
  6042.        AX = file handle
  6043.        CX = status
  6044.         1 file opened
  6045.         2 file created
  6046.         3 file replaced
  6047. Note:    the PC LAN Program only supports DL=01h, DL=10h/sharing=compatibility,
  6048.       and DL=12h
  6049. SeeAlso: AH=3Ch,AH=3Dh,AX=6C01h,AH=71h
  6050.  
  6051. Bitfields for create attribute:
  6052. Bit(s)    Description
  6053.  6-15    reserved
  6054.  5    archive
  6055.  4    reserved
  6056.  3    volume label
  6057.  2    system
  6058.  1    hidden
  6059.  0    readonly
  6060. --------O-216C01-----------------------------
  6061. INT 21 U - OS/2 v2.0 - "DosOpen2"
  6062.     AX = 6C01h
  6063.     ???
  6064. Return: ???
  6065. Note:    this function is similar to AX=6C00h, but supports OS/2's extended
  6066.       attributes
  6067. SeeAlso: AX=5704h,AX=6C00h,AH=6Fh"OS/2"
  6068. --------D-216D-------------------------------
  6069. INT 21 U - DOS 5+ ROM - FIND FIRST ROM PROGRAM
  6070.     AH = 6Dh
  6071.     DS:DX -> ASCIZ program name (may contain wildcrds)
  6072. Return: CF clear if found
  6073.         [DTA] = ROM search structure (see below)
  6074.     CF set if not found
  6075.         AX = error code
  6076.         0002h name not found in ROM
  6077.         0003h name contains colon or backslash
  6078. Notes:    the '*' wildcard matches all remaining characters in a ROM program's
  6079.       name; any following characters in the search mask are ignored up to
  6080.       another asterisk, which must be matched by an asterisk in the
  6081.       found program's name.
  6082.     the search mask and program names may contain multiple periods
  6083. SeeAlso: AH=1Ah,AH=4Eh,AH=6Eh,AX=6F00h,AX=6F02h
  6084.  
  6085. Format of ROM search structure:
  6086. Offset    Size    Description
  6087.  00h 13 BYTEs    ASCIZ name of found ROM program
  6088.  0Dh    DWORD    address at which to resume search (do not modify)
  6089.  11h    var    ASCIZ search mask passed in (do not modify)
  6090. --------O-216D-------------------------------
  6091. INT 21 U - OS/2 v1.x FAPI - "DosMkDir2"
  6092.     AH = 6Dh
  6093.     ???
  6094. Return: ???
  6095. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  6096. SeeAlso: AH=39h
  6097. --------O-216D-------------------------------
  6098. INT 21 U - Novell DOS 7 - NOP
  6099.     AH = 6Dh
  6100. Return: AX = 0000h
  6101. Note:    this function invokes the same code as other NOP functions such as
  6102.       AH=18h and AH=61h
  6103. --------D-216E-------------------------------
  6104. INT 21 U - DOS 5+ ROM - FIND NEXT ROM PROGRAM
  6105.     AH = 6Eh
  6106.     [DTA] = result of previous FindFirst ROM (see AH=6Dh)
  6107. Return: CF clear if found
  6108.         [DTA] = updated ROM search structure (see AH=6Dh)
  6109.     CF set if not found
  6110.         AX = 0012h (no more matches)
  6111. SeeAlso: AH=4Fh,AH=6Dh
  6112. --------O-216E-------------------------------
  6113. INT 21 U - OS/2 v1.x FAPI - "DosENumAttrib"
  6114.     AH = 6Eh
  6115.     ???
  6116. Return: ???
  6117. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  6118. SeeAlso: AX=5703h,AH=6Fh"OS/2",INT 2F/AX=112Dh
  6119. --------O-216F-------------------------------
  6120. INT 21 U - OS/2 v1.x FAPI - "DosQMaxEASize" - GET MAXIMUM SIZE OF EXTENDED ATTR
  6121.     AH = 6Fh
  6122.     ???
  6123. Return: ???
  6124. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  6125. SeeAlso: AX=5703h,AX=6C01h,AH=6Eh"OS/2"
  6126. --------D-216F00-----------------------------
  6127. INT 21 U - DOS 5+ ROM - GET ROM SCAN START ADDRESS
  6128.     AX = 6F00h
  6129. Return: CF clear
  6130.     AL = 00h
  6131.     BX = current ROM scan starting segment
  6132. SeeAlso: AH=6Dh,AX=6F01h,AX=6F02h
  6133. --------D-216F01-----------------------------
  6134. INT 21 U - DOS 5+ ROM - SET ROM SCAN START ADDRESS
  6135.     AX = 6F01h
  6136.     BX = new ROM scan starting address
  6137. Return: CF clear
  6138.     AL = 00h
  6139. SeeAlso: AX=6F00h,AX=6F03h
  6140. --------D-216F02-----------------------------
  6141. INT 21 U - DOS 5+ ROM - GET EXCLUSION REGION LIST
  6142.     AX = 6F02h
  6143.     ES:BX -> buffer for exclusion region list (see below)
  6144. Return: CF clear
  6145.     AL = 00h
  6146.     ES:BX = 0000h:0000h on error, unchanged if buffer filled
  6147. SeeAlso: AX=6F00h,AX=6F03h
  6148.  
  6149. Format of exclusion region list:
  6150. Offset    Size    Description
  6151.  00h    WORD    number of entries
  6152.  02h 2N WORDs    start/end segments of N excluded regions
  6153. --------D-216F03-----------------------------
  6154. INT 21 U - DOS 5+ ROM - SET EXCLUSION REGION LIST
  6155.     AX = 6F03h
  6156.     DS:DX -> new exclusion region list (see AX=6F02h)
  6157. Return: CF clear
  6158.     AL = 00h
  6159. Notes:    DOS saves only the pointer and assumes that the contents of the list
  6160.       are never changed, and that regions do not overlap
  6161.     if AL > 03h on entry, DOS returns CF set/AL=01h
  6162. SeeAlso: AX=6F01h,AX=6F02h
  6163. ----------217070BX6060-----------------------
  6164. INT 21 - PCW Weather Card interface - GET DATA SEGMENT
  6165.     AX = 7070h
  6166.     BX = 6060h
  6167.     CX = 7070h
  6168.     DX = 7070h
  6169.     SI = 7070h
  6170.     DI = 7070h
  6171. Return: AX = segment of data structure
  6172. Notes:    the data structure is at offset 516 from this segment.
  6173.     the update byte is at offset 514 from this segment.  Updates are
  6174.       once per second while this byte is nonzero and it is decremented
  6175.       once per second.  While this byte is 0 updates are once per minute.
  6176. SeeAlso: AX=7070h/BX=7070h
  6177.  
  6178. Format of data structure:
  6179. Offset    Type    Description
  6180.  00h    WORD    hour
  6181.  02h    WORD    minute
  6182.  04h    WORD    second
  6183.  06h    WORD    day
  6184.  08h    WORD    month
  6185.  0Ah    WORD    year
  6186.  0Ch    WORD    ???
  6187.  0Eh    WORD    relative barometric pressure (in 1/100 inches)
  6188.  10h    WORD    ???
  6189.  12h    WORD    ???
  6190.  14h    WORD    temperature 1 (in 1/10 degrees F)
  6191.  16h    WORD    temperature 1 lowest (in 1/10 degrees F)
  6192.  18h    WORD    temperature 1 highest (in 1/10 degrees F)
  6193.  1Ah    WORD    temperature 2 (in 1/10 degrees F)
  6194.  1Ch    WORD    temperature 2 lowest (in 1/10 degrees F)
  6195.  1Eh    WORD    temperature 2 highest (in 1/10 degrees F)
  6196.  20h    WORD    wind speed (in MPH)
  6197.  22h    WORD    average of 60 wind speed samples (in MPH)
  6198.  24h    WORD    highest wind speed (in MPH)
  6199.  26h    WORD    wind chill factor  (in 1/10 degrees F)
  6200.  28h    WORD    lowest wind chill factor (in 1/10 degrees F)
  6201.  2Ah    WORD    ???
  6202.  2Ch    WORD    wind direction (in degrees)
  6203.  2Eh    WORD    accumulated daily rainfall (in 1/10 inches)
  6204.  30h    WORD    accumulated annual rainfall (in 1/10 inches)
  6205. ----------217070BX7070-----------------------
  6206. INT 21 - PCW Weather Card interface - INSTALLATION CHECK
  6207.     AX = 7070h
  6208.     BX = 7070h
  6209.     CX = 7070h
  6210.     DX = 7070h
  6211.     SI = 7070h
  6212.     DI = 7070h
  6213. Return: AX = 0070h
  6214.     BX = 0070h
  6215.     CX = 0070h
  6216.     DX = 0070h
  6217.     SI = 0070h
  6218.     DI = 0070h
  6219. SeeAlso: AX=7070h/BX=6060h,AX=8080h
  6220. --------D-2171-------------------------------
  6221. INT 21 - DOS 7 (Chicago) - LONG FILENAME FUNCTIONS
  6222.     AH = 71h
  6223.     AL = function
  6224.         39h create directory
  6225.         3Ah remove directory
  6226.         3Bh set current directory
  6227.         41h delete file
  6228.         43h get file attributes (BL=00h), set file attributes (BL=01h)
  6229.         47h get current directory
  6230.         4Eh find first file
  6231.         4Fh find next file
  6232.         56h move (rename) file
  6233.         6Ch create/open file
  6234. Return: CF set on error
  6235.         AX = error code
  6236.         7100h if function not supported
  6237.     CF clear if successful
  6238.         other registers as for corresponding "old" DOS function
  6239. Notes:    if error 7100h is returned, the old-style function should be called
  6240.     AX=714Eh returns a "search handle" which must be passed to AX=714Fh;
  6241.       when the search is complete, AH=72h must be called to terminate
  6242.       the search
  6243. SeeAlso: AH=39h,AH=3Ah,AH=3Bh,AH=41h,AH=43h,AH=47h,AH=4Eh,AH=4Fh,AH=56h,AH=6Ch
  6244. SeeAlso: AH=72h
  6245. --------D-2172-------------------------------
  6246. INT 21 - DOS 7 (Chicago) - "FindClose" - TERMINATE DIRECTORY SEARCH
  6247.     AH = 72h
  6248.     details not yet available
  6249. Note:    this function must be called after starting a search with AX=714Eh,
  6250.       to indicate that the search handle returned by that function will
  6251.       no longer be used
  6252. SeeAlso: AH=4Eh,AH=71h
  6253. --------v-2176-------------------------------
  6254. INT 21 - VIRUS - "Klaeren"/"Hate" - INSTALLATION CHECK
  6255.     AH = 76h
  6256. Return: AL = 48h if resident
  6257. SeeAlso: AX=6969h,AX=7700h"VIRUS"
  6258. --------v-217700-----------------------------
  6259. INT 21 - VIRUS - "Growing Block" - INSTALLATION CHECK
  6260.     AX = 7700h
  6261. Return: AX = 0920h if resident
  6262. SeeAlso: AH=76h,AH=7Fh
  6263. --------V-217734-----------------------------
  6264. INT 21 U - SCROLLit v1.7 - INSTALLATION CHECK
  6265.     AX = 7734h
  6266. Return: DX = 3477h if installed
  6267.         AX = segment of resident code
  6268. Program: ScrollIt is a shareware backscroll utility by Bromfield Software
  6269.       Products
  6270. --------U-217761-----------------------------
  6271. INT 21 - WATCH.COM v3.2+ - INSTALLATION CHECK
  6272.     AX = 7761h ('wa')
  6273. Return: AX = 6177h
  6274. Note:    WATCH.COM is part of the "TSR" package by TurboPower Software
  6275. SeeAlso: INT 16/AX=7761h
  6276. --------v-217F-------------------------------
  6277. INT 21 - VIRUS - "Squeaker" - INSTALLATION CHECK
  6278.     AH = 7Fh
  6279. Return: AH = 80h if resident
  6280. SeeAlso: AX=7700h,AH=83h"VIRUS"
  6281. --------D-2180-------------------------------
  6282. INT 21 - European MS-DOS 4.0 - "AEXEC" - EXECUTE PROGRAM IN BACKGROUND
  6283.     AH = 80h
  6284.     CX = mode
  6285.         0000h place child in zombie mode on exit to preserve exit code
  6286.         0001h discard child process and exit code on termination
  6287.     DS:DX -> ASCIZ full program name
  6288.     ES:BX -> parameter block (as for AX=4B00h)
  6289. Return: CF clear if successful
  6290.         AX = Command Subgroup ID (CSID)
  6291.     CF set on error
  6292.         AX = error code (see AH=59h)
  6293. Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
  6294.       by several other European OEMs; its release falls between mainstream
  6295.       versions 3.2 and 3.3
  6296. Desc:    asynchronously execute a program, creating a new process for it
  6297. Notes:    this function is called by the DETACH command
  6298.     there is a system-wide limit of 32 processes
  6299.     the CSID is used to identify all processes that have been spawned by
  6300.       a given process, whether directly or indirectly
  6301.     programs to be run in the background must use the new executable format
  6302.       (see AH=4Bh)
  6303.     background processes may only perform asynchronous (background) EXECs,
  6304.       either this function or AX=4B04h
  6305.     background processes may execute INT 11, INT 12, INT 21, INT 2A, and
  6306.       INT 2F at any time; they may execute INT 10 and INT 16 only while
  6307.       they have opened a popup screen via INT 2F/AX=1401h; no other
  6308.       interrupts may be executed from the background
  6309.     background processes may not use drive B: or overlay their code
  6310.       segments
  6311.     see AX=8700h for an installation check
  6312.     the "NE" new executable format made its first appearance in European
  6313.       MS-DOS 4.0
  6314. SeeAlso: AH=4Bh,AH=87h,INT 2F/AX=1400h"POPUP"
  6315. ----------218080-----------------------------
  6316. INT 21 - PCW Weather Card interface - UNINSTALL PCW.COM AND FREE MEMORY
  6317.     AX = 8080h
  6318. Return: ???
  6319. SeeAlso: AX=7070h/BX=7070h
  6320. --------D-2181-------------------------------
  6321. INT 21 - European MS-DOS 4.0 - "FREEZE" - STOP A PROCESS
  6322.     AH = 81h
  6323.     BX = flag (00h freeze command subtree, 01h only specified process)
  6324.     CX = Process ID of head of command subtree
  6325. Return: CF clear if successful
  6326.     CF set on error
  6327.         AX = error code (no such process)
  6328. Desc:    temporarily suspend a process or a process and all of its children
  6329. Note:    if BX=0001h, this call will not return until the process is actually
  6330.       frozen, which may not be until after it unblocks from an I/O
  6331.       operation
  6332. SeeAlso: AH=82h,AH=89h,AX=8E00h,INT 15/AX=101Dh
  6333. --------D-2182-------------------------------
  6334. INT 21 - European MS-DOS 4.0 - "RESUME" - RESTART A PROCESS
  6335.     AH = 82h
  6336.     BX = flag (00h resume command subtree, 01h only specified process)
  6337.     CX = Process ID of head of command subtree
  6338. Return: CF clear if successful
  6339.     CF set on error
  6340.         AX = error code (no such process)
  6341. Desc:    restart a previously-suspended process or a process and all of its
  6342.       children
  6343. SeeAlso: AH=81h,INT 15/AX=101Eh
  6344. --------D-2183-------------------------------
  6345. INT 21 - European MS-DOS 4.0 - "PARTITION" - GET/SET FOREGROUND PARTITION SIZE
  6346.     AH = 83h
  6347.     AL = function
  6348.         00h get size
  6349.         01h set new size
  6350.         BX = new size in paragraphs
  6351. Return: CF clear if successful
  6352.         BX = current size (function 00h) or old size (function 01h)
  6353.     CF set on error
  6354.         AX = error code (01h,07h,0Dh)(see AH=59h)
  6355. Desc:    specify or determine how much memory may be allocated by the foreground
  6356.       process
  6357. Note:    if the partition size is set to 0000h, no partition management is done
  6358.       and all memory allocation is compatible with DOS 3.2.
  6359.     the partition size can be changed regardless of what use is being made
  6360.       of the changed memory; subsequent allocations will follow the
  6361.       partition rules (foreground processes may allocate only foreground
  6362.       memory; background processes allocate background memory first, then
  6363.       foreground memory)
  6364. SeeAlso: AH=48h,AH=4Ah
  6365. --------v-2183-------------------------------
  6366. INT 21 - VIRUS - "SVC" - INSTALLATION CHECK
  6367.     AH = 83h
  6368. Return: DX = 1990h if resident
  6369. SeeAlso: AH=76h,AH=84h"VIRUS"
  6370. --------v-2184-------------------------------
  6371. INT 21 - VIRUS - "SVC 5.0" or "SVC 6.0" - INSTALLATION CHECK
  6372.     AH = 84h
  6373. Return: DX = 1990h if resident
  6374.         BH = version number (major in high nybble, minor in low)
  6375. SeeAlso: AH=83h"VIRUS",AH=89h"VIRUS"
  6376. --------D-218400-----------------------------
  6377. INT 21 - European MS-DOS 4.0 - "CREATMEM" - CREATE A SHARED MEMORY AREA
  6378.     AX = 8400h
  6379.     BX = size in bytes (0000h = 65536)
  6380.     CX = flags
  6381.         bit 6: zero-initialize segment
  6382.     DS:DX -> ASCIZ name (must begin with "\SHAREMEM\")
  6383. Return: CF clear if successful
  6384.         AX = segment address of shared memory global object
  6385.     CF set on error
  6386.         AX = error code (06h,08h) (see AH=59h)
  6387. Desc:    create an area of memory which may be accessed by multiple processes
  6388. Notes:    shared memory objects are created as special files (thus the
  6389.       restriction on the name)
  6390.     on successful creation, the reference count is set to 1
  6391. SeeAlso: AX=8401h,AX=8402h,INT 15/AX=DE19h
  6392. --------D-218401-----------------------------
  6393. INT 21 - European MS-DOS 4.0 - "GETMEM" - OBTAIN ACCESS TO SHARED MEMORY AREA
  6394.     AX = 8401h
  6395.     CX = flags
  6396.         bit 7: writable segment (ignored by MS-DOS 4.0)
  6397.     DS:DX -> ASCIZ name (must begin with "\SHAREMEM\")
  6398. Return: CF clear if successful
  6399.         AX = segment address of shared memory global object
  6400.         CX = size in bytes
  6401.     CF set on error
  6402.         AX = error code (invalid name)
  6403. Desc:    get address of a previously-created area of memory which may be
  6404.       accessed by multiple processes
  6405. Note:    this call increments the reference count for the shared memory area
  6406. SeeAlso: AX=8400h,AX=8402h
  6407. --------D-218402-----------------------------
  6408. INT 21 - European MS-DOS 4.0 - "RELEASEMEM" - FREE SHARED MEMORY AREA
  6409.     AX = 8402h
  6410.     BX = handle (segment address of shared memory object)
  6411. Return: CF clear if successful
  6412.     CF set on error
  6413.         AX = error code (no such name)
  6414. Desc:    indicate that the specified area of shared memory will no longer be
  6415.       used by the caller
  6416. Note:    the reference count is decremented and the shared memory area is
  6417.       deallocated if the new reference count is zero
  6418. SeeAlso: AX=8400h,AX=8401h,INT 15/AX=DE19h
  6419. --------D-2185-------------------------------
  6420. INT 21 U - European MS-DOS 4.0 - ???
  6421.     AH = 85h
  6422.     ???
  6423. Return: ???
  6424. --------D-2186-------------------------------
  6425. INT 21 - European MS-DOS 4.0 - "SETFILETABLE" - INSTALL NEW FILE HANDLE TABLE
  6426.     AH = 86h
  6427.     BX = total number of file handles in new table
  6428. Return: CF clear if successful
  6429.     CF set on error
  6430.         AX = error code (06h,08h) (see AH=59h)
  6431. Desc:    adjust the size of the per-process open file table, thus raising or
  6432.       lowering the limit on the number of files the caller can open
  6433.       simultaneously
  6434. Notes:    any currently-open files are copied to the new table
  6435.     if the table is increased beyond the default 20 handles, only the
  6436.       first 20 will be inherited by child processes
  6437.     error 06h is returned if the requested number of handles exceeds
  6438.       system limits or would require closing currently-open files
  6439. SeeAlso: AH=26h,AH=67h
  6440. --------D-2187-------------------------------
  6441. INT 21 - European MS-DOS 4.0 - "GETPID" - GET PROCESS IDENTIFIER
  6442.     AH = 87h
  6443. Return: AX = PID
  6444.     BX = parent process's PID
  6445.     CX = Command Subgroup ID (CSID)
  6446. Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
  6447.       by several other European OEMs; its release falls between mainstream
  6448.       versions 3.2 and 3.3
  6449. Desc:    determine an identifier by which to access the calling process
  6450. Notes:    called by MS C v5.1 getpid() function
  6451.     this function apparently must return AX=0001h for INT 21/AH=80h to
  6452.       succeed
  6453.     one possible check for European MS-DOS 4.0 is to issue this call with
  6454.       AL=00h and check whether AL is nonzero on return
  6455. SeeAlso: AH=30h,AH=62h,AH=80h
  6456. Index:    installation check;European MS-DOS 4.0
  6457. --------D-2188-------------------------------
  6458. INT 21 U - European MS-DOS 4.0 - ???
  6459.     AH = 88h
  6460.     ???
  6461. Return: ???
  6462. SeeAlso: AH=87h
  6463. --------D-2189-------------------------------
  6464. INT 21 - European MS-DOS 4.0 - SLEEP
  6465.     AH = 89h
  6466.     CX = time in milliseconds or 0000h to give up time slice
  6467. Return: CF clear if successful
  6468.         CX = 0000h
  6469.     CF set on error
  6470.         AX = error code (interrupted system call)
  6471.         CX = sleep time remaining
  6472. Desc:    suspend the calling process for the specified duration
  6473. Notes:    the sleep interval is rounded up to the next higher increment of the
  6474.       scheduler clock, and may be extended further if other processes are
  6475.       running
  6476.     this call may be interrupted by signals (see AH=8Dh)
  6477.     reportedly called by Microsoft C 4.0 startup code
  6478.     background processes have higher priority than the foreground process,
  6479.       and should thus periodically yield the CPU
  6480. SeeAlso: AH=81h,INT 15/AX=1000h,INT 2F/AX=1680h,INT 7A/BX=000Ah
  6481. --------v-2189-------------------------------
  6482. INT 21 - VIRUS - "Vriest" - INSTALLATION CHECK
  6483.     AH = 89h
  6484. Return: AX = 0123h if resident
  6485. SeeAlso: AH=84h"VIRUS",AH=90h"VIRUS"
  6486. --------D-218A-------------------------------
  6487. INT 21 - European MS-DOS 4.0 - "CWAIT" - WAIT FOR CHILD TO TERMINATE
  6488.     AH = 8Ah
  6489.     BL = range (00h command subtree, 01h any child)
  6490.     BH = suspend flag
  6491.         00h suspend if children exist but none are dead
  6492.         01h return if no dead children
  6493.     CX = Process ID of head of command subtree
  6494. Return: CF clear if successful
  6495.         AH = termination type
  6496.         00h normal termination
  6497.         01h aborted by Control-C
  6498.         02h aborted by I/O error
  6499.         03h terminate and stay resident
  6500.         04h aborted by signal
  6501.         05h aborted by program error
  6502.         AL = return code from child or aborting signal
  6503.         BX = PID of child (0000h if no dead children)
  6504.     CF set on error
  6505.         AX = error code (no child,interrupted system call)
  6506. Desc:    get return code from an asynchronously-executed child program,
  6507.       optionally waiting if no return code is available
  6508. SeeAlso: AH=4Bh,AH=4Dh,AH=80h,AH=8Dh
  6509. --------D-218B-------------------------------
  6510. INT 21 U - European MS-DOS 4.0 - ???
  6511.     AH = 8Bh
  6512.     ???
  6513. Return: ???
  6514. SeeAlso: AH=87h
  6515. --------D-218C-------------------------------
  6516. INT 21 - European MS-DOS 4.0 - SET SIGNAL HANDLER
  6517.     AH = 8Ch
  6518.     AL = signal number (see below)
  6519.     BL = action (see below)
  6520.     DS:DX -> signal handler
  6521. Return: CF clear if successful
  6522.         AL = previous action
  6523.         ES:BX -> previous signal handler
  6524.     CF set on error
  6525.         AX = error code (01h,invalid SigNumber or Action) (see AH=59h)
  6526. Desc:    set the routine which will be invoked on a number of exceptional
  6527.       conditions
  6528. Note:    all signals will be sent to the most recently installed handler
  6529. SeeAlso: AH=8Dh
  6530.  
  6531. Values for signal number:
  6532.  01h    SIGINTR        Control-C or user defined interrupt key
  6533.  08h    SIGTERM        program termination
  6534.  09h    SIGPIPE        broken pipe
  6535.  0Dh    SIGUSER1    reserved for user definition
  6536.  0Eh    SIGUSER2    reserved for user definition
  6537.  
  6538. Values for signal action:
  6539.  00h    SIG_DFL        terminate process on receipt
  6540.  01h    SIG_IGN        ignore signal
  6541.  02h    SIG_GET        signal is accepted
  6542.  03h    SIG_ERR        sender gets error
  6543.  04h    SIG_ACK        acknowledge received signal and clear it, but don't
  6544.             change current setting
  6545.  
  6546. Signal handler is called with:
  6547.     AL = signal number
  6548.     AH = signal argument
  6549. Return: RETF, CF set: terminate process
  6550.     RETF, CF clear, ZF set: abort any interrupted system call with an error
  6551.     RETF, CF clear, ZF clear: restart any interrupted system call
  6552.     IRET: restart any interrupted system call
  6553. Note:    the signal handler may also perform a nonlocal GOTO by resetting the
  6554.       stack pointer and jumping; before doing so, it should dismiss the
  6555.       signal by calling this function with BL=04h
  6556. --------D-218D-------------------------------
  6557. INT 21 - European MS-DOS 4.0 - SEND SIGNAL
  6558.     AH = 8Dh
  6559.     AL = signal number (see AH=8Ch)
  6560.     BH = signal argument
  6561.     BL = action
  6562.         00h send to entire command subtree
  6563.         01h send only to specified process
  6564.     DX = Process ID
  6565. Return: CF clear if successful
  6566.     CF set on error
  6567.         AX = error code (01h,06h)(see AH=59h)
  6568. Desc:    invoke the exceptional-condition handler for the specified process
  6569. Note:    error 06h may be returned if one or more of the affected processes
  6570.       have an error handler for the signal
  6571. SeeAlso: AH=8Ch
  6572. --------D-218E00BH00-------------------------
  6573. INT 21 - European MS-DOS 4.0 - "SETPRI" - GET/SET PROCESS PRIORITY
  6574.     AX = 8E00h
  6575.     BH = 00h
  6576.     BL = action
  6577.         00h set priority for command subtree
  6578.         01h set priority for specified process only
  6579.     CX = Process ID
  6580.     DH = 00h
  6581.     DL = change in priority (00h to get priority)
  6582. Return: CF clear if successful
  6583.         DL = process priority
  6584.         DH destroyed
  6585.     CF set on error
  6586.         AX = error code (01h,no such process)(see AH=59h)
  6587. Desc:    specify or determine the execution priority of the specified process
  6588.       or the process and all of its children
  6589. SeeAlso: AH=81h
  6590. --------D-218F-------------------------------
  6591. INT 21 U - European MS-DOS 4.0 - ???
  6592.     AH = 8Fh
  6593.     ???
  6594. Return: ???
  6595. SeeAlso: AH=87h
  6596. --------D-2190-------------------------------
  6597. INT 21 U - European MS-DOS 4.0 - ???
  6598.     AH = 90h
  6599.     ???
  6600. Return: ???
  6601. SeeAlso: AH=87h
  6602. --------v-2190-------------------------------
  6603. INT 21 - VIRUS - "Carioca" - INSTALLATION CHECK
  6604.     AH = 90h
  6605. Return: AH = 01h if resident
  6606. SeeAlso: AH=89h"VIRUS",AX=9753h"VIRUS"
  6607. --------D-2191-------------------------------
  6608. INT 21 U - European MS-DOS 4.0 - ???
  6609.     AH = 91h
  6610.     ???
  6611. Return: ???
  6612. SeeAlso: AH=87h
  6613. --------D-2192-------------------------------
  6614. INT 21 U - European MS-DOS 4.0 - ???
  6615.     AH = 92h
  6616.     ???
  6617. Return: ???
  6618. SeeAlso: AH=87h
  6619. --------D-2193-------------------------------
  6620. INT 21 - European MS-DOS 4.0 - "PIPE" - CREATE A NEW PIPE
  6621.     AH = 93h
  6622.     CX = size in bytes
  6623. Return: CF clear if successful
  6624.         AX = read handle
  6625.         BX = write handle
  6626.     CF set on error
  6627.         AX = error code (08h) (see AH=59h)
  6628. Desc:    create a communications channel which may be used for interprocess
  6629.       data and command exchanges
  6630. SeeAlso: AH=3Ch,AH=3Fh,AH=40h,AH=84h
  6631. --------D-2194-------------------------------
  6632. INT 21 U - European MS-DOS 4.0 - ???
  6633.     AH = 94h
  6634.     ???
  6635. Return: ???
  6636. SeeAlso: AH=87h
  6637. --------D-2195-------------------------------
  6638. INT 21 - European MS-DOS 4.0 - HARD ERROR PROCESSING
  6639.     AH = 95h
  6640.     AL = new state
  6641.        00h enabled
  6642.        01h disabled, automatically fail hard errors
  6643. Return: AX = previous setting
  6644. Desc:    specify whether hard (critical) errors should automatically fail the
  6645.       system call or invoke an INT 24
  6646. SeeAlso: INT 24
  6647. --------D-2196-------------------------------
  6648. INT 21 U - European MS-DOS 4.0 - ???
  6649.     AH = 96h
  6650.     ???
  6651. Return: ???
  6652. --------D-2197-------------------------------
  6653. INT 21 U - European MS-DOS 4.0 - ???
  6654.     AH = 97h
  6655.     ???
  6656. Return: ???
  6657. --------v-219753-----------------------------
  6658. INT 21 - VIRUS - "Nina" - INSTALLATION CHECK
  6659.     AX = 9753h
  6660. Return: never (executes original program) if virus resident
  6661. SeeAlso: AH=90h"VIRUS",AX=A1D5h"VIRUS"
  6662. --------D-2198-------------------------------
  6663. INT 21 U - European MS-DOS 4.0 - ???
  6664.     AH = 98h
  6665.     ???
  6666. Return: ???
  6667. --------D-2199-------------------------------
  6668. INT 21 u - European MS-DOS 4.0 - "PBLOCK" - BLOCK A PROCESS
  6669.     AH = 99h
  6670.     DS:BX -> memory location to block on
  6671.     CX = timeout in milliseconds
  6672.     DH = nonzero if interruptable
  6673. Return: CF clear if awakened by event
  6674.         AX = 0000h
  6675.     CF set if unusual wakeup
  6676.         ZF set if timeout, clear if interrupted by signal
  6677.         AX = nonzero
  6678. Desc:    suspend calling process until another process sends a "restart" signal
  6679.       or a timeout occurs
  6680. SeeAlso: AH=9Ah,INT 2F/AX=0802h
  6681. --------D-219A-------------------------------
  6682. INT 21 u - European MS-DOS 4.0 - "PRUN" - UNBLOCK A PROCESS
  6683.     AH = 9Ah
  6684.     DS:BX -> memory location processes may have blocked on
  6685. Return: AX = number of processes awakened
  6686.     ZF set if no processes awakened
  6687. Program: European MS-DOS 4.0 was written for Siemens in Germany and then used
  6688.       by several other European OEMs; its release falls between mainstream
  6689.       versions 3.2 and 3.3
  6690. Desc:    restart all processes waiting for the specified "restart" signal
  6691. SeeAlso: AH=99h,INT 2F/AX=0802h
  6692. --------I-21A0-------------------------------
  6693. INT 21 - Attachmate Extra - GET 3270 DISPLAY STATE
  6694.     AH = A0h
  6695. Return: AL = display status (see below)
  6696.     BX = host window status (see below)
  6697. Program: Attachmate Extra is a 3270 emulator by Attachmate Corporation
  6698. SeeAlso: AH=A1h
  6699.  
  6700. Bitfields for display status:
  6701. Bit(s)    Description
  6702.  7    0=windowed, 1=enlarged
  6703.  6-3    current screen profile number 0-9
  6704.  2-0    active window number (0=PC, 1-4=host B-E, 5-6=notepad F-G)
  6705.  
  6706. Bitfields for host window status:
  6707. Bit(s)    Description
  6708.  15    reserved
  6709.  14    0=host E window installed, 1=not
  6710.  13    0=host E terminal on, 1=off
  6711.  12    0=host E window displayed, 1=not
  6712.  11    reserved
  6713.  10    0=host D window installed, 1=not
  6714.  9    0=host D terminal on, 1=off
  6715.  8    0=host D window displayed, 1=not
  6716.  7    reserved
  6717.  6    0=host C window installed, 1=not
  6718.  5    0=host C terminal on, 1=off
  6719.  4    0=host C window displayed, 1=not
  6720.  3    reserved
  6721.  2    0=host B window installed, 1=not
  6722.  1    0=host B terminal on, 1=off
  6723.  0    0=host B window displayed, 1=not
  6724. --------I-21A1-------------------------------
  6725. INT 21 - Attachmate Extra - SET 3270 DISPLAY STATE
  6726.     AH = A1h
  6727.     AL = new display status byte (see AH=A0h)
  6728. SeeAlso: AH=A0h,AH=A2h
  6729. --------v-21A1D5-----------------------------
  6730. INT 21 - VIRUS - "789"/"Filehider" - INSTALLATION CHECK
  6731.     AX = A1D5h
  6732. Return: AX = 900Dh if resident
  6733. SeeAlso: AX=9753h,AX=A55Ah
  6734. --------I-21A2-------------------------------
  6735. INT 21 - Attachmate Extra - SET HOST WINDOW STATE
  6736.     AH = A2h
  6737.     AL = new host window status byte (see below)
  6738. SeeAlso: AH=A1h
  6739.  
  6740. Bitfields for host window status:
  6741. Bit(s)    Description
  6742.  7    0=power off, 1=power on
  6743.  6    0=not installed, 1=installed
  6744.  5-3    reserved
  6745.  2-0    window number 1-4=host B-E
  6746. --------I-21A3-------------------------------
  6747. INT 21 - Attachmate Extra - SEND KEYSTROKES TO HOST WINDOW
  6748.     AH = A3h
  6749.     AL = window number (1-4=host B-E)
  6750.     CX = 0001h
  6751.     DS:BX -> keystroke buffer
  6752.     DL = zero if keystroke buffer contains host function code,
  6753.          non-zero if keystroke buffer contains ASCII character
  6754. Return: CX = zero if character sent, non-zero if not
  6755.     BX incremented if CX=0
  6756.  
  6757. Values for host function code:
  6758.  00h=reserved    10h=PF16    20h=Clear    30h=SysRq
  6759.  01h=PF1    11h=PF17    21h=Print    31h=ErInp
  6760.  02h=PF2    12h=PF18    22h=Left    32h=ErEof
  6761.  03h=PF3    13h=PF19    23h=Right    33h=Ident
  6762.  04h=PF4    14h=PF20    24h=Up        34h=Test
  6763.  05h=PF5    15h=PF21    25h=Down    35h=Reset
  6764.  06h=PF6    16h=PF22    26h=Home    36h=DevCncl
  6765.  07h=PF7    17h=PF23    27h=Fast Left    37h=Dup
  6766.  08h=PF8    18h=PF24    28h=Fast Right    38h=FldMark
  6767.  09h=PF9    19h=Alt on    29h=Bksp    39h=Enter
  6768.  0Ah=PF10    1Ah=Alt off    2Ah=Insert    3Ah=CrSel
  6769.  0Bh=PF11    1Bh=Shift on    2Bh=Delete
  6770.  0Ch=PF12    1Ch=Shift off    2Ch=Backtab
  6771.  0Dh=PF13    1Dh=PA1        2Dh=Tab
  6772.  0Eh=PF14    1Eh=PA2        2Eh=Newline
  6773.  0Fh=PF15    1Fh=PA3        2Fh=Attn
  6774. --------I-21A4-------------------------------
  6775. INT 21 - Attachmate Extra - GET HOST WINDOW BUFFER ADDRESS
  6776.     AH = A4h
  6777.     AL = window number (1-4=host B-E)
  6778. Return: DS:BX -> 3270 display buffer
  6779. SeeAlso: AH=A5h,AH=B8h
  6780. --------I-21A5-------------------------------
  6781. INT 21 - Attachmate Extra - GET HOST WINDOW CURSOR POSITION
  6782.     AH = A5h
  6783.     AL = window number (1-4=host B-E)
  6784. Return: BX = cursor position (80 * row + column, where 0:0 is upper left)
  6785. Note:    if the host window is configured with the Extended Attribute (EAB)
  6786.       feature, multiply the cursor position by 2 to obtain the byte offset
  6787.       into the display buffer
  6788. SeeAlso: AH=A4h
  6789. --------v-21A55A-----------------------------
  6790. INT 21 - VIRUS - "Eddie-2" - INSTALLATION CHECK
  6791.     AX = A55Ah
  6792. Return: AX = 5AA5h if resident
  6793. SeeAlso: AX=A1D5h,AX=AA00h
  6794. --------v-21AA00-----------------------------
  6795. INT 21 - VIRUS - "Blinker" - INSTALLATION CHECK
  6796.     AX = AA00h
  6797. Return: AX = 00AAh if resident
  6798. SeeAlso: AX=A55Ah,AX=AA03h
  6799. --------v-21AA03-----------------------------
  6800. INT 21 - VIRUS - "Backtime" - INSTALLATION CHECK
  6801.     AX = AA03h
  6802. Return: AX = 03AAh if resident
  6803. SeeAlso: AX=AA00h,AH=ABh
  6804. --------v-21AB-------------------------------
  6805. INT 21 - VIRUS - "600" or "Voronezh"-family - INSTALLATION CHECK
  6806.     AH = ABh
  6807. Return: AX = 5555h if resident
  6808. SeeAlso: AX=AA03h,AX=BBBBh"VIRUS"
  6809. --------I-21AF-------------------------------
  6810. INT 21 - Attachmate Extra - GET TRANSLATE TABLE ADDRESS
  6811.     AH = AFh
  6812. Return: DS:BX -> translate tables (see below)
  6813.  
  6814. Format of translate tables:
  6815. Offset    Size    Description
  6816.  00h 256 BYTEs    ASCII to 3270 buffer code translate table
  6817. 100h 256 BYTEs    3270 buffer code to ASCII translate table
  6818. 200h 256 BYTEs    3270 buffer code to EBCDIC translate table
  6819. 300h 256 BYTEs    EBCDIC to 3270 buffer code translate table
  6820. --------N-21B3-------------------------------
  6821. INT 21 U - Novell NetWare - DOS Requester v1.03+ - ???
  6822.     AH = B3h
  6823.     ???
  6824. Return: ???
  6825. --------N-21B4-------------------------------
  6826. INT 21 U - Novell NetWare - "AttachHandle"
  6827.     AH = B4h
  6828.     DS:SI -> input buffer (see below)
  6829. Return: AX = handle or return code
  6830. Note:    this is an interface provided by NetWare to give DOS file access to
  6831.       NetWare files on non-DOS systems such as Macintosh, OS/2, and Unix
  6832.  
  6833. Format of input buffer:
  6834. Offset    Size    Description
  6835.  00h    BYTE    "WorkFileServer"
  6836.  01h    BYTE    access code
  6837.  02h    DWORD    "OpenHandle"
  6838.  06h    WORD    "OpenHandleCount"
  6839.  08h    DWORD    "OpenFileSize"
  6840. --------N-21B500-----------------------------
  6841. INT 21 U - Novell NetWare - VNETWARE.386 API - GET INSTANCE DATA
  6842.     AX = B500h
  6843. Return: ES:BX -> data
  6844.     CX = length
  6845. SeeAlso: AX=B501h,AX=B502h
  6846. --------N-21B501-----------------------------
  6847. INT 21 U - Novell NetWare - VNETWARE.386 API - END VIRTUAL MACHINE
  6848.     AX = B501h
  6849. SeeAlso: AX=B500h,AX=B502h
  6850. --------N-21B502-----------------------------
  6851. INT 21 U - Novell NetWare - VNETWARE.386 API - START VIRTUAL MACHINE
  6852.     AX = B502h
  6853. SeeAlso: AX=B500h,AX=B501h
  6854. --------N-21B5-------------------------------
  6855. INT 21 - Novell NetWare shell 3.01 - TASK MODE CONTROL
  6856.     AH = B5h
  6857.     AL = subfunction
  6858.         03h get task mode
  6859.         Return: AH = 00h
  6860.             AL = current task mode byte
  6861.         04h get task mode pointer
  6862.         Return: ES:BX -> task mode byte
  6863. Notes:    the task mode byte specifies how task cleanup should be performed, but
  6864.       is declared to be version-dependent
  6865.     allows a program to disable the automatic cleanup for programs managing
  6866.       task swapping, etc.
  6867.  
  6868. Values for task mode byte in version 3.01:
  6869.  00h-03h reserved
  6870.  04h     no task cleanup
  6871. --------N-21B505-----------------------------
  6872. INT 21 U - Novell NetWare - VNETWARE.386 API - SET VIRTUAL MACHINE ID
  6873.     AX = B505h
  6874.     ???
  6875. Return: ???
  6876. SeeAlso: AX=B502h,AX=B506h
  6877. --------N-21B506-----------------------------
  6878. INT 21 U - Novell NetWare - VNETWARE.386 API - GET VIRTUAL MACH SUPPORT LEVEL
  6879.     AX = B506h
  6880. Return: AX = ??? (0002h)
  6881. SeeAlso: AX=B505h
  6882. --------N-21B6-------------------------------
  6883. INT 21 - Novell NetWare - FILE SERVICES - EXTENDED FILE ATTRIBUTES
  6884.     AH = B6h
  6885.     AL = subfunction
  6886.         00h get extended file attributes
  6887.         01h set extended file attributes
  6888.         CL = extended file attributes (see below)
  6889.     DS:DX -> ASCIZ pathname (max 255 bytes)
  6890. Return: CF set on error
  6891.         AL = error code
  6892.         8Ch caller lacks privileges
  6893.         FEh not permitted to search directory
  6894.         FFh file not found
  6895.     CF clear if successful
  6896.         AL = 00h (success)
  6897.         CL = current extended file attributes (see below)
  6898. Note:    this function is supported by Advanced NetWare 2.1+
  6899. SeeAlso: AX=4300h,AH=E3h/SF=0Fh
  6900.  
  6901. Bitfields for extended file attributes:
  6902. Bit(s)    Description
  6903.  2-0    search mode (executables only)
  6904.     000 none (use shell's default search)
  6905.     001 search on all opens without path
  6906.     010 do not search
  6907.     011 search on read-only opens without path
  6908.     100 reserved
  6909.     101 search on all opens
  6910.     110 reserved
  6911.     111 search on all read-only opens
  6912.  3    reserved
  6913.  4    transactions on file tracked
  6914.  5    file's FAT indexed
  6915.  6    read audit (to be implemented)
  6916.  7    write audit (to be implemented)
  6917. --------N-21B7-------------------------------
  6918. INT 21 U - Novell NetWare - "HoldFileModeSet" (obsolete)
  6919.     AH = B7h
  6920.     AL = new value for HoldFileFlag
  6921. Return: AL = previous value of HoldFileFlag
  6922. Note:    this function provided backward compatibility with a bug in early
  6923.       DOS versions and CP/M, but is no longer used or supported
  6924. --------I-21B8-------------------------------
  6925. INT 21 - Attachmate Extra - DISABLE HOST BUFFER UPDATES
  6926.     AH = B8h
  6927.     AL = window number (1-4=host B-E)
  6928.     DL = 01h
  6929. Notes:    only valid in CUT mode
  6930.     next AID keystroke (eg Enter) enables host buffer updates
  6931. SeeAlso: AH=A4h
  6932. --------N-21B800-----------------------------
  6933. INT 21 - Novell NetWare - PRINT SERVICES - GET DEFAULT CAPTURE FLAGS
  6934.     AX = B800h
  6935.     CX = size of reply buffer (01h-3Fh)
  6936.     ES:BX -> reply buffer for capture flags table (see below)
  6937. Return: AL = status
  6938.         00h successful
  6939. Note:    this function is supported by Advanced NetWare 2.0+
  6940. SeeAlso: AX=B801h,AX=B802h,AH=DFh/DL=00h,AH=DFh/DL=04h
  6941.  
  6942. Format of capture flags table:
  6943. Offset    Size    Description
  6944.  00h    BYTE    status (used internally, should be set to 00h)
  6945.  01h    BYTE    print flags
  6946.         bit 2: print capture file if interrupted by loss of connection
  6947.         bit 3: no automatic form feed after print job
  6948.         bit 6: printing control sequences interpreted by print service
  6949.         bit 7: print banner page before capture file
  6950.  02h    BYTE    tab size (01h-12h, default 08h)
  6951.  03h    BYTE    printer number on server (00h-04h, default 00h)
  6952.  04h    BYTE    number of copies to print (00h-FFh, default 01h)
  6953.  05h    BYTE    form type required in printer (default 00h)
  6954.  06h    BYTE    reserved
  6955.  07h 13 BYTEs    text to be placed on banner page
  6956.  14h    BYTE    reserved
  6957.  15h    BYTE    default local printer (00h = LPT1)
  6958.  16h    WORD    (big-endian) timeout in clock ticks for flushing capture file
  6959.         on inactivity, or 0000h to disable timeout
  6960.  18h    BYTE    flush capture file on LPT close if nonzero
  6961.  19h    WORD    (big-endian) maximum lines per page
  6962.  1Bh    WORD    (big-endian) maximum characters per line
  6963.  1Dh 13 BYTEs    name of form required in printer
  6964.  2Ah    BYTE    LPT capture flag
  6965.         00h inactive, FFh LPT device is being captured
  6966.  2Bh    BYTE    file capture flag
  6967.         00h if no file specified, FFh if capturing to file
  6968.  2Ch    BYTE    timing out (00h if no timeout in effect, FFh if timeout counter
  6969.         running)
  6970.  2Dh    DWORD    (big-endian) address of printer setup string
  6971.  31h    DWORD    (big-endian) address of printer reset string
  6972.  35h    BYTE    target connection ID
  6973.  36h    BYTE    capture in progress if FFh
  6974.  37h    BYTE    job queued for printing if FFh
  6975.  38h    BYTE    print job valid if FFh
  6976.  39h    DWORD    bindery object ID of print queue if previous byte FFh
  6977.  3Dh    WORD    (big-endian) print job number (1-999)
  6978. --------N-21B801-----------------------------
  6979. INT 21 - Novell NetWare - PRINT SERVICES - SET DEFAULT CAPTURE FLAGS
  6980.     AX = B801h
  6981.     CX = size of buffer (01h-3Fh)
  6982.     ES:BX -> buffer containing capture flags table (see below)
  6983. Return: AL = status
  6984.         00h successful
  6985. Note:    this function is supported by Advanced NetWare 2.0+
  6986. SeeAlso: AX=B800h,AX=B803h,AH=DFh/DL=00h,AH=DFh/DL=04h
  6987. --------N-21B802-----------------------------
  6988. INT 21 - Novell NetWare - PRINT SERVICES - GET SPECIFIC CAPTURE FLAGS
  6989.     AX = B802h
  6990.     CX = size of reply buffer (01h-3Fh)
  6991.     DH = LPT port (00h-02h)
  6992.     ES:BX -> reply buffer for capture flags table (see AX=B800h)
  6993. Return: AL = status
  6994.         00h successful
  6995. Note:    this function is supported by Advanced NetWare 2.1+
  6996. SeeAlso: AX=B800h,AX=B803h,AH=DFh/DL=00h,AH=DFh/DL=04h
  6997. --------N-21B803-----------------------------
  6998. INT 21 - Novell NetWare - PRINT SERVICES - SET SPECIFIC CAPTURE FLAGS
  6999.     AX = B803h
  7000.     CX = size of buffer (01h-3Fh)
  7001.     DH = LPT port (00h-02h)
  7002.     ES:BX -> buffer containing capture flags table (see below)
  7003. Return: AL = status
  7004.         00h successful
  7005. Note:    this function is supported by Advanced NetWare 2.1+
  7006. SeeAlso: AX=B800h,AX=B803h,AH=DFh/DL=00h,AH=DFh/DL=04h
  7007. --------N-21B804-----------------------------
  7008. INT 21 - Novell NetWare - PRINT SERVICES - GET DEFAULT LOCAL PRINTER
  7009.     AX = B804h
  7010. Return: DH = default LPT port (00h-02h)
  7011. Note:    this function is supported by Advanced NetWare 2.1+
  7012. SeeAlso: AX=B800h,AX=B805h,AH=DFh/DL=00h
  7013. --------N-21B805-----------------------------
  7014. INT 21 - Novell NetWare - PRINT SERVICES - SET DEFAULT LOCAL PRINTER
  7015.     AX = B805h
  7016.     DH = new default LPT port (00h-02h)
  7017. Return: AL = status
  7018.         00h successful
  7019. Note:    this function is supported by Advanced NetWare 2.1+
  7020. SeeAlso: AX=B800h,AX=B804h,AH=DFh/DL=00h
  7021. --------N-21B806-----------------------------
  7022. INT 21 - Novell NetWare - PRINT SERVICES - SET CAPTURE PRINT QUEUE
  7023.     AX = B806h
  7024.     DH = LPT port (00h-02h)
  7025.     BX:CX = print queue's object ID
  7026. Return: AL = status
  7027.         00h successful
  7028.         FFh job already set
  7029. Desc:    specify the print queue on which a print job is to be placed the next
  7030.       time a capture is started on the given printer port
  7031. Note:    this function is supported by Advanced NetWare 2.1+
  7032. SeeAlso: AX=B801h,AX=B807h,AX=E009h
  7033. --------N-21B807-----------------------------
  7034. INT 21 - Novell NetWare - PRINT SERVICES - SET CAPTURE PRINT JOB
  7035.     AX = B807h
  7036.     DH = LPT port (00h-02h)
  7037.     BX = job number (see AH=E3h/SF=68h)
  7038.     SI:DI:CX = NetWare file handle (see AH=E3h/SF=68h)
  7039. Return: AL = status
  7040.         00h successful
  7041.         FFh job already queued
  7042. Desc:    specify the capture file and print job to be used for subsequent
  7043.       output to the given printer port
  7044. Note:    this function is supported by Advanced NetWare 2.1+
  7045. SeeAlso: AX=B801h,AX=B806h,AX=E009h,AH=E3h/SF=68h
  7046. --------N-21B808-----------------------------
  7047. INT 21 - Novell NetWare - PRINT SERVICES - GET BANNER USER NAME
  7048.     AX = B808h
  7049.     ES:BX -> 12-byte buffer for user name
  7050. Return: AL = status
  7051.         00h successful
  7052. Desc:    get the user name which is printed on the banner page
  7053. Notes:    this function is supported by Advanced NetWare 2.1+
  7054.     the default name is the login name of the user
  7055. SeeAlso: AX=B809h
  7056. --------N-21B809-----------------------------
  7057. INT 21 - Novell NetWare - PRINT SERVICES - SET BANNER USER NAME
  7058.     AX = B809h
  7059.     ES:BX -> 12-byte buffer containing user name
  7060. Return: AL = status
  7061.         00h successful
  7062. Desc:    specify the user name which is printed on the banner page
  7063. Notes:    this function is supported by Advanced NetWare 2.1+
  7064.     the default name is the login name of the user
  7065. SeeAlso: AX=B808h
  7066. --------N-21B9-------------------------------
  7067. INT 21 U - Novell NetWare - "SpecialAttachableFunction"
  7068.     AH = B9h
  7069.     AL = FFh to hook this function
  7070.         ES:BX -> function to invoke on AH=B9h when AL<>FFh
  7071. Note:    this function is no longer used or supported by current versions of
  7072.       NetWare
  7073. --------N-21BA-------------------------------
  7074. INT 21 U - Novell NetWare - "ReturnCommandComPointers"
  7075.     AH = BAh
  7076. Return: DX = environment segment
  7077.     ES:DI -> COMMAND.COM drive
  7078. Desc:    used to edit the COMSPEC and PATH variables in the master environment
  7079.       when mapping network drives
  7080. Note:    this function was documented in older Novell documents which are no
  7081.       longer available
  7082. --------N-21BB-------------------------------
  7083. INT 21 - Novell NetWare - WORKSTATION - SET END OF JOB STATUS
  7084.     AH = BBh
  7085.     AL = new EOJ flag
  7086.         00h disable EOJs
  7087.         01h enable EOJs
  7088. Return: AL = old EOJ flag
  7089. Desc:    specify whether the network shell should automatically generate an
  7090.       End of Job call when the root command processor regains control
  7091. Note:    this function is supported by NetWare 4.0+, Advanced NetWare 1.0+, and
  7092.       Alloy NTNX
  7093. SeeAlso: AH=19h,AH=D6h
  7094. --------v-21BBBB-----------------------------
  7095. INT 21 - VIRUS - "Hey You" - INSTALLATION CHECK
  7096.     AX = BBBBh
  7097. Return: AX = 6969h
  7098. SeeAlso: AH=ABh"VIRUS",AH=BEh"VIRUS"
  7099. --------N-21BC-------------------------------
  7100. INT 21 - Novell NetWare - SYNCHRONIZATION SERVICES - LOG PHYSICAL RECORD
  7101.     AH = BCh
  7102.     AL = flags
  7103.         bit 0: lock as well as log record
  7104.         bit 1: non-exclusive lock
  7105.     BX = file handle
  7106.     CX:DX = starting offset in file
  7107.     SI:DI = length of region to lock
  7108.     BP = timeout in timer ticks (1/18 sec)
  7109.         0000h = don't wait if already locked
  7110. Return: AL = status
  7111.         00h successful
  7112.         96h no dynamic memory for file
  7113.         FEh timed out
  7114.         FFh failed
  7115. Desc:    add the specified physical record to the log table, optionally locking
  7116.       it
  7117. Note:    this function is supported by NetWare 4.6+, Advanced NetWare 1.0+, and
  7118.       Alloy NTNX
  7119. SeeAlso: AH=5Ch,AH=BDh,AH=BEh,AH=BFh,AH=C2h,AH=D0h
  7120. --------N-21BD-------------------------------
  7121. INT 21 - Novell NetWare - SYNCHRONIZATION SERVICES - RELEASE PHYSICAL RECORD
  7122.     AH = BDh
  7123.     BX = file handle
  7124.     CX:DX = starting offset in file
  7125.     SI:DI = length of record
  7126. Return: AL = status
  7127.         00h successful
  7128.         FFh record not locked
  7129. Desc:    unlock the specified physical record but do not remove it from log
  7130.       table
  7131. Note:    this function is supported by NetWare 4.6+, Advanced NetWare 1.0+, and
  7132.       Alloy NTNX
  7133. SeeAlso: AH=BCh,AH=BEh"NetWare",AH=C0h,AH=C3h,AH=D2h
  7134. --------N-21BE-------------------------------
  7135. INT 21 - Novell NetWare - SYNCHRONIZATION SERVICES - CLEAR PHYSICAL RECORD
  7136.     AH = BEh
  7137.     BX = file handle
  7138.     CX:DX = starting offset within file
  7139.     SI:DI = record length in bytes
  7140. Return: AL = status
  7141.         00h successful
  7142.         FFh specified record not locked
  7143. Desc:    unlock the physical record and remove it from the log table
  7144. Note:    this function is supported by NetWare 4.6+, Advanced NetWare 1.0+, and
  7145.       Alloy NTNX
  7146. SeeAlso: AH=5Ch,AH=BCh,AH=BDh,AH=C1h,AH=C4h,AH=D4h
  7147. --------v-21BE-------------------------------
  7148. INT 21 - VIRUS - "Datalock" - INSTALLATION CHECK
  7149.     AH = BEh
  7150. Return: AX = 1234h if resident
  7151. SeeAlso: AX=BBBBh,AX=BE00h
  7152. --------v-21BE00-----------------------------
  7153. INT 21 - VIRUS - "USSR-1049" - INSTALLATION CHECK
  7154.     AX = BE00h
  7155.     CF set
  7156. Return: CF clear if resident
  7157. SeeAlso: AH=BEh"VIRUS",AH=C0h"VIRUS"
  7158. --------N-21BF-------------------------------
  7159. INT 21 O - Novell NetWare, Alloy NTNX - LOG/LOCK RECORD (FCB)
  7160.     AH = BFh
  7161.     AL = flags
  7162.         bit 0: lock as well as log record
  7163.         bit 1: non-exclusive lock
  7164.     DS:DX -> opened FCB (see AH=0Fh)
  7165.     BX:CX = offset
  7166.     BP = lock timeout in timer ticks (1/18 sec) if AL nonzero
  7167.     SI:DI = length
  7168. Return: AL = error code (see AH=BCh)
  7169. Note:    this function was added in NetWare 4.6, but was removed some time prior
  7170.       to Advanced NetWare 2.15, and is no longer listed in current Novell
  7171.       documentation
  7172. SeeAlso: AH=BCh,AH=C0h"NetWare",AH=C2h"NetWare"
  7173. --------!------------------------------------
  7174.