Motorola HC12 User Manual

Page of 328
Assembler Syntax
Source Line
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Assembler Syntax
133
Long branch instructions (LBRA, LBEQ, etc.) expect a signed offset encoded
on two bytes. The valid range for a long branch offset is [–32,768...32,767].
Using the special symbol for location counter, it is possible also to specify an
offset to the location pointer as the target for a branch instruction. The *
(asterisk) refers to the beginning of the instruction where it is specified.
Example:
main:
       NOP
       NOP
       BRA *-2
In this example, after the two
NOP
s have been executed, the application
branches at offset –2 from the BRA instruction (for instance, on label
main
).
Inside an absolute section, expressions specified in a PC relative addressing
mode may be:
A label defined in any absolute section
A label defined in any relocatable section
An external label, defined in an XREF directive
An absolute EQU or SET label
Inside a relocatable section, expressions specified in a PC relative addressing
mode may be:
A label defined in any absolute section
A label defined in any relocatable section
An external label, defined in an XREF directive