The = directive lets you create a symbolic assembler-time variable. Numeric expressions may be assigned to the variable as many times as necessary.
Syntax
Name = ExpressionRemarks
The = directive is similar to the EQU assembler directive except you can redefine Name without causing an error condition. However, the = directive is more restrictive about the allowable ExpressionTypes that can be utilized in the Expression field, and it cannot be used to create Text-EquateNames.
Name is a globally-scoped Identifier. The Expression entry must evaluate to an Operand-ExpressionType. If an evaluation error occurs, or if the Expression references an external identifier, or if the Expression evaluates to one of the following Operand-ExpressionTypes:
See also the EQU assembler directive and the EQU preprocessor directive.
EMP = 6 ;Establish as redefineable numeric equate EMP EQU 6 ;OK, value is the same, EMP remains redefinable EMP EQU 7 ;Error, can't change value with EQU EMP = 7 ;OK, EMP is redefineable with = EMP = EMP+1 ;Can refer to its previous definition
Note: The Expression-Attributes inherited from the Expression during an assignment are not retained in subsequent assignments. For example:
VECTOR = WORD PTR 4 ; Type-Declaration attribute MOV [BX],VECTOR ; Store the 4 as a word VECTOR = 6 ; Type-Declaration attribute discarded MOV [BX],VECTOR ; Error, no size for operands