z80:Directives:DW
From Learn @ Cemetech
Revision as of 17:11, 5 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
Inserts a word of data into the program with value defined by the input. In this case, a "word" is 2 bytes.
Syntax
.dw n ;n is any 2-byte integer .word n
Uses
The second easiest way to put data directly into your program. Note that since the z80 processor is little-endian, loading into a 16-bit register from 2 bytes inserted using .DB will cause the least-significant-byte and most-significant-byte to be swapped.
See Also
General Directives
TASM-Specific
None
Brass-Specific
.ASC,.ASCIIMAP,.BINARYFILL/.EMPTYFILL,.BINARYRANGE,.DBRND/.DWRND,.DBSIN/.DBCOS/.DBTAN/.DWSIN/.DWCOS/.DWTAN,.FILLW,.INCBIN,.INCBMP,.INCLABELS