(sierpinski) Optimization

This commit is contained in:
Devine Lu Linvega 2024-03-08 16:39:45 -08:00
parent 24dbf258fd
commit d7ee187d1d
1 changed files with 7 additions and 7 deletions

View File

@ -1,17 +1,17 @@
( uxncli sierpinski.rom ) ( uxncli sierpinski.rom )
@sierpinski ( -> ) @sierpinski ( -> )
[ LIT &size 10 ] STHk #01 SUB ( mask ) [ LIT2r 0a18 ] [ LIT2r 2018 ]
( size ) [ LIT &size 10 ] #01 SUB
&>ver ( -- ) &>ver ( -- )
DUP INCk DUP INCk
&>pad ( length -- ) &>pad ( length -- )
#2018 DEO DEOkr
#01 SUB DUP ?&>pad #01 SUB DUP ?&>pad
&>fill ( length i -- ) &>fill ( length i -- )
ANDk #2018 DEOk SWP ROT ?{ #0a ORA } ANDk DUP2r ?{ POP2r ORA2kr } DEOr DEOkr
SWP DEO INC ADDk ,&size LDR LTH ?&>fill
INC ADDk STHkr LTH ?&>fill POP2 OVR2r DEOr
POP2 #0a18 DEO
#01 SUB INCk ?&>ver #01 SUB INCk ?&>ver
POP POPr BRK POP POP2r POP2r BRK