Implemented drop directive and fibonacci program

This commit is contained in:
cannoli-fruit 2026-07-26 23:20:39 -04:00
commit 1140b5b140
2 changed files with 26 additions and 0 deletions

21
flagpole/tests/fib.fp Normal file
View file

@ -0,0 +1,21 @@
$inc fvmstd.fp
proc fib
if dup 0 == then
drop 0 return
endif
if dup 1 == then
drop 1 return
endif
dup
1 u- :fib
swap
2 u- :fib
u+
endproc
proc main
"Idx: " :puts :getuint
:fib :putuint
endproc