uxn/projects/examples/exercises/sierpinski.tal

25 lines
329 B
Tal

( uxncli sierpinski.rom )
|100 @on-reset ( -> )
[ LIT &size 20 ] STHk #01 SUB
&ver ( -- )
DUP
#00 EQUk ?{
&pad ( -- )
#2018 DEO
INC GTHk ?&pad
} POP
#00
&fill
ANDk #202a ROT ?{ SWP } POP #18 DEO
#2018 DEO
INC ADDk STHkr LTH ?&fill
POP2
#0a18 DEO
#01 SUB DUP #ff NEQ ?&ver
POP POPr
BRK