Add ES/Lab/Lab2/swap/LOOP.asm
This commit is contained in:
parent
e14e8d58e7
commit
b1105e40e8
1 changed files with 26 additions and 0 deletions
26
ES/Lab/Lab2/swap/LOOP.asm
Normal file
26
ES/Lab/Lab2/swap/LOOP.asm
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
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 R2,#10
|
||||||
|
BACK
|
||||||
|
LDR R3,[R0],#4;
|
||||||
|
STR R3,[R1],#04;
|
||||||
|
SUBS R2,#1
|
||||||
|
BNE BACK
|
||||||
|
|
||||||
|
STOP
|
||||||
|
B STOP
|
||||||
|
ALIGN
|
||||||
|
SRC DCD 0x00000032, 0x12345644, 0x00000005, 0x00000098, 0x000000AB, 0x000000CD, 0x00000055, 0x00000032, 0x000000CA, 0x00000045
|
||||||
|
AREA mydate, DATA, READWRITE
|
||||||
|
DST DCD 0
|
||||||
|
END
|
Loading…
Add table
Add a link
Reference in a new issue