What is the fastest way to handle an interrupt?
If you can limit the hardware interrupts to times when your program is running in protected mode, you can load the interrupt vector directly into the IDT. This handling will not support interrupts which happen while the processor is executing in real mode. For this reason, our interrupt handling API provides an indirect layer to make interrupt handling largely algorithm compatible with real mode. If you want to manipulate the IDT directly, you may — at least when operating under plain DOS. If you are operating in a Windows DOS box, the IDT is generally not directly writeable. If you do chose this technique, you should worry about what happens when your interrupt happens while the processor is operating in real mode. Of course, all hardware interrupt handlers must be locked in the virtual memory. Otherwise, DOS could be executing, the hardware interrupt could occur, and the DOS extender might need to use DOS to perform virtual memory paging. Because DOS is not, in general, re-entrant,