From 1dd483b5f351e50ef6373f87cd27b001fb2a29a8 Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Tue, 31 Jan 2012 09:42:36 -0500 Subject: 3 now uses 61-70 also make it functional --- problem3.asm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/problem3.asm b/problem3.asm index 6786770..29a1a56 100644 --- a/problem3.asm +++ b/problem3.asm @@ -1,27 +1,27 @@ - -; copy 101-110 in reverse order in 51-60. add 51, 53, and 60. store in 30 - +; copy 101-110 in reverse order in 61-70. add 61, 63, and 70. store in 30 mov R0, 0x32 - mov R1, 0x32 - add R1, R0 + mov R1, 0x3C + add R0, R0 mov R2, 0xA - mov R4, R1 + mov R4, 0x3C + mov R3, 0x1 add R1, R2 - mov R2, 0x1 loop: inc R0 - mov R3, [R1] - mov [R0], R3 - sub R1, R2 - cmp R2, R4 + mov R5, [R0] + mov [R1], R5 + sub R1, R3 + cmp R1, R4 jne loop - mov R1, [R0] - mov R0, 0x35 + + mov R0, 0x3F mov R2, [R0] - add R1, R2 - mov R0, 0x33 + add R5, R2 + mov R1, 0x7 + add R0, R1 mov R2, [R0] - add R1, R2 + add R5, R2 + mov R0, 0x1E - mov [R0], R1 + mov [R0], R5 halt -- cgit v1.2.3-54-g00ecf