ARM VERSION 1.2 Computer Hardware User Manual


 
Directives Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-23
7.3.10 DCI
In ARM code, the
DCI
directive allocates one or more words of memory, aligned on
4-byte boundaries, and defines the initial runtime contents of the memory.
In Thumb code, the
DCI
directive allocates one or more halfwords of memory, aligned
on 2-byte boundaries, and defines the initial runtime contents of the memory.
Syntax
{label} DCI expr{,expr}
where:
expr
is a numeric expression (see Numeric expressions on page 3-20).
Usage
The
DCI
directive is very like the
DCD
or
DCW
directives, but the location is marked as code
instead of data. Use
DCI
when writing macros for new instructions not supported by the
version of the assembler you are using.
In ARM code,
DCI
inserts up to three bytes of padding before the first defined word, if
necessary, to achieve 4-byte alignment. In Thumb code,
DCI
inserts an initial byte of
padding, if necessary, to achieve 2-byte alignment.
See also DCD and DCDU on page 7-19 and DCW and DCWU on page 7-25.
Example
MACRO ; this macro translates newinstr Rd,Rm
; to the appropriate machine code
newinst $Rd,$Rm
DCI 0xe16f0f10 :OR: ($Rd:SHL:12) :OR: $Rm
MEND