Slide 5.13: Calculating data sizes and EQU directive Slide 6.1: Data transfer instructions Home |
TEXTEQU
Directive
The TEXTEQU directive is very similar to EQU . It creates a text macro.
|
|
EQU
directive, a symbol defined with TEXTEQU
can be redefined later in the program.
name = expression |
name EQU expression |
name TEXTEQU %constExpr |
Year = 2002 .data Year = 2003 .code Year = 2004 mov eax, Year call WriteInt |
Year EQU 2002 .data Year EQU 2003 .code Year EQU 2004 mov eax, Year call WriteInt |
Year TEXTEQU %2002 .data Year TEXTEQU %2003 .code Year TEXTEQU %2004 mov eax, Year call WriteInt |
Output | Output | Output |
String Size byname TEXTEQU <text> |
Array Size byname TEXTEQU textmacro |
Output | Output |
5 | 5 |