User’s Manual MCUez HC12 Assembler
232 Operating Procedures MOTOROLA
Operating Procedures
Each assembly module using a symbol defined in another assembly file should
include the corresponding include file.
Example of assembly file (Test2.asm):
XDEF entry
INCLUDE “Test1.inc”
initStack: EQU $AFE
CodeSec: SECTION
entry: LDS #initStack
LDD #$7
JSR AddSource
BRA entry
The application PRM file must list both object files used to build the
application. When a section is present in the different object files, the object file
sections are concatenated in a single absolute file section. The different object
file sections are concatenated in the order the object files are specified in the
PRM file.
Example of PRM file (Test2.prm):
LINK test2.abs /* Name of executable file generated. */
NAMES
test1.o test2.o /*Name of object files building the application.*/
END
SEGMENTS
MY_ROM = READ_ONLY 0x0B00 TO 0x0BFF; /* READ_ONLY memory area */
MY_RAM = READ_WRITE 0x0800 TO 0x08FF; /* READ_WRITE memory area */
END
PLACEMENT
DataSec, .data INTO MY_RAM; /*variables are allocated in MY_RAM */
CodeSec, .text INTO MY_ROM; /* code and constants are allocated in
MY_ROM*/
END
INIT entry /* Definition of the application entry point. */
VECTOR ADDRESS 0xFFFE entry/* Definition of the reset vector. */