Generates instructions to allow a function to handle a processor exception.
#pragma TRAP_PROC
Functions that act as interrupt service routines require special executable code to handle function entry and exit. Use this pragma to specify to the compiler that the subsequent function defintion will be used to handle processor exceptions.
#include <hidef.h> /* For interrupt macro. */ #pragma TRAP_PROC void MyInterrupt(void) { DisableInterrupts; /* ... */ EnableInterrupts; }