User`s manual

Dynamic C Users Manual digi.com 187
11.7.2 Modifying Interrupt Vectors
Prior to Dynamic C 7.30, interrupt vector code could be modified directly. By reading the internal and
external interrupt registers, IIR and EIR, the location of the vector could be calculated and then written to
because it was located in RAM. This method will not work if separate I&D space is enabled because the
vectors must be located in flash. To accommodate separate I&D space, the way interrupt vectors are set up
and modified has changed slightly. Please see the designer’s handbook for your Rabbit microprocessor
(e.g., the Rabbit 3000 Designers Handbook) for detailed information about how the interrupt vectors are
set up. This section will discuss how to modify the interrupt vectors after they have been set up.
For backwards compatibility, “modifiable” vector relays are provided in RAM. In C, they can be accessed
through the SetVectIntern and SetVectExtern functions. In assembly, they are accessed through
INTVEC_BASE + <vector offset> or XINTVEC_BASE + <vector offset>. The values for <vector offset>
are defined in lib\..\bioslib\sysio.lib, and are listed here for convenience.
Table 11-3. Internal Interrupts and their Offset from INTVEC_BASE
PERIODIC_OFS SERA_OFS
RST10_OFS SERB_OFS
RST18_OFS SERC_OFS
RST20_OFS SERD_OFS
RST28_OFS SERE_OFS
RST38_OFS SERF_OFS
SLAVE_OFS QUAD_OFS
TIMERA_OFS INPUTCAP_OFS
TIMERB_OFS
Table 11-4. External Interrupts and their
Offset from XINTVEC_BASE
EXT0_OFS
EXT1_OFS