diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 23:14:01 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 23:14:01 +0000 |
commit | 04a27bcfecd65c2864ff9b00cae63d8057a42ce3 (patch) | |
tree | 2c66798c4c869fb4d83ba8c5dbd9f339a6341cb6 /examples | |
parent | af142e71ffa8e4c130cba150203f163739b3aee0 (diff) | |
download | ovm-04a27bcfecd65c2864ff9b00cae63d8057a42ce3.tar.gz ovm-04a27bcfecd65c2864ff9b00cae63d8057a42ce3.tar.bz2 ovm-04a27bcfecd65c2864ff9b00cae63d8057a42ce3.zip |
Use a limit on $I rather than on $B for examples/fib.asm
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fib.asm | 8 |
1 files changed, 4 insertions, 4 deletions
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 |