.VECTOR


The .VECTOR directive generates an interrupt vector table.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
symbol-name
.VECTOR
Vector-table-allocation-address
[; comment]

[Function]

-

The .VECTOR directive generates an interrupt vector table.

[Description]

-

Specifies a vector table allocation address for an interrupt function.

-

The symbol name should be the label of the destination of a branch to be executed when an interrupt occurs.

-

The .VECTOR directive should be specified within the module where the target function is defined.

-

An even address between 0x00000 and 0x0007E can be specified as the vector table allocation address. If a value outside this range is specified, an error will occur.

-

Multiple addresses can be specified for a function.

-

The information handled by the .VECTOR directive is the vector table information output by the compiler for #pragma interrupt specified in the C source program. When this directive is included in the code (#pragma interrupt is specified in the C source program), this directive should be used instead of a section definition directive to define a vector table in the assembly source program such as in the startup routine.

-

When both the vector tables specified through the .VECTOR directive and those specified through the section definition directive are used together, the optimizing linker outputs an error.

[Example]

To specify multiple addresses (0x00008 and 0x0000a) for interrupt function intfunc.

_intfunc        .VECTOR 0x00008
_intfunc        .VECTOR 0x0000a
.SECTION        .text, TEXT
_intfunc:

 

To specify multiple addresses (0x00020, 0x00022, 0x00024, 0x00026 and 0x00028) for interrupt function intfunc2.

ADDR            .SET    0x00020
                .REPT   5
_intfunc2       .VECTOR ADDR
ADDR            .SET    ADDR + 2
                .ENDM
.SECTION        .text, TEXT
_intfunc2: