|
@@ -1,4 +1,4 @@
|
|
|
-ld @regA, 0 // jpt, jpf, eq, lt register
|
|
|
+ld @regA, 0 // jz, seq, lt register
|
|
|
ld @counter, 10 // loop counter
|
|
|
ld @lower, 0 // lower number
|
|
|
ld @higher, 1 // higher number
|
|
@@ -8,6 +8,6 @@ add @higher, 0, @regB // Move higher number to a storage point
|
|
|
add @higher, @lower, @higher // Add higher and lower number, and store in higher number slot
|
|
|
add @regB, 0, @lower // Move stored number to lower number slot
|
|
|
add @counter, -1, @counter // Subtract 1 from the loop counter
|
|
|
-eq @counter, 0, @regA // Check if the loop counter is 0
|
|
|
-jpf @regA, Fibonacci + 1 // Loop the function if not
|
|
|
+seq @counter, 0, @regA // Check if the loop counter is 0
|
|
|
+jz @regA, Fibonacci + 1 // Loop the function if not
|
|
|
hlt // Otherwise, exit
|