12.15 DCB

The DCB directive allocates one or more bytes of memory, and defines the initial runtime contents of the memory.


{label} DCB expr{,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.


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


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
Related concepts
7.14 Numeric expressions
Related reference
12.16 DCD and DCDU
12.21 DCQ and DCQU
12.22 DCW and DCWU
12.64 SPACE or FILL
12.5 ALIGN
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.