DW

Define constant word(s) in program memory and EEPROM.

The DW directive reserves memory resources in the program memory or the EEPROM. In order to be able to refer to the reserved locations, the DW directive should be preceded by a label. The DW directive takes a list of expressions, and must contain at least one expression. The DB directive must be placed in a Code Segment or an EEPROM Segment.

The expression list is a sequence of expressions, delimited by commas. Each expression must evaluate to a number between -32768 and 65535. If the expression evaluates to a negative number, the 16-bits two's complement of the number will be placed in the program memory or EEPROM location.

Syntax
LABEL: .DW expressionlist
Example
.CSEG 
varlist: .DW 0, 0xffff, 0b1001110001010101, -32768, 65535

.ESEG 
eevarlst: .DW 0,0xffff,10