commit d5874dc
Devine Lu Linvega
·
2026-06-26 23:49:50 +0000 UTC
parent d5a570e
Pulled latest M/PC
2 files changed,
+431,
-245
+431,
-245
1@@ -15,7 +15,7 @@
2 |0050 @Varvara/version
3 |0080 @path/buflen
4 |0200 @bios/buflen
5-|0200 @dir/buflen
6+|0800 @dir/buflen
7 |ff00 @dict/cap
8 |0008 @bios/anchor-x
9 |0028 @bios/anchor-y
10@@ -32,7 +32,7 @@
11 ;meta #06 DEO2
12 theme/<load>
13 ;dict/home-path path/<set>
14- wallpaper/<draw>
15+ window/<init>
16 spacer/<draw>
17 input/<bind>
18 bios/<welcome>
19@@ -42,7 +42,7 @@
20 ( name ) "M/PC 0a
21 ( details ) "Monitor/Program 20 "Control 0a
22 ( author ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
23- ( date ) "25 20 "Jun 20 "2026 00
24+ ( date ) "26 20 "Jun 20 "2026 00
25 ( . ) 03
26 ( - ) 56 =Varvara/version
27 ( - ) 83 =appicon
28@@ -50,6 +50,8 @@
29
30 @manifest/dat ( . )
31 _{ =dict/m_pc
32+ ( ) 10 00 =scroll/<up> =dict/scroll-up
33+ ( ) 20 00 =scroll/<down> =dict/scroll-down
34 ( ) 40 00 =sel/<prev> =dict/sel-prev
35 ( ) 80 00 =sel/<next> =dict/sel-next
36 ( ) 01 00 =sel/<use> =dict/sel-pick
37@@ -60,6 +62,10 @@
38 ( ) 00 1b =input/<blank> =dict/clear }
39 00
40
41+%Screen/<set-pos> ( x* y* -- ) {
42+ .Screen/y DEO2
43+ .Screen/x DEO2 }
44+
45 (
46 @|Input )
47
48@@ -100,7 +106,7 @@
49
50 @input/<reset> ( -- )
51 #0000 .&buf STZ2
52- [ LIT2 -&buf _&ptr ] STR
53+ [ LIT2 -&buf _&+ptr ] STR
54 JMP2r
55
56 @input/<push-str-quoted> ( str* -- )
57@@ -116,15 +122,15 @@
58 INC2 !/>w
59
60 @input/<push> ( c -- )
61- [ LIT2 00 &ptr -&buf ] INCk ,&ptr STR
62+ [ LIT2 00 &+ptr -&buf ] INCk ,&+ptr STR
63 STZ2
64 JMP2r
65
66 @input/<pop> ( -- )
67- ,&ptr LDR
68+ ,&+ptr LDR
69 ( cap ) DUP .&buf NEQ ?{ POP JMP2r }
70 #01 SUB #00 OVR STZ
71- ,&ptr STR
72+ ,&+ptr STR
73 JMP2r
74
75 @input/<eval-partial> ( -- )
76@@ -145,8 +151,7 @@
77 ( >> )
78
79 @input/<redraw> ( -- )
80- ;bios/anchor-x .Screen/x DEO2
81- #0018 .Screen/y DEO2
82+ ;bios/anchor-x #0018 Screen/<set-pos>
83 [ LIT2 e0 -Screen/pixel ] DEO
84 #0008 .Screen/y DEO2
85 path/<draw>
86@@ -154,19 +159,18 @@
87 ;&caret !font/<draw-sprite>
88
89 @input/get-length ( -- length* )
90- #00 ;&ptr LDA ;&buf SUB2 JMP2r
91+ #00 ;&+ptr LDA ;&buf SUB2 JMP2r
92
93 @input/get-origin ( -- buf* )
94- /get-length ;bios/margin LDA2 #03 SFT2 #0002 SUB2 LTH2k ?{
95+ /get-length window/get-margin #03 SFT2 #0002 SUB2 LTH2k ?{
96 ( follow cursor ) SUB2 ;&buf ADD2 JMP2r }
97 POP2 POP2 ;&buf JMP2r
98
99 @spacer/<draw> ( -- )
100- #0000 .Screen/x DEO2
101- #0018 .Screen/y DEO2
102+ #0000 #0018 Screen/<set-pos>
103 ;&wave .Screen/addr DEO2
104 [ LIT2 01 -Screen/auto ] DEO
105- .Screen/width DEI2 #03 SFT2 SUB [ LIT2r 41 -Screen/sprite ]
106+ window/get-cols SUB [ LIT2r 41 -Screen/sprite ]
107 &>l
108 DEOkr
109 INC DUP ?/>l
110@@ -177,7 +181,7 @@
111
112 @bios/<welcome> ( -- )
113 /<reset>
114- .Screen/width DEI2 #0010 SUB2 ;&margin STA2
115+ banner/<request>
116 now/<eval>
117 ;dict/ready2 /<push> !/<redraw>
118
119@@ -189,14 +193,17 @@
120 @bios/get-symbol ( id -- sym* )
121 #00 SWP DUP ADD ;&buf ADD2 LDA2 JMP2r
122
123-@bios/get-depth ( -- depth )
124- ,&ptr LDR2 ;&buf SUB2 #01 SFT2 NIP JMP2r
125+@bios/get-depth ( -- depth* )
126+ ,&+ptr LDR2 ;&buf SUB2 #01 SFT2 JMP2r
127
128-@bios/req-depth1 ( -- fail )
129- /get-depth #00 EQU JMP2r
130+@bios/is-empty ( -- fail )
131+ ,&+ptr LDR2 ;&buf EQU2 JMP2r
132
133-@bios/req-depth2 ( -- fail )
134- /get-depth #02 LTH JMP2r
135+@bios/is-thtwo ( -- fail )
136+ /get-depth #0002 LTH2 JMP2r
137+
138+@bios/is-ththree ( -- fail )
139+ /get-depth #0003 LTH2 JMP2r
140
141 @bios/<parse> ( str* -- )
142 /<reset>
143@@ -205,15 +212,14 @@
144
145 @bios/<parse-partial> ( str* -- )
146 sel/<reset>
147- str/walk-ws
148+ str/walk-ws banner/<request>
149 &>w
150 dict/alloc /<push>
151 str/walk-ws LDAk ?/>w
152 POP2 !/<redraw>
153
154 @bios/<reset> ( -- )
155- ;&buf ,&ptr STR2
156- JMP2r
157+ ;&buf ,&+ptr STR2 !scroll/<reset>
158
159 @bios/<run> ( str* cmd* -- )
160 NIP2
161@@ -233,14 +239,14 @@
162
163 @bios/<push-raw> ( str* -- )
164 ( | put on stack )
165- [ LIT2 &ptr =&buf ]
166+ [ LIT2 &+ptr =&buf ]
167 ( clamp ) DUP2 ;&cap NEQ2 ?{ POP2 POP2 JMP2r }
168- INC2k INC2 ,&ptr STR2
169+ INC2k INC2 ,&+ptr STR2
170 STA2
171 JMP2r
172
173 @bios/pop ( -- addr* )
174- ,&ptr LDR2 #0002 SUB2 LDA2k SWP2 ,&ptr STR2
175+ ,&+ptr LDR2 #0002 SUB2 LDA2k SWP2 ,&+ptr STR2
176 JMP2r
177
178 @bios/<push-err-underflow> ( -- )
179@@ -256,32 +262,60 @@
180 ;dict/err-binary !/<push>
181
182 @bios/<redraw> ( -- )
183- #0000 .Screen/x DEO2
184- ;&anchor-y .Screen/y DEO2
185+ #0000 ;&anchor-y Screen/<set-pos>
186 [ LIT2 c0 -Screen/pixel ] DEO
187 ;&anchor-y .Screen/y DEO2
188- ,&ptr LDR2 ;&buf [ LITr 00 ]
189+ ,&+ptr LDR2 ;&buf scroll/get STHk DUP2 ADD2 ADD2
190+ ( | Draw scroll )
191+ scroll/<draw>
192 &>l
193- NEQ2k ?{ POP2 POP2 POPr !/<draw-logo> }
194+ NEQ2k ?{ POP2 POP2 POPr !banner/<draw> }
195 LDA2k symbol/make DUP2 /<draw-spacer>
196- STHkr sel/is-unselected #44 ADD font/<draw-str-color>
197+ STHkr sel/is-unselected symbol/<draw>
198 INCr INC2 INC2 !/>l
199
200 @bios/<draw-spacer> ( symbol* -- )
201- font/get-width .Screen/x DEI2 ADD2 [ LIT2 &margin $2 ] LTH2 ?{ !font/<draw-lb> }
202+ font/get-width .Screen/x DEI2 ADD2 window/get-margin LTH2 ?{ !font/<draw-lb> }
203 .Screen/x DEI2k #0008 ADD2 ROT DEO2
204 JMP2r
205
206-@bios/<draw-logo> ( -- )
207- ;&anchor-x .Screen/x DEO2
208- .Screen/y DEI2 #0018 ADD2 .Screen/y DEO2
209- [ LIT2 66 -Screen/auto ] DEO
210- ;&logo .Screen/addr DEO2
211- [ LIT2 45 -Screen/sprite ] DEOk DEO
212- JMP2r
213+@bios/<use> ( id -- )
214+ /get-symbol
215+ ( | handlers )
216+ DUP2 str/is-dir ?/<use-move>
217+ DUP2 str/is-icn ?/<use-draw>
218+ DUP2 str/is-rom ?/<use-load>
219+ path/make DUP2 file/is-text ?reader/<bind>
220+ POP2 JMP2r
221+
222+@bios/<use-move> ( str* -- )
223+ sel/<reset>
224+ input/<redraw>
225+ /<reset>
226+ path/<move>
227+ dir/<eval> !/<redraw>
228+
229+@bios/<use-draw> ( str* -- )
230+ icn/<select> !/<redraw>
231+
232+@bios/<use-load> ( str* -- )
233+ run/<select> !/<redraw>
234+
235+@symbol/<draw> ( str* unsel -- )
236+ ?{
237+ DUP2 str/is-dir ?/<draw-dir>
238+ DUP2 str/is-rom ?/<draw-use>
239+ ( selected ) #49 !font/<draw-str-color> }
240+ ( unselected ) #45 !font/<draw-str-color>
241+
242+@symbol/<draw-dir> ( str* -- )
243+ #4d !font/<draw-str-color>
244+
245+@symbol/<draw-use> ( str* -- )
246+ #44 !font/<draw-str-color>
247
248 @symbol/make ( str* -- sym* )
249- ;&buf DUP2 ,&ptr STR2
250+ ;&buf DUP2 ,&+ptr STR2
251 SWP2 [ LIT2r 1c00 ]
252 &>w
253 NEQkr STHr ?{
254@@ -294,7 +328,7 @@
255 INCr INC2 !/>w
256
257 @symbol/<push> ( c -- )
258- #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
259+ #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
260 STA2
261 JMP2r
262
263@@ -304,34 +338,34 @@
264 @path/<move> ( str* -- )
265 DUP2 ;dict/out-path str/cmp ?/<pop>
266 ( | Check if file is a folder )
267- LITr _&ptr LDR2r /<push-str>
268- ;&buf file/is-folder ?{
269+ LITr _&+ptr LDR2r /<push-str>
270+ ;&buf file/is-dir ?{
271 #00 STH2kr STA
272- LITr _&ptr STR2r
273+ LITr _&+ptr STR2r
274 JMP2r }
275 POP2r
276 ( | Add missing slash )
277- /is-folder ?{ LIT "/ /<push> }
278+ /is-dir ?{ LIT "/ /<push> }
279 JMP2r
280
281 @path/is-home ( -- t )
282 ;&buf str/len #0002 EQU2 JMP2r
283
284-@path/is-folder ( -- t )
285- ,&ptr LDR2 #0001 SUB2 LDA LIT "/ EQU JMP2r
286+@path/is-dir ( -- t )
287+ ,&+ptr LDR2 #0001 SUB2 LDA LIT "/ EQU JMP2r
288
289 @path/<pop> ( str* -- )
290 POP2
291 ( | find last slash )
292- ;&buf ,&ptr LDR2 #0001 SUB2
293+ ;&buf ,&+ptr LDR2 #0001 SUB2
294 &>lp
295 #0001 SUB2 LDAk LIT "/ EQU ?{ LTH2k ?/>lp }
296 INC2 #0000 OVR2 STA2
297- ,&ptr STR2
298+ ,&+ptr STR2
299 POP2 JMP2r
300
301 @path/<set> ( str* -- )
302- ;&buf ,&ptr STR2
303+ ;&buf ,&+ptr STR2
304 ( >> )
305
306 @path/<push-str> ( str* -- )
307@@ -341,9 +375,9 @@
308 INC2 !/>w
309
310 @path/<push> ( str* -- )
311- #00 [ LIT2 &ptr =&buf ]
312+ #00 [ LIT2 &+ptr =&buf ]
313 ( clamp ) DUP2 ;&cap NEQ2 ?{ POP2 POP POP2 JMP2r }
314- INC2k ,&ptr STR2
315+ INC2k ,&+ptr STR2
316 STA2
317 JMP2r
318
319@@ -356,38 +390,19 @@
320 (
321 @|Selection )
322
323-@sel/is-dir ( str* -- t )
324- str/cap #0001 SUB2 LDA LIT "/ EQU JMP2r
325-
326-@sel/is-icn ( str* -- t )
327- str/cap #0004 SUB2 ;dict/icn-ext !str/cmp
328-
329-@sel/is-rom ( str* -- t )
330- str/cap #0004 SUB2 ;dict/rom-ext !str/cmp
331-
332 @sel/<use> ( -- )
333- ,&id LDR INCk ?{ POP JMP2r }
334- bios/get-symbol
335- ( | handlers )
336- DUP2 /is-dir ?/<use-move>
337- DUP2 /is-icn ?/<use-draw>
338- DUP2 /is-rom ?/<use-load>
339- DUP2 file/is-text ?read/<bind>
340- POP2 JMP2r
341-
342-@sel/<use-move> ( str* -- )
343- /<reset>
344- bios/<reset>
345- path/<move>
346- input/<redraw>
347- dir/<eval> !bios/<redraw>
348+ ,&id LDR INCk ?bios/<use>
349+ POP JMP2r
350
351-@sel/<use-draw> ( str* -- )
352- !icn/<select>
353+@sel/<prev> ( -- )
354+ ,&id LDR
355+ ( clamp ) INCk ?{ POP JMP2r }
356+ #01 SUB #00 OVR scroll/<follow> !/<set>
357
358-@sel/<use-load> ( str* -- )
359- bios/<reset>
360- run/<select> !bios/<redraw>
361+@sel/<next> ( -- )
362+ ,&id LDR INC
363+ ( clamp ) DUP bios/get-depth NIP LTH ?/<set>
364+ POP JMP2r
365
366 @sel/is-active ( -- bool )
367 #ff
368@@ -396,17 +411,12 @@
369 @sel/is-unselected ( id -- bool )
370 [ LIT &id ff ] NEQ JMP2r
371
372-@sel/<prev> ( -- )
373- ,&id LDR
374- ( clamp ) INCk ?{ POP JMP2r }
375- #01 SUB !/<set>
376-
377-@sel/<next> ( -- )
378- ,&id LDR INC
379- ( clamp ) DUP bios/get-depth LTH ?/<set>
380- POP JMP2r
381+@sel/<activate> ( -- )
382+ #00
383+ ( >> )
384
385 @sel/<set> ( id -- )
386+ DUP ,&id LDR NEQ ?{ POP JMP2r }
387 ,&id STR !bios/<redraw>
388
389 @sel/<pick> ( -- )
390@@ -421,60 +431,108 @@
391 JMP2r
392
393 @sel/<reset-draw> ( -- )
394+ scroll/<reset>
395 ,&id LDR /<reset>
396 ,&id LDR NEQ ?bios/<redraw>
397 JMP2r
398
399+@sel/<follow> ( id -- )
400+ ,&id LDR GTHk ?{ POP2 JMP2r }
401+ POP ,&id STR
402+ JMP2r
403+
404+(
405+@|Scroll )
406+
407+@scroll/<up> ( -- )
408+ ,&+pos LDR2
409+ ( clamp ) ORAk ?{ POP2 JMP2r }
410+ #0001 SUB2 /<set> !bios/<redraw>
411+
412+@scroll/<down> ( -- )
413+ sel/is-active ?{ !sel/<activate> }
414+ ,&+pos LDR2
415+ ( clamp ) INC2k bios/get-depth LTH2 ?{ POP2 JMP2r }
416+ INC2 DUP sel/<follow>
417+ /<set> !bios/<redraw>
418+
419+@scroll/<follow> ( id* -- )
420+ ,&+pos LDR2 LTH2k ?{ POP2 POP2 JMP2r }
421+ POP2 !/<set>
422+
423+@scroll/<reset> ( -- )
424+ #0000
425+ ( >> )
426+
427+@scroll/<set> ( id* -- )
428+ ,&+pos STR2
429+ JMP2r
430+
431+@scroll/get ( -- id* )
432+ ,&+pos LDR2 JMP2r
433+
434+@scroll/<draw> ( -- )
435+ [ LIT2 &+pos $2 ] ORAk ?{ POP2 JMP2r }
436+ ;bios/anchor-x .Screen/x DEO2
437+ bios/get-depth SWP2 INC2 SUB2 dec/make #43 font/<draw-str-color>
438+ #09 !font/<draw-glyph>
439+
440 (
441-@|Read )
442+@|Reader )
443
444-@read/on-controller ( -> )
445+@reader/on-controller ( -> )
446 .Controller/button DEI
447 ( | handlers )
448 DUP #01 NEQ ?{ /<leave> }
449 DUP #10 NEQ ?{ /<select-prev> }
450 DUP #20 NEQ ?{ /<select-next> }
451- POP BRK
452+ POP .Controller/key DEI DUP ?{ POP BRK }
453+ input/<bind>
454+ input/handle-input BRK
455
456-@read/<leave> ( -- )
457+@reader/<leave> ( -- )
458 input/<bind> !bios/<redraw>
459
460-@read/<bind> ( str* -- )
461+@reader/<bind> ( str* -- )
462 .File/name DEO2
463 ;&on-controller .Controller/vector DEO2
464- ( col ) .Screen/width DEI2 #03 SFT2 #0002 SUB2 ,&col STR
465+ ( col ) window/get-cols #0001 SUB2 ,&col STR
466 POP
467- ( row ) .Screen/height DEI2 #04 SFT2 #0004 SUB2 ,&row STR
468+ ( row ) window/get-rows #01 SFT2 #0003 SUB2 ,&row STR
469 POP #0000 !/<select-line>
470
471-@read/<select-prev> ( -- )
472+@reader/<select-prev> ( -- )
473 ,&line LDR2 ORAk ?{ POP2 JMP2r }
474 #0001 SUB2 !/<select-line>
475
476-@read/<select-next> ( -- )
477+@reader/<select-next> ( -- )
478 [ LIT2 &line $2 ] INC2
479 ( >> )
480
481-@read/<select-line> ( line* -- )
482- DUP2 ,&line STR2
483- file/<seek-line>
484- ;bios/anchor-x .Screen/x DEO2
485- ;bios/anchor-y .Screen/y DEO2
486+@reader/<select-line> ( line* -- )
487+ DUP2 file/seek-line ?{ POP2 JMP2r }
488+ ;bios/anchor-x ;bios/anchor-y Screen/<set-pos>
489 [ LIT2 c0 -Screen/pixel ] DEO
490 [ LIT2 15 -Screen/auto ] DEO
491 #0001 .File/length DEO2
492+ ( | Draw line number )
493+ [ LITr &col $1 ] DUP2 dec/make
494+ ( store col ) DUP2 str/len #03 ADD STH
495+ POP #43 font/<draw-str-color>
496+ #09 font/<draw-glyph>
497+ #20 font/<draw-glyph>
498+ ,&line STR2
499 ( | Render )
500 #41 ;font/color STA
501 ( | Stream )
502- [ LIT2 &row $1 00 ] [ LIT2r &col $1 00 ]
503+ [ LIT2 &row $1 00 ]
504 &>s
505 ;&b .File/read DEO2
506 .File/success-lb DEI ?{
507 POP2 POP2r ;dict/eof #44 !font/<draw-str-color> }
508 ( | hard-wrap )
509 GTHkr STHr ?{
510- ;bios/anchor-x .Screen/x DEO2
511- .Screen/y DEI2k #0010 ADD2 ROT DEO2
512+ ;bios/anchor-x .Screen/y DEI2 #0010 ADD2 Screen/<set-pos>
513 INC POPr LITr 00 }
514 [ LIT &b $1 ] DUP #0a NEQ ?{
515 SWP INC SWP POPr LITr 00 }
516@@ -499,9 +557,10 @@
517 =dir/api =mov/api =now/api =run/api
518 =icn/api =len/api =put/api =get/api
519 =cpy/api =era/api =ren/api =pop/api
520- =dup/api =ovr/api =swp/api =dec/api
521- =hex/api =cat/api =cmp/api =and/api
522- =ora/api =out/api =bye/api &lutend ]
523+ =dup/api =ovr/api =swp/api =rot/api
524+ =dec/api =hex/api =cat/api =cmp/api
525+ =and/api =ora/api =out/api =bye/api
526+ &lutend ]
527
528 @cmd/<eval> ( -- )
529 ;cmds/lutend ;cmds/lut-clip
530@@ -540,7 +599,7 @@
531 &api =dict/dir =&<eval> "<dir> 20 "( 20 09 20 "[f] 20 ") 00
532
533 @mov/<eval> ( -- )
534- bios/req-depth1 ?bios/<push-err-underflow>
535+ bios/is-empty ?bios/<push-err-underflow>
536 bios/pop path/<move> !dir/<eval>
537 &api =dict/mov =&<eval> "<mov> 20 "( 20 "path 20 09 20 "[f] 20 ") 00
538
539@@ -550,51 +609,50 @@
540 &api =dict/now =&<eval> "<now> 20 "( 20 09 20 "date 20 "time 20 ") 00
541
542 @run/<eval> ( -- )
543- bios/req-depth1 ?bios/<push-err-underflow>
544+ bios/is-empty ?bios/<push-err-underflow>
545 bios/pop
546 ( >> )
547
548 @run/<select> ( name* -- )
549 path/make
550 ( ? ) DUP2 file/is-oversized ?{
551- ( ? ) DUP2 file/exists ?loader/<run>
552+ ( ? ) DUP2 file/exists ?loader/<bind>
553 POP2 !bios/<push-err-missing> }
554 POP2 !bios/<push-err-oversized>
555 &api =dict/run =&<eval> "<run> 20 "( 20 "f.rom 20 09 20 "ok 20 ") 00
556
557 @icn/<eval> ( -- )
558- bios/req-depth1 ?bios/<push-err-underflow>
559+ bios/is-empty ?bios/<push-err-underflow>
560 bios/pop
561 ( >> )
562
563 @icn/<select> ( path* -- )
564 path/make
565 ( ? ) DUP2 file/exists ?{ POP2 !bios/<push-err-missing> }
566- ;dict/ok bios/<push>
567- ( >> )
568+ /<draw>
569+ ;dict/ok !bios/<push>
570
571 @icn/<draw> ( name* -- )
572 DUP2 .File/name DEO2
573 ( | depth )
574 #0008 .File/length DEO2
575- [ LIT2r 03 -Screen/sprite ]
576+ [ LIT2r 03 -Screen/sprite ] ;&buf .Screen/addr DEO2
577 ( | size )
578 /read-size
579- ( h ) #00 SWP SUB ,&height STR
580- ( w ) #00 SWP SUB ,&width STR
581- ;&buf .Screen/addr DEO2
582- #0000 DUP2 .Screen/x DEO2
583- .Screen/y DEO2
584+ ( h ) #00 SWP SUBk ,&height STR
585+ ( y ) #31 SFT2 window/get-middle SWP2 SUB2 .Screen/y DEO2
586+ ( w ) #00 SWP SUBk ,&width STR
587+ ( x ) #31 SFT2 window/get-center SWP2 SUB2 ,&anchor STR2
588 ( | draw )
589 [ LIT2 01 -Screen/auto ] DEO
590 [ LIT &height $1 ]
591 &>v
592- #0000 .Screen/x DEO2
593+ [ LIT2 &anchor $2 ] .Screen/x DEO2
594 [ LIT &width $1 ]
595 &>h
596 ;&buf .File/read DEO2
597- [ LIT2 00 -File/success-lb ] DEI EQU ?{ DEOkr
598- INC DUP ?/>h }
599+ DEOkr
600+ INC DUP ?/>h
601 POP
602 ( lb ) .Screen/y DEI2k #0008 ADD2 ROT DEO2
603 INC DUP ?/>v
604@@ -603,15 +661,12 @@
605 @icn/read-size ( str* -- w h )
606 str/cap #0009 SUB2
607 ( no size ) INC2k INC2 LDA [ LIT "x ] EQU ?{ POP2 #1010 JMP2r }
608- LDA2k /read-byte STH
609- #0003 ADD2 LDA2 /read-byte STHr SWP JMP2r
610-
611-@icn/read-byte ( a b -- byte )
612- chr/hex SWP chr/hex #40 SFT ORA JMP2r
613+ LDA2k str/read-byte STH
614+ #0003 ADD2 LDA2 str/read-byte STHr SWP JMP2r
615 &api =dict/icn =&<eval> "<icn> 20 "( 20 "f.icn 20 09 20 "ok 20 ") 00
616
617 @put/<eval> ( -- )
618- bios/req-depth2 ?bios/<push-err-underflow>
619+ bios/is-thtwo ?bios/<push-err-underflow>
620 bios/pop path/make .File/name DEO2
621 bios/pop DUP2 str/len .File/length DEO2
622 .File/write DEO2
623@@ -619,7 +674,7 @@
624 &api =dict/put =&<eval> "<put> 20 "( 20 "body 20 "f 20 09 20 "ok 20 ") 00
625
626 @get/<eval> ( -- )
627- bios/req-depth1 ?bios/<push-err-underflow>
628+ bios/is-empty ?bios/<push-err-underflow>
629 bios/pop path/make
630 ( ? ) DUP2 file/exists ?{ POP2 !bios/<push-err-missing> }
631 ( ? ) DUP2 file/is-text ?{ POP2 !bios/<push-err-binary> }
632@@ -627,7 +682,7 @@
633 &api =dict/get =&<eval> "<get> 20 "( 20 "f 20 09 20 "body 20 ") 00
634
635 @cpy/<eval> ( -- )
636- bios/req-depth2 ?bios/<push-err-underflow>
637+ bios/is-thtwo ?bios/<push-err-underflow>
638 ( dst ) bios/pop path/make
639 ( src ) bios/pop path/make
640 ( ? ) DUP2 file/exists ?{ POP2 POP2 !bios/<push-err-missing> }
641@@ -636,7 +691,7 @@
642 &api =dict/cpy =&<eval> "<cpy> 20 "( 20 "fsrc 20 "fdst 20 09 20 "ok 20 ") 00
643
644 @era/<eval> ( -- )
645- bios/req-depth1 ?bios/<push-err-underflow>
646+ bios/is-empty ?bios/<push-err-underflow>
647 bios/pop path/make
648 ( ? ) DUP2 file/exists ?{ POP2 !bios/<push-err-missing> }
649 .File/name DEO2
650@@ -645,7 +700,7 @@
651 &api =dict/era =&<eval> "<era> 20 "( 20 "f 20 09 20 "ok 20 ") 00
652
653 @ren/<eval> ( -- )
654- bios/req-depth2 ?bios/<push-err-underflow>
655+ bios/is-thtwo ?bios/<push-err-underflow>
656 ( dst ) bios/pop path/make
657 ( src ) bios/pop path/make
658 ( ? ) DUP2 file/exists ?{ POP2 POP2 !bios/<push-err-missing> }
659@@ -656,95 +711,101 @@
660 &api =dict/ren =&<eval> "<ren> 20 "( 20 "fsrc 20 "fdst 20 09 20 "ok 20 ") 00
661
662 @len/<eval> ( -- )
663- bios/req-depth1 ?bios/<push-err-underflow>
664+ bios/is-empty ?bios/<push-err-underflow>
665 bios/pop path/make
666 ( ? ) DUP2 file/exists ?{ POP2 ;dict/zero !bios/<push> }
667 .File/name DEO2
668 #0004 .File/length DEO2
669 ;&buf .File/stat DEO2
670- ;&buf dict/alloc NIP2 !bios/<push>
671+ ;&hb LDA2 str/read-byte ;&lb LDA2 str/read-byte hex/make dict/alloc NIP2 !bios/<push>
672 &api =dict/len =&<eval> "<len> 20 "( 20 "f 20 09 20 "hex 20 ") 00
673
674 @dup/<eval> ( -- )
675- bios/req-depth1 ?bios/<push-err-underflow>
676+ bios/is-empty ?bios/<push-err-underflow>
677 bios/pop DUP2 bios/<push> !bios/<push>
678 &api =dict/dup =&<eval> "<dup> 20 "( 20 "a 20 09 20 "a 20 "a 20 ") 00
679
680 @ovr/<eval> ( -- )
681- bios/req-depth1 ?bios/<push-err-underflow>
682+ bios/is-empty ?bios/<push-err-underflow>
683 ( b ) bios/pop
684 ( a ) bios/pop DUP2 bios/<push>
685 SWP2 bios/<push> !bios/<push>
686 &api =dict/ovr =&<eval> "<ovr> 20 "( 20 "a 20 "b 20 09 20 "a 20 "b 20 "a 20 ") 00
687
688 @pop/<eval> ( -- )
689- bios/req-depth1 ?bios/<push-err-underflow>
690+ bios/is-empty ?bios/<push-err-underflow>
691 bios/pop POP2 JMP2r
692 &api =dict/pop =&<eval> "<pop> 20 "( 20 "a 20 09 20 ") 00
693
694 @swp/<eval> ( -- )
695- bios/req-depth2 ?bios/<push-err-underflow>
696+ bios/is-thtwo ?bios/<push-err-underflow>
697 bios/pop bios/pop SWP2 bios/<push> !bios/<push>
698 &api =dict/swp =&<eval> "<swp> 20 "( 20 "a 20 "b 20 09 20 "b 20 "a 20 ") 00
699
700+@rot/<eval> ( -- )
701+ bios/is-ththree ?bios/<push-err-underflow>
702+ bios/pop bios/pop bios/pop ROT2 ROT2 bios/<push>
703+ bios/<push> !bios/<push>
704+ &api =dict/rot =&<eval> "<rot> 20 "( 20 "a 20 "b 20 "c 20 09 20 "b 20 "a 20 "c 20 ") 00
705+
706 @cat/<eval> ( -- )
707- bios/req-depth2 ?bios/<push-err-underflow>
708+ bios/is-thtwo ?bios/<push-err-underflow>
709 bios/pop bios/pop dict/alloc-cat !bios/<push-raw>
710 &api =dict/cat =&<eval> "<cat> 20 "( 20 "a 20 "b 20 09 20 "ab 20 ") 00
711
712 @cmp/<eval> ( -- )
713- bios/req-depth2 ?bios/<push-err-underflow>
714+ bios/is-thtwo ?bios/<push-err-underflow>
715 bios/pop bios/pop str/cmp !bios/<push-bool>
716 &api =dict/cmp =&<eval> "<cmp> 20 "( 20 "a 20 "b 20 09 20 "bool 20 ") 00
717
718 @and/<eval> ( -- )
719- bios/req-depth2 ?bios/<push-err-underflow>
720+ bios/is-thtwo ?bios/<push-err-underflow>
721 ( a ) bios/pop ;dict/t str/cmp
722 ( b ) bios/pop ;dict/t str/cmp AND !bios/<push-bool>
723 &api =dict/and =&<eval> "<and> 20 "( 20 "a 20 "b 20 09 20 "bool 20 ") 00
724
725 @ora/<eval> ( -- )
726- bios/req-depth2 ?bios/<push-err-underflow>
727+ bios/is-thtwo ?bios/<push-err-underflow>
728 ( a ) bios/pop ;dict/t str/cmp
729 ( b ) bios/pop ;dict/t str/cmp ORA !bios/<push-bool>
730 &api =dict/ora =&<eval> "<ora> 20 "( 20 "a 20 "b 20 09 20 "bool 20 ") 00
731
732 @dec/<eval> ( -- )
733- bios/req-depth1 ?bios/<push-err-underflow>
734- ;&buf ,&ptr STR2
735- bios/pop str/hex
736- ( | dec str )
737+ bios/is-empty ?bios/<push-err-underflow>
738+ ;&buf ,&+ptr STR2
739+ bios/pop str/hex /make !bios/<push>
740+
741+@dec/make ( value* -- str* )
742+ ORAk ?{ POP2 ;dict/zero JMP2r }
743+ ;&buf ,&+ptr STR2
744 #2710 [ LIT2r 00fb ]
745 &>wpd
746- DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{ DUP /<push-digit>
747+ DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{
748+ DUP LIT "0 ADD #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
749+ STA2
750 INCr }
751 POP2 #000a DIV2 SWPr INCr STHkr ?/>wpd
752- POP2r POP2 POP2 ;&buf !bios/<push>
753-
754-@dec/<push-digit> ( d -- )
755- LIT "0 ADD #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
756- STA2
757- JMP2r
758- &buf $6 &api =dict/dec =&<eval> "<dec> 20 "( 20 "hex 20 09 20 "dec 20 ") 00
759+ POP2r POP2 POP2 ;&buf JMP2r
760+ &api =dict/dec =&<eval> "<dec> 20 "( 20 "hex 20 09 20 "dec 20 ") 00
761
762 @hex/<eval> ( -- )
763- bios/req-depth1 ?bios/<push-err-underflow>
764- ;&buf ,&ptr STR2
765- bios/pop str/dec /<push-short>
766- ;&buf str/walk-zero !bios/<push>
767+ bios/is-empty ?bios/<push-err-underflow>
768+ bios/pop str/dec /make !bios/<push>
769
770-@hex/<push-short> ( short* -- )
771+@hex/make ( value* -- buf* )
772+ ;&buf ,&+ptr STR2
773 SWP /<push-byte>
774- ( >> )
775+ /<push-byte>
776+ ;&buf !str/walk-zero
777
778 @hex/<push-byte> ( byte -- )
779 DUP #04 SFT /<push-nibble>
780 ( >> )
781 &<push-nibble> ( byte -- )
782- /chr #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
783+ /chr #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
784 STA2
785 JMP2r
786- &buf $6 &api =dict/hex =&<eval> "<hex> 20 "( 20 "dec 20 09 20 "hex 20 ") 00
787+ &api =dict/hex =&<eval> "<hex> 20 "( 20 "dec 20 09 20 "hex 20 ") 00
788
789 @hex/chr2 ( byte -- hn ln )
790 DUP #04 SFT /chr SWP
791@@ -754,20 +815,23 @@
792 #0f AND DUP #09 GTH #27 MUL ADD LIT "0 ADD JMP2r
793
794 @out/<eval> ( -- )
795- bios/req-depth1 ?bios/<push-err-underflow>
796+ bios/is-empty ?bios/<push-err-underflow>
797 bios/pop !str/<print>
798 &api =dict/out =&<eval> "<out> 20 "( 20 "a 20 09 20 ") 00
799
800 @bye/<eval> ( -- )
801- #800f DEO
802- JMP2r
803+ ;&callback !fade-out/<bind>
804 &api =dict/bye =&<eval> "<bye> 20 "( 20 09 20 ") 00
805
806+@bye/callback ( -> )
807+ #800f DEO
808+ BRK
809+
810 (
811 @|Dict )
812
813 @dict/alloc-cat ( a* b* -- addr* )
814- [ LIT2r =&ptr ] LDA2r
815+ [ LIT2r =&+ptr ] LDA2r
816 &>wc1
817 LDAk DUP ?{
818 POP POP2
819@@ -781,14 +845,14 @@
820
821 @dict/alloc ( str* -- str* addr* )
822 LDAk LIT "" EQU ?/alloc-string
823- [ LITr _&ptr ] LDR2r
824+ [ LITr _&+ptr ] LDR2r
825 &>w
826 LDAk DUP #20 GTH ?{ POP STH2r #00 !/<push> }
827 str/escape /<push>
828 INC2 !/>w
829
830 @dict/alloc-string ( str* -- str* addr* )
831- INC2 [ LITr _&ptr ] LDR2r
832+ INC2 [ LITr _&+ptr ] LDR2r
833 &>was
834 LDAk DUP ?{ &end POP INC2 STH2r #00 !/<push> }
835 DUP LIT "" EQU ?/end
836@@ -796,27 +860,27 @@
837 INC2 !/>was
838
839 @dict/alloc-line ( str* -- str* addr* )
840- [ LITr _&ptr ] LDR2r
841+ [ LITr _&+ptr ] LDR2r
842 &>wal
843 LDAk DUP #1f GTH ?{ POP STH2r #00 !/<push> }
844 str/escape /<push>
845 INC2 !/>wal
846
847 @dict/<push> ( c -- )
848- [ LIT2 &ptr =&buf ]
849+ [ LIT2 &+ptr =&buf ]
850 ( clamp ) DUP2 ;&cap NEQ2 ?{ POP2 POP JMP2r }
851- INC2k ,&ptr STR2
852+ INC2k ,&+ptr STR2
853 STA
854 JMP2r
855
856 @dict/<reset> ( -- )
857- ;&buf ,&ptr STR2
858+ ;&buf ,&+ptr STR2
859 JMP2r
860
861 @dict/alloc-file ( name* -- addr* )
862 .File/name DEO2
863 #0001 .File/length DEO2
864- [ LITr _&ptr ] LDR2r
865+ [ LITr _&+ptr ] LDR2r
866 &>s
867 ;&b .File/read DEO2
868 .File/success-lb DEI ?{ STH2r #00 !/<push> }
869@@ -837,11 +901,6 @@
870 /<draw-glyph>
871 INC2 !/>w
872
873-@font/get-addr ( c -- addr* )
874- DUP #09 NEQ ?{ POP ;&tab JMP2r }
875- DUP #0a NEQ ?{ POP ;&lb JMP2r }
876- #00 SWP #20 SUB #40 SFT2 ;&glyphs ADD2 JMP2r
877-
878 @font/<draw-glyph> ( c -- )
879 DUP #0a NEQ ?{ POP !/<draw-lb> }
880 DUP #09 NEQ ?{ POP !/<draw-tab> }
881@@ -854,8 +913,7 @@
882 JMP2r
883
884 @font/<draw-lb> ( -- )
885- ;bios/anchor-x .Screen/x DEO2
886- .Screen/y DEI2k #0010 ADD2 ROT DEO2
887+ ;bios/anchor-x .Screen/y DEI2 #0010 ADD2 Screen/<set-pos>
888 JMP2r
889
890 @font/<draw-tab> ( -- )
891@@ -888,32 +946,19 @@
892 [ LIT2 15 -Screen/auto ] DEO
893 ;&b !font/<draw-sprite>
894
895-(
896-@|Wallpaper )
897-
898-@wallpaper/<draw> ( -- )
899- .Screen/width DEI2 #03 SFT2 hex/chr2 ,&w STR2
900- POP .Screen/height DEI2 #03 SFT2 hex/chr2 ,&h STR2
901- POP ;&path !icn/<draw>
902-
903- &path "wallpaper [ &w "00 "x &h "00 ] ".icn 00
904-
905 (
906 @|Loader )
907
908-@loader/<run> ( path* -- )
909- ;&buf ,&ptr STR2
910+@loader/<bind> ( path* -- )
911+ ;&buf ,&+ptr STR2
912 &>w
913- LDAk DUP ?{
914- POP POP2 ;&on-frame .Screen/vector DEO2
915- JMP2r }
916- #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
917+ LDAk DUP ?{ POP POP2 ;&callback !fade-out/<bind> }
918+ #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
919 STA2
920 INC2 !/>w
921
922-@loader/on-frame ( -> )
923- #0000 DUP2 .Screen/x DEO2
924- .Screen/y DEO2
925+@loader/callback ( -> )
926+ #0000 DUP2 Screen/<set-pos>
927 ( | Clear screen )
928 [ LIT2 80 -Screen/pixel ] DEO
929 [ LIT2 c0 -Screen/pixel ] DEO
930@@ -928,9 +973,67 @@
931
932 &mmu [ 01 0020 0000 =&rom 0000 =&entry ]
933
934-@loader/rom [
935- c000 4ea0 0008 38a0 000b 3880 0237 a001
936- 0026 80ac 372c 00fe 0000 0000 0000 0000 ]
937+(
938+@|Fade )
939+
940+@fade-out/<bind> ( callback* -- )
941+ ,&callback STR2
942+ ;&on-frame .Screen/vector DEO2
943+ [ LIT2 00 _&f ] STR
944+ JMP2r
945+
946+@fade-out/on-frame ( -> )
947+ [ LIT &f $1 ] INCk ,&f STR
948+ DUP #20 LTH ?{
949+ POP [ LIT2 &callback $2 ] JMP2 }
950+ ( | Fill )
951+ ( color ) DUP #04 SFT #60 SFT
952+ ( addr* ) #00 ROT #0f AND #30 SFT2 ;curtain/out-short ADD2 window/<fill>
953+ BRK
954+
955+@window/<init> ( -- )
956+ .Screen/width DEI2 DUP2 #01 SFT2 ,¢er STR2
957+ DUP2 #0010 SUB2 ,&margin STR2
958+ #03 SFT2 ,&cols STR2
959+ .Screen/height DEI2 DUP2 #01 SFT2 ,&middle STR2
960+ #03 SFT2 ,&rows STR2
961+ ( | Load wallpaper )
962+ /get-cols hex/chr2 ,&w STR2
963+ POP /get-rows hex/chr2 ,&h STR2
964+ POP ;&path !icn/<draw>
965+
966+ &get-center [ LIT2 ¢er $2 ] JMP2r
967+
968+ &get-cols [ LIT2 &cols $2 ] JMP2r
969+
970+ &get-middle [ LIT2 &middle $2 ] JMP2r
971+
972+ &get-rows [ LIT2 &rows $2 ] JMP2r
973+
974+ &get-margin [ LIT2 &margin $2 ] JMP2r
975+
976+ &path "wallpaper [ &w "00 "x &h "00 ] ".icn 00
977+
978+@window/<fill> ( color addr* -- )
979+ .Screen/addr DEO2
980+ STH
981+ [ LITr -Screen/sprite ]
982+ ( | Draw )
983+ #0000 DUP2 Screen/<set-pos>
984+ [ LIT2 01 -Screen/auto ] DEO
985+ ( h ) /get-cols SUB
986+ ( v ) /get-rows SUB
987+ &>v
988+ OVR
989+ &>h
990+ DEOkr
991+ INC DUP ?/>h
992+ POP
993+ ( | eos )
994+ #0000 .Screen/x DEO2
995+ .Screen/y DEI2k #0008 ADD2 ROT DEO2
996+ INC DUP ?/>v
997+ POP2 POP2r JMP2r
998
999 (
1000 @|Stdlib )
1001@@ -948,19 +1051,19 @@
1002 POP2 INC2 LDAk ?/>cat
1003 POP2 #ffff JMP2r
1004
1005-@file/<seek-line> ( line* -- )
1006+@file/seek-line ( line* -- not-eof )
1007 .File/name DEI2k ROT DEO2
1008- ORAk ?{ POP2 JMP2r }
1009- #0000 INC2k .File/length DEO2
1010- [ LIT2r =&bs ] [ LITr -File/read ]
1011+ ORAk ?{ POP2 #01 JMP2r }
1012+ #0001 .File/length DEO2
1013+ [ LIT2r =&bs ] [ LITr -File/read ] #0000
1014 &>l
1015 DEO2kr
1016- [ LIT2 -File/success-lb ] DEI EQU ?{
1017+ [ LIT2 00 -File/success-lb ] DEI EQU ?{
1018 [ LIT2 &bs $1 0a ] NEQ ?{ INC2 }
1019 GTH2k ?/>l }
1020- POP2 POP2 POPr POP2r JMP2r
1021+ POP2 POP2 POPr POP2r .File/success-lb DEI JMP2r
1022
1023-@file/is-folder ( path* -- t )
1024+@file/is-dir ( path* -- t )
1025 .File/name DEO2
1026 #0001 .File/length DEO2
1027 ;&bf .File/stat DEO2
1028@@ -976,12 +1079,13 @@
1029 @file/is-text ( path* -- t )
1030 .File/name DEO2
1031 #0001 .File/length DEO2
1032+ #00
1033 &>st
1034 ;&b .File/read DEO2
1035 ( | tests )
1036- .File/success-lb DEI ?{ #01 JMP2r }
1037- [ LIT &b $1 ] chr/is-ascii ?/>st
1038- #00 JMP2r
1039+ .File/success-lb DEI ?{ JMP2r }
1040+ POP #01 [ LIT &b $1 ] chr/is-ascii ?/>st
1041+ POP #00 JMP2r
1042
1043 @file/exists ( path* -- t )
1044 .File/name DEO2
1045@@ -1018,9 +1122,21 @@
1046 @chr/t-ws ( c -- c )
1047 POP #20 JMP2r
1048
1049+@str/read-byte ( a b -- byte )
1050+ chr/hex SWP chr/hex #40 SFT ORA JMP2r
1051+
1052 @chr/is-ascii ( c -- t )
1053 DUP #08 GTH SWP #7f LTH AND JMP2r
1054
1055+@str/is-dir ( str* -- t )
1056+ /cap #0001 SUB2 LDA LIT "/ EQU JMP2r
1057+
1058+@str/is-icn ( str* -- t )
1059+ /cap #0004 SUB2 ;dict/icn-ext !/cmp
1060+
1061+@str/is-rom ( str* -- t )
1062+ /cap #0004 SUB2 ;dict/rom-ext !/cmp
1063+
1064 @str/<print> ( str* -- )
1065 LDAk DUP ?{ POP POP2 JMP2r }
1066 #18 DEO
1067@@ -1092,18 +1208,18 @@
1068 JMP2r
1069
1070 @date/make ( -- str* )
1071- ;&buf DUP2 ,&ptr STR2
1072+ ;&buf DUP2 ,&+ptr STR2
1073 ( | Make string )
1074 [ LIT2 00 -DateTime/dotw ] DEI #20 SFT ;dict/days ADD2 /<push-str>
1075 [ LIT ", ] /<push>
1076 #20 /<push>
1077- [ LIT2 00 -DateTime/day ] DEI /<push-dec2>
1078+ [ LIT2 00 -DateTime/day ] DEI /<push-dec>
1079 #20 /<push>
1080 [ LIT2 00 -DateTime/month ] DEI #20 SFT ;dict/months ADD2 /<push-str>
1081 #20 /<push>
1082- .DateTime/year DEI2 !/<push-dec2>
1083+ .DateTime/year DEI2 !/<push-dec>
1084
1085-@date/<push-dec2> ( short* -- )
1086+@date/<push-dec> ( short* -- )
1087 #2710 [ LIT2r 00fb ]
1088 &>wpd
1089 DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{ DUP /<push-digit>
1090@@ -1116,7 +1232,7 @@
1091 ( >> )
1092
1093 @date/<push> ( c -- )
1094- #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
1095+ #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
1096 STA2
1097 JMP2r
1098
1099@@ -1127,7 +1243,7 @@
1100 INC2 !/>w
1101
1102 @time/make ( -- str* )
1103- ;&buf DUP2 ,&ptr STR2
1104+ ;&buf DUP2 ,&+ptr STR2
1105 ( | Make string )
1106 .DateTime/hour DEI /<push-dec>
1107 LIT ": /<push>
1108@@ -1145,10 +1261,49 @@
1109 ( >> )
1110
1111 @time/<push> ( c -- )
1112- #00 [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
1113+ #00 [ LIT2 &+ptr =&buf ] INC2k ,&+ptr STR2
1114 STA2
1115 JMP2r
1116
1117+@banner/<request> ( -- )
1118+ [ LIT2 00 _&skip ] STR
1119+ JMP2r
1120+
1121+@banner/<draw> ( -- )
1122+ ;bios/anchor-x DUP2 ,&x STR2
1123+ .Screen/y DEI2 #0018 ADD2 DUP2 ,&y STR2
1124+ Screen/<set-pos>
1125+ [ LIT2 66 -Screen/auto ] DEO
1126+ ;&asset .Screen/addr DEO2
1127+ [ LIT2 45 -Screen/sprite ] DEOk DEO
1128+ .Screen/vector DEI2 ORA ?{
1129+ [ LIT &skip 00 ] ?{
1130+ [ LIT2 00 _&f ] STR
1131+ [ LIT2 01 _&skip ] STR
1132+ ;&on-frame .Screen/vector DEO2 } }
1133+ JMP2r
1134+
1135+@banner/on-frame ( -> )
1136+ [ LIT &f $1 ] INCk ,&f STR
1137+ DUP #20 LTH ?{
1138+ POP #0000 .Screen/vector DEO2
1139+ BRK }
1140+ #01 SFT [ LIT2 &x $2 ] [ LIT2 &y $2 ] Screen/<set-pos>
1141+ [ LIT2 66 -Screen/auto ] DEO
1142+ ;&asset .Screen/addr DEO2
1143+ [ LIT2 45 -Screen/sprite ] DEOk DEO
1144+ ( | mask )
1145+ .Screen/y DEI2k #0010 SUB2 ROT DEO2
1146+ [ LIT2 15 -Screen/auto ] DEO
1147+ #0010 ROT SUB #30 SFT2 ;curtain/out ADD2 .Screen/addr DEO2
1148+ [ LIT2 40 -Screen/sprite ] DEOk DEOk DEOk DEOk DEOk DEOk DEO
1149+ BRK
1150+
1151+@banner/<load> ( -- )
1152+ #0070 .File/length DEO2
1153+ ;&asset .File/read DEO2
1154+ JMP2r
1155+
1156 @theme/<reset> ( -- )
1157 #f0a8 #f0ec #f0b9
1158 ( >> )
1159@@ -1166,6 +1321,7 @@
1160 ;&g .File/read DEO2
1161 ;&b .File/read DEO2
1162 .File/success-lb DEI ?{ !/<reset> }
1163+ banner/<load>
1164 [ LIT2 &r $2 ] [ LIT2 &g $2 ] [ LIT2 &b $2 ] !/<set>
1165
1166 &path ".theme 00
1167@@ -1184,6 +1340,8 @@
1168 &input "Input 00
1169 &eval "Run 00
1170 &eof "eof 00
1171+ &scroll-up "Scroll 20 "Up 00
1172+ &scroll-down "Scroll 20 "Down 00
1173 &eval-partial "Non-Destructive 20 "Run 00
1174 &out-path "../ 00
1175 &icn-ext ".icn 00
1176@@ -1200,6 +1358,7 @@
1177 &dup "dup 00
1178 &ovr "ovr 00
1179 &swp "swp 00
1180+ &rot "rot 00
1181 &pop "pop 00
1182 &now "now 00
1183 &dec "dec 00
1184@@ -1232,6 +1391,50 @@
1185
1186 @input/caret [ 0020 2020 2020 2020 2020 2020 2020 0000 ]
1187
1188+@loader/rom [
1189+ c000 4ea0 0008 38a0 000b 3880 0237 a001
1190+ 0026 80ac 372c 00fe 0000 0000 0000 0000 ]
1191+
1192+@curtain/out [
1193+ 0000 0000 0000 0000 0000 0000 0000 0000
1194+ 0000 0000 0000 0000 0000 0000 0000 0000
1195+ 0000 0000 0000 0000 0000 0000 0000 0000
1196+ 0000 0000 0000 0000 0000 0000 0000 0000
1197+ 0000 0000 0000 0000 0000 0000 0000 0000
1198+ 0000 0000 0000 0000 0000 0000 0000 0000
1199+ 0000 0000 0000 0002 0000 0000 0000 0002 ]
1200+ &out-short [
1201+ 0000 0022 0000 0022 0000 0022 0000 0022
1202+ 0088 0022 0088 0022 0088 0022 0088 0022
1203+ 00aa 00aa 00aa 00aa 00aa 00aa 00aa 00aa
1204+ 44aa 11aa 44aa 11aa 44aa 11aa 44aa 11aa
1205+ aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
1206+ aa77 aadd aa77 aadd aa77 aadd aa77 aadd
1207+ aaff aaff aaff aaff aaff aaff aaff aaff
1208+ bbff eeff bbff eeff bbff eeff bbff eeff
1209+ bbff ffff bbff ffff bbff ffff bbff ffff
1210+ ffff ffff ffff ffff ffff ffff ffff ffff ]
1211+
1212+@appicon [
1213+ 0000 0000 0000 0001 0000 0000 0000 0000
1214+ 0000 0000 0000 0080 0000 0000 0000 0000
1215+ 0000 0000 0000 0038 0000 0000 0000 0000
1216+ 070f 0f1f 1f0f 0f07 0000 0000 0000 0000
1217+ e0f0 f0f8 f8f1 f1e3 0000 0000 0000 0000
1218+ 3870 70e0 e0c0 c080 0000 0000 0000 0000
1219+ 0100 0000 0000 0000 0000 0000 0000 0000
1220+ 8300 0000 0000 0000 0000 0000 0000 0000
1221+ 8000 0000 0000 0000 0000 0000 0000 0000 ]
1222+
1223+@banner/asset [
1224+ 000f 3f7f 7fff ffff 00c0 f0f8 f8fc fcfc
1225+ 000e 0e1c 1c38 3870 00ff ffff e0e0 e0e0
1226+ 00f0 fcfc 1e0e 0e1e 001f 7f7f f0e0 e0e0
1227+ 00f0 fcfc 1e0e 0e00 ffff ff7f 7f3f 0f00
1228+ fcfc fcf9 f9f3 c300 70e0 e0c0 c080 8000
1229+ ffff ffe0 e0e0 e000 fcfc f000 0000 0000
1230+ e0e0 e0f0 7f7f 1f00 000e 0e1e fcfc f000 ]
1231+
1232 @font/glyphs [
1233 0000 0000 0000 0000 0000 0000 0000 0000
1234 0000 1010 1020 2020 2000 4040 0000 0000
1235@@ -1329,7 +1532,6 @@
1236 0030 0808 0810 100c 1020 2020 c000 0000
1237 0000 0032 4c00 0000 0000 0000 0000 0000 ]
1238 &tab [ 0000 0000 0008 0c7e 0c08 0000 0000 0000 ]
1239- &lb [ 0000 0002 0212 327c 3010 0000 0000 0000 ]
1240
1241 @kbd/glyphs [
1242 0000 0000 0000 0000 0808 1010 1000 2000
1243@@ -1384,30 +1586,14 @@
1244 &b [ 0000 ff00 0000 0000 0000 0000 00ff 0000 ]
1245 &c [ 0000 0080 4020 1008 0810 2040 8000 0000 ]
1246
1247-@appicon [
1248- 0000 0000 0000 0001 0000 0000 0000 0000
1249- 0000 0000 0000 0080 0000 0000 0000 0000
1250- 0000 0000 0000 0038 0000 0000 0000 0000
1251- 070f 0f1f 1f0f 0f07 0000 0000 0000 0000
1252- e0f0 f0f8 f8f1 f1e3 0000 0000 0000 0000
1253- 3870 70e0 e0c0 c080 0000 0000 0000 0000
1254- 0100 0000 0000 0000 0000 0000 0000 0000
1255- 8300 0000 0000 0000 0000 0000 0000 0000
1256- 8000 0000 0000 0000 0000 0000 0000 0000 ]
1257-
1258-@bios/logo [
1259- 000f 3f7f 7fff ffff 00c0 f0f8 f8fc fcfc
1260- 000e 0e1c 1c38 3870 00ff ffff e0e0 e0e0
1261- 00f0 fcfc 1e0e 0e1e 001f 7f7f f0e0 e0e0
1262- 00f0 fcfc 1e0e 0e00 ffff ff7f 7f3f 0f00
1263- fcfc fcf9 f9f3 c300 70e0 e0c0 c080 8000
1264- ffff ffe0 e0e0 e000 fcfc f000 0000 0000
1265- e0e0 e0f0 7f7f 1f00 000e 0e1e fcfc f000 ]
1266-
1267 (
1268 @|Buffer )
1269
1270-@len/buf $5
1271+@len/buf &hb $2 &lb $2 00
1272+
1273+@dec/buf $6
1274+
1275+@hex/buf $6
1276
1277 @icn/buf $8
1278
+0,
-0