2020-02-15 10:28 PM
Try.S
AREA RESET, DATA, READONLY
DCD 0x20001000 ; stack pointer value when stack is empty
DCD Reset_Handler ; reset vector
ALIGN
AREA Init, CODE;, READONLY
ENTRY
Reset_Handler PROC
EXPORT Reset_Handler
IMPORT Start
LDR R0, =Start
BX R0
ENDP
END
Main.S
AREA |.text|, CODE
export Start
Start PROC
LDR r0, =SRC
LDR r1, =DST
MOV r4, #0x03
Repeat
LDR r2, [r0], #0x04
STR r2, [r1], #0x04
SUB r4, r4, #0x01
CMP r4, #0x01
BNE Repeat
loop
B loop
align
ENDP
AREA MyData, DATA, READWRITE
SRC DCD 0x1234,0x5678
DST DCD 0x1111,0x2222
END