5.8.21. DCD or & directive

The DCD directive allocates one or more words of memory, aligned on 4-byte boundaries, and defines the initial runtime contents of the memory. & is a synonym for DCD.

Syntax

The syntax of DCD is:

{label} DCD expression{,expression}

where:

expression

is either:

Usage

You must use the DATA directive if you use DCD to define labeled data within Thumb code. Refer to DATA directive for more information.

DCD inserts up to 3 bytes of padding before the first defined word, if necessary, to achieve 4-byte alignment. Use DCDU if you do not require alignment.

See also:

Example

data1		DCD		1,5,20				; Defines 3 words containing
								; decimal values 1, 5, and 20
data2		DCD		mem06				; Defines 1 word containing the
								; address of the label mem06
data3		DCD		glb + 4				; Defines 1 word containing
								; 4 + the value of glb
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential