DCB

The DCB directive allocates one or more bytes of memory, and defines the initial runtime contents of the memory. = is a synonym for DCB.

Show/hideSyntax

{label} DCB expr{,expr}...

where:

expr

is either:

  • a numeric expression that evaluates to an integer in the range -128 to 255.

  • a quoted string. The characters of the string are loaded into consecutive bytes of store.

Show/hideUsage

If DCB is followed by an instruction, use an ALIGN directive to ensure that the instruction is aligned.

Show/hideExample

Unlike C strings, ARM assembler strings are not nul-terminated. You can construct a nul-terminated C string using DCB as follows:

C_string   DCB  "C_string",0

Show/hideSee also

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0588B
Non-ConfidentialID062912