4.13 Data definition directives

Data definition directives allocate memory, define data structures, and set initial contents of memory.

The following table shows how to translate ARM® syntax data definition directives to GNU syntax directives:

Note

This list only contains examples of common data definition assembly directives. It is not exhaustive.

Table 4-3 Data definition directives translation

ARM syntax directive GNU syntax directive Description
DCB .byte Allocate one-byte blocks of memory, and specify the initial contents.
DCW .hword Allocate two-byte blocks of memory, and specify the initial contents.
DCD .word Allocate four-byte blocks of memory, and specify the initial contents.
DCQ .quad Allocate eight-byte blocks of memory, and specify the initial contents.
SPACE .space Allocate a zeroed block of memory.
Related information
GNU Binutils - Using as: .byte
GNU Binutils - Using as: .word
GNU Binutils - Using as: .hword
GNU Binutils - Using as: .quad
GNU Binutils - Using as: .space
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.