#define <name> <value>
Define an alias for a well-known Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction or #define: Define a global label .globl: Define a global labeldefine 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: Labelslabel
- 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: Labelslabels are supported.
#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:
All these mappings are recognized and … ignored.
Other mappings result in an error. (Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif 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 foo 123
#define bar $ - shelf
#define can be used to #define: Define a global label .globl: Define a global labeldefine 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: LabelsLabels defined with '#define' are always global, even Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endifif 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 .endlocallocal context.
Use of this directive is discouraged, many assemblers do not understand it. Use the Pseudo instructions 8080 Assembler: 8080 pseudo instructionspseudo instruction 'Pseudo instructions: equ Types of labels: Named values Labels: EQUequ' instead.
|