INT 2D - ALTERNATE MULTIPLEX INTERRUPT SPECIFICATION (AMIS) [v3.6]
AH = multiplex number
AL = function
00h installation check
01h get private entry point
02h uninstall
03h request popup
04h determine chained interrupts
05h get hotkey list
06h get device-driver information
07h-0Fh reserved for future enhancements
Return: AL = 00h (not implemented)
other application-dependent
other registers vary by function (also see individual entries below)
Return: varies by function
Notes: programs should not use fixed multiplex numbers; rather, a program
should scan all multiplex numbers from 00h to FFh, remembering the
first unused multiplex in case the program is not yet installed.
For multiplex numbers which are in use, the program should compare
the first 16 bytes of the signature string to determine whether it
is already installed on that multiplex number. If not previously
installed, it should use the first free multiplex number.
lDOS TSRs (switch /X=), SRDISK (switch /X=), and lDebug (variable
TRYAMISNUM) provide ways to try allocating a particular multiplex
number first, then if it is already used will scan from 00h to FFh
to find a free number. however, to detect an already installed
instance they try the particular number first (also /X= or for the
debugger TRYDEBUGNUM) and then scan from FFh down to 00h. the idea
is to operate on the resident instance that was installed most
recently, though this scheme is imperfect.
lDOS RENUMBER can re-assign a resident multiplexer's multiplex number
to another number. to do this it checks that the program's INT 2D
entrypoint (obtained from INT 2D/AL=04h) starts with an IISP header
followed by CMP AH,imm8 and JE rel8. if found, it checks that the
CMP instruction was patched to match the allocated multiplex number
and then assumes that this is the only reference to the number.
functions other than 00h are not valid unless a program is installed
on the selected multiplex number
to be considered fully compliant with version 3.6 of the specification,
programs must implement at least functions 00h, 02h (no resident
uninstall code required), and 04h (return value 04h). TSRs that
provide hotkeys with which the user can activate them must also
implement function 05h. TSRs which provide DOS device drivers must
also implement function 06h. The absolute minimum fully-compliant
implementation has an overhead of 64 bytes (80 bytes with function
05h) plus 22 bytes per hooked interrupt (for the interrupt sharing
protocol header and hook list entry).
lDOS kernel, Loader, lDebug, SRDISK, and INTERC3 are not fully
compliant because they don't provide function 02h. lDDebug and
lCDebug may list interrupt handlers in their function 04h list
that are not currently installed. lDebug doesn't support function
05h even if it installs hotkey-like features. lDOS kernel only
lists its int 2Dh handler for function 04h.
the signature string and description may be used by memory mappers
to display the installed programs
to be considered fully compliant, users of this specification must
adhere to the IBM interrupt sharing protocol (see #02568), which will
permit removal of TSRs in arbitrary order and interrupt handler
reordering. All TSRs following this specification should be
removable unless they are loaded from CONFIG.SYS, though they need
not keep the code for removing themselves resident; it is acceptable
for a separate program to perform the interrupt unhooking and
memory-freeing steps of removal.
A sample public-domain implementation including example TSRs and
utility programs may be found in a separate package distributed as
AMISLnnn.ZIP (AMISL092.ZIP as of this writing).
Please let me know if you choose to follow this proposal. The
signature and a list of the private API calls you use would be
appreciated, as well.
SeeAlso: INT 2D/AL=00h,INT 2D/AL=01h,INT 2D/AL=02h,INT 2D/AL=03h,INT 2D/AL=04h
SeeAlso: INT 2D/AL=05h,INT 2D/AL=06h,INT 2F"NOTES"
Format of IBM Interrupt Sharing Protocol (IISP) interrupt handler entry point:
Offset Size Description (Table 02568)
00h 2 BYTEs short jump to actual start of interrupt handler, immediately
following this data block (EBh 10h)
02h DWORD address of next handler in chain, aka downlink
06h WORD signature 424Bh "KB"
08h BYTE EOI flag
00h software interrupt or secondary hardware interrupt handler
80h primary hardware interrupt handler (will issue EOI to
interrupt controller)
09h 2 BYTEs short jump to hardware reset routine
must point at a valid FAR procedure (may be just RETF)
0Bh 7 BYTEs reserved (0) by IBM for future expansion
Notes: when chaining to the prior handler, the interrupt handler must perform
an indirect jump/call using the address at offset 02h in the
ISP header. This permits another AMIS TSR to hook itself into
the chain at a position other than as the first handler to receive
an interrupt.
the header's downlink must also be used to uninstall a given handler.
it must be expected that other software may modify one's downlinks
and one mustn't use stale other copies of the downlink vector later.
uninstalled iHPFS headers start with 90h EAh (NOP, and a far immediate
JMP). they always chain to the next handler.
some nonstandard headers don't start with the expected short jump, and
the hardware reset entry may be just a RETF or IRET rather than JMP.
lDOS TSRs use the advanced deinstallation method, explained in the
KEEPHOOK manual. it searches not only through the topmost reachable
chain of IISP headers; if the vector pointing at the handler that's
to be uninstalled isn't found starting from the Interrupt Vector
Table the uninstaller will query all resident multiplexers for their
hooks of the same INT using AL=04h then search the (possibly hidden)
chains reachable from these hooks.
lDOS RENUMBER expects the entry for INT 2D handlers to consist of a
short jump at offset 00h, pointing to a CMP AH,imm8 instruction
followed by JE rel8. if the imm8 matches the multiplex number that
corresponds to this handler it is assumed that the CMP immediate is
the single source of truth of this multiplexer's multiplex number.
some lDOS programs store 80h in the BYTE at offset 08h to indicate
a software interrupt that never chains to the stored next handler.
SeeAlso: INT F1/AH=01h"Common ISDN API",INT F1/AH=06h"CAPI",#04068