From fdc634b5894f7bdf887c00d2499562dd0a94d17c Mon Sep 17 00:00:00 2001 From: aadit Date: Thu, 31 Jul 2025 12:21:39 +0530 Subject: [PATCH] Add ES/Lab/Lab2/swap/LOOP2.asm --- ES/Lab/Lab2/swap/LOOP2.asm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ES/Lab/Lab2/swap/LOOP2.asm diff --git a/ES/Lab/Lab2/swap/LOOP2.asm b/ES/Lab/Lab2/swap/LOOP2.asm new file mode 100644 index 0000000..78ff4d8 --- /dev/null +++ b/ES/Lab/Lab2/swap/LOOP2.asm @@ -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 \ No newline at end of file