summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Abed <michaelabed@gmail.com>2012-01-31 21:16:43 -0500
committerMichael Abed <michaelabed@gmail.com>2012-01-31 21:16:43 -0500
commit8b842f3539e7ade18a590c67c096413ed05ccd12 (patch)
tree975777848575dc860529cf81e7352f7da950274b
parentc265371f7f5272c0dd849287a1e8b87fca0eedea (diff)
downloadec327-hw1-8b842f3539e7ade18a590c67c096413ed05ccd12.tar.gz
ec327-hw1-8b842f3539e7ade18a590c67c096413ed05ccd12.tar.bz2
ec327-hw1-8b842f3539e7ade18a590c67c096413ed05ccd12.zip
handle x^0
-rw-r--r--problem4.asm5
1 files changed, 5 insertions, 0 deletions
diff --git a/problem4.asm b/problem4.asm
index 9c52c4e..3bf06de 100644
--- a/problem4.asm
+++ b/problem4.asm
@@ -5,10 +5,15 @@
mov R4, [R4]
mov R5, R4
inc R2
+ cmp R1, R0
+ je zero
cmp R1, R2
jne outer
mov R0, R4
jmp done
+zero:
+ mov R0, 0x1
+ jmp done
outer:
mov R0, 0
inner: