Data definition or allocation directives
Syntax
DC8 expr [,expr] ...
DC16 expr [,expr] ...
DC24 expr [,expr] ...
DC32 expr [,expr] ...
DC64 expr [,expr] ...
DCB expr [,expr] ...
DCD expr [,expr] ...
DCQ expr [,expr] ...
DCW expr [,expr] ...
DF16 value [,value] ...
DF32 value [,value] ...
DF64 value [,value] ...
DS count
DS8 count
DS16 count
DS24 count
DS32 count
DS64 count
Parameters
| A valid absolute expression specifying the number of elements to be reserved. |
| A valid absolute, relocatable, or external expression, or an ASCII string. ASCII strings are zero filled to a multiple of the data size implied by the directive. Double-quoted strings are zero-terminated. For |
| A valid absolute expression or floating-point constant. |
Description
These directives define values or reserve memory.
Use DC8, DC16, DC24, DC32, DC64,DCB, DCD, DCQ, DCW, DF16, DF32, or DF64 to create a constant, which means an area of bytes is reserved big enough for the constant.
Use DS8, DS16, DS24, , or DS64 to reserve a number of uninitialized bytes.
For information about the restrictions that apply when using a directive in an expression, see Expression restrictions.
The column Alias in the following table shows the Arm Limited directive that corresponds to the IAR directive.
Directive | Alias | Description |
|---|---|---|
Generates 8-bit constants, including strings. | ||
Generates 16-bit constants. | ||
Generates 24-bit constants. | ||
Generates 32-bit constants. | ||
| Generates 64-bit constants. | |
Generates 16-bit floating-point constants. | ||
Generates 32-bit floating-point constants. | ||
Generates 64-bit floating-point constants. | ||
Allocates space for 8-bit integers. | ||
Allocates space for 16-bit integers. | ||
Allocates space for 24-bit integers. | ||
Allocates space for 32-bit integers. | ||
Allocates space for 64-bit integers. |
Note
Relocatable expressions cannot be used in a DC8 directive.