Keil Logo


12.22 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.


{label} DCW{U} expr{,expr}...
is a numeric expression that evaluates to an integer in the range –32768 to 65535.


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.


data    DCW     -225,2*number   ; number must already be defined
        DCWU    number+4
Related concepts
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.