Specifications

Saturn General Assembler Directives 4-3
Psy-Q Development System
EQU
Description Assigns the result of the expression, as a constant value, to the preceding symbolic
name.
Syntax symbol name EQU expression
See Also SET, EQUS
Remarks
The Assembler allows the assigned expression to contain forward references. If
an EQU cannot be evaluated as it is currently defined, the expression will be
saved and substituted in any future references to the equate (see Note below).
It is possible to include an equate at assembly time, on the Assembler command
line. This is useful for specifying major options of conditional assembly, such as
test mode - see Assembler switches, chapter 2.
Assigning a value to a symbol with EQU is absolute; an attempt at secondary
assignment will produce an error. However, it is permissible to re-assign the
current value to an existing symbol; typically, this occurs when subsidiary code
redefines constants already used by the master segment.
Examples Length equ 4
Width equ 8
Depth equ 12
Volume equ Length*Width*Depth
DmaHigh equ $ffff8609
DmaMid equ DmaHigh+2
Note List equ Lastentry-Firstentry
if Firstentry, Lastentry not yet defined, then:
dc.l List+2
will be treated as
dc.l (Lastentry-Firstentry)+2
the equated expression is implicitly bracketed.