DCW and DCWU

The DCW directive allocates one or more halfwords of memory, aligned on two-byte boundaries, and defines the initial runtime contents of the memory.

DCWU is the same, except that the memory alignment is arbitrary.

Show/hideSyntax

{label} DCW{U} expr{,expr}...

where:

expr

is a numeric expression that evaluates to an integer in the range -32768 to 65535.

Show/hideUsage

DCW inserts a byte of padding before the first defined halfword if necessary to achieve two-byte alignment.

Use DCWU if you do not require alignment.

Show/hideExamples

data    DCW     -225,2*number   ; number must already be defined
        DCWU    number+4

Show/hideSee also

Concept:

Using the Assembler:

Reference:
Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0489E
Non-ConfidentialID071611