Technical Notes Database
TN691D.txt INTERRUPT HANDLER RULES
Category :Pascal
Platform :All
Product :Turbo Pascal 4.0+
Description:
Q. What rules should I follow when writing an interrupt handler?
A. The following is a list of rules to keep in mind when writing
an interrupt handler:
1. Use GetIntVec and SetIntVec to install/un-install
interrupt handlers.
2. Use the interrupt keyword.
3. Be careful about reentrancy. Don't use any calls to DOS
or to Turbo Pascal's overlay or heap management routines
in your interrupt handler.
4. Interrupt procedures and functions must use the far call
model (use the {$F+} option).
5. Be proficient with the BIOS and Assembly language before
attempting to write an interrupt handler.
6. Make sure your interrupt handler is not in an overlaid
unit.
7. You will want to create an exit procedure to un-install
the interrupt service routine.
Reference:
7/16/98 4:35:34 PM
Last Modified: 01-SEP-99