From 04a27bcfecd65c2864ff9b00cae63d8057a42ce3 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 29 Nov 2023 23:14:01 +0000 Subject: Use a limit on $I rather than on $B for examples/fib.asm --- examples/fib.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/fib.asm b/examples/fib.asm index 565c5a8..0a9e969 100644 --- a/examples/fib.asm +++ b/examples/fib.asm @@ -5,7 +5,7 @@ ;;; stack version. ;; Constants - %const(limit) 12200160415121876738 %end + %const(limit) 93 %end %const(increment_i) push.reg.word 2 @@ -57,10 +57,10 @@ loopback: plus.word mov.word 1 - ;; IF $B >= $LIMIT ... + ;; IF $I < $LIMIT ... + push.reg.word 2 push.word $limit - push.reg.word 1 - gte.word + lt.word ;; THEN jump to `loopback` jump.if.byte loopback ;; ELSE halt -- cgit v1.2.3-13-gbd6f