User’s Manual MCUez HC12 Assembler
236 Operating Procedures MOTOROLA
Operating Procedures
11.7.1 Assembler Source File
When an .abs file is generated using the assembler (no linker), the application
must be implemented in a single assembly unit and contain only absolute
sections. This is shown in this code example.
Example:
ABSENTRY entry ; Specifies the application
; Entry point
iniStk: EQU $AFE ; Initial value for SP
ORG $FFFE ; Reset vector definition
Reset: DC.W entry
ORG $40 ; Define an absolute constant section
var1: DC.B 5 ; Assign 5 to the symbol var1
ORG $80 ; Define an absolute data section
data: DS.B 1 ; Define one byte variable in RAM
; address 40
ORG $B00 ; Define an absolute code section
entry:
LDS #iniStk; Load stack pointer
LDAA var1
main:
INCA
STAA data
BRA main