Chapter 8 Writing Source Statements
Expressions 137
8.7 Expressions
Expressions are symbols, self-reference address symbols, and constants linked by operators, with the
result representing a single value. When an expression is coded as an operand, its result will be a
number or an address depending on the type of instruction.
When a symbol or self-reference address included in an expression is a forward referenced symbol, a
relocatable symbol, or an undefined symbol, the result of the expression cannot be resolved by the
assembler. It will then be resolved by the linker.
NOTE: If a section name in the expression was used as a symbol, declaration with the
section directive must be done in the file. Without doing this would lead an error
in the assembler or linker.
Example:
sec section CODE,PUBLIC,1
_TEXT section CODE,PUBLIC,1
mov sec, A0