Assembler Syntax
Expressions
MCUez HC12 Assembler User’s Manual
MOTOROLA Assembler Syntax 155
7.8 Expressions
An expression is composed of one or more symbols or constants, which are
combined with unary or binary operators. Valid symbols in expressions are:
User-defined symbols
External symbols
The special symbol * (asterisk) represents the value of the location
counter at the beginning of the instruction or directive, even if several
arguments are specified. In the following example, the asterisk
represents the location counter at the beginning of the DC directive:
DC.W 1, 2, *-2
Once a valid expression has been fully evaluated by the assembler, it is reduced
to one of the following types of expressions.
Absolute expression — The expression has been reduced to an absolute
value, which is independent of the start address of any relocatable
section. Thus, it is a constant.
Simplerelocatable expression — The expression evaluates to an absolute
offset from the start of a single relocatable section.
Complex relocatable expression — The expression neither evaluates to
an absolute expression nor to a simple relocatable expression. The
assembler does not support such expressions.
<
<=
>
>=
Less than
Less or equal to
Greater than
Greater or equal to
Left to right
=, ==
!=, <> Equal to
Not Equal to Left to right
& Bitwise AND Left to right
^ Bitwise exclusive OR Left to right
| Bitwise OR Left to right
Table 7-3. Operator Precedence (Continued)
Operator Description Associativity