Cleanup the interface
This commit is contained in:
parent
01a72f21ee
commit
0c29c240e6
303
etc/repl.tal
303
etc/repl.tal
|
@ -16,13 +16,15 @@
|
|||
|0100 ( -> )
|
||||
|
||||
( theme )
|
||||
#f0f7 .System/r DEO2
|
||||
#50f7 .System/g DEO2
|
||||
#60f7 .System/b DEO2
|
||||
#0f5f .System/r DEO2
|
||||
#0fcd .System/g DEO2
|
||||
#0fa3 .System/b DEO2
|
||||
#15 .Screen/auto DEO
|
||||
( vectors )
|
||||
;on-button .Controller/vector DEO2
|
||||
( draw )
|
||||
#fe00 ;draw-stack JSR2
|
||||
#01 ;draw-input JSR2
|
||||
#01 ;draw-stack JSR2
|
||||
|
||||
BRK
|
||||
|
||||
|
@ -44,6 +46,8 @@ BRK
|
|||
|
||||
@parse ( addr* -- )
|
||||
|
||||
#00 ;draw-stack JSR2
|
||||
|
||||
&while
|
||||
LDAk #20 GTH ,&no-space JCN
|
||||
;do-token JSR2
|
||||
|
@ -53,15 +57,16 @@ BRK
|
|||
&continue
|
||||
INC2 LDAk ,&while JCN
|
||||
POP2
|
||||
#01 ;draw-program JSR2
|
||||
|
||||
( set return )
|
||||
;&end ;write-litshort JSR2 #2c ;write-byte JSR2
|
||||
( time to evaluate program )
|
||||
( borrow wst ) #fe .System/wst DEO
|
||||
( borrow wst ) #ff .System/wst DEO
|
||||
;dst JMP2
|
||||
&end
|
||||
( released wst ) #00 .System/wst DEO
|
||||
#fe00 ;draw-stack JSR2
|
||||
#01 ;draw-stack JSR2
|
||||
|
||||
;dst .p/len LDZ2 #0004 ADD2 ;mclr JSR2
|
||||
#0000 .p/len STZ2
|
||||
|
@ -79,11 +84,8 @@ JMP2r
|
|||
&no-opcode
|
||||
&end
|
||||
POP2
|
||||
|
||||
;token #0040 ;mclr JSR2
|
||||
|
||||
;draw-program JSR2
|
||||
|
||||
JMP2r
|
||||
|
||||
@is-opcode ( string* -- flag )
|
||||
|
@ -163,64 +165,54 @@ JMP2r
|
|||
@draw-input ( color -- )
|
||||
|
||||
STH
|
||||
#0020 .Screen/x DEO2
|
||||
#0010 .Screen/y DEO2
|
||||
#3e #02 STHkr MUL ;draw-char JSR2
|
||||
( flower )
|
||||
#0010 .Screen/x DEO2
|
||||
#0020 .Screen/y DEO2
|
||||
;flowers-icn #00 ;input ;slen JSR2 ADD #06 DIVk MUL SUB #50 SFT2 ADD2 .Screen/addr DEO2
|
||||
#81 .Screen/sprite DEO
|
||||
#00 .Screen/sprite DEO
|
||||
;prompt-txt #02 ;draw-str JSR2
|
||||
;input #01 STHr MUL ;draw-str JSR2
|
||||
|
||||
JMP2r
|
||||
|
||||
@draw-stack ( addr* -- )
|
||||
@draw-stack ( color -- )
|
||||
|
||||
STH
|
||||
( position )
|
||||
#0020 .Screen/x DEO2
|
||||
#0020 .Screen/y DEO2
|
||||
STH2k
|
||||
#00ff ADD2 LDA ,&length STR
|
||||
#01 .Screen/auto DEO
|
||||
.Screen/x DEI2 ,&anchor STR2
|
||||
#00
|
||||
&loop
|
||||
( linebreak )
|
||||
DUP #0f AND ,&skip JCN
|
||||
[ LIT2 &anchor $2 ] .Screen/x DEO2
|
||||
.Screen/y DEI2k #000a ADD2 ROT DEO2
|
||||
&skip
|
||||
( byte ) #00 OVR STH2kr ADD2 LDA
|
||||
( color ) OVR [ LIT &length $1 ] STH2k LTH INC STH2r EQU #02 MUL ADD
|
||||
;draw-byte JSR2
|
||||
.Screen/x DEI2k #0002 ADD2 ROT DEO2
|
||||
INC DUP ,&loop JCN
|
||||
POP
|
||||
POP2r
|
||||
#0050 .Screen/y DEO2
|
||||
;stack-txt #02 ;draw-str JSR2
|
||||
#ffff LDA #ff00 STHr ,draw-memory JSR
|
||||
|
||||
JMP2r
|
||||
|
||||
@draw-program ( -- )
|
||||
@draw-program ( color -- )
|
||||
|
||||
STH
|
||||
#0020 .Screen/x DEO2
|
||||
.Screen/height DEI2 #0020 SUB2 .Screen/y DEO2
|
||||
#10 ;dst ;draw-memory JSR2
|
||||
#0090 .Screen/y DEO2
|
||||
;program-txt #02 ;draw-str JSR2
|
||||
#10 ;dst STHr ,draw-memory JSR
|
||||
|
||||
JMP2r
|
||||
|
||||
@draw-memory ( length addr* -- )
|
||||
@draw-memory ( length addr* color -- )
|
||||
|
||||
STH2
|
||||
#01 .Screen/auto DEO
|
||||
STH
|
||||
,&addr STR2
|
||||
.Screen/x DEI2 ,&anchor STR2
|
||||
#00
|
||||
&loop
|
||||
( linebreak )
|
||||
DUP #0f AND ,&skip JCN
|
||||
DUP #07 AND ,&no-lb JCN
|
||||
[ LIT2 &anchor $2 ] .Screen/x DEO2
|
||||
.Screen/y DEI2k #000a ADD2 ROT DEO2
|
||||
&skip
|
||||
( byte ) #00 OVR STH2kr ADD2 LDA #01 ;draw-byte JSR2
|
||||
.Screen/x DEI2k #0002 ADD2 ROT DEO2
|
||||
.Screen/y DEI2k #0010 ADD2 ROT DEO2
|
||||
&no-lb
|
||||
#00 OVR [ LIT2 &addr $2 ] ADD2 LDA #01 STHkr MUL ,draw-byte JSR
|
||||
.Screen/x DEI2k #0008 ADD2 ROT DEO2
|
||||
INC GTHk ,&loop JCN
|
||||
POP2
|
||||
POP2r
|
||||
POPr
|
||||
|
||||
JMP2r
|
||||
|
||||
|
@ -238,7 +230,7 @@ JMP2r
|
|||
|
||||
@draw-char ( char color -- )
|
||||
|
||||
SWP #20 SUB #00 SWP #30 SFT2 ;font ADD2 .Screen/addr DEO2
|
||||
SWP #20 SUB #00 SWP #40 SFT2 ;font ADD2 .Screen/addr DEO2
|
||||
.Screen/sprite DEO
|
||||
|
||||
JMP2r
|
||||
|
@ -256,21 +248,6 @@ JMP2r
|
|||
|
||||
( utils )
|
||||
|
||||
@scat ( src* dst* -- )
|
||||
|
||||
DUP2 ,slen JSR ADD2
|
||||
|
||||
@scpy ( src* dst* -- )
|
||||
|
||||
STH2
|
||||
&while
|
||||
LDAk STH2kr STA INC2r
|
||||
INC2 LDAk ,&while JCN
|
||||
POP2
|
||||
#00 STH2r STA
|
||||
|
||||
JMP2r
|
||||
|
||||
@slen ( str* -- len* )
|
||||
|
||||
DUP2 ,scap JSR SWP2 SUB2
|
||||
|
@ -298,18 +275,6 @@ JMP2r
|
|||
|
||||
JMP2r
|
||||
|
||||
@shex ( str* -- short* )
|
||||
|
||||
LIT2r 0000
|
||||
&while
|
||||
LITr 40 SFT2r
|
||||
LITr 00
|
||||
LDAk ,chex JSR STH ADD2r
|
||||
INC2 LDAk ,&while JCN
|
||||
POP2 STH2r
|
||||
|
||||
JMP2r
|
||||
|
||||
@chex ( char -- value )
|
||||
|
||||
DUP #2f GTH OVR #3a LTH AND ,&number JCN
|
||||
|
@ -330,18 +295,6 @@ JMP2r
|
|||
|
||||
JMP2r
|
||||
|
||||
@mcpy ( src* dst* len* -- )
|
||||
|
||||
SWP2 STH2
|
||||
OVR2 ADD2 SWP2
|
||||
&loop
|
||||
LDAk STH2kr STA INC2r
|
||||
INC2 GTH2k ,&loop JCN
|
||||
POP2 POP2
|
||||
POP2r
|
||||
|
||||
JMP2r
|
||||
|
||||
@print ( short* -- )
|
||||
|
||||
&short ( short* -- ) SWP ,&byte JSR
|
||||
|
@ -381,6 +334,10 @@ JMP2r
|
|||
|
||||
( assets )
|
||||
|
||||
@prompt-txt "Do 20 $1
|
||||
@stack-txt "Stack 20 $1
|
||||
@program-txt "Program 20 $1
|
||||
|
||||
@opcodes
|
||||
"LIT "INC "POP "DUP "NIP "SWP "OVR "ROT
|
||||
"EQU "NEQ "GTH "LTH "JMP "JCN "JSR "STH
|
||||
|
@ -391,70 +348,116 @@ JMP2r
|
|||
@err
|
||||
&lithx "LITHX $1 &label "LABEL $1 &token "TOKEN $1 &reslv "RESLV $1
|
||||
|
||||
@font ( acorn8 )
|
||||
0000 0000 0000 0000 1818 1818 1800 1800
|
||||
3636 3600 0000 0000 3636 7f36 7f36 3600
|
||||
0c3f 683e 0b7e 1800 0063 660c 1833 6300
|
||||
386c 6c38 6d66 3b00 0c0c 0c00 0000 0000
|
||||
060c 1818 180c 0600 3018 0c0c 0c18 3000
|
||||
0066 3cff 3c66 0000 000c 0c3f 0c0c 0000
|
||||
0000 0000 0018 1830 0000 007f 0000 0000
|
||||
0000 0000 0018 1800 0003 060c 1830 6000
|
||||
3e63 676b 7363 3e00 0c1c 0c0c 0c0c 3f00
|
||||
3e63 031e 3060 7f00 3e63 030e 0363 3e00
|
||||
0e1e 3666 7f06 0600 7f60 7e03 0363 3e00
|
||||
1e30 607e 6363 3e00 7f03 060c 1818 1800
|
||||
3e63 633e 6363 3e00 3e63 633f 0306 3c00
|
||||
0000 1818 0018 1800 0000 1818 0018 1830
|
||||
060c 1830 180c 0600 0000 7f00 7f00 0000
|
||||
3018 0c06 0c18 3000 3e63 030e 1800 1800
|
||||
3c66 6e6a 6e60 3c00 3e63 637f 6363 6300
|
||||
7e63 637e 6363 7e00 1e33 6060 6033 1e00
|
||||
7c66 6363 6366 7c00 7f60 607c 6060 7f00
|
||||
7f60 607c 6060 6000 1e33 6067 6333 1e00
|
||||
6363 637f 6363 6300 3f0c 0c0c 0c0c 3f00
|
||||
7f0c 0c0c 0c6c 3800 6366 6c78 6c66 6300
|
||||
6060 6060 6060 7f00 6377 7f6b 6b63 6300
|
||||
6373 7b6f 6763 6300 3e63 6363 6363 3e00
|
||||
7e63 637e 6060 6000 3e63 6363 6566 3b00
|
||||
7e63 637e 6663 6300 3e63 603e 0363 3e00
|
||||
3f0c 0c0c 0c0c 0c00 6363 6363 6363 3e00
|
||||
6363 6363 6336 1c00 6363 6b6b 7f77 6300
|
||||
6336 1c1c 3663 6300 6363 633e 0c0c 0c00
|
||||
7f06 0c18 3060 7f00 3e30 3030 3030 3e00
|
||||
0060 3018 0c06 0300 7c0c 0c0c 0c0c 7c00
|
||||
1c36 6300 0000 0000 0000 0000 0000 00ff
|
||||
3018 0c00 0000 0000 0000 3e03 3f63 3f00
|
||||
6060 7e63 6363 7e00 0000 3e63 6063 3e00
|
||||
0303 3f63 6363 3f00 0000 3e63 7f60 3e00
|
||||
0f18 183e 1818 1800 0000 3f63 633f 033e
|
||||
6060 7e63 6363 6300 0c00 1c0c 0c0c 3f00
|
||||
0600 1e06 0606 063c 6060 6366 7c66 6300
|
||||
1c0c 0c0c 0c0c 1e00 0000 367f 6b6b 6300
|
||||
0000 7e63 6363 6300 0000 3e63 6363 3e00
|
||||
0000 7e63 637e 6060 0000 3f63 633f 0302
|
||||
0000 6e7b 6060 6000 0000 3f60 3e03 7e00
|
||||
1818 3f18 1818 0f00 0000 6363 6363 3f00
|
||||
0000 6363 6336 1c00 0000 636b 6b7f 3600
|
||||
0000 6336 1c36 6300 0000 6363 633f 033e
|
||||
0000 7f06 1c30 7f00 060c 0c38 0c0c 0600
|
||||
0c0c 0c0c 0c0c 0c00 3018 180e 1818 3000
|
||||
316b 4600 0000 0000 0303 0606 761c 0c00
|
||||
f090 f01f 1f1f 1f00 e0e0 e01f 1111 1f00
|
||||
fe92 92f2 8282 fe00 6699 8142 8199 6600
|
||||
fcfc ffe1 e121 3f00 0000 3c66 6066 3cff
|
||||
6060 7c66 6666 66ff 1828 4f81 4f28 1800
|
||||
1814 f281 f214 1800 3c24 24e7 4224 1800
|
||||
1824 42e7 2424 3c00 3030 7c30 3030 1cff
|
||||
0000 3c66 7e60 3cff 0000 6c76 6060 60ff
|
||||
0000 3e60 3c06 7cff 0000 0018 1800 00ff
|
||||
0000 3c06 3e66 3eff 0000 6c76 6060 60ff
|
||||
0000 3c66 7e60 3cff 0000 0018 1800 00ff
|
||||
0000 7c66 6666 66ff 0000 3c66 6666 3cff
|
||||
3030 7c30 3030 1cff 0000 0018 1800 00ff
|
||||
0606 3e66 6666 3eff 0000 3c66 7e60 3cff
|
||||
1c30 307c 3030 30ff 1800 3818 1818 3cff
|
||||
0000 7c66 6666 66ff 0000 3c66 7e60 3cff
|
||||
0606 3e66 6666 3eff 0000 0000 0000 0000
|
||||
@flowers-icn ( by elioat )
|
||||
0000 0020 1408 0810 40a0 4205 0200 40a0
|
||||
0810 103c 7e7e 3c18 4205 0234 7e7e 3c18
|
||||
0000 0020 100c 0818 0040 a042 0522 5024
|
||||
0008 083c 7e7e 3c18 0a04 002c 7e7e 3c18
|
||||
0000 0000 0000 000c 0000 0000 0000 0000
|
||||
1c10 083c 7e7e 3c18 0000 002c 7e7e 3c18
|
||||
0000 0000 0000 0004 0000 0000 0002 0502
|
||||
0810 103c 7e7e 3c18 0000 0034 7e7e 3c18
|
||||
0000 0000 0000 0010 0000 0000 0020 5225
|
||||
080c 083c 7e7e 3c18 0200 002c 7e7e 3c18
|
||||
0000 0000 0800 1800 0000 040a 2450 240a
|
||||
1010 103c 7e7e 3c18 0400 0034 7e7e 3c18
|
||||
|
||||
@font ( msx816 )
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0020 2020 2020 2020 0000 2020 0000
|
||||
0000 006c 6c24 4800 0000 0000 0000 0000
|
||||
0000 0044 44fe 4444 4444 44fe 4444 0000
|
||||
0000 1010 7c92 9290 7c12 9292 7c10 1000
|
||||
0000 0040 a0a2 4408 1020 448a 0a04 0000
|
||||
0000 0070 8888 8850 2050 8a84 8c72 0000
|
||||
0000 0030 3010 2000 0000 0000 0000 0000
|
||||
0000 0004 0808 1010 1010 1008 0804 0000
|
||||
0000 0040 2020 1010 1010 1020 2040 0000
|
||||
0000 0000 0000 1054 3854 1000 0000 0000
|
||||
0000 0000 0010 1010 fe10 1010 0000 0000
|
||||
0000 0000 0000 0000 0000 0030 3010 2000
|
||||
0000 0000 0000 0000 fe00 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 3030 0000
|
||||
0000 0000 0002 0408 1020 4080 0000 0000
|
||||
( numbers )
|
||||
0000 0038 4482 8292 9292 8282 4438 0000
|
||||
0000 0010 3050 1010 1010 1010 1038 0000
|
||||
0000 0038 4482 8202 0c30 4080 80fe 0000
|
||||
0000 0038 4482 0204 3804 0282 4438 0000
|
||||
0000 0004 0c14 1424 2444 44fe 0404 0000
|
||||
0000 00fc 8080 80b8 c402 0282 4438 0000
|
||||
0000 0038 4482 80b8 c482 8282 4438 0000
|
||||
0000 00fe 8284 0808 1010 1010 1010 0000
|
||||
0000 0038 4482 8244 3844 8282 4438 0000
|
||||
0000 0038 4482 8282 463a 0282 4438 0000
|
||||
0000 0000 0000 3030 0000 0030 3000 0000
|
||||
0000 0000 0000 3030 0000 0030 3010 2000
|
||||
0000 0000 0408 1020 4020 1008 0400 0000
|
||||
0000 0000 0000 00fe 0000 fe00 0000 0000
|
||||
0000 0000 4020 1008 0408 1020 4000 0000
|
||||
0000 0038 4482 8202 0c10 1000 1010 0000
|
||||
0000 0038 4482 0262 9292 9292 926c 0000
|
||||
0000 0010 2844 8282 8282 fe82 8282 0000
|
||||
0000 00f8 8482 8284 f884 8282 84f8 0000
|
||||
0000 0038 4482 8080 8080 8082 4438 0000
|
||||
0000 00f8 4442 4242 4242 4242 44f8 0000
|
||||
0000 00fe 8080 8080 fc80 8080 80fe 0000
|
||||
0000 00fe 8080 8080 fc80 8080 8080 0000
|
||||
0000 0038 4482 8080 8e82 8282 463a 0000
|
||||
0000 0082 8282 8282 fe82 8282 8282 0000
|
||||
0000 0038 1010 1010 1010 1010 1038 0000
|
||||
0000 000e 0404 0404 0404 0484 8870 0000
|
||||
0000 0082 8488 90a0 c0a0 9088 8482 0000
|
||||
0000 0040 4040 4040 4040 4040 407e 0000
|
||||
0000 0082 c6aa 9292 8282 8282 8282 0000
|
||||
0000 0082 c2a2 a292 928a 8a86 8282 0000
|
||||
0000 0038 4482 8282 8282 8282 4438 0000
|
||||
0000 00f8 8482 8282 84f8 8080 8080 0000
|
||||
0000 0038 4482 8282 8282 bac6 443a 0000
|
||||
0000 00f8 8482 8284 f890 8884 8482 0000
|
||||
0000 0038 4482 8040 3804 0282 4438 0000
|
||||
0000 00fe 1010 1010 1010 1010 1010 0000
|
||||
0000 0082 8282 8282 8282 8282 827c 0000
|
||||
0000 0082 8282 8282 8282 8244 2810 0000
|
||||
0000 0082 8282 8282 9292 aaaa 4444 0000
|
||||
0000 0082 8282 4428 1028 4482 8282 0000
|
||||
0000 0082 8282 4428 1010 1010 1010 0000
|
||||
0000 00fe 0202 0408 1020 4080 80fe 0000
|
||||
0000 001c 1010 1010 1010 1010 101c 0000
|
||||
0000 0082 4428 10fe 1010 fe10 1010 0000
|
||||
0000 0070 1010 1010 1010 1010 1070 0000
|
||||
0000 0010 2844 8200 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 00fe 0000
|
||||
0000 0060 6020 1000 0000 0000 0000 0000
|
||||
0000 0000 0000 7884 047c 8484 8c74 0000
|
||||
0000 0040 4040 5864 4242 4242 6458 0000
|
||||
0000 0000 0000 3844 8280 8082 4438 0000
|
||||
0000 0004 0404 344c 8484 8484 4c34 0000
|
||||
0000 0000 0000 3844 82fe 8082 4438 0000
|
||||
0000 0018 2420 7820 2020 2020 2020 0000
|
||||
0000 0000 0000 3a46 8282 8246 3a82 4438
|
||||
0000 0040 4040 5864 4242 4242 4242 0000
|
||||
0000 0010 1000 0010 1010 1010 1010 0000
|
||||
0000 0008 0800 0008 0808 0808 0808 4830
|
||||
0000 0040 4040 4244 4850 7048 4442 0000
|
||||
0000 0030 1010 1010 1010 1010 1010 0000
|
||||
0000 0000 0000 ec92 9292 9292 9292 0000
|
||||
0000 0000 0000 5c62 4242 4242 4242 0000
|
||||
0000 0000 0000 3844 8282 8282 4438 0000
|
||||
0000 0000 0000 5864 4242 4242 6458 4040
|
||||
0000 0000 0000 344c 8484 8484 4c34 0404
|
||||
0000 0000 0000 5864 4040 4040 4040 0000
|
||||
0000 0000 0000 7c82 807c 0202 827c 0000
|
||||
0000 0020 2020 f820 2020 2020 2418 0000
|
||||
0000 0000 0000 8484 8484 8484 8c74 0000
|
||||
0000 0000 0000 8282 4444 2828 1010 0000
|
||||
0000 0000 0000 8282 8292 92aa 4444 0000
|
||||
0000 0000 0000 8244 2810 1028 4482 0000
|
||||
0000 0000 0000 4242 4242 4222 1408 1060
|
||||
0000 0000 0000 fe04 0810 2040 80fe 0000
|
||||
0000 000c 1010 1010 2010 1010 100c 0000
|
||||
0000 1010 1010 0000 0000 1010 1010 0000
|
||||
0000 0060 1010 1010 0810 1010 1060 0000
|
||||
0000 0060 920c 0000 0000 0000 0000 0000
|
||||
|
||||
@dst
|
||||
|
|
Loading…
Reference in New Issue