mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-19 04:15:10 +00:00
22 lines
370 B
Tal
22 lines
370 B
Tal
( Fibonacci:
|
|
A series of numbers where the next number
|
|
is made of the two numbers before it )
|
|
|
|
|0100 ( -> ) @reset
|
|
|
|
#0000 INC2k ADD2k
|
|
&loop
|
|
DUP2 print #0a18 DEO
|
|
ADD2k LTH2k ?&loop
|
|
( halt )
|
|
#010f DEO
|
|
|
|
BRK
|
|
|
|
@print ( short* -- )
|
|
|
|
SWP print/byte
|
|
&byte ( byte -- ) DUP #04 SFT print/char
|
|
&char ( char -- ) #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO
|
|
|
|
JMP2r
|