<< Previous | Next >> | |
|
unsigned SetVectIntern( int vectNum, void * isr );
Description
- Sets an internal interrupt table entry. All Rabbit interrupts use jump vectors. This function writes a
jp
instruction (0xC3) followed by the 16 bit ISR address to the appropriate location in the vector table. The location in RAM of the vector table is determined and set by the BIOS automatically at startup. The start of the table is always on a 0x100 boundary.
- It is perfectly permissible to have ISRs in xmem and do long jumps to them from the vector table. It is even possible to place the entire body of the ISR in the vector table if it is 16 bytes long or less, but this function only sets up jumps to 16 bit addresses.
- The following table shows the
vectNum
value for each peripheral or RST. The offset into the vector table is also shown. The following vectors are valid for all Rabbit processors.
Periodic interrupt RST 10 instruction RST 38 instruction Slave Port Timer A Timer B Serial Port A Serial Port B Serial Port C Serial Port D
- The following vectors are valid starting with the Rabbit 3000.
- The following vectors are valid starting with the Rabbit 3000 Revision 1.
- The following vectors are valid starting with the Rabbit 4000.
- The following three RSTs are included for completeness, but should not be set by the user as they are used by Dynamic C.
Parameters
- vectNum
- Interrupt number. See the above table for valid values.
- isr
- ISR handler address. Must be a root address.
Return value
- Address of vector table entry, or zero if
vectNum
is not valid.Library
- SYS.LIB
See also
- GetVectExtern2000, SetVectExtern2000, GetVectIntern
Dynamic C Functions | << Previous | Next >> | rabbit.com |