commit f29f46d
Devine Lu Linvega
·
2026-02-17 18:52:46 +0000 UTC
parent bdb90df
Console use line feed for spacers
3 files changed,
+13,
-12
+10,
-9
1@@ -1,4 +1,4 @@
2-( echo "foobar" | uxncli console.rom "baz" "qux" )
3+( printf "ghi" | uxncli console.rom "abc" "def" )
4
5 |10 @Console/vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
6
7@@ -11,13 +11,8 @@
8 @on-console ( -> )
9 .Console/type DEI .Console/read DEI
10 ( inc ) [ LIT2 &ptr =expect ] INC2k INC2 ,&ptr STR2
11+ DUP2 ;expect/end EQU2 ?pass
12 LDA2 NEQ2 ?fail
13- [ LIT2 04 -Console/type ] DEI EQU ?pass
14- BRK
15-
16-@pass ( -> )
17- ;dict/pass str/<print>
18- #800f DEO
19 BRK
20
21 @fail ( -> )
22@@ -25,6 +20,11 @@
23 #010f DEO
24 BRK
25
26+@pass ( type read ptr* -> )
27+ POP2 POP2 ;dict/pass str/<print>
28+ #800f DEO
29+ BRK
30+
31 (
32 @|Utils )
33
34@@ -37,8 +37,9 @@
35 @|Data )
36
37 @expect [
38- 0262 0261 027a 030a 0271 0275 0278 040a
39- 0166 016f 016f 0162 0161 0172 010a 0400 ]
40+ 02 "a 02 "b 02 "c 03 0a 02 "d 02 "e 02 "f 04 0a
41+ 01 "g 01 "h 01 "i ]
42+ &end [ 04 0a ]
43
44 @dict
45 &pass "Console: 20 "pass 0a $1
M
makefile
+1,
-1
1@@ -11,7 +11,7 @@ test: bin/uxn11-debug tests
2 @ -bin/uxn11-debug -v
3 @ bin/uxn11-debug bin/opctest.rom
4 @ bin/uxn11-debug bin/system.rom
5- @ echo "foobar" | bin/uxn11-debug bin/console.rom "baz" "qux"
6+ @ printf "ghi" | bin/uxn11-debug bin/console.rom "abc" "def"
7 @ bin/uxn11-debug bin/file.rom
8 @ bin/uxn11-debug bin/datetime.rom
9 clean:
+2,
-2
1@@ -1285,7 +1285,7 @@ emu_run(void)
2 for(i = 0; i < n; i++)
3 console_input(coninp[i], CONSOLE_STD);
4 } else {
5- console_input(0, CONSOLE_END);
6+ console_input('\n', CONSOLE_END);
7 stdin_active = 0;
8 }
9 }
10@@ -1305,7 +1305,7 @@ main(int argc, char **argv)
11 {
12 int i = 1;
13 if(argc == 2 && argv[1][0] == '-' && argv[1][1] == 'v')
14- return !fprintf(stdout, "%s - Varvara Emulator, 15 Feb 2026.\n", argv[0]);
15+ return !fprintf(stdout, "%s - Varvara Emulator, 17 Feb 2026.\n", argv[0]);
16 else if(argc == 1)
17 return !fprintf(stdout, "usage: %s [-v] file.rom [args..]\n", argv[0]);
18 else if(!system_boot(argv[i++], argc > 2))