|
Pseudo instructions: equ Types of labels: named values Types of labels: Named valuesNamed values:
<name>[:][:] Pseudo instructions: equ Types of labels: Named values Labels: EQUequ <value>
Frequently you start your source with a buch of definitions for const values, like printing control codes or port addresses. These definitions require a keyword after the Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel, in exchange a colon is never required, but may be present.
foo: Pseudo instructions: equ Types of labels: Named values Labels: EQUequ 255 -1
bar Pseudo instructions: equ Types of labels: Named values Labels: EQUequ 255 -2
shelf Pseudo instructions: equ Types of labels: Named values Labels: EQUequ 0xffff
#define foobar foo & bar
You can append two colons '::' to the Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel name Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif you define a Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labelslabel inside a Assembler directives: #local, #endlocal, .local and .endlocal Pseudo instructions: #local, #endlocal, .local and .endlocal Including C Source Files: #local, #endlocal, .local and .endlocallocal context (after Assembler directives: #local, #endlocal, .local and .endlocal Pseudo instructions: #local, #endlocal, .local and .endlocal Including C Source Files: #local, #endlocal, .local and .endlocal#local) but want to make it globally visible:
Assembler directives: #local, #endlocal, .local and .endlocal Pseudo instructions: #local, #endlocal, .local and .endlocal Including C Source Files: #local, #endlocal, .local and .endlocal#local
...
foo:: Pseudo instructions: equ Types of labels: Named values Labels: EQUequ $+2
...
Assembler directives: #local, #endlocal, .local and .endlocal Pseudo instructions: #local, #endlocal, .local and .endlocal Including C Source Files: #local, #endlocal, .local and .endlocal#endlocal
Additionally zasm supports the use of the c preprocessor-style definition using '#define'. Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: LabelsLabels defined with '#define' are always global.
For more information see the chapter about label definition.
| |