STACK_TOP EQU 0x00002000
AREA reset,CODE
DCD STACK_TOP
DCD Start
ENTRY
Start
LDR R0,=data1 ;第一步执行,R0指向STACK_TOP EQU 0x00002000中 的栈首地址0x00002000,将data1赋值给R0,
LDR R1,[R0] ;data1的高32位到R1
LDR R2,[R0,#4];data1的高32位到R2
LDR R0,=data2
LDR R3,[R0]
LDR R4,[R0,#4]
ADDS R6,R2,R4
ADC R5,R1,R3
LDR R0,=result
STR R5,[R0]
STR R6,[R0,#4]
data1 DCD 0X11223344,0xFFDDCCBB ;定义变量并给变量赋值
data2 DCD 0X11223344,0xFFDDCCBB
result DCD 0,0 ;定义变量,赋初值,为了存储计算后的数据R5, R6
END
|