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

# zasm - Z80 Assembler – Version 4.4

# Pseudo instructions

[<prev] [next>]

| ### defb, db, .db and .byte
    defb  <value> [,<value>...]
    Pseudo instructions: defb, db, .db and .byte
    8080 pseudo instructions: DBdb    <value> [,<value>...]
    .Pseudo instructions: defb, db, .db and .byte
    8080 pseudo instructions: DBdb   <value> [,<value>...]
    .byte <value> [,<value>...]
Store a series of bytes into the code. The 'defb' Pseudo instructions 8080 Assembler: 8080 pseudo instructions pseudo instruction evaluates the argument Expressions 8080 Assembler: Expressions expressions and puts them one byte after the other into the code segment. Note: Due to the various methods for using 'defb' and 'defm' found in the wild zasm handles these two instructions in exactly the same way. This paragraph describes the 'byte oriented' usage cases. For the 'string oriented' usage cases see 'defm'.
        defb $123, _foo+10, (_N*2)+1, 'a', 'b'+1
Numeric literals can be written in various formats and the value can be a numeric expression. The values are checked to be either a valid int8 or uint8 value, which means it must be in range -128 to +255. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endif If some bytes unexpectedly are reported to be out of range, then your source may assume no operator hierarchy. Then use Differences from v3 to v4: Command line options Command Line Options Command Line Options: Command line options command line option --Command Line Options: --flatops, .flatops Commands for command line options: --flatops, .flatops flatops. Character literals like 'a' are translated into the target system's character Pseudo instructions: defl, set and '=' Labels: SET set Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endif if a #charset conversion has been defined. There are some useful functions known by the Expressions 8080 Assembler: Expressions expression evaluator: hi(N) and lo(N) to calculate the high and low byte of a 2-byte word min(N,N) and max(N,N) to calculate the smaller or the larger value of two values opcode(ld a,b) or similar to calculate the major opcode byte of a Z80 instruction defined(NAME) to determine whether a Pseudo instructions: Label definition Numeric expressions: Labels 8080 Assembler: Labels label is defined at this point in the source __line__ inserts the current line number |

[<prev] [top] [next>]