Optimised MUL2 by powers of 2 to SFT2
This commit is contained in:
parent
00df90c47e
commit
7f158c9d66
|
@ -7,6 +7,7 @@
|
||||||
%MOD { DUP2 DIV MUL SUB }
|
%MOD { DUP2 DIV MUL SUB }
|
||||||
%TOS { #00 SWP }
|
%TOS { #00 SWP }
|
||||||
%2// { #01 SFT2 }
|
%2// { #01 SFT2 }
|
||||||
|
%8** { #30 SFT2 }
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|
@ -105,11 +106,11 @@ RTN
|
||||||
( save pos ) .anchor/y STZ2 .anchor/x STZ2
|
( save pos ) .anchor/y STZ2 .anchor/x STZ2
|
||||||
#00 #0f
|
#00 #0f
|
||||||
&loop
|
&loop
|
||||||
( save-x ) OVR #03 MOD TOS #0008 MUL2 .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 #0008 MUL2 .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 #02 MUL TOS ;digits ADD2 LDA2
|
( get digit* ) OVR STHkr #02 MUL TOS ;digits ADD2 LDA2
|
||||||
( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2
|
( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2
|
||||||
( set tile ) #0008 MUL2 ;tiles ADD2
|
( set tile ) 8** ;tiles ADD2
|
||||||
( set style ) .style LDZ #10 MUL TOS ADD2
|
( set style ) .style LDZ #10 MUL TOS ADD2
|
||||||
.Screen/addr DEO2
|
.Screen/addr DEO2
|
||||||
( draw ) #21 .Screen/color DEO
|
( draw ) #21 .Screen/color DEO
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
|
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
|
||||||
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
|
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
|
||||||
|
|
||||||
|
%2** { #10 SFT2 } %2// { #01 SFT2 }
|
||||||
|
%4** { #20 SFT2 } %4// { #02 SFT2 }
|
||||||
|
%8** { #30 SFT2 } %8// { #03 SFT2 }
|
||||||
|
|
||||||
%TOB { SWP POP } %TOS { #00 SWP }
|
%TOB { SWP POP } %TOS { #00 SWP }
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%MOD { DUP2 / * - }
|
%MOD { DUP2 / * - }
|
||||||
|
@ -85,14 +89,14 @@
|
||||||
#01 .piano/octave STZ
|
#01 .piano/octave STZ
|
||||||
|
|
||||||
( find center )
|
( find center )
|
||||||
.Screen/width DEI2 #0002 // .center/x STZ2
|
.Screen/width DEI2 2// .center/x STZ2
|
||||||
.Screen/height DEI2 #0002 // .center/y STZ2
|
.Screen/height DEI2 2// .center/y STZ2
|
||||||
|
|
||||||
( place frame )
|
( place frame )
|
||||||
.center/x LDZ2 PAD-WIDTH #0003 ** -- #0010 -- .frame/x1 STZ2
|
.center/x LDZ2 PAD-WIDTH #0003 ** -- #0010 -- .frame/x1 STZ2
|
||||||
.center/y LDZ2 #0050 -- .frame/y1 STZ2
|
.center/y LDZ2 #0050 -- .frame/y1 STZ2
|
||||||
.center/x LDZ2 PAD-WIDTH #0003 ** ++ #0010 ++ .frame/x2 STZ2
|
.center/x LDZ2 PAD-WIDTH #0003 ** ++ #0010 ++ .frame/x2 STZ2
|
||||||
.frame/y1 LDZ2 PAD-HEIGHT #0004 ** ++ #0028 ++ .frame/y2 STZ2
|
.frame/y1 LDZ2 PAD-HEIGHT 4** ++ #0028 ++ .frame/y2 STZ2
|
||||||
|
|
||||||
( place pad-view )
|
( place pad-view )
|
||||||
.frame/x1 LDZ2 .pad-view/x1 STZ2
|
.frame/x1 LDZ2 .pad-view/x1 STZ2
|
||||||
|
@ -136,7 +140,7 @@
|
||||||
( load sample )
|
( load sample )
|
||||||
OVR TOS #0019 ** ;pad-path ++ .File/name DEO2
|
OVR TOS #0019 ** ;pad-path ++ .File/name DEO2
|
||||||
OVR #04 / #10 * .Audio0/length + DEI2 .File/length DEO2
|
OVR #04 / #10 * .Audio0/length + DEI2 .File/length DEO2
|
||||||
OVR TOS #0002 ** ;pad-addr ++ LDA2 .File/load DEO2
|
OVR TOS 2** ;pad-addr ++ LDA2 .File/load DEO2
|
||||||
( draw pad )
|
( draw pad )
|
||||||
OVR #01 ;draw-pad JSR2
|
OVR #01 ;draw-pad JSR2
|
||||||
( draw mixer )
|
( draw mixer )
|
||||||
|
@ -287,8 +291,8 @@ BRK
|
||||||
|
|
||||||
@on-touch-oct ( -> )
|
@on-touch-oct ( -> )
|
||||||
|
|
||||||
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- #0008 // TOB #08 ! ,&no-mod JCN
|
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- 8// TOB #08 ! ,&no-mod JCN
|
||||||
.Mouse/y DEI2 .oct-view/y1 LDZ2 -- #0008 // TOB
|
.Mouse/y DEI2 .oct-view/y1 LDZ2 -- 8// TOB
|
||||||
DUP #00 ! ,&no-incr JCN
|
DUP #00 ! ,&no-incr JCN
|
||||||
.piano/octave LDZ #01 + .piano/octave STZ &no-incr
|
.piano/octave LDZ #01 + .piano/octave STZ &no-incr
|
||||||
DUP #02 ! ,&no-decr JCN
|
DUP #02 ! ,&no-decr JCN
|
||||||
|
@ -299,8 +303,8 @@ BRK
|
||||||
BRK
|
BRK
|
||||||
&no-mod
|
&no-mod
|
||||||
|
|
||||||
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- #0008 // TOB #06 GTH ,&no-key JCN
|
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- 8// TOB #06 GTH ,&no-key JCN
|
||||||
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- #0008 //
|
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- 8//
|
||||||
( set pitch of pad )
|
( set pitch of pad )
|
||||||
DUP2 ;notes ++ LDA .pads/last LDZ SWP .piano/octave LDZ #02 - #0c * +
|
DUP2 ;notes ++ LDA .pads/last LDZ SWP .piano/octave LDZ #02 - #0c * +
|
||||||
( save ) SWP TOS ;pad-pitch ++ STA
|
( save ) SWP TOS ;pad-pitch ++ STA
|
||||||
|
@ -321,7 +325,7 @@ BRK
|
||||||
( highlight )
|
( highlight )
|
||||||
DUP #02 ;draw-pad JSR2
|
DUP #02 ;draw-pad JSR2
|
||||||
( addr )
|
( addr )
|
||||||
DUP TOS #0002 ** ;pad-addr ++ LDA2 STH2
|
DUP TOS 2** ;pad-addr ++ LDA2 STH2
|
||||||
DUP #04 / #10 * .Audio0/addr + STH2r ROT DEO2
|
DUP #04 / #10 * .Audio0/addr + STH2r ROT DEO2
|
||||||
( pitch )
|
( pitch )
|
||||||
DUP TOS ;pad-pitch ++ LDA STH
|
DUP TOS ;pad-pitch ++ LDA STH
|
||||||
|
@ -355,7 +359,7 @@ RTN
|
||||||
&no-dot
|
&no-dot
|
||||||
OVR TOS #0010 ** [ DUP2r STH2r ] ++ LDA
|
OVR TOS #0010 ** [ DUP2r STH2r ] ++ LDA
|
||||||
#02 /
|
#02 /
|
||||||
TOS #0004 // .wav-view/y1 LDZ2 ++ .Screen/y DEO2
|
TOS 4// .wav-view/y1 LDZ2 ++ .Screen/y DEO2
|
||||||
.Screen/x DEI2 #0001 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0001 ++ .Screen/x DEO2
|
||||||
( draw ) #02 .Screen/color DEO
|
( draw ) #02 .Screen/color DEO
|
||||||
( incr ) SWP #01 + SWP
|
( incr ) SWP #01 + SWP
|
||||||
|
@ -417,14 +421,14 @@ RTN
|
||||||
OVR2 #0003 ++ .Screen/x DEO2
|
OVR2 #0003 ++ .Screen/x DEO2
|
||||||
DUP2 #0014 ++ .Screen/y DEO2
|
DUP2 #0014 ++ .Screen/y DEO2
|
||||||
( get pitch ) STHkr TOS ;pad-pitch ++ LDA
|
( get pitch ) STHkr TOS ;pad-pitch ++ LDA
|
||||||
#0c / TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
#0c / TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
#21 .Screen/color DEO
|
#21 .Screen/color DEO
|
||||||
|
|
||||||
( draw octave )
|
( draw octave )
|
||||||
OVR2 #000b ++ .Screen/x DEO2
|
OVR2 #000b ++ .Screen/x DEO2
|
||||||
DUP2 #0014 ++ .Screen/y DEO2
|
DUP2 #0014 ++ .Screen/y DEO2
|
||||||
( get pitch ) STHkr TOS ;pad-pitch ++ LDA
|
( get pitch ) STHkr TOS ;pad-pitch ++ LDA
|
||||||
#0c MOD TOS #0008 ** ;font-notes ++ .Screen/addr DEO2
|
#0c MOD TOS 8** ;font-notes ++ .Screen/addr DEO2
|
||||||
#21 .Screen/color DEO
|
#21 .Screen/color DEO
|
||||||
|
|
||||||
POP2 POP2
|
POP2 POP2
|
||||||
|
@ -455,7 +459,7 @@ RTN
|
||||||
.oct-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
|
.oct-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
|
||||||
#21 .Screen/color DEO
|
#21 .Screen/color DEO
|
||||||
|
|
||||||
;font-hex .piano/octave LDZ #03 + #00 SWP #0008 ** ++ .Screen/addr DEO2
|
;font-hex .piano/octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2
|
||||||
.oct-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
|
.oct-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
|
||||||
#23 .Screen/color DEO
|
#23 .Screen/color DEO
|
||||||
|
|
||||||
|
@ -589,7 +593,7 @@ RTN
|
||||||
( load ) STH STH2 .Screen/y DEO2 .Screen/x DEO2
|
( load ) STH STH2 .Screen/y DEO2 .Screen/x DEO2
|
||||||
STH2r
|
STH2r
|
||||||
&loop
|
&loop
|
||||||
DUP2 LDA #00 SWP #0030 -- #0008 ** ;font-num-uc ++ .Screen/addr DEO2
|
DUP2 LDA #00 SWP #0030 -- 8** ;font-num-uc ++ .Screen/addr DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
( incr ) #0001 ++
|
( incr ) #0001 ++
|
||||||
( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
%MOD8 { #07 AND } %MOD2 { #01 AND }
|
%MOD8 { #07 AND } %MOD2 { #01 AND }
|
||||||
%SFL { #40 SFT SFT }
|
%SFL { #40 SFT SFT }
|
||||||
%2// { #01 SFT2 } %8// { #03 SFT2 }
|
%2// { #01 SFT2 } %8// { #03 SFT2 }
|
||||||
|
%2** { #10 SFT2 } %8** { #30 SFT2 }
|
||||||
|
|
||||||
%WIDTH { #40 } %HEIGHT { #40 }
|
%WIDTH { #40 } %HEIGHT { #40 }
|
||||||
%BANK1 { #8000 } %BANK2 { #a000 }
|
%BANK1 { #8000 } %BANK2 { #a000 }
|
||||||
|
@ -151,10 +152,10 @@ BRK
|
||||||
|
|
||||||
#00 HEIGHT
|
#00 HEIGHT
|
||||||
&ver
|
&ver
|
||||||
OVR TOS #0002 ** .anchor/y LDZ2 ++ .Screen/y DEO2
|
OVR TOS 2** .anchor/y LDZ2 ++ .Screen/y DEO2
|
||||||
#00 WIDTH
|
#00 WIDTH
|
||||||
&hor
|
&hor
|
||||||
OVR TOS #0002 ** .anchor/x LDZ2 ++ .Screen/x DEO2
|
OVR TOS 2** .anchor/x LDZ2 ++ .Screen/x DEO2
|
||||||
GET-ITERATORS ,get-cell JSR #01 + .Screen/color DEO
|
GET-ITERATORS ,get-cell JSR #01 + .Screen/color DEO
|
||||||
INCR
|
INCR
|
||||||
NEQk ,&hor JCN
|
NEQk ,&hor JCN
|
||||||
|
@ -256,15 +257,15 @@ RTN
|
||||||
@draw-short ( short* color -- )
|
@draw-short ( short* color -- )
|
||||||
|
|
||||||
STH SWP
|
STH SWP
|
||||||
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHr .Screen/color DEO
|
( draw ) STHr .Screen/color DEO
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%8++ { #0008 ADD2 } %8-- { #0008 SUB2 }
|
%8++ { #0008 ADD2 } %8-- { #0008 SUB2 }
|
||||||
%8** { #0008 MUL2 } %8// { #03 SFT2 }
|
%8** { #30 SFT2 } %8// { #03 SFT2 }
|
||||||
%++ { #0001 ADD2 } %2// { #01 SFT2 }
|
%++ { #0001 ADD2 } %2// { #01 SFT2 }
|
||||||
%MOD8 { #07 AND }
|
%MOD8 { #07 AND }
|
||||||
%TRACK { ;track/ch1 #00 .track/active LDZ #0020 MUL2 ADD2 }
|
%TRACK { ;track/ch1 #00 .track/active LDZ #50 SFT2 ADD2 }
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
%2// { #01 SFT2 }
|
%2// { #01 SFT2 }
|
||||||
%4// { #02 SFT2 }
|
%4// { #02 SFT2 }
|
||||||
%8// { #03 SFT2 }
|
%8// { #03 SFT2 }
|
||||||
|
%8** { #30 SFT2 }
|
||||||
|
|
||||||
%WAVEFORM { #1000 }
|
%WAVEFORM { #1000 }
|
||||||
|
|
||||||
|
@ -295,7 +296,7 @@ RTN
|
||||||
.octave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
|
.octave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
|
||||||
#21 .Screen/color DEO
|
#21 .Screen/color DEO
|
||||||
|
|
||||||
;font-hex .octave LDZ #03 + #00 SWP #0008 ** ++ .Screen/addr DEO2
|
;font-hex .octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2
|
||||||
.octave-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
|
.octave-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
|
||||||
#23 .Screen/color DEO
|
#23 .Screen/color DEO
|
||||||
|
|
||||||
|
@ -425,15 +426,15 @@ RTN
|
||||||
@draw-short ( short* color -- )
|
@draw-short ( short* color -- )
|
||||||
|
|
||||||
STH SWP
|
STH SWP
|
||||||
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
|
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
|
||||||
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
|
||||||
( draw ) STHr .Screen/color DEO
|
( draw ) STHr .Screen/color DEO
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
%++ { #0001 ADD2 }
|
%++ { #0001 ADD2 }
|
||||||
%2// { #01 SFT2 }
|
%2// { #01 SFT2 }
|
||||||
%4// { #02 SFT2 }
|
%4// { #02 SFT2 }
|
||||||
|
%4** { #20 SFT2 }
|
||||||
|
%8** { #30 SFT2 }
|
||||||
%8+ { #0008 ADD2 }
|
%8+ { #0008 ADD2 }
|
||||||
%STEP8 { #33 SFT2 }
|
%STEP8 { #33 SFT2 }
|
||||||
|
|
||||||
|
@ -213,28 +215,28 @@ RTN
|
||||||
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
|
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
|
||||||
.System/b DEI2 #28 ;draw-short JSR2
|
.System/b DEI2 #28 ;draw-short JSR2
|
||||||
|
|
||||||
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0010 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/r1 .selection LDZ ADD LDA #0004 MUL2 #01 ;draw-slider JSR2
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0010 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/r1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
||||||
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0020 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/g1 .selection LDZ ADD LDA #0004 MUL2 #01 ;draw-slider JSR2
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0020 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/g1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
||||||
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0030 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/b1 .selection LDZ ADD LDA #0004 MUL2 #01 ;draw-slider JSR2
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0030 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/b1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
||||||
|
|
||||||
.window/x1 LDZ2 #0050 ADD2 .Screen/x DEO2
|
.window/x1 LDZ2 #0050 ADD2 .Screen/x DEO2
|
||||||
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
||||||
;radio_icns #00 .selection LDZ #00 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
|
;radio_icns #00 .selection LDZ #00 EQU 8** ADD2 .Screen/addr DEO2
|
||||||
#25 .Screen/color DEO
|
#25 .Screen/color DEO
|
||||||
|
|
||||||
.window/x1 LDZ2 #0060 ADD2 .Screen/x DEO2
|
.window/x1 LDZ2 #0060 ADD2 .Screen/x DEO2
|
||||||
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
||||||
;radio_icns #00 .selection LDZ #01 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
|
;radio_icns #00 .selection LDZ #01 EQU 8** ADD2 .Screen/addr DEO2
|
||||||
#25 .Screen/color DEO
|
#25 .Screen/color DEO
|
||||||
|
|
||||||
.window/x1 LDZ2 #0070 ADD2 .Screen/x DEO2
|
.window/x1 LDZ2 #0070 ADD2 .Screen/x DEO2
|
||||||
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
||||||
;radio_icns #00 .selection LDZ #02 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
|
;radio_icns #00 .selection LDZ #02 EQU 8** ADD2 .Screen/addr DEO2
|
||||||
#25 .Screen/color DEO
|
#25 .Screen/color DEO
|
||||||
|
|
||||||
.window/x1 LDZ2 #0080 ADD2 .Screen/x DEO2
|
.window/x1 LDZ2 #0080 ADD2 .Screen/x DEO2
|
||||||
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
||||||
;radio_icns #00 .selection LDZ #03 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
|
;radio_icns #00 .selection LDZ #03 EQU 8** ADD2 .Screen/addr DEO2
|
||||||
#25 .Screen/color DEO
|
#25 .Screen/color DEO
|
||||||
|
|
||||||
RTN
|
RTN
|
||||||
|
@ -328,7 +330,7 @@ RTN
|
||||||
.Screen/x DEO2
|
.Screen/x DEO2
|
||||||
STH2r
|
STH2r
|
||||||
&loop
|
&loop
|
||||||
DUP2 LDA #00 SWP #0008 MUL2
|
DUP2 LDA #00 SWP 8**
|
||||||
;font ADD2 .Screen/addr DEO2
|
;font ADD2 .Screen/addr DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
( incr ) ++
|
( incr ) ++
|
||||||
|
@ -341,15 +343,15 @@ RTN
|
||||||
@draw-short ( short* color -- )
|
@draw-short ( short* color -- )
|
||||||
|
|
||||||
STH SWP
|
STH SWP
|
||||||
DUP #04 SFT #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2
|
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2
|
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
DUP #04 SFT #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2
|
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
||||||
( draw ) STHkr .Screen/color DEO
|
( draw ) STHkr .Screen/color DEO
|
||||||
#0f AND #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2
|
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
||||||
( draw ) STHr .Screen/color DEO
|
( draw ) STHr .Screen/color DEO
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
( dev/audio )
|
( dev/audio )
|
||||||
|
|
||||||
@timer $1
|
%4** { #20 SFT2 }
|
||||||
@progress $1
|
%8** { #30 SFT2 }
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|
@ -9,6 +9,13 @@
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|
|
||||||
|
( variables )
|
||||||
|
|
||||||
|
|0000
|
||||||
|
|
||||||
|
@timer $1
|
||||||
|
@progress $1
|
||||||
|
|
||||||
|0100 ( -> )
|
|0100 ( -> )
|
||||||
|
|
||||||
( theme )
|
( theme )
|
||||||
|
@ -42,8 +49,8 @@ BRK
|
||||||
#20 .Screen/color DEO
|
#20 .Screen/color DEO
|
||||||
|
|
||||||
( draw note )
|
( draw note )
|
||||||
#00 SWP #0004 MUL2 #0100 SUB2 .Screen/y DEO2
|
#00 SWP 4** #0100 SUB2 .Screen/y DEO2
|
||||||
#00 .progress LDZ #0008 MUL2 .Screen/x DEO2
|
#00 .progress LDZ 8** .Screen/x DEO2
|
||||||
;dot .Screen/addr DEO2
|
;dot .Screen/addr DEO2
|
||||||
#21 .Screen/color DEO
|
#21 .Screen/color DEO
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
%2// { #01 SFT2 }
|
%2// { #01 SFT2 }
|
||||||
%4// { #02 SFT2 }
|
%4// { #02 SFT2 }
|
||||||
|
%2** { #10 SFT2 }
|
||||||
|
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%MOD { DUP2 DIV MUL SUB }
|
%MOD { DUP2 DIV MUL SUB }
|
||||||
|
@ -54,13 +55,13 @@ BRK
|
||||||
#0080 SCALEX #0080 SCALEY .needles/hx LDZ2 .needles/hy LDZ2 #00 ;draw-line JSR2
|
#0080 SCALEX #0080 SCALEY .needles/hx LDZ2 .needles/hy LDZ2 #00 ;draw-line JSR2
|
||||||
|
|
||||||
( place )
|
( place )
|
||||||
#00 .DateTime/second DEI #0002 MUL2 ;table ADD2 LDA2
|
#00 .DateTime/second DEI 2** ;table ADD2 LDA2
|
||||||
#00 SWP SCALEY .needles/sy STZ2
|
#00 SWP SCALEY .needles/sy STZ2
|
||||||
#00 SWP SCALEX .needles/sx STZ2
|
#00 SWP SCALEX .needles/sx STZ2
|
||||||
#00 .DateTime/minute DEI #0002 MUL2 ;table ADD2 LDA2
|
#00 .DateTime/minute DEI 2** ;table ADD2 LDA2
|
||||||
#00 SWP 4// #0003 MUL2 #0020 ADD2 SCALEY .needles/my STZ2
|
#00 SWP 4// #0003 MUL2 #0020 ADD2 SCALEY .needles/my STZ2
|
||||||
#00 SWP 4// #0003 MUL2 #0020 ADD2 SCALEX .needles/mx STZ2
|
#00 SWP 4// #0003 MUL2 #0020 ADD2 SCALEX .needles/mx STZ2
|
||||||
#00 .DateTime/hour DEI 12HOURS #05 MUL #0002 MUL2 ;table ADD2 LDA2
|
#00 .DateTime/hour DEI 12HOURS #05 MUL 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
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ BRK
|
||||||
( circle )
|
( circle )
|
||||||
#00 #3c
|
#00 #3c
|
||||||
&loop
|
&loop
|
||||||
( load ) OVR #00 SWP #0002 MUL2 ;table ADD2 LDA2
|
( load ) OVR #00 SWP 2** ;table ADD2 LDA2
|
||||||
#00 SWP SCALEY .Screen/y DEO2
|
#00 SWP SCALEY .Screen/y DEO2
|
||||||
#00 SWP SCALEX .Screen/x DEO2
|
#00 SWP SCALEX .Screen/x DEO2
|
||||||
OVR #0f MOD #00 EQU #01 ADD .Screen/color DEO
|
OVR #0f MOD #00 EQU #01 ADD .Screen/color DEO
|
||||||
|
@ -115,8 +116,8 @@ RTN
|
||||||
( load ) .color STZ .line/y0 STZ2 .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
( load ) .color STZ .line/y0 STZ2 .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
||||||
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
||||||
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
||||||
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sx STZ2
|
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 2** ADD2 .line/sx STZ2
|
||||||
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sy STZ2
|
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 2** ADD2 .line/sy STZ2
|
||||||
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
&loop
|
&loop
|
||||||
.line/x LDZ2 .Screen/x DEO2
|
.line/x LDZ2 .Screen/x DEO2
|
||||||
|
@ -124,7 +125,7 @@ RTN
|
||||||
.color LDZ .Screen/color DEO
|
.color LDZ .Screen/color DEO
|
||||||
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
|
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
|
||||||
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
|
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
|
||||||
.line/e1 LDZ2 #0002 MUL2 .line/e2 STZ2
|
.line/e1 LDZ2 2** .line/e2 STZ2
|
||||||
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
||||||
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
%ABS2 { DUP2 #0f SFT2 EQU #04 JCN #ffff MUL2 }
|
%ABS2 { DUP2 #0f SFT2 EQU #04 JCN #ffff MUL2 }
|
||||||
%LTS2 { #8000 ADD2 SWP2 #8000 ADD2 GTH2 }
|
%LTS2 { #8000 ADD2 SWP2 #8000 ADD2 GTH2 }
|
||||||
%GTS2 { #8000 ADD2 SWP2 #8000 ADD2 LTH2 }
|
%GTS2 { #8000 ADD2 SWP2 #8000 ADD2 LTH2 }
|
||||||
|
%2** { #10 SFT2 }
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|
@ -94,8 +95,8 @@ RTN
|
||||||
( load ) .color STZ .line/y0 STZ2 .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
( load ) .color STZ .line/y0 STZ2 .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
||||||
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
||||||
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
||||||
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sx STZ2
|
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 2** ADD2 .line/sx STZ2
|
||||||
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sy STZ2
|
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 2** ADD2 .line/sy STZ2
|
||||||
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
&loop
|
&loop
|
||||||
.line/x LDZ2 .Screen/x DEO2
|
.line/x LDZ2 .Screen/x DEO2
|
||||||
|
@ -103,7 +104,7 @@ RTN
|
||||||
.color LDZ .Screen/color DEO
|
.color LDZ .Screen/color DEO
|
||||||
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
|
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
|
||||||
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
|
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
|
||||||
.line/e1 LDZ2 #0002 MUL2 .line/e2 STZ2
|
.line/e1 LDZ2 2** .line/e2 STZ2
|
||||||
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
||||||
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%2// { #01 SFT2 }
|
%2// { #01 SFT2 }
|
||||||
|
%8** { #30 SFT2 }
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ RTN
|
||||||
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2
|
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2
|
||||||
.label/addr LDZ2
|
.label/addr LDZ2
|
||||||
&loop
|
&loop
|
||||||
( draw ) DUP2 LDA #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
||||||
( incr ) #0001 ADD2
|
( incr ) #0001 ADD2
|
||||||
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
||||||
DUP2 LDA ,&loop JCN
|
DUP2 LDA ,&loop JCN
|
||||||
|
@ -62,10 +63,10 @@ RTN
|
||||||
@draw-label-middle ( x y color addr -- )
|
@draw-label-middle ( x y color addr -- )
|
||||||
|
|
||||||
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2
|
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2
|
||||||
( align ) .label/addr LDZ2 ;get-text-length JSR2 #0008 MUL2 2// SUB2 .Screen/x DEO2
|
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** 2// SUB2 .Screen/x DEO2
|
||||||
.label/addr LDZ2
|
.label/addr LDZ2
|
||||||
&loop
|
&loop
|
||||||
( draw ) DUP2 LDA #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
||||||
( incr ) #0001 ADD2
|
( incr ) #0001 ADD2
|
||||||
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
||||||
DUP2 LDA ,&loop JCN
|
DUP2 LDA ,&loop JCN
|
||||||
|
@ -76,10 +77,10 @@ RTN
|
||||||
@draw-label-right ( x y color addr -- )
|
@draw-label-right ( x y color addr -- )
|
||||||
|
|
||||||
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2
|
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2
|
||||||
( align ) .label/addr LDZ2 ;get-text-length JSR2 #0008 MUL2 SUB2 .Screen/x DEO2
|
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** SUB2 .Screen/x DEO2
|
||||||
.label/addr LDZ2
|
.label/addr LDZ2
|
||||||
&loop
|
&loop
|
||||||
( draw ) DUP2 LDA #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
|
||||||
( incr ) #0001 ADD2
|
( incr ) #0001 ADD2
|
||||||
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
||||||
DUP2 LDA ,&loop JCN
|
DUP2 LDA ,&loop JCN
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%++ { #0001 ADD2 }
|
%++ { #0001 ADD2 }
|
||||||
%-- { #0001 SUB2 }
|
%-- { #0001 SUB2 }
|
||||||
%8+ { #0008 ADD2 }
|
%8++ { #0008 ADD2 }
|
||||||
|
%2** { #10 SFT2 }
|
||||||
|
%4** { #20 SFT2 }
|
||||||
%ABS2 { DUP2 #0f SFT2 EQU #04 JCN #ffff MUL2 }
|
%ABS2 { DUP2 #0f SFT2 EQU #04 JCN #ffff MUL2 }
|
||||||
%LTS2 { #8000 ADD2 SWP2 #8000 ADD2 GTH2 }
|
%LTS2 { #8000 ADD2 SWP2 #8000 ADD2 GTH2 }
|
||||||
%GTS2 { #8000 ADD2 SWP2 #8000 ADD2 LTH2 }
|
%GTS2 { #8000 ADD2 SWP2 #8000 ADD2 LTH2 }
|
||||||
|
@ -49,13 +51,13 @@ BRK
|
||||||
( load ) .color STZ -- .line/y0 STZ2 -- .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
( load ) .color STZ -- .line/y0 STZ2 -- .line/x0 STZ2 .line/y STZ2 .line/x STZ2
|
||||||
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
.line/x0 LDZ2 .line/x LDZ2 SUB2 ABS2 .line/dx STZ2
|
||||||
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
.line/y0 LDZ2 .line/y LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
|
||||||
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sx STZ2
|
#ffff #00 .line/x LDZ2 .line/x0 LDZ2 LTS2 2** ADD2 .line/sx STZ2
|
||||||
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sy STZ2
|
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 2** ADD2 .line/sy STZ2
|
||||||
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
&loop
|
&loop
|
||||||
.line/x LDZ2 .Screen/x DEO2 .line/y LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO
|
.line/x LDZ2 .Screen/x DEO2 .line/y LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO
|
||||||
.line/x LDZ2 .line/x0 LDZ2 EQU2 .line/y LDZ2 .line/y0 LDZ2 EQU2 #0101 EQU2 ,&end JCN
|
.line/x LDZ2 .line/x0 LDZ2 EQU2 .line/y LDZ2 .line/y0 LDZ2 EQU2 #0101 EQU2 ,&end JCN
|
||||||
.line/e1 LDZ2 #0002 MUL2 .line/e2 STZ2
|
.line/e1 LDZ2 2** .line/e2 STZ2
|
||||||
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
|
||||||
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
|
||||||
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
.line/x LDZ2 .line/sx LDZ2 ADD2 .line/x STZ2
|
||||||
|
@ -115,16 +117,16 @@ RTN
|
||||||
|
|
||||||
( load ) .color STZ .circle/r STZ2 .circle/yc STZ2 .circle/xc STZ2
|
( load ) .color STZ .circle/r STZ2 .circle/yc STZ2 .circle/xc STZ2
|
||||||
#0000 .circle/x STZ2 .circle/r LDZ2 .circle/y STZ2
|
#0000 .circle/x STZ2 .circle/r LDZ2 .circle/y STZ2
|
||||||
.circle/r LDZ2 #0002 MUL2 .circle/d STZ2
|
.circle/r LDZ2 2** .circle/d STZ2
|
||||||
( draw ) ;&seg JSR2
|
( draw ) ;&seg JSR2
|
||||||
&loop
|
&loop
|
||||||
( incr ) .circle/x LDZ2 ++ .circle/x STZ2
|
( incr ) .circle/x LDZ2 ++ .circle/x STZ2
|
||||||
.circle/d LDZ2 #0001 LTS2 ,&else JCN
|
.circle/d LDZ2 #0001 LTS2 ,&else JCN
|
||||||
( decr ) .circle/y LDZ2 -- .circle/y STZ2
|
( decr ) .circle/y LDZ2 -- .circle/y STZ2
|
||||||
.circle/x LDZ2 .circle/y LDZ2 SUB2 #0004 MUL2 .circle/d LDZ2 ADD2 .circle/d STZ2
|
.circle/x LDZ2 .circle/y LDZ2 SUB2 4** .circle/d LDZ2 ADD2 .circle/d STZ2
|
||||||
;&end JMP2
|
;&end JMP2
|
||||||
&else
|
&else
|
||||||
.circle/x LDZ2 #0004 MUL2 .circle/d LDZ2 ADD2 .circle/d STZ2
|
.circle/x LDZ2 4** .circle/d LDZ2 ADD2 .circle/d STZ2
|
||||||
&end
|
&end
|
||||||
( draw ) ;&seg JSR2
|
( draw ) ;&seg JSR2
|
||||||
.circle/y LDZ2 .circle/x LDZ2 -- GTS2 ,&loop JCN
|
.circle/y LDZ2 .circle/x LDZ2 -- GTS2 ,&loop JCN
|
||||||
|
@ -151,10 +153,10 @@ RTN
|
||||||
&hor
|
&hor
|
||||||
( save ) OVR2 .Screen/x DEO2
|
( save ) OVR2 .Screen/x DEO2
|
||||||
( draw ) .color LDZ .Screen/color DEO
|
( draw ) .color LDZ .Screen/color DEO
|
||||||
( incr ) SWP2 8+ SWP2
|
( incr ) SWP2 8++ SWP2
|
||||||
OVR2 OVR2 LTH2 ,&hor JCN
|
OVR2 OVR2 LTH2 ,&hor JCN
|
||||||
POP2 POP2
|
POP2 POP2
|
||||||
( incr ) SWP2 8+ SWP2
|
( incr ) SWP2 8++ SWP2
|
||||||
OVR2 OVR2 LTH2 ,&ver JCN
|
OVR2 OVR2 LTH2 ,&ver JCN
|
||||||
POP2 POP2
|
POP2 POP2
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@
|
||||||
¬-end
|
¬-end
|
||||||
,asma-parse-hex-digit JSR
|
,asma-parse-hex-digit JSR
|
||||||
DUP #f0 AND ,&fail JCN
|
DUP #f0 AND ,&fail JCN
|
||||||
LIT2r 0010 MUL2r
|
LITr 40 SFT2r
|
||||||
#00 STH STH ADD2r
|
#00 STH STH ADD2r
|
||||||
#0001 ADD2
|
#0001 ADD2
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
%h { .DateTime/hour DEI }
|
%h { .DateTime/hour DEI }
|
||||||
%m { .DateTime/minute DEI }
|
%m { .DateTime/minute DEI }
|
||||||
%s { .DateTime/second DEI }
|
%s { .DateTime/second DEI }
|
||||||
|
%8** { #30 SFT2 }
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@
|
||||||
#0120 #00 h MUL2
|
#0120 #00 h MUL2
|
||||||
#00c0 #00 m MUL2 ADD2
|
#00c0 #00 m MUL2 ADD2
|
||||||
#00f8 #00 s MUL2 ADD2
|
#00f8 #00 s MUL2 ADD2
|
||||||
#0271 #00 .fps/next LDZ MUL2 #00 .fps/current LDZ DIV2 #0008 MUL2 ADD2
|
#0271 #00 .fps/next LDZ MUL2 #00 .fps/current LDZ DIV2 8** ADD2
|
||||||
#01b0 ;modf JSR2 SWP2 #0017 MUL2 #03e8 DIV2 .neralie/n6 STZ POP
|
#01b0 ;modf JSR2 SWP2 #0017 MUL2 #03e8 DIV2 .neralie/n6 STZ POP
|
||||||
|
|
||||||
( add up units and tens of pulses, store in n5 and n4 )
|
( add up units and tens of pulses, store in n5 and n4 )
|
||||||
|
@ -109,11 +110,11 @@
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@letter ( index* -- )
|
@letter ( index* -- )
|
||||||
#0008 MUL2 ;font-letters ADD2 .Screen/addr DEO2
|
8** ;font-letters ADD2 .Screen/addr DEO2
|
||||||
,digit/middle JMP
|
,digit/middle JMP
|
||||||
|
|
||||||
@digit ( index* -- )
|
@digit ( index* -- )
|
||||||
#0008 MUL2 ;font-numbers ADD2 .Screen/addr DEO2
|
8** ;font-numbers ADD2 .Screen/addr DEO2
|
||||||
&middle
|
&middle
|
||||||
.neralie/color LDZ #20 ADD .Screen/color DEO
|
.neralie/color LDZ #20 ADD .Screen/color DEO
|
||||||
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
%RTN { JMP2r }
|
%RTN { JMP2r }
|
||||||
%++ { #01 ADD } %-- { #01 SUB }
|
%++ { #01 ADD } %-- { #01 SUB }
|
||||||
%8+ { #0008 ADD2 }
|
%8++ { #0008 ADD2 }
|
||||||
%8* { #0008 MUL2 } %8/ { #03 SFT2 }
|
%8** { #30 SFT2 } %8// { #03 SFT2 }
|
||||||
%MOD { DUP2 DIV MUL SUB }
|
%MOD { DUP2 DIV MUL SUB }
|
||||||
%MOD8 { #07 AND }
|
%MOD8 { #07 AND }
|
||||||
%MOD2 { #01 AND }
|
%MOD2 { #01 AND }
|
||||||
|
@ -61,8 +61,8 @@
|
||||||
( vectors ) ;on-frame .Screen/vector DEO2
|
( vectors ) ;on-frame .Screen/vector DEO2
|
||||||
|
|
||||||
( find size )
|
( find size )
|
||||||
.Screen/width DEI2 8/ SWP POP .grid/width STZ
|
.Screen/width DEI2 8// SWP POP .grid/width STZ
|
||||||
.Screen/height DEI2 8/ SWP POP #02 SUB .grid/height STZ
|
.Screen/height DEI2 8// SWP POP #02 SUB .grid/height STZ
|
||||||
|
|
||||||
( fill grid with dots )
|
( fill grid with dots )
|
||||||
|
|
||||||
|
@ -123,8 +123,8 @@ BRK
|
||||||
@on-mouse
|
@on-mouse
|
||||||
|
|
||||||
.Mouse/state DEI #00 EQU ,&no-touch JCN
|
.Mouse/state DEI #00 EQU ,&no-touch JCN
|
||||||
.Mouse/x DEI2 8/ SWP POP .selection/x1 STZ
|
.Mouse/x DEI2 8// SWP POP .selection/x1 STZ
|
||||||
.Mouse/y DEI2 8/ SWP POP .selection/y1 STZ
|
.Mouse/y DEI2 8// SWP POP .selection/y1 STZ
|
||||||
;redraw JSR2
|
;redraw JSR2
|
||||||
&no-touch
|
&no-touch
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ RTN
|
||||||
POP2 ;font RTN
|
POP2 ;font RTN
|
||||||
&no-bar
|
&no-bar
|
||||||
STH POP2 STHr
|
STH POP2 STHr
|
||||||
#20 SUB #00 SWP #0008 MUL2 ;font ADD2
|
#20 SUB #00 SWP 8** ;font ADD2
|
||||||
|
|
||||||
RTN
|
RTN
|
||||||
|
|
||||||
|
@ -489,19 +489,19 @@ RTN
|
||||||
( Positionx )
|
( Positionx )
|
||||||
#0000 .Screen/x DEO2
|
#0000 .Screen/x DEO2
|
||||||
.selection/x1 LDZ
|
.selection/x1 LDZ
|
||||||
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
#0008 .Screen/x DEO2
|
#0008 .Screen/x DEO2
|
||||||
#0f AND LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
#0f AND LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
|
|
||||||
( Positiony )
|
( Positiony )
|
||||||
#0010 .Screen/x DEO2
|
#0010 .Screen/x DEO2
|
||||||
.selection/y1 LDZ
|
.selection/y1 LDZ
|
||||||
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
#0018 .Screen/x DEO2
|
#0018 .Screen/x DEO2
|
||||||
#0f AND LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
#0f AND LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
|
|
||||||
#0020 .Screen/x DEO2
|
#0020 .Screen/x DEO2
|
||||||
|
@ -511,10 +511,10 @@ RTN
|
||||||
( Frame )
|
( Frame )
|
||||||
#0030 .Screen/x DEO2
|
#0030 .Screen/x DEO2
|
||||||
.timer/frame LDZ
|
.timer/frame LDZ
|
||||||
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
#0038 .Screen/x DEO2
|
#0038 .Screen/x DEO2
|
||||||
#0f AND LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
#0f AND LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
|
|
||||||
#0040 .Screen/x DEO2
|
#0040 .Screen/x DEO2
|
||||||
|
@ -524,20 +524,20 @@ RTN
|
||||||
( Speed )
|
( Speed )
|
||||||
#0050 .Screen/x DEO2
|
#0050 .Screen/x DEO2
|
||||||
.timer/speed LDZ
|
.timer/speed LDZ
|
||||||
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
DUP #04 SFT LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
#0058 .Screen/x DEO2
|
#0058 .Screen/x DEO2
|
||||||
#0f AND LDA-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
|
#0f AND LDA-CHAR #20 SUB #00 SWP 8** ;font ADD2 .Screen/addr DEO2
|
||||||
#22 .Screen/color DEO
|
#22 .Screen/color DEO
|
||||||
|
|
||||||
( TODO: Signal VU )
|
( TODO: Signal VU )
|
||||||
|
|
||||||
( File )
|
( File )
|
||||||
.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
|
.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2 ;eye_icns .Screen/addr DEO2 #21 .Screen/color DEO
|
.Screen/x DEI2 8++ .Screen/x DEO2 ;eye_icns .Screen/addr DEO2 #21 .Screen/color DEO
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2 ;filestate_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
.Screen/x DEI2 8++ .Screen/x DEO2 ;filestate_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2 ;load_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
.Screen/x DEI2 8++ .Screen/x DEO2 ;load_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
||||||
.Screen/x DEI2 8+ .Screen/x DEO2 ;save_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
.Screen/x DEI2 8++ .Screen/x DEO2 ;save_icn .Screen/addr DEO2 #21 .Screen/color DEO
|
||||||
|
|
||||||
RTN
|
RTN
|
||||||
|
|
||||||
|
@ -545,10 +545,10 @@ RTN
|
||||||
|
|
||||||
#00 .grid/height LDZ
|
#00 .grid/height LDZ
|
||||||
&ver
|
&ver
|
||||||
( pos-y ) OVR #00 SWP #0008 MUL2 .Screen/y DEO2
|
( pos-y ) OVR #00 SWP 8** .Screen/y DEO2
|
||||||
#00 .grid/width LDZ
|
#00 .grid/width LDZ
|
||||||
&hor
|
&hor
|
||||||
( pos-x ) OVR #00 SWP #0008 MUL2 .Screen/x DEO2
|
( pos-x ) OVR #00 SWP 8** .Screen/x DEO2
|
||||||
( get x,y ) SWP2 OVR STH SWP2 OVR STHr
|
( get x,y ) SWP2 OVR STH SWP2 OVR STHr
|
||||||
( sprite ) DUP2 ;get-cell-sprite JSR2 .Screen/addr DEO2
|
( sprite ) DUP2 ;get-cell-sprite JSR2 .Screen/addr DEO2
|
||||||
( draw ) ;is-selected JSR2 #0d MUL #21 ADD .Screen/color DEO
|
( draw ) ;is-selected JSR2 #0d MUL #21 ADD .Screen/color DEO
|
||||||
|
|
Loading…
Reference in New Issue