| |||
| Home > Directives Reference > Data definition directives > DCI | |||
In ARM code, the DCI directive allocates one
or more words of memory, aligned on four-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 two-byte boundaries, and
defines the initial runtime contents of the memory.
{label} DCI{.W} expr{,expr}
where:
expris a numeric expression (see Numeric expressions).
.Wif present, indicates that four bytes must be inserted in Thumb code.
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
four-byte alignment. In Thumb code, DCI inserts an
initial byte of padding, if necessary, to achieve two-byte alignment.
You can use DCI to insert a bit pattern into
the instruction stream. For example, use:
DCI 0x46c0
to insert the Thumb operation MOV r8,r8.
See also DCD and DCDU and DCW and DCWU.
MACRO ; this macro translates newinstr Rd,Rm
; to the appropriate machine code
newinst $Rd,$Rm
DCI 0xe16f0f10 :OR: ($Rd:SHL:12) :OR: $Rm
MEND