Difference between revisions of "Z80:Directives:DW"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
 
Line 22: Line 22:
 
=== Brass-Specific ===
 
=== Brass-Specific ===
  
[[Z80:Directives:ASC|.ASC]],[[Z80:Directives:ASCIIMAP|.ASCIIMAP]],[[Z80:Directives:BINARYFILL/EMPTYFILL|.BINARYFILL/.EMPTYFILL]],[[Z80:Directives:BINARYRANGE|.BINARYRANGE]],[[Z80:Directives:DBRND/DWRND|.DBRND/.DWRND]],[[Z80:Directives:DBSIN/DBCOS/DBTAN/DWSIN/DWCOS/DWTAN|.DBSIN/.DBCOS/.DBTAN/.DWSIN/.DWCOS/.DWTAN]],[[Z80:Directives:FILLW|.FILLW]],[[Z80:Directives:INCBIN|.INCBIN]],[[Z80:Directives:INCBMP|.INCBMP]],[[Z80:Directives:INCLABELS|.INCLABELS]]
+
[[Z80:Directives:ASC|.ASC]],[[Z80:Directives:ASCIIMAP|.ASCIIMAP]],[[Z80:Directives:EMPTYFILL|.EMPTYFILL]], [[Z80:Directives:BINARYFILL|.BINARYFILL]],[[Z80:Directives:BINARYRANGE|.BINARYRANGE]],[[Z80:Directives:DBRND/DWRND|.DBRND/.DWRND]],[[Z80:Directives:DBSIN/DBCOS/DBTAN/DWSIN/DWCOS/DWTAN|.DBSIN/.DBCOS/.DBTAN/.DWSIN/.DWCOS/.DWTAN]],[[Z80:Directives:FILLW|.FILLW]],[[Z80:Directives:INCBIN|.INCBIN]],[[Z80:Directives:INCBMP|.INCBMP]],[[Z80:Directives:INCLABELS|.INCLABELS]]
  
 
{{lowercase}}
 
{{lowercase}}

Latest revision as of 17:57, 5 February 2016

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

.DB/.BYTE,.BLOCK,.FILL

TASM-Specific

None

Brass-Specific

.ASC,.ASCIIMAP,.EMPTYFILL, .BINARYFILL,.BINARYRANGE,.DBRND/.DWRND,.DBSIN/.DBCOS/.DBTAN/.DWSIN/.DWCOS/.DWTAN,.FILLW,.INCBIN,.INCBMP,.INCLABELS