Keil™, An ARM® Company

Cx51 User's Guide

INTVECTOR Compiler Directive

Abbreviation IV
Arguments An optional offset, in parentheses, for the interrupt vector table.
Default INTVECTOR (0)
µVision Options — C51 — Interrupt vectors at address.
Description 

The INTVECTOR directive instructs the compiler to generate interrupt vectors for functions which require them. An offset may be entered if the vector table starts at an address other than 0.

The compiler generates interrupt vectors using either AJMP or LJMP instructions (depending on the size of the program memory specified with the ROM directive).

Vectors are located starting at absolute address:

(n * interval) + offset + 3

where:

nis the interrupt number.
intervalis the argument of the INTERVAL directive (default 8).
offsetis the argument of the INTVECTOR directive (default 0).
See Also INTERVAL, NOINTVECTOR
Example 
C51 SAMPLE.C INTVECTOR(0x8000)
#pragma iv(0x8000)