Minor optimizations

This commit is contained in:
neauoire 2021-08-22 19:56:03 -07:00
parent f00ee8c80e
commit 12009e88c8
3 changed files with 4 additions and 4 deletions

View File

@ -121,7 +121,7 @@ RTN
&loop &loop
( save-x ) OVR #03 MOD TOS 8** .anchor/x LDZ2 ADD2 .Screen/x DEO2 ( save-x ) OVR #03 MOD TOS 8** .anchor/x LDZ2 ADD2 .Screen/x DEO2
( save-y ) OVR #03 DIV TOS 8** .anchor/y LDZ2 ADD2 .Screen/y DEO2 ( save-y ) OVR #03 DIV TOS 8** .anchor/y LDZ2 ADD2 .Screen/y DEO2
( get digit* ) OVR STHkr DUP ADD TOS ;digits ADD2 LDA2 ( get digit* ) OVR STHkr ADDk TOS ;digits ADD2 LDA2
( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2 ( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2
( set tile ) 8** ;tiles ADD2 ( set tile ) 8** ;tiles ADD2
( set style ) .style LDZ #40 SFT TOS ADD2 ( set style ) .style LDZ #40 SFT TOS ADD2

View File

@ -357,7 +357,7 @@ RTN
@draw-mixer ( mixer -- ) @draw-mixer ( mixer -- )
DUP STH #00 SWP PAD-HEIGHT ** .mix-view/y1 LDZ2 ++ #0003 ++ STHk #00 SWP PAD-HEIGHT ** .mix-view/y1 LDZ2 ++ #0003 ++
( adsr ) ( adsr )
DUP2 .mix-view/x1 LDZ2 SWP2 DUP2 .mix-view/x1 LDZ2 SWP2
@ -551,7 +551,7 @@ RTN
@line-rect ( x1* y1* x2* y2* color -- ) @line-rect ( x1* y1* x2* y2* color -- )
( load ) .color STZ DUP2 STH2 .rect/y2 STZ2 .rect/x2 STZ2 DUP2 STH2 .rect/y1 STZ2 .rect/x1 STZ2 ( load ) .color STZ STH2k .rect/y2 STZ2 .rect/x2 STZ2 STH2k .rect/y1 STZ2 .rect/x1 STZ2
STH2r INC2 STH2r STH2r INC2 STH2r
&ver &ver
( save ) OVR2 .Screen/y DEO2 ( save ) OVR2 .Screen/y DEO2

View File

@ -10,7 +10,7 @@
%TOS { #00 SWP } %TOS { #00 SWP }
%MOD { DUP2 / * - } %MOD { DUP2 / * - }
%GTS2 { #8000 ++ SWP2 #8000 ++ << } %GTS2 { #8000 ++ SWP2 #8000 ++ << }
%2/ { #01 SFT } %2/ { #01 SFT }
%2// { #01 SFT2 } %2// { #01 SFT2 }
%4// { #02 SFT2 } %4// { #02 SFT2 }
%8// { #03 SFT2 } %8// { #03 SFT2 }