EQU

Equate symbol to a value.

labelEQU [{X: | P:}] expression

Remarks

The EQU directive assigns the value and memory space attribute of expression to the symbol label. If expression has a memory space attribute of None, then it can be optionally preceded by any of the indicated memory space qualifiers to force a memory space attribute. An error occurs if the expression has a memory space attribute other than None and is different than the forcing memory space attribute. The optional forcing memory space attribute is useful to assign a memory space attribute to an expression that consists only of constants but is intended to refer to a fixed address in a memory space.

The EQU directive is one of the directives that assigns a value other than the program counter to the label. The label cannot be redefined anywhere else in the program (or section, if SECTION directives are being used). The expression may be relative or absolute, but cannot include a symbol that is not yet defined (no forward references are allowed).

Example

A_D_PORT EQU X:$4000

See also

SET