summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Abed <michael@pidgey.localdomain>2012-01-29 19:24:47 -0500
committerMichael Abed <michael@pidgey.localdomain>2012-01-29 19:24:47 -0500
commit27d58baae806abab09941a9569a4c803cc3f708d (patch)
tree22f450b17cca5040b10ef1b8f0f633b7022d81b5
parent3637a84ea5ac06f08893587b21de60ae9f02a787 (diff)
downloadec327-hw1-27d58baae806abab09941a9569a4c803cc3f708d.tar.gz
ec327-hw1-27d58baae806abab09941a9569a4c803cc3f708d.tar.bz2
ec327-hw1-27d58baae806abab09941a9569a4c803cc3f708d.zip
Fix register naming
-rw-r--r--problem2.asm14
1 files changed, 7 insertions, 7 deletions
diff --git a/problem2.asm b/problem2.asm
index 315ec4d..392bd33 100644
--- a/problem2.asm
+++ b/problem2.asm
@@ -1,20 +1,20 @@
-
; first 10 fibonacci in 200-209
-
mov R5, 0x32
- mov R5, R4
+ mov R4, R5
add R5, R4
add R5, R4
add R5, R4
mov R0, 0x1
mov R1, 0x1
mov R3, 0xA
- mov R4, 1
+ mov R4, 0
loop:
+ mov [R5], R0
+ mov R2, R1
+ add R1, R0
+ mov R0, R2
inc R4
- mov R3, R2
- add R2, R1
- mov R3, R1
+ inc R5
cmp R4, R3
jne loop
halt