Keil Logo

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 range for this offset is 0 .. 65535.

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:

n is the interrupt number.
interval is the argument of the INTERVAL directive (default 8).
offset is the argument of the INTVECTOR directive (default 0).
See Also

INTERVAL, NOINTVECTOR

Example
C51 SAMPLE.C INTVECTOR(0x8000)
#pragma iv(0x8000)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.