uxn/projects/examples/exercises/sierpinski.tal

18 lines
364 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 ( -> )
2024-03-08 19:39:45 -05:00
( mask ) [ LIT2r 0a18 ] [ LIT2r 2018 ]
2024-03-08 19:48:51 -05:00
( size ) [ LIT2 &size 1001 ] SUB
2024-03-08 18:55:58 -05:00
&>ver ( -- )
DUP INCk
&>pad ( length -- )
2024-03-08 19:39:45 -05:00
DEOkr
2024-03-08 18:55:58 -05:00
#01 SUB DUP ?&>pad
&>fill ( length i -- )
2024-03-08 19:39:45 -05:00
ANDk DUP2r ?{ POP2r ORA2kr } DEOr DEOkr
INC ADDk ,&size LDR LTH ?&>fill
POP2 OVR2r DEOr
2024-03-08 18:55:58 -05:00
#01 SUB INCk ?&>ver
2024-03-08 19:39:45 -05:00
POP POP2r POP2r BRK
2024-02-29 18:44:58 -05:00