<--  back   Last regenerated: 2022-04-20 17:31:36 kio

zasm - Z80 Assembler – Version 4.4

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

For more information see the chapter about label definition.

Valid HTML   Valid CSS