Reference Guide
84 Chapter 4
Assembler Directives and Pseudo-Operations
.EQU Directive
.EQU Directive
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.
val1 .EQU 0
val2 .EQU val1+4
.SPACE $TEXT$
.SUBSPA $CODE$
LDW val1,%r1
STW %r1,val2
.END