Directives Reference
7-18 Copyright © 2000, 2001 ARM Limited. A ll rights reserved. ARM DUI 0068B
7.3.5 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
.
Syntax
{label} DCB expr{,expr}...
where:
expr
is either:
A numeric expression that evaluates to an integer in the range 128
to 255 (see Numeric expressions on pag e 3-20).
A quoted string. The characters of the s tring are loaded int o
consecutive bytes of store.
Usage
If
DCB
is followed by an instruction , use an
ALIGN
directive to ensure that the instruction
is aligned. See ALIGN on page7-50 for more information.
See also:
DCD and DCDU on page7-19
DCQ and DCQU on page7-24
DCW and DCWU on page7-25
SPACE on page7-17.
Example
Unlike C strings, ARM assembler strings are not null-terminated. You can construct a
null-terminated C string using
DCB
as follows:
C_string DCB "C_string",0