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

# zasm - Z80 Assembler – Version 4.4

# Assembler directives

[<prev] [next>]

| ### #define
    #define <name> <value>
Define an alias for a well-known Pseudo instructions 8080 Assembler: 8080 pseudo instructions pseudo instruction or #define: Define a global label .globl: Define a global label define a global label. #define is used in some sources in three ways: Define an alias for an instruction name Define a Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labels label Define a preprocessor function with arguments From that the most common aliases and the definition of Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labels labels are supported. ##### Define an alias
    #define Pseudo instructions: equ
    Types of labels: Named values
    Labels: EQUequ  .Pseudo instructions: equ
    Types of labels: Named values
    Labels: EQUequ
    #define defs .Pseudo instructions: defs, ds, .ds, .block, .blkb and data
    8080 pseudo instructions: DSds
Within the following groups names can be mapped in any direction: org .org defw dw .dw .word defb Pseudo instructions: defb, db, .db and .byte 8080 pseudo instructions: DB db .Pseudo instructions: defb, db, .db and .byte 8080 pseudo instructions: DB db .byte defm dm .dm .text .ascii defs ds .ds .block All these mappings are recognized and … ignored. Other mappings result in an error. (Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endif if you feel a mapping should be added then send an email.) zxsp does not support aliases for instruction names, but it already knows about quite a lot of them. Therefore it can ignore these #defines. Use of this directive is discouraged. It is provided because some sources use it. Just delete it. ##### Define a global label
    #define foo 123
    #define bar $ - shelf
#define can be used to #define: Define a global label .globl: Define a global label define a global label as with
    foo:: Pseudo instructions: equ
    Types of labels: Named values
    Labels: EQUequ 123
    bar:: Pseudo instructions: equ
    Types of labels: Named values
    Labels: EQUequ $ - shelf
Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labels Labels defined with '#define' are always global, even Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endif if defined 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. Use of this directive is discouraged, many assemblers do not understand it. Use the Pseudo instructions 8080 Assembler: 8080 pseudo instructions pseudo instruction 'Pseudo instructions: equ Types of labels: Named values Labels: EQU equ' instead. |

[<prev] [top] [next>]