Next: , Previous: , Up: Z80-Dependent   [Contents][Index]


9.56.4 Z80 Assembler Directives

as for the Z80 supports some additional directives for compatibility with other assemblers.

These are the additional directives in as for the Z80:

.assume ADL = expression

Set ADL status for eZ80. Non-zero value enable compilation in ADL mode else used Z80 mode. ADL and Z80 mode produces incompatible object code. Mixing both of them within one binary may lead problems with disassembler.

db expression|string[,expression|string...]
defb expression|string[,expression|string...]
defm string[,string...]

For each string the characters are copied to the object file, for each other expression the value is stored in one byte. A warning is issued in case of an overflow. Backslash symbol in the strings is generic symbol, it cannot be used as escape character. See .ascii.

dw expression[,expression...]
defw expression[,expression...]

For each expression the value is stored in two bytes, ignoring overflow.

d24 expression[,expression...]
def24 expression[,expression...]

For each expression the value is stored in three bytes, ignoring overflow.

d32 expression[,expression...]
def32 expression[,expression...]

For each expression the value is stored in four bytes, ignoring overflow.

ds count[, value]
defs count[, value]

Fill count bytes in the object file with value, if value is omitted it defaults to zero.

symbol defl expression

The defl directive is like .set but with different syntax. See .set. It set the value of symbol to expression. Symbols defined with defl are not protected from redefinition.

symbol equ expression

The equ directive is like .equiv but with different syntax. See .equiv. It set the value of symbol to expression. It is an error if symbol is already defined. Symbols defined with equ are not protected from redefinition.

psect name

A synonym for .section, no second argument should be given. See .section.

xdef symbol

A synonym for .global, make symbol is visible to linker. See .global.

xref name

A synonym for .extern (.extern).


Next: , Previous: , Up: Z80-Dependent   [Contents][Index]