User`s guide
Pragmas for the DSP56800 and DSP56800E
Pragma Reference
393Targeting MC56F83xx/DSP5685x Controllers
In Table C.2, the advantages and disadvantages of the interrupt and interrupt
saveall pragmas are listed.
interrupt (for the DSP56800E)
This pragma controls the compilation of object code for interrupt routines.
Compatibility
This pragma is not compatible with the DSP56800, but it is compatible with the
DSP56800E. For the DSP56800, see interrupt (for the DSP56800)
.
Prototype
#pragma interrupt [<options>] [<mode>] [on|off|reset]
Remarks
An Interrupt Service Routine (ISR) is a routine that is executed when an interrupt
occurs. Setting C routines as ISRs is done using pragmas (pragma interrupt).
To make a routine service an interrupt, you must:
• Write the routine.
• Set up the routine so that it is called when some interrupt occurs.
The pragma interrupt option can be used to:
• Instruct the compiler to push register values on the software stack at entry to a C
function and restore them upon exit.
• Preserve the register values for the function that was interrupted.
Table C.2 Comparison of Usage
Pragma Advantages Disadvantages
interrupt
saveall
• entire context save
• no need for #pragma
interrupt called for
called functions
• larger initial performance hit due
to entire context save, but
becomes advantageous for ISRs
with several function calls
interrupt • smaller context save, less
performance hit
• generally good for ISRs with
a small number of function
calls
• #pragma interrupt called
required for all called functions