uxn/projects/examples/exercises/sierpinski.tal

19 lines
323 B
Tal
Raw Normal View History

2024-03-08 18:55:58 -05:00
( uxncli sierpinski.rom )
2024-02-29 18:44:58 -05:00
2024-03-08 18:55:58 -05:00
@sierpinski ( -> )
[ LIT &size 10 ] STHk #01 SUB
&>ver ( -- )
DUP INCk
&>pad ( length -- )
2024-02-29 18:44:58 -05:00
#2018 DEO
2024-03-08 18:55:58 -05:00
#01 SUB DUP ?&>pad
&>fill ( length i -- )
ANDk #202a ROT ?{ SWP }
POP #18 DEO
#2018 DEO
INC ADDk STHkr LTH ?&>fill
POP2 #0a18 DEO
#01 SUB INCk ?&>ver
POP POPr BRK
2024-02-29 18:44:58 -05:00