home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / docum / hadware.doc / chapter.005 < prev    next >
Encoding:
Text File  |  1992-03-15  |  117.1 KB  |  2,913 lines

  1.                                     -131-
  2.  
  3.    **  Programmer's  Technical    Reference  for    MSDOS  and  the  IBM  PC **
  4. ─────────────────────────┤ Registered User Version ├───────────────────────────
  5.              not for public distribution
  6.          Copyright (c) 1987, 1988, 1989 Dave Williams
  7.  
  8.  
  9.                 C H A P T E R   F I V E
  10.  
  11.  
  12.               Interrupts 22h Through 86h
  13.  
  14.  
  15.                 C O N T E N T S
  16.  
  17. Interrupt 22h    Terminate Address ..................................... 5**1
  18. Interrupt 23h    Ctrl-Break Exit Address ............................... 5**2
  19. Interrupt 24h    Critical Error Handler ................................ 5**3
  20. Interrupt 25h    Absolute Disk Read .................................... 5**4
  21. Interrupt 26h    Absolute Disk Write ................................... 5**5
  22. Interrupt 27h    Terminate And Stay Resident ........................... 5**6
  23. Interrupt 28h    DOS Idle Interrupt .................................... 5**7
  24. Interrupt 29h    Fast Screen Write ..................................... 5**8
  25. Interrupt 2Ah    Microsoft Networks - Session Layer Interrupt .......... 5**9
  26. Interrupt 2Bh    Unknown ............................................... 5**10
  27. Interrupt 2Ch    Unknown ............................................... 5**11
  28. Interrupt 2Dh    Unknown ............................................... 5**12
  29. Interrupt 2Eh    Alternate EXEC (DOS 2.0+) ............................. 5**13
  30. Interrupt 2Fh    Multiplex Interrupt ................................... 5**14
  31. Interrupt 30h    FAR jump instruction for CP/M-style calls ............. 5**15
  32. Interrupt 31h    Unknown ............................................... 5**16
  33. Interrupt 32h    Unknown ............................................... 5**17
  34. Interrupt 33h    Used by Microsoft Mouse Driver Function Calls ......... 5**18
  35. Interrupt 34h    Turbo C/Microsoft languages - Floating Point emulation    5**19
  36. Interrupt 35h    Turbo C/Microsoft languages - Floating Point emulation    5**20
  37. Interrupt 36h    Turbo C/Microsoft languages - Floating Point emulation    5**21
  38. Interrupt 37h    Turbo C/Microsoft languages - Floating Point emulation    5**22
  39. Interrupt 38h    Turbo C/Microsoft languages - Floating Point emulation    5**23
  40. Interrupt 39h    Turbo C/Microsoft languages - Floating Point emulation    5**24
  41. Interrupt 3Ah    Turbo C/Microsoft languages - Floating Point emulation    5**25
  42. Interrupt 3Bh    Turbo C/Microsoft languages - Floating Point emulation    5**26
  43. Interrupt 3Ch    Turbo C/Microsoft languages - Floating Point emulation    5**27
  44. Interrupt 3Dh    Turbo C/Microsoft languages - Floating Point emulation    5**28
  45. Interrupt 3Eh    Turbo C/Microsoft languages - Floating Point emulation    5**29
  46. Interrupt 3Fh    Overlay manager interrupt (Microsoft LINK.EXE) ........ 5**30
  47. Interrupt 40h    Hard Disk BIOS ........................................ 5**31
  48. Interrupt 41h    Hard Disk Parameters .................................. 5**32
  49. Interrupt 42h    Pointer to screen BIOS entry .......................... 5**33
  50. Interrupt 43h    Pointer to EGA graphics character table ............... 5**34
  51. Interrupt 44h    Pointer to graphics character table ................... 5**35
  52. Interrupt 45h    Reserved by IBM  (not initialized) .................... 5**36
  53. Interrupt 46h    Pointer to second hard disk parameter block ........... 5**37
  54. Interrupt 47h    Reserved by IBM  (not initialized) .................... 5**38
  55. Interrupt 48h    Cordless Keyboard Translation ......................... 5**39
  56. Interrupt 49h    Non-keyboard Scan Code Translation Table Address (PCjr) 5**40
  57. Interrupt 4Ah    Real-Time Clock Alarm (Convertible, PS/2) ............. 5**41
  58. Interrupt 4Bh    Reserved by IBM  (not initialized) .................... 5**42
  59. Interrupt 4Ch    Reserved by IBM  (not initialized) .................... 5**43
  60. Interrupt 4Dh    Reserved by IBM  (not initialized) .................... 5**44
  61. Interrupt 4Eh    Reserved by IBM  (not initialized) .................... 5**45
  62. Interrupt 4Fh    Reserved by IBM  (not initialized) .................... 5**46
  63. Interrupt 50-57 IRQ0-IRQ7 Relocation .................................. 5**47
  64. Interrupt 58h    Reserved by IBM  (not initialized) .................... 5**48
  65. Interrupt 59h    Reserved by IBM  (not initialized) .................... 5**49
  66. Interrupt 5Ah    Reserved by IBM  (not initialized)  ................... 5**50
  67.  
  68.                                     -132-
  69.  
  70. Interrupt 5Bh    Reserved by IBM  (not initialized) .................... 5**51
  71. Interrupt 5Ah    Cluster Adapter BIOS entry address .................... 5**52
  72. Interrupt 5Bh    Reserved by IBM  (not initialized) .................... 5**53
  73. Interrupt 5Ch    NETBIOS interface entry port, TOPS .................... 5**54
  74. Interrupt 5Dh    Reserved by IBM  (not initialized) .................... 5**55
  75. Interrupt 5Eh    Reserved by IBM  (not initialized) .................... 5**56
  76. Interrupt 5Fh    Reserved by IBM  (not initialized) .................... 5**57
  77. Interrupt 60h-67h  User Program Interrupts ............................ 5**58
  78. Interrupt 68h    Not Used  (not initialized) ........................... 5**59
  79. Interrupt 69h    Not Used  (not initialized) ........................... 5**60
  80. Interrupt 6Ah    Not Used  (not initialized) ........................... 5**61
  81. Interrupt 6Bh    Not Used  (not initialized) ........................... 5**62
  82. Interrupt 6Ch    System Resume Vector (Convertible) .................... 5**63
  83. Interrupt 6Dh    Not Used  (not initialized) ........................... 5**64
  84. Interrupt 6Eh    Not Used  (not initialized) ........................... 5**65
  85.  
  86.  
  87.  
  88. ┌─────────────────────────────────────────────────────────────────────────────┐
  89. │Interrupt 22h     Terminate Address ..................................... 5**1 │
  90. └─────────────────────────────────────────────────────────────────────────────┘
  91. (0:0088h)
  92.  This interrupt transfers control to the far (dword) address at this interrupt
  93. location when an application program terminates. The default address for this
  94. interrupt is 0:0088h through 0:008Bh. This address is copied into the program's
  95. Program Segment Prefix at bytes 0Ah through 0Dh at the time the segment is
  96. created and is restored from the PSP when the program terminates. The calling
  97. program is normally COMMAND.COM or an application. Do not issue this interrupt
  98. directly, as the EXEC function call does this for you. If an application
  99. spawns a child process, it must set the Terminate Address prior to issuing the
  100. EXEC function call, otherwise when the second program terminated it would
  101. return to the calling program's Terminate Address rather than its own. This
  102. address may be set with int 21, function 25h.
  103.  
  104.  
  105. ┌─────────────────────────────────────────────────────────────────────────────┐
  106. │Interrupt 23h     Ctrl-Break Exit Address ............................... 5**2 │
  107. └─────────────────────────────────────────────────────────────────────────────┘
  108. (0:008Ch)
  109.  If the user enters a Ctrl-Break during STDIN, STDOUT, STDPRN, or STDAUX, int
  110. 23h is executed. If BREAK is on, int 23h is checked on MOST function calls
  111. (notably 06h). If the user written Ctrl-Break routine saves all registers, it
  112. may end with a return-from-interrupt instruction (IRET) to continue program
  113. execution. If the user-written interrupt program returns with a long return, the
  114. carry flag is used to determine whether the program will be aborted. If the
  115. carry flag is set, the program is aborted, otherwise execution continues (as
  116. with a return by IRET). If the user-written Ctrl-Break interrupt uses function
  117. calls 09h or 0Ah, (Display String or Buffered Keyboard Input) then a three-byte
  118. string of 03h-0Dh-0Ah (ETX/CR/LF) is sent to STDOUT. If execution is continued
  119. with an IRET, I/O continues from the start of the line. When the interrupt
  120. occurs, all registers are set to the value they had when the original function
  121. call to DOS was made.
  122.  
  123.  There are no restrictions on what the Ctrl-Break handler is allowed to do,
  124. including DOS function calls, as long as the registers are unchanged if an IRET
  125. is used.
  126.  
  127.  If the program creates a new segment and loads a second program which itself
  128. changes the Ctrl-Break address, the termination of the second program and
  129. return to the first causes the Ctrl-Break address to be restored from the PSP
  130. to the value it had before execution of the second program.
  131.  
  132.                                     -133-
  133.  
  134.  
  135. ┌─────────────────────────────────────────────────────────────────────────────┐
  136. │Interrupt 24h     Critical Error Handler ................................ 5**3 │
  137. └─────────────────────────────────────────────────────────────────────────────┘
  138. (0:0090h)
  139.  
  140.  When an unrecoverable I/O error occurs, control is transferred to an error
  141. handler in the resident part of COMMAND.COM with an int 24h. This may be the
  142. standard DOS error handler (Abort, Retry, Ignore, Fail?) or a user-written
  143. routine.
  144.  
  145.  On entry to the error handler, AH will have its bit 7=0 (high order bit)
  146. if the error was a disk error (probably the most common error), bit 7=1 if not.
  147.  
  148.  BP:SI contains the address of a Device Header Control Block from which
  149. additional information can be retrieved (see below). The register is set up
  150. for a retry operation and an error code is in the lower half of the DI register
  151. with the upper half undefined.
  152.  
  153.  DOS places the following items on the user stack. The stack contains the
  154. following from top to bottom:
  155.  
  156.     IP   │     DOS registers from the issuing int 24h
  157.     CS   │
  158.       flags  │
  159.       ───────┼───────────────────────────────────────────────────────
  160.     AX   │     user registers at time of original int 21h request
  161.     BX   │
  162.     CX   │
  163.     SI   │
  164.     DI   │
  165.     BP   │
  166.     DS   │
  167.     ES   │
  168.       ───────┼───────────────────────────────────────────────────────
  169.     IP   │     original int 21h from the user to DOS
  170.     CS   │
  171.       flags  │
  172.  
  173.  To reroute the critical error handler to a user-written critical error handler,
  174. the following should be done:
  175.  
  176. Before an int 24h occurs:
  177. 1) The user application initialization code should save the int 24h vector and
  178.    replace the vector with one pointing to the user error routine.
  179.  
  180. When the int 24h occurs:
  181. 2) When the user error routine received control it should push the flag
  182.    registers onto the stack and execute a far call to the original int 24h
  183.    vector saved in step 1.
  184. 3) DOS gives the appropriate prompt, and waits for user input (Abort, Retry,
  185.    Ignore, Fail). After the user input, DOS returns control to the user error
  186.    routine instruction following the far call.
  187. 4) The user error routine can now do any tasks necessary. To return to the
  188.    original application at the point the error occurred, the error routine needs
  189.    to execute an IRET instruction. Otherwise, the user error routine should
  190.    remove the IP, CS, and flag registers from the stack. Control can then be
  191.    passed to the desired routine.
  192.  
  193.                                     -134-
  194.  
  195.  Int 24h provides the following values in registers on entry to the interrupt
  196. handler:
  197.  
  198. entry    AH    status byte (bits)
  199.         7    0    disk I/O hard error
  200.             1    other error - if block device, bad FAT
  201.                 - if char device, code in DI
  202.         6    unused
  203.         5    0    if IGNORE is not allowed
  204.             1    if IGNORE is allowed
  205.         4    0    if RETRY  is not allowed
  206.             1    if RETRY  is allowed
  207.         3    0    if FAIL   is not allowed
  208.             1    if FAIL   is allowed
  209.         2 \    disk area of error  00 = DOS area  01 = FAT
  210.         1 /                10 = root dir  11 = data area
  211.         0    0    if read operation
  212.             1    if write operation
  213.     AL    drive number if AH bit 7 = 1, otherwise undefined
  214.         If it is a hard error on disk (AH bit 7=0), register AL
  215.         contains the failing drive number (0=A:, 1=B:, etc.).
  216.     BP:SI    address of a Device Header Control Block for which error
  217.         occurred. Block device if high bit of BP:SI+4 = 1
  218.     DI    (low byte) error code (note: high byte is undefined)
  219.            error code          description
  220.         00h        attempt to write on write-protected diskette
  221.         01h        unknown unit
  222.         02h        drive not ready
  223.         03h        unknown command
  224.         04h        data error (bad CRC)
  225.         05h        bad request structure length
  226.         06h        seek error
  227.         07h        unknown media type
  228.         08h        sector not found
  229.         09h        printer out of paper
  230.         0Ah        write fault
  231.         0Bh        read fault
  232.         0Ch        general failure
  233.         0Fh        invalid disk change     (DOS 3.0+)
  234.         10h        FCB unavailable      (DOS 3.0+)
  235.         11h        sharing buffer overflow  (DOS 3.0+)
  236.  
  237.     note: Only codes 00h through 0Ch are defined in DR-DOS 3.32.
  238.  
  239. The handler must return this information:
  240.  
  241.  The registers are set such that if an IRET is executed, DOS responds according
  242. to (AL) as follows:
  243. AL    00h    IGNORE the error
  244.     01h    RETRY the operation
  245.     02h    ABORT via int 22h (jump to terminate address)
  246.     03h    FAIL the system call that is in progress (DOS 3.0+)
  247. note 1) Be careful when choosing to ignore a response because this causes DOS
  248.     to think that an operation has completed successfully when it may not
  249.     have.
  250.      2) If the error was a character device, the contents of AL are invalid.
  251.  
  252.  
  253. Other Errors
  254.  
  255.  If AH bit 7=1, the error occurred on a character device, or was the result of
  256. a bad memory image of the FAT. The device header passed in BP:SI can be examined
  257. to determine which case exists. If the attribute byte high-order bit indicates
  258. a block device, then the error was a bad FAT. Otherwise, the error is on a
  259. character device.
  260.  
  261.                                     -135-
  262.  
  263.  If a character device is involved, the contents of AL are unpredictable, and
  264. the error code is in DI as above.
  265.  
  266. note 1) Before giving this routine control for disk errors, DOS performs several
  267.     retries. The number of retries varies according to the DOS version.
  268.      2) For disk errors, this exit is taken only for errors occurring during an
  269.     int 21h function call. It is not used for errors during an int 25h or
  270.     26h.
  271.      3) This routine is entered in a disabled state.
  272.      4) All registers must be preserved.
  273.      5) This interrupt handler should refrain from using DOS function calls. If
  274.     necessary, it may use calls 01h through 12h. Use of any other call
  275.     destroys the DOS stack and leaves DOS in an unpredictable state.
  276.      6) The interrupt handler must not change the contents of the device header.
  277.      7) If the interrupt handler handles errors itself rather than returning to
  278.     DOS, it should restore the application program's registers from the
  279.     stack, remove all but the last three words on the stack, then issue an
  280.     IRET. This will return to the program immediately after the int 21h
  281.     that experienced the error. Note that if this is done DOS will be in an
  282.     unstable state until a function call higher than 12h is issued,
  283.     therefore not recommended.
  284.      8) For DOS 3.x+, IGNORE requests (AL=0) are converted to FAIL for critical
  285.     errors that occur on FAT or DIR sectors.
  286.      9) For DOS 3.10 up, IGNORE requests (AL=0) are converted to FAIL requests
  287.     for network critical errors (50-79).
  288.     10) The device header pointed to by BP:SI is as follows:
  289.        dword    pointer to next device (0FFFFh if last device)
  290.     word    attributes:
  291.         bit    15    1    if character device.
  292.                     If bit 15 is 1:
  293.                     bit 0 = 1 if current standard input
  294.                     bit 1 = 1 if current standard output
  295.                     bit 2 = 1 if current NULL device
  296.                     bit 3 = 1 if current CLOCK device
  297.                 0    if block device.
  298.         bit    14    is the IOCTL bit
  299.     word    pointer to device driver strategy entry point
  300.     word    pointer to device driver interrupt entry point
  301.       8 bytes    character device named field for block devices. The first byte
  302.         is the number of units.
  303.     11) To tell if the error occurred on a block or character device, look at
  304.     bit 15 in the attribute field (WORD at BP:SI+4).
  305.     12) If the name of the character device is desired, look at the eight bytes
  306.     starting at BP:SI+10.
  307.  
  308.  
  309. Handling of Invalid Responses (DOS 3.0+)
  310.  
  311.      A) If IGNORE (AL=0) is specified by the user and IGNORE is not allowed
  312.     (bit 5=0), make the response FAIL (AL=3).
  313.      B) If RETRY (AL=1) is specified by the user and RETRY is not allowed
  314.     (bit 4=0), make the response FAIL (AL=3).
  315.      C) If FAIL (AL=3) is specified by the user and FAIL is not allowed
  316.     (bit 3=0), make the response ABORT. (AL=2)
  317.  
  318.                                     -136-
  319.  
  320.  
  321. ┌─────────────────────────────────────────────────────────────────────────────┐
  322. │Interrupt 25h     Absolute Disk Read .................................... 5**4 │
  323. │Interrupt 26h     Absolute Disk Write ................................... 5**5 │
  324. └─────────────────────────────────────────────────────────────────────────────┘
  325. (0:0094h, 0:0098h)
  326.  
  327.   These transfer control directly to the disk device driver. On return, the
  328. original flags are still on the stack (put there by the INT instruction). This
  329. is necessary because return information is passed back in the current flags.
  330. All registers except the segment registers are destroyed by these calls.
  331.  
  332.   The number of sectors specified is transferred between the given drive and the
  333. transfer address. Logical sector numbers are obtained by numbering each sector
  334. sequentially starting from track 0, head 0, sector 1 (logical sector 0) and
  335. continuing along the same head, then to the next head until the last sector on
  336. the last head of the track is counted.    Thus, logical sector 1 is track 0, head
  337. 0, sector 2; logical sector 2 is track 0, head 0, sector 3; and so on. Numbering
  338. then continues wih sector 1 on head 0 of the next track. Note that although the
  339. sectors are sequentially numbered (for example, sectors 2 and 3 on track 0 in
  340. the example above), they may not be physically adjacent on disk, due to
  341. interleaving. Note that the mapping is different from that used by DOS 1.10 for
  342. double-sided diskettes.
  343.  
  344.  The request is as follows:
  345.  
  346. int 25 for Absolute Disk Read,          | except Compaq DOS 3.31 or DOS 4.0+
  347. int 26 for Absolute Disk Write          | over-32Mb partitions
  348. entry    AL    drive number (0=A:, 1=B:, etc)
  349.     CX    number of sectors to read (int 25h) or write (int 26h)
  350.     DS:BX    segment/offset of disk transfer address buffer (DTA)
  351.     DX    first relative sector to read - beginning logical sector number
  352. return    CF    set if error
  353.     AL    error code issued to int 24h in low half of DI
  354.     AH    01h    bad command
  355.         02h    bad address mark
  356.         03h    write-protected disk
  357.         04h    requested sector not found
  358.         08h    DMA failure
  359.         10h    data error (bad CRC)
  360.         20h    controller failed
  361.         40h    seek operation failed
  362.         80h    attachment failed to respond
  363. note 1) DOS returns with a far ret which leave the original flags on the stack.
  364.     Be sure to pop the stack to prevent uncontrolled growth.
  365.      2) Ints 25 and 26 will try rereading a disk if they get an error the first
  366.     time.
  367.  
  368.  To address partition sizes greater than 32Mb an extended format is provided
  369. in Compaq DOS 3.31, DOS 4.0, and DR-DOS. This format passes a 32-bit address
  370. value by means of a parameter block. The extended format may be used to
  371. address disks smaller than 32Mb as well as larger.
  372.  
  373.  The request is as follows:
  374.  
  375. int 25 for Absolute Disk Read,          | Compaq DOS 3.31 or DOS 4.0+
  376. int 26 for Absolute Disk Write          | over-32Mb partitions
  377. entry    AL    drive number (0=A:, 1=B:, etc)
  378.     CX    0FFFFh
  379.     DS:BX    address of parameter block. Block format:
  380.            dword    sector number
  381.         word    number of sectors to read
  382.            dword    FAR pointer to buffer
  383.  
  384.                                     -137-
  385.  
  386. return    CF    set if error
  387.     AL    error code issued to int 24h in low half of DI
  388.     AH    01h    bad command
  389.         02h    bad address mark
  390.         03h    write-protected disk
  391.         04h    requested sector not found
  392.         08h    DMA failure
  393.         10h    data error (bad CRC)
  394.         20h    controller failed
  395.         40h    seek operation failed
  396.         80h    attachment failed to respond
  397. note 1) DOS returns with a far ret which leave the original flags on the stack.
  398.     Be sure to pop the stack to prevent uncontrolled growth.
  399.      2) Partition is potentially >32M (and requires this form of the call) if
  400.     bit 1 of device attribute word in device driver is set.
  401.      3) In the IBM OS/2 Tech Ref Volume 1, page 7-33, under "DOS Environment
  402.     Software Interrupt Support", it lists:
  403.     25h  direct read       supported
  404.     26h  direct write      an error is returned on requests for
  405.                    non-removable media
  406.  
  407.  
  408.  
  409.  
  410. ┌─────────────────────────────────────────────────────────────────────────────┐
  411. │Interrupt 27h     Terminate And Stay Resident ........................... 5**6 │
  412. └─────────────────────────────────────────────────────────────────────────────┘
  413. (0:009Ch)    (obsolete)
  414.  This vector is used by programs that are to remain resident when COMMAND.COM
  415. regains control.
  416.  
  417.  After initializing itself, the program must set DX to its last address plus
  418. one relative to the program's initial DS or ES value (the offset at which other
  419. programs can be loaded), then execute interrupt 27h. DOS then considers the
  420. program as an extension of itself, so the program is not overlaid when other
  421. programs are executed. This is useful for loading programs such as utilities
  422. and interrupt handlers that must remain resident.
  423.  
  424. entry    CS    current program segment
  425.     DX    last program byte + 1
  426. return    none
  427. note 1) This interrupt must not be used by .EXE programs that are loaded into
  428.     the high end of memory.
  429.      2) This interrupt restores the interrupt 22h, 23h, and 24h vectors in the
  430.     same manner as interrupt 20h. Therefore, it cannot be used to install
  431.     permanently resident Ctrl-Break or critical error handler routines.
  432.      3) The maximum size of memory that can be made resident by this method is
  433.     64K.
  434.      4) Memory can be more efficiently used if the block containing a copy of
  435.     the environment is deallocated before terminating. This can be done by
  436.     loading ES with the segment contained in 2Ch of the PSP, and issuing
  437.     function call 49h (Free Allocated Memory).
  438.      5) DOS function call 4Ch allows a program to pass a completion code to DOS,
  439.     which can be interpreted with processing (see function call 31h).
  440.      6) Terminate and stay resident programs do not close files.
  441.      7) Int 21, function 31h is the preferred method to cause a program to
  442.     remain resident because this allows return information to be passed and
  443.     allows a program larger than 64K to remain resident.
  444.      8) It is possible to make an EXE program resident with this call by
  445.     putting a 27h in the second byte of the PSP and terminating with a
  446.     RET FAR.
  447.      9) Programs terminating with int 27h do not close files on exit. Your
  448.     program must explicitly close any opened files before going resident.
  449.  
  450.                                     -138-
  451.  
  452.  
  453. ┌─────────────────────────────────────────────────────────────────────────────┐
  454. │Interrupt 28h     (not documented by Microsoft) ......................... 5**7 │
  455. └─────────────────────────────────────────────────────────────────────────────┘
  456.        *    DOS Idle Interrupt
  457.  
  458.  Int 28h has been provided by DOS since release 2.0. The int 28h process is
  459. similar to the "Timer Tick" process provided by BIOS via int 1Ch in that it is
  460. an "outbound" (from DOS) call which an application can "hook onto" to get
  461. service at a particular entry point. DOS normally only issues int 28h when it
  462. recieves a function call (int 21h) from a foreground application with an
  463. argument in the range of 0 thru 12 (0Ch) in the AH register, or when it is
  464. idling waiting for keyboard input. In effect, when DOS issues int 28h, it is
  465. saying to the background task "I'm not doing anything hot right now, if you can
  466. use the time, go ahead." This means that a foreground application which doesn't
  467. do many low-number DOS functions can preempt CPU time easily.
  468.  
  469.  When int 28h is being issued it is usually safe to do DOS calls. You won't get
  470. int 28hs if a program is running that doesn't do its keyboard input through
  471. DOS. You should rely on the timer interrupt for these. It is used primarily by
  472. the PRINT.COM routines, but any number of other routines can be chained to it
  473. by saving the original vector and calling it with a FAR call (or just JMPing to
  474. it) at the end of the new routine.
  475.  
  476.  Int 28h is not called at all when any non-trivial foreground task is running.
  477. As soon as a foreground program has a file open, int 28h no longer gets called.
  478. Could make a good driver for for a background program that works as long as
  479. there is nothing else going on in the machine.
  480.  
  481.  DOS uses 3 separate internal stacks: one for calls 01h through 0Ch; another
  482. for calls 0Dh and above; and a third for calls 01h through 0Ch when a Critical
  483. Error is in progress. When int 28h is called, any calls above 0Ch can be
  484. executed without destroying the internal stack used by DOS at the time.
  485.  
  486.  The byte which is pushed on the stack before an int 28h just indicates which
  487. stack area is being used by the current int 21h call. In DOS 3.1, the code
  488. sequence that calls int 28h looks like this:
  489.  
  490.     PUSH    SS:[0304]
  491.     INT    28
  492.     POP    SS:[0304]
  493.  
  494.  The low-order byte of the word pushed contains 1 if the int 21h call currently
  495. in progress is for services 1 through 0Ch, and 0 for service 0 and for 0Dh and
  496. up. Assuming that the last DOS call was not a reentrant one, this tells you
  497. which set of DOS services should be safe to call.
  498.  
  499. entry    no parameters availible
  500. return    none
  501. note 1) The int 28h handler may invoke any int 21h function except functions
  502.     00h through 0Ch (and 50h/51h under DOS 2.x unless DOS CritErr flag is
  503.     set).
  504.      2) Apparently int 28h is also called during screen writes.
  505.      3) Until some program installs its own routine, this interrupt vector
  506.     simply points to an IRET opcode.
  507.      4) Supported in OS/2 1.0's DOS Compatibility Box.
  508.      5) It is possible, if you are careful, to enhance the background priority
  509.     by providing more int 28h calls than DOS normally would issue.
  510.      6) If the InDOS flag is zero on int 28h, then it was called by someone
  511.     other than DOS, and the word on the stack should NOT be examined.
  512.  
  513.                                     -139-
  514.  
  515.  
  516. ┌─────────────────────────────────────────────────────────────────────────────┐
  517. │Interrupt 29h     (not documented by Microsoft) ......................... 5**8 │
  518. └─────────────────────────────────────────────────────────────────────────────┘
  519.        *    Internal - Quick Screen Output
  520.  
  521.  This method is extremely fast (much faster than DOS 21h subfunctions 2 and 9,
  522. for example), and it is portable, even to "non-compatible" MS-DOS computers.
  523.  
  524. entry    AL    ASCII value for character to output to screen
  525. return    unknown
  526. note 1) Documented by Digital Equipment's DOS Reference as provided with the
  527.     DEC Rainbow. Also documented by Digital Research in the DR-DOS manual.
  528.      2) If ANSI.SYS is installed, character output is filtered through it.
  529.      3) Works on the IBM PC and compatibles, Wang PC, HP-150 and Vectra, DEC
  530.     Rainbow, NEC APC, Texas Instruments PC and others.
  531.      4) This interrupt is called from the DOS's output routines if output is
  532.     going to a device rather than a file, and the device driver's attribute
  533.     word has bit 3 (04h) set to "1".
  534.      5) This call has been tested with MSDOS 2.11, PCDOS 2.1, PCDOS 3.1, PCDOS
  535.     3.2, PCDOS 3.3, PCDOS 4.01, and Compaq DOS 3.31.
  536.      6) Used in IBMBIO.COM as a vector to int 10, function 0Eh (write TTY)
  537.     followed by an IRET.
  538.      7) Most of the fast ANSI device drivers use this interrupt - ZANSI.SYS,
  539.     NANSI.SYS, and PCMag's ANSI.COM.
  540.      8) When using int 29h to output characters the ASCII 7 (BELL) will
  541.     suppress character output while the bell is sounding.
  542.      9) When device drivers (or the SYSINIT module which loads the drivers)
  543.     need to do console output, they use int 29h, to call the console device
  544.     driver directly. For example, messages telling you about errors in your
  545.     CONFIG.SYS file are printed using this service.
  546.  
  547.  
  548.  
  549. ┌─────────────────────────────────────────────────────────────────────────────┐
  550. │Interrupt 2Ah     Microsoft Networks - Session Layer Interrupt .......... 5**9 │
  551. └─────────────────────────────────────────────────────────────────────────────┘
  552.        1)    (not documented by Microsoft)
  553.        2)     LANtastic NetBIOS interface
  554.        3)     NetBIOS alternate interface. The alternate interface (2Ah) was
  555.          originally designed as a "higher" level interface to network
  556.          communications rather than the "low" level interface (5Ch)
  557.          provided by the NETBIOS. The 2Ah interface, however, does not
  558.          support any higher level functions than does the 5Ch interface
  559.          and therefore has not become a defacto standard as has the 5Ch
  560.          interface.
  561.  
  562. entry    AH    00h    Check for int 2Ah Network BIOS Installation
  563.             return    AH    nonzero if installed
  564.         01h    Execute NETBIOS Request (no error retry)
  565.             ES:BX    pointer to NCB
  566.  
  567.                                     -140-
  568.  
  569. returnS:    AL    NETBIOS error code
  570.         AH    0 if no error
  571.             1 if error
  572.         02h    Set Net Printer Mode
  573.         03h    Get Shared-Device Status (Check Direct I/O)
  574.             AL    00h
  575.             DS:SI    pointer to ASCIIZ disk device name
  576.             return    CF    0    if allowed
  577.         04h    Execute NETBIOS (retry available)
  578.             AL    00h    for error retry
  579.                 01h    for no retry
  580.             ES:BX    pointer to network control block
  581.             return    AX    0000h    for no error
  582.                 AH    01h    if error
  583.                 AL    error code (unknown)
  584.             note    Error codes that are automatically retried are:
  585.                 09h    no sessions resources
  586.                 12h    no listen
  587.                 21h    interface busy
  588.         05h    Get Network Resource Information
  589.             AL    00h
  590.             return    AX    reserved
  591.                 BX    # of network names (16 - names in use)
  592.                 CX    number of available NCB commands
  593.                 DX    number of sessions (max - pending)
  594.         06h    Network Print-Stream Control
  595.             note    NETBIOS 1.10
  596.         (LANtastic)
  597.             AL    01h    Set spooled output to combined mode
  598.                 return    none
  599.                 02h    Set spooled output in separate mode
  600.                 return    none
  601.                 note    Printer output is not combined when
  602.                     multiple programs are run or when the
  603.                     printer is opened or closed. This cmd.
  604.                     implicitly starts a new print job.
  605.                 03h    Flush printer output
  606.                 return    none
  607.                 note    Printer output is flushed and a new
  608.                     print job is started. If no output
  609.                     exists to be flushed then this function
  610.                     has no affect.
  611.         07h-19h unknown
  612.         20h    unknown
  613.             note    AL=01h intercepted by DESQview 2.0.
  614.         80h    Begin DOS Critical Section
  615.             AL    1 to 6
  616.         81h    End DOS Critical Section
  617.             AL    1 to 6
  618.         82h    Server Hook
  619.             stack    AX from call to int 21h
  620.             return    stack unchanged
  621.             note    Called by the int 21h function dispatcher
  622.                 in DOS 3.10+ for function 0 and functions
  623.                 greater than 0Ch except 59h.
  624.         84h    Keyboard Busy Loop
  625.             note    Same functionality as DOS's int 28h?
  626.         87h    Used by DOS PRINT to mark Critical Regions:
  627.             AL    00h    Begin Critical Region
  628.                 01h    End Critical Region
  629.             return    CF    1    region already active
  630.  
  631.                                     -141-
  632.  
  633.  
  634. ┌─────────────────────────────────────────────────────────────────────────────┐
  635. │Interrupt 2Bh     (not documented by Microsoft) ......................... 5**10│
  636. └─────────────────────────────────────────────────────────────────────────────┘
  637.        *    Unknown - Internal Routine for DOS (IRET)
  638.  
  639.  
  640. ┌─────────────────────────────────────────────────────────────────────────────┐
  641. │Interrupt 2Ch     (not documented by Microsoft) ......................... 5**11│
  642. └─────────────────────────────────────────────────────────────────────────────┘
  643.        *    Unknown - Internal Routine for DOS (IRET)
  644.  
  645.  
  646. ┌─────────────────────────────────────────────────────────────────────────────┐
  647. │Interrupt 2Dh     (not documented by Microsoft) ......................... 5**12│
  648. └─────────────────────────────────────────────────────────────────────────────┘
  649.        *    Unknown - Internal Routine for DOS (IRET)
  650.  
  651.  
  652. ┌─────────────────────────────────────────────────────────────────────────────┐
  653. │Interrupt 2Eh     (undocumented by Microsoft)  (DOS 2.0+) ............... 5**13│
  654. └─────────────────────────────────────────────────────────────────────────────┘
  655.        *    Internal Routine for DOS  (Alternate EXEC)
  656.  
  657.   This interrupt passes a command line addressed by DS:SI to COMMAND.COM. The
  658. command line must be formatted just like the unformatted parameter area of a
  659. Program Segment Prefix. That is, the first byte must be a count of characters,
  660. and the second and subsequent bytes must be a command line with parameters,
  661. terminated by a carriage return character.
  662.  
  663.   When executed, int 2Eh will reload the transient part of the command
  664. interpreter if it is not currently in memory. If called from a program that
  665. was called from a batch file, it will abort the batch file. If executed from a
  666. program which has been spawned by the EXEC function, it will abort the whole
  667. chain and probably lock up the computer. Int 2Eh also destroys all registers
  668. including the stack pointer.
  669.  
  670.   Int 2Eh is called from the transient portion of the program to reset the DOS
  671. PSP pointers using the above Functions #81 & #80, and then reenters the
  672. resident program.
  673.  
  674.   When called with a valid command line, the command will be carried out by
  675. COMMAND.COM just as though you had typed it in at the DOS prompt. Note that the
  676. count does not include the carriage return. This is an elegant way to perform a
  677. SET from an application program against the master environment block for
  678. example.
  679.  
  680. entry    DS:SI    pointer to an ASCIIZ command line in the form:
  681.             count byte
  682.             ASCII string
  683.             carriage return
  684.             null byte
  685. note 1) Destroys all registers including stack pointer.
  686.      2) Seems to work OK in both DOS 2.x and 3.x.
  687.      3) It is reportedly not used by DOS.
  688.      4) As far as known, int 2Eh is not used by DOS 3.1, although it was called
  689.     by COMMAND.COM of PCDOS 3.0, so it appears to be in 3.1 only for the
  690.     sake of compatibility.
  691.  
  692.                                     -142-
  693.  
  694.  
  695. ┌─────────────────────────────────────────────────────────────────────────────┐
  696. │Interrupt 2Fh     Multiplex Interrupt ................................... 5**14│
  697. └─────────────────────────────────────────────────────────────────────────────┘
  698.  
  699.  Interrupt 2Fh is the multiplex interrupt. A general interface is defined
  700. between two processes. It is up to the specific application using interrupt
  701. 2Fh to define specific functions and parameters.
  702.  
  703.  This interrupt is becoming more commonly used as the availible interrupt 21
  704. functions are getting to be in short supply. Int 2Fh doesn't require any
  705. support from DOS itself for it to be used in application programs. It's not
  706. handled by DOS, but by the programs themselves.
  707.  
  708.  Every multiplex interrupt handler is assigned a specific multiplex number.
  709. The multiplex number is specified in the AH register; the AH value tells which
  710. program your request is directed toward. The specific function that the handler
  711. is to perform is placed in the AL register. Other parameters are places in the
  712. other registers as needed. The handlers are chained into the 2Fh interrupt
  713. vector and the multiplex number is checked to see if any other application is
  714. using the same multiplex number. There is no predefined method for assigning a
  715. multiplex number to a handler. You must just pick one. To avoid a conflict if
  716. two applications choose the same multiplex number, the multiplex numbers used by
  717. an application should be patchable. In order to check for a previous
  718. installation of the current application, you can search memory for a unique
  719. string included in your program. If the value you wanted in AH is taken but
  720. you don't find the string, then another application has grabbed that location.
  721.  
  722.  Int 2Fh was not documented under DOS 2.x. There is no reason not to use int 2Fh
  723. as the multiplex interrupt in DOS 2.x. The only problem is that DOS 2.x does not
  724. initialize the int 2Fh vector, so when you try to chain to it like you are
  725. supposed to, it will crash. If your program checks the vector for being zero
  726. and initializes it itself or doesn't chain in that case, it will work for you
  727. n 2.x just the same as 3.x.
  728.  
  729.  DOS 3.2 itself contains some int 2Fh handlers - it uses values of 08h, 13h,
  730. and 0F8h. There may be more. NLSFUNC from DOS 3.3 up uses part of int 2Fh and
  731. so does GRAFTABL.
  732.  
  733.  For int 2Fh calls, register AH identifies which program is to handle the
  734. interrupt. AH values 00h-7Fh are reserved for DOS, not that anyone cares much.
  735. Values 0C0h-0FFh are reserved for applications. Register AL contains the
  736. subfunction code if used.
  737.  
  738.  IBM has reported that PC-DOS 4.0 will sometimes hang when substituting int
  739. 2Fh for int 67h for network calls.
  740.  
  741.  
  742. Function   00h    unknown
  743.        Reportedly somehow used by PRINT.COM in DOS 3.3+.
  744.  
  745.  
  746. Function   01h    PRINT.COM
  747.        PC-DOS 3.3's PRINT.COM hooks the following interrupt vectors:
  748.         05h    PrintScreen Interrupt
  749.         13h    BIOS Disk Interrupt
  750.         14h    BIOS Serial Communications Interrupt
  751.         15h    BIOS "System Services" Interrupt
  752.         17h    BIOS Printer Interrupt
  753.         19h    Bootstrap Loader Interrupt
  754.         1Ch    Timer Tick
  755.         23h    Control-C Terminate Address
  756.         24h    Critical Error Handler Address
  757.         28h    DOS Idle Interrupt (undocumented)
  758.         2Fh    Multiplex Interrupt
  759.  
  760.                                     -143-
  761.  
  762. entry    AH    01h
  763.         AL    00h    PRINT  Get Installed State
  764.             This call must be defined by all int 2Fh handlers. It
  765.             is used by the caller of the handler to determine if
  766.             the handler is present. On entry, AL=0. On return, AL
  767.             contains the installed state as follows:
  768.         return    AL    0FFh    installed
  769.                 01h    not installed, not OK to install
  770.                 00h    not installed, OK to install
  771.  
  772.             01h    PRINT  Submit File
  773.             DS:DX    pointer to submit packet
  774.                 format    byte    level
  775.                     dword    pointer to ASCIIZ filename
  776.         return    CF    set if error
  777.                 AX    error code
  778.         note 1) A submit packet contains the level (BYTE) and a pointer
  779.             to the ASCIIZ string (DWORD in offset:segment form).
  780.             The ASCIIZ string must contain the drive, path, and
  781.             filename of the file you want to print. The filename
  782.             cannot contain global filename characters.
  783.         return    CF    set if error
  784.                 AX    error code
  785.  
  786.             02h    PRINT Cancel File
  787.             On entry, AL=2 and DS:DX points to the ASCIIZ string for
  788.             the print file you want to cancel. Global filename
  789.             characters are allowed in the filename.
  790.         DS:DX    pointer to ASCIIZ file name to cancel (wildcards OK)
  791.         return    CF    set if error
  792.                 AX    error code
  793.  
  794.             03h    PRINT Remove All Files
  795.         return    CF    set if error
  796.                 AX    error code
  797.  
  798.             04h    PRINT Hold Queue/Get Status
  799.             This call holds the jobs in the print queue so that you
  800.             can scan the queue. Issuing any other code releases the
  801.             jobs. On entry, AL=4. On return, DX contains the error
  802.             count. DS:SI points to the print queue. The print queue
  803.             consists of a series of filename entries. Each entry is
  804.             64 bytes long. The first entry in the queue is the file
  805.             currently being printed. The end of the queue is marked
  806.             by the entry having a null as the first character.
  807.            return    DX    error count
  808.             DS:SI    pointer to print queue (null-string terminated
  809.                 list of 64-byte ASCIIZ filenames)
  810.             CF    set if error
  811.                 AX    error code
  812.                     01h    function invalid
  813.                     02h    file not found
  814.                     03h    path not found
  815.                     04h    too many open files
  816.                     05h    access denied
  817.                     08h    queue full
  818.                     09h    spooler busy
  819.                     0Ch    name too long
  820.                     0Fh    drive invalid
  821.  
  822.             05h    PRINT restart queue
  823.         return    CF    set if error
  824.                 AX    error code
  825.             06h    unknown - may be used in DOS 3.3+ PRINT
  826.  
  827.                                     -144-
  828.  
  829.  
  830. Function  02h    PC LAN Program
  831. entry    AH    02h
  832. other parameters unknown
  833.  
  834.  
  835. Function   05h    DOS 3.0+ Critical Error Handler
  836. entry    AH    05h
  837.     AL    00h    Installation Check
  838.         return    AL    00h    not installed, OK to install
  839.                 01h    not installed, not OK to install
  840.                 0FFh    installed
  841.         note    This set of functions allows a user program to
  842.             partially or completely override the default
  843.             critical error handler in COMMAND.COM.
  844.     AL    xxh    Handle Error - nonzero error code in AL
  845.             (xxh indicates nonzero extended error code)
  846.         return    CF    clear
  847.             ES:DI    pointer to ASCIIZ error message
  848.             AL    (?)
  849.             CF    set    use default error handler
  850. for LANtastic LANOS:
  851. entry    AH    05h
  852.     AL    00h    for installation check
  853.         #    for error code (in pre DOS 4.00)
  854.         1 or 2    for error code in DOS 4.00
  855.     BX    in    Error code
  856. return    CF    clear    if error code converted to text
  857.         set    if error code can't be converted
  858.     ES:DI    pointer to ASCIIZ text buffer containing error text. This is a
  859.         read-only text buffer and you must not alter the text in this
  860.         buffer.
  861.  
  862.  
  863. Function   06h    ASSIGN
  864. entry    AH    06h
  865.     AL    00h    Installation Check
  866.         01h    Get Memory Segment
  867. return (AH=00h) AH    nonzero if ASSIGN is installed
  868.        (AH=01h) ES    segment of ASSIGN work area
  869.  
  870.  
  871. Function   08h    DRIVER.SYS
  872. entry    AH    08h
  873.     AL    00h    Installation Check
  874.         return    AL    00h    not installed, OK to install
  875.                 01h    not installed, not OK to install
  876.                 0FFh    installed
  877.         01h    unknown
  878.         note    Moves down list of drivers?, copying and modifying word
  879.             at offset 29h.
  880. other parameters unknown
  881.  
  882.  
  883. Function   10h    SHARE
  884. entry    AH    10h
  885.     AL    00h    Installation Check
  886. return    AL    00h    not installed, OK to install
  887.         01h    not installed, not OK to install
  888.         0FFh    installed
  889.  
  890.                                     -145-
  891.  
  892.  
  893. Function   11h    Multiplex - Network Redirection
  894. entry    AH    11h
  895.     AL    00h    Installation Check
  896.             return    AL    00h    not installed, OK to install
  897.                     01h    not installed, not OK to install
  898.                     0FFh   installed
  899.         01h-05h unknown
  900.         06h    Close Remote File
  901.         07h-09h unknown
  902.         0Ah    unknown
  903.             stack    word    (?)
  904.             return    CF    set on error
  905.         0Bh    unknown
  906.             stack    word    (?)
  907.             return    CF    set on error (?)
  908.         0Ch    unknown
  909.         0Dh    unknown
  910.         0Eh    Do Redirection
  911.             stack    word    function to execute
  912.             return    CF    set on error
  913.         0Fh    Printer Setup
  914.             stack    word    function?
  915.         10h    unknown
  916.         11h    Rename File?
  917.         12h-16h unknown
  918.         17h    unknown
  919.             stack    word    (?)
  920.             return    (?)
  921.         18h    unknown
  922.             stack    word    (?)
  923.             return    (?)
  924.         19h-1Dh unknown
  925.         1Eh    Do Redirection
  926.             stack    word    function to execute
  927.             return    CF    set on error
  928.         1Fh    Printer Setup
  929.             stack    word    function (?)
  930.             return    CF    set on error (?)
  931.         20h-25h unknown
  932.             stack    word    (?)
  933.         26h    unknown
  934.  
  935.  
  936. Function   12h    Multiplex, DOS 3.x Internal Services
  937. entry    AH    12h
  938.     AL    00h    Installation Check
  939.             return    AL    0FFh    for compatibility with other
  940.                         int 2Fh functions
  941.         01h    Close File (?)
  942.             stack    word value - unknown
  943.             return    BX    unknown
  944.                 CX    unknown
  945.                 ES:DI    pointer to unknown value
  946.             note    Can be called only from within DOS.
  947.         02h    Get Interrupt Address
  948.             stack    word    vector number
  949.             return    ES:BX    pointer to interrupt vector
  950.                 stack    unchanged
  951.         03h    Get DOS Data Segment
  952.             return    DS    segment of IBMDOS.COM file
  953.         04h    Normalize Path Separator
  954.             stack    word    character to normalize
  955.             return    AL    normalized character (forward slash
  956.                     turned to backslash)
  957.                 stack    unchanged
  958.  
  959.                                     -146-
  960.  
  961.         05h    Output Character
  962.             stack    word    character to output
  963.             return    stack    unchanged
  964.             note    Can be called only from within DOS.
  965.         06h    Invoke Critical Error Handler
  966.             return    AL    0-3 for Abort, Retry, Ignore, Fail
  967.             note    Can be called only from within DOS.
  968.         07h    Move Disk Buffer (?)
  969.             DS:DI    pointer to disk buffer
  970.             return    buffer moved to end of buffer list
  971.             note    Can be called only from within DOS.
  972.         08h    Decrement Word
  973.             ES:DI    pointer to word to decrement
  974.             return    AX    new value of word
  975.             note    Word pointed to by ES:DI decremented,
  976.                 skipping zero.
  977.         09h    unknown
  978.             DS:DI    pointer to disk buffer(?)
  979.             return    (?)
  980.             note    Can be called only from within DOS.
  981.         0Ah    unknown
  982.             note    Can be called only from within DOS.
  983.         0Bh    unknown
  984.             ES:DI    pointer to system file table entry (?)
  985.             return    AX    (?)
  986.             note    Can be called only from within DOS.
  987.         0Ch    unknown
  988.             note    Can be called only from within DOS.
  989.         0Dh    Get Date and Time
  990.             return    AX    current date in packed format
  991.                 DX    current time in packed format
  992.             note    Can be called only from within DOS.
  993.         0Eh    Do Something to All Disk Buffers (?)
  994.             return    DS:DI    pointer to first disk buffer
  995.             note    Can be called only from within DOS.
  996.         0Fh    unknown
  997.             DS:DI    pointer to (?)
  998.             return    DS:DI pointer to (?)
  999.             note 1) Can be called only from within DOS.
  1000.                  2) Calls on function 1207h (Move Disk Buffer).
  1001.         10h    Find Dirty Buffer
  1002.             DS:DI    pointer to first disk buffer
  1003.             return    DS:DI    pointer to first disk buffer which has
  1004.                     clean flag clear
  1005.                 ZF    clear    if found
  1006.                     set    if not found
  1007.         11h    Normalize ASCIIZ Filename
  1008.             DS:SI    pointer to ASCIIZ filename to normalize
  1009.             ES:DI    pointer to buffer for normalized filename
  1010.             return    destination buffer filled with uppercase
  1011.                 filename, with slashes turned to backslashes
  1012.         12h    Get Length of ASCIIZ String
  1013.             ES:DI    pointer to ASCIIZ string
  1014.             return    CX    length of string
  1015.         13h    Uppercase Character
  1016.             stack    word    character to convert to uppercase
  1017.             return    AL    uppercase character
  1018.                 stack    unchanged
  1019.         14h    Compare FAR Pointers
  1020.             DS:SI    first pointer
  1021.             ES:DI    second pointer
  1022.             return    ZF    set if pointers are equal
  1023.                 ZF    clear if not equal
  1024.  
  1025.                                     -147-
  1026.  
  1027.         15h    unknown
  1028.             DS:DI    pointer to disk buffer
  1029.             stack    word    (?)
  1030.             return    stack unchanged
  1031.             note    Can be called only from within DOS.
  1032.         16h    Get Address of System FCB
  1033.             BX    system file table entry number
  1034.             return    ES:DI pointer to system file table entry
  1035.         17h    Set Default Drive (?)
  1036.             stack    word    drive (0=A:, 1=B:, etc)
  1037.             return    DS:SI    pointer to drive data block for
  1038.                     specified drive
  1039.                 stack    unchanged
  1040.             note    Can be called only from within DOS.
  1041.         18h    Get Something Caller's Registers
  1042.             return    DS:SI    pointer to saved caller's AX, BX, CX,
  1043.                     DX, SI, DI, BP, DS, ES (on stack)
  1044.             note    Only valid while within DOS.
  1045.         19h    unknown
  1046.             stack    word    drive (0=default, 1=A:, etc)
  1047.             return    (?)
  1048.                 stack    unchanged
  1049.             note 1) Can be called only from within DOS.
  1050.                  2) Calls function 1217h (Set Default Drive).
  1051.         1Ah    Get File's Drive
  1052.             DS:SI    pointer to filename
  1053.             return    AL    drive
  1054.                     (0=default, 1=A:, etc, 0FFh=invalid)
  1055.         1Bh    Set Something (?)
  1056.             CL    unknown
  1057.             return    AL    (?)
  1058.             note    Can be called only from within DOS.
  1059.         1Ch    Checksum Memory
  1060.             DS:SI    pointer to start of memory to checksum
  1061.             CX    number of bytes
  1062.             DX    initial checksum
  1063.             return    DX    checksum
  1064.             note 1) Can be called only from within DOS.
  1065.                  2) Used to determine when transient portion of
  1066.                 COMMAND.COM has been overlaid by application.
  1067.         1Dh    unknown
  1068.         1Eh    Compare Filenames
  1069.             DS:SI    pointer to first ASCIIZ filename
  1070.             ES:DI    pointer to second ASCIIZ filename
  1071.             return    ZF    set    if filenames equivalent
  1072.                     clear    if not
  1073.             note    Used by COPY command.
  1074.         1Fh    Build Drive Info Block
  1075.             stack    word    drive letter
  1076.             return    ES:DI pointer to drive info block
  1077.                       (will be overwritten by next call)
  1078.                 stack unchanged
  1079.             note    Can be called only from within DOS.
  1080.         20h    Get System File Table Number
  1081.             BX    file handle
  1082.             return    CF    set on error, error code in AL
  1083.                     AL    06h (invalid file handle)
  1084.                 CF    clear if successful
  1085.                     byte ES:[DI]    system file table entry
  1086.                             number for file handle
  1087.         21h    unknown
  1088.             DS:SI    pointer to (?)
  1089.             return    (?)
  1090.             note    Can be called only from within DOS.
  1091.  
  1092.                                     -148-
  1093.  
  1094.         22h    unknown
  1095.             SS:SI    pointer to (?)
  1096.             return    nothing(?)
  1097.             note    Can be called only from within DOS.
  1098.         23h    Check if Character Device (?)
  1099.             return    DS:SI    pointer to device driver with
  1100.                     same name as (?)
  1101.             note    Can be called only from within DOS.
  1102.         24h    Delay
  1103.             return    after delay of (?) ms
  1104.             note    Can be called only from within DOS.
  1105.         25h    Get Length of ASCIIZ String
  1106.             DS:SI    pointer to ASCIIZ string
  1107.             return    CX    length of string
  1108.         26h    unknown
  1109.             note    Can be called only from within DOS.
  1110.         27h    Get System File Table For a File        (DOS 3.3+)
  1111.             BX    file handle
  1112.             return    AL    06h    invalid file handle
  1113.             note    Can be called only from within DOS.
  1114.         28h    unknown
  1115.             note    Can be called only from within DOS.
  1116.         29h    Get System File Table Entry For File        (DOS 3.3+)
  1117.             BX    file handle
  1118.             return    ES:DI    pointer to system file table entry for
  1119.                     file (see int 21h/52h)
  1120.             note    Can be called only from within DOS.
  1121.         2Ah    Set (something)                 (DOS 3.3+)
  1122.             DS:SI    pointer to FAR procedure for (?)
  1123.             return    CF    set    if pointer already set
  1124.         2Bh    unknown                     (DOS 3.3+)
  1125.             DS:SI    pointer to something
  1126.             stack    word (unknown)
  1127.             return    registers unknown
  1128.                 stack    unchanged
  1129.             note    Can be called only from within DOS.
  1130.         2Ch    Get Device Chain                (DOS 3.3+)
  1131.             return    BX:AX    pointer to header of second device
  1132.                     driver (NUL is first) in driver chain
  1133.         2Dh    unknown                     (DOS 3.3+)
  1134.  
  1135.  
  1136. Function   13h    unknown - reportedly used by DOS 3.3
  1137. entry    AH    13h
  1138.     DS:DX    pointer to (?)
  1139.     ES:BX    pointer to (?)
  1140. return    DS:DX    from previous invocation of this function
  1141.     ES:BX    from previous invocation of this function
  1142. other parameters unknown
  1143.  
  1144.  
  1145. Function   14h    NLSFUNC.COM
  1146. entry    AH    14h
  1147.     AL    00h    installation check
  1148.         return    AL    00h    not installed, OK to install
  1149.                 01h    not installed, not OK
  1150.                 0FFh    installed
  1151.         01h    unknown
  1152.         note    Calls int 2Fh/1227h under certain circumstances.
  1153.         02h    unknown
  1154.         note    Calls int 2Fh/1227h under certain circumstances.
  1155.         03h    unknown
  1156.         note    In DOS 3.3, appears to be identical to subfunction 01h.
  1157. other parameters unknown
  1158.  
  1159.                                     -149-
  1160.  
  1161. Function   15h    CD-ROM extensions
  1162.         Microsoft CD-ROM driver versions 1.0 through 2.0 will work
  1163.         only up to DOS 3.31. DOS 4.0 and up require 2.1 drivers.
  1164.  
  1165. entry    AH    15h    CD-ROM services
  1166.     AL    subfunctions
  1167.         00h    Get Number of CD-ROM Drives (Installation Check)
  1168.         BX    00h
  1169.         return    BX    number of CD-ROM drive letters used
  1170.                 0    MSCDEX not installed
  1171.                 CX    starting drive letter (0=A:, 1=B:, etc)
  1172.         note    This installation check DOES NOT follow the format used
  1173.             by other software.
  1174.  
  1175.         01h    Get Drive Device List
  1176.         ES:BX    pointer to buffer to hold drive letter list
  1177.             (5 bytes per drive letter)
  1178.         return    buffer filled, for each drive letter:
  1179.             byte    subunit number in driver
  1180.             dword    address of device driver header
  1181.  
  1182.         02h    Get Copyright File Name
  1183.         CX    drive number (0=A:)
  1184.         ES:BX    pointer to 38-byte buffer for name of copyright file
  1185.         return    CF    set if drive is not a CD-ROM drive
  1186.             AX    error code  (15h)
  1187.  
  1188.         03h    Get Abstract File Name
  1189.         ES:BX    pointer to 38-byte buffer for name of abstract file
  1190.         CX    drive number (0=A:)
  1191.         return    CF    set if drive is not a CD-ROM drive
  1192.             AX    error code  (15h)
  1193.  
  1194.         04h    Get Bibliographic Doc File Name
  1195.         CX    drive number (0=A:)
  1196.         ES:BX    pointer to 38-byte buffer for name of bibliographic
  1197.             documentation file
  1198.         return    CF    set if drive is not a CD-ROM drive
  1199.             AX    error code  (15h)
  1200.  
  1201.         05h    Read VTOC (Volume Table of Contents)
  1202.         CX    drive number (0=A:)
  1203.         DX    sector index (0=first volume descriptor, 1=second,...)
  1204.         ES:BX    pointer to 2048-byte buffer
  1205.         return    CF    set on error
  1206.                 AX    error code (15h, 21h)
  1207.             CF    clear if successful
  1208.                 AX    volume descriptor type
  1209.                        (1=standard, 0FFh=terminator, 00h=other)
  1210.  
  1211.         06h    Turn Debugging On
  1212.         BX    debugging function to enable
  1213.         note    Reserved for development.
  1214.  
  1215.         07h    Turn Debugging Off
  1216.         BX    debugging function to disable
  1217.         note    Reserved for development.
  1218.  
  1219.         08h    Absolute Disk Read
  1220.         CX    drive number (0=A:)
  1221.         DX    number of sectors to read
  1222.         ES:BX    pointer to buffer
  1223.         SI:DI    starting sector number
  1224.         return    CF    set on error
  1225.             AL    error code  (15h, 21h)
  1226.  
  1227.                                     -150-
  1228.  
  1229.         09h    Absolute Disk Write
  1230.         CX    drive number (0=A:)
  1231.         DX    number of sectors to write
  1232.         ES:BX    pointer to buffer
  1233.         SI:DI    starting sector number
  1234.         note    Corresponds to int 26h and is currently reserved and
  1235.             nonfunctional.
  1236.  
  1237.         0Ah    Reserved by Microsoft
  1238.  
  1239.         0Bh    CD-ROM 2.00 - Drive Check
  1240.         CX    drive number (0=A:)
  1241.         return    BX    0ADADh if MSCDEX.EXE installed
  1242.             AX    0    if drive not supported
  1243.                 <> 0    if supported
  1244.  
  1245.         0Ch    CD-ROM 2.00 - Get MSCDEX.EXE Version
  1246.         return    BH    major version
  1247.             BL    minor version
  1248.         note    MSCDEX.EXE versions prior to 1.02 return BX=0.
  1249.  
  1250.         0Dh    CD-ROM 2.00 - Get CD-ROM Drive Letters
  1251.         ES:BX    pointer to buffer for drive letter list
  1252.             (1 byte per drive)
  1253.         return    Buffer filled with drive numbers (0=A:). Each byte
  1254.             corresponds to the drive in the same position for
  1255.             function 1501h.
  1256.  
  1257.         0Eh    CDROM 2.00 - Get/Set Volume Descriptor Preference
  1258.         BX    subfunction
  1259.             00h    Get Preference
  1260.             DX    00h
  1261.             return    DX    preference settings
  1262.             01h    Set Preference
  1263.             DH    volume descriptor preference
  1264.                 1    primary volume descriptor
  1265.                 2    supplementary volume descriptor
  1266.             DL    supplementary volume descriptor preference
  1267.                 1    shift-Kanji
  1268.             CX    drive number (0=A:)
  1269.             return    CF    set on error
  1270.                 AX    error code  (01h, 15h)
  1271.  
  1272.         0Fh    CD-ROM 2.00 - Get Directory Entry
  1273.         CX    drive number (0=A:)
  1274.         ES:BX    pointer to ASCIIZ pathname
  1275.         SI:DI    pointer to 255-byte buffer for directory entry
  1276.         return    CF    set on error
  1277.             AX    error code
  1278.             CF    clear if succesful
  1279.             AX    disk format (0=High Sierra, 1=ISO 9660)
  1280.         note    Directory entry format:
  1281.             byte    length of directory entry
  1282.             byte    length of XAR in LBN's
  1283.             dword    LBN of data, Intel (little-Indian) format
  1284.             dword    LBN of data, Motorola (big-Indian) format
  1285.             dword    length of file, Intel format
  1286.             dword    length of file, Motorola format
  1287.            ---High Sierra---
  1288.               6 bytes    date and time
  1289.             byte    bit flags
  1290.             byte    reserved
  1291.  
  1292.                                     -151-
  1293.  
  1294.            ---ISO 9660---
  1295.               7 bytes    data and time
  1296.             byte    bit flags
  1297.            ---both formats---
  1298.             byte    interleave size
  1299.             byte    interleave skip factor
  1300.             word    volume set sequence number, Intel format
  1301.             word    volume set sequence number, Motorola format
  1302.             byte    length of file name
  1303.               n bytes    file name
  1304.             byte    (optional) padding if filename is odd length
  1305.               n bytes    system data
  1306.  
  1307.         Error codes:
  1308.             01h    invalid function
  1309.             15h    invalid drive
  1310.             21h    not ready
  1311.  
  1312.  
  1313. Function   43h    Microsoft Extended Memory Specification (XMS)
  1314.         The XMS version 2.00 for MS-DOS allows DOS programs to utilize
  1315.         additional memory found in 80286 and 80386 machines. With some
  1316.         restrictions, XMS adds about 64K to the 640K which DOS programs
  1317.         can access directly. XMS also provides DOS programs with a
  1318.         standard method of storing data in extended memory.
  1319. entry    AH    XMS (extended memory) services
  1320.         Perform a FAR call to the driver entry point with AH set to the
  1321.         function code
  1322.         00h    Get XMS Version Number
  1323.             return    AX    16 bit BCD version number (AX=0285h
  1324.                     would be XMS version 2.85)
  1325.                 BX    driver internal revision number
  1326.                 DX    0000h    HMA does not exist
  1327.                     0001h    HMA exists
  1328.             note 1) No error codes are returned from this function.
  1329.                  2) DX indicates the presence of HMA, not its
  1330.                 availibility.
  1331.         01h    Request High Memory Area (1M to 1M + 64K)
  1332.             DX    HMA memory request in bytes (for TSR or
  1333.                 device drivers)
  1334.                 0FFFFh if application program
  1335.             return    AX    0000h    failure
  1336.                     0001h    success
  1337.                 BL    error code (80h, 81h, 90h, 91h, 92h)
  1338.         02h    Release High Memory Area
  1339.             return    AX    0000h    failure
  1340.                     0001h    success
  1341.                 BL     error code (80h, 81h, 90h, 93h)
  1342.         03h    Global Enable A20
  1343.             return    AX    0000h    failure
  1344.                     0001h    success
  1345.                 BL    error code (80h, 81h, 82h)
  1346.             note 1) Should only be used by programs which have
  1347.                 control of the HMA. The A20 line should be
  1348.                 turned off via Function 04h (Global Disable
  1349.                 A20) before a program releases control of the
  1350.                 system.
  1351.         04h    Global Disable A20
  1352.             return    AX    0000h    failure
  1353.                     0001h    success
  1354.                 BL    error code (80h, 82h, 94h)
  1355.             note 1) This function attempts to disable the A20 line.
  1356.                 It should only be used by programs which have
  1357.                 control of the HMA.
  1358.                  2) The A20 line should be disabled before a
  1359.                 program releases control of the system.
  1360.  
  1361.                                     -152-
  1362.  
  1363.         05h    Local Enable A20
  1364.             return    AX    0000h    failure
  1365.                     0001h    A20 is enabled
  1366.                 BL    error code (80h, 81h, 82h)
  1367.             note 1) This function attempts to enable the A20 line.
  1368.                 It should only be used by programs which need
  1369.                 direct access to extended memory. Programs
  1370.                 which use this function should call Function 06h
  1371.                 (Local Disable A20) before releasing control of
  1372.                 the system.
  1373.         06h    Local disable A20
  1374.             return    AX    0000h    failure
  1375.                     0001h    success
  1376.                 BL    error code (80h, 81h, 82h, 94h)
  1377.             note    This function cancels a previous call to Fn 05h
  1378.                 (Local Enable A20). It should only be used by
  1379.                 programs which need direct access to extended
  1380.                 memory. Previous calls to Fn 05h must be
  1381.                 canceled before releasing control of the system.
  1382.         07h    Query A20
  1383.             return    AX    0000h    failure
  1384.                     0001h    success (A20 line is physically
  1385.                         enabled)
  1386.                 BL    error code (00h, 80h, 81h)
  1387.         08h    Query Free Extended Memory
  1388.             return    AX    size of largest free extended memory
  1389.                     block in K
  1390.                 BL    error code (80h, 81h, 0A0h)
  1391.                 DX    total free extended memory in K
  1392.             note    The 64K HMA is not included in the returned
  1393.                 value even if it is not in use.
  1394.         09h    Allocate Extended Memory Block
  1395.             DX    Amount of extended memory being requested in
  1396.                 K-bytes
  1397.             return    AX    0000h    failure
  1398.                     BL    error code (80h 81h A0h A1h)
  1399.                     0001h    success
  1400.                 DX    16 bit handle for memory block
  1401.         0Ah    Free Extended Memory Block
  1402.             DX    handle of block to free
  1403.             return    AX    0000h    failure
  1404.                     BL    error code (80h, 81h, 0A2h,
  1405.                                 0ABh)
  1406.                     0001h    success
  1407.            0Bh    Move Extended Memory Block
  1408.             DS:SI pointer to EMM structure
  1409.                 4 bytes number of bytes to move
  1410.                 2 bytes source handle
  1411.                 4 bytes offset into source block
  1412.                 2 bytes destination handle
  1413.                 4 bytes offset into destination block
  1414.             return    AX    0000h    failure
  1415.                     BL    error code (80h, 81h, 82h, 0A3h,
  1416.                         0A4h, 0A5h, 0A6h, 0A7h, 0A8h,
  1417.                         0A9h)
  1418.                     0001h    success
  1419.         0Ch    Lock Extended Memory Block
  1420.             DX    XMS handle of block to lock
  1421.             return    AX    0000h    failure
  1422.                     BL    error code (80h, 81h, 0A2h,
  1423.                         0ACh, 0ADh)
  1424.                     0001h    block is successfully locked
  1425.                 DX:BX    32-bit linear address of locked block
  1426.  
  1427.                                     -153-
  1428.  
  1429.         0Dh    Unlock Extended Memory Block
  1430.             DX    XMS handle of block to unlock
  1431.             return    AX    0000h    failure
  1432.                     BL    error code (80h, 81h, 0A2h,
  1433.                         0AAh)
  1434.                     0001h    success
  1435.         0Eh    Get EMB Handle Information
  1436.             DX    handle for which to get info
  1437.             return    AX    0000h    failure
  1438.                     BL    error code (80h, 81h, 0A2h)
  1439.                     0001h    success
  1440.                     BH    block's lock count
  1441.                     BL    number of free handles left
  1442.                     DX    block size in K
  1443.             note    To get the block's base address, use Fn 0Ch
  1444.                 (Lock Extended Memory Block).
  1445.         0Fh    Reallocate Extended Memory Block
  1446.             BX    New size for the extended memory block in K
  1447.             DX    Unlocked extended memory block handle to
  1448.                 reallocate
  1449.             return    AX    0000h    failure
  1450.                     BL    error code (80h, 81h, 0A0h,
  1451.                         0A1h, 0A2h, 0ABh)
  1452.                     0001h    success
  1453.         10h    Request Upper Memory Block (nonEMS memory above 640K)
  1454.             DX    Size of requested memory block in paragraphs
  1455.             return    AX    0000h    failure
  1456.                     BL    error code (80h, 0B0h, 0B1h)
  1457.                     DX    size of largest available block
  1458.                         in paragraphs
  1459.                     0001h    success
  1460.                     BX    segment address of UMB
  1461.                     DX    actual block size in paragraphs
  1462.             note 1) UMBs are paragraph aligned.
  1463.                  2) To determine the size of the largest available
  1464.                 UMB, attempt to allocate one with a size of
  1465.                 0FFFFh.
  1466.         11h    Release Upper Memory Block
  1467.             DX    segment address of UMB to release
  1468.             return    AX    0000h    failure
  1469.                     BL    error code (80h, 0B2h)
  1470.                     0001h    success
  1471.  
  1472. note 1) UMBs cannot occupy memory addresses that can be banked by EMS 4.0.
  1473.     EMS 4.0 takes precedence over UMBs for physically addressable memory.
  1474.      2) Programs should make sure that at least 256 bytes of stack space is
  1475.     available before calling XMS API functions.
  1476.      3) On many machines, toggling the A20 line is a relatively slow operation.
  1477.      4) Error codes:
  1478.     80h    Function not implemented
  1479.     81h    VDISK was detected
  1480.     82h    An A20 error occurred
  1481.     8Eh    A general driver error
  1482.     8Fh    Unrecoverable driver error
  1483.     90h    HMA does not exist
  1484.     91h    HMA is already in use
  1485.     92h    DX is less than the /HMAMIN= parameter
  1486.     93h    HMA is not allocated
  1487.     0A0h    All extended memory is allocated
  1488.     0A1h    All available extended memory handles are allocated
  1489.     0A2h    Invalid handle
  1490.     0A3h    Source handle is invalid
  1491.     0A4h    Source offset is invalid
  1492.     0A5h    Destination handle is invalid
  1493.  
  1494.                                     -154-
  1495.  
  1496.     0A6h    Destination offset is invalid
  1497.     0A7h    Length is invalid
  1498.     0A8h    Move has an invalid overlap
  1499.     0A9h    Parity error occurred
  1500.     0AAh    Block is not locked
  1501.     0ABh    Block is locked
  1502.     0ACh    Block lock count overflowed
  1503.     0ADh    Lock failed
  1504.     0B0h    Only a smaller UMB is available
  1505.     0B1h    No UMB's are available
  1506.     0B2h    UMB segment number is invalid
  1507.  
  1508.  
  1509.  
  1510.  
  1511. Function  64h    SCRNSAV2
  1512. entry    AH    64h
  1513.     AL    00h    installation check
  1514. return    AL    00h    not installed
  1515.         0FFh    installed
  1516. note    SCRNSAV2.COM is a screen blanker for PS/2s with VGA by Alan Ballard.
  1517.  
  1518.  
  1519. Function  7Ah    Novell NetWare
  1520. entry    AH    7Ah
  1521.     AL    00h    installation check
  1522. return    AL    00h    not installed
  1523.         0FFh    installed
  1524.     ES:DI    pointer to FAR entry point for routines otherwise accessed
  1525.         through int 21h
  1526. note 1) Returns address of entry point for IPX and SPX.
  1527.      2) Parameters are listed in Chapter 13.
  1528.  
  1529.  
  1530. Function  87h    APPEND
  1531. entry    AH    87h
  1532.     AL    00h    APPEND installation check
  1533.         return    AH <> 0 if installed
  1534.         01h    APPEND - unknown
  1535.         02h    APPEND - version check
  1536. return    unknown
  1537.  
  1538.  
  1539. Function  88h    Microsoft Networks
  1540. entry    AH    88h
  1541.     AL    00h    network program installation check
  1542.         return    AH <> 0 if installed
  1543.             BX    installed component flags (test in this order!)
  1544.                bits 2    messenger
  1545.                 3    redirector
  1546.                 6    server
  1547.                 7    receiver
  1548.                 other bits not used, do not test
  1549.         01h    unknown
  1550.         02h    unknown
  1551.         03h    get current POST address
  1552.             return    ES:BX    POST address
  1553.         04h    set new POST address
  1554.             ES:BX    new POST address
  1555.         09h    network version check
  1556.  
  1557.                                     -155-
  1558.  
  1559. Function  89h    WHOA!        (slows system down for games)
  1560. entry    AH    89h
  1561.     AL    00h    installation check
  1562.         return    AL    00h    not installed
  1563.                 0FFh    installed
  1564.         01h    uninstall
  1565.         return    AL    0FDh    successful
  1566.                 0FEh    error
  1567.         02h    set delay count
  1568.         BX = delay count (larger values slow system down more)
  1569.         return    AL    0FDh    successful
  1570.                 0FEh    error
  1571. note    WHOA!.COM is copyright COMPUTE! Publications and Brad Crandall.
  1572.  
  1573.  
  1574. Function  0AAh    VIDCLOCK.COM
  1575. entry    AH    0AAh
  1576.     AL    00h    installation check
  1577. return    AL    00h    not installed
  1578.         0FFh    installed
  1579. note    VIDCLOCK.COM is a memory-resident clock by Thomas G. Hanlin III.
  1580.  
  1581.  
  1582. Function  0ADh    DISPLAY.SYS and KEYB.COM            (DOS 3.3+)
  1583. entry    AH    0B0h
  1584. other parameters unknown
  1585.  
  1586.  
  1587. Function  0AEh    DOS Installable Command             (DOS 3.3+)
  1588. entry    AH    0AEh
  1589.     AL    00h    installation check
  1590.         DX    0FFFFh
  1591.         DS:BX    pointer to command line
  1592.         return    AL    00h    execute command normally
  1593.                 0FFh    command is TSR extension to COMMAND
  1594.         01h    execute installed command
  1595.         DX    0FFFFh
  1596.         DS:SI    pointer to ?
  1597.         return    DS:SI    unknown
  1598. note 1) This apparently provides a mechanism for TSRs to install permanent
  1599.     extensions to COMMAND.COM. It seems that COMMAND.COM makes this call
  1600.     before executing the current command line, and does not execute the
  1601.     command itself if the return is 0FFh.
  1602.      2) Fn 01h apparently requests execution of a previous command which a call
  1603.     to fn 01h indicated was resident.
  1604.      3) Format of command line:
  1605.     offset    size    description
  1606.     00h    byte    max length of command line?
  1607.     01h    byte    count of bytes to follow
  1608.     03h   n bytes    command line text, terminated by 0Dh
  1609.  
  1610.  
  1611. Function  0B0h    GRAFTABL.COM or DISPLAY.SYS
  1612. entry    AH    0B0h
  1613. other parameters unknown
  1614.  
  1615.  
  1616. Function  0B7h    APPEND
  1617. entry    AH    0B7h
  1618.     AL    00h    installation check
  1619.         return    AH    nonzero if installed
  1620.         11h    retrieve full ASCIIZ pathname
  1621. return    unknown
  1622.  
  1623.                                     -156-
  1624.  
  1625. note 1) (4.0+) The full path name can be retrieved by doing a int 2Fh fn 0B711h
  1626.     before an open (int 21h 3Dh or 6Ch). The full path is put in your
  1627.     ASCIIZ string when you do the open, so be sure it is long enough.
  1628.      2) The APPEND command apparently covers parts of int 21h/6Ch even though
  1629.     Microsoft's 4.01 User's Reference says it covers only 0Fh, 23h, 2Dh,
  1630.     11h, 4Eh & 4Bh, some of those do require special switches. For 6Ch, it
  1631.     may be a function of the DX register. If DX=xx1x it looks only in the
  1632.     current directory, if DX=xx0x it will search the full append path. DX
  1633.     is called the open flag and gives what action to take if the file exits
  1634.     or does not exist.
  1635.  
  1636.  
  1637. Function  0B8h    Network
  1638. entry    AH    0B8h
  1639.     AL    00h    installation check
  1640.         return    AH    00h    not installed
  1641.                 nonzero installed
  1642.             BX    installed component flags (test in this order)
  1643.                bits 2    messenger
  1644.                 3    redirector
  1645.                 6    server
  1646.                 7    receiver
  1647. (LANtastic)    return    AL    00h    neither redirector or server installed
  1648.                 0FFh    redirector or server installed
  1649.             BL    bits indicating which software is installed
  1650.                    (both will be set when both software is running)
  1651.                 01000000b    server is installed
  1652.                 00001000b    redirector is installed
  1653.         01h    unknown
  1654.         02h    unknown
  1655.         03h    get current POST address
  1656.         return    ES:BX    POST address
  1657.         04h    set new POST address
  1658.             ES:BX    new POST address
  1659.         05h    unknown
  1660.         06h    unknown
  1661.         07h    unknown
  1662.         08h    unknown
  1663.         09h    version check (note 1)
  1664. other parameters unknown
  1665. note 1) for Lantastic LANOS:
  1666.     return    AH    major version number
  1667.         AL    minor version number
  1668.     The version numbers are returned as decimal numbers. For example,
  1669.     version 2.52 would be:
  1670.         AH    2
  1671.         AL    52 decimal or 34 hex
  1672.  
  1673.  
  1674. Function  0BBh    Network Functions
  1675. entry    AH    0BBh
  1676.     AL    00h    net command installation check
  1677.         01h, 02h unknown
  1678.         03h    get server POST address
  1679.         04h    set server POST address
  1680.  
  1681.  
  1682. Function  0BFh    REDIRIFS.EXE
  1683. entry    AH    0BFh
  1684. other parameters unknown
  1685.  
  1686.                                     -157-
  1687.  
  1688. Function 0D44Dh 4DOS Command Interpreter  (COMMAND.COM replacement)
  1689. entry    AX    0D44Dh    4DOS installation check
  1690.     BX    00h
  1691. return    If 4DOS is present in memory the following values will be returned:
  1692.     AX    44DDh
  1693.     BH    minor 4DOS version number
  1694.     BL    major 4DOS version number
  1695.         (same format as DOS int 21h/fn 30)
  1696.     CX    4DOS PSP segment address
  1697.     DL    4DOS shell number (0 for the first shell, 1 for the second,
  1698.         etc.; incremented each time a new copy of 4DOS is loaded over a
  1699.         root copy, either in a different multitasker window or via
  1700.         nested shells)
  1701. note 1) If you issue this call with BX <> 0 you will invoke some other function
  1702.     of 4DOS's low-memory server, and probably hang the system.
  1703.      2) This function is available in swapping mode ONLY. Also note that this
  1704.     tells you if 4DOS is loaded in memory somewhere - but not whether it is
  1705.     the parent process of your program. For example if there is a root 4DOS
  1706.     shell and a secondary copy of COMMAND.COM this function will still work.
  1707.     However you can determine if 4DOS is your parent process by comparing
  1708.     the value returned in the CX register with the PSP chain pointer at
  1709.     location 16 in your own PSP.
  1710.  
  1711.  
  1712. Function  0E3h    AnarKey    (keyboard command stack and alias program)
  1713. entry    AH    0E3h
  1714.     AL    00h    installation check
  1715. return    AL    00h    not installed
  1716.         0FFh    installed
  1717. notes  0E3h is the default function number, but can be set to any value from
  1718.        0C0h to 0FFh.
  1719.  
  1720.  
  1721. Function  0F7h    AUTOPARK.COM  (PD TSR hard disk parking utility)
  1722. entry    AH    0F7h
  1723.     AL    00h    installation check
  1724.         return    AL    00h    not installed
  1725.                 0FFh    installed
  1726.     01h    set parking delay
  1727.         BX:CX    32 bit count of 55ms timer ticks
  1728. note    AUTOPARK is a TSR HD parker by Alan D. Jones.
  1729.  
  1730.  
  1731. Function    Intel Communicating Applications Standard (CAS 1.01A)
  1732. entry    AH        (default; CAS multiplex number can be user-adjusted)
  1733.     AL    00h    Get Installed State
  1734.             return    AL    00h    not installed
  1735.                     01h    not installed, not OK to install
  1736.                     0FFh    installed
  1737.             note    No errors are returned.
  1738.         01h    Submit a Task
  1739.             DS:DX    ptr to ASCIIZ path and name of Task Control File
  1740.             return    AX    positive event handle or neg. error code
  1741.             note    Files associated with a task must stay in
  1742.                 existence until the task is complete or an
  1743.                 error will result.
  1744.         02h    Abort the Current Event
  1745.             return    AX    event handle of aborted event or
  1746.                     negative error code
  1747.             note    Terminating an event is not instantaneous. It
  1748.                 might take up to 30 seconds.
  1749.         03h    reserved
  1750.         04h    reserved
  1751.  
  1752.                                     -158-
  1753.         05h    Find First Entry in Queue
  1754.             CX    Status of the event you are seeking. This value
  1755.                 is compared with the field at offset 2 of the
  1756.                 Control File
  1757.                 0 - event has successfully completed
  1758.                 1 - event is waiting to be processed
  1759.                 2 - number has been dialed
  1760.                 3 - connection has been made (sending)
  1761.                 4 - connection has been made (receiving)
  1762.                 5 - event was aborted
  1763.                    -1 - chooses an event without regard to status
  1764.                     This value will probably be used most often
  1765.                 Other negative values match error codes in
  1766.                 Control File.
  1767.             DH    direction:
  1768.                 0 - Search forward chronologically (from the
  1769.                     first to the last occurring event)
  1770.                 1 - Search backward chronologically (from the
  1771.                     last to the first occurring event)
  1772.             DL    queue to search:
  1773.                 0 - Find first control file in Task Queue
  1774.                 1 - Find first control file in Receive Queue
  1775.                 2 - Find first control file in Log Queue
  1776.             return    AX    0, if successful, or negative error code
  1777.                 BX    event handle for this file
  1778.         06h    Find Next Entry in Queue
  1779.             DL    queue to search:
  1780.                 0 - Find next control file in Task Queue
  1781.                 1 - Find next control file in Receive Queue
  1782.                 2 - Find next control file in Log Queue
  1783.             return    AX    0, if successful, or negative error code
  1784.                 BX    event handle for this file
  1785.         07h    Open a File
  1786.             BX    event handle
  1787.             CX    receive file number
  1788.                 0 - the Receive Control File
  1789.                 1 - first received file
  1790.                 2 - second received file
  1791.                 3 - third received file
  1792.                 n - nth received file
  1793.             DL    queue:
  1794.                 0 - open control file in Task Queue
  1795.                 1 - open control file in Receive Queue or the
  1796.                     received data
  1797.          file specified in the CX register.
  1798.                 2 - Open control file in Log Queue.
  1799.             return    AX    0 if successful, or negative error code
  1800.                 BX    DOS file handle for the requested file
  1801.         08h    Delete a File
  1802.             BX    event handle
  1803.             CX    receive file number
  1804.                 0 - delete all files associated with a specific
  1805.                     Receive Control File (including the RCF)
  1806.                 1 - delete first received file associated with
  1807.                     the event handle
  1808.                 2 - delete the second received file associated
  1809.                     with the event handle.
  1810.                 n - delete the nth received file associated with
  1811.                     the event handle
  1812.             DL    queue:
  1813.                 0 - delete control file in Task Queue
  1814.                 1 - delete a file or files associated with an
  1815.                     event in the Receive Queue.
  1816.                 2 - delete control file in Log Queue
  1817.                     note   It is strongly recommended that this
  1818.                     function NOT be used to delete individual
  1819.                     Log Control Files to maintain the integrity
  1820.                     of the log.
  1821.  
  1822.                                     -159-
  1823.  
  1824.             return    AX    0 if successful, or negative error code
  1825.         09h    Delete All Files (in a queue)
  1826.             DL    queue:
  1827.                 0 - delete all control files in the Task Queue
  1828.                 1 - delete all control files in the Receive
  1829.                     Queue and all received files
  1830.                 2 - delete all control files in the Log Queue
  1831.             return    AX    0 if successful or negative error code
  1832.         0Ah    Get Event Date
  1833.             BX    event handle of event whose date you want to get
  1834.             DL    queue:
  1835.                 0 - task queue
  1836.                 1 - receive queue
  1837.                 2 - log queue
  1838.             return    AX    0 if successful or negative error code
  1839.                 CX    year  (1980-2099)
  1840.                 DH    month (1-12)
  1841.                 DL    day   (1-31)
  1842.         0Bh    Set Task Date
  1843.             BX    event handle
  1844.             CX    year  (1980-2099)
  1845.             DH    month (1-12)
  1846.             DL    day   (1-31)
  1847.             return    AX    0 if successful or negative error code
  1848.         0CH    Get Event Time
  1849.             BX    event handle
  1850.             DL    queue:
  1851.                 0 - task queue
  1852.                 1 - receive queue
  1853.                 2 - log queue
  1854.             return    AX    0 if successful or negative error code
  1855.                 CH    hour    (0-23)
  1856.                 CL    minutes (0-59)
  1857.                 DH    seconds (0-59)
  1858.                 DL    0
  1859.         0DH    Set Task Time
  1860.             BX    event handle
  1861.             CH    hour    (0-23)
  1862.             CL    minutes (0-59)
  1863.             DH    seconds (0-59)
  1864.             DL    unused
  1865.             return    AX    0 if successful or negative error code
  1866.         0EH    Get External Data Block
  1867.             DS:DX points to a 256-byte EDB area
  1868.             return    AX    0 if successful or negative error code
  1869.             note    EDB area is filled with the External Data Block
  1870.                 block format: (values in decimal)
  1871.                   Offset Length       Description
  1872.                  0    1    CAS major version number
  1873.                  1    1    CAS minor version number
  1874.                  2    68   ASCIIZ path to directory containing
  1875.                        Resident Manager and CAS software.
  1876.                        The path must end with a backslash
  1877.                  70   13   ASCIIZ name of current phonebook
  1878.                        (the CAS subdirectory is assumed)
  1879.                  83   13   AZCIIZ name of current logo file
  1880.                        (the CAS subdirectory is assumed)
  1881.                  96   32   ASCIIZ default sender name
  1882.                  128  21   ASCIIZ CSID (CCITT fax device ID)
  1883.                  149  107  Reserved
  1884.  
  1885.                                     -160-
  1886.  
  1887.         0Fh    Get/Set Autoreceive State
  1888.             DL    function code:
  1889.                 0 - get current autoreceive state
  1890.                 1 - set current state to value in DH
  1891.                 DH    # rings before answer or 0 to disable
  1892.             return    AX    current state or negative error code
  1893.                     0 - Autoreceive disabled
  1894.                     positive # - # rings before hdw answers
  1895.         10h    Get Current Event Status
  1896.             DS:DX    pointer to a 444 byte status area
  1897.             return    AX    0 if successful or negative error code
  1898.                 BX    number of the current event (AX=0)
  1899.         11h    Get Queue Status
  1900.             DL    queue:
  1901.                 0 - find status of Task Queue
  1902.                 1 - find status of Receive Queue
  1903.                 2 - find status of Log Queue
  1904.             return    AX    # changes to queue since Resident
  1905.                     Manager started or negative error code
  1906.                     If changes exceeds 7FFFH, the count
  1907.                     begins again at 0.
  1908.                 BX    current # of Control Files in queue
  1909.                 CX    current # of received files
  1910.         12h    Get Hardware Status
  1911.             DS:DX    pointer to a 128-byte status area
  1912.             return    AX    0 if successful, negative if not
  1913.             DS:DX    pointer to filled 128-byte status area
  1914.         13h    Run Diagnostics
  1915.             DL    Mode
  1916.                 0 - report progress of diagnostics
  1917.                 1 - start running diagnostics
  1918.             return    if DL=1, AX=0 or a negative error code.
  1919.                 if DL=0, AX=40h or positive number indicating
  1920.                      diagnostics passed. A negative value
  1921.                      indicates failure and containes the
  1922.                      error code
  1923.         14h    Move Received File
  1924.             BX    event handle
  1925.             CX    receive file number
  1926.                 (must be nonzero to specify a received file)
  1927.                 1 - first received file
  1928.                 2 - second received file
  1929.                 3 - third received file
  1930.                 n - nth received file
  1931.             DS:DX    pointer to new ASCIIZ pathname and filename.
  1932.                 This file must not exist already
  1933.             return    AX    0 if successful or negative error code
  1934.             note    The path to the new directory must exist.
  1935.                 This function cannot create directories.
  1936.         15h    Submit a Single File to Send
  1937.             DS:DX    pointer to variable-length data area
  1938.             return    AX    positive event handle or neg. error code
  1939.             note 1) variable-length data area format:
  1940.                  Offset Length    Description
  1941.                 0    1      Transfer type:
  1942.                       0 - 200x200 dpi, facsimile mode
  1943.                       1 - 100x200 dpi, facsimile mode
  1944.                       2 - file transfer mode
  1945.                       3-127 - Reserved.
  1946.                 1    1      Text size (if ASCII file, fax mode)
  1947.                       0 - 80-column
  1948.                       1 - 132-column
  1949.                       2-127 - reserved
  1950.                 2    2      time to send, in DOS file time format
  1951.  
  1952.                                     -161-
  1953.  
  1954.                 4    2      date to send, in DOS file time format
  1955.                       note: Setting both the time and date
  1956.                       fields to 0 schedules the file to be
  1957.                       sent immediately
  1958.                 6    32   ASCIIZ Destination Name  (To: field)
  1959.                 38   80   ASCIIZ pathname of the file to send
  1960.                 118  47   ASCIIZ phone number to call
  1961.                 165  64   ASCIIZ application-specific tag field
  1962.                 229  1      reserved; set to zero
  1963.                 230  1      cover page flag:
  1964.                       0 - don't send cover page
  1965.                       1 - send cover page
  1966.                       2-127 - Reserved
  1967.                 231  23   reserved; set to zero
  1968.                 254  var  ASCIIZ cover text (if offset 230=1)
  1969.                  2) The individual fields have the same meaning as
  1970.                 in a Task Control File
  1971.                  3) You must set all fields, except for the Appli-
  1972.                 cation-Specific Tag field, before calling this
  1973.                 function. However, you can set the Destination
  1974.                 Name and Cover Text fields to an empty string
  1975.         16h-80h Reserved by Intel for future expansion
  1976.  
  1977.  
  1978.  
  1979. DOS 2Fh functions 01h (PRINT), 02h (ASSIGN), 10h (SHARE):
  1980. return    AX    Error
  1981.         Codes        Description
  1982.         01h    invalid function number
  1983.         02h    file not found
  1984.         03h    path not found
  1985.         04h    too many open files
  1986.         05h    access denied
  1987.         06h    invalid handle
  1988.         08h    queue full
  1989.         09h    busy
  1990.         0Ch    name too long
  1991.         0Fh    invalid drive was specified
  1992.     CF    clear (0) if OK
  1993.         set   (1) if error - error returned in AX
  1994. note 1) The multiplex numbers AH=0h through AH=7Fh are reserved for DOS.
  1995.     Applications should use multiplex numbers 80h through 0FFh.
  1996.      2) When in the chain for int 2Fh, if your code calls DOS or if you execute
  1997.     with interrupts enabled, your code must be reentrant/recursive.
  1998.      3) Important! In versions of DOS prior to 3.0, the int 2Fh vector was
  1999.     initialized to zero rather than being pointed into the DOS service area.
  2000.     You must initialize this vector manually under DOS 2.x.
  2001.  
  2002.                                     -162-
  2003.  
  2004. ┌─────────────────────────────────────────────────────────────────────────────┐
  2005. │ Miscellaneous Interrupts - in numeric order                      │
  2006. └─────────────────────────────────────────────────────────────────────────────┘
  2007.  
  2008.  
  2009. ┌─────────────────────────────────────────────────────────────────────────────┐
  2010. │Interrupt 30h     FAR jump instruction for CP/M-style calls ............. 5**15│
  2011. └─────────────────────────────────────────────────────────────────────────────┘
  2012. note    The CALL 5 entry point does a FAR jump to here    (not a vector!)
  2013.  
  2014.  
  2015. ┌─────────────────────────────────────────────────────────────────────────────┐
  2016. │Interrupt 31h     Unknown ............................................... 5**16│
  2017. └─────────────────────────────────────────────────────────────────────────────┘
  2018.  
  2019.  
  2020. ┌─────────────────────────────────────────────────────────────────────────────┐
  2021. │Interrupt 32h     Unknown ............................................... 5**17│
  2022. └─────────────────────────────────────────────────────────────────────────────┘
  2023.  
  2024.  
  2025. ┌─────────────────────────────────────────────────────────────────────────────┐
  2026. │Interrupt 33h     Used by Microsoft Mouse Driver Function Calls ......... 5**18│
  2027. └─────────────────────────────────────────────────────────────────────────────┘
  2028.         See Chapter 14.
  2029.  
  2030.  
  2031. ┌─────────────────────────────────────────────────────────────────────────────┐
  2032. │Interrupt 34h     Turbo C/Microsoft languages - Floating Point emulation  5**19│
  2033. └─────────────────────────────────────────────────────────────────────────────┘
  2034.         This interrupt emulates opcode 0D8h
  2035.  
  2036.  
  2037. ┌─────────────────────────────────────────────────────────────────────────────┐
  2038. │Interrupt 35h     Turbo C/Microsoft languages - Floating Point emulation  5**20│
  2039. └─────────────────────────────────────────────────────────────────────────────┘
  2040.         This interrupt emulates opcode 0D9h
  2041.  
  2042.  
  2043. ┌─────────────────────────────────────────────────────────────────────────────┐
  2044. │Interrupt 36h     Turbo C/Microsoft languages - Floating Point emulation  5**21│
  2045. └─────────────────────────────────────────────────────────────────────────────┘
  2046.         This interrupt emulates opcode 0DAh
  2047.  
  2048. ┌─────────────────────────────────────────────────────────────────────────────┐
  2049. │Interrupt 37h     Turbo C/Microsoft languages - Floating Point emulation  5**22│
  2050. └─────────────────────────────────────────────────────────────────────────────┘
  2051.         This interrupt emulates opcode 0DBh
  2052.  
  2053. ┌─────────────────────────────────────────────────────────────────────────────┐
  2054. │Interrupt 38h     Turbo C/Microsoft languages - Floating Point emulation  5**23│
  2055. └─────────────────────────────────────────────────────────────────────────────┘
  2056.         This interrupt emulates opcode 0DCh
  2057.  
  2058. ┌─────────────────────────────────────────────────────────────────────────────┐
  2059. │Interrupt 39h     Turbo C/Microsoft languages - Floating Point emulation  5**24│
  2060. └─────────────────────────────────────────────────────────────────────────────┘
  2061.         This interrupt emulates opcode 0DDh
  2062.  
  2063. ┌─────────────────────────────────────────────────────────────────────────────┐
  2064. │Interrupt 3Ah     Turbo C/Microsoft languages - Floating Point emulation  5**25│
  2065. └─────────────────────────────────────────────────────────────────────────────┘
  2066.         This interrupt emulates opcode 0DEh
  2067.  
  2068.                                     -163-
  2069.  
  2070. ┌─────────────────────────────────────────────────────────────────────────────┐
  2071. │Interrupt 3Bh     Turbo C/Microsoft languages - Floating Point emulation  5**26│
  2072. └─────────────────────────────────────────────────────────────────────────────┘
  2073.         This interrupt emulates opcode 0DFh
  2074.  
  2075. ┌─────────────────────────────────────────────────────────────────────────────┐
  2076. │Interrupt 3Ch     Turbo C/Microsoft languages - Floating Point emulation  5**27│
  2077. └─────────────────────────────────────────────────────────────────────────────┘
  2078.         This interrupt emulates instructions with an ES segment
  2079.         override.
  2080.  
  2081. ┌─────────────────────────────────────────────────────────────────────────────┐
  2082. │Interrupt 3Dh     Turbo C/Microsoft languages - Floating Point emulation  5**28│
  2083. └─────────────────────────────────────────────────────────────────────────────┘
  2084.         This interrupt emulates a standalone FWAIT instruction
  2085.  
  2086. ┌─────────────────────────────────────────────────────────────────────────────┐
  2087. │Interrupt 3Eh     Turbo C/Microsoft languages - Floating Point emulation  5**29│
  2088. └─────────────────────────────────────────────────────────────────────────────┘
  2089.         Unknown
  2090.  
  2091. ┌─────────────────────────────────────────────────────────────────────────────┐
  2092. │Interrupt 3Fh     Overlay Manager Interrupt (Microsoft LINK.EXE) ........ 5**30│
  2093. └─────────────────────────────────────────────────────────────────────────────┘
  2094.         Default overlay interrupt; may be changed with LINK command
  2095.         line switch.
  2096.  
  2097. ┌─────────────────────────────────────────────────────────────────────────────┐
  2098. │Interrupt 40h     Hard Disk BIOS ........................................ 5**31│
  2099. └─────────────────────────────────────────────────────────────────────────────┘
  2100.         Pointer to disk BIOS entry when a hard disk controller is
  2101.         installed. The BIOS routines use int 30h to revector the
  2102.         diskette handler (original int 13h) here so int 40 may be used
  2103.         for hard disk control.
  2104.     note 1) Keyboard interrupt for DEC Rainbow.
  2105.  
  2106. ┌─────────────────────────────────────────────────────────────────────────────┐
  2107. │Interrupt 41h     Hard Disk Parameters .................................. 5**32│
  2108. └─────────────────────────────────────────────────────────────────────────────┘
  2109.         Pointer to first Hard Disk Parameter Block, normally located
  2110.         in the controller card's ROM. This table may be copied to RAM
  2111.         and changed, and this pointer revectored to the new table.
  2112. note 1) XT, AT,XT/2, XT/286, PS/2 except ESDI disks
  2113.      2) format of parameter table is:
  2114.     word    cylinders
  2115.     byte    heads
  2116.     word    starting reduced write current cylinder (XT only, 0 for others)
  2117.     word    starting write pre-comp cylinder
  2118.     byte    maximum ECC burst length
  2119.     byte    control byte
  2120.        bits 0-2    drive option (XT only, 0 for others)
  2121.         3    set if more than 8 heads
  2122.         4    always 0
  2123.         5    set if manufacturer's defect map on max cylinder+1
  2124.         6    disable ECC retries
  2125.         7    disable access retries
  2126.     byte    standard timeout (XT only, 0 for others)
  2127.     byte    formatting timeout (XT only, 0 for others)
  2128.     byte    timeout for checking drive (XT only, 0 for others)
  2129.     word    landing zone    (AT, PS/2)
  2130.     byte    sectors/track    (AT, PS/2)
  2131.     byte    0  (zeroes)
  2132.      3) normally vectored to ROM table when system is initialized.
  2133.  
  2134.                                     -164-
  2135.  
  2136. ┌─────────────────────────────────────────────────────────────────────────────┐
  2137. │Interrupt 42h     Pointer to screen BIOS entry .......................... 5**33│
  2138. └─────────────────────────────────────────────────────────────────────────────┘
  2139.         EGA, VGA, PS/2
  2140.         Relocated (by EGA, etc.) video handler (original int 10h).
  2141.         Revectors int 10 (BIOS video) calls to EGA BIOS.
  2142.         Also used by Zenith Z-100.
  2143.  
  2144.  
  2145. ┌─────────────────────────────────────────────────────────────────────────────┐
  2146. │Interrupt 43h     Pointer to EGA Graphics Character Table ............... 5**34│
  2147. └─────────────────────────────────────────────────────────────────────────────┘
  2148.         The POST initializes this vector pointing to the default table
  2149.         located in the EGA ROM BIOS. (PC-2 and up). Not initialized if
  2150.         EGA not present.
  2151.          This vector was referred to (mistakenly) as the Video
  2152.         Parameters table in the original EGA BIOS listings.
  2153.  
  2154.  
  2155. ┌─────────────────────────────────────────────────────────────────────────────┐
  2156. │Interrupt 44h     Pointer to graphics character table ................... 5**35│
  2157. └─────────────────────────────────────────────────────────────────────────────┘
  2158. (0:0110h)    This table contains the dot patterns for the first 128
  2159.         characters in video modes 4,5, and 6, and all 256 characters
  2160.         in all additional graphics modes. Not initialized if EGA not
  2161.         present.
  2162. note 1) EGA/VGA/CONV/PS - EGA/PCjr fonts, characters 00h to 7Fh.
  2163.      2) Novell NetWare - High-Level Language API.
  2164.      3) This interrupt is not used by some EGA cards.
  2165.      4) Also used by Zenith Z-100.
  2166.  
  2167.  
  2168. ┌─────────────────────────────────────────────────────────────────────────────┐
  2169. │Interrupt 45h     Reserved by IBM  (not initialized) .................... 5**36│
  2170. └─────────────────────────────────────────────────────────────────────────────┘
  2171.         also used by Zenith Z-100
  2172.  
  2173.  
  2174. ┌─────────────────────────────────────────────────────────────────────────────┐
  2175. │Interrupt 46h     Pointer to second hard disk parameter block ........... 5**37│
  2176. └─────────────────────────────────────────────────────────────────────────────┘
  2177.         AT, XT/286, PS/2
  2178.         (see int 41h) (except ESDI hard disks) (not initialized unless
  2179.         specific user software calls for it)
  2180.         also used by Zenith Z-100
  2181.  
  2182.  
  2183. ┌─────────────────────────────────────────────────────────────────────────────┐
  2184. │Interrupt 47h     Reserved by IBM  (not initialized) .................... 5**38│
  2185. └─────────────────────────────────────────────────────────────────────────────┘
  2186.  
  2187.  
  2188. ┌─────────────────────────────────────────────────────────────────────────────┐
  2189. │Interrupt 48h     Cordless Keyboard Translation ......................... 5**39│
  2190. └─────────────────────────────────────────────────────────────────────────────┘
  2191. (0:0120h)    This vector points to code to translate the cordless keyboard
  2192.         scancodes into normal 83-key values. The translated scancodes
  2193.         are then passed to int 9. (not initialized on PC or AT)
  2194.         (PCjr, XT [never delivered])
  2195.  
  2196.                                     -165-
  2197.  
  2198. ┌─────────────────────────────────────────────────────────────────────────────┐
  2199. │Interrupt 49h     Non-keyboard Scan Code Translation Table Address (PCjr) 5**40│
  2200. └─────────────────────────────────────────────────────────────────────────────┘
  2201. (0:0124h)    PCjr translate table, TI Pro video
  2202.  
  2203.         1)    This interrupt is used for operation of non-keyboard devices
  2204.         on the PCjr, such as the Keytronic Numeric Keypad.
  2205.         This interrupt has the address of a table used to translate
  2206.         non-keyboard scancodes (greater than 85 excepting 255). This
  2207.         interrupt can be revectored by a user application. IBM
  2208.         recommends that the default table be stored at the beginning
  2209.         of an application that required revectoring this interrupt,
  2210.         and that the default table be restored when the application
  2211.         terminates. (not initialized on PC or AT)
  2212.  
  2213.         The PCjr BIOS can interpret scancodes other than those
  2214.         generated by the keyboard to allow for expansion. The keyboard
  2215.         generates scancodes from 01h to 055h, including 0FFh. Any
  2216.         scancodes above 55h (56h through 7Eh for make codes and 0D6h
  2217.         through 0FEh for break codes) are processed in the following
  2218.         manner:
  2219.         1) if the incoming make code falls within the range of the
  2220.            translate table whose address is pointed to by int 49h, it
  2221.            is translated into the corresponding scancode. Any incoming
  2222.            break codes above 0D5h are ignored.
  2223.         2) if the new translated scancode is less than 56h, it is
  2224.            processed by the BIOS as a keyboard scancode and the same
  2225.            data is placed in the BIOS keyboard buffer.
  2226.         3) if the translated scancode is higher than 55h or the
  2227.            incoming scancode is outside the range of the translate
  2228.            table, 40h is added creating a new extended scancode. The
  2229.            extended scancode is placed in the BIOS keyboard buffer with
  2230.            the character code of 00h (NUL). This utilitizes the range
  2231.            of 96h through 0BEh for scancodes 56h through 7Eh.
  2232.  
  2233.         The default translate-table maps scancodes 56h through 6Ah to
  2234.         existing keyboard values. Codes 6Bh theough 0BEh are mapped (by
  2235.         adding 40h) to extended codes 0ABh through 0FEh since they are
  2236.         outside the range of the default translate table.
  2237.  
  2238.         The format of the translate table is:
  2239.         0    length - the number of nonkeyboard scancodes that are
  2240.             mapped within the table (from 1 to n).
  2241.         1 to n    word  high byte 00h (NUL) byte scancode with low order
  2242.             byte representing the scancode mapped values relative
  2243.             to their input values within the range of 56h through
  2244.             7Eh.
  2245.  
  2246.         With this layout, all keyboard scancodes can be intercepted
  2247.         through int 9h and and nonkeyboard scancodes can be intercepted
  2248.         through int 48h.
  2249.  
  2250.         2)    On the TI Professional, this interrupt is used for some video
  2251.         services.
  2252.         entry    AH    17h    Get Display Offset
  2253.         return    ES:DI    segment/offset of current display buffer
  2254.         note    The TI Pro has only 2048 bytes of character RAM, but it
  2255.             is followed by another 2048 bytes of "phantom" RAM
  2256.             (i.e. the same 2048 bytes are available at two
  2257.             different addresses) so that wraparound checks need not
  2258.             be made when writing to the screen. The attribute RAM
  2259.             is "shadowed" behind the character RAM through the
  2260.             attribute register.
  2261.  
  2262.                                     -166-
  2263.  
  2264. ┌─────────────────────────────────────────────────────────────────────────────┐
  2265. │Interrupt 4Ah     Real-Time Clock Alarm (Convertible, PS/2) ............. 5**41│
  2266. └─────────────────────────────────────────────────────────────────────────────┘
  2267.         (not initialized on PC or AT)
  2268.         Invoked by BIOS when real-time clock alarm occurs.
  2269.         Used by TI Professional PC for keyboard DSR interface
  2270.           (keyboard BIOS interrupt)
  2271.  
  2272.  
  2273. ┌─────────────────────────────────────────────────────────────────────────────┐
  2274. │Interrupt 4Bh     Reserved by IBM  (not initialized) .................... 5**42│
  2275. └─────────────────────────────────────────────────────────────────────────────┘
  2276.  
  2277.  
  2278. ┌─────────────────────────────────────────────────────────────────────────────┐
  2279. │Interrupt 4Ch     Reserved by IBM  (not initialized) .................... 5**43│
  2280. └─────────────────────────────────────────────────────────────────────────────┘
  2281.  
  2282.  
  2283. ┌─────────────────────────────────────────────────────────────────────────────┐
  2284. │Interrupt 4Dh     Reserved by IBM  (not initialized) .................... 5**44│
  2285. └─────────────────────────────────────────────────────────────────────────────┘
  2286.  
  2287.  
  2288.  
  2289. ┌─────────────────────────────────────────────────────────────────────────────┐
  2290. │Interrupt 4Eh     Reserved by IBM  (not initialized) .................... 5**45│
  2291. └─────────────────────────────────────────────────────────────────────────────┘
  2292.         Used instead of int 13h for disk I/O on TI Professional PC
  2293.  
  2294.  
  2295. ┌─────────────────────────────────────────────────────────────────────────────┐
  2296. │Interrupt 4Fh     Reserved by IBM  (not initialized) .................... 5**46│
  2297. └─────────────────────────────────────────────────────────────────────────────┘
  2298.  
  2299.  
  2300. ┌─────────────────────────────────────────────────────────────────────────────┐
  2301. │Interrupt 50-57 IRQ0-IRQ7 Relocation .................................. 5**47│
  2302. └─────────────────────────────────────────────────────────────────────────────┘
  2303.         IRQ0-IRQ7 relocated by DesQview
  2304.         (normally not initialized)
  2305.         IRQ0-IRQ7 relocated by IBM 3278 Emulation Control Program
  2306.  
  2307.  
  2308. ┌─────────────────────────────────────────────────────────────────────────────┐
  2309. │Interrupt 58h     Reserved by IBM  (not initialized) .................... 5**48│
  2310. └─────────────────────────────────────────────────────────────────────────────┘
  2311.  
  2312.  
  2313. ┌─────────────────────────────────────────────────────────────────────────────┐
  2314. │Interrupt 59h     Reserved by IBM  (not initialized) .................... 5**49│
  2315. └─────────────────────────────────────────────────────────────────────────────┘
  2316.     GSS Computer Graphics Interface (GSS*CGI)
  2317. entry    DS:DX    Pointer to block of 5 array pointers
  2318. return    CF    0
  2319.     AX    return code
  2320.     CF    1
  2321.     AX    error code
  2322. note 1) Int 59h is the means by which GSS*CGI language bindings communicate
  2323.     with GSS*CGI device drivers and the GSS*CGI device driver controller.
  2324.      2) Also used by the IBM Graphic Development Toolkit.
  2325.  
  2326.                                     -167-
  2327.  
  2328. ┌─────────────────────────────────────────────────────────────────────────────┐
  2329. │Interrupt 5Ah     Reserved by IBM  (not initialized)  ................... 5**50│
  2330. └─────────────────────────────────────────────────────────────────────────────┘
  2331.         IBM Cluster Adapter BIOS entry address
  2332.  
  2333.  
  2334. ┌─────────────────────────────────────────────────────────────────────────────┐
  2335. │Interrupt 5Bh     Reserved by IBM  (not initialized) .................... 5**51│
  2336. └─────────────────────────────────────────────────────────────────────────────┘
  2337.         Used by IBM Cluster Adapter
  2338.  
  2339.  
  2340. ┌─────────────────────────────────────────────────────────────────────────────┐
  2341. │Interrupt 5Ah     Cluster Adapter BIOS entry address .................... 5**52│
  2342. └─────────────────────────────────────────────────────────────────────────────┘
  2343.         (normally not initialized)
  2344.  
  2345.  
  2346. ┌─────────────────────────────────────────────────────────────────────────────┐
  2347. │Interrupt 5Bh     Reserved by IBM  (not initialized) .................... 5**53│
  2348. └─────────────────────────────────────────────────────────────────────────────┘
  2349.         Used by cluster adapter?
  2350.  
  2351.  
  2352. ┌─────────────────────────────────────────────────────────────────────────────┐
  2353. │Interrupt 5Ch     NETBIOS interface entry port, TOPS .................... 5**54│
  2354. └─────────────────────────────────────────────────────────────────────────────┘
  2355.         See Chapter 13 for information on network programming.
  2356.     note 1) The Texas Instruments Professional PC (Ti Pro) uses 5Ch for
  2357.         the Pause key on the keyboard. The TI BIOS allows any user
  2358.         routine to execute from the Pause interrupt as long as it
  2359.         eventually returns.
  2360.          2) Used by Windows/386 by Virtual Machine routines.
  2361.  
  2362.  
  2363. ┌─────────────────────────────────────────────────────────────────────────────┐
  2364. │Interrupt 5Dh     Reserved by IBM  (not initialized) .................... 5**55│
  2365. └─────────────────────────────────────────────────────────────────────────────┘
  2366.     note 1) The Texas Instruments Professional PC (Ti Pro) uses 5Ch for
  2367.         the keyboard services.
  2368.  
  2369.  
  2370. ┌─────────────────────────────────────────────────────────────────────────────┐
  2371. │Interrupt 5Eh     Reserved by IBM  (not initialized) .................... 5**56│
  2372. └─────────────────────────────────────────────────────────────────────────────┘
  2373.     note 1) TI Professional PC - Program Break.
  2374.  
  2375.  
  2376. ┌─────────────────────────────────────────────────────────────────────────────┐
  2377. │Interrupt 5Fh     Reserved by IBM  (not initialized) .................... 5**57│
  2378. └─────────────────────────────────────────────────────────────────────────────┘
  2379.     note 1) TI Professional PC - Keyboard queueing.
  2380.  
  2381.  
  2382. ┌─────────────────────────────────────────────────────────────────────────────┐
  2383. │Interrupt 60h-67h  User Program Interrupts ............................ 5**58│
  2384. └─────────────────────────────────────────────────────────────────────────────┘
  2385.            (available for general use)
  2386.            Various major programs make standardized use of this group
  2387.            of interrupts. Details of common use follows:
  2388.  
  2389.                                     -168-
  2390.  
  2391. ┌─────────────────────────────────────────────────────────────────────────────┐
  2392. │Interrupt 60h     Network OS Interface                          │
  2393. └─────────────────────────────────────────────────────────────────────────────┘
  2394.           1) Used by 10-Net network.
  2395.           2) Used by FTP Driver - PC/TCP Packet Driver Specification
  2396.           3) See Chapter 13 for network programming calls.
  2397.           4) Used by TOPS netork (TTALK.EXE).
  2398.  
  2399.  
  2400. ┌─────────────────────────────────────────────────────────────────────────────┐
  2401. │Interrupt 67h     Expanded Memory Board Driver Interrupt               │
  2402. └─────────────────────────────────────────────────────────────────────────────┘
  2403.           1) Used by Lotus-Intel-Microsoft Expanded Memory Specification
  2404.          3.1 and higher. (EMS and LIM)
  2405.           2) Used by Ashton-Tate/Quadram/AST Enhanced Expanded Memory
  2406.          Specification 3.1 and higher. (EEMS)
  2407.           3) Used by Phar Lap/Quarterdeck VCPI v1.0.
  2408.           4) See Chapter 10 for EMS/EEMS programming information.
  2409.           5) The Advance Digital PC Slave board (also marketed by Alloy)
  2410.          contains its own 8mHz 8086, up to 768K of on-card memory and
  2411.          a built-in monochrome monitor adapter, communicating with an
  2412.          RS232 terminal 19.2KBaud. Their operating system is an
  2413.          adaptation of MSDOS 2.11 called RTNX or ATNX. ?TNX uses
  2414.          interrupt 67h for record locking, using an "interrupt 67h
  2415.          semaphore" system in which a data record access must be
  2416.          preceded by a call to int 67h with a string that contains a
  2417.          filename and a record number to lock.
  2418.           6) Some Adaptec hard disk controllers have problems related to
  2419.          their use of int 67h. Supposedly the Adaptec can be made to
  2420.          use a driver instead of ROM. The driver is generated by
  2421.          running the ROM program at C800:5 and this fixes the problem.
  2422.          Apparently this driver is called ADAPTEC.DRV. Check with
  2423.          Adaptec if you suspect a problem.
  2424.  
  2425.  
  2426. ┌─────────────────────────────────────────────────────────────────────────────┐
  2427. │Interrupt 68h     Not Used  (not initialized) ........................... 5**59│
  2428. └─────────────────────────────────────────────────────────────────────────────┘
  2429.         APPC/PC Network Interface. See Chapter 13.
  2430.  
  2431.  
  2432. ┌─────────────────────────────────────────────────────────────────────────────┐
  2433. │Interrupt 69h     Not Used  (not initialized) ........................... 5**60│
  2434. └─────────────────────────────────────────────────────────────────────────────┘
  2435.  
  2436.  
  2437. ┌─────────────────────────────────────────────────────────────────────────────┐
  2438. │Interrupt 6Ah     Not Used  (not initialized) ........................... 5**61│
  2439. └─────────────────────────────────────────────────────────────────────────────┘
  2440.  
  2441.  
  2442. ┌─────────────────────────────────────────────────────────────────────────────┐
  2443. │Interrupt 6Bh     Not Used  (not initialized) ........................... 5**62│
  2444. └─────────────────────────────────────────────────────────────────────────────┘
  2445.  
  2446.  
  2447. ┌─────────────────────────────────────────────────────────────────────────────┐
  2448. │Interrupt 6Ch     System Resume Vector (Convertible) .................... 5**63│
  2449. └─────────────────────────────────────────────────────────────────────────────┘
  2450.         (not initialized on PC)
  2451.         DOS 3.2 Realtime Clock update
  2452.  
  2453.                                     -169-
  2454.  
  2455. ┌─────────────────────────────────────────────────────────────────────────────┐
  2456. │Interrupt 6Dh     Not Used  (not initialized) ........................... 5**64│
  2457. └─────────────────────────────────────────────────────────────────────────────┘
  2458.         Paradise VGA - internal usage
  2459.  
  2460.  
  2461. ┌─────────────────────────────────────────────────────────────────────────────┐
  2462. │Interrupt 6Eh     Not Used  (not initialized) ........................... 5**65│
  2463. └─────────────────────────────────────────────────────────────────────────────┘
  2464.  
  2465.  
  2466.  
  2467. ┌─────────────────────────────────────────────────────────────────────────────┐
  2468. │Interrupt 6Fh     10-Net API............................................. 5**66│
  2469. └─────────────────────────────────────────────────────────────────────────────┘
  2470.          See Chapter 13.
  2471.  
  2472.  
  2473. ┌─────────────────────────────────────────────────────────────────────────────┐
  2474. │Interrupt 70h     IRQ 8, Real Time Clock Interrupt (AT, XT/286, PS/2) ... 5**67│
  2475. └─────────────────────────────────────────────────────────────────────────────┘
  2476.  
  2477.      This interrupt services the real-time clock hardware.    The hardware
  2478.      supports 2 modes of operation, an interrupt at a specific 24 hour
  2479.      interval (i.e 9:42 am), or repeatedly every 0.976 ms (1,024 kHz).
  2480.      Both modes can operate at the same time if needed.
  2481.  
  2482.      In the 24 hour alarm mode, the interrupt is vectored here by hardware
  2483.      and interrupt 4Ah is called to alert the application program of the
  2484.      alarm.  Int 4Ah is not handled by the BIOS other than to return, and
  2485.      is normally revectored by a particular application using the alarm.
  2486.  
  2487.      When repeating interrupt mode is active, the 32-bit microsecond
  2488.      counter consisting of timer_clk_low and timer_clk_hi is decremented
  2489.      by 976 us on every interrupt.    When the timer reaches zero, the
  2490.      byte pointed to by the offset @timer_wait_off and and segment
  2491.      @timer_wait_seg is set to 80h (this pointer is set by an application
  2492.      program through int 1Ah function ah=6).
  2493.  
  2494.  
  2495.  
  2496. ┌─────────────────────────────────────────────────────────────────────────────┐
  2497. │Interrupt 71h     IRQ 9, Redirected to IRQ 8 (AT, XT/286, PS/2) ......... 5**68│
  2498. └─────────────────────────────────────────────────────────────────────────────┘
  2499.         LAN Adapter 1 (rerouted to int 0Ah [IRQ2] by BIOS)
  2500.  
  2501.  
  2502.  
  2503. ┌─────────────────────────────────────────────────────────────────────────────┐
  2504. │Interrupt 72h     IRQ 10  (AT, XT/286, PS/2)  Reserved .................. 5**69│
  2505. └─────────────────────────────────────────────────────────────────────────────┘
  2506.            Hardware servicer (called by hardware 8259-2, IRQ 10).
  2507.  
  2508.  
  2509.  
  2510. ┌─────────────────────────────────────────────────────────────────────────────┐
  2511. │Interrupt 73h     IRQ 11  (AT, XT/286, PS/2)  Reserved .................. 5**70│
  2512. └─────────────────────────────────────────────────────────────────────────────┘
  2513.            Hardware servicer (called by hardware 8259-2, IRQ 11).
  2514.  
  2515.  
  2516. ┌─────────────────────────────────────────────────────────────────────────────┐
  2517. │Interrupt 74h     IRQ 12  Mouse Interrupt (PS/2) ........................ 5**71│
  2518. └─────────────────────────────────────────────────────────────────────────────┘
  2519.            Hardware servicer (called by hardware 8259-2, IRQ 12).
  2520.  
  2521.                                     -170-
  2522.  
  2523. ┌─────────────────────────────────────────────────────────────────────────────┐
  2524. │Interrupt 75h     IRQ 13, Coprocessor Error (AT) ........................ 5**72│
  2525. └─────────────────────────────────────────────────────────────────────────────┘
  2526.         BIOS redirects math coprocessor errors to int 2 (NMI).
  2527.  
  2528.         The math co-processor 80287 invokes this interrupt. Int 75h
  2529.         calls the non-maskable interrupt int 2 to halt the system
  2530.         (80287 is not used if this vector is left pointing here).
  2531.         Programs which use the 80287 must re-vector this interrupt to
  2532.         use the 80287.
  2533.  
  2534.  
  2535.  
  2536. ┌─────────────────────────────────────────────────────────────────────────────┐
  2537. │Interrupt 76h     IRQ 14, Hard Disk Controller (AT, XT/286, PS/2) ....... 5**73│
  2538. └─────────────────────────────────────────────────────────────────────────────┘
  2539.         (called by hardware 8259-2 IRQ 14)
  2540.            When the hard disk controller has completed its task, it signals
  2541.            completion though hardware activation of int 76h. The status in
  2542.            hdsk_int_flags is set to "done", a value of 0FFh. Int 15/fn91h
  2543.            may also be called to signal the interrupt is done.
  2544.  
  2545.  
  2546. ┌─────────────────────────────────────────────────────────────────────────────┐
  2547. │Interrupt 77h     IRQ 15 (AT, XT/286, PS/2)  Reserved ................... 5**74│
  2548. └─────────────────────────────────────────────────────────────────────────────┘
  2549.         Future servicer (called by hardware 8259-2 IRQ 15)
  2550.  
  2551.  
  2552. ┌─────────────────────────────────────────────────────────────────────────────┐
  2553. │Interrupt 78h     Not Used .............................................. 5**75│
  2554. └─────────────────────────────────────────────────────────────────────────────┘
  2555.  
  2556.  
  2557. ┌─────────────────────────────────────────────────────────────────────────────┐
  2558. │Interrupt 79h     Not Used .............................................. 5**76│
  2559. └─────────────────────────────────────────────────────────────────────────────┘
  2560.  
  2561.  
  2562. ┌─────────────────────────────────────────────────────────────────────────────┐
  2563. │Interrupt 7Ah     Reserved .............................................. 5**77│
  2564. └─────────────────────────────────────────────────────────────────────────────┘
  2565.           1) Novell NetWare - Low-Level API.
  2566.           2) AutoCAD Device Interface.
  2567.  
  2568.  
  2569. ┌─────────────────────────────────────────────────────────────────────────────┐
  2570. │Interrupt 7Bh-7Eh  Not Used by IBM .................................... 5**78│
  2571. └─────────────────────────────────────────────────────────────────────────────┘
  2572.  
  2573.                                     -171-
  2574.  
  2575. ┌─────────────────────────────────────────────────────────────────────────────┐
  2576. │Interrupt 7Ch     REXX-PC API ........................................... 5**79│
  2577. └─────────────────────────────────────────────────────────────────────────────┘
  2578.     IBM REXX-PC macro language
  2579. entry    AX    0000h    Initialize
  2580.     DS:SI    pointer to null terminated name of program to be executed
  2581.     EB:BX    pointer to null terminated argument string to be passed to the
  2582.         program
  2583.     DX:DI    pointer to an environment control block in the format:
  2584.         dword    offset in segment to signature string
  2585.             The segment is that contained in DX and the signature
  2586.             is the uppercase ASCIIZ string "REXX".
  2587.         dword    offset in DX to environment name ASCIIZ string
  2588.             note: The environment name will be truncated if longer
  2589.                   than 32 characters.
  2590.         dword    offset in DX to the file extension ASCIIZ string
  2591.         dword    path search - word value of 0 or non-zero.
  2592.             This controls the searching of the path for commands
  2593.             that might be REXX programs. 0 means no search made,
  2594.             non-zero means search first.
  2595.         dword    x'AAAA'
  2596.             This is a signature that allows REXXPC88 to call your
  2597.             own defined routine when a command expression needs
  2598.             to be processed.
  2599.         DD    Segment:offset (standard INTEL format) of environment
  2600.             work buffer, the first double word of the buffer MUST
  2601.             be the entry point address of the environment service
  2602.             routine to be called.  The rest of the buffer may be
  2603.             used in any way you choose and will NOT be examined or
  2604.             modified by REXXPC88.
  2605. return    none
  2606. note 1) The only way to tell if the program exists and can be executed is by
  2607.     examining a value returned by the program in the next call described
  2608.     below. If the program returns an end of program indication and a string
  2609.     was expected instead, it means that the program was not found or could
  2610.     not be executed for some reason.
  2611.      2) All registers except SS and SP are destroyed. The caller must save any
  2612.     other registers of interest.
  2613.  
  2614.  
  2615. Function 01h Interpret REXX Command
  2616.     This call tells REXXPC88 to interpret the REXXPC88 program until a
  2617.     value is produced.
  2618. entry    AX    0001h
  2619. return    DS:DX    points to a result string, terminated by a CR + LF + NULL. The
  2620.         final result string (which marks the end of the program)
  2621.         consists of nothing but EOF + NULL. REXXPC88 will continue to
  2622.         return this "end of program" string until reinitialized via an
  2623.         AX=01h call as described above.
  2624. note    All registers except SS and SP are destroyed. The caller must save any
  2625.     other registers of interest.
  2626.  
  2627.  
  2628. Function 02h  Termination
  2629.     This call allows resident REXXPC88 extensions to terminate execution of
  2630.     a REXXPC88 program, typically after detecting an error.
  2631. entry    AX    0002h
  2632.     DS:SI    points to null terminated string to be displayed as an error
  2633.         message before terminating the REXXPC88 program.
  2634. return    none
  2635. note    Terminates the REXXPC88 program and returns control to DOS.
  2636.  
  2637.                                     -172-
  2638.  
  2639. Function 03h  Load
  2640.     This call tells REXXPC88 to look up a program variable and return its
  2641.     current value (if any).
  2642. entry    AX    0003h
  2643.     DS:SI    points to null terminated name of REXXPC88 program variable.
  2644.     DS:DX    points to the null terminated string value of the program
  2645.         variable. DX is zero if the program variable is currently
  2646.         undefined. This string is in REXXPC88's data area and must be
  2647.         treated as read-only.
  2648. return    none
  2649. note 1) All registers except SS and SP are destroyed. The caller must save any
  2650.     other registers of interest.
  2651.  
  2652.  
  2653. Function 04h  Store
  2654.     This call tells REXXPC88 to store a null terminated string as the value
  2655.     of a program variable.
  2656. entry    AX    0004h
  2657.     DS:SI    points to null terminated name of REXXPC88 program variable
  2658.     ES:BX    points to null terminated string to be assigned to the variable
  2659. return    none
  2660. note 1) The string is copied into REXXPC88's data dictionary. If there is
  2661.     insufficient storage to store the string, REXXPC88 terminates execution
  2662.     of the program with an error message and returns to DOS.
  2663.      2) Registers: all registers except SS and SP are destroyed. The caller
  2664.     must save any other registers of interest.
  2665.  
  2666.  
  2667. Function 05h  User-Written Extensions
  2668. entry    AX     0005h
  2669.     SS:BP     points to a C stack frame containing a two-byte pointer to the
  2670.          null terminated function name, a two-byte integer specifying
  2671.          the number of arguments, and a two-byte pointer to an array
  2672.          of pointers (each two bytes) to the arguments (each argument
  2673.          is a null terminated string).
  2674. return    DS:SI     must point to a null terminated result string. A pointer of
  2675.          NIL (DS = 0, SI = 0) is reserved by REXXPC88 and indicates
  2676.          that "no REXXPC88 extensions answered the function".
  2677. note 1) Registers: all registers except SS, SP, and BP are available for use.
  2678.      2) Stack: Since the amount of REXXPC88 stack space remaining for growth
  2679.     can't be ascertained by the user extension program, the user may wish
  2680.     to switch to a local stack if he requires more than about 128 bytes of
  2681.     stack growth.
  2682.  
  2683.  
  2684. Function 06h Queue
  2685.     This call tells REXXPC88 to place data on the data or external interrupt
  2686.     queue either FIFO or LIFO.
  2687. entry    AX    06h
  2688.     BH    00h    Internal data queue accessible via PULL and PARSE PULL
  2689.         01h    External interrupt queue accessible via LINEIN(EXQUE)
  2690.     BL    00h    Queue data FIFO on selected queue
  2691.         01h    Queue data LIFO on selected queue
  2692.     DS:SI    points to null terminated string to be queued.
  2693. return    AX    0000h    Message queued successfully.
  2694.         0001h    No REXXPC88 program running at current time. Message
  2695.             not queued.
  2696.         0002h    Not enough storage available for message.  Message not
  2697.             queued.
  2698.         0003h    Either BH (queue number) or BL (FIFO/LIFO flag) out of
  2699.             range. Message not queued.
  2700. note 1) For the Internal data queue a string may not exceed 127 characters.
  2701.      2) For the External int. queue a string may not exceed available storage.
  2702.      3) Registers: all registers except SS and SP are destroyed. The caller
  2703.     must save any other registers of interest.
  2704.  
  2705.                                     -173-
  2706.  
  2707.  
  2708. Function 07h  Check for Loaded Extension
  2709.     This call provides a way for a REXXPC88 extension to find out if a copy
  2710.     is already loaded, and to exchange information with a resident version.
  2711. entry    AX    0007h
  2712.     SS:BP    points to a C stack frame containing a two-byte pointer to the
  2713.         null terminated name of the REXXPC88 extension.
  2714. return    If the extension is already loaded, then DS:SI points to an ASCIIZ
  2715.     string '1', and other registers are used as desired by the extension
  2716.     to communicate with its non-resident copy. (Generally, this involves
  2717.     pointing ES:BX to the resident portion's entry point). If the extension
  2718.     is not yet resident, then DS:SI points to an ASCIIZ '0'.
  2719. note    Registers: all registers except SS, SP and BP are available for use.
  2720.  
  2721.  
  2722. Function 08h Reserved
  2723.     This call is reserved for communication between REXXSYS.SYS and
  2724.     REXXIBMR.
  2725. entry    AX    0008h
  2726. return    none
  2727.  
  2728.  
  2729. Function 09h Check for REXX Installed
  2730.     This call provides external applications a way to determine if REXXIBMR
  2731.     is installed.
  2732. entry    AX    09h
  2733. return    AX    0FFFFh    REXXIBMR is not installed
  2734.     AX    0AAAAh    REXXIBMR is installed
  2735. note    It is assumed that your application will inspect the value of the 7Ch
  2736.     interrupt vector prior to issuing this interrupt. If the vector is
  2737.     0000:0000 then REXXIBMR is not installed and this function will cause
  2738.     the system to crash.
  2739.  
  2740.  
  2741. Function 0Ah  Uninstall resident version of REXX
  2742.     This call is used to uninstall a resident version
  2743. entry    AX    000Ah
  2744.     BX    0AAAAh
  2745. return    AX    0000h    Resident version uninstalled
  2746.         0001h    Resident version cannot uninstall, as one interrupt
  2747.             vector has been modified by some other program in a
  2748.             non-conforming manner.
  2749.         0FFFFh    The installed resident version does NOT support the
  2750.             uninstall request code (i.e., it is pre 0.55 level).
  2751.  
  2752.                                     -174-
  2753.  
  2754. ┌─────────────────────────────────────────────────────────────────────────────┐
  2755. │Interrupt 7Fh     IBM 8514/A Graphics Adapter API ....................... 5**80│
  2756. └─────────────────────────────────────────────────────────────────────────────┘
  2757.         1)    59 API functions availible, parameters unknown.
  2758.         2)    Used by second copy of COMMAND set with SHELL=.
  2759.         3)    Not used by COMMAND /C at DOS prompt.
  2760.         4)    The IBM RTIC (Real Time Interface Coprocessor) Multiport (and
  2761.         Multiport/2) use int 7Fh as a method of communication between
  2762.         the system-unit resident interrupt handler and the RTIC card's
  2763.         operating system. There is a convention for using it in which
  2764.         register AX contains the signature of the handler that should
  2765.         handle the interrupt. Some signatures are:
  2766.             AX = 0200h is a call to the current task dispatcher
  2767.                    (from the BTRIEVE application interface).
  2768.             AX = 0101h is a call from an application to the RTIC
  2769.                    function request mechanism.
  2770.             AX = 0FEEDh is a call from the ICAINTH.SYS interrupt
  2771.                    handler.
  2772.         5) AX = 200h is used to invoke the task dispatcher in the multi-
  2773.            tasking DOS shell MultiLink Advanced.
  2774.         6) There have been mentions of assorted other little-known
  2775.            programs using this interrupt. In view of its use by DOS and
  2776.            the increasingly-popular 8514/A adapter, it would probably be
  2777.            wise to avoid int 7Fh for aftermarket application software.
  2778.         7) Also used by HLLAPI.
  2779.  
  2780.  
  2781. ┌─────────────────────────────────────────────────────────────────────────────┐
  2782. │Interrupt 80h-85h  Reserved by BASIC .................................. 5**81│
  2783. └─────────────────────────────────────────────────────────────────────────────┘
  2784. note    Interrupts 80h through 0ECh are apparently unused and not initialized
  2785.     in most clone systems. Not known if GWBASIC or MBASIC use any of these
  2786.     interrupts.
  2787.  
  2788.  
  2789. ┌─────────────────────────────────────────────────────────────────────────────┐
  2790. │Interrupt 86h     Int 18 when relocated by NETBIOS ...................... 5**82│
  2791. └─────────────────────────────────────────────────────────────────────────────┘
  2792.  
  2793.  
  2794. ┌─────────────────────────────────────────────────────────────────────────────┐
  2795. │Interrupt 86h-0F0h  Used by BASIC when BASIC interpreter is running ... 5**83│
  2796. └─────────────────────────────────────────────────────────────────────────────┘
  2797.  
  2798.  
  2799. ┌─────────────────────────────────────────────────────────────────────────────┐
  2800. │Interrupt 0A4h  Right Hand Man API .................................... 5**84│
  2801. └─────────────────────────────────────────────────────────────────────────────┘
  2802. entry    AH    RHM function  (unknown)
  2803. return    unknown
  2804. note    Right-Hand Man is a shareware TSR desktop utility similar to SideKick.
  2805.  
  2806.  
  2807. ┌─────────────────────────────────────────────────────────────────────────────┐
  2808. │Interrupt  0E0h Digital Research CP/M-86 function calls ............... 5**85│
  2809. └─────────────────────────────────────────────────────────────────────────────┘
  2810. note    Lotus 123 Release 2 reportedly alters the int 0E0h vector during
  2811.     operation and leaves it pointing somewhere in the TPA on exit.
  2812.     Perhaps used by the mysterious Lotus add-on program hook?
  2813.  
  2814.  
  2815. ┌─────────────────────────────────────────────────────────────────────────────┐
  2816. │Interrupt  0E1h PC Cluster Disk Server Information .................... 5**86│
  2817. └─────────────────────────────────────────────────────────────────────────────┘
  2818. note    This is a pointer to a data table.
  2819.  
  2820.                                     -175-
  2821.  
  2822. ┌─────────────────────────────────────────────────────────────────────────────┐
  2823. │Interrupt  0E2h PC Cluster Program .................................... 5**87│
  2824. └─────────────────────────────────────────────────────────────────────────────┘
  2825. note    Interrupt 1Ch is revectored to here.
  2826.  
  2827.  
  2828. ┌─────────────────────────────────────────────────────────────────────────────┐
  2829. │Interrupt 0E4h  Logitech Modula-2 v2.0   Monitor Entry ................ 5**88│
  2830. └─────────────────────────────────────────────────────────────────────────────┘
  2831. entry    AX    05h    monitor entry
  2832.         06h    monitor exit
  2833.     BX    priority
  2834. return    unknown
  2835.  
  2836.  
  2837. ┌─────────────────────────────────────────────────────────────────────────────┐
  2838. │Interrupt 0EFh  GEM interface (Digital Research) ...................... 5**89│
  2839. └─────────────────────────────────────────────────────────────────────────────┘
  2840. entry    CX    0473h
  2841.     DS:DX    pointer to GEM parameter block
  2842. note    no other parameters are known
  2843.  
  2844.  
  2845. ┌─────────────────────────────────────────────────────────────────────────────┐
  2846. │Interrupt 0F0h  unknown ............................................... 5**90│
  2847. └─────────────────────────────────────────────────────────────────────────────┘
  2848.          1) Used by secondary copy of COMMAND when SHELL= set.
  2849.          2)  Not used by COMMAND /C at DOS prompt.
  2850.          3)  Used by BASIC while in interpreter.
  2851.  
  2852.  
  2853. ┌─────────────────────────────────────────────────────────────────────────────┐
  2854. │Interrupts 0F1h-0FFh  (absolute addresses 3C4h-3FFh) .................. 5**91│
  2855. └─────────────────────────────────────────────────────────────────────────────┘
  2856.               Location of Interprocess Communications Area
  2857.  
  2858.  
  2859. ┌─────────────────────────────────────────────────────────────────────────────┐
  2860. │Interrupt 0F8h  Set Shell Interrupt (OEM) ............................. 5**92│
  2861. └─────────────────────────────────────────────────────────────────────────────┘
  2862.         Set OEM handler for int 21h calls from 0F9h through 0FFh
  2863. entry    AH    0F8h
  2864.     DS:DX    pointer to handler for Functions 0F9h thru 0FFh
  2865. note 1) To reset these calls, pass DS and DX with 0FFFFh. DOS is set up to
  2866.     allow ONE handler for all 7 of these calls. Any call to these handlers
  2867.     will result in the carry bit being set and AX will contain 1 if they are
  2868.     not initialized. The handling routine is passed all registers just as
  2869.     the user set them. The OEM handler routine should be exited through an
  2870.     IRET.
  2871.      2) 10 ms interval timer (Tandy?)
  2872.  
  2873.  
  2874. ┌─────────────────────────────────────────────────────────────────────────────┐
  2875. │Interrupt 0F9h  Reserved .............................................. 5**93│
  2876. └─────────────────────────────────────────────────────────────────────────────┘
  2877.         First of 8 SHELL service codes, reserved for OEM shell (WINDOW);
  2878.         use like HP Vectra user interface?
  2879.  
  2880.  
  2881. ┌─────────────────────────────────────────────────────────────────────────────┐
  2882. │Interrupt 0FAh  USART ready (RS-232C) ................................. 5**94│
  2883. └─────────────────────────────────────────────────────────────────────────────┘
  2884.  
  2885.                                     -176-
  2886.  
  2887. ┌─────────────────────────────────────────────────────────────────────────────┐
  2888. │Interrupt 0FBh  USART RS ready (keyboard) ............................. 5**95│
  2889. └─────────────────────────────────────────────────────────────────────────────┘
  2890.  
  2891.  
  2892. ┌─────────────────────────────────────────────────────────────────────────────┐
  2893. │Interrupt 0FCh  Unknown ................................................5**96│
  2894. └─────────────────────────────────────────────────────────────────────────────┘
  2895.  
  2896.  
  2897. ┌─────────────────────────────────────────────────────────────────────────────┐
  2898. │Interrupt 0FDh  reserved for user interrupt ........................... 5**97│
  2899. └─────────────────────────────────────────────────────────────────────────────┘
  2900.  
  2901.  
  2902. ┌─────────────────────────────────────────────────────────────────────────────┐
  2903. │Interrupt 0FEh  reserved by IBM ....................................... 5**98│
  2904. └─────────────────────────────────────────────────────────────────────────────┘
  2905.         AT/XT286/PS50+ - vector destroyed by return from protected mode
  2906.  
  2907.  
  2908. ┌─────────────────────────────────────────────────────────────────────────────┐
  2909. │Interrupt 0FFh  reserved by IBM ....................................... 5**99│
  2910. └─────────────────────────────────────────────────────────────────────────────┘
  2911.         AT/XT286/PS50+ - vector destroyed by return from protected mode
  2912.         Zenith Z-100 (S-100 bus MSDOS) warm boot
  2913.