Compare commits

..

No commits in common. "99337665f6c1ca0f0e8b0f63320de00feec177c3" and "a14bb5b81a7b30a5135b458bad7a6942d9fdf6c3" have entirely different histories.

4 changed files with 149 additions and 409 deletions

View File

@ -83,8 +83,7 @@ static void
start_fork_pty(UxnSubprocess *child, int mode) start_fork_pty(UxnSubprocess *child, int mode)
{ {
int fd = -1; int fd = -1;
struct winsize ws = {23, 80, 8, 12}; // rows, cols, xps, ypx pid_t pid = forkpty(&fd, NULL, NULL, NULL);
pid_t pid = forkpty(&fd, NULL, NULL, &ws);
if(pid < 0) { /* failure */ if(pid < 0) { /* failure */
fprintf(stderr, "parent fork failure\n"); fprintf(stderr, "parent fork failure\n");
} else if(pid == 0) { /* child */ } else if(pid == 0) { /* child */

View File

@ -273,10 +273,7 @@ emu_run(Uxn *u, char *rom)
/* main loop */ /* main loop */
while(!u->dev[0x0f]) { while(!u->dev[0x0f]) {
for(i = 0; i < 4; i++) { if(poll(fds, 3, 1000) <= 0)
fds[i + 3].fd = get_child(i)->fd_out;
}
if(poll(fds, 7, 1000) <= 0)
continue; continue;
while(XPending(display)) while(XPending(display))
emu_event(u); emu_event(u);

View File

@ -1,259 +0,0 @@
&nul ( null )
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 7e c3 81 a5 81 bd 99 c3 7e 00 00 00 00 00 00
00 7e ff ff db ff c3 e7 ff 7e 00 00 00 00 00 00
00 00 44 ee fe fe fe 7c 38 10 00 00 00 00 00 00
00 10 38 7c fe fe 7c 38 10 00 00 00 00 00 00 00
00 18 3c 3c ff e7 e7 18 18 7e 00 00 00 00 00 00
00 18 3c 7e ff ff 7e 18 18 7e 00 00 00 00 00 00
00 00 00 00 3c 7e 7e 3c 00 00 00 00 00 00 00 00
ff ff ff ff c3 81 81 c3 ff ff ff ff 00 00 00 00
00 00 3c 7e 66 42 42 66 7e 3c 00 00 00 00 00 00
ff ff c3 81 99 bd bd 99 81 c3 ff ff 00 00 00 00
00 3e 0e 3a 72 f8 cc cc cc 78 00 00 00 00 00 00
00 3c 66 66 66 3c 18 7e 18 18 00 00 00 00 00 00
00 1f 19 19 1f 18 18 78 f8 70 00 00 00 00 00 00
00 7f 63 7f 63 63 63 67 e7 e6 c0 00 00 00 00 00
00 00 18 db 7e e7 e7 7e db 18 00 00 00 00 00 00
00 80 c0 e0 f8 fe f8 e0 c0 80 00 00 00 00 00 00
00 02 06 0e 3e fe 3e 0e 06 02 00 00 00 00 00 00
00 18 3c 7e 18 18 18 7e 3c 18 00 00 00 00 00 00
00 66 66 66 66 66 00 00 66 66 00 00 00 00 00 00
00 7f db db db 7b 1b 1b 1b 1b 00 00 00 00 00 00
00 7e 63 30 3c 66 66 3c 0c c6 7e 00 00 00 00 00
00 00 00 00 00 00 00 fe fe fe 00 00 00 00 00 00
00 18 3c 7e 18 18 18 7e 3c 18 7e 00 00 00 00 00
00 18 3c 7e 18 18 18 18 18 18 00 00 00 00 00 00
00 18 18 18 18 18 18 7e 3c 18 00 00 00 00 00 00
00 00 00 18 0c fe 0c 18 00 00 00 00 00 00 00 00
00 00 00 30 60 fe 60 30 00 00 00 00 00 00 00 00
00 00 00 00 c0 c0 c0 fe 00 00 00 00 00 00 00 00
00 00 00 24 66 ff 66 24 00 00 00 00 00 00 00 00
&rs ( record separator )
00 00 10 10 38 38 7c 7c fe fe 00 00 00 00 00 00
00 00 fe fe 7c 7c 38 38 10 10 00 00 00 00 00 00
&space ( space )
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 30 78 78 78 30 30 00 30 30 00 00 00 00 00 00
00 66 66 66 24 00 00 00 00 00 00 00 00 00 00 00
00 6c 6c fe 6c 6c 6c fe 6c 6c 00 00 00 00 00 00
30 30 7c c0 c0 78 0c 0c f8 30 30 00 00 00 00 00
00 00 00 c4 cc 18 30 60 cc 8c 00 00 00 00 00 00
00 70 d8 d8 70 fa de cc dc 76 00 00 00 00 00 00
00 30 30 30 60 00 00 00 00 00 00 00 00 00 00 00
00 0c 18 30 60 60 60 30 18 0c 00 00 00 00 00 00
00 60 30 18 0c 0c 0c 18 30 60 00 00 00 00 00 00
00 00 00 66 3c ff 3c 66 00 00 00 00 00 00 00 00
00 00 00 18 18 7e 18 18 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 38 38 60 00 00 00 00 00
00 00 00 00 00 fe 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 38 38 00 00 00 00 00 00
00 00 02 06 0c 18 30 60 c0 80 00 00 00 00 00 00
00 7c c6 ce de d6 f6 e6 c6 7c 00 00 00 00 00 00
00 10 30 f0 30 30 30 30 30 fc 00 00 00 00 00 00
00 78 cc cc 0c 18 30 60 cc fc 00 00 00 00 00 00
00 78 cc 0c 0c 38 0c 0c cc 78 00 00 00 00 00 00
00 0c 1c 3c 6c cc fe 0c 0c 1e 00 00 00 00 00 00
00 fc c0 c0 c0 f8 0c 0c cc 78 00 00 00 00 00 00
00 38 60 c0 c0 f8 cc cc cc 78 00 00 00 00 00 00
00 fe c6 c6 06 0c 18 30 30 30 00 00 00 00 00 00
00 78 cc cc cc 78 cc cc cc 78 00 00 00 00 00 00
00 78 cc cc cc 7c 18 18 30 70 00 00 00 00 00 00
00 00 00 38 38 00 00 38 38 00 00 00 00 00 00 00
00 00 00 38 38 00 00 38 38 18 30 00 00 00 00 00
00 0c 18 30 60 c0 60 30 18 0c 00 00 00 00 00 00
00 00 00 00 7e 00 7e 00 00 00 00 00 00 00 00 00
00 60 30 18 0c 06 0c 18 30 60 00 00 00 00 00 00
00 78 cc 0c 18 30 30 00 30 30 00 00 00 00 00 00
00 7c c6 c6 de de de c0 c0 7c 00 00 00 00 00 00
00 30 78 cc cc cc fc cc cc cc 00 00 00 00 00 00
00 fc 66 66 66 7c 66 66 66 fc 00 00 00 00 00 00
00 3c 66 c6 c0 c0 c0 c6 66 3c 00 00 00 00 00 00
00 f8 6c 66 66 66 66 66 6c f8 00 00 00 00 00 00
00 fe 62 60 64 7c 64 60 62 fe 00 00 00 00 00 00
00 fe 66 62 64 7c 64 60 60 f0 00 00 00 00 00 00
00 3c 66 c6 c0 c0 ce c6 66 3e 00 00 00 00 00 00
00 cc cc cc cc fc cc cc cc cc 00 00 00 00 00 00
00 78 30 30 30 30 30 30 30 78 00 00 00 00 00 00
00 1e 0c 0c 0c 0c cc cc cc 78 00 00 00 00 00 00
00 e6 66 6c 6c 78 6c 6c 66 e6 00 00 00 00 00 00
00 f0 60 60 60 60 62 66 66 fe 00 00 00 00 00 00
00 c6 ee fe fe d6 c6 c6 c6 c6 00 00 00 00 00 00
00 c6 c6 e6 f6 fe de ce c6 c6 00 00 00 00 00 00
00 38 6c c6 c6 c6 c6 c6 6c 38 00 00 00 00 00 00
00 fc 66 66 66 7c 60 60 60 f0 00 00 00 00 00 00
00 38 6c c6 c6 c6 ce de 7c 0c 1e 00 00 00 00 00
00 fc 66 66 66 7c 6c 66 66 e6 00 00 00 00 00 00
00 78 cc cc c0 70 18 cc cc 78 00 00 00 00 00 00
00 fc b4 30 30 30 30 30 30 78 00 00 00 00 00 00
00 cc cc cc cc cc cc cc cc 78 00 00 00 00 00 00
00 cc cc cc cc cc cc cc 78 30 00 00 00 00 00 00
00 c6 c6 c6 c6 d6 d6 6c 6c 6c 00 00 00 00 00 00
00 cc cc cc 78 30 78 cc cc cc 00 00 00 00 00 00
00 cc cc cc cc 78 30 30 30 78 00 00 00 00 00 00
00 fe ce 98 18 30 60 62 c6 fe 00 00 00 00 00 00
00 3c 30 30 30 30 30 30 30 3c 00 00 00 00 00 00
00 00 80 c0 60 30 18 0c 06 02 00 00 00 00 00 00
00 3c 0c 0c 0c 0c 0c 0c 0c 3c 00 00 00 00 00 00
10 38 6c c6 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00
30 30 18 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 78 0c 7c cc cc 76 00 00 00 00 00 00
00 e0 60 60 7c 66 66 66 66 dc 00 00 00 00 00 00
00 00 00 00 78 cc c0 c0 cc 78 00 00 00 00 00 00
00 1c 0c 0c 7c cc cc cc cc 76 00 00 00 00 00 00
00 00 00 00 78 cc fc c0 cc 78 00 00 00 00 00 00
00 38 6c 60 60 f8 60 60 60 f0 00 00 00 00 00 00
00 00 00 00 76 cc cc cc 7c 0c cc 78 00 00 00 00
00 e0 60 60 6c 76 66 66 66 e6 00 00 00 00 00 00
00 18 18 00 78 18 18 18 18 7e 00 00 00 00 00 00
00 0c 0c 00 3c 0c 0c 0c 0c cc cc 78 00 00 00 00
00 e0 60 60 66 6c 78 6c 66 e6 00 00 00 00 00 00
00 78 18 18 18 18 18 18 18 7e 00 00 00 00 00 00
00 00 00 00 fc d6 d6 d6 d6 c6 00 00 00 00 00 00
00 00 00 00 f8 cc cc cc cc cc 00 00 00 00 00 00
00 00 00 00 78 cc cc cc cc 78 00 00 00 00 00 00
00 00 00 00 dc 66 66 66 66 7c 60 f0 00 00 00 00
00 00 00 00 76 cc cc cc cc 7c 0c 1e 00 00 00 00
00 00 00 00 ec 6e 76 60 60 f0 00 00 00 00 00 00
00 00 00 00 78 cc 60 18 cc 78 00 00 00 00 00 00
00 00 20 60 fc 60 60 60 6c 38 00 00 00 00 00 00
00 00 00 00 cc cc cc cc cc 76 00 00 00 00 00 00
00 00 00 00 cc cc cc cc 78 30 00 00 00 00 00 00
00 00 00 00 c6 c6 d6 d6 6c 6c 00 00 00 00 00 00
00 00 00 00 c6 6c 38 38 6c c6 00 00 00 00 00 00
00 00 00 00 66 66 66 66 3c 0c 18 f0 00 00 00 00
00 00 00 00 fc 8c 18 60 c4 fc 00 00 00 00 00 00
00 1c 30 30 60 c0 60 30 30 1c 00 00 00 00 00 00
00 18 18 18 18 00 18 18 18 18 00 00 00 00 00 00
00 e0 30 30 18 0c 18 30 30 e0 00 00 00 00 00 00
00 73 da ce 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 10 38 6c c6 c6 fe 00 00 00 00 00 00 00
00 78 cc cc c0 c0 c0 cc cc 78 30 60 00 00 00 00
00 cc cc 00 cc cc cc cc cc 76 00 00 00 00 00 00
0c 18 30 00 78 cc fc c0 cc 78 00 00 00 00 00 00
30 78 cc 00 78 0c 7c cc cc 76 00 00 00 00 00 00
00 cc cc 00 78 0c 7c cc cc 76 00 00 00 00 00 00
c0 60 30 00 78 0c 7c cc cc 76 00 00 00 00 00 00
38 6c 6c 38 f8 0c 7c cc cc 76 00 00 00 00 00 00
00 00 00 00 78 cc c0 c0 cc 78 30 60 00 00 00 00
30 78 cc 00 78 cc fc c0 c0 7c 00 00 00 00 00 00
00 cc cc 00 78 cc fc c0 c0 7c 00 00 00 00 00 00
c0 60 30 00 78 cc fc c0 c0 7c 00 00 00 00 00 00
00 6c 6c 00 78 18 18 18 18 7e 00 00 00 00 00 00
10 38 6c 00 78 18 18 18 18 7e 00 00 00 00 00 00
60 30 18 00 78 18 18 18 18 7e 00 00 00 00 00 00
00 cc 00 30 78 cc cc fc cc cc 00 00 00 00 00 00
78 cc cc 78 78 cc cc fc cc cc 00 00 00 00 00 00
0c 18 00 fc c4 c0 f8 c0 c4 fc 00 00 00 00 00 00
00 00 00 00 fe 1b 7f d8 d8 ef 00 00 00 00 00 00
00 3e 78 d8 d8 fe d8 d8 d8 de 00 00 00 00 00 00
30 78 cc 00 78 cc cc cc cc 78 00 00 00 00 00 00
00 cc cc 00 78 cc cc cc cc 78 00 00 00 00 00 00
c0 60 30 00 78 cc cc cc cc 78 00 00 00 00 00 00
30 78 cc 00 cc cc cc cc cc 76 00 00 00 00 00 00
c0 60 30 00 cc cc cc cc cc 76 00 00 00 00 00 00
00 66 66 00 66 66 66 66 3c 0c 18 f0 00 00 00 00
00 cc 00 78 cc cc cc cc cc 78 00 00 00 00 00 00
cc 00 cc cc cc cc cc cc cc 78 00 00 00 00 00 00
00 00 00 00 78 cc dc ec cc 78 00 00 00 00 00 00
3c 66 60 60 60 fc 60 60 c0 fe 00 00 00 00 00 00
00 3a 6c ce d6 d6 d6 e6 6c b8 00 00 00 00 00 00
00 00 00 00 00 c6 6c 38 6c c6 00 00 00 00 00 00
0e 1b 18 18 7e 18 18 18 d8 70 00 00 00 00 00 00
0c 18 30 00 78 0c 7c cc cc 76 00 00 00 00 00 00
0c 18 30 00 78 18 18 18 18 7e 00 00 00 00 00 00
0c 18 30 00 78 cc cc cc cc 78 00 00 00 00 00 00
0c 18 30 00 cc cc cc cc cc 76 00 00 00 00 00 00
00 76 dc 00 f8 cc cc cc cc cc 00 00 00 00 00 00
76 dc 00 c6 e6 f6 de ce c6 c6 00 00 00 00 00 00
00 78 cc cc 7e 00 fe 00 00 00 00 00 00 00 00 00
00 78 cc cc 78 00 fe 00 00 00 00 00 00 00 00 00
00 30 30 00 30 60 c0 c0 cc 78 00 00 00 00 00 00
00 38 44 ba aa ba b2 aa 44 38 00 00 00 00 00 00
00 00 00 00 00 fc 0c 0c 0c 00 00 00 00 00 00 00
00 62 e6 6c 78 30 6e c3 86 0c 1f 00 00 00 00 00
00 63 e6 6c 78 37 6f db b3 3f 03 00 00 00 00 00
00 30 30 00 30 30 78 78 78 30 00 00 00 00 00 00
00 00 00 00 33 66 cc cc 66 33 00 00 00 00 00 00
00 00 00 00 cc 66 33 33 66 cc 00 00 00 00 00 00
24 92 49 24 92 49 24 92 49 24 92 49 00 00 00 00
55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 00 00 00 00
6d db b6 6d db b6 6d db b6 6d db b6 00 00 00 00
18 18 18 18 18 18 18 18 18 18 18 18 00 00 00 00
18 18 18 18 18 f8 18 18 18 18 18 18 00 00 00 00
0c 18 00 30 78 cc cc fc cc cc 00 00 00 00 00 00
78 cc 00 30 78 cc cc fc cc cc 00 00 00 00 00 00
60 30 00 30 78 cc cc fc cc cc 00 00 00 00 00 00
00 38 44 ba a2 a2 a2 ba 44 38 00 00 00 00 00 00
66 66 66 66 e6 06 06 e6 66 66 66 66 00 00 00 00
66 66 66 66 66 66 66 66 66 66 66 66 00 00 00 00
00 00 00 00 fe 06 06 e6 66 66 66 66 00 00 00 00
66 66 66 66 e6 06 06 fe 00 00 00 00 00 00 00 00
00 30 30 78 cc c0 c0 cc 78 30 30 00 00 00 00 00
cc cc cc cc 78 fc 30 fc 30 30 00 00 00 00 00 00
00 00 00 00 00 f8 18 18 18 18 18 18 00 00 00 00
18 18 18 18 18 1f 00 00 00 00 00 00 00 00 00 00
18 18 18 18 18 ff 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 ff 18 18 18 18 18 18 00 00 00 00
18 18 18 18 18 1f 18 18 18 18 18 18 00 00 00 00
00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00
18 18 18 18 18 ff 18 18 18 18 18 18 00 00 00 00
00 76 dc 00 78 0c 7c cc cc 76 00 00 00 00 00 00
76 dc 00 30 78 cc cc fc cc cc 00 00 00 00 00 00
66 66 66 66 67 60 60 7f 00 00 00 00 00 00 00 00
00 00 00 00 7f 60 60 67 66 66 66 66 00 00 00 00
66 66 66 66 e7 00 00 ff 00 00 00 00 00 00 00 00
00 00 00 00 ff 00 00 e7 66 66 66 66 00 00 00 00
66 66 66 66 67 60 60 67 66 66 66 66 00 00 00 00
00 00 00 00 ff 00 00 ff 00 00 00 00 00 00 00 00
66 66 66 66 e7 00 00 e7 66 66 66 66 00 00 00 00
00 00 00 00 00 c6 7c 6c 7c c6 00 00 00 00 00 00
cc 30 d8 0c 06 7e c6 c6 c6 7c 00 00 00 00 00 00
00 f8 6c 66 66 f6 66 66 6c f8 00 00 00 00 00 00
78 cc 00 fc c4 c0 f8 c0 c4 fc 00 00 00 00 00 00
00 cc 00 fc c4 c0 f8 c0 c4 fc 00 00 00 00 00 00
60 30 00 fc c4 c0 f8 c0 c4 fc 00 00 00 00 00 00
00 f0 30 30 30 fc 00 00 00 00 00 00 00 00 00 00
18 30 00 78 30 30 30 30 30 78 00 00 00 00 00 00
78 cc 00 78 30 30 30 30 30 78 00 00 00 00 00 00
00 cc 00 78 30 30 30 30 30 78 00 00 00 00 00 00
18 18 18 18 18 f8 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 1f 18 18 18 18 18 18 00 00 00 00
ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00
00 00 00 00 00 00 ff ff ff ff ff ff 00 00 00 00
00 18 18 18 18 00 18 18 18 18 00 00 00 00 00 00
60 30 00 78 30 30 30 30 30 78 00 00 00 00 00 00
ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
18 30 00 78 cc cc cc cc cc 78 00 00 00 00 00 00
00 78 cc cc d8 cc cc cc f8 c0 60 00 00 00 00 00
78 cc 00 78 cc cc cc cc cc 78 00 00 00 00 00 00
60 30 00 78 cc cc cc cc cc 78 00 00 00 00 00 00
00 76 dc 00 78 cc cc cc cc 78 00 00 00 00 00 00
76 dc 00 78 cc cc cc cc cc 78 00 00 00 00 00 00
00 00 00 00 66 66 66 66 66 7b 60 c0 00 00 00 00
00 00 e0 60 7c 66 66 7c 60 f0 00 00 00 00 00 00
00 f0 60 7c 66 66 66 7c 60 f0 00 00 00 00 00 00
18 30 00 cc cc cc cc cc cc 78 00 00 00 00 00 00
78 cc 00 cc cc cc cc cc cc 78 00 00 00 00 00 00
60 30 00 cc cc cc cc cc cc 78 00 00 00 00 00 00
06 0c 18 00 66 66 66 66 3c 0c 18 f0 00 00 00 00
18 30 00 cc cc cc 78 30 30 78 00 00 00 00 00 00
00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0c 18 30 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 fc 00 00 00 00 00 00 00 00 00 00
00 00 30 30 fc 30 30 00 fc 00 00 00 00 00 00 00
00 00 00 00 00 f8 00 00 f8 00 00 00 00 00 00 00
e0 33 66 3c f8 37 6f db b3 3f 03 00 00 00 00 00
00 7f db db db 7b 1b 1b 1b 1b 00 00 00 00 00 00
00 7e 63 30 3c 66 66 3c 0c c6 7e 00 00 00 00 00
00 00 30 30 00 fc 00 30 30 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 30 70 00 00 00 00
00 3c 66 66 66 3c 00 00 00 00 00 00 00 00 00 00
00 cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 18 00 00 00 00 00 00 00 00 00 00
00 30 70 30 30 78 00 00 00 00 00 00 00 00 00 00
00 78 0c 38 0c 78 00 00 00 00 00 00 00 00 00 00
00 78 0c 18 30 7c 00 00 00 00 00 00 00 00 00 00
00 00 00 fc fc fc fc fc fc 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

View File

@ -76,32 +76,15 @@
( ESC [ ? 1060 l -> unset legacy keyboard emulation ) ( ESC [ ? 1060 l -> unset legacy keyboard emulation )
( ESC [ ? 1061 h -> set VT220 keyboard emulation ) ( ESC [ ? 1061 h -> set VT220 keyboard emulation )
|00 @System [ ( special graphics [] changes 95-126 )
&vect $2 &expansion $2 &title $2 &metadata $2
&r $2 &g $2 &b $2 ]
|10 @Console [ |00 @System [ &vect $2 &expansion $2 &title $2 &metadata $2 &r $2 &g $2 &b $2 ]
&vect $2 &stdin $1 &pad1 $4 &type $1 |10 @Console [ &vect $2 &stdin $1 &exec $2 &mode $1 &dead $1 &exit $1 &stdout $1 &stderr $1 &child $1 ]
&stdout $1 &stderr $1 &proc-put $1 &pad2 $1 &param $2 &opts $1 &host-put $1 ] |20 @Screen [ &vect $2 &w $2 &h $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &px $1 &sprite $1 ]
|80 @Controller [ &vect $2 &button $1 &key $1 &fn $1 ]
|20 @Screen [ |90 @Mouse [ &vect $2 &x $2 &y $2 &state $1 &pad $3 &scrollx $2 &scrolly $2 ]
&vect $2 &w $2 &h $2 &auto $1 &pad $1 |a0 @File1 [ &vect $2 &ok $2 &stat $2 &del $1 &append $1 &name $2 &len $2 &r $2 &w $2 ]
&x $2 &y $2 &addr $2 &px $1 &sprite $1 ] |b0 @File2 [ &vect $2 &ok $2 &stat $2 &del $1 &append $1 &name $2 &len $2 &r $2 &w $2 ]
|80 @Controller [
&vect $2 &button $1 &key $1 &fn $1 ]
|90 @Mouse [
&vect $2 &x $2 &y $2 &state $1 &pad1 $1
&pad2 $2 &scrollx $2 &scrolly $2 &pad3 $2 ]
|a0 @File1 [
&vect $2 &ok $2 &stat $2 &del $1 &append $1
&name $2 &len $2 &r $2 &w $2 ]
|b0 @File2 [
&vect $2 &ok $2 &stat $2 &del $1 &append $1
&name $2 &len $2 &r $2 &w $2 ]
|0000 |0000
@tint $1 ( draw mode. 01=regular, 04=inverted ) @tint $1 ( draw mode. 01=regular, 04=inverted )
@ -137,11 +120,15 @@
@tcem $1 ( 01: cursor is visible, 00: cursor is invisible ) @tcem $1 ( 01: cursor is visible, 00: cursor is invisible )
@paste $1 ( 01: bracketed paste is on, 00: is off ) @paste $1 ( 01: bracketed paste is on, 00: is off )
( margins )
@margin-top $2
@margin-bot $2
( user configuration ) ( user configuration )
@debug $1 ( use debug log? ) @debug $1 ( use debug log? )
@show-banner $1 ( show banner on startup? ) @show-banner $1 ( show banner on startup? )
@visual-bell $1 ( flash visual bell? otherwise do nothing ) @visual-bell $1 ( use visual belL? 01: visual bell, 00: do nothing )
@border-pad $2 ( use border? should be 0000 or 0010 ) @border-pad $2 ( use border? must be either 0000 or 0010 )
|0100 |0100
( metadata ) ( metadata )
@ -151,13 +138,13 @@
( user configuration defaults ) ( user configuration defaults )
#00 .debug STZ #00 .debug STZ
#01 .show-banner STZ #01 .show-banner STZ
( #0010 .border-pad STZ2 )
#0000 .border-pad STZ2 #0000 .border-pad STZ2
#01 .visual-bell STZ #01 .visual-bell STZ
( 80 cols x 24 rows by default ) ( 80 cols x 24 rows by default )
#0018 .rows STZ2
#0050 .cols STZ2 #0050 .cols STZ2
#0018 DUP .rows STZ2 .margin-bot STZ2
#0000 .margin-top STZ2
( start cursor at origin - including border ) ( start cursor at origin - including border )
.border-pad LDZ2 .Screen/x DEO2 .border-pad LDZ2 .Screen/x DEO2
@ -175,28 +162,18 @@
;on-mouse .Mouse/vect DEO2 ( set up mouse callback ) ;on-mouse .Mouse/vect DEO2 ( set up mouse callback )
;on-read .Console/vect DEO2 ( set up stdin callback ) ;on-read .Console/vect DEO2 ( set up stdin callback )
setup-shell ( set up experimental subprocess support ) setup-subprocess ( set up experimental subprocess support )
reset-terminal ( initialize terminal state and settings ) reset-terminal ( initialize terminal state and settings )
setup-debugging ( set up debugging if requested ) setup-debugging ( set up debugging if requested )
draw-banner ( draw banner if requested ) draw-banner ( draw banner if requested )
BRK BRK
@env "TERM=ansi 00
( these only work with a patched uxnemu ) ( these only work with a patched uxnemu )
( on other emulators they should be no-ops ) ( on other emulators they should be no-ops )
@setup-shell ( -> ) @setup-subprocess ( -> )
( setenv 'TERM=ansi' ) ;shell .Console/exec DEO2 ( set up bash subprocess )
;env .Console/param DEO2 #80 .Console/mode DEO ( start bash subprocess )
#11 .Console/host-put DEO
( exec 'bash -i' )
#81 .Console/opts DEO
;shell .Console/param DEO2
#01 .Console/host-put DEO
( TODO: run stty to communicate terminal size? )
JMP2r JMP2r
@setup-debugging ( -> ) @setup-debugging ( -> )
@ -212,8 +189,7 @@
@reset-terminal ( -> ) @reset-terminal ( -> )
( set initial cursor ) ( set initial cursor )
#0000 .cur-x STZ2 #0000 DUP2 .cur-x STZ2 .cur-y STZ2
#0000 .cur-y STZ2
( confirm no buttons pressed yet ) ( confirm no buttons pressed yet )
#00 .lastkey STZ #00 .lastkey STZ
@ -222,8 +198,7 @@
update-dimensions update-dimensions
( set starting tint: reverse=0, bg=0, fg=2 ) ( set starting tint: reverse=0, bg=0, fg=2 )
#02 .attr STZ #02 .attr STZ update-tint
update-tint
( set initial modes ) ( set initial modes )
#00 .irm STZ ( insert and move right ) #00 .irm STZ ( insert and move right )
@ -231,11 +206,8 @@
#01 .tcem STZ ( show cursor ) #01 .tcem STZ ( show cursor )
#00 .paste STZ ( bracketed paste is off ) #00 .paste STZ ( bracketed paste is off )
( prepare for initial draw ) init-screen ( ; prepare for initial draw )
init-screen draw-border ( ; draw border )
( draw border )
.border-pad LDZ2 ORA ?draw-border
JMP2r JMP2r
@update-dimensions ( -> ) @update-dimensions ( -> )
@ -252,7 +224,7 @@
.rows LDZ2 #000c MUL2 ADD2 .Screen/h DEO2 .rows LDZ2 #000c MUL2 ADD2 .Screen/h DEO2
JMP2r JMP2r
@shell "bash 20 "-l 20 "-i 00 @shell "bash 00 "-i 00 00
@load-theme ( -> ) @load-theme ( -> )
;&path .File1/name DEO2 ;&path .File1/name DEO2
@ -311,13 +283,15 @@
( uses the existing .Screen/x and .Screen/y ) ( uses the existing .Screen/x and .Screen/y )
( returns them to their starting values when finished ) ( returns them to their starting values when finished )
@erase-fg-cell ( -> ) @erase-fg-cell ( -> )
#40 .Screen/sprite DEO ( ; s/s<-40 ) ;cp437/nul .Screen/addr DEO2 ( ; use nul character to erase )
#43 .Screen/sprite DEO ( ; s/s<-40 )
.Screen/y DEI2k STH2k ( zp^ y* [y*] ) .Screen/y DEI2k STH2k ( zp^ y* [y*] )
#0004 ADD2 ROT DEO2 ( [y*] ; s/y<-y+4 ) #0004 ADD2 ROT DEO2 ( [y*] ; s/y<-y+4 )
#40 .Screen/sprite DEO STH2r ( y* ; s/s<-40 ) #43 .Screen/sprite DEO STH2r ( y* ; s/s<-40 )
.Screen/y DEO2 JMP2r ( ; s/y<-y ) .Screen/y DEO2 JMP2r ( ; s/y<-y )
@draw-border ( -> ) @draw-border ( -> )
.border-pad LDZ2 ORA ?{ JMP2r }
;cp437/space .Screen/addr DEO2 ;cp437/space .Screen/addr DEO2
#04 .Screen/sprite #04 .Screen/sprite
#0000 draw-border/row #0000 draw-border/row
@ -409,21 +383,20 @@
( send ESC [ $c ) ( send ESC [ $c )
@arrow ( c^ -> ) @arrow ( c^ -> )
( .Console/w STH ) .Console/w STH
.Console/proc-put STH ( TODO: send ESC-$c in VT-52 mode )
( TODO: send ESC-O-$c in "cursor key mode set" )
#1b STHkr DEO LIT "[ STHkr DEO STHr DEO #1b STHkr DEO LIT "[ STHkr DEO STHr DEO
JMP2r JMP2r
@paste-from-buf ( size* -> ) @paste-from-buf ( size* -> )
;paste-buf SWP2 OVR2 ADD2 SWP2 ( limit* start* ) ;paste-buf SWP2 OVR2 ADD2 SWP2 ( limit* start* )
&loop ( limit* pos* ) &loop ( limit* pos* )
( LDAk .Console/w DEO INC2 ( limit* pos+1* ) ) LDAk .Console/w DEO INC2 ( limit* pos+1* )
LDAk .Console/proc-put DEO INC2 ( limit* pos+1* )
GTH2k ?&loop POP2 POP2 JMP2r GTH2k ?&loop POP2 POP2 JMP2r
@bracket-paste ( c^ -> ) @bracket-paste ( c^ -> )
( .Console/w STH ) .Console/w STH
.Console/proc-put STH
#1b STHkr DEO #1b STHkr DEO
LIT "[ STHkr DEO LIT "[ STHkr DEO
LIT "2 STHkr DEO LIT "2 STHkr DEO
@ -638,19 +611,16 @@
.Controller/key DEI .Controller/key DEI
DUP #08 NEQ ?&done DUP #08 NEQ ?&done
POP #7f ( send DEL instead of BS ) POP #7f ( send DEL instead of BS )
( &done .Console/w DEO BRK ) &done .Console/w DEO BRK
&done .Console/proc-put DEO BRK
@ctrl ( -> is-down? ) .Controller/button DEI #01 AND JMP2r @ctrl ( -> is-down? ) .Controller/button DEI #01 AND JMP2r
@alt ( -> is-down? ) .Controller/button DEI #02 AND JMP2r @alt ( -> is-down? ) .Controller/button DEI #02 AND JMP2r
( alt-XYZ emits ESC and then emits XYZ ) ( alt-XYZ emits ESC and then emits XYZ )
@on-alt-key ( -> BRK ) @on-alt-key ( -> BRK )
( #1b .Console/w DEO ) #1b .Console/w DEO
#1b .Console/proc-put DEO
ctrl ?on-ctrl-key ctrl ?on-ctrl-key
( .Controller/key DEI .Console/w DEO BRK ) .Controller/key DEI .Console/w DEO BRK
.Controller/key DEI .Console/proc-put DEO BRK
( control seqs: ) ( control seqs: )
( ctrl-sp -> 00 ) ( ctrl-sp -> 00 )
@ -685,12 +655,10 @@
&rs #1e !&done &rs #1e !&done
&us #1f !&done &us #1f !&done
&c1 LIT "@ SUB &c1 LIT "@ SUB
( &done .Console/w DEO BRK ) &done .Console/w DEO BRK
&done .Console/proc-put DEO BRK
@on-read-priv ( -> BRK ) @on-read-priv ( -> BRK )
.Console/type DEI #21 EQU ?{ BRK } .Console/r DEI
.Console/stdin DEI
DUP LIT "; EQU ?next-arg DUP LIT "; EQU ?next-arg
DUP LIT "0 LTH ?end-arg-priv DUP LIT "0 LTH ?end-arg-priv
DUP LIT "9 GTH ?end-arg-priv DUP LIT "9 GTH ?end-arg-priv
@ -700,8 +668,7 @@
POP ;on-read-priv .Console/vect DEO2 BRK POP ;on-read-priv .Console/vect DEO2 BRK
@on-read-csi ( -> BRK ) @on-read-csi ( -> BRK )
.Console/type DEI #21 EQU ?{ BRK } .Console/r DEI
.Console/stdin DEI
DUP LIT "? EQU ?start-priv DUP LIT "? EQU ?start-priv
DUP LIT "; EQU ?next-arg DUP LIT "; EQU ?next-arg
DUP LIT "0 LTH ?end-arg DUP LIT "0 LTH ?end-arg
@ -709,8 +676,7 @@
!add-to-arg !add-to-arg
@on-read-osc ( -> BRK ) @on-read-osc ( -> BRK )
.Console/type DEI #21 EQU ?{ BRK } .Console/r DEI
.Console/stdin DEI
DUP #07 ( bell ) EQU ?&end-osc DUP #07 ( bell ) EQU ?&end-osc
#9c ( esc-\ ) EQU ?&end-osc BRK #9c ( esc-\ ) EQU ?&end-osc BRK
&end-osc ;on-read .Console/vect DEO2 BRK &end-osc ;on-read .Console/vect DEO2 BRK
@ -790,41 +756,51 @@
@end-arg ( c^ -> BRK ) @end-arg ( c^ -> BRK )
;on-read .Console/vect DEO2 ;on-read .Console/vect DEO2
DUP debug-csi DUP debug-csi
DUP LIT "@ EQU ?exec-ich ( insert blank characters ) DUP LIT "@ EQU ?exec-ich ( ICH: insert blank characters )
DUP LIT "A EQU ?exec-cuu ( up ) ( TODO ($n-sp-@) SL: shift left $n cols )
DUP LIT "B EQU ?exec-cud ( down ) DUP LIT "A EQU ?exec-cuu ( CUU: up )
DUP LIT "C EQU ?exec-cuf ( forward ) ( TODO ($n-sp-A) SR: shift right $n cols )
DUP LIT "D EQU ?exec-cub ( back ) DUP LIT "B EQU ?exec-cud ( CUD: down )
DUP LIT "E EQU ?exec-cnl ( next line $n times ) DUP LIT "C EQU ?exec-cuf ( CUF: forward )
DUP LIT "F EQU ?exec-cpl ( prev line $n times ) DUP LIT "D EQU ?exec-cub ( CUB: back )
DUP LIT "G EQU ?exec-cha ( move cursor to col ) DUP LIT "E EQU ?exec-cnl ( CNL: next line $n times )
DUP LIT "H EQU ?exec-cup ( move cursor ) DUP LIT "F EQU ?exec-cpl ( CPL: prev line $n times )
DUP LIT "I EQU ?exec-cht ( forward by tab stops ) DUP LIT "G EQU ?exec-cha ( CHA: move cursor to abs col )
DUP LIT "J EQU ?exec-ed ( erase screen ) DUP LIT "H EQU ?exec-cup ( CUP: move cursor [row;col] )
DUP LIT "K EQU ?exec-el ( erase line ) DUP LIT "I EQU ?exec-cht ( CHT: forward by tab stops )
DUP LIT "L EQU ?exec-il ( insert blank lines ) DUP LIT "J EQU ?exec-ed ( ED: erase display )
DUP LIT "M EQU ?exec-dl ( delete n lines ) DUP LIT "K EQU ?exec-el ( EL: erase line )
DUP LIT "P EQU ?exec-dch ( delete n chars ) DUP LIT "L EQU ?exec-il ( IL: insert $n blank lines )
DUP LIT "S EQU ?exec-su ( scroll up ) DUP LIT "M EQU ?exec-dl ( DL: delete $n lines )
DUP LIT "T EQU ?exec-sd ( scroll down ) DUP LIT "P EQU ?exec-dch ( DCH: delete n chars )
DUP LIT "X EQU ?exec-ech ( erase $n characters ) DUP LIT "S EQU ?exec-su ( SU: scroll up )
DUP LIT "Z EQU ?exec-cbt ( backward by tab stops ) DUP LIT "T EQU ?exec-sd ( SD: scroll down )
DUP LIT "` EQU ?exec-hpa ( char pos abs col=$n ) DUP LIT "X EQU ?exec-ech ( ECH: erase $n characters )
DUP LIT "a EQU ?exec-hpr ( char pos rel col=$n ) DUP LIT "Z EQU ?exec-cbt ( CBT: backward by tab stops )
DUP LIT "d EQU ?exec-vpa ( move cursor to row ) DUP LIT "` EQU ?exec-hpa ( HPA: char pos abs col=$n )
DUP LIT "e EQU ?exec-vpr ( line pos rel row+=$n ) DUP LIT "a EQU ?exec-hpr ( HPR: char pos rel col=$n )
DUP LIT "g EQU ?exec-tbc ( clear tab stops ) ( TODO: b - REP: repeat previous graphic char $n times )
DUP LIT "h EQU ?exec-sm ( set mode ) ( TODO: c - DA: send device attributes )
DUP LIT "l EQU ?exec-rm ( reset mode ) DUP LIT "d EQU ?exec-vpa ( VPA: move cursor to row )
DUP LIT "m EQU ?exec-sgr ( set graphical rendering ) DUP LIT "e EQU ?exec-vpr ( VPR: line pos rel row+=$n )
DUP LIT "n EQU ?exec-dsr ( device status reports ) ( TODO: $r;$c f - HVP: horizontal/vertical position )
DUP LIT "r EQU ?exec-set-scrolling-region DUP LIT "g EQU ?exec-tbc ( TBC: clear tab stops )
DUP LIT "s EQU ?exec-scosc ( saved current cursor position ) DUP LIT "h EQU ?exec-sm ( SM: set mode )
DUP LIT "u EQU ?exec-scorc ( restore saved cursor position ) ( TODO: ?-$n-h - DECSET: set dec options )
DUP LIT "l EQU ?exec-rm ( RM: reset mode )
( TODO: ?-$n-l - DECRST: reset dec options )
DUP LIT "m EQU ?exec-sgr ( SGR: set graphical rendering )
DUP LIT "n EQU ?exec-dsr ( DSR: device status reports )
( TODO: ?-$n-n - dec device status )
( TODO: $n-q - DECLL: load leds )
DUP LIT "r EQU ?exec-set-scrolling-region ( [$top;$bot] DECSTM: set scrolling reg )
DUP LIT "s EQU ?exec-scosc ( SCOSC: saved current cursor position )
DUP LIT "u EQU ?exec-scorc ( SCORC: restore saved cursor position )
( = 0 C - normal cursor ) ( = 0 C - normal cursor )
( = 1 C - bold cursor ) ( = 1 C - bold cursor )
debug-csi BRK debug-csi BRK
( TODO )
@exec-set-scrolling-region ( c^ -> BRK ) POP BRK @exec-set-scrolling-region ( c^ -> BRK ) POP BRK
@exec-tbc ( c^ -> BRK ) POP BRK @exec-tbc ( c^ -> BRK ) POP BRK
@ -838,9 +814,10 @@
draw-cursor BRK draw-cursor BRK
@mode-addr ( n* -> zp^ ) @mode-addr ( n* -> zp^ )
DUP2 #0004 NEQ2 ?&not-irm POP2 .irm JMP2r DUP2 #0004 NEQ2 ?{ POP2 .irm JMP2r } ( TODO: permanently reset )
&not-irm DUP2 #0007 NEQ2 ?&not-awm POP2 .awm JMP2r DUP2 #0007 NEQ2 ?{ POP2 .awm JMP2r } ( TODO: rename to DECAWM )
&not-awm POP2 .ignored JMP2r ( TODO: 20 is LNM: line feed/newline mode )
POP2 .ignored JMP2r
@sm ( n* -> ) mode-addr #01 SWP STZ JMP2r @sm ( n* -> ) mode-addr #01 SWP STZ JMP2r
@rm ( n* -> ) mode-addr #00 SWP STZ JMP2r @rm ( n* -> ) mode-addr #00 SWP STZ JMP2r
@ -911,16 +888,12 @@
@dsr ( n* -> ) @dsr ( n* -> )
#0006 NEQ2 ?&done #0006 NEQ2 ?&done
( #1b .Console/w DEO ) #1b .Console/w DEO
#1b .Console/proc-put DEO LIT "[ .Console/w DEO
( LIT "[ .Console/w DEO )
LIT "[ .Console/proc-put DEO
.cur-y LDZ2 INC2 emit-dec2 .cur-y LDZ2 INC2 emit-dec2
( LIT "; .Console/w DEO ) LIT "; .Console/w DEO
LIT "; .Console/proc-put DEO
.cur-x LDZ2 INC2 emit-dec2 .cur-x LDZ2 INC2 emit-dec2
( LIT "R .Console/w DEO ) LIT "R .Console/w DEO
LIT "R .Console/proc-put DEO
&done BRK &done BRK
@cnl ( n* -> ) clear-cursor #0000 .cur-x STZ2 !down-n @cnl ( n* -> ) clear-cursor #0000 .cur-x STZ2 !down-n
@ -990,21 +963,27 @@
JMP2r JMP2r
@on-read-esc ( -> BRK ) @on-read-esc ( -> BRK )
.Console/type DEI #21 EQU ?{ BRK } .Console/r DEI
.Console/stdin DEI
DUP debug-esc DUP debug-esc
DUP LIT "D EQU ?exec-ind &after
DUP LIT "E EQU ?exec-nel ( TODO: SP-F, SP-G, SP-L, SP-M, SP-N )
DUP LIT "H EQU ?exec-hts ( TODO: #-3, #-4, #-5, #-6, #-8 )
DUP LIT "M EQU ?exec-ri ( TODO: %-@, %-G )
DUP LIT "P EQU ?exec-dcs DUP LIT "D EQU ?exec-ind ( IND: index )
DUP LIT "[ EQU ?start-csi DUP LIT "E EQU ?exec-nel ( NEL: next line )
DUP LIT "] EQU ?start-osc DUP LIT "H EQU ?exec-hts ( HTS: tab set )
DUP LIT "c EQU ?exec-ris DUP LIT "M EQU ?exec-ri ( RI: reverse index )
DUP LIT "P EQU ?exec-dcs ( DCS: device control string )
DUP LIT "[ EQU ?start-csi ( CSI: control sequence introducer )
DUP LIT "] EQU ?start-osc ( OSC: operating system command )
DUP LIT "c EQU ?exec-ris ( RIS: full reset )
DUP LIT "( EQU ?start-charset DUP LIT "( EQU ?start-charset
DUP LIT ") EQU ?start-charset DUP LIT ") EQU ?start-charset
DUP LIT "7 EQU ?&skip ( save cursor ) DUP LIT "7 EQU ?&skip ( DECSC: save cursor )
DUP LIT "8 EQU ?&skip ( restore cursor ) DUP LIT "8 EQU ?&skip ( DECRC: restore cursor )
DUP LIT "> EQU ?&skip ( DECKPNM: normal keypad )
DUP LIT "~ EQU ?&skip ( LS1R: invoke G1 charset as GR )
DUP LIT "# EQU ?&skip ( TODO: DECALN, fill screen with Es )
debug-esc debug-esc
;on-read .Console/vect DEO2 ;on-read .Console/vect DEO2
!on-read !on-read
@ -1024,10 +1003,10 @@
;on-read .Console/vect DEO2 ;on-read .Console/vect DEO2
BRK BRK
( '(' = designate G0 charset ) ( preceeded by '(' [G0] or ')' [G1] )
( ')' = designate G1 charset ) ( "A" -> UK )
( '*' = designate G2 charset ) ( "B" -> USASCII )
( '+' = designate G3 charset ) ( "0" -> DEC special graphics, line drawing )
@start-charset ( c^ -> BRK ) @start-charset ( c^ -> BRK )
POP ;on-read-skip .Console/vect DEO2 BRK POP ;on-read-skip .Console/vect DEO2 BRK
@ -1037,9 +1016,12 @@
@start-osc ( c^ -> BRK ) @start-osc ( c^ -> BRK )
POP reset-args ;on-read-osc .Console/vect DEO2 BRK POP reset-args ;on-read-osc .Console/vect DEO2 BRK
( TODO: 8-bit input not ready for prime time yet )
@on-read ( -> BRK ) @on-read ( -> BRK )
.Console/type DEI #21 EQU ?{ BRK } .Console/r DEI ( DUP #7f GTH ?read-8bit ) read BRK
.Console/stdin DEI read BRK
@read-8bit ( c^ -> BRK )
DUP debug-esc #80 SUB !on-read-esc/after
@read ( c^ -> ) @read ( c^ -> )
DUP debug-read DUP debug-read
@ -1055,21 +1037,25 @@
clear-cursor !forward clear-cursor !forward
@read-ctrl ( c^ -> ) @read-ctrl ( c^ -> )
DUP #05 EQU ?&skip ( ENQ - return terminal status )
DUP #07 EQU ?read-bel DUP #07 EQU ?read-bel
DUP #08 EQU ?read-bs DUP #08 EQU ?read-bs
DUP #09 EQU ?read-tab DUP #09 EQU ?read-tab ( HT )
DUP #0a EQU ?read-lf DUP #0a EQU ?read-lf ( NL - LF )
DUP #0b EQU ?read-lf DUP #0b EQU ?read-lf ( VT - treated as LF )
DUP #0c EQU ?read-lf DUP #0c EQU ?read-lf ( FF - treated as LF )
DUP #0d EQU ?read-cr DUP #0d EQU ?read-cr ( CR )
( DUP #0e EQU ?&skip ( TODO: SO - shift out; G0 charset ) )
( DUP #0f EQU ?&skip ( TODO: SI - shift in; G1 charset ) )
DUP #1b EQU ?read-esc DUP #1b EQU ?read-esc
POP JMP2r &skip POP JMP2r
@read-bel ( 07 -> ) @read-bel ( 07 -> )
POP .visual-bell LDZ #00 EQU ?&done POP .visual-bell LDZ #00 EQU ?&done
#06 .flash STZ #01 .dirty STZ #06 .flash STZ #01 .dirty STZ
&done JMP2r &done JMP2r
( TODO: handle reverse wrap-around and dec auto-wrap )
@read-bs ( 08 -> ) @read-bs ( 08 -> )
POP clear-cursor #0001 !back-n POP clear-cursor #0001 !back-n
@ -1079,6 +1065,7 @@
@read-del ( 7f -> ) @read-del ( 7f -> )
POP JMP2r POP JMP2r
( TODO: respect tab stops )
@read-tab ( 09 -> ) @read-tab ( 09 -> )
POP POP
.cur-x LDZ2 ( x* ) .cur-x LDZ2 ( x* )
@ -1104,6 +1091,8 @@
@read-lf ( 0a -> ) @read-lf ( 0a -> )
POP !lf POP !lf
( TODO: cur-wrap machinery not vt100 compliant. )
( cursor should stay on previous line normally )
@lf ( -> ) @lf ( -> )
.cur-wrap LDZ ?&skip clear-cursor down-or-scroll &skip JMP2r .cur-wrap LDZ ?&skip clear-cursor down-or-scroll &skip JMP2r
@ -1335,7 +1324,7 @@
&name "determ 0a &name "determ 0a
&details "ansi 20 "terminal 20 "emulator 0a &details "ansi 20 "terminal 20 "emulator 0a
&author "by 20 "d_m 0a &author "by 20 "d_m 0a
&date "3 20 "jan 20 2023 00 &date "13 20 "nov 20 "2023 00
02 02
( device mask ) 41 0d07 ( device mask ) 41 0d07
( 24x24 icon ) 83 =icon-2-bit ( 24x24 icon ) 83 =icon-2-bit
@ -1344,9 +1333,9 @@
0d 0a 0d 0a
20 20 c9 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd bb 0d 0a 20 20 c9 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd bb 0d 0a
20 20 ba 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ba 0d 0a 20 20 ba 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ba 0d 0a
20 20 ba 20 20 "d "e "t "e "r "m 20 20 "v "1 "0 20 20 ba 0d 0a 20 20 ba 20 20 "d "e "t "e "r "m 20 20 "v "1 "1 20 20 ba 0d 0a
20 20 ba 20 20 20 20 "b "y 20 "d "_ "m 20 20 20 20 20 ba 0d 0a 20 20 ba 20 20 20 20 "b "y 20 "d "_ "m 20 20 20 20 20 ba 0d 0a
20 20 ba 20 20 "1 "8 20 "m "a "r 20 "2 "0 "2 "3 20 20 ba 0d 0a 20 20 ba 20 20 "1 "3 20 "n "o "v 20 "2 "0 "2 "3 20 20 ba 0d 0a
20 20 ba 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ba 0d 0a 20 20 ba 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ba 0d 0a
20 20 c8 cd cd cb cd cd cd cd cd cd cd cd cd cb cd cd bc 0d 0a 20 20 c8 cd cd cb cd cd cd cd cd cd cd cd cd cb cd cd bc 0d 0a
20 20 c9 cb cb ce cb cb cb cb cb cb cb cb cb ce cb cb bb 0d 0a 20 20 c9 cb cb ce cb cb cb cb cb cb cb cb cb ce cb cb bb 0d 0a
@ -1368,5 +1357,19 @@
@paste-buf $0780 ( max 80 x 24 characters ) @paste-buf $0780 ( max 80 x 24 characters )
@paste-pos $2 @paste-pos $2
( TODO: tab stops )
( state )
@setup
&alternate-keypad-mode 00 ( 00 numeric [DECKPNM], 01 application [DECKPAM] )
&ansi-vt52 00 ( DECANM; 00 ansi, 01 vt-52 )
&chars-per-line 00 ( DECCOLM; 00 80, 01 132 )
&cursor-key-modes 00 ( DECCKM )
&new-line 00 ( LNM; 00 return=CR, return=CRLF; ignored by IND/NEL )
&origin-mode 00 ( DECOM; )
&screen 00 ( DECSCNM; 00 normal, 01 reverse video )
&wraparound 00 ( DECAWM; right margin 00 replace, 01 next line/scroll )
&3-shifted "B ( SCS; character set selected; B is ASCII )
( store tint+char for each screen position ) ( store tint+char for each screen position )
@cells ( width x height x 2 bytes ) @cells ( width x height x 2 bytes )