ARM Initialization and Layout Directives
The following table describes the ARM assembler directives that control initialization and store layout.
Directive | Syntax | Description |
---|---|---|
DCB |
|
Defines one or more bytes. Expression-list can include string expressions. Requires explicit trailing NULL. Also requires a DATA directive if used to define labeled data in Thumb code. Identical to = directive. |
= |
|
Identical to DCB directive. |
DCD |
|
Defines one or more words, aligned on a 4-byte boundary. Identical to & directive. |
& |
|
Identical to DCD above. |
DCDO |
|
Defines one or more words, aligned on 4-byte boundaries, as an offset from the static base register, sb (r9). |
DCDU |
|
Defines one or more words, not necessarily aligned. Use ALIGN directive after if DCDU is followed by code. |
DCFD |
|
Defines double-precision floating-point values. Adds padding before first defined number to align to 4-byte boundary. |
DCFDU |
|
Defines arbitrarily aligned double-precision floating-point values. |
DCFS |
|
Defines single-precision floating-point values. Adds padding before first defined number to align to 4-byte boundary. |
DCFSU |
|
Defines arbitrarily aligned single-precision floating-point values. |
DCI |
|
In ARM code: defines one or more words aligned on 4-byte boundaries. In Thumb code: defines one or more half words aligned on 2-byte boundaries. |
DCW |
|
Defines one or more half words aligned on 2-byte boundaries. Expressions should evaluate to an integer between –32768 and 65535. |
DCWU |
|
Defines one or more, not necessarily aligned, half words. Expressions should evaluate to an integer between –32768 and 65535. Use ALIGN directive afterward if DCWU followed by code. |
FIELD |
|
Reserves space within a storage map. Every time FIELD is used, label is given the value of the storage location counter @, and @ is then incremented by the number of bytes reserved. Identical to # directive. |
# |
|
Reserve space within a storage map. Every time # is used, label is given the value of the storage location counter @, and @ is then incremented by the number of bytes reserved. Identical to FIELD directive. |
MAP |
|
Sets the origin of a storage map at the address specified by expression. A storage-map location counter, @, is also set to the same address. Expression must be fully evaluative in the first pass of the assembly, but may be program-relative. If no ^ directive is used, the @ counter is set to 0; it can be reset any number of times using ^ to allow many storage maps to be established. Identical to ^ directive. |
^ |
|
Sets the origin of a storage map at the address specified by expression. A storage-map location counter, @, is also set to the same address. Expression must be fully evaluative in the first pass of the assembly, but may be program-relative. If no ^ directive is used, the @ counter is set to 0; it can be reset any number of times using ^ to allow many storage maps to be established. Identical to MAP directive. |
SPACE |
|
Reserves a zeroed area of store. Sets to 0 the number of bytes specified by numeric-expression. Identical to % directive. |
% |
|
Identical to SPACE directive. |
**Note **If you use the DCD directive with a Thumb label within a code area, the value stored is that of the Thumb label plus 1. This is because bit 0 of the register used in a BX instruction must be set to one in order to change state from ARM to Thumb. To avoid this, use the DATA directive when decoding data in code. For more information about the DATA directive, see ARM-Thumb Interworking Directives.
See Also
ARM Assembler Directives | ARM Assembler | ARM Linking Directives | ARM Diagnostic Directives | ARM Directives for Conditional Assembly | ARM Dynamic Listing Directive Options | ARM-Thumb Interworking Directives | ARM Constant and Variable Declarations | ARM Assembler Directives for Macro Definition | Miscellaneous ARM Directives
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.