Motorola HC12 User Manual

Page 230

Advertising
background image

User’s Manual

MCUez HC12 Assembler

230

Operating Procedures

MOTOROLA

Operating Procedures

NOTE:

Each constant in the section

VectorTable

is defined as a word (2-byte

constant, because the entry in the HC12 vector table is 16 bits wide. In the
previous example, the constant

IRQInt

is initialized with the address of the

label

IRQFunc

, the constant

COPResetInt

is initialized with the address of

the label

DummyFunc

, etc. Labels specified as initialization values must be

defined, published (using

XDEF

) or imported (using

XREF

) before the vector

table section. The statement

ORG $FFF2

specifies that the following section

must start at address

$FFF2

.

The section should now be placed at the expected address. This is performed in
the linker parameter file.

Example:

LINK test.abs

NAMES

test.o

END

SEGMENTS

MY_ROM = READ_ONLY 0x0800 TO 0x08FF;

MY_RAM = READ_WRITE 0x0A00 TO 0x0BFF;

END

PLACEMENT

DEFAULT_RAM INTO MY_RAM;

DEFAULT_ROM INTO MY_ROM;

END

INIT ResetFunc

ENTRIES

*

END

NOTE:

The statement

ENTRY * END

switches smart linking

OFF

. If this statement is

missing in the PRM file, the vector table will not be linked with the application
because it is never referenced. The smart linker only links referenced objects in
the absolute file.

Advertising