INT 2fH ae01H: Process Hooked Command
Compatibility: ◄Undoc► 3.0+
Expects: AX ae01H
DS:SI address of an 8-byte upshifted, blank-padded command name
(save command-line text addr from previous INT 2fH ae00H)
Returns: Previously-passed command buffer should be modified:
Set the length field to 00H to indicate command completed.
Info: This is part two of a system that lets TSRs intercept commands
typed at the DOS command prompt.
See INT 2fH ae00H for details on what happens in part one. After
you return AL=ffH from that notification, COMMAND.COM immediately
calls this function (AX=ae01H) to give you a crack at processing
Important: This command does not supply the full command-line
text. You must save the DS:BX value passed in the previous
█▌Handling a Command Internally▐█
Examine the command line text (as pointed to by the DS:BX
obtained in the earlier ae00H call). Take whatever action you
deem necessary. Set the command length to 0 (DS:BX+1) and IRET
to return control to COMMAND.COM.
█▌Cancelling a Command▐█
Just set the saved DS:[BX+1] to 00H and IRET to return control to
█▌Pre-processing a Command▐█
It is possible to examine command-line switches and options, make
some changes, and then pass the result on to be handled by
COMMAND.COM or some other INT 2fH handler. In this case, use a
FAR JMP to pass control down the chain of INT 2fH handlers, to
give them a crack at the command. In any case, if the command-
line length is non-zero, it will be processed eventually --
either by another INT 2fH handler or by COMMAND.COM.
Notes: ■ If Doskey is installed (see INT 2fH 4800H), then Doskey will
get a crack at the command-line before you do. You might
consider chaining into that service as well.
■ Note that batch file commands are passed through this system,
so you can make a bullet-proof connad filter.
See Also: INT 2fH aexxH Command Processor Hook
INT 2fH: Multiplex Interrupt