Add ES/Lab/Lab2/swap/LOOP2.asm
This commit is contained in:
parent
b1105e40e8
commit
fdc634b589
1 changed files with 27 additions and 0 deletions
27
ES/Lab/Lab2/swap/LOOP2.asm
Normal file
27
ES/Lab/Lab2/swap/LOOP2.asm
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
__Vectors
|
||||||
|
DCD 0x10001000
|
||||||
|
DCD Reset_Handler
|
||||||
|
ALIGN
|
||||||
|
AREA mycode,CODE,READONLY
|
||||||
|
ENTRY
|
||||||
|
EXPORT Reset_Handler
|
||||||
|
Reset_Handler
|
||||||
|
LDR R0, =SRC
|
||||||
|
LDR R1, =DST
|
||||||
|
MOV R12, #10
|
||||||
|
|
||||||
|
Loop
|
||||||
|
LDR R2, [R0], #4
|
||||||
|
STR R2, [R1], #4
|
||||||
|
SUBS R12, R12, #1
|
||||||
|
BNE Loop
|
||||||
|
|
||||||
|
STOP
|
||||||
|
B STOP
|
||||||
|
ALIGN
|
||||||
|
SRC DCD 0x00000032, 0x12345644, 0x00000005, 0x00000098, 0x000000AB, 0x000000CD, 0x00000055, 0x00000032, 0x000000CA, 0x00000045
|
||||||
|
AREA mydate, DATA, READWRITE
|
||||||
|
DST DCD 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
END
|
Loading…
Add table
Add a link
Reference in a new issue