ARM assembly instruction DCD
Introduction
DCD: Data Definition pseudo-instruction is
generally used to allocate storage units for specific data and at the same time complete the initialization of allocated storage units.
Syntax format:
标号 DCD(或 DCDU) 表达式
The DCD (or DCDU) pseudo-instruction is used to allocate a continuous word storage unit and initialize it with a specified expression. The expression can be a program label or a numeric expression. DCD can also be replaced by "&".
The word storage unit allocated by DCD is word aligned, while the word storage unit allocated by DCDU is not strictly word aligned.
Example (STM32 startup file):
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD MemManage_Handler ; MPU Fault Handler
DCD BusFault_Handler ; Bus Fault Handler
DCD UsageFault_Handler ; Usage Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall Handler
DCD DebugMon_Handler ; Debug Monitor Handler
DCD 0 ; Reserved
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler