commit c3f1148
Devine Lu Linvega
·
2026-06-25 02:45:30 +0000 UTC
parent 0b6b935
Updated tests
2 files changed,
+46,
-24
+15,
-3
1@@ -17,13 +17,25 @@
2
3 @on-reset ( -> )
4 ;meta #06 DEO2
5+ ( | Set size )
6 #0180 .Screen/width DEO2
7 #0180 .Screen/height DEO2
8- ( | theme )
9+ ( | Theme )
10 #0f0f .System/r DEO2
11 #00ff .System/g DEO2
12 #00ff .System/b DEO2
13- ( | find center )
14+ ( | Wipe layers )
15+ #0000 DUP2 .Screen/x DEO2
16+ .Screen/y DEO2
17+ [ LIT2 80 -Screen/pixel ] DEO
18+ [ LIT2 c0 -Screen/pixel ] DEO
19+ ( | Blank vectors )
20+ #0000 #00 &l DEO2k #10 ADD DUP [ ?&l POP POP2 ]
21+ ( | Halt recover )
22+ [ LIT2 80 -System/halt ] DEO
23+ [ LIT2 01 -System/halt ] DEO
24+ [ LIT2 00 -System/halt ] DEO
25+ ( | Find center )
26 .Screen/width DEI2 #01 SFT2 .center/x STZ2
27 .Screen/height DEI2 #01 SFT2 .center/y STZ2
28 controller/<draw>
29@@ -34,7 +46,7 @@
30 BRK
31
32 @meta 00 "Perifs 0a
33- ( details ) "A 20 "Peripherals 20 "Test(80K) 0a
34+ ( details ) "A 20 "Peripherals 20 "Test 0a
35 ( author ) "By 20 "Hundred 20 "Rabbits 0a
36 ( date ) "24 20 "Jun 20 "2026 00
37 ( . ) 02
+31,
-21
1@@ -30,7 +30,6 @@
2 @on-reset ( -> )
3 ;meta #06 DEO2
4 theme/<load>
5- ( | #0100 .Screen/width DEO2 #00c0 .Screen/height DEO2 )
6 ;input/on-controller .Controller/vector DEO2
7 ;input/on-console .Console/vector DEO2
8 ;dict/home-path path/<set>
9@@ -84,6 +83,7 @@
10 DUP #0a EQU ?/on-enter
11 DUP #7f EQU ?/on-del
12 DUP #20 GTH ?{ POP #20 }
13+ sel/<reset-draw>
14 /<push> !/<redraw>
15
16 &on-bs ( c -- )
17@@ -109,9 +109,7 @@
18 @input/<push-str> ( str* -- )
19 &>w
20 LDAk DUP ?{ POP POP2 !/<redraw> }
21- DUP #0a NEQ ?{
22- POP LIT "\ /<push>
23- LIT "n }
24+ DUP #0a NEQ ?{ POP #20 }
25 /<push>
26 INC2 !/>w
27
28@@ -150,12 +148,16 @@
29 [ LIT2 e0 -Screen/pixel ] DEO
30 #0008 .Screen/y DEO2
31 path/<draw>
32- ;&buf #45 font/<draw-str-color>
33- .&buf LDZ ?{ ;&full !font/<draw-sprite> }
34- ;&hash !font/<draw-sprite>
35+ /get-origin #45 font/<draw-str-color>
36+ ;&caret !font/<draw-sprite>
37
38-@input/hash [ 4020 4020 4020 4020 4020 4020 4020 4020 ]
39- &full [ 6060 6060 6060 6060 6060 6060 6060 6060 ]
40+@input/get-length ( -- length* )
41+ #00 ;&ptr LDA ;&buf SUB2 JMP2r
42+
43+@input/get-origin ( -- buf* )
44+ /get-length ;bios/margin LDA2 #03 SFT2 #0002 SUB2 LTH2k ?{
45+ ( follow cursor ) SUB2 ;&buf ADD2 JMP2r }
46+ POP2 POP2 ;&buf JMP2r
47
48 @spacer/<draw> ( -- )
49 #0000 .Screen/x DEO2
50@@ -173,7 +175,8 @@
51
52 @bios/<welcome> ( -- )
53 /<reset>
54- ;dict/ready1 /<push>
55+ .Screen/width DEI2 #0010 SUB2 ;&margin STA2
56+ now/<eval>
57 ;dict/ready2 /<push> !/<redraw>
58
59 @bios/<dir> ( -- )
60@@ -268,13 +271,15 @@
61 INCr INC2 INC2 !/>l
62
63 @bios/<draw-symbol> ( symbol* id -- )
64- STHk #00 EQU ?{
65- ( | wrap )
66- DUP2 font/get-width .Screen/x DEI2 ADD2 .Screen/width DEI2 #0010 SUB2 LTH2 ?{
67- ( ) font/<draw-lb> } }
68- .Screen/x DEI2k #0008 ADD2 ROT DEO2
69+ STH
70+ DUP2 STHkr /<draw-spacer>
71 STHr sel/is-unselected #44 ADD !font/<draw-str-color>
72
73+@bios/<draw-spacer> ( symbol* id -- )
74+ ?{ POP2 !/space }
75+ font/get-width .Screen/x DEI2 ADD2 [ LIT2 &margin $2 ] LTH2 ?{ !font/<draw-lb> } &space .Screen/x DEI2k #0008 ADD2 ROT DEO2
76+ JMP2r
77+
78 (
79 @|Path )
80
81@@ -385,7 +390,6 @@
82
83 @sel/<pick> ( -- )
84 ,&id LDR INCk ?{ POP JMP2r }
85- /<reset>
86 bios/get-symbol
87 ( clamp ) DUP2 str/len #0040 LTH2 ?{ POP2 !input/<redraw> }
88 input/<push-str-quoted>
89@@ -396,7 +400,9 @@
90 JMP2r
91
92 @sel/<reset-draw> ( -- )
93- /<reset> !bios/<redraw>
94+ ,&id LDR /<reset>
95+ ,&id LDR NEQ ?bios/<redraw>
96+ JMP2r
97
98 (
99 @|Commands )
100@@ -763,7 +769,7 @@
101 JMP2r
102
103 @font/<draw-lb> ( -- )
104- #0000 .Screen/x DEO2
105+ #0008 .Screen/x DEO2
106 .Screen/y DEI2 #0010 ADD2 .Screen/y DEO2
107 JMP2r
108
109@@ -881,8 +887,10 @@
110 @file/exists ( path* -- t )
111 .File/name DEO2
112 #0001 .File/length DEO2
113- ;&b .File/read DEO2
114- .File/success-lb DEI JMP2r
115+ ;&e .File/stat DEO2
116+ [ LIT &e $1 ]
117+ ( not folder ) DUP LIT "- NEQ
118+ ( not missing ) SWP LIT "! NEQ AND JMP2r
119
120 @file/<cpy> ( src* dst* -- )
121 .File2/name DEO2
122@@ -1045,7 +1053,7 @@
123 @|Assets )
124
125 @dict/m_pc "M/PC 00
126- &ready1 "M/PC 20 "is 20 "ready. 0a 00
127+ &ready1 "Ready. 00
128 &ready2 "Type 20 "<cmd> 20 "to 20 "see 20 "options. 00
129 &home-path "./ 00
130 &sel-prev "Selection 20 "Previous 00
131@@ -1101,6 +1109,8 @@
132
133 @spacer/wave [ 0000 0000 0070 8807 ]
134
135+@input/caret [ 0020 2020 2020 2020 2020 2020 2020 0000 ]
136+
137 @font/glyphs [
138 0000 0000 0000 0000 0000 0000 0000 0000
139 0000 1010 1020 2020 2000 4040 0000 0000