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

# zasm - Z80 Assembler – Version 4.4

# Pseudo instructions

[<prev] [next>]

| ### defm, dm, .dm, .text and .ascii
    defm   <text> [,<text>]
    dm     <text> [,<text>]
    .dm    <text> [,<text>]
    .text  <text> [,<text>]
    .ascii <text> [,<text>]
Store one or more text strings 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 'string oriented' usage cases. For the 'byte oriented' usage cases see 'defb'. The text string may be given in the following formats:
    $12345678....   packed hex string
    12345678h       packed hex string
    'text'          character string, delimited by <'>, must not contain <'>
    "text"          character string, delimited by <">, must not contain <">
The hex bytes or ascii bytes are stored in the same order as they appear in the string, e.g. $1234 is stored as $12,$34 and 'ab' is stored as 'a','b'. The last byte of a character string or a packed hex string may be modified with an Expressions 8080 Assembler: Expressions expression; commonly used is setting bit 7 of the last character of a message:
    defm   "this is my message"+$80
There are 4 predefined names for text strings:
    __date__        current date:      "Jan.31.96"
    __time__        current time:      "23:56:30"
    __file__        current file name  "filename.ext"
    __line__        current line numer "815"
Your assembler source is expected to be either 7-bit clean ascii or utf-8 encoded. Characters in character strings are utf-8 decoded and then 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. Characters must be representable in the target system's character Pseudo instructions: defl, set and '=' Labels: SET set or an error will be flagged. Assembler directives: #if, #elif, #else, #endif Pseudo instructions: if, endif If no character Pseudo instructions: defl, set and '=' Labels: SET set translation was defined, then the characters must, after utf-8 decoding, fit in a byte, e.g. 'ä' is allowed, '€' is not. |

[<prev] [top] [next>]