![]() A86 assembler, eh? There's a name for people like you - but I can't spell it. This page contains programs written for the A86 assembler. They are probably also suitable for other assemblers. References
Setting Interrupt Vectors INT 21 - DOS 1+ - SET INTERRUPT VECTOR AH = 25h AL = interrupt number DS:DX => new interrupt handlerExample: hookint1.txt. This program does not actually create a resident interrupt handler, it simply points the handler for Int 1Bh (Hardware response to Ctrl-Break) to F0F0:F0F0, the start of the BIOS boot commands.
Memory Resident Handlers
This program replaces the standard interrupt handler for INT 1Bh with my own, which prints a short string. It is easily modified to print a slightly more appropriate message, like 'Ctrl-Break Disabled' I have not used the Interrupt 21h: Output String function, because it hangs the PC if Ctrl-Break is pressed while waiting for user input, like at the DOS prompt.
Calling the Old Handler INT 21 - DOS 2+ - GET INTERRUPT VECTOR AH = 35h AL = interrupt number Return: ES:BX -> current interrupt handlerExample: ctrl-b2.txt. This program does that and jumps to the old handler at the end of the new one. Note: It is then the old handler which performs the IRET! The result is that Ctrl-Break now prints the 'Hello World' message, but then performs the normal Ctrl-Break response.
Another Example |