Int 21 Fn 8C - European Ms-dos 4.0 - Set Signal Handler [D]
AH = 8Ch
AL = signal number (see #1481)
BL = action (see #1482)
DS:DX -> signal handler (see #1483)
Return: CF clear if successful
AL = previous action
ES:BX -> previous signal handler
CF set on error
AX = error code (01h,invalid SigNumber or Action)
(see #1366 at AH=59h/BX=0000h)
Desc: set the routine which will be invoked on a number of exceptional
conditions
Note: all signals will be sent to the most recently installed handler
See Also: AH=8Dh
(Table 1481)
Values for European MS-DOS 4.0 signal number:
01h SIGINTR Control-C or user defined interrupt key
08h SIGTERM program termination
09h SIGPIPE broken pipe
0Dh SIGUSER1 reserved for user definition
0Eh SIGUSER2 reserved for user definition
(Table 1482)
Values for signal action:
00h SIG_DFL terminate process on receipt
01h SIG_IGN ignore signal
02h SIG_GET signal is accepted
03h SIG_ERR sender gets error
04h SIG_ACK acknowledge received signal and clear it, but don't
change current setting
(Table 1483)
Values signal handler is called with:
AL = signal number (see #1481)
AH = signal argument
Return: RETF, CF set: terminate process
RETF, CF clear, ZF set: abort any interrupted system call with an error
RETF, CF clear, ZF clear: restart any interrupted system call
IRET: restart any interrupted system call
Note: the signal handler may also perform a nonlocal GOTO by resetting the
stack pointer and jumping; before doing so, it should dismiss the
signal by calling this function with BL=04h