<--  back   Last regenerated: 2018-05-23 16:12:32 kio

zasm - Z80 Assembler – Version 4.2

Pseudo instructions

equ

Pseudo instructions: equ
Types of labels: named values
Types of labels: Named values
Named values:

<name>[:][:] Pseudo instructions: equ
Types of labels: Named values
Labels: EQU
equ <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: Labels
label, in exchange a colon is never required, but may be present.

foo:    Pseudo instructions: equ
Types of labels: Named values
Labels: EQU
equ 255 -1 bar Pseudo instructions: equ
Types of labels: Named values
Labels: EQU
equ 255 -2 shelf Pseudo instructions: equ
Types of labels: Named values
Labels: EQU
equ 0xffff #define foobar foo & bar

You can append two colons '::' to the Pseudo instructions: Label definition
Numeric expressions: Labels
8080 Assembler: Labels
label name Assembler directives: #if, #elif, #else, #endif
Pseudo instructions: if, endif
if you define a Pseudo instructions: Label definition
Numeric expressions: Labels
8080 Assembler: Labels
label inside a local context (after Assembler directives: #local and #endlocal
Including C Source Files: #local and #endlocal
#local) but want to make it globally visible:

Assembler directives: #local and #endlocal
Including C Source Files: #local and #endlocal
#local ... foo:: Pseudo instructions: equ
Types of labels: Named values
Labels: EQU
equ $+2 ... Assembler directives: #local and #endlocal
Including C Source Files: #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: Labels
Labels defined with '#define' are always global.

For more information see the chapter about label definition.

Valid HTML   Valid CSS