Assembler Syntax
Expressions
MCUez HC12 Assembler User’s Manual
MOTOROLA Assembler Syntax 157
7.8.2 Simple Relocatable Expression
A simple relocatable expression results from an operation such as the one
shown here:
<relocatable expression> + <absolute expression>
<relocatable expression> – <absolute expression>
<absolute expression> + < relocatable expression>
Example:
XREF XtrnLabel
DataSec: SECTION
tabBegin: DS.B 5
tabEnd: DS.B 1
CodeSec: SECTION
entry:
LDA tabBegin+2 <- Simple relocatable expression
BRA *-3 <- Simple relocatable expression
LDA XtrnLabel+6 <- Simple relocatable expression
Table 7-4 indicates the type of expression according to the operator in an unary
operation.
Table 7-4. Expression — Operator Relationship (Unary)
Operator Operand Expression
—, !, ~ Absolute Absolute
—, !, ~ Relocatable Complex
+ Absolute Absolute
+ Relocatable Relocatable