Add ES/Lab/Lab2/array_reversal.asm

This commit is contained in:
aadit 2025-08-07 11:48:42 +05:30
parent 47d2a871e9
commit b43a1d3360

View file

@ -0,0 +1,28 @@
AREA RESET, DATA, READONLY
EXPORT __Vectors
__Vectors
DCD 0x10001000
DCD Reset_Handler
ALIGN
AREA mycode,CODE,READONLY
ENTRY
EXPORT Reset_Handler
Reset_Handler
MOV R2, #5
LDR R0, =SRC
LDR R1, =SRC + 36
Loop
LDR R3, [R0]
LDR R4, [R1]
STR R3, [R1], #-4
STR R4, [R0], #4
SUBS R2, #1
BNE Loop
STOP
B STOP
AREA mydate, DATA, READWRITE
SRC DCD 0x00000032, 0x12345644, 0x00000005, 0x00000098, 0x000000AB, 0x000000CD, 0x00000055, 0x00000032, 0x000000CA, 0x00000045
END