@@ 29,7 29,7 @@
#50f2 .System/r DEO2
#b0f9 .System/g DEO2
#a0f8 .System/b DEO2
- ;load-theme JSR2
+ load-theme
( frame size e0xf0 )
( playdate size 0190x00f0 )
@@ 46,7 46,7 @@
#0101 .mode STZ2
( initial draw )
- ;redraw JSR2
+ redraw
( vectors )
;on-console .Console/vector DEO2
@@ 68,38 68,38 @@ BRK
@on-console ( -> )
- .Console/read DEI ;listen JSR2
+ .Console/read DEI listen
BRK
@on-button ( -> )
- .Controller/button DEI2 #01 LIT "v NEQ2 ,&no-paste JCN
- ;snarf-paste JSR2
+ .Controller/button DEI2 #01 LIT "v NEQ2 ?&no-paste
+ snarf-paste
&no-paste
.Controller/button DEI
- DUP #10 NEQ ,&no-u JCN
- .cursor/dx LDZ .cursor/dy LDZ #01 SUB ;set-sel JSR2
+ DUP #10 NEQ ?&no-u
+ .cursor/dx LDZ .cursor/dy LDZ #01 SUB set-sel
&no-u
- DUP #20 NEQ ,&no-d JCN
- .cursor/dx LDZ .cursor/dy LDZ INC ;set-sel JSR2
+ DUP #20 NEQ ?&no-d
+ .cursor/dx LDZ .cursor/dy LDZ INC set-sel
&no-d
- DUP #40 NEQ ,&no-l JCN
- .cursor/dx LDZ #01 SUB .cursor/dy LDZ ;set-sel JSR2
+ DUP #40 NEQ ?&no-l
+ .cursor/dx LDZ #01 SUB .cursor/dy LDZ set-sel
&no-l
- DUP #80 NEQ ,&no-r JCN
- .cursor/dx LDZ INC .cursor/dy LDZ ;set-sel JSR2
+ DUP #80 NEQ ?&no-r
+ .cursor/dx LDZ INC .cursor/dy LDZ set-sel
&no-r
- DUP #01 NEQ ,&no-a JCN
- ;press-sel JSR2
+ DUP #01 NEQ ?&no-a
+ press-sel
&no-a
- DUP #02 NEQ ,&no-b JCN
- ;erase JSR2
+ DUP #02 NEQ ?&no-b
+ erase
&no-b
POP
- .Controller/key DEI ;listen JSR2
+ .Controller/key DEI listen
BRK
@@ 111,14 111,14 @@ BRK
( find buttons )
;buttons/end ;buttons
&loop
- #0008 ADD2 LDAk #00 EQU ,&continue JCN
+ #0008 ADD2 LDAk #00 EQU ?&continue
( decr time )
DUP2 LDAk #01 SUB ROT ROT STA
( release button )
- LDAk ,&continue JCN
- DUP2 #0008 SUB2 #00 ;press-button/release JSR2
+ LDAk ?&continue
+ DUP2 #0008 SUB2 #00 press-button/release
&continue
- INC2 GTH2k ,&loop JCN
+ INC2 GTH2k ?&loop
POP2 POP2
BRK
@@ 126,15 126,15 @@ BRK
@on-mouse ( -> )
( clear last cursor )
- #40 ;draw-cursor JSR2
+ #40 draw-cursor
( draw new cursor )
.Mouse/x DEI2 .cursor/x STZ2
.Mouse/y DEI2 .cursor/y STZ2
;cursor-icn .Screen/addr DEO2
- #43 .Mouse/state DEI #00 NEQ DUP ADD SUB ;draw-cursor JSR2
+ #43 .Mouse/state DEI #00 NEQ DUP ADD SUB draw-cursor
- .Mouse/state DEI ,&on-mouse-touch JCN
+ .Mouse/state DEI ?&on-mouse-touch
BRK
&on-mouse-touch ( -> )
@@ 144,12 144,12 @@ BRK
#00 .Mouse/state DEO
- OVR #07 GTH ,&skip JCN
- DUP #fd GTH ,on-touch-bitpad JCN
- DUP #0b GTH ,&skip JCN
- OVR #02 LTH ,on-touch-fncpad JCN
- OVR #06 LTH ,on-touch-numpad JCN
- OVR #08 LTH ,on-touch-modpad JCN
+ OVR #07 GTH ?&skip
+ DUP #fd GTH ?on-touch-bitpad
+ DUP #0b GTH ?&skip
+ OVR #02 LTH ?on-touch-fncpad
+ OVR #06 LTH ?on-touch-numpad
+ OVR #08 LTH ?on-touch-modpad
&skip
POP2
@@ 159,7 159,7 @@ BRK
POP2
- .Mouse/x DEI2 #0033 GTH2 ,&continue JCN
+ .Mouse/x DEI2 #0033 GTH2 ?&continue
BRK
&continue
@@ 172,7 172,7 @@ BRK
( mask )
SFT2 .input LDZ2 EOR2
.input STZ2
- ;update-input JSR2
+ update-input
BRK
@@ 207,14 207,14 @@ BRK
@listen ( c -- )
STHk
- #00 EQU ,&skip JCN
+ #00 EQU ?&skip
;keys/end ;keys
&loop
- LDAk STHkr NEQ ,&continue JCN
+ LDAk STHkr NEQ ?&continue
INC2k LDA2 JSR2 ,&end JMP
&continue
- INC2 INC2 INC2 GTH2k ,&loop JCN
+ INC2 INC2 INC2 GTH2k ?&loop
&end
POP2 POP2
&skip
@@ 224,13 224,12 @@ JMP2r
@eval ( -- )
- ;buttons/push ;press-button JSR2
- .input LDZ2 #0001 ;push JSR2
+ ;buttons/push press-button
+ .input LDZ2 #0001 push
#0000 .input STZ2
- ;update-input JSR2
- ;draw-display ( .. )
+ update-input
-JMP2
+!draw-display
@append ( val -- )
@@ 245,10 244,10 @@ JMP2
@erase ( -- )
( clamp )
- .input LDZ2 ORA ,&has-input JCN
- ;buttons/pop ;press-button JSR2
+ .input LDZ2 ORA ?&has-input
+ ;buttons/pop press-button
.length LDZ2 ORA #01 JCN JMP2r
- ;pop JSR2 POP2 POP2
+ pop POP2 POP2
;draw-display JMP2
&has-input
@@ 261,20 260,20 @@ JMP2
@clear ( -- )
- ;buttons/clr ;press-button JSR2
+ ;buttons/clr press-button
#0000 .length STZ2
#0000 .input STZ2
- ;draw-display JSR2
+ draw-display
;update-input ( .. )
JMP2
@tog-mode ( -- )
- ;buttons/mode ;press-button JSR2
+ ;buttons/mode press-button
.mode/dec LDZk INC #01 AND SWP STZ
.mode/dot LDZk .mode/dec LDZ #00 EQU ADD #01 AND SWP STZ
- ;draw-display JSR2
+ draw-display
;draw-mode ( .. )
JMP2
@@ 282,7 281,7 @@ JMP2
@set-dec ( -- )
#01 .mode/dec STZ
- ;draw-display JSR2
+ draw-display
;draw-mode ( .. )
JMP2
@@ 290,7 289,7 @@ JMP2
@set-hex ( -- )
#00 .mode/dec STZ
- ;draw-display JSR2
+ draw-display
;draw-mode ( .. )
JMP2
@@ 298,8 297,8 @@ JMP2
@set-sel ( x y -- )
( erase last sel )
- #00 ;draw-sel JSR2
- #40 ;draw-cursor JSR2
+ #00 draw-sel
+ #40 draw-cursor
( store new sel )
#03 AND .cursor/dy STZ
@@ 317,12 316,12 @@ JMP2
JMP2
-@gcd ( num* den* -- d* ) ORAk ,&ok JCN POP2 JMP2r &ok SWP2 OVR2 ( MOD2 ) [ DIV2k MUL2 SUB2 ] ,gcd JMP
+@gcd ( num* den* -- d* ) ORAk ?&ok POP2 JMP2r &ok SWP2 OVR2 ( MOD2 ) [ DIV2k MUL2 SUB2 ] ,gcd JMP
@push ( num* den* -- )
- OVR2 #0000 EQU2 ,&invalid JCN
- ORAk #00 EQU ,&invalid JCN
+ OVR2 #0000 EQU2 ?&invalid
+ ORAk #00 EQU ?&invalid
( reduce )
OVR2 OVR2 ,gcd JSR STH2k DIV2 SWP2 STH2r DIV2
( store )
@@ 346,234 345,230 @@ JMP2r
@dup ( -- )
- ;buttons/dup ;press-button JSR2
- ;eval JSR2
+ ;buttons/dup press-button
+ eval
.length LDZ2 ORA #01 JCN JMP2r
- ;pop JSR2 OVR2 OVR2 ;push JSR2 ;push JSR2
- ;draw-display ( .. )
+ pop OVR2 OVR2 push push
-JMP2
+!draw-display
@swp ( -- )
- ;buttons/swp ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/swp press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ;pop JSR2 ROT2 STH2 ROT2 STH2r ;push JSR2 ;push JSR2
- ;draw-display JSR2
+ pop pop ROT2 STH2 ROT2 STH2r push push
+ draw-display
&skip
JMP2r
@vid ( -- )
- ;buttons/vid ;press-button JSR2
- ;eval JSR2
+ ;buttons/vid press-button
+ eval
.length LDZ2 ORA #01 JCN JMP2r
- .length LDZ2 #20 SFT2 #0002 SUB2 ;memory ADD2 LDA2 #0001 EQU2 ,&skip JCN
+ .length LDZ2 #20 SFT2 #0002 SUB2 ;memory ADD2 LDA2 #0001 EQU2 ?&skip
- ;pop JSR2 SWP2 #0001 ;push JSR2
- #0001 ;push JSR2
- ;draw-display JSR2
+ pop SWP2 #0001 push
+ #0001 push
+ draw-display
&skip
JMP2r
@inv ( -- )
- ;buttons/inv ;press-button JSR2
- ;eval JSR2
+ ;buttons/inv press-button
+ eval
.length LDZ2 ORA #01 JCN JMP2r
- ;pop JSR2 SWP2 ;push JSR2
- ;draw-display ( .. )
+ pop SWP2 push
-JMP2
+!draw-display
-@add ( -- )
+@do-add ( -- )
- ;buttons/add ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/add press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bd $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bn $2 ] MUL2 ADD2
- ,&ad LDR2 ,&bd LDR2 MUL2 ;push JSR2
- ;draw-display JSR2
+ ,&ad LDR2 ,&bd LDR2 MUL2 push
+ draw-display
&skip
JMP2r
-@sub ( -- )
+@do-sub ( -- )
- ;buttons/sub ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/sub press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bd $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bn $2 ] MUL2 SUB2
- ,&ad LDR2 ,&bd LDR2 MUL2 ;push JSR2
- ;draw-display JSR2
+ ,&ad LDR2 ,&bd LDR2 MUL2 push
+ draw-display
&skip
JMP2r
-@mul ( -- )
+@do-mul ( -- )
- ;buttons/mul ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/mul press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bn $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bd $2 ] MUL2
- ;push JSR2
- ;draw-display JSR2
+ push
+ draw-display
&skip
JMP2r
-@div ( -- )
+@do-div ( -- )
- ;buttons/div ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/div press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bd $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bn $2 ] MUL2
- ;push JSR2
- ;draw-display JSR2
+ push
+ draw-display
&skip
JMP2r
-@and ( -- )
+@do-and ( -- )
- ;buttons/and ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/and press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bd $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bn $2 ] MUL2 AND2
- ,&ad LDR2 ,&bd LDR2 MUL2 ;push JSR2
- ;draw-display JSR2
+ ,&ad LDR2 ,&bd LDR2 MUL2 push
+ draw-display
&skip
JMP2r
-@ora ( -- )
+@do-ora ( -- )
- ;buttons/ora ;press-button JSR2
- ;eval JSR2
- .length LDZ2 #0002 LTH2 ,&skip JCN
+ ;buttons/ora press-button
+ eval
+ .length LDZ2 #0002 LTH2 ?&skip
- ;pop JSR2 ,&bd STR2 ,&bn STR2
- ;pop JSR2 ,&ad STR2 ,&an STR2
+ pop ,&bd STR2 ,&bn STR2
+ pop ,&ad STR2 ,&an STR2
[ LIT2 &an $2 ] [ LIT2 &bd $2 ] MUL2
[ LIT2 &ad $2 ] [ LIT2 &bn $2 ] MUL2 ORA2
- ,&ad LDR2 ,&bd LDR2 MUL2 ;push JSR2
- ;draw-display JSR2
+ ,&ad LDR2 ,&bd LDR2 MUL2 push
+ draw-display
&skip
JMP2r
-@sfl ( -- )
+@do-sfl ( -- )
- ;buttons/sfl ;press-button JSR2
- ;eval JSR2
+ ;buttons/sfl press-button
+ eval
.length LDZ2 ORA #01 JCN JMP2r
- ;pop JSR2 SWP2 DUP2 ADD2 SWP2 ;push JSR2
- ;draw-display ( .. )
+ pop SWP2 DUP2 ADD2 SWP2 push
-JMP2
+!draw-display
-@sfr ( -- )
+@do-sfr ( -- )
- ;buttons/sfr ;press-button JSR2
- ;eval JSR2
+ ;buttons/sfr press-button
+ eval
.length LDZ2 ORA #01 JCN JMP2r
- ;pop JSR2 SWP2 #01 SFT2 SWP2 ;push JSR2
- ;draw-display ( .. )
+ pop SWP2 #01 SFT2 SWP2 push
-JMP2
+!draw-display
@put0 ( -- )
- ;buttons/0 ;press-button JSR2
- #0b ;play-note JSR2
- #00 ;append JMP2
+ ;buttons/0 press-button
+ #0b play-note
+ #00 !append
@put1 ( -- )
- ;buttons/1 ;press-button JSR2
- #0c ;play-note JSR2
- #01 ;append JMP2
+ ;buttons/1 press-button
+ #0c play-note
+ #01 !append
@put2 ( -- )
- ;buttons/2 ;press-button JSR2
- #0e ;play-note JSR2
- #02 ;append JMP2
+ ;buttons/2 press-button
+ #0e play-note
+ #02 !append
@put3 ( -- )
- ;buttons/3 ;press-button JSR2
- #10 ;play-note JSR2
- #03 ;append JMP2
+ ;buttons/3 press-button
+ #10 play-note
+ #03 !append
@put4 ( -- )
- ;buttons/4 ;press-button JSR2
- #11 ;play-note JSR2
- #04 ;append JMP2
+ ;buttons/4 press-button
+ #11 play-note
+ #04 !append
@put5 ( -- )
- ;buttons/5 ;press-button JSR2
- #13 ;play-note JSR2
- #05 ;append JMP2
+ ;buttons/5 press-button
+ #13 play-note
+ #05 !append
@put6 ( -- )
- ;buttons/6 ;press-button JSR2
- #15 ;play-note JSR2
- #06 ;append JMP2
+ ;buttons/6 press-button
+ #15 play-note
+ #06 !append
@put7 ( -- )
- ;buttons/7 ;press-button JSR2
- #17 ;play-note JSR2
- #07 ;append JMP2
+ ;buttons/7 press-button
+ #17 play-note
+ #07 !append
@put8 ( -- )
- ;buttons/8 ;press-button JSR2
- #18 ;play-note JSR2
- #08 ;append JMP2
+ ;buttons/8 press-button
+ #18 play-note
+ #08 !append
@put9 ( -- )
- ;buttons/9 ;press-button JSR2
- #1a ;play-note JSR2
- #09 ;append JMP2
+ ;buttons/9 press-button
+ #1a play-note
+ #09 !append
@puta ( -- )
- ;buttons/a ;press-button JSR2
- #09 ;play-note JSR2
- #0a ;append JMP2
+ ;buttons/a press-button
+ #09 play-note
+ #0a !append
@putb ( -- )
- ;buttons/b ;press-button JSR2
- #07 ;play-note JSR2
- #0b ;append JMP2
+ ;buttons/b press-button
+ #07 play-note
+ #0b !append
@putc ( -- )
- ;buttons/c ;press-button JSR2
- #21 ;play-note JSR2
- #0c ;append JMP2
+ ;buttons/c press-button
+ #21 play-note
+ #0c !append
@putd ( -- )
- ;buttons/d ;press-button JSR2
- #1f ;play-note JSR2
- #0d ;append JMP2
+ ;buttons/d press-button
+ #1f play-note
+ #0d !append
@pute ( -- )
- ;buttons/e ;press-button JSR2
- #1d ;play-note JSR2
- #0e ;append JMP2
+ ;buttons/e press-button
+ #1d play-note
+ #0e !append
@putf ( -- )
- ;buttons/f ;press-button JSR2
- #1c ;play-note JSR2
- #0f ;append JMP2
+ ;buttons/f press-button
+ #1c play-note
+ #0f !append
@press-button ( button* -- )
@@ 600,20 595,20 @@ JMP2r
@redraw ( -- )
- #04 ;buttons/ctl ;draw-pad JSR2
- #08 ;buttons/mod ;draw-pad JSR2
- #04 ;buttons/wst ;draw-pad JSR2
- #10 ;buttons/num ;draw-pad JSR2
- ;draw-mode JSR2
- ;draw-display JSR2
- ;update-input JSR2
+ #04 ;buttons/ctl draw-pad
+ #08 ;buttons/mod draw-pad
+ #04 ;buttons/wst draw-pad
+ #10 ;buttons/num draw-pad
+ draw-mode
+ draw-display
+ update-input
( frame )
#0000 DUP2
#1a
.Screen/height DEI2 #03 SFT2 NIP #02 SUB
;outline-frame
- ;draw-frame JSR2
+ draw-frame
( decal )
#16 .Screen/auto DEO
@@ 641,7 636,7 @@ JMP2r
#1600
&loop
#01 .Screen/sprite DEO
- INC GTHk ,&loop JCN
+ INC GTHk ?&loop
POP2
@draw-input ( -- )
@@ 650,7 645,7 @@ JMP2r
#0018 .Screen/x DEO2
#0050 .Screen/y DEO2
#04 ;draw-num/color STA
- ;input ;draw-fraction JSR2
+ ;input draw-fraction
( draw binary )
@@ 663,33 658,33 @@ JMP2r
#0f OVR SUB .input LDZ2 ROT SFT2
#0001 AND2 #30 SFT2 ;binary-icns ADD2 .Screen/addr DEO2
#01 .Screen/sprite DEO
- INCk #03 AND ,&no-space JCN
+ INCk #03 AND ?&no-space
.Screen/x DEI2k #0008 ADD2 ROT DEO2
&no-space
- INC GTHk ,&loop JCN
+ INC GTHk ?&loop
POP2
JMP2r
@draw-display ( -- )
- #0010 DUP2 #1609 ;display-frame ;draw-frame JSR2
+ #0010 DUP2 #1609 ;display-frame draw-frame
#0018 .Screen/x DEO2
#0018 .Screen/y DEO2
- #1606 ;fill-icn #01 ;draw-patt JSR2
+ #1606 ;fill-icn #01 draw-patt
#0018 .Screen/x DEO2
- #16 ;draw-dotted JSR2
+ #16 draw-dotted
#06 ;draw-num/color STA
( memory )
#0300
&loop
- #00 OVR INC .length LDZ2 GTH2 ,&end JCN
+ #00 OVR INC .length LDZ2 GTH2 ?&end
#0018 .Screen/x DEO2
#00 OVR #40 SFT2 #0038 SWP2 SUB2 .Screen/y DEO2
- #00 OVR INC .length LDZ2 SWP2 SUB2 #20 SFT2 ;memory ADD2 ;draw-fraction JSR2
- INC GTHk ,&loop JCN
+ #00 OVR INC .length LDZ2 SWP2 SUB2 #20 SFT2 ;memory ADD2 draw-fraction
+ INC GTHk ?&loop
&end
POP2
@@ 720,10 715,10 @@ JMP2r
STHkr #00
&wloop
[ LIT &color 0f ] .Screen/sprite DEO
- INC GTHk ,&wloop JCN
+ INC GTHk ?&wloop
POP2
.Screen/y DEI2k #0008 ADD2 ROT DEO2
- INC GTHk ,&hloop JCN
+ INC GTHk ?&hloop
POP2
POPr
,&x LDR2 .Screen/x DEO2
@@ 737,7 732,7 @@ JMP2r
#00
&loop
#00 OVR #0009 MUL2 STH2kr ADD2 #00 ;press-button/release JSR2
- INC GTHk ,&loop JCN
+ INC GTHk ?&loop
POP2
POP2r
@@ 781,7 776,7 @@ JMP2r
&loop
STH2kr #0030 ADD2 .Screen/addr DEO2
#81 .Screen/sprite DEO
- INC GTHk ,&loop JCN
+ INC GTHk ?&loop
POP2
STH2r #0060 ADD2 .Screen/addr DEO2
#81 .Screen/sprite DEO
@@ 822,21 817,21 @@ JMP2r
#01 .Screen/auto DEO
LDA2k SWP2 INC2 INC2 LDA2
- DUP2 #0001 EQU2 ,&whole JCN
- GTH2k ,&mixed JCN
+ DUP2 #0001 EQU2 ?&whole
+ GTH2k ?&mixed
&proper ( num* den* -- )
- .mode/dot LDZ ,&proper-dot JCN
+ .mode/dot LDZ ?&proper-dot
SWP2 ,draw-value JSR
- ;draw-slash JSR2
+ draw-slash
,draw-value ( .. )
JMP
&proper-dot ( num* den* -- )
- #00 ;draw-num JSR2
+ #00 draw-num
;draw-dot JSR2
SWP2 #03e8 #1000 .mode/dec LDZ [ JMP SWP2 POP2 ] MUL2 SWP2 DIV2
,draw-value ( .. )
@@ 845,9 840,9 @@ JMP
&mixed ( num* den* -- )
- .mode/dot LDZ ,&mixed-dot JCN
+ .mode/dot LDZ ?&mixed-dot
DIV2k ,draw-value JSR
- ;draw-quote JSR2
+ draw-quote
STH2k ( MOD2 ) [ DIV2k MUL2 SUB2 ] STH2r
,&proper ( .. )
@@ 856,7 851,7 @@ JMP
&mixed-dot ( num* den* -- )
DIV2k ,draw-value JSR
- ;draw-dot JSR2
+ draw-dot
STH2k ( MOD2 ) [ DIV2k MUL2 SUB2 ] STH2r
SWP2 #03e8 #1000 .mode/dec LDZ [ JMP SWP2 POP2 ] MUL2 SWP2 DIV2
,draw-value ( .. )
@@ 869,11 864,11 @@ JMP
@draw-value ( short* -- )
- ORAk ,&no-null JCN
+ ORAk ?&no-null
POP2 #00 ;draw-num JMP2
&no-null
- .mode/dec LDZ ,draw-dec JCN
+ .mode/dec LDZ ?draw-dec
@draw-hex ( short* -- )
@@ 885,8 880,8 @@ JMP
JMP2r
&parse
- OVR #04 SFT DUP [ LIT &z $1 ] EQU ,&skip JCN
- #ff ,&z STR DUP ;draw-num JSR2
+ OVR #04 SFT DUP [ LIT &z $1 ] EQU ?&skip
+ #ff ,&z STR DUP draw-num
&skip
POP #40 SFT2
JMP2r
@@ 900,8 895,8 @@ JMP2r
#000a ,&parse JSR
NIP
&emit
- DUP [ LIT &z $1 ] EQU ,&skip JCN
- #ff ,&z STR DUP ;draw-num JSR2
+ DUP [ LIT &z $1 ] EQU ?&skip
+ #ff ,&z STR DUP draw-num
&skip
POP
@@ 954,7 949,7 @@ JMP2r
#00
&loop
#04 .Screen/sprite DEO
- INC GTHk ,&loop JCN
+ INC GTHk ?&loop
POP2
JMP2r
@@ 993,7 988,7 @@ JMP2r
#00
&repeat-loop
#81 .Screen/sprite DEO
- INC GTHk ,&repeat-loop JCN
+ INC GTHk ?&repeat-loop
POP2
JMP2r
@@ 1021,8 1016,8 @@ JMP2r
@print ( -- )
- .length LDZ2 ORA ,&no-empty JCN
- ;empty-txt ;print-str JSR2 #0a18 DEO
+ .length LDZ2 ORA ?&no-empty
+ ;empty-txt print-str #0a18 DEO
JMP2r
&no-empty
@@ 1031,8 1026,8 @@ JMP2r
@print-fraction ( addr* -- )
LDA2k SWP2 INC2 INC2 LDA2
- DUP2 #0001 EQU2 ,&whole JCN
- GTH2k ,&mixed JCN
+ DUP2 #0001 EQU2 ?&whole
+ GTH2k ?&mixed
&proper ( num* den* -- )
@@ 1057,11 1052,11 @@ JMP2r
@print-value ( short* -- )
- ORAk ,&no-null JCN
+ ORAk ?&no-null
LIT "0 #18 DEO JMP2r
&no-null
- .mode/dec LDZ ,print-dec JCN
+ .mode/dec LDZ ?print-dec
@print-hex ( short* -- )
@@ 1073,8 1068,8 @@ JMP2r
JMP2r
&parse
- OVR #04 SFT DUP [ LIT &z $1 ] EQU ,&skip JCN
- #ff ,&z STR DUP ;hex-char JSR2 #18 DEO
+ OVR #04 SFT DUP [ LIT &z $1 ] EQU ?&skip
+ #ff ,&z STR DUP hex-char #18 DEO
&skip
POP #40 SFT2
JMP2r
@@ 1088,7 1083,7 @@ JMP2r
#000a ,&parse JSR
NIP
&emit
- DUP [ LIT &z $1 ] EQU ,&skip JCN
+ DUP [ LIT &z $1 ] EQU ?&skip
#ff ,&z STR DUP #30 ADD #18 DEO
&skip
POP
@@ 1102,7 1097,7 @@ JMP2r
&while
LDAk #18 DEO
- INC2 LDAk ,&while JCN
+ INC2 LDAk ?&while
POP2
JMP2r
@@ 1116,8 1111,8 @@ JMP2r
#0001 .File/length DEO2
&stream
;&buf .File/read DEO2
- .File/success DEI2 #0000 EQU2 ,&end JCN
- [ LIT &buf 20 ] ;listen JSR2
+ .File/success DEI2 #0000 EQU2 ?&end
+ [ LIT &buf 20 ] listen
,&stream JMP
&end
@@ 1160,13 1155,13 @@ JMP2r
=put0 =puta =putb =putc
@modpad
- =div =mul =sub =add
- =and =ora =sfl =sfr
+ =do-div =do-mul =do-sub =do-add
+ =do-and =do-ora =do-sfl =do-sfr
@keys
"~ =clear 09 =tog-mode "? =inv "@ =vid
- "+ =add "- =sub "* =mul "/ =div
- "& =and "| =ora "< =sfl "> =sfr
+ "+ =do-add "- =do-sub "* =do-mul "/ =do-div
+ "& =do-and "| =do-ora "< =do-sfl "> =do-sfr
20 =eval 08 =erase "% =swp "" =dup
"7 =put7 "8 =put8 "9 =put9 "f =putf
"4 =put4 "5 =put5 "6 =put6 "e =pute
@@ 1187,32 1182,32 @@ JMP2r
=buttons/8 =put8
=buttons/9 =put9
=buttons/f =putf
- =buttons/div =div
- =buttons/and =and
+ =buttons/div =do-div
+ =buttons/and =do-and
=buttons/swp =swp
=buttons/inv =inv
=buttons/4 =put4
=buttons/5 =put5
=buttons/6 =put6
=buttons/e =pute
- =buttons/mul =mul
- =buttons/ora =ora
+ =buttons/mul =do-mul
+ =buttons/ora =do-ora
=buttons/dup =dup
=buttons/vid =vid
=buttons/1 =put1
=buttons/2 =put2
=buttons/3 =put3
=buttons/d =putd
- =buttons/sub =sub
- =buttons/sfl =sfl
+ =buttons/sub =do-sub
+ =buttons/sfl =do-sfl
=buttons/pop =erase
=buttons/push =eval
=buttons/0 =put0
=buttons/a =puta
=buttons/b =putb
=buttons/c =putb
- =buttons/add =add
- =buttons/sfr =sfr
+ =buttons/add =do-add
+ =buttons/sfr =do-sfr
@buttons ( x* y* icon* size* state )
&ctl