mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-22 05:45:10 +00:00
(sierpinski) Optimization
This commit is contained in:
parent
8cccc5c919
commit
4ef304c579
1 changed files with 15 additions and 19 deletions
|
@ -1,22 +1,18 @@
|
|||
( uxncli sierpinski.rom )
|
||||
( uxncli sierpinski.rom )
|
||||
|
||||
@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
|
||||
@sierpinski ( -> )
|
||||
[ LIT &size 10 ] STHk #01 SUB
|
||||
&>ver ( -- )
|
||||
DUP INCk
|
||||
&>pad ( length -- )
|
||||
#2018 DEO
|
||||
INC ADDk STHkr LTH ?&fill
|
||||
POP2
|
||||
#0a18 DEO
|
||||
#01 SUB INCk ?&ver
|
||||
POP POPr
|
||||
BRK
|
||||
#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
|
||||
|
||||
|
|
Loading…
Reference in a new issue