User`s manual

190 digi.com Using Assembly Language
If separate I&D space is enabled, using the modifiable interrupt vector proxy in RAM adds about 80 clock
cycles of overhead to the execution time of the ISR. To avoid that, the preferred way to set up interrupt
vectors is to use the new keyword, interrupt_vector, to set up the vector location at compile time.
When compiling with separate I&D space, modify applications that use SetVectIntern(),
SetVectExtern2000() or SetVectExtern3000() to use interrupt_vector instead.
The following code, from /Samples/TIMERB/TIMER_B.C, illustrates the change that should be
made.
void main()
{
. . .
#if __SEPARATE_INST_DATA__
interrupt_vector timerb_intvec timerb_isr;
#else
SetVectIntern(0x0B, timerb_isr); // set up ISR
#endif
. . .
}
If interrupt_vector is used multiple times for the same interrupt vector, the last one encountered by
the compiler will override all previous ones.
interrupt_vector is syntactic sugar for using the origin directives and assembly code. For example,
the line:
interrupt_vector timerb_intvec timerb_isr;
is equivalent to:
#rcodorg timerb_intvec apply
#asm
jp timerb_isr
#endasm
#rcodorg rootcode resume