Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Data definition or allocation directives

In this section:
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

count

A valid absolute expression specifying the number of elements to be reserved.

expr

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 DC64, expr cannot be relocatable or external.

value

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

DC8

DCB

Generates 8-bit constants, including strings.

DC16

DCW

Generates 16-bit constants.

DC24

Generates 24-bit constants.

DC32

DCD

Generates 32-bit constants.

DC64

DCQ

Generates 64-bit constants.

DF16

Generates 16-bit floating-point constants.

DF32

Generates 32-bit floating-point constants.

DF64

Generates 64-bit floating-point constants.

DS8

DS

Allocates space for 8-bit integers.

DS16

Allocates space for 16-bit integers.

DS24

Allocates space for 24-bit integers.

DS32

Allocates space for 32-bit integers.

DS64

Allocates space for 64-bit integers.

Table 154. Data definition or allocation directives  


Note

Relocatable expressions cannot be used in a DC8 directive.