DW - Declare Data of One Word

MPASM Assembler

DW - Declare Data of One Word

Syntax

[<label>] dw <expr>[,<expr>,...,<expr>]

Description

Reserve program memory words for data, initializing that space to specific values. For PIC18CXXX devices, dw functions like db. Values are stored into successive memory locations and the location counter is incremented by one. Expressions may be literal strings and are stored as described in the data directive.

When generating an object file, this directive can also be used to declare initialized data values. Refer to the idata directive for more information.

Example

dw 39, "diagnostic 39", (d_list*2+d_offset)

dw diagbase-1

See Also

DATA DB IDATA


Microchip Technology Inc.
Microchip's Web Site
Voice: (480) 792-7200
Fax: (480) 899-9210
Microchip's E-mail Address
PreviousNext