The .EQU
directive assigns an expression value to an identifier.
Syntax
symbolic_name .EQU value
Parameters
symbolic_name
The name of the identifier to which the Assembler
assigns the expression.
value
An integer expression. The Assembler evaluates the
expression, which must be absolute, and assigns this value to symbolic_name.
If the expression references other identifiers, each identifier
must be defined before the .EQU
directive attempts to evaluate the expression.
NOTE: The Assembler prohibits the use of relocatable symbols
(instruction labels) and imported symbols as components of an .EQU
expression.
Example
This is a valid assembly program because the definition of
val1 comes before
the definition of val2.
Reversing the first two statements, however, produces an error condition.