Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
push 0
push 1
0:
swap
dup
onum
push 10
ochr
copy 1
add
jump 0

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,29 @@
; Read n.
push 0
dup
inum
load
; Call fib(n), ouput the result and a newline, then exit.
call 0
onum
push 10
ochr
exit
0:
dup
push 2
sub
jn 1 ; Return if n < 2.
dup
push 1
sub
call 0 ; Call fib(n - 1).
swap ; Get n back into place.
push 2
sub
call 0 ; Call fib(n - 2).
add ; Leave the sum on the stack.
1:
ret