... | ... |
@@ -54,9 +54,9 @@ then |
54 | 54 |
fi |
55 | 55 |
|
56 | 56 |
echo "Assembling.." |
57 |
-./bin/uxnasm projects/examples/demos/life.tal bin/life.rom |
|
57 |
+./bin/uxnasm projects/examples/demos/piano.tal bin/piano.rom |
|
58 | 58 |
|
59 | 59 |
echo "Running.." |
60 |
-./bin/uxnemu bin/life.rom |
|
60 |
+./bin/uxnemu bin/piano.rom |
|
61 | 61 |
|
62 | 62 |
echo "Done." |
... | ... |
@@ -142,7 +142,7 @@ |
142 | 142 |
OVR #01 ;draw-pad JSR2 |
143 | 143 |
( draw mixer ) |
144 | 144 |
OVR #04 / ;draw-mixer JSR2 |
145 |
- ( incr ) SWP #01 + SWP |
|
145 |
+ ( incr ) SWP INC SWP |
|
146 | 146 |
LTHk ,&draw-pads JCN |
147 | 147 |
POP2 |
148 | 148 |
|
... | ... |
@@ -166,7 +166,7 @@ BRK |
166 | 166 |
( y ) .mix-view/y1 LDZ2 PAD-HEIGHT STHkr TOS ** ++ #0002 ++ |
167 | 167 |
( output ) .Audio0/output STHr #40 SFT + DEI |
168 | 168 |
;draw-monitor JSR2 |
169 |
- ( incr ) SWP #01 + SWP |
|
169 |
+ ( incr ) SWP INC SWP |
|
170 | 170 |
LTHk ,&loop JCN |
171 | 171 |
POP2 |
172 | 172 |
|
... | ... |
@@ -178,15 +178,15 @@ BRK |
178 | 178 |
|
179 | 179 |
.Mouse/state DEI #00 ! #01 JCN [ BRK ] |
180 | 180 |
|
181 |
- .Mouse/x DEI2 DUP2 .pad-view/x1 LDZ2 >> ROT ROT .pad-view/x2 LDZ2 #0001 ++ << #0101 == |
|
181 |
+ .Mouse/x DEI2 DUP2 .pad-view/x1 LDZ2 >> ROT ROT .pad-view/x2 LDZ2 INC2 << #0101 == |
|
182 | 182 |
.Mouse/y DEI2 DUP2 .pad-view/y1 LDZ2 >> ROT ROT .pad-view/y2 LDZ2 << #0101 == |
183 | 183 |
#0101 == ;on-touch-pad JCN2 |
184 | 184 |
|
185 |
- .Mouse/x DEI2 DUP2 .mix-view/x1 LDZ2 >> ROT ROT .mix-view/x2 LDZ2 #0001 ++ << #0101 == |
|
185 |
+ .Mouse/x DEI2 DUP2 .mix-view/x1 LDZ2 >> ROT ROT .mix-view/x2 LDZ2 INC2 << #0101 == |
|
186 | 186 |
.Mouse/y DEI2 DUP2 .mix-view/y1 LDZ2 >> ROT ROT .mix-view/y2 LDZ2 << #0101 == |
187 | 187 |
#0101 == ;on-touch-mix JCN2 |
188 | 188 |
|
189 |
- .Mouse/x DEI2 DUP2 .oct-view/x1 LDZ2 >> ROT ROT .oct-view/x2 LDZ2 #0001 ++ << #0101 == |
|
189 |
+ .Mouse/x DEI2 DUP2 .oct-view/x1 LDZ2 >> ROT ROT .oct-view/x2 LDZ2 INC2 << #0101 == |
|
190 | 190 |
.Mouse/y DEI2 DUP2 .oct-view/y1 LDZ2 >> ROT ROT .oct-view/y2 LDZ2 << #0101 == |
191 | 191 |
#0101 == ;on-touch-oct JCN2 |
192 | 192 |
|
... | ... |
@@ -244,13 +244,13 @@ BRK |
244 | 244 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
245 | 245 |
.Audio0/adsr [ STHkr #40 SFT + ] DEO &no-d |
246 | 246 |
DUP #02 ! ,&no-s JCN |
247 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEI |
|
247 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEI |
|
248 | 248 |
#10 .Mouse/state DEI #10 = #e0 * + + |
249 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEO &no-s |
|
249 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEO &no-s |
|
250 | 250 |
DUP #03 ! ,&no-r JCN |
251 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEI |
|
251 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEI |
|
252 | 252 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
253 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEO &no-r |
|
253 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEO &no-r |
|
254 | 254 |
( modes ) |
255 | 255 |
DUP #04 ! ,&no-repeat JCN |
256 | 256 |
.modes [ STHkr + ] LDZ |
... | ... |
@@ -280,7 +280,7 @@ BRK |
280 | 280 |
.Mouse/x DEI2 .oct-view/x1 LDZ2 -- 8// TOB #08 ! ,&no-mod JCN |
281 | 281 |
.Mouse/y DEI2 .oct-view/y1 LDZ2 -- 8// TOB |
282 | 282 |
DUP #00 ! ,&no-incr JCN |
283 |
- .piano/octave LDZ #01 + .piano/octave STZ &no-incr |
|
283 |
+ .piano/octave LDZ INC .piano/octave STZ &no-incr |
|
284 | 284 |
DUP #02 ! ,&no-decr JCN |
285 | 285 |
.piano/octave LDZ #01 - .piano/octave STZ &no-decr |
286 | 286 |
POP |
... | ... |
@@ -346,9 +346,9 @@ RTN |
346 | 346 |
OVR TOS 10** [ DUP2r STH2r ] ++ LDA |
347 | 347 |
#02 / |
348 | 348 |
TOS 4// .wav-view/y1 LDZ2 ++ .Screen/y DEO2 |
349 |
- .Screen/x DEI2 #0001 ++ .Screen/x DEO2 |
|
349 |
+ .Screen/x DEI2 INC2 .Screen/x DEO2 |
|
350 | 350 |
( draw ) #02 .Screen/pixel DEO |
351 |
- ( incr ) SWP #01 + SWP |
|
351 |
+ ( incr ) SWP INC SWP |
|
352 | 352 |
LTHk ,&loop JCN |
353 | 353 |
POP2 |
354 | 354 |
POP2r |
... | ... |
@@ -365,9 +365,9 @@ RTN |
365 | 365 |
DUP2 .mix-view/x1 LDZ2 #0010 ++ SWP2 |
366 | 366 |
.Audio0/adsr [ STHkr #40 SFT + ] DEI #0f AND ;draw-knob JSR2 |
367 | 367 |
DUP2 .mix-view/x1 LDZ2 #0020 ++ SWP2 |
368 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEI #04 SFT ;draw-knob JSR2 |
|
368 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEI #04 SFT ;draw-knob JSR2 |
|
369 | 369 |
DUP2 .mix-view/x1 LDZ2 #0030 ++ SWP2 |
370 |
- .Audio0/adsr [ STHkr #40 SFT + ] #01 + DEI #0f AND ;draw-knob JSR2 |
|
370 |
+ .Audio0/adsr [ STHkr #40 SFT + ] INC DEI #0f AND ;draw-knob JSR2 |
|
371 | 371 |
( once/repeat ) |
372 | 372 |
DUP2 .mix-view/x1 LDZ2 #0040 ++ SWP2 |
373 | 373 |
.modes [ STHkr + ] LDZ ;draw-switch JSR2 |
... | ... |
@@ -460,12 +460,12 @@ RTN |
460 | 460 |
|
461 | 461 |
#00 #0f |
462 | 462 |
&loop |
463 |
- OVR #10 SWP - STHkr #0f AND < #01 + .Screen/pixel DEO |
|
463 |
+ OVR #10 SWP - STHkr #0f AND < INC .Screen/pixel DEO |
|
464 | 464 |
.Screen/x DEI2 #0002 ++ .Screen/x DEO2 |
465 |
- OVR #10 SWP - STHkr #04 SFT < #01 + .Screen/pixel DEO |
|
465 |
+ OVR #10 SWP - STHkr #04 SFT < INC .Screen/pixel DEO |
|
466 | 466 |
.Screen/x DEI2 #0002 -- .Screen/x DEO2 |
467 | 467 |
.Screen/y DEI2 #0002 ++ .Screen/y DEO2 |
468 |
- ( incr ) SWP #01 + SWP |
|
468 |
+ ( incr ) SWP INC SWP |
|
469 | 469 |
LTHk ,&loop JCN |
470 | 470 |
POP2 |
471 | 471 |
|
... | ... |
@@ -552,21 +552,21 @@ RTN |
552 | 552 |
@line-rect ( x1* y1* x2* y2* color -- ) |
553 | 553 |
|
554 | 554 |
( load ) .color STZ DUP2 STH2 .rect/y2 STZ2 .rect/x2 STZ2 DUP2 STH2 .rect/y1 STZ2 .rect/x1 STZ2 |
555 |
- STH2r #0001 ++ STH2r |
|
555 |
+ STH2r INC2 STH2r |
|
556 | 556 |
&ver |
557 | 557 |
( save ) OVR2 .Screen/y DEO2 |
558 | 558 |
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/pixel DEO |
559 | 559 |
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/pixel DEO |
560 |
- ( incr ) SWP2 #0001 ++ SWP2 |
|
560 |
+ ( incr ) SWP2 INC2 SWP2 |
|
561 | 561 |
OVR2 OVR2 LTS2 ,&ver JCN |
562 | 562 |
POP2 POP2 |
563 |
- .rect/x1 LDZ2 #0001 ++ .rect/x2 LDZ2 #0001 -- |
|
563 |
+ .rect/x1 LDZ2 INC2 .rect/x2 LDZ2 #0001 -- |
|
564 | 564 |
&hor |
565 | 565 |
( save ) OVR2 .Screen/x DEO2 |
566 | 566 |
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/pixel DEO |
567 | 567 |
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/pixel DEO |
568 |
- ( incr ) SWP2 #0001 ++ SWP2 |
|
569 |
- OVR2 OVR2 #0001 ++ LTS2 ,&hor JCN |
|
568 |
+ ( incr ) SWP2 INC2 SWP2 |
|
569 |
+ OVR2 OVR2 INC2 LTS2 ,&hor JCN |
|
570 | 570 |
POP2 POP2 |
571 | 571 |
|
572 | 572 |
RTN |
... | ... |
@@ -576,11 +576,11 @@ RTN |
576 | 576 |
( load ) STH STH2 .Screen/y DEO2 .Screen/x DEO2 |
577 | 577 |
STH2r |
578 | 578 |
&loop |
579 |
- DUP2 LDA #00 SWP #0030 -- 8** ;font-num-uc ++ .Screen/addr DEO2 |
|
579 |
+ LDAk #00 SWP #0030 -- 8** ;font-num-uc ++ .Screen/addr DEO2 |
|
580 | 580 |
( draw ) STHkr .Screen/sprite DEO |
581 |
- ( incr ) #0001 ++ |
|
581 |
+ ( incr ) INC2 |
|
582 | 582 |
( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
583 |
- DUP2 LDA #00 ! ,&loop JCN |
|
583 |
+ LDAk #00 ! ,&loop JCN |
|
584 | 584 |
POP2 |
585 | 585 |
POPr |
586 | 586 |
|
... | ... |
@@ -596,10 +596,10 @@ RTN |
596 | 596 |
&hor |
597 | 597 |
( save ) OVR2 .Screen/x DEO2 |
598 | 598 |
( draw ) .color LDZ .Screen/pixel DEO |
599 |
- ( incr ) SWP2 #0001 ++ SWP2 |
|
599 |
+ ( incr ) SWP2 INC2 SWP2 |
|
600 | 600 |
OVR2 OVR2 LTS2 ,&hor JCN |
601 | 601 |
POP2 POP2 STH2r STH2r |
602 |
- ( incr ) SWP2 #0001 ++ SWP2 |
|
602 |
+ ( incr ) SWP2 INC2 SWP2 |
|
603 | 603 |
OVR2 OVR2 LTS2 ,&ver JCN |
604 | 604 |
POP2 POP2 POP2 POP2 |
605 | 605 |
|
... | ... |
@@ -452,10 +452,10 @@ RTN |
452 | 452 |
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2 |
453 | 453 |
.label/addr LDZ2 |
454 | 454 |
&loop |
455 |
- ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
455 |
+ ( draw ) LDAk #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
456 | 456 |
( incr ) ++ |
457 | 457 |
( incr ) .Screen/x DEI2 8++ .Screen/x DEO2 |
458 |
- DUP2 LDA ,&loop JCN |
|
458 |
+ LDAk ,&loop JCN |
|
459 | 459 |
POP2 |
460 | 460 |
|
461 | 461 |
RTN |
... | ... |
@@ -11,6 +11,7 @@ |
11 | 11 |
%MOD { DUP2 / * - } |
12 | 12 |
%LTS2 { #8000 ++ SWP2 #8000 ++ >> } |
13 | 13 |
%GTS2 { #8000 ++ SWP2 #8000 ++ << } |
14 |
+%2/ { #01 SFT } |
|
14 | 15 |
%2// { #01 SFT2 } |
15 | 16 |
%4// { #02 SFT2 } |
16 | 17 |
%8// { #03 SFT2 } |
... | ... |
@@ -102,7 +103,7 @@ BRK |
102 | 103 |
.adsr-view/x2 LDZ2 #003a -- #0002 ++ .Screen/x DEO2 |
103 | 104 |
#10 OVR - .Audio0/output DEI #04 SFT < .Screen/pixel DEO |
104 | 105 |
.Screen/y DEI2 #0002 ++ .Screen/y DEO2 |
105 |
- #01 + GTHk ,&loop JCN |
|
106 |
+ INC GTHk ,&loop JCN |
|
106 | 107 |
POP2 |
107 | 108 |
|
108 | 109 |
BRK |
... | ... |
@@ -140,7 +141,7 @@ BRK |
140 | 141 |
DUP #04 SFT #01 AND #01 ! ,&no-up JCN |
141 | 142 |
( move ) .Audio0/addr DEI2 #0001 -- .Audio0/addr DEO2 &no-up |
142 | 143 |
DUP #05 SFT #01 AND #01 ! ,&no-down JCN |
143 |
- ( move ) .Audio0/addr DEI2 #0001 ++ .Audio0/addr DEO2 &no-down |
|
144 |
+ ( move ) .Audio0/addr DEI2 INC2 .Audio0/addr DEO2 &no-down |
|
144 | 145 |
DUP #06 SFT #01 AND #01 ! ,&no-left JCN |
145 | 146 |
( move ) .Audio0/addr DEI2 #0010 -- .Audio0/addr DEO2 &no-left |
146 | 147 |
DUP #07 SFT #01 AND #01 ! ,&no-right JCN |
... | ... |
@@ -188,7 +189,7 @@ BRK |
188 | 189 |
.Mouse/y DEI2 .octave-view/y1 LDZ2 -- 8// NIP |
189 | 190 |
[ #00 ] !~ ,&no-incr JCN |
190 | 191 |
.octave LDZ #03 = ,&no-incr JCN |
191 |
- .octave LDZ #01 + .octave STZ &no-incr |
|
192 |
+ .octave LDZ INC .octave STZ &no-incr |
|
192 | 193 |
[ #02 ] !~ ,&no-decr JCN |
193 | 194 |
.octave LDZ #ff = ,&no-decr JCN |
194 | 195 |
.octave LDZ #01 - .octave STZ &no-decr |
... | ... |
@@ -218,13 +219,13 @@ BRK |
218 | 219 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
219 | 220 |
.Audio0/adsr DEO &no-d |
220 | 221 |
[ #02 ] !~ ,&no-s JCN |
221 |
- .Audio0/adsr #01 + DEI |
|
222 |
+ .Audio0/adsr INC DEI |
|
222 | 223 |
#10 .Mouse/state DEI #10 = #e0 * + + |
223 |
- .Audio0/adsr #01 + DEO &no-s |
|
224 |
+ .Audio0/adsr INC DEO &no-s |
|
224 | 225 |
[ #03 ] !~ ,&no-r JCN |
225 |
- .Audio0/adsr #01 + DEI |
|
226 |
+ .Audio0/adsr INC DEI |
|
226 | 227 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
227 |
- .Audio0/adsr #01 + DEO &no-r |
|
228 |
+ .Audio0/adsr INC DEO &no-r |
|
228 | 229 |
[ #05 ] !~ ,&no-left JCN |
229 | 230 |
.Audio0/volume DEI |
230 | 231 |
#10 .Mouse/state DEI #10 = #e0 * + + |
... | ... |
@@ -317,10 +318,10 @@ RTN |
317 | 318 |
.Audio0/adsr DEI #0f AND |
318 | 319 |
;draw-knob JSR2 |
319 | 320 |
.adsr-view/x1 LDZ2 #0030 ++ .adsr-view/y1 LDZ2 |
320 |
- .Audio0/adsr #01 + DEI #04 SFT |
|
321 |
+ .Audio0/adsr INC DEI #04 SFT |
|
321 | 322 |
;draw-knob JSR2 |
322 | 323 |
.adsr-view/x1 LDZ2 #0048 ++ .adsr-view/y1 LDZ2 |
323 |
- .Audio0/adsr #01 + DEI #0f AND |
|
324 |
+ .Audio0/adsr INC DEI #0f AND |
|
324 | 325 |
;draw-knob JSR2 |
325 | 326 |
( volume ) |
326 | 327 |
.adsr-view/x2 LDZ2 #0028 -- .adsr-view/y1 LDZ2 |
... | ... |
@@ -337,7 +338,7 @@ RTN |
337 | 338 |
( clear ) |
338 | 339 |
.wave-view/x1 LDZ2 |
339 | 340 |
.wave-view/y1 LDZ2 |
340 |
- .wave-view/x2 LDZ2 #0001 ++ |
|
341 |
+ .wave-view/x2 LDZ2 INC2 |
|
341 | 342 |
.wave-view/y2 LDZ2 |
342 | 343 |
#00 ;fill-rect JSR2 |
343 | 344 |
|
... | ... |
@@ -354,13 +355,13 @@ RTN |
354 | 355 |
#03 .Screen/pixel DEO |
355 | 356 |
&no-dot |
356 | 357 |
DUP TOS .Audio0/addr DEI2 ++ LDA |
357 |
- #02 / |
|
358 |
+ 2/ |
|
358 | 359 |
TOS 4// .wave-view/y1 LDZ2 ++ .Screen/y DEO2 |
359 |
- .Screen/x DEI2 #0001 ++ .Screen/x DEO2 |
|
360 |
+ .Screen/x DEI2 INC2 .Screen/x DEO2 |
|
360 | 361 |
( draw ) DUP |
361 | 362 |
.Audio0/length DEI2 NIP > |
362 |
- .Audio0/length DEI2 #0100 !! #0101 == DUP ADD #01 + .Screen/pixel DEO |
|
363 |
- #01 + GTHk ,&loop JCN |
|
363 |
+ .Audio0/length DEI2 #0100 !! #0101 == DUP ADD INC .Screen/pixel DEO |
|
364 |
+ INC GTHk ,&loop JCN |
|
364 | 365 |
POP2 |
365 | 366 |
|
366 | 367 |
( range ) |
... | ... |
@@ -380,7 +381,7 @@ RTN |
380 | 381 |
&loop |
381 | 382 |
DUP2 .Screen/y DEO2 |
382 | 383 |
( draw ) STHkr .Screen/pixel DEO |
383 |
- #0001 ++ GTH2k ,&loop JCN |
|
384 |
+ INC2 GTH2k ,&loop JCN |
|
384 | 385 |
POP2 POP2 |
385 | 386 |
POPr |
386 | 387 |
|
... | ... |
@@ -438,10 +439,10 @@ RTN |
438 | 439 |
&hor |
439 | 440 |
( save ) DUP2 .Screen/x DEO2 |
440 | 441 |
( draw ) ,&color LDR .Screen/pixel DEO |
441 |
- ( incr ) #0001 ++ |
|
442 |
+ ( incr ) INC2 |
|
442 | 443 |
OVR2 OVR2 GTS2 ,&hor JCN |
443 | 444 |
POP2 POP2 STH2r STH2r |
444 |
- ( incr ) #0001 ++ |
|
445 |
+ ( incr ) INC2 |
|
445 | 446 |
OVR2 OVR2 GTS2 ,&ver JCN |
446 | 447 |
POP2 POP2 POP2 POP2 |
447 | 448 |
|
... | ... |
@@ -52,7 +52,7 @@ BRK |
52 | 52 |
|
53 | 53 |
@on-frame ( -> ) |
54 | 54 |
|
55 |
- .cat/timer LDZ #01 ADD [ DUP ] .cat/timer STZ |
|
55 |
+ .cat/timer LDZ INC [ DUP ] .cat/timer STZ |
|
56 | 56 |
DUP ,&skip0 JCN #0000 ;draw-tail JSR2 &skip0 |
57 | 57 |
[ #10 ] !~ ,&skip1 JCN #0001 ;draw-tail JSR2 &skip1 |
58 | 58 |
[ #20 ] !~ ,&skip2 JCN #0002 ;draw-tail JSR2 &skip2 |
... | ... |
@@ -126,13 +126,13 @@ RTN |
126 | 126 |
.cat/x LDZ2 #0010 SUB2 .Screen/x DEO2 |
127 | 127 |
;ground .Screen/addr DEO2 |
128 | 128 |
|
129 |
- #00 #10 |
|
129 |
+ #10 #00 |
|
130 | 130 |
&loop |
131 | 131 |
( draw ) #01 .Screen/sprite DEO |
132 | 132 |
( sety ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 |
133 | 133 |
( setx ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 |
134 |
- ( incr ) SWP #01 ADD SWP |
|
135 |
- LTHk ,&loop JCN |
|
134 |
+ ( incr ) INC |
|
135 |
+ GTHk ,&loop JCN |
|
136 | 136 |
POP2 |
137 | 137 |
|
138 | 138 |
RTN |
... | ... |
@@ -327,12 +327,12 @@ RTN |
327 | 327 |
.Screen/x DEO2 |
328 | 328 |
STH2r |
329 | 329 |
&loop |
330 |
- DUP2 LDA #00 SWP 8** |
|
330 |
+ LDAk #00 SWP 8** |
|
331 | 331 |
;font ADD2 .Screen/addr DEO2 |
332 | 332 |
( draw ) STHkr .Screen/sprite DEO |
333 | 333 |
( incr ) ++ |
334 | 334 |
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2 |
335 |
- DUP2 LDA ,&loop JCN |
|
335 |
+ LDAk ,&loop JCN |
|
336 | 336 |
POP2 POPr |
337 | 337 |
|
338 | 338 |
RTN |
... | ... |
@@ -52,19 +52,19 @@ BRK |
52 | 52 |
|
53 | 53 |
( stash ) STH |
54 | 54 |
;dvd_icn .Screen/addr DEO2 |
55 |
- .dvd/y LDZ2 [ .dvd/y LDZ2 #0010 ADD2 ] |
|
55 |
+ [ .dvd/y LDZ2 #0010 ADD2 ] .dvd/y LDZ2 |
|
56 | 56 |
&ver |
57 |
- OVR2 .Screen/y DEO2 |
|
58 |
- .dvd/x LDZ2 [ .dvd/x LDZ2 #0020 ADD2 ] |
|
57 |
+ DUP2 .Screen/y DEO2 |
|
58 |
+ [ .dvd/x LDZ2 #0020 ADD2 ] .dvd/x LDZ2 |
|
59 | 59 |
&hor |
60 |
- OVR2 .Screen/x DEO2 |
|
60 |
+ DUP2 .Screen/x DEO2 |
|
61 | 61 |
( draw ) STHkr .Screen/sprite DEO |
62 | 62 |
( next ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 |
63 |
- ( incr ) SWP2 #0008 ADD2 SWP2 |
|
64 |
- LTH2k ,&hor JCN |
|
63 |
+ ( incr ) #0008 ADD2 |
|
64 |
+ GTH2k ,&hor JCN |
|
65 | 65 |
POP2 POP2 |
66 |
- ( incr ) SWP2 #0008 ADD2 SWP2 |
|
67 |
- LTH2k ,&ver JCN |
|
66 |
+ ( incr ) #0008 ADD2 |
|
67 |
+ GTH2k ,&ver JCN |
|
68 | 68 |
POP2 POP2 |
69 | 69 |
( destroy ) POPr |
70 | 70 |
|
... | ... |
@@ -1,6 +1,11 @@ |
1 | 1 |
( GUI Hover ) |
2 | 2 |
|
3 |
+%+ { ADD } %- { SUB } |
|
4 |
+%< { LTH } %> { GTH } %= { EQU } %! { NEQ } |
|
5 |
+%++ { ADD2 } %-- { SUB2 } |
|
6 |
+%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } |
|
3 | 7 |
%RTN { JMP2r } |
8 |
+%GTS2 { #8000 ++ SWP2 #8000 ++ << } |
|
4 | 9 |
|
5 | 10 |
( devices ) |
6 | 11 |
|
... | ... |
@@ -12,7 +17,7 @@ |
12 | 17 |
|
13 | 18 |
|0000 |
14 | 19 |
|
15 |
-@color [ &byte $1 ] |
|
20 |
+@color $1 |
|
16 | 21 |
@pointer [ &x $2 &y $2 &sprite $2 ] |
17 | 22 |
@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ] |
18 | 23 |
@r1 [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ] |
... | ... |
@@ -34,28 +39,27 @@ |
34 | 39 |
|
35 | 40 |
@on-mouse |
36 | 41 |
|
37 |
- ( defaults ) |
|
38 | 42 |
;pointer_icn .pointer/sprite STZ2 |
39 | 43 |
|
40 | 44 |
#01 .color STZ |
41 | 45 |
.Mouse/x DEI2 .Mouse/y DEI2 .r1 ;within-rect JSR2 #00 EQU ,&draw1 JCN |
42 | 46 |
#02 .color STZ |
43 | 47 |
;hand_icn .pointer/sprite STZ2 |
44 |
- &draw1 |
|
48 |
+ &draw1 |
|
45 | 49 |
.r1/x1 LDZ2 .r1/y1 LDZ2 .r1/x2 LDZ2 .r1/y2 LDZ2 .color LDZ ;line-rect JSR2 |
46 | 50 |
|
47 | 51 |
#01 .color STZ |
48 | 52 |
.Mouse/x DEI2 .Mouse/y DEI2 .r2 ;within-rect JSR2 #00 EQU ,&draw2 JCN |
49 | 53 |
#03 .color STZ |
50 | 54 |
;hand_icn .pointer/sprite STZ2 |
51 |
- &draw2 |
|
55 |
+ &draw2 |
|
52 | 56 |
.r2/x1 LDZ2 .r2/y1 LDZ2 .r2/x2 LDZ2 .r2/y2 LDZ2 .color LDZ ;line-rect JSR2 |
53 | 57 |
|
54 | 58 |
#01 .color STZ |
55 | 59 |
.Mouse/x DEI2 .Mouse/y DEI2 .r3 ;within-rect JSR2 #00 EQU ,&draw3 JCN |
56 | 60 |
#02 .color STZ |
57 | 61 |
;hand_icn .pointer/sprite STZ2 |
58 |
- &draw3 |
|
62 |
+ &draw3 |
|
59 | 63 |
.r3/x1 LDZ2 .r3/y1 LDZ2 .r3/x2 LDZ2 .r3/y2 LDZ2 .color LDZ ;line-rect JSR2 |
60 | 64 |
|
61 | 65 |
;draw-cursor JSR2 |
... | ... |
@@ -99,18 +103,25 @@ RTN |
99 | 103 |
|
100 | 104 |
@line-rect ( x1* y1* x2* y2* color -- ) |
101 | 105 |
|
102 |
- ( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2 |
|
103 |
- &hor |
|
104 |
- ( incr ) .Screen/x DEI2 #0001 ADD2 .Screen/x DEO2 |
|
105 |
- ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO |
|
106 |
- ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO |
|
107 |
- .Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN |
|
108 |
- .rect/y1 LDZ2 .Screen/y DEO2 |
|
106 |
+ ( load ) .color STZ |
|
107 |
+ STH2k .rect/y2 STZ2 .rect/x2 STZ2 |
|
108 |
+ STH2k .rect/y1 STZ2 .rect/x1 STZ2 |
|
109 |
+ STH2r STH2r SWP2 |
|
109 | 110 |
&ver |
110 |
- ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO |
|
111 |
- ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO |
|
112 |
- ( incr ) .Screen/y DEI2 #0001 ADD2 .Screen/y DEO2 |
|
113 |
- .Screen/y DEI2 .rect/y2 LDZ2 #0001 ADD2 LTH2 ,&ver JCN |
|
111 |
+ ( save ) DUP2 .Screen/y DEO2 |
|
112 |
+ ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/pixel DEO |
|
113 |
+ ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/pixel DEO |
|
114 |
+ ( incr ) INC2 |
|
115 |
+ OVR2 OVR2 GTS2 ,&ver JCN |
|
116 |
+ POP2 POP2 |
|
117 |
+ .rect/x1 LDZ2 .rect/x2 LDZ2 SWP2 |
|
118 |
+ &hor |
|
119 |
+ ( save ) DUP2 .Screen/x DEO2 |
|
120 |
+ ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/pixel DEO |
|
121 |
+ ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/pixel DEO |
|
122 |
+ ( incr ) INC2 |
|
123 |
+ OVR2 OVR2 GTS2 ,&hor JCN |
|
124 |
+ POP2 POP2 |
|
114 | 125 |
|
115 | 126 |
RTN |
116 | 127 |
|
... | ... |
@@ -52,10 +52,10 @@ RTN |
52 | 52 |
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2 |
53 | 53 |
.label/addr LDZ2 |
54 | 54 |
&loop |
55 |
- ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
55 |
+ ( draw ) LDAk #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
56 | 56 |
( incr ) #0001 ADD2 |
57 | 57 |
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 |
58 |
- DUP2 LDA ,&loop JCN |
|
58 |
+ LDAk ,&loop JCN |
|
59 | 59 |
POP2 |
60 | 60 |
|
61 | 61 |
RTN |
... | ... |
@@ -66,10 +66,10 @@ RTN |
66 | 66 |
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** 2// SUB2 .Screen/x DEO2 |
67 | 67 |
.label/addr LDZ2 |
68 | 68 |
&loop |
69 |
- ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
69 |
+ ( draw ) LDAk #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
70 | 70 |
( incr ) #0001 ADD2 |
71 | 71 |
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 |
72 |
- DUP2 LDA ,&loop JCN |
|
72 |
+ LDAk ,&loop JCN |
|
73 | 73 |
POP2 |
74 | 74 |
|
75 | 75 |
RTN |
... | ... |
@@ -80,10 +80,10 @@ RTN |
80 | 80 |
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** SUB2 .Screen/x DEO2 |
81 | 81 |
.label/addr LDZ2 |
82 | 82 |
&loop |
83 |
- ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
83 |
+ ( draw ) LDAk #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO |
|
84 | 84 |
( incr ) #0001 ADD2 |
85 | 85 |
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 |
86 |
- DUP2 LDA ,&loop JCN |
|
86 |
+ LDAk ,&loop JCN |
|
87 | 87 |
POP2 |
88 | 88 |
|
89 | 89 |
RTN |
... | ... |
@@ -21,7 +21,7 @@ |
21 | 21 |
|
22 | 22 |
|0100 |
23 | 23 |
|
24 |
- ( theme ) #037a .System/r DEO2 #032a .System/g DEO2 #052a .System/b DEO2 |
|
24 |
+ ( theme ) #f07a .System/r DEO2 #f02a .System/g DEO2 #f02a .System/b DEO2 |
|
25 | 25 |
|
26 | 26 |
( background ) ;checker_icn #02 ;cover-pattern JSR2 |
27 | 27 |
|
... | ... |
@@ -37,6 +37,7 @@ |
37 | 37 |
( load ) ;chr2_path .File/name DEO2 #0900 .File/length DEO2 ;image .File/load DEO2 |
38 | 38 |
( draw ) #0088 #0088 #0060 #0060 #81 ;image ;draw-chr JSR2 |
39 | 39 |
|
40 |
+ |
|
40 | 41 |
BRK |
41 | 42 |
|
42 | 43 |
@draw-icn ( x y width height color addr -- ) |
... | ... |
@@ -79,9 +80,9 @@ RTN |
79 | 80 |
|
80 | 81 |
RTN |
81 | 82 |
|
82 |
-@cover-pattern ( addr color -- ) |
|
83 |
+@cover-pattern ( addr* color -- ) |
|
83 | 84 |
|
84 |
- ( load ) .color STZ .Screen/addr DEO2 |
|
85 |
+ ( load ) .color/byte STZ .Screen/addr DEO2 |
|
85 | 86 |
#0000 .Screen/height DEI2 |
86 | 87 |
&ver |
87 | 88 |
( save ) OVR2 .Screen/y DEO2 |