Replaced easy multiplications and modulos
This commit is contained in:
parent
72356912e7
commit
5d4020ad31
|
@ -152,7 +152,7 @@ BRK
|
||||||
|
|
||||||
@on-message ( -> )
|
@on-message ( -> )
|
||||||
|
|
||||||
.Console/read DEI #10 MOD ;play-pad JSR2
|
.Console/read DEI #0f AND ;play-pad JSR2
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ RTN
|
||||||
|
|
||||||
STHkr
|
STHkr
|
||||||
|
|
||||||
DUP #04 / SWP #04 MOD TOS PAD-WIDTH ** ( center ) .pad-view/x1 LDZ2 ++
|
DUP #04 / SWP #03 AND TOS PAD-WIDTH ** ( center ) .pad-view/x1 LDZ2 ++
|
||||||
ROT TOS PAD-HEIGHT ** ( center ) .pad-view/y1 LDZ2 ++
|
ROT TOS PAD-HEIGHT ** ( center ) .pad-view/y1 LDZ2 ++
|
||||||
|
|
||||||
( draw outline )
|
( draw outline )
|
||||||
|
|
|
@ -136,7 +136,7 @@ RTN
|
||||||
|
|
||||||
&sprite ( char color -- )
|
&sprite ( char color -- )
|
||||||
STH
|
STH
|
||||||
( get addr ) DUP TOS #0048 ** ;font-data #0100 ++ ++ .Screen/addr DEO2
|
( get addr ) DUP TOS #30 SFT2 #30 SFT2k ROT POP ADD2 ;font-data #0100 ++ ++ .Screen/addr DEO2
|
||||||
( get width ) TOS ;font-data ++ LDA TOS
|
( get width ) TOS ;font-data ++ LDA TOS
|
||||||
#00 #03
|
#00 #03
|
||||||
&ver
|
&ver
|
||||||
|
|
|
@ -60,7 +60,7 @@ BRK
|
||||||
|
|
||||||
( get note )
|
( get note )
|
||||||
.counter LDZ #18 MOD #30 ADD
|
.counter LDZ #18 MOD #30 ADD
|
||||||
.Audio0/pitch .counter LDZ #04 MOD #40 SFT ADD DEO
|
.Audio0/pitch .counter LDZ #03 AND #40 SFT ADD DEO
|
||||||
|
|
||||||
.counter LDZ #01 ADD .counter STZ
|
.counter LDZ #01 ADD .counter STZ
|
||||||
#00 .timer STZ
|
#00 .timer STZ
|
||||||
|
|
|
@ -49,7 +49,10 @@ RTN
|
||||||
#0f AND ,&hex JMP
|
#0f AND ,&hex JMP
|
||||||
|
|
||||||
&hex
|
&hex
|
||||||
#30 ADD DUP #39 GTH #27 MUL ADD .Console/write DEO
|
#30 ADD DUP #3a LTH ,¬-alpha JCN
|
||||||
|
#27 ADD
|
||||||
|
¬-alpha
|
||||||
|
.Console/write DEO
|
||||||
RTN
|
RTN
|
||||||
|
|
||||||
@print-byte ( byte -- )
|
@print-byte ( byte -- )
|
||||||
|
|
|
@ -61,7 +61,7 @@ BRK
|
||||||
#00 .DateTime/minute DEI 2** ;table ADD2 LDA2
|
#00 .DateTime/minute DEI 2** ;table ADD2 LDA2
|
||||||
#00 SWP 4// DUP2k ADD2 ADD2 #0020 ADD2 SCALEY .needles/my STZ2
|
#00 SWP 4// DUP2k ADD2 ADD2 #0020 ADD2 SCALEY .needles/my STZ2
|
||||||
#00 SWP 4// DUP2k ADD2 ADD2 #0020 ADD2 SCALEX .needles/mx STZ2
|
#00 SWP 4// DUP2k ADD2 ADD2 #0020 ADD2 SCALEX .needles/mx STZ2
|
||||||
#00 .DateTime/hour DEI 12HOURS #05 MUL 2** ;table ADD2 LDA2
|
#00 .DateTime/hour DEI 12HOURS #20 SFTk NIP ADD 2** ;table ADD2 LDA2
|
||||||
#00 SWP 2// #0040 ADD2 SCALEY .needles/hy STZ2
|
#00 SWP 2// #0040 ADD2 SCALEY .needles/hy STZ2
|
||||||
#00 SWP 2// #0040 ADD2 SCALEX .needles/hx STZ2
|
#00 SWP 2// #0040 ADD2 SCALEX .needles/hx STZ2
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,10 @@
|
||||||
#0f AND ,&hex JMP
|
#0f AND ,&hex JMP
|
||||||
|
|
||||||
&hex
|
&hex
|
||||||
#30 ADD DUP #39 GTH #27 MUL ADD .Console/write DEO
|
#30 ADD DUP #3a LTH ,¬-alpha JCN
|
||||||
|
#27 ADD
|
||||||
|
¬-alpha
|
||||||
|
.Console/write DEO
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue