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 `
*' represents the value of the location counter at the beginning of the instruction or directive, even when 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 as one of the following type 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.
-
Simple relocatable 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.
All valid user defined symbols representing memory locations are simple relocatable expressions. This includes labels specified in
XREF directives, which are assumed to be relocatable symbols.