commit 5aa2cca
Devine Lu Linvega
·
2025-04-12 23:49:51 +0000 UTC
parent 00154db
Removed instance of uxnasm
30 files changed,
+201,
-4880
M
makefile
+0,
-226
1@@ -1,226 +0,0 @@
2-#undef _POSIX_C_SOURCE
3-#define _POSIX_C_SOURCE 200112L
4-
5-#include <signal.h>
6-#include <stdio.h>
7-#include <stdlib.h>
8-#include <sys/select.h>
9-#include <sys/wait.h>
10-#include <unistd.h>
11-
12-#ifdef __linux
13-#include <pty.h>
14-#endif
15-
16-#ifdef __NetBSD__
17-#include <sys/ioctl.h>
18-#include <util.h>
19-#endif
20-
21-#include "../uxn.h"
22-#include "console.h"
23-
24-/*
25-Copyright (c) 2022-2023 Devine Lu Linvega, Andrew Alderwick
26-
27-Permission to use, copy, modify, and distribute this software for any
28-purpose with or without fee is hereby granted, provided that the above
29-copyright notice and this permission notice appear in all copies.
30-
31-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32-WITH REGARD TO THIS SOFTWARE.
33-*/
34-
35-/* process */
36-static char *fork_args[32];
37-static int child_mode;
38-static int pty_fd;
39-static int to_child_fd[2];
40-static int from_child_fd[2];
41-static int saved_in;
42-static int saved_out;
43-static pid_t child_pid;
44-struct winsize ws = {24, 80, 8, 12};
45-
46-static void
47-parse_args(Uint8 *d)
48-{
49- Uint8 *port_addr = d + 0x3;
50- int addr = PEEK2(port_addr);
51- char *pos = (char *)&uxn.ram[addr];
52- int i = 0;
53- do {
54- fork_args[i++] = pos;
55- while(*pos != 0) pos++;
56- pos++;
57- } while(*pos != '\0');
58- fork_args[i] = NULL;
59-}
60-
61-/* call after we're sure the process has exited */
62-static void
63-clean_after_child(void)
64-{
65- child_pid = 0;
66- if(child_mode >= 0x80) {
67- close(pty_fd);
68- dup2(saved_in, 0);
69- dup2(saved_out, 1);
70- } else {
71- if(child_mode & 0x01) {
72- close(to_child_fd[1]);
73- dup2(saved_out, 1);
74- }
75- if(child_mode & 0x06) {
76- close(from_child_fd[0]);
77- dup2(saved_in, 0);
78- }
79- }
80- child_mode = 0;
81- saved_in = -1;
82- saved_out = -1;
83-}
84-
85-int
86-console_input(Uint8 c, int type)
87-{
88- uxn.dev[0x12] = c;
89- uxn.dev[0x17] = type;
90- return uxn_eval(PEEK2(&uxn.dev[0x10]));
91-}
92-
93-void
94-console_listen(int i, int argc, char **argv)
95-{
96- for(; i < argc; i++) {
97- char *p = argv[i];
98- while(*p) console_input(*p++, CONSOLE_ARG);
99- console_input('\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA);
100- }
101-}
102-
103-static void
104-start_fork_pty(Uint8 *d)
105-{
106- int fd = -1;
107- pid_t pid = forkpty(&fd, NULL, NULL, NULL);
108- if(pid < 0) { /* failure */
109- d[0x6] = 0xff;
110- fprintf(stderr, "fork failure\n");
111- } else if(pid == 0) { /* child */
112- setenv("TERM", "ansi", 1);
113- execvp(fork_args[0], fork_args);
114- d[0x6] = 0xff;
115- fprintf(stderr, "exec failure\n");
116- } else { /*parent*/
117- child_pid = pid;
118- pty_fd = fd;
119- ioctl(fd, TIOCSWINSZ, &ws);
120- saved_in = dup(0);
121- saved_out = dup(1);
122- dup2(fd, 0);
123- dup2(fd, 1);
124- }
125-}
126-
127-static void
128-start_fork_pipe(Uint8 *d)
129-{
130- pid_t pid;
131- if(child_mode & 0x01) {
132- /* parent writes to child's stdin */
133- if(pipe(to_child_fd) == -1) {
134- d[0x6] = 0xff;
135- fprintf(stderr, "pipe error: to child\n");
136- return;
137- }
138- }
139- if(child_mode & 0x06) {
140- /* parent reads from child's stdout and/or stderr */
141- if(pipe(from_child_fd) == -1) {
142- d[0x6] = 0xff;
143- fprintf(stderr, "pipe error: from child\n");
144- return;
145- }
146- }
147- pid = fork();
148- if(pid < 0) { /* failure */
149- d[0x6] = 0xff;
150- fprintf(stderr, "fork failure\n");
151- } else if(pid == 0) { /* child */
152- if(child_mode & 0x01) {
153- dup2(to_child_fd[0], 0);
154- close(to_child_fd[1]);
155- }
156- if(child_mode & 0x06) {
157- if(child_mode & 0x02) dup2(from_child_fd[1], 1);
158- if(child_mode & 0x04) dup2(from_child_fd[1], 2);
159- close(from_child_fd[0]);
160- }
161- execvp(fork_args[0], fork_args);
162- d[0x6] = 0xff;
163- fprintf(stderr, "exec failure\n");
164- } else { /*parent*/
165- child_pid = pid;
166- if(child_mode & 0x01) {
167- saved_out = dup(1);
168- dup2(to_child_fd[1], 1);
169- close(to_child_fd[0]);
170- }
171- if(child_mode & 0x06) {
172- saved_in = dup(0);
173- dup2(from_child_fd[0], 0);
174- close(from_child_fd[1]);
175- }
176- }
177-}
178-
179-static void
180-kill_child(Uint8 *d, int options)
181-{
182- int wstatus;
183- if(child_pid) {
184- kill(child_pid, 9);
185- if(waitpid(child_pid, &wstatus, options)) {
186- d[0x6] = 1;
187- d[0x7] = WEXITSTATUS(wstatus);
188- clean_after_child();
189- }
190- }
191-}
192-
193-static void
194-start_fork(Uint8 *d)
195-{
196- fflush(stderr);
197- kill_child(d, 0);
198- child_mode = d[0x5];
199- parse_args(d);
200- if(child_mode >= 0x80)
201- start_fork_pty(d);
202- else
203- start_fork_pipe(d);
204-}
205-
206-Uint8
207-console_dei(Uint8 addr)
208-{
209- Uint8 port = addr & 0x0f, *d = &uxn.dev[addr & 0xf0];
210- switch(port) {
211- case 0x6:
212- case 0x7: kill_child(d, WNOHANG);
213- }
214- return d[port];
215-}
216-
217-void
218-console_deo(Uint8 addr)
219-{
220- FILE *fd;
221- switch(addr) {
222- case 0x15: /* Console/dead */ start_fork(&uxn.dev[0x10]); break;
223- case 0x16: /* Console/exit*/ kill_child(&uxn.dev[0x10], 0); break;
224- case 0x18: fd = stdout, fputc(uxn.dev[0x18], fd), fflush(fd); break;
225- case 0x19: fd = stderr, fputc(uxn.dev[0x19], fd), fflush(fd); break;
226- }
227-}
+0,
-20
1@@ -1,20 +0,0 @@
2-/*
3-Copyright (c) 2021 Devine Lu Linvega, Andrew Alderwick
4-
5-Permission to use, copy, modify, and distribute this software for any
6-purpose with or without fee is hereby granted, provided that the above
7-copyright notice and this permission notice appear in all copies.
8-
9-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10-WITH REGARD TO THIS SOFTWARE.
11-*/
12-
13-#define CONSOLE_STD 0x1
14-#define CONSOLE_ARG 0x2
15-#define CONSOLE_EOA 0x3
16-#define CONSOLE_END 0x4
17-
18-int console_input(Uint8 c, int type);
19-void console_listen(int i, int argc, char **argv);
20-Uint8 console_dei(Uint8 addr);
21-void console_deo(Uint8 addr);
+0,
-162
1@@ -1,162 +0,0 @@
2-( Controller: Buttons should highlight on press and display the button and key bytes. )
3-
4-|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1
5-|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
6-|80 @Controller &vector $2 &button $1 &key $1
7-
8-|0000
9-
10- @center &x $2 &y $2
11- @frame &w $2 &h $2 &x0 $2 &y0 $2 &x1 $2 &y1 $2
12-
13-|0100
14-
15-@on-reset ( -> )
16- ( | theme )
17- #2fff .System/r DEO2
18- #2f0f .System/g DEO2
19- #2f0f .System/b DEO2
20- ( | find center )
21- .Screen/width DEI2 #01 SFT2 .center/x STZ2
22- .Screen/height DEI2 #01 SFT2 .center/y STZ2
23- ( | place controller )
24- #0068 .frame/w STZ2
25- #0030 .frame/h STZ2
26- .center/x LDZ2 .frame/w LDZ2 #01 SFT2 SUB2 .frame/x0 STZ2
27- .center/y LDZ2 .frame/h LDZ2 #01 SFT2 SUB2 .frame/y0 STZ2
28- .frame/x0 LDZ2 .frame/w LDZ2 ADD2 .frame/x1 STZ2
29- .frame/y0 LDZ2 .frame/h LDZ2 ADD2 .frame/y1 STZ2
30- ( | vectors )
31- ;on-button .Controller/vector DEO2
32- ( | frame )
33- .frame/x0 LDZ2 .frame/y0 LDZ2 .frame/x1 LDZ2 .frame/y1 LDZ2 #03 <line-rect>
34- <draw-controller>
35- BRK
36-
37-@on-button ( -> )
38- <draw-controller>
39- ( | print stack on start button )
40- [ LIT2 08 -Controller/button ] DEI NEQ ?{ #010e DEO }
41- BRK
42-
43-(
44-@|drawing )
45-
46-@<draw-controller> ( -- )
47- .Controller/button DEI STH
48- ( | d-pad )
49- .frame/x0 LDZ2 #0010 ADD2 .Screen/x DEO2
50- .frame/y0 LDZ2 #0010 ADD2 .Screen/y DEO2
51- ;dpad-up-icn .Screen/addr DEO2
52- #03 STHkr #04 SFT #01 AND SUB .Screen/sprite DEO
53- .Screen/y DEI2 #0010 ADD2 .Screen/y DEO2
54- ;dpad-down-icn .Screen/addr DEO2
55- #03 STHkr #05 SFT #01 AND SUB .Screen/sprite DEO
56- .Screen/y DEI2 #0008 SUB2 .Screen/y DEO2
57- .Screen/x DEI2 #0008 SUB2 .Screen/x DEO2
58- ;dpad-left-icn .Screen/addr DEO2
59- #03 STHkr #06 SFT #01 AND SUB .Screen/sprite DEO
60- .Screen/x DEI2 #0010 ADD2 .Screen/x DEO2
61- ;dpad-right-icn .Screen/addr DEO2
62- #03 STHkr #07 SFT #01 AND SUB .Screen/sprite DEO
63- .Screen/x DEI2 #0008 SUB2 .Screen/x DEO2
64- ;fill-icn .Screen/addr DEO2
65- [ LIT2 03 -Screen/sprite ] DEO
66- ( | options )
67- .center/y LDZ2 #0009 ADD2 .Screen/y DEO2
68- .center/x LDZ2 #0009 SUB2 .Screen/x DEO2
69- ;option-icn .Screen/addr DEO2
70- #03 STHkr #03 SFT #01 AND SUB .Screen/sprite DEO
71- .center/x LDZ2 #0004 ADD2 .Screen/x DEO2
72- ;option-icn .Screen/addr DEO2
73- #03 STHkr #02 SFT #01 AND SUB .Screen/sprite DEO
74- ( | buttons )
75- .center/y LDZ2 .Screen/y DEO2
76- .center/x LDZ2 #0018 ADD2 .Screen/x DEO2
77- ;button-icn .Screen/addr DEO2
78- #03 STHkr #01 SFT #01 AND SUB .Screen/sprite DEO
79- .Screen/y DEI2 #000a ADD2 .Screen/y DEO2
80- ;font-hex/b .Screen/addr DEO2
81- [ LIT2 03 -Screen/sprite ] DEO
82- .center/y LDZ2 .Screen/y DEO2
83- .center/x LDZ2 #0024 ADD2 .Screen/x DEO2
84- ;button-icn .Screen/addr DEO2
85- #03 STHr #01 AND SUB .Screen/sprite DEO
86- .Screen/y DEI2 #000a ADD2 .Screen/y DEO2
87- ;font-hex/a .Screen/addr DEO2
88- [ LIT2 03 -Screen/sprite ] DEO
89- .center/x LDZ2 #0010 SUB2 .Screen/x DEO2
90- .center/y LDZ2 #0010 SUB2 .Screen/y DEO2
91- [ LIT2 01 -Screen/auto ] DEO
92- .Controller/button DEI2 <draw-short>
93- [ LIT2 00 -Screen/auto ] DEO
94- JMP2r
95-
96-@<draw-short> ( short* -- )
97- SWP <draw-byte>
98-
99-@<draw-byte> ( byte -- )
100- DUP #04 SFT <draw-hex>
101-
102-@<draw-hex> ( char -- )
103- #00 SWP #0f AND #30 SFT2 ;font-hex ADD2 .Screen/addr DEO2
104- [ LIT2 03 -Screen/sprite ] DEO
105- JMP2r
106-
107-@<line-rect> ( x1* y1* x2* y2* color -- )
108- STH
109- DUP2 ,&ver-y2 STR2
110- ,&hor-y2 STR2
111- DUP2 ,&ver-x2 STR2
112- ,&hor-x2 STR2
113- DUP2 ,&ver-y1 STR2
114- ,&hor-y1 STR2
115- DUP2 ,&ver-x1 STR2
116- ,&hor-x1 STR2
117- ( | horizontal )
118- [ LIT2 &hor-x2 $2 ] INC2 [ LIT2 &hor-x1 $2 ]
119- &hor ( -- )
120- DUP2 .Screen/x DEO2
121- [ LIT2 &hor-y1 $2 ] .Screen/y DEO2
122- STHkr .Screen/pixel DEOk [ LIT2 &hor-y2 $2 ] .Screen/y DEO2
123- DEO
124- INC2 GTH2k ?&hor
125- POP2 POP2
126- ( | vertical )
127- [ LIT2 &ver-y2 $2 ] [ LIT2 &ver-y1 $2 ]
128- &ver ( -- )
129- DUP2 .Screen/y DEO2
130- [ LIT2 &ver-x1 $2 ] .Screen/x DEO2
131- STHkr .Screen/pixel DEOk [ LIT2 &ver-x2 $2 ] .Screen/x DEO2
132- DEO
133- INC2 GTH2k ?&ver
134- POP2 POP2 POPr JMP2r
135-
136-(
137-@|assets )
138-
139-@fill-icn [ ffff ffff ffff ffff ]
140-
141-@dpad-up-icn [ 7eff e7c3 ffff ffff ]
142-
143-@dpad-down-icn [ ffff ffff c3e7 ff7e ]
144-
145-@dpad-left-icn [ 7fff efcf cfef ff7f ]
146-
147-@dpad-right-icn [ feff f7f3 f3f7 fffe ]
148-
149-@option-icn [ 0000 7eff ff7e 0000 ]
150-
151-@button-icn [ 3c7e ffff ffff 7e3c ]
152-
153-@font-hex [
154- 007c 8282 8282 827c 0030 1010 1010 1010
155- 007c 8202 7c80 80fe 007c 8202 1c02 827c
156- 000c 1424 4484 fe04 00fe 8080 7c02 827c
157- 007c 8280 fc82 827c 00fe 0202 0408 1010
158- 007c 8282 7c82 827c 007c 8282 7e02 827c
159- &a 007c 8202 7e82 827e &b 00fc 8282
160- fc82 82fc 007c 8280 8080 827c 00fc 8282
161- 8282 82fc 00fe 8080 fe80 80fe 00fe 8080
162- f080 8080 ]
163-
+0,
-79
1@@ -1,79 +0,0 @@
2-( test file )
3-
4-|0100 @program
5-
6- #01 ?{ ( skip ) #ffff }
7- !{ ( skip ) #ffff }
8- { ( skip ) #ffff } POP2r
9-
10- ( nested lambda )
11- { { "hello 0a $1 } STH2r !print-str } STH2r JSR2
12-
13- ( function application )
14- { 01 02 03 04 05 } STH2r { LIT "0 ADD #18 DEO #0a18 DEO JMP2r } STH2r foreach
15-
16- ( get lambda length )
17- { "Dindeldums $1 } STH2r get-lambda-length <print-dec> #0a18 DEO
18-
19- ( allocated string )
20- ;hello-word print-str
21-
22- #800f DEO
23-
24-BRK
25-
26-(
27-@| test label inheritance )
28-
29-@Object &x $1 &y $1
30-
31-&get-x ( -- x )
32- ,&x LDR
33- JMP2r
34-
35-@Object/get-y ( -- y )
36- ,&y LDR
37- JMP2r
38-
39-@Object/get-both ( -- x y )
40- /get-x /get-y
41- JMP2r
42-
43-( raw lambda length )
44-_{ 01 02 03 }
45-
46-@get-lambda-length ( lambda* -- length* )
47- #0002 SUB2 LDA2
48-JMP2r
49-
50-@print-str ( str* -- )
51- &while ( -- )
52- ( send ) LDAk #18 DEO
53- ( loop ) INC2 LDAk ?&while
54- POP2
55-
56-JMP2r
57-
58-@foreach ( arr* fn* -- )
59- STH2
60- DUP2
61- DUP2 #0002 SUB2 LDA2 ADD2
62- SWP2
63- &l
64- LDAk STH2kr JSR2
65- INC2 NEQ2k ?&l
66- POP2 POP2 POP2r
67-JMP2r
68-
69-@<print-dec> ( short* -- )
70- #2710 [ LIT2r 00fb ]
71- &w ( -- )
72- DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?&>skip
73- DUP [ LIT "0 ] ADD #19 DEO
74- INCr &>skip
75- POP2 #000a DIV2 SWPr INCr STHkr ?&w
76- POP2r POP2 POP2 JMP2r
77-
78-$20 @label2
79-
80-@hello-word "Hello 20 "World! 0a $1
R etc/console.tal =>
etc/examples/console.tal
+0,
-0
R etc/festival.tal =>
etc/examples/festival.tal
+0,
-0
R etc/mouse.tal =>
etc/examples/mouse.tal
+0,
-0
R etc/mp3.tal =>
etc/examples/mp3.tal
+0,
-0
R etc/opctest.tal =>
etc/examples/opctest.tal
+0,
-0
R etc/pwd.tal =>
etc/examples/pwd.tal
+0,
-0
R etc/screen.bounds.tal =>
etc/examples/screen.tal
+0,
-0
R etc/xclock.tal =>
etc/examples/xclock.tal
+0,
-0
+0,
-58
1@@ -1,58 +0,0 @@
2-( )
3-
4-|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
5-|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
6-
7-|100
8-
9-@on-reset ( -> )
10- ( | stat )
11- ;file .File/name DEO2
12- #0008 .File/length DEO2
13- ;stat-mem DUP2 .File/stat DEO2
14- <pstr> #0a18 DEO
15- ( | stat missing )
16- ;file-missing .File/name DEO2
17- #0008 .File/length DEO2
18- ;stat-mem DUP2 .File/stat DEO2
19- <pstr> #0a18 DEO
20- ( | dir )
21- ;dir .File/name DEO2
22- #0200 .File/length DEO2
23- ;mem DUP2 .File/read DEO2
24- <pstr>
25- ( | dir nested )
26- ;dir-nested .File/name DEO2
27- #0200 .File/length DEO2
28- ;mem-nested DUP2 .File/read DEO2
29- <pstr>
30- ( | dir nested bad )
31- ;dir-nested-bad .File/name DEO2
32- #0200 .File/length DEO2
33- ;mem-nested DUP2 .File/read DEO2
34- <pstr>
35- ( | dir nested bad2 )
36- ;dir-nested-bad2 .File/name DEO2
37- #0200 .File/length DEO2
38- ;mem-nested DUP2 .File/read DEO2
39- <pstr>
40- BRK
41-
42-@<pstr> ( str* -- )
43- LDAk #18 DEO
44- INC2 LDAk ?<pstr>
45- POP2 #0a18 DEO
46- JMP2r
47-
48-@file "README.md $1
49-@file-missing "WHAT.md $1
50-@dir ". $1
51-@dir-nested "src/ $1
52-@dir-nested-bad "src $1
53-@dir-nested-bad2 "./src $1
54-
55-@stat-mem "............ $1
56-
57-@mem $200
58-@mem-nested $200
59-
+0,
-188
1@@ -1,188 +0,0 @@
2-|00 @System &vector $2 &expansion $2 &friend $2 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &halt $1
3-|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
4-
5-|0100
6-
7- ( theme )
8- #f0f7 .System/r DEO2
9- #f00e .System/g DEO2
10- #f00c .System/b DEO2
11-
12- ;thread-a .System/friend DEO2
13- ;thread-b .System/friend DEO2
14- ;thread-c .System/friend DEO2
15-
16- ( wait for threads to finish )
17- #0000 .System/friend DEO2
18-
19-BRK
20-
21-@thread-a ( -> )
22-
23- #0020 .Screen/x DEO2
24- #0028 .Screen/y DEO2
25- #1010 ;dafu10x10 #05 draw-fast
26-
27-BRK
28-
29-@thread-b ( -> )
30-
31- #0070 .Screen/x DEO2
32- #0040 .Screen/y DEO2
33- #1010 ;dafu10x10 #0a draw-fast
34-
35-BRK
36-
37-@thread-c ( -> )
38-
39- #00d0 .Screen/x DEO2
40- #0048 .Screen/y DEO2
41- #1010 ;dafu10x10 #0f draw-fast
42-
43-BRK
44-
45-@draw-fast ( w h addr* color -- )
46-
47- ,&color STR
48- .Screen/addr DEO2
49- SWP #01 SUB #40 SFT #06 ORA .Screen/auto DEO
50- #00 SWP SUB
51- &loop
52- ( self modification )
53- [ LIT2 &color $1 -Screen/sprite ] DEO
54- INC DUP ?&loop
55- POP
56-
57-JMP2r
58-
59-@dafu10x10
60- 0000 0000 0000 0000 0000 0000 0000 0000
61- 0000 0000 0000 0000 0000 0000 0000 0000
62- 0000 0000 0000 0001 0000 0000 010f 7fff
63- 0000 002f ffff ffff 0000 00fd ffff ffff
64- 0000 0000 e0fc ffff 0000 0000 0000 00e0
65- 0000 0000 0000 0000 0000 0000 0000 0000
66- 0000 0000 0000 0000 0000 0000 0000 0000
67- 0000 0000 0000 0000 0000 0000 0000 0000
68- 0000 0000 0000 0000 0000 0000 0000 0000
69- 0000 0000 0000 0000 0000 0000 0107 071f
70- 071f 3fff fffc f3cf ffff f8c7 3fff ffff
71- e82f fbfb fbfb fbfb 02ff ffff ffff ffff
72- bf41 feff ffff ffff fcff 1fe3 fcff ffff
73- 00d0 fcff 7fd2 ffff 0000 00c0 f0f8 5efe
74- 0000 0000 0000 0000 0000 0000 0000 0000
75- 0000 0000 0000 0000 0000 0000 0000 0000
76- 0000 0000 0000 0000 0000 0000 0000 0000
77- 0000 0103 0f1f 3f7e 5f7e f9f3 cf9f 7fff
78- 3f7f ffff ffff ffff ffff ffff ffff ffff
79- f9fb fbf9 fdf9 fdfd ffff ffff ffff ffff
80- ffff ffff ffff ffff ffff ffff ffff ffff
81- ffff ffff ffff ffff ffff ffff feff fefe
82- 0000 0000 0000 0000 0000 0000 0000 0000
83- 0000 0000 0000 0000 0000 0000 0000 0000
84- 0000 0000 0000 0000 0001 002f 1f1f 1f1f
85- e907 ffff ffff ffff ffff ffff ffff ffff
86- ffff ffff ffff ffff ffff ffff ffff ffff
87- fdfd fdfd fcff fd45 ffff ffff ffff ed37
88- ffff ffff ffff b76c ffff ffff ffff ff0b
89- ffff ffff ffff ffff fefc fcfc f8fc f8f8
90- 0000 0000 0000 0000 0000 0000 0000 0000
91- 0000 0000 0000 0000 0000 0000 0000 0000
92- 0000 0000 0000 0000 1f1f 1f0f 0f07 0703
93- ffff ffff ffff ffff ffff ffff fffe fdf5
94- ffff fceb 8fbf 7fff f48b 7fff ffff ffff
95- bffe fefa f8fc fdff ffff 7f3f 3f7f bfff
96- ffff ffff ffff ffff f8ff ffff ffff ffff
97- 7fd7 ffff ffff ffff f0f0 f0e0 e0e0 e0e0
98- 0000 0000 0000 0000 0000 0000 0000 0000
99- 0000 0000 0000 0000 0000 0000 0000 0000
100- 0000 0000 0000 0000 0301 0100 0000 0000
101- ffff fffc 7d33 3f1f ef9f 7fff ffff ffff
102- ffff ffff ffff f4cb ffff ffff e807 ffff
103- ffff ffa0 00c0 0197 ffff 5007 1f03 5eff
104- ffff a5ff ff6d bfff ffff 4de8 ff7f 6fff
105- ffff ffbf a7fe fefe f0e0 f0e0 f0e0 b0d0
106- 0000 0000 0000 0000 0000 0000 0000 0000
107- 0000 0000 0000 0000 0000 0000 0000 0000
108- 0000 0000 0000 0000 0000 0000 0000 0000
109- 1f0f 0f0f 0f0e 0e12 fefa f5cf bfff ffff
110- 3fff ffff ffff ffff ffff ffff ffff ffff
111- f8e0 e0c0 e040 c040 7f7f 5f2f 7b1b 0f0f
112- ffff ffff ffff ffff ffff ffff ffff ffff
113- ffff fcfd fbf5 f9d4 50f0 f0e0 f0f0 e060
114- 0000 0000 0000 0000 0000 0000 0000 0000
115- 0000 0000 0000 0000 0000 0000 0000 0000
116- 0000 0000 0000 0000 0000 0000 0000 0000
117- 1a1a 150f 0d07 1100 7fff ffff fdff ffe1
118- ffff ffff baff ff55 ffff ffaa fdff fe00
119- c040 d708 f0eb a800 0fa6 7f2f 3fd0 021a
120- d7bf fff7 086a b8b0 feff e914 a000 0000
121- ab20 e078 0000 0000 e0c0 d6e1 4084 0204
122- 0000 0000 0000 0000 0000 0000 0000 0000
123- 0000 0000 0000 0000 0000 0000 0000 0000
124- 0000 0000 0000 0000 0000 0000 0000 0000
125- 0402 010a 0200 0000 7876 39b0 5078 9018
126- 0892 71a9 2112 1210 aa00 ff01 7692 0000
127- a01e 3628 8488 4484 a5a0 0000 0080 8000
128- 2003 070d 3815 0260 feff 7b69 9e60 0000
129- 90e0 8080 0000 0000 c004 8020 8890 8888
130- 0000 0000 0000 0000 0000 0000 0000 0000
131- 0000 0000 0000 0000 0000 0000 0000 0000
132- 0000 0000 0000 0000 0000 0000 0000 0000
133- 0300 0000 0000 0000 2848 8008 4428 0c04
134- 1211 1201 1d14 2a29 1200 0016 dd55 22a9
135- 4084 44ca 8a0d 5800 0000 0800 a02e d105
136- 1000 0000 0080 6a11 0000 0000 0000 8865
137- 0100 0100 0101 005e 2080 2040 4000 0000
138- 0000 0000 0000 0000 0000 0000 0000 0000
139- 0000 0000 0000 0000 0000 0000 0000 0000
140- 0000 0000 0000 0000 0000 0000 0000 0000
141- 0000 0000 0000 0000 0600 0a05 0303 0300
142- 50a0 8040 8000 8000 0000 0000 0000 0000
143- 0000 0000 0000 0000 0000 0000 0000 0000
144- ad00 0000 0000 0000 510a 0000 0000 0000
145- 2214 0002 0200 0406 0000 0000 0000 0080
146- 0000 0000 0000 0000 0000 0000 0000 0000
147- 0000 0000 0000 0000 0000 0000 0000 0000
148- 0000 0000 0000 0000 0000 0000 0000 0000
149- 0000 0000 0021 010f 0407 0812 2e5c de3e
150- 4000 c060 f0f0 f878 0000 0000 0000 0000
151- 0000 0000 0000 0000 0000 502d 0200 157f
152- 0040 a000 0000 e0f8 0000 0000 0000 0000
153- 060f 0f1f 1737 336b a01c e3f0 feff ffff
154- 0000 407a 05c0 f0fc 0000 0000 807c 0300
155- 0000 0000 0000 a05a 0000 0000 0000 0004
156- 0000 0000 0000 030c 0001 0514 53a7 0f3f
157- 265c 5df9 f3e7 c7cf fbfd fbfb fbfb fbfb
158- 7c7e 7fbf bfff bfff 0000 0090 c0e0 f0f8
159- 0101 0101 0001 0020 7fc8 ff1b c6f0 7f78
160- fc5c ec08 b858 30e0 0108 0001 0103 0707
161- 6b5b dbdf bbbf bb7f ffff ffff ffff ffff
162- fefe fcfc f9f3 f3f7 6079 fffe fcfc f9f3
163- 0540 823f 7fff ffff d02c 03f8 feff ffff
164- 3040 800e 3f7f ffff 7f7f 7fff 7f7f 7f7f
165- 9fdf 9f9f df9f 9fdf fbfb fbf3 fbfb fbfb
166- efff fff7 fffd ffff fefe ffff ffff ff7f
167- 0000 80e0 f0fc ffff 1f02 0000 0001 01e1
168- c000 00a8 b050 590b 0f1f 1e7d 7dff ffff
169- 7f7f ffff ffff ffff ffff ffff ffff ffff
170- e7ef cfdf 9f3f 7f3f f3e7 efcf dfbf bf3f
171- ffff ffff ffff ffff fffe fcf8 f0f0 e0c0
172- ffff ffff ffff ffff bfbf bfbf dfdf dfcf
173- 9fcf 9fcf dfcf dfcf f7fb fbf7 fbfb fbfb
174- ffff ffff ffff ffff ffd7 f7fd feff ffff
175- ffff ffff 7f9e e8e0 ffff fff5 8000 0001
176- 4f47 66a4 7056 4b43 fffe 8001 015f ffff
177- ffbf 1f7f ffff ffff fefe fcfe fdf9 fbfb
178- 7fff feff fefe fcfe 7f7f 7f7f ffff ffff
179- ffff fffe fefc f8f8 8183 070f 1f3f 3f7f
180- ffff ffff 7f3f 9f8f efef eff7 f7f7 f7f7
181- dfcf efdf cfff cfef fbfb fbf9 fdfd fbfc
182- ffff fffe f4c0 8000 fffc e080 0000 0000
183- 8000 0000 0000 0000 0506 0802 0300 0000
184- 4925 2365 a2b2 1191 ffff ffff ff05 0000
185- ffff ffff ff7f 0307 fbfb ffff ffff ffff
186- fcfd fcfe fdfd fdfd ffff ffff ffff ffff
187- f0e0 e1c3 8387 0f1f ffff ffff ffff fffe
188-
189-
+0,
-6
1@@ -1,6 +0,0 @@
2-%square { DUP MUL ?{ } }
3-
4-|100
5- #12 square
6-BRK
7-
+0,
-29
1@@ -1,29 +0,0 @@
2-|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
3-
4-|0100
5-
6- ;task1 #f0 DEO2
7- ;task2 #f2 DEO2
8- #0000 #f0 DEO2k INC INC DEO2
9- ;end-txt print-text
10- #800f DEO
11-
12-BRK
13-
14-@task1 ( -> )
15- ;t1 print-text
16-BRK
17-
18-@task2 ( -> )
19- ;t2 print-text
20-BRK
21-
22-@print-text ( str* -- )
23- ( send ) LDAk .Console/write DEO
24- ( loop ) INC2 LDAk ?print-text
25- POP2
26-JMP2r
27-
28-@t1 "AAAAAAAAAAAAAAAA 00
29-@t2 "BBBBBBBBBBBBBBBB 00
30-@end-txt 0a "Done. 0a
+0,
-56
1@@ -1,56 +0,0 @@
2-|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
3-|100
4-
5-@on-reset ( -> )
6- ;buf <pstr>
7- #2018 DEO
8- ;buf <pstr>
9- #0a18 DEO
10- ( | copy left )
11- ;buf #0006 ADD2 ;mmu-cpyl/a STA2
12- ;buf #0003 ADD2 ;mmu-cpyl/b STA2
13- ;mmu-cpyl .System/expansion DEO2
14- ;buf <pstr>
15- #2018 DEO
16- ;res1 <pstr>
17- #0a18 DEO
18- ( | copy right )
19- ;buf #0003 ADD2 ;mmu-cpyr/a STA2
20- ;buf #0009 ADD2 ;mmu-cpyr/b STA2
21- ;mmu-cpyr .System/expansion DEO2
22- ;buf <pstr>
23- #2018 DEO
24- ;res2 <pstr>
25- #0a18 DEO
26- ( | copy left )
27- ;buf #0009 ADD2 ;mmu-cpyl/a STA2
28- ;buf #0006 ADD2 ;mmu-cpyl/b STA2
29- ;mmu-cpyl .System/expansion DEO2
30- ;buf <pstr>
31- #2018 DEO
32- ;res3 <pstr>
33- #0a18 DEO
34- ( | memset )
35- ;buf #0003 ADD2 ;mmu-fill/a STA2
36- ;mmu-fill .System/expansion DEO2
37- ;buf <pstr>
38- #2018 DEO
39- ;res4 <pstr>
40- #0a18 DEO
41- BRK
42-
43-@<pstr> ( str* -- )
44- LDAk #18 DEO
45- INC2 LDAk ?<pstr>
46- POP2 JMP2r
47-
48-@buf [ "......[hello]..... $1 ]
49-@res1 [ "...[hello]o]...... $1 ]
50-@res2 [ "...[hello[hello].. $1 ]
51-@res3 [ "...[he[hello]lo].. $1 ]
52-@res4 [ "...-------------.. $1 ]
53-
54-@mmu-fill [ 00 000d 0000 &a $2 2d ]
55-@mmu-cpyl [ 01 0007 0000 &a $2 0000 &b $2 ]
56-@mmu-cpyr [ 02 0007 0000 &a $2 0000 &b $2 ]
57-
+0,
-15
1@@ -1,15 +0,0 @@
2-|00 @System &vector $2 &expansion $2 &friend $2 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &halt $1
3-
4-|0100
5-
6- #ffff
7-
8- #12 NIPk
9-
10-
11- #010e DEO
12- #800f DEO
13-
14-BRK
15-
16-
+0,
-473
1@@ -1,473 +0,0 @@
2-( GUI Picture )
3-
4-|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1
5-|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
6-
7-|0100
8-
9- ( theme )
10- #f0f5 .System/r DEO2
11- #f00c .System/g DEO2
12- #f00a .System/b DEO2
13-
14- ( #0010
15- DUP2 .Screen/x DEO2
16- .Screen/y DEO2
17- ;akane20x10 #20 #10 #01 draw-icn )
18-
19- .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
20- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
21- #1010 ;dafu10x10 #05 draw-fast
22-
23- .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
24- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
25- #1010 ;dafu10x10 #1a draw-fast
26-
27- .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
28- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
29- #1010 ;dafu10x10 #2f draw-fast
30-
31- .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
32- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
33- #1010 ;dafu10x10 #3b draw-fast
34-
35-
36-
37- ( .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
38- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
39- #1010 ;dafu10x10 #3f draw-fast
40-
41- .Screen/width DEI2 #01 SFT2 .Screen/x DEO2
42- .Screen/height DEI2 #01 SFT2 .Screen/y DEO2
43- #1010 ;dafu10x10 #3f draw-fast )
44-
45-
46-
47-BRK
48-
49-@draw-icn ( addr* width height color -- )
50-
51- #05 .Screen/auto DEO
52- ,&color STR
53- ,&height STR
54- ,&width STR
55- .Screen/addr DEO2
56- .Screen/x DEI2
57- ,&x STR2
58- [ LIT2 00 &height $1 ] SUB
59- &ver
60- [ LIT2 &x $2 ] .Screen/x DEO2
61- [ LIT2 00 &width $1 ] SUB
62- &hor
63- [ LIT &color $1 ] .Screen/sprite DEO
64- INC DUP ?&hor
65- POP
66- .Screen/y DEI2k #0008 ADD2 ROT DEO2
67- INC DUP ?&ver
68- POP
69- #00 .Screen/auto DEO
70-
71-JMP2r
72-
73-( makes use of the auto byte )
74-
75-@draw-fast ( w h addr* color -- )
76-
77- ,&color STR
78- .Screen/addr DEO2
79- SWP #01 SUB #40 SFT #06 ORA .Screen/auto DEO
80- #00 SWP SUB
81- &loop
82- [ LIT2 &color $1 -Screen/sprite ] DEO
83- INC DUP ?&loop
84- POP
85-
86-JMP2r
87-
88-@akane20x10
89- 0000 0000 0000 0000 2b41 2341 2b41 2341
90- 8881 8081 8880 8080 0a00 2000 8800 2000
91- 8004 2004 8804 2a04 0000 0000 8000 0000
92- 0307 0f0f 0f1f 1f5f ffff ffff ffff ffff
93- ffff ffff ffff ffff ffff ffff ffff ffff
94- ffff ffff ffff ffff ffff ffff ffff ffff
95- ffff ffff ffff ffff ffff ffff ffff ffff
96- ffff ffff ffff ffff ffff fff7 ffff efdf
97- fbf7 efd7 efdf af5f fffd fbfd fbf5 ebd7
98- eaf5 ead5 ead5 aa55 ab55 ab55 ab57 ab57
99- fbf7 ebd7 ebd7 ab57 ffff ffff ffff fbf7
100- ffff ffff ffff ffff ffff ffff ffff ffff
101- ffff ffff ffff ffff ffff ffff ffff fefc
102- 80c0 8000 0000 0000 0000 0000 0000 0000
103- 0000 0000 0000 0000 2a54 2a54 2a54 2a54
104- 8800 2200 8800 2200 8800 2200 8800 2200
105- 0000 0000 0000 0000 2b41 2341 2b41 2341
106- 8880 8080 8880 a080 8800 2000 8800 2000
107- 8a05 2a05 8f0f 2a15 aa55 aafd ffff aa45
108- bf7f ff7f ffff ffff ffff ffff ffff ffff
109- ffff ffff ffff ffff ffff ffff ffff ffff
110- ffff ffff ffff ffff ffff ffff ffff ffff
111- ffff ffff ffff fefd ffff ffff ffff be7c
112- ffff ffff 8a00 0200 befd fafd fe1f 2307
113- bf5f bf7d bad5 eaf5 ead5 aa55 aa55 aa55
114- aa55 aa55 aa55 aa55 aa55 aa55 aa55 ab57
115- af57 af7f ffc5 a307 fbf7 ff9f 1f1f 8f9f
116- ffff ffff ffff ffff ffff ffff ffff ffff
117- ffff ffff ffff ffff fefd faf5 eaff ff5f
118- 0055 aa55 aaff ffff 0055 aa55 aaff ffff
119- 0055 aadf aaff ffff aa55 aad5 aaff ffff
120- 8840 aa77 aaff ffff 8800 aaff aaff ffff
121- 0000 0000 0000 0000 2b41 2341 2b41 2241
122- 8800 a000 8800 a004 8804 2004 8000 2240
123- 8810 0810 a010 2010 0200 0000 0000 0000
124- bf3f 3f1f 0f07 0303 ffff ffff ffff ffff
125- ffff ffff ffff ffff ffff ffff ffff ffff
126- ffff ffff ffff ffff ffff ffff ffd7 ab55
127- faf5 faf5 eaf5 eaf5 f870 e240 8840 8240
128- 8800 2200 8841 233f 8f1f 3f7f ffff ffff
129- fadd eac1 e2c1 c2c1 aa55 aa55 aa55 aa55
130- aa55 aa55 aa54 a040 ae54 a854 a855 2f07
131- 8f1f 1f3f bfff ffff 8f87 8f85 8205 2a05
132- ffdf af5f bf7f bf77 ffff ffff ffff ffff
133- fefd f8c0 80c0 80c0 aa55 2a15 0a15 0a15
134- ab55 8000 8000 8000 fe55 0200 0800 2200
135- aa55 2200 8800 2200 eb77 2a54 2a54 2a54
136- ff55 2000 8800 2000 ff55 0000 0000 2000
137- 0000 0000 0000 0000 2a41 2241 2b41 2341
138- 8804 a004 8004 a004 0840 aa40 8850 8210
139- a010 2040 a040 2040 0000 0000 0000 0000
140- 0301 0000 0000 0000 ffff ff7f 7f3f 3b07
141- ffff ffff ffff ffff ffff ffff ffff ffff
142- feff fefd fefd fefd aa55 aa55 aa55 aa55
143- eaf5 fafd fafd fefd 8840 a250 a854 aa54
144- bf1f 2f07 8800 8055 ffff fefc e800 0a54
145- 8201 2000 8000 8010 aa54 2800 0000 0000
146- 0000 0000 0000 0000 0301 0000 0000 0200
147- fefc fa70 8801 aa50 8a05 0a05 0201 0303
148- ef57 af5f af5f bf7f ffff ffff ffff ffff
149- c0c0 a2c0 8880 a280 0a15 0a15 8a15 0a15
150- 0000 0000 8000 2000 0800 0200 0800 2000
151- 0800 2200 8800 0000 2a54 2a55 2a55 2a57
152- 8800 2000 a0ff ffff 8000 2000 a8ff ffff
153- 0000 0000 0000 0001 ab41 a341 ab5f ffff
154- 8004 a804 8eff ffff 8010 a200 a0c0 e2c1
155- 8040 80c0 80c0 8000 0000 0000 0000 0000
156- 0000 0000 0000 0000 0301 0101 0000 0000
157- ffff ffff ff7f 1f0f ffff ffff ffff ffff
158- fefd feff feff ffff aa55 aa55 aa55 aad5
159- feff feff fe7f fe7f aa54 aa55 aa55 aa54
160- 0000 0000 0000 0000 0000 0000 0000 0000
161- 0800 0000 0000 0000 0000 0000 0000 0000
162- 0000 0001 0205 0a05 8040 2040 e070 e040
163- 0000 0000 0000 0000 0307 0307 0707 0f07
164- ffff ffff ffff ffff ffff fefc fefc fcfc
165- 8207 3f7f 7f7f 7f7f 8aff ffff ffff ffff
166- 08c0 faf8 fcfc feff 8800 2000 8800 2000
167- 0000 2000 0000 0000 2b57 2f57 2b55 2a54
168- ffff ffff ffff ffff ffff ffff ffff ffff
169- 0b03 0307 0707 0f1f ffff ffff ffff ffff
170- ffff ffff ffff ffff e0f1 f9f1 faf3 faf7
171- 8000 0000 0000 0000 0000 0000 0000 0000
172- 0000 0000 0000 0000 0000 0000 0000 0000
173- 0707 0301 0000 0000 ffff ffff ff7f 3f1f
174- ffff ffff ffff ffff eaf5 fafd feff ffff
175- fe7d be7f be7d ffff aa54 aa54 aa54 aad5
176- 0000 0000 0000 0000 0000 0000 0000 0000
177- 0000 0000 0000 0000 0000 0000 0000 0000
178- 0201 0000 0000 0001 e040 0000 0000 0040
179- 0000 0000 0000 0000 0f07 0f07 0f0f 0f1f
180- ffff ffff fffe fcfc f8f0 c280 0800 2200
181- be7f 3e15 8a01 2205 ff5f af55 ab55 ab55
182- feff ffff ffff bf7f 8000 2000 8800 a201
183- 8800 2000 0000 00f7 2854 2854 2854 28f4
184- ff7f bf57 af5f 2f57 ffff ffff ffff ffff
185- 0f1f 0f07 0707 0707 ffff ffff ffff ffff
186- ffff ffff fefd faf5 e2c4 8604 8844 a854
187- 0000 0000 0000 0000 0000 0000 0000 0000
188- 0000 0000 0000 0000 0000 0000 0000 0000
189- 0000 0000 0000 0000 0f03 0100 0000 0000
190- ffff ff7f 0f07 0a05 ffff ffff ffff ff7f
191- ffff ffff ffff ffff eaf5 fafd feff ffff
192- 8000 8040 a0d0 e8d4 0000 0000 0000 0000
193- 0000 0000 0000 0000 0000 0000 0000 0000
194- 0200 0000 0000 0000 8000 0000 0000 0000
195- 0000 0000 0001 0305 0f1f 3f7c f8f0 8201
196- e8c4 2a11 a840 a200 8800 2200 2005 2000
197- 8215 2e57 2a55 aa55 aa55 aa55 aa55 3a15
198- fe7c f8f0 e840 a250 0307 2f1f 8f1f 2f0f
199- ffff ffff ffff ffff f8fc fefc feff fef0
200- ab57 2b15 0a55 0a01 ffff feff ea55 8040
201- 0301 0005 aa10 0805 ffff ff5f aa05 2000
202- eaf5 ead5 aa55 aa41 8810 b810 2070 2040
203- 0000 0000 0000 0000 0000 0000 0000 0000
204- 0000 0000 0000 0000 0000 0000 0204 0a10
205- 0000 0000 a805 2200 0000 0000 0040 2805
206- 0a05 0a10 2a41 a200 af57 a840 8844 0a10
207- ffff ff7f 8f01 2004 ffff ffff ffff ff7f
208- aed5 aad5 aad5 aad5 80c0 a85d ab55 aa55
209- 0000 0000 a054 aa55 0000 0000 0000 a055
210- 0000 0000 0000 0045 0000 0071 fa7c faf0
211- 0810 a240 0800 2001 0a04 0254 a850 8200
212- 0800 2200 8800 2200 8800 2200 8804 2a00
213- 8a05 2201 8a01 2001 a8d0 a0c4 8a54 a040
214- 2801 2000 8800 0250 8f01 8240 a011 2211
215- af55 a040 8051 a815 e0c0 c240 8800 a200
216- 0840 2200 aa10 2214 2a05 2000 8800 2200
217- 8a00 2000 8000 2200 2a00 2200 8800 2200
218- a214 2301 8000 2210 e040 80c0 6070 2010
219- 0000 0000 0000 0000 0000 0000 0000 0000
220- 0000 0001 0204 0814 2840 a200 8800 2200
221- 8800 2200 8800 2200 8b10 2240 0800 a200
222- a855 2200 8800 2200 2040 a240 a810 2a04
223- 8810 2200 0845 a800 bf7f 3a11 3805 2301
224- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
225- aa55 aa55 aa55 aa55 aa55 aa55 aa75 fa7f
226- ef75 bb5d bb5f bb5f f8f8 fafc f8fc fcfc
227- 8800 2201 8801 2201 0800 2200 0801 2204
228- 8800 2200 0850 2800 8010 0240 a810 2210
229- 8a01 2000 8800 2200 0800 a200 8800 2240
230- a840 2200 a800 2200 8801 2a04 8805 2204
231- 8add aa45 8a14 2015 8800 a200 8800 a280
232- 8804 2804 8004 2204 8800 2200 8800 2200
233- 8800 0200 8840 0240 8800 2200 8800 2001
234- 8800 0240 8800 2200 b010 1810 b810 1810
235- 0000 0000 0000 0000 0000 0000 0000 0001
236- 0810 2240 8800 a200 8800 2200 8800 2201
237- 8801 2241 8a00 a204 8800 2200 8800 2200
238- 8800 2200 8800 2200 8a00 2201 8800 2200
239- 8a01 2200 0800 a200 0a05 aa75 aa05 2201
240- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
241- aa55 aa55 aa55 aa55 bf7f bf5f af47 8301
242- bbd7 fbf1 f8fd feff fefc fefc fefe fefe
243- 8801 2241 2a05 2200 0040 8200 8800 0200
244- 0000 a204 a840 2200 0a50 8200 8800 2200
245- a010 2200 8801 2200 8800 2200 2800 a240
246- a800 2205 8205 2205 8a04 2254 a855 ab55
247- 3e15 2a75 ead5 aa55 82d5 ea75 aa75 aa75
248- a85c aa50 a850 aa50 8800 2200 8800 2200
249- 0800 a200 8800 a200 8a01 2000 8801 2001
250- 0800 2200 8800 2200 8810 2810 8814 2804
251- 0000 0000 0000 0000 0204 0004 0810 0210
252- 8800 2200 8800 2200 8801 2001 8801 2200
253- 0804 2a00 0810 a200 8800 2200 8800 2200
254- 8800 2200 8800 2200 8800 2200 8801 2200
255- 0840 0240 a800 a210 8800 2200 8800 2200
256- 2a14 2200 8800 2200 aa00 8040 a804 2200
257- a800 0000 0000 8050 0000 0000 0000 0001
258- ff7f 3f1f 3f71 8200 feff feff ffff ff7f
259- 8800 2200 88f0 fafc a804 2200 aa11 0210
260- 8800 2200 0800 a200 8800 2200 8800 2200
261- 8800 2200 8800 2200 0840 2240 a800 221f
262- 8a01 2205 8205 befd a850 a854 a855 a955
263- ff7f ffdd badd ba5d eaf5 ea75 ea75 ead5
264- a850 aa50 a850 a250 8800 2a04 8a00 2200
265- 0800 0250 0800 0254 8011 2200 8800 2201
266- 0800 2055 aa55 aad5 8810 2040 a040 a040
267- 0000 0000 0000 0200 2800 2240 0840 0240
268- 8800 2200 8800 2200 8800 2200 8800 2200
269- 8800 2200 8800 2200 8800 2200 8800 2200
270- 8800 2200 8800 2200 8800 2200 8800 2200
271- 0850 2210 881c 2804 8800 2200 8800 2200
272- 8800 2200 8800 2200 8800 2200 8800 2200
273- 8a05 2200 8004 0f1f 0244 a818 9810 b2f0
274- 8800 2200 8800 2200 bf1f 2f1f 8f0f 2f07
275- feff ffff ffff ffff 0090 e2f0 e0f0 f8fc
276- 8840 2200 a800 2210 8800 2200 8800 2200
277- 8800 2200 8800 2200 9f1f 2f0f 8f07 2305
278- fefd fefd fefd fefd ab51 aa57 aa57 ae55
279- ba5d ba55 aa55 aa55 ead5 ead5 aad5 aad5
280- a857 bf7f ff7f ffff afff ffff ffff ffff
281- 80f5 ffff ffff ffff 8855 faf0 f8f8 f8fd
282- aad5 aa55 2a55 2a55 a075 aa40 a040 a055
283- 0850 aa01 0201 0055 0840 8240 2800 2270
284- 8800 2200 8800 2200 8800 2200 8800 2200
285- 8800 2200 8800 2200 8800 2200 8800 2200
286- 8800 2200 8800 2200 8800 2200 8800 2200
287- 8a01 2001 8800 2200 8800 a2c0 a850 2834
288- 8800 2200 8800 2200 8800 2200 8800 2200
289- bf7f ff7f ff7f 7f7f e8f0 e2f0 f0f0 fafc
290- 8800 2200 8800 2200 8f0f 2f1f 9f1f 3f7f
291- ffff ffff fffd fefd fcfd fef5 aa55 ab57
292- 0050 e0f1 fafd eed5 0874 ae57 af5f be5d
293- 8800 22c0 b85c aa5c 8a04 2200 8800 2200
294- fe7d 3e3d be1d 2e05 ae55 ae55 ae7d ee5d
295- ab55 ab55 ab57 aa57 aa55 ab55 ab57 ab57
296- ffff ffff ffff ffff ffff ffff ffff ffff
297- ffff ffff ffff ffff ffff ffff ffff fefc
298- ead5 eaf5 eaf5 aa15 bf5f bf5f bf5d aa51
299- feff ffff ff75 aa40 e8f0 eae4 e064 a210
300- 8800 2200 8800 2200 8800 2200 8800 2200
301- 8800 2200 8800 2200 8800 2200 8800 2201
302- 8800 2005 8810 2200 8800 8200 8800 2200
303- 8800 2200 8800 2200 ba14 2a05 8607 2301
304- 0800 2210 0804 a200 8800 2201 8a04 2850
305- 7f7f ff7f 3f1f 3f1f fcfe ffff ffff f8fc
306- 8801 8fff ffff fe7d ffff ffff ebd7 af57
307- feff ead7 abd5 aa55 ab55 aa55 ab75 faf5
308- aed7 aa57 fa50 a0c1 be5f fa50 0000 0255
309- b878 f87c 2f17 aa40 8800 2200 8840 2010
310- 8a05 2a05 0a1d 0a1d ae5d ae5d ae5d ee5d
311- aa55 ae55 aa5d ba55 af5f ab5f bb77 ab77
312- ffff ffff ffff ffff ffff ffff ffff ffff
313- ffff ffff ffff ffff fefc fefc fefc feff
314- 0a15 0a05 0a05 0255 a850 a850 a850 a854
315- 8040 0000 0800 0814 2211 2010 2010 2210
316- 8800 2200 0800 2200 8800 2200 8800 2200
317- 8800 2200 8800 2200 8a04 2a10 a840 0200
318- 0800 2200 8800 2015 8800 2200 8800 a800
319- 8800 2200 8800 2240 8801 2201 8801 2001
320- 88c0 aad5 aad5 aa55 2000 ba55 aa55 aa57
321- 8f1f af5f afff bf7f fafd fcfc faf5 faff
322- 3a55 0e07 0301 80c0 aa55 eaf5 fbff ff7f
323- aa55 ab7f ffff ffff fb75 f8f0 e0c0 80c0
324- 8a14 0800 0000 0000 aa00 0000 0000 0000
325- 0004 0201 0001 0001 2010 2040 8880 a001
326- 3e15 2040 e0f4 feff ef55 0000 0000 80d0
327- fa55 0a15 0a15 0a15 bf77 a347 a347 83c7
328- ffff ffff ffff ffff ffff ffff ffff ffff
329- ffff ffff ffff ffff ffff ffff ffff ffff
330- feff feff ffff aad5 af57 af57 ab57 ab55
331- ffff ffff ffff aa55 e8f0 e2e0 e8e0 a240
332- 8800 2200 8800 2200 8800 2200 8800 2200
333- 8801 2204 8000 2810 0800 2204 8810 2240
334- 2040 2200 8800 2200 8800 2200 8800 2200
335- 8000 2a04 8a00 2211 8a07 2e0d 8a1d 3a7d
336- aa55 aa55 aa55 aa55 ae55 af57 ab55 abff
337- ffff ffff ffff ffff ffff ffff ffff ffff
338- e0c0 e0f0 f8f0 f8f0 3f1f 0f07 0301 0001
339- ffff ffff fefe fefc 8000 8000 0000 0000
340- 0000 0000 0000 0000 0000 0000 0000 0000
341- 0001 0001 0000 0000 8303 8343 8343 8343
342- ffff ffff ffff ffff faff ffff ffff fbf7
343- bafd ffff bfdf ff5f ef7f ffff af5f af5f
344- ffff ffff ffff ffff ffff ffff ffff ffff
345-
346-@dafu10x10
347- 0000 0000 0000 0000 0000 0000 0000 0000
348- 0000 0000 0000 0000 0000 0000 0000 0000
349- 0000 0000 0000 0001 0000 0000 010f 7fff
350- 0000 002f ffff ffff 0000 00fd ffff ffff
351- 0000 0000 e0fc ffff 0000 0000 0000 00e0
352- 0000 0000 0000 0000 0000 0000 0000 0000
353- 0000 0000 0000 0000 0000 0000 0000 0000
354- 0000 0000 0000 0000 0000 0000 0000 0000
355- 0000 0000 0000 0000 0000 0000 0000 0000
356- 0000 0000 0000 0000 0000 0000 0107 071f
357- 071f 3fff fffc f3cf ffff f8c7 3fff ffff
358- e82f fbfb fbfb fbfb 02ff ffff ffff ffff
359- bf41 feff ffff ffff fcff 1fe3 fcff ffff
360- 00d0 fcff 7fd2 ffff 0000 00c0 f0f8 5efe
361- 0000 0000 0000 0000 0000 0000 0000 0000
362- 0000 0000 0000 0000 0000 0000 0000 0000
363- 0000 0000 0000 0000 0000 0000 0000 0000
364- 0000 0103 0f1f 3f7e 5f7e f9f3 cf9f 7fff
365- 3f7f ffff ffff ffff ffff ffff ffff ffff
366- f9fb fbf9 fdf9 fdfd ffff ffff ffff ffff
367- ffff ffff ffff ffff ffff ffff ffff ffff
368- ffff ffff ffff ffff ffff ffff feff fefe
369- 0000 0000 0000 0000 0000 0000 0000 0000
370- 0000 0000 0000 0000 0000 0000 0000 0000
371- 0000 0000 0000 0000 0001 002f 1f1f 1f1f
372- e907 ffff ffff ffff ffff ffff ffff ffff
373- ffff ffff ffff ffff ffff ffff ffff ffff
374- fdfd fdfd fcff fd45 ffff ffff ffff ed37
375- ffff ffff ffff b76c ffff ffff ffff ff0b
376- ffff ffff ffff ffff fefc fcfc f8fc f8f8
377- 0000 0000 0000 0000 0000 0000 0000 0000
378- 0000 0000 0000 0000 0000 0000 0000 0000
379- 0000 0000 0000 0000 1f1f 1f0f 0f07 0703
380- ffff ffff ffff ffff ffff ffff fffe fdf5
381- ffff fceb 8fbf 7fff f48b 7fff ffff ffff
382- bffe fefa f8fc fdff ffff 7f3f 3f7f bfff
383- ffff ffff ffff ffff f8ff ffff ffff ffff
384- 7fd7 ffff ffff ffff f0f0 f0e0 e0e0 e0e0
385- 0000 0000 0000 0000 0000 0000 0000 0000
386- 0000 0000 0000 0000 0000 0000 0000 0000
387- 0000 0000 0000 0000 0301 0100 0000 0000
388- ffff fffc 7d33 3f1f ef9f 7fff ffff ffff
389- ffff ffff ffff f4cb ffff ffff e807 ffff
390- ffff ffa0 00c0 0197 ffff 5007 1f03 5eff
391- ffff a5ff ff6d bfff ffff 4de8 ff7f 6fff
392- ffff ffbf a7fe fefe f0e0 f0e0 f0e0 b0d0
393- 0000 0000 0000 0000 0000 0000 0000 0000
394- 0000 0000 0000 0000 0000 0000 0000 0000
395- 0000 0000 0000 0000 0000 0000 0000 0000
396- 1f0f 0f0f 0f0e 0e12 fefa f5cf bfff ffff
397- 3fff ffff ffff ffff ffff ffff ffff ffff
398- f8e0 e0c0 e040 c040 7f7f 5f2f 7b1b 0f0f
399- ffff ffff ffff ffff ffff ffff ffff ffff
400- ffff fcfd fbf5 f9d4 50f0 f0e0 f0f0 e060
401- 0000 0000 0000 0000 0000 0000 0000 0000
402- 0000 0000 0000 0000 0000 0000 0000 0000
403- 0000 0000 0000 0000 0000 0000 0000 0000
404- 1a1a 150f 0d07 1100 7fff ffff fdff ffe1
405- ffff ffff baff ff55 ffff ffaa fdff fe00
406- c040 d708 f0eb a800 0fa6 7f2f 3fd0 021a
407- d7bf fff7 086a b8b0 feff e914 a000 0000
408- ab20 e078 0000 0000 e0c0 d6e1 4084 0204
409- 0000 0000 0000 0000 0000 0000 0000 0000
410- 0000 0000 0000 0000 0000 0000 0000 0000
411- 0000 0000 0000 0000 0000 0000 0000 0000
412- 0402 010a 0200 0000 7876 39b0 5078 9018
413- 0892 71a9 2112 1210 aa00 ff01 7692 0000
414- a01e 3628 8488 4484 a5a0 0000 0080 8000
415- 2003 070d 3815 0260 feff 7b69 9e60 0000
416- 90e0 8080 0000 0000 c004 8020 8890 8888
417- 0000 0000 0000 0000 0000 0000 0000 0000
418- 0000 0000 0000 0000 0000 0000 0000 0000
419- 0000 0000 0000 0000 0000 0000 0000 0000
420- 0300 0000 0000 0000 2848 8008 4428 0c04
421- 1211 1201 1d14 2a29 1200 0016 dd55 22a9
422- 4084 44ca 8a0d 5800 0000 0800 a02e d105
423- 1000 0000 0080 6a11 0000 0000 0000 8865
424- 0100 0100 0101 005e 2080 2040 4000 0000
425- 0000 0000 0000 0000 0000 0000 0000 0000
426- 0000 0000 0000 0000 0000 0000 0000 0000
427- 0000 0000 0000 0000 0000 0000 0000 0000
428- 0000 0000 0000 0000 0600 0a05 0303 0300
429- 50a0 8040 8000 8000 0000 0000 0000 0000
430- 0000 0000 0000 0000 0000 0000 0000 0000
431- ad00 0000 0000 0000 510a 0000 0000 0000
432- 2214 0002 0200 0406 0000 0000 0000 0080
433- 0000 0000 0000 0000 0000 0000 0000 0000
434- 0000 0000 0000 0000 0000 0000 0000 0000
435- 0000 0000 0000 0000 0000 0000 0000 0000
436- 0000 0000 0021 010f 0407 0812 2e5c de3e
437- 4000 c060 f0f0 f878 0000 0000 0000 0000
438- 0000 0000 0000 0000 0000 502d 0200 157f
439- 0040 a000 0000 e0f8 0000 0000 0000 0000
440- 060f 0f1f 1737 336b a01c e3f0 feff ffff
441- 0000 407a 05c0 f0fc 0000 0000 807c 0300
442- 0000 0000 0000 a05a 0000 0000 0000 0004
443- 0000 0000 0000 030c 0001 0514 53a7 0f3f
444- 265c 5df9 f3e7 c7cf fbfd fbfb fbfb fbfb
445- 7c7e 7fbf bfff bfff 0000 0090 c0e0 f0f8
446- 0101 0101 0001 0020 7fc8 ff1b c6f0 7f78
447- fc5c ec08 b858 30e0 0108 0001 0103 0707
448- 6b5b dbdf bbbf bb7f ffff ffff ffff ffff
449- fefe fcfc f9f3 f3f7 6079 fffe fcfc f9f3
450- 0540 823f 7fff ffff d02c 03f8 feff ffff
451- 3040 800e 3f7f ffff 7f7f 7fff 7f7f 7f7f
452- 9fdf 9f9f df9f 9fdf fbfb fbf3 fbfb fbfb
453- efff fff7 fffd ffff fefe ffff ffff ff7f
454- 0000 80e0 f0fc ffff 1f02 0000 0001 01e1
455- c000 00a8 b050 590b 0f1f 1e7d 7dff ffff
456- 7f7f ffff ffff ffff ffff ffff ffff ffff
457- e7ef cfdf 9f3f 7f3f f3e7 efcf dfbf bf3f
458- ffff ffff ffff ffff fffe fcf8 f0f0 e0c0
459- ffff ffff ffff ffff bfbf bfbf dfdf dfcf
460- 9fcf 9fcf dfcf dfcf f7fb fbf7 fbfb fbfb
461- ffff ffff ffff ffff ffd7 f7fd feff ffff
462- ffff ffff 7f9e e8e0 ffff fff5 8000 0001
463- 4f47 66a4 7056 4b43 fffe 8001 015f ffff
464- ffbf 1f7f ffff ffff fefe fcfe fdf9 fbfb
465- 7fff feff fefe fcfe 7f7f 7f7f ffff ffff
466- ffff fffe fefc f8f8 8183 070f 1f3f 3f7f
467- ffff ffff 7f3f 9f8f efef eff7 f7f7 f7f7
468- dfcf efdf cfff cfef fbfb fbf9 fdfd fbfc
469- ffff fffe f4c0 8000 fffc e080 0000 0000
470- 8000 0000 0000 0000 0506 0802 0300 0000
471- 4925 2365 a2b2 1191 ffff ffff ff05 0000
472- ffff ffff ff7f 0307 fbfb ffff ffff ffff
473- fcfd fcfe fdfd fdfd ffff ffff ffff ffff
474- f0e0 e1c3 8387 0f1f ffff ffff ffff fffe
+0,
-146
1@@ -1,146 +0,0 @@
2-( Polycat:
3- A cat with one eye, and the hind and tail of a lizard.
4- Original character by Rekka Bellum )
5-
6-|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1
7-|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixeld $1 &sprite $1
8-|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &pad $3 &scrollx $2 &scrolly $2
9-
10-|0000
11-
12-@cat &x $2 &y $2 &timer $1
13-@pointer &x $2 &y $2
14-
15-|0100 ( -> )
16-
17- ( theme )
18- #0a3f .System/r DEO2
19- #05df .System/g DEO2
20- #0caf .System/b DEO2
21- ( DOS resolution )
22- #0140 .Screen/width DEO2
23- #00c8 .Screen/height DEO2
24- ( vectors )
25- ;on-mouse .Mouse/vector DEO2
26- ( find center )
27- .Screen/width DEI2 #01 SFT2 .cat/x STZ2
28- .Screen/height DEI2 #01 SFT2 .cat/y STZ2
29- ( draw ground )
30- #f6 .Screen/auto DEO
31- .cat/y LDZ2 #0018 ADD2 .Screen/y DEO2
32- .cat/x LDZ2 #0010 SUB2 .Screen/x DEO2
33- ;ground .Screen/addr DEO2
34- #01 .Screen/sprite DEO
35- ( init )
36- #ff ;draw-eye/last STA
37- #ff ;draw-tail/last STA
38- ( set screen mode auto-x )
39- #05 .Screen/auto DEO
40- draw-polycat
41-
42-BRK
43-
44-@draw-polycat ( -- )
45-
46- ( ears )
47- .cat/y LDZ2 .Screen/y DEO2
48- .cat/x LDZ2 #0008 SUB2 .Screen/x DEO2
49- ;ears .Screen/addr DEO2
50- #81 .Screen/sprite DEOk DEO
51- ( body )
52- .cat/y LDZ2 #0010 ADD2 .Screen/y DEO2
53- .cat/x LDZ2 #0008 SUB2 .Screen/x DEO2
54- ;body .Screen/addr DEO2
55- #81 .Screen/sprite DEO
56- ( eye/tail )
57- #00 draw-eye
58- #00 draw-tail
59-
60-JMP2r
61-
62-@on-mouse ( -> )
63-
64- .Mouse/x DEI2 .cat/x LDZ2 GTH2 #50 SFT
65- .Mouse/y DEI2 .cat/y LDZ2 GTH2 #60 SFT
66- ADD draw-eye
67- .cat/timer LDZ INC [ DUP ] .cat/timer STZ
68- #04 SFT draw-tail
69- draw-cursor
70-
71-BRK
72-
73-@draw-eye ( quad -- )
74-
75- DUP ,&last LDR NEQ ?&changed
76- POP JMP2r &changed
77- ( only redraw on change )
78- DUP
79- #00 SWP ;eye ADD2 .Screen/addr DEO2
80- .cat/y LDZ2 #0008 ADD2 .Screen/y DEO2
81- .cat/x LDZ2 #0008 SUB2 .Screen/x DEO2
82- #81 .Screen/sprite DEOk DEO
83- ,&last STR
84-
85-JMP2r
86- &last $1
87-
88-@draw-tail ( frame -- )
89-
90- STHk ,&last LDR NEQ ?&changed
91- POPr JMP2r &changed
92- ( only redraw on change )
93- STHr #00 OVR ;frames ADD2 LDA
94- #00 SWP #40 SFT2 ;body/tail ADD2
95- .Screen/addr DEO2
96- .cat/x LDZ2 .Screen/x DEO2
97- .cat/y LDZ2 #0010 ADD2 .Screen/y DEO2
98- #81 .Screen/sprite DEO
99- ,&last STR
100-
101-JMP2r
102- &last $1
103-
104-@draw-cursor ( -- )
105-
106- ( last cursor )
107- ;cursor STH2k .Screen/addr DEO2
108- .pointer/x LDZ2 .Screen/x DEO2
109- .pointer/y LDZ2 .Screen/y DEO2
110- #40 .Screen/sprite DEO
111- ( new cursor )
112- STH2r .Screen/addr DEO2
113- .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
114- .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
115- #41 .Mouse/state DEI #00 NEQ ADD .Screen/sprite DEO
116-
117-JMP2r
118-
119-@cursor
120- 80c0 e0f0 f8e0 1000
121-@frames
122- 00 01 02 03 02 01 00 00
123- 00 00 00 00 00 00 00 00
124-@ears
125- 081c 3e3e 7f7f ffff 081c 3e3e 7f7f fffc
126- 081c 3c3e 7e7e ffff 081c 3c3e 7e7e ff1f
127-@eye
128- ffff ffff ff7f 3f0f f7ef cfe7 f07c 3f0f
129- ffff ffff fffe fcf0 87c3 c183 071e fcf0
130- ffff ffff ff7f 3f0f f0e1 c1e0 f07c 3f0f
131- ffff ffff fffe fcf0 f7fb f9f3 071e fcf0
132- ffff ffff ff7f 3f0f f0e7 cfef f77c 3f0f
133- ffff ffff fffe fcf0 0783 c1c3 871e fcf0
134- ffff ffff ff7f 3f0f f0e0 c1e1 f07c 3f0f
135- ffff ffff fffe fcf0 07f3 f9fb f71e fcf0
136-@body
137- 0707 0707 0302 0200 0107 0707 0300 0000
138- &tail
139- e0f0 f0e0 e080 8000 c0f2 f9f9 fef8 b000
140- e0f0 f0e0 e080 8000 c0f2 f9f9 fef8 b000
141- e0f0 f0e0 e080 8000 c0f2 faf9 fef8 b000
142- e0f0 f0e0 e080 8000 c0f1 faf9 fef8 b000
143- 0707 0707 0f08 1000 0307 0707 0f00 0000
144- e0e0 e0e0 e080 8000 f2f9 f9fe b884 8400
145-@ground
146- bf00 5c02 0202 020c ef10 6f90 8080 8074
147- ff00 fe01 0100 0116 fd00 3c40 4040 4028
+0,
-0
+0,
-56
1@@ -1,56 +0,0 @@
2-|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
3-|100
4-
5-@on-reset ( -> )
6- ;buf <pstr>
7- #2018 DEO
8- ;buf <pstr>
9- #0a18 DEO
10- ( | copy left )
11- ;buf #0006 ADD2 ;mmu-cpyl/a STA2
12- ;buf #0003 ADD2 ;mmu-cpyl/b STA2
13- ;mmu-cpyl .System/expansion DEO2
14- ;buf <pstr>
15- #2018 DEO
16- ;res1 <pstr>
17- #0a18 DEO
18- ( | copy right )
19- ;buf #0003 ADD2 ;mmu-cpyr/a STA2
20- ;buf #0009 ADD2 ;mmu-cpyr/b STA2
21- ;mmu-cpyr .System/expansion DEO2
22- ;buf <pstr>
23- #2018 DEO
24- ;res2 <pstr>
25- #0a18 DEO
26- ( | copy left )
27- ;buf #0009 ADD2 ;mmu-cpyl/a STA2
28- ;buf #0006 ADD2 ;mmu-cpyl/b STA2
29- ;mmu-cpyl .System/expansion DEO2
30- ;buf <pstr>
31- #2018 DEO
32- ;res3 <pstr>
33- #0a18 DEO
34- ( | memset )
35- ;buf #0003 ADD2 ;mmu-fill/a STA2
36- ;mmu-fill .System/expansion DEO2
37- ;buf <pstr>
38- #2018 DEO
39- ;res4 <pstr>
40- #0a18 DEO
41- BRK
42-
43-@<pstr> ( str* -- )
44- LDAk #18 DEO
45- INC2 LDAk ?<pstr>
46- POP2 JMP2r
47-
48-@buf [ "......[hello]..... $1 ]
49-@res1 [ "...[hello]lo]..... $1 ]
50-@res2 [ "...[hello[hello].. $1 ]
51-@res3 [ "...[he[hello]lo].. $1 ]
52-@res4 [ "...-------------.. $1 ]
53-
54-@mmu-fill [ 00 000d 0000 &a $2 2d ]
55-@mmu-cpyl [ 01 0007 0000 &a $2 0000 &b $2 ]
56-@mmu-cpyr [ 02 0007 0000 &a $2 0000 &b $2 ]
57-
+0,
-306
1@@ -1,306 +0,0 @@
2-( Opcode Tester )
3-
4-( Requirements:
5- EQU/EQU2 should put #00 or #01 on the stack
6- #18 DEO should output ascii character to console )
7-
8-%EMIT { #18 DEO }
9-%TEST-SHORT { EQU2 #30 ADD EMIT }
10-%TEST-BYTE { EQU #30 ADD EMIT }
11-%MODE { #20 EMIT }
12-%OPCODE { #0a EMIT }
13-%TYPE { OPCODE OPCODE }
14-
15-|0000
16-
17- @zeropage
18- &byte $1 &short $2
19-
20-|0100
21-
22- ( Logic )
23-
24- ( EQU )
25- #f8 #f8 EQU [ #01 ] TEST-BYTE
26- #01 #01 EQU [ #01 ] TEST-BYTE
27- #f8 #01 EQU [ #00 ] TEST-BYTE
28- #01 #f8 EQU [ #00 ] TEST-BYTE
29- MODE
30- #f801 #f801 EQU2 [ #01 ] TEST-BYTE
31- #01f8 #01f8 EQU2 [ #01 ] TEST-BYTE
32- #f801 #01f8 EQU2 [ #00 ] TEST-BYTE
33- #01f8 #f801 EQU2 [ #00 ] TEST-BYTE
34- OPCODE
35-
36- ( NEQ )
37- #f8 #f8 NEQ [ #00 ] TEST-BYTE
38- #01 #01 NEQ [ #00 ] TEST-BYTE
39- #f8 #01 NEQ [ #01 ] TEST-BYTE
40- #01 #f8 NEQ [ #01 ] TEST-BYTE
41- MODE
42- #f801 #f801 NEQ2 [ #00 ] TEST-BYTE
43- #01f8 #01f8 NEQ2 [ #00 ] TEST-BYTE
44- #f801 #01f8 NEQ2 [ #01 ] TEST-BYTE
45- #01f8 #f801 NEQ2 [ #01 ] TEST-BYTE
46- OPCODE
47-
48- ( GTH )
49- #f8 #f8 GTH [ #00 ] TEST-BYTE
50- #01 #01 GTH [ #00 ] TEST-BYTE
51- #f8 #01 GTH [ #01 ] TEST-BYTE
52- #01 #f8 GTH [ #00 ] TEST-BYTE
53- MODE
54- #f801 #f801 GTH2 [ #00 ] TEST-BYTE
55- #01f8 #01f8 GTH2 [ #00 ] TEST-BYTE
56- #f801 #01f8 GTH2 [ #01 ] TEST-BYTE
57- #01f8 #f801 GTH2 [ #00 ] TEST-BYTE
58- OPCODE
59-
60- ( LTH )
61- #f8 #f8 LTH [ #00 ] TEST-BYTE
62- #01 #01 LTH [ #00 ] TEST-BYTE
63- #f8 #01 LTH [ #00 ] TEST-BYTE
64- #01 #f8 LTH [ #01 ] TEST-BYTE
65- MODE
66- #f801 #f801 LTH2 [ #00 ] TEST-BYTE
67- #01f8 #01f8 LTH2 [ #00 ] TEST-BYTE
68- #f801 #01f8 LTH2 [ #00 ] TEST-BYTE
69- #01f8 #f801 LTH2 [ #01 ] TEST-BYTE
70- TYPE
71-
72- ( Arithmetic )
73-
74- ( ADD )
75- #ff #00 ADD [ #ff ] TEST-BYTE
76- #01 #ff ADD [ #00 ] TEST-BYTE
77- #ff #ff ADD [ #fe ] TEST-BYTE
78- #fe #ff ADD [ #fd ] TEST-BYTE
79- MODE
80- #ffff #0000 ADD2 [ #ffff ] TEST-SHORT
81- #0001 #ffff ADD2 [ #0000 ] TEST-SHORT
82- #ffff #ffff ADD2 [ #fffe ] TEST-SHORT
83- #fffe #ffff ADD2 [ #fffd ] TEST-SHORT
84- MODE
85- OPCODE
86-
87- ( SUB )
88- #ff #00 SUB [ #ff ] TEST-BYTE
89- #01 #ff SUB [ #02 ] TEST-BYTE
90- #ff #ff SUB [ #00 ] TEST-BYTE
91- #fe #ff SUB [ #ff ] TEST-BYTE
92- MODE
93- #ffff #0000 SUB2 [ #ffff ] TEST-SHORT
94- #0001 #ffff SUB2 [ #0002 ] TEST-SHORT
95- #ffff #ffff SUB2 [ #0000 ] TEST-SHORT
96- #fffe #ffff SUB2 [ #ffff ] TEST-SHORT
97- MODE
98- OPCODE
99-
100- ( MUL )
101- #00 #01 MUL [ #00 ] TEST-BYTE
102- #3f #e7 MUL [ #d9 ] TEST-BYTE
103- #37 #3f MUL [ #89 ] TEST-BYTE
104- #10 #02 MUL [ #20 ] TEST-BYTE
105- MODE
106- #1000 #0003 MUL2 [ #3000 ] TEST-SHORT
107- #abcd #1234 MUL2 [ #4fa4 ] TEST-SHORT
108- #8000 #0200 MUL2 [ #0000 ] TEST-SHORT
109- #2222 #0003 MUL2 [ #6666 ] TEST-SHORT
110- OPCODE
111-
112- ( DIV )
113- #10 #02 DIV [ #08 ] TEST-BYTE
114- #20 #20 DIV [ #01 ] TEST-BYTE
115- #34 #01 DIV [ #34 ] TEST-BYTE
116- #02 #ef DIV [ #00 ] TEST-BYTE
117- MODE
118- #1000 #0040 DIV2 [ #0040 ] TEST-SHORT
119- #abcd #1234 DIV2 [ #0009 ] TEST-SHORT
120- #8000 #0200 DIV2 [ #0040 ] TEST-SHORT
121- #2222 #0003 DIV2 [ #0b60 ] TEST-SHORT
122- TYPE
123-
124- ( Stack )
125-
126- ( INC )
127- #01 INC [ #02 ] TEST-BYTE
128- #ff INC [ #00 ] TEST-BYTE
129- #fe INC [ #ff ] TEST-BYTE
130- #00 INC [ #01 ] TEST-BYTE
131- MODE
132- #0001 INC2 [ #0002 ] TEST-SHORT
133- #ffff INC2 [ #0000 ] TEST-SHORT
134- #fffe INC2 [ #ffff ] TEST-SHORT
135- #0000 INC2 [ #0001 ] TEST-SHORT
136- OPCODE
137-
138- ( POP )
139- #0a #0b POP [ #0a ] TEST-BYTE
140- #0a #0b #0c POP POP [ #0a ] TEST-BYTE
141- #0a #0b #0c ADD POP [ #0a ] TEST-BYTE
142- #0a #0b #0c POP ADD [ #15 ] TEST-BYTE
143- MODE
144- #0a0b #0c0d POP2 [ #0a0b ] TEST-SHORT
145- #0a0b #0c0d #0e0f POP2 POP2 [ #0a0b ] TEST-SHORT
146- #0a0b #0c0d #0e0f ADD2 POP2 [ #0a0b ] TEST-SHORT
147- #0a0b #0c0d #0e0f POP2 ADD2 [ #1618 ] TEST-SHORT
148- OPCODE
149-
150- ( DUP )
151- #0a #0b DUP ADD ADD [ #20 ] TEST-BYTE
152- MODE
153- #0a0b DUP2 ADD2 [ #1416 ] TEST-SHORT
154- OPCODE
155-
156- ( NIP )
157- #12 #34 #56 NIP ADD [ #68 ] TEST-BYTE
158- MODE
159- #1234 #5678 #9abc NIP2 ADD2 [ #acf0 ] TEST-SHORT
160-
161- OPCODE
162- ( SWP )
163- #02 #10 SWP DIV [ #08 ] TEST-BYTE
164- MODE
165- #0a0b #0c0d SWP2 NIP2 [ #0a0b ] TEST-SHORT
166-
167- OPCODE
168- ( OVR )
169- #02 #10 OVR DIV ADD [ #0a ] TEST-BYTE
170- MODE
171- #0a0b #0c0d OVR2 NIP2 ADD2 [ #1416 ] TEST-SHORT
172- OPCODE
173-
174- ( ROT )
175- #02 #04 #10 ROT DIV ADD [ #0c ] TEST-BYTE
176- MODE
177- #0a0b #0c0d #0c0f ROT2 ADD2 NIP2 [ #161a ] TEST-SHORT
178- TYPE
179-
180- ( Bitwise )
181-
182- ( AND )
183- #fc #3f AND [ #3c ] TEST-BYTE
184- #f0 #0f AND [ #00 ] TEST-BYTE
185- #ff #3c AND [ #3c ] TEST-BYTE
186- #02 #03 AND [ #02 ] TEST-BYTE
187- MODE
188- #f0f0 #00f0 AND2 [ #00f0 ] TEST-SHORT
189- #aaaa #5555 AND2 [ #0000 ] TEST-SHORT
190- #ffff #1234 AND2 [ #1234 ] TEST-SHORT
191- #abcd #0a0c AND2 [ #0a0c ] TEST-SHORT
192- OPCODE
193-
194- ( ORA )
195- #0f #f0 ORA [ #ff ] TEST-BYTE
196- #ab #cd ORA [ #ef ] TEST-BYTE
197- #12 #34 ORA [ #36 ] TEST-BYTE
198- #88 #10 ORA [ #98 ] TEST-BYTE
199- MODE
200- #0f0f #f0f0 ORA2 [ #ffff ] TEST-SHORT
201- #abab #cdcd ORA2 [ #efef ] TEST-SHORT
202- #1122 #1234 ORA2 [ #1336 ] TEST-SHORT
203- #8888 #1000 ORA2 [ #9888 ] TEST-SHORT
204- OPCODE
205-
206- ( EOR )
207- #00 #00 EOR [ #00 ] TEST-BYTE
208- #ff #00 EOR [ #ff ] TEST-BYTE
209- #aa #55 EOR [ #ff ] TEST-BYTE
210- #ff #ff EOR [ #00 ] TEST-BYTE
211- MODE
212- #ffff #ff00 EOR2 [ #00ff ] TEST-SHORT
213- #aaaa #5555 EOR2 [ #ffff ] TEST-SHORT
214- #1122 #1234 EOR2 [ #0316 ] TEST-SHORT
215- #8888 #1000 EOR2 [ #9888 ] TEST-SHORT
216- OPCODE
217-
218- ( SFT )
219- #ff #08 SFT [ #00 ] TEST-BYTE
220- #ff #e0 SFT [ #00 ] TEST-BYTE
221- #ff #11 SFT [ #fe ] TEST-BYTE
222- #ff #12 SFT [ #7e ] TEST-BYTE
223- MODE
224- #ffff #01 SFT2 [ #7fff ] TEST-SHORT
225- #ffff #70 SFT2 [ #ff80 ] TEST-SHORT
226- #ffff #7e SFT2 [ #0180 ] TEST-SHORT
227- #ffff #e3 SFT2 [ #c000 ] TEST-SHORT
228- TYPE
229-
230- ( Memory )
231-
232- ( STZ/LDZ )
233- #ab .zeropage/byte STZ .zeropage/byte LDZ [ #ab ] TEST-BYTE
234- #cd .zeropage/byte STZ .zeropage/byte LDZ [ #cd ] TEST-BYTE
235- MODE
236- #1234 .zeropage/short STZ2 .zeropage/short LDZ2 [ #1234 ] TEST-SHORT
237- #5678 .zeropage/short STZ2 .zeropage/short LDZ2 [ #5678 ] TEST-SHORT
238- OPCODE
239-
240- ( STR/LDR )
241- [ LIT &before1 $1 ] POP
242- [ LIT2 &before2 $2 ] POP2
243- #22 ,&before1 STR ,&before1 LDR [ #22 ] TEST-BYTE
244- #ef ,&after1 STR ,&after1 LDR [ #ef ] TEST-BYTE
245- MODE
246- #1234 ,&before2 STR2 ,&before2 LDR2 [ #1234 ] TEST-SHORT
247- #5678 ,&after2 STR2 ,&after2 LDR2 [ #5678 ] TEST-SHORT
248- [ LIT &after1 $1 ] POP
249- [ LIT2 &after2 $2 ] POP2
250- OPCODE
251-
252- ( STA/LDA )
253- #34 ;absolute/byte STA ;absolute/byte LDA [ #34 ] TEST-BYTE
254- #56 ;absolute/byte STA ;absolute/byte LDA [ #56 ] TEST-BYTE
255- MODE
256- #1234 ;absolute/short STA2 ;absolute/short LDA2 [ #1234 ] TEST-SHORT
257- #5678 ;absolute/short STA2 ;absolute/short LDA2 [ #5678 ] TEST-SHORT
258- OPCODE
259-
260- ( DEI/DEO )
261- LIT '1 EMIT
262- LIT '1 EMIT
263- TYPE
264-
265- ( Branching )
266-
267- ( JMP )
268- #12 #34 ,&reljmp JMP SWP &reljmp POP [ #12 ] TEST-BYTE
269- MODE
270- #56 #78 ;&absjmp JMP2 SWP &absjmp POP [ #56 ] TEST-BYTE
271- OPCODE
272-
273- ( JCN )
274- #23 #01 ,&reljcn-y JCN INC &reljcn-y [ #23 ] TEST-BYTE
275- #23 #00 ,&reljcn-n JCN INC &reljcn-n [ #24 ] TEST-BYTE
276- MODE
277- #23 #01 ;&absjcn-y JCN2 INC &absjcn-y [ #23 ] TEST-BYTE
278- #23 #00 ;&absjcn-n JCN2 INC &absjcn-n [ #24 ] TEST-BYTE
279- OPCODE
280-
281- ( JSR - Requires return mode )
282- #12 #34 ;routine JSR2 [ #46 ] TEST-BYTE
283- OPCODE
284-
285- ( STH )
286- #0a STH #0b STH ADDr STHr [ #15 ] TEST-BYTE
287- MODE
288- #000a STH2 #000b STH2 ADD2r STH2r [ #0015 ] TEST-SHORT
289- TYPE
290-
291- ( Keep )
292- #12 #34 ADDk ADD ADD [ #8c ] TEST-BYTE
293- OPCODE
294-
295- #010e DEO
296- #010f DEO
297-
298-BRK
299-
300-@routine ( a b -- c )
301-
302- ADD
303-
304-JMP2r
305-
306-@absolute
307- &byte $1 &short $2
+161,
-0
1@@ -0,0 +1,161 @@
2+a002 6780 0637 a00a fc60 02cf a001 2580
3+1037 a003 1716 1c20 000a a002 3960 08fc
4+a001 0f17 00a0 0217 160b 2000 1d80 1216
5+a02f 0081 80fb 1389 2000 0ca0 0ac4 a000
6+00a0 025d 6008 a003 1100 a001 5040 ffbf
7+a002 1716 0b20 001d 8012 16a0 5f30 8180
8+fb13 8920 000c a00a c4a0 0030 a002 5d60
9+0875 0311 00a0 0000 6000 0960 0126 0080
10+1917 6c21 80a8 37a0 0001 80aa 3760 0159
11+a000 0080 0f16 2000 1ca0 01b9 80ac 3780
12+a316 2000 129d 2000 0ca0 0acd a000 00a0
13+0262 6008 3222 6c21 8000 6001 3540 ffd3
14+a00a 4b60 0856 8020 60ff b4a0 0030 6008
15+4ba0 0a55 6008 45a0 0100 26a0 0100 3960
16+0849 a00a 5a60 0834 a000 3080 a837 a001
17+0039 80aa 37a0 7d02 80ae 376c 7c04 2824
18+0431 4004 3a26 0444 2504 9e28 049a 2c04
19+4b5f 0450 2e04 592d 045e 3b04 673d 046c
20+3f04 7521 047d 2304 8a22 0490 7d04 967e
21+0183 5b04 265d 0426 0075 7361 6765 3a20
22+6472 6966 626c 696d 2e72 6f6d 2069 6e2e
23+7461 6c20 6f75 742e 726f 6d0a 0050 6174
24+6800 4669 6c65 0000 4472 6966 626c 696d
25+0a55 786e 7461 6c20 4173 7365 6d62 6c65
26+720a 4279 2044 6576 696e 6520 4c75 204c
27+696e 7665 6761 0a31 3220 4170 7220 3230
28+3235 0000 a003 0434 a003 6929 2000 0ca0
29+0af4 a00a f9a0 0aa8 4007 2ca0 0304 34a0
30+038a 2920 000c a00a f4a0 0af9 a00a 9a40
31+0715 800f 1620 0010 6004 9680 0f16 2000
32+07a0 800f 1740 03d9 6ca0 601f 13a0 0060
33+116c 0680 200a 2000 1102 a000 6090 2000
34+0222 6ca0 0341 2e40 ffdf a000 6006 808f
35+0820 0004 8180 f413 316c a000 6024 4006
36+c6a0 0341 a003 0435 6ca0 0369 a003 0435
37+a001 3613 6ca0 038a a003 0435 a000 4b13
38+6c90 6000 c9a1 1d20 001c 2260 0605 2005
39+ae26 6002 32a1 1d20 0512 2260 0158 8120
40+052f 0240 011f 2134 2cc0 0034 26a0 2900
41+2920 0003 c001 59a0 2800 2920 0001 41cf
42+c0e7 5320 0003 40ff 986c c000 b4a0 7d00
43+2920 0011 c001 59cf 2000 0a80 0060 0210
44+2242 40ff 7ccf 8000 0820 0006 a000 6060
45+01f2 34a0 7b00 2920 0001 41c0 cd53 6ca0
46+0090 8180 fb13 0680 bf0b 2000 0ca0 0ac4
47+a000 90a0 0a93 6006 0e31 6ca0 90e2 1394
48+802f 0820 0009 9460 ffd5 2194 20ff f022
49+80ce 1280 0213 6ca0 00c6 1380 2f60 ffbf
50+9460 ffbb 2194 20ff f722 a000 906c 0fa0
51+01fc 94cf 0820 000c a000 0338 9420 fff2
52+22a0 ffff 426c 226c 6000 7960 02d2 4004
53+3760 0070 6002 c940 042a 6000 6726 60ff
54+9a40 0188 2160 ffaf 4001 8180 8060 04dd
55+6000 5160 03b6 4004 d480 8060 04cf 6000
56+4360 039c 4004 c680 a060 04c1 6000 3560
57+0395 4004 b460 002c 8020 4004 a660 0024
58+8040 4004 9e80 6040 0499 6000 1740 0453
59+6000 1140 03f0 2240 00b4 2240 fe8b 6000
60+0340 00c1 2194 8020 0a20 0009 a00a cda0
61+0abe 40fe 656c c000 a004 d1a4 6005 1920
62+000c 41a0 0003 3894 20ff f042 c0ff 224f
63+6c4c 4954 494e 4350 4f50 4e49 5053 5750
64+524f 5444 5550 4f56 5245 5155 4e45 5147
65+5448 4c54 484a 4d50 4a43 4e4a 5352 5354
66+484c 445a 5354 5a4c 4452 5354 524c 4441
67+5354 4144 4549 4445 4f41 4444 5355 424d
68+554c 4449 5641 4e44 4f52 4145 4f52 5346
69+5442 524b 0080 0081 80fb 1306 a00b 02a1
70+80fa 3315 6004 3680 1833 a005 606c 80ec
71+32a0 0001 3994 60ff eb60 0070 80de 336c
72+cebb 0000 0026 6000 1e21 1d20 000f 2660
73+0099 211d 2000 0660 002a 40fd b822 a00a
74+e2a0 0a9a 40fd 932f 8026 32a0 2402 26ef
75+6004 2620 000b 6004 1aaa 20ff f122 a0ff
76+ff23 626c 9460 0008 2194 20ff f722 8020
77+a024 02a1 80fa 3315 80f6 32a0 3402 2b20
78+0009 a00a c4a0 0a82 40fd 4f6c 2660 ffb7
79+211d 2000 2c26 6000 32a1 1d20 0009 2280
80+8060 027c 4000 88a1 2114 8080 1c20 0010
81+6002 6d27 3521 2194 8080 1d05 0515 226c
82+2222 a00a e2a0 0a93 40fd 0f2f a006 9a34
83+a034 0226 a000 0338 ef60 039d 2000 0fa0
84+0003 3860 038d aa20 ffe9 22a0 ffff 2362
85+6c34 2fa0 069a 34a0 3402 26a0 0003 3860
86+0371 34ef 242b 2000 0ba0 0003 3860 0363
87+aa20 ffe6 2362 6c26 60ff b0a1 1d20 000d
88+2280 3632 2780 40a0 ffff 6000 0223 6c04
89+6000 2660 0023 6000 2060 02d7 2000 3694
90+60fd 8b21 1d20 002d 60fe 2b01 2000 2694
91+6000 0621 9420 fff7 14a0 3402 a180 fa33
92+1580 f632 a07c 022b 2000 09a0 0ac4 a00a
93+7a40 fc66 6c60 ffd7 a00a cda0 0a93 40fc
94+59a0 069a 34a0 3402 a121 1480 401c 2000
95+1f26 a000 0338 9480 4119 801a 0b20 000f
96+a00a 6360 0336 2660 0332 800a 60fa 9022
97+a000 0338 6002 bcaa 20ff cd22 2240 fac0
98+6002 5020 0262 4000 0380 3013 9480 7b09
99+2000 0422 60fe 1e94 802f 0920 0004 2160
100+fcd5 9480 2609 2000 0421 60fc ca60 ff27
101+a121 af14 8080 1c20 0010 af80 006f 6001
102+1f60 000f 6000 0c60 000d d44f 8040 1d6f
103+1534 6c04 6000 00a0 0c02 a180 fa33 26a0
104+2402 2b20 0009 a00a c4a0 0a6f 40fb ab15
105+6c80 e432 a00c 0260 000b a000 0538 aa20
106+fff5 2222 6c26 a008 4635 a6a0 0004 3814
107+0680 0008 2000 1706 8001 0820 0017 0680
108+0208 2000 1c06 8003 0820 000f 026c 0260
109+0039 1502 6c02 6000 3235 6c02 6000 3235
110+6c02 6000 2c27 a000 8038 0280 0008 2000
111+06a0 0aec 6000 6e15 026c a121 34b4 a11d
112+2000 06a0 0acd 6000 5c23 6c60 ffec 4000
113+0860 ffe6 2734 6000 4824 34a0 7c02 386c
114+8000 60ff 0403 6c80 0140 fefd 8002 60fe
115+f8a1 1d20 0004 2280 006c 6000 4360 0021
116+26a0 0080 3802 2000 0203 6c03 a00a eca0
117+0060 21a0 0a89 4001 ae80 0360 fecb 6000
118+1f21 2139 6ca0 0000 2660 fde5 a000 0338
119+60fb 8821 2134 a000 0338 a00a 8940 0187
120+a001 006c 60ff f938 80f6 336c 60fa 7a21
121+9480 200a 20ff f821 9460 fa76 2194 20ff
122+f723 1440 fa6c 9460 00a3 2194 20ff f722
123+6c80 1f1c 0fb4 a04c 4928 8070 1f0f 5da0
124+0003 3894 8021 0b20 0034 9480 6b09 2000
125+06c0 805d 4000 2394 8072 0920 0006 c040
126+5d40 0016 9480 3209 2000 06c0 205d 4000
127+09a0 0acd a00a b060 fa40 2140 ffc5 224f
128+4000 4aa1 0110 0980 501f 8080 1d60 003d
129+6000 6020 0009 a00a cda0 0ab7 60fa 1b81
130+0190 2000 0802 6000 5f03 4000 2001 0110
131+2000 0660 0052 4000 1022 a00a cda0 0ab7
132+40f9 f760 0007 60ff 1004 6000 0006 60ff
133+2fa1 60ff 33a0 7c02 3815 2000 016c 60ff
134+1f07 2000 09a0 0ad5 a00a a060 f9cc a001
135+d835 6c26 6000 4101 2000 0422 8000 6c21
136+9420 fff0 2280 016c e000 00c0 407f 6000
137+27c0 000f 7821 9420 fff1 226f 6c06 8004
138+1f60 0001 0480 0f1c 800a 8b20 0005 1980
139+6118 6c02 8030 186c 9480 3019 0680 090a
140+0c6c 8027 1906 800a 1980 050a 0c6c 0280
141+ff6c 2194 20ff fb21 6c2f 9480 210b 2000
142+0c94 d44f 0920 0005 2161 40ff ed14 8021
143+0b54 4f80 210b 1c6c b425 b425 280f 2134
144+2421 3428 4f1c 6c80 0f16 2000 2b60 002c
145+8020 60f7 8a24 6000 23a0 0a6c 6000 1d60
146+001a a00a 5560 0014 a000 9060 000e 800a
147+60f7 6ca0 010f 176c 2222 226c 9406 2000
148+0302 226c 60f7 5821 40ff f1e0 ff00 a000
149+0abb af3a 396f 419d 20ff f322 0380 3018
150+60f7 3c47 58cf 20ff f362 6c41 7373 656d
151+626c 6564 0020 696e 2000 2062 7974 6573
152+2e0a 002d 2d20 556e 7573 6564 3a20 0052
153+6566 6572 656e 6365 7300 5379 6d62 6f6c
154+7300 4d61 6372 6f73 0052 6566 6572 656e
155+6365 0053 796d 626f 6c00 4d61 6372 6f00
156+5772 6974 696e 6700 436f 6d6d 656e 7400
157+4f70 636f 6465 004e 756d 6265 7200 546f
158+6b65 6e00 6578 6365 6564 6564 0069 6e76
159+616c 6964 0069 6e20 7a65 726f 2d70 6167
160+6500 6475 706c 6963 6174 6500 746f 6f20
161+6661 7200 6f70 656e 002e 2e00 5245 5345
162+54
+0,
-272
1@@ -1,272 +0,0 @@
2-( bios )
3-
4-|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
5-|10 @Console &vector $2 &read $1 &pad $5 &write $1
6-|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
7-|80 @Controller &vector $2 &button $1 &key $1
8-|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &pad $3 &scrollx $2 &scrolly $2
9-|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
10-
11-|100
12-
13-@on-reset ( -> )
14- ;on-frame .Screen/vector DEO2
15- .Screen/height DEI2 #0030 SUB2 ,on-frame/anchor-y STR2
16- get-metadata BRK
17-
18-@on-frame ( -> )
19- [ LIT &f $1 ] INCk ,&f STR
20- #07 AND ?{
21- #0008 .Screen/x DEO2
22- [ LIT2 &anchor-y $2 ] .Screen/y DEO2
23- #8000 .System/wst DEI ;dict/wst-txt <draw-stack>
24- #0008 .Screen/x DEO2
25- .Screen/y DEI2k #0019 ADD2 ROT DEO2
26- #8100 .System/rst DEI ;dict/rst-txt <draw-stack>
27- ( | metadata )
28- [ LIT &no-meta 01 ] ?{
29- #0028 .Screen/x DEO2
30- #0008 .Screen/y DEO2
31- #01 ;<draw-char>/color STA
32- ;metadata/body <draw-text>
33- [ LIT2 &icon $2 ] ORA ?{ BRK }
34- ( | icon )
35- [ LIT2 26 -Screen/auto ] DEO
36- #0008 DUP2 .Screen/x DEO2
37- .Screen/y DEO2
38- ;icon .Screen/addr DEO2
39- [ LIT2 c5 -Screen/sprite ] DEOk DEOk DEO } }
40- BRK
41-
42-(
43-@|core )
44-
45-@get-metadata ( -- )
46- ;metainit-cmd .System/expansion DEO2
47- ( a ) ,metaloc/litport LDR2 #8006 EQU2
48- ( b ) ,metaloc/opc LDR #37 EQU AND ?{ JMP2r }
49- ( | load )
50- ,metaloc/addr LDR2 ;metaload-cmd/src STA2
51- ;metaload-cmd .System/expansion DEO2
52- #00 ;on-frame/no-meta STA
53- ;metadata/body scap INC2 LDAk ?{ POP2 JMP2r }
54- ( | fields )
55- LDAk STH
56- INC2 DUP2 #00 STHr #03 MUL ADD2 SWP2
57- &>l ( -- )
58- LDAk #83 EQU ?{
59- #0003 ADD2 GTH2k ?&>l
60- POP2 POP2 JMP2r }
61- ( | icon )
62- INC2 LDA2 ;iconload-cmd/src STA2
63- ;iconload-cmd .System/expansion DEO2
64- ;icon ;on-frame/icon STA2
65- POP2 JMP2r
66-
67-@metaloc $1 &addr $2 &litport $2 &opc $1
68-
69-@metainit-cmd [ 01 0006 0001 0100 0000 =metaloc ]
70-
71-@metaload-cmd [ 01 0080 0001 &src $2 0000 =metadata ]
72-
73-@iconload-cmd [ 01 0090 0001 &src $2 0000 =icon ]
74-
75-(
76-@|drawing )
77-
78-%<draw-space> ( -- ) {
79- .Screen/x DEI2k #0008 ADD2 ROT DEO2 }
80-
81-@<draw-stack> ( addr* ptr name* -- )
82- <draw-text>
83- <draw-space>
84- #03 ;<draw-char>/color STA
85- DUP <draw-byte>
86- <draw-space>
87- #01 ;<draw-char>/color STA
88- #08 SUB #00 SWP ADD2 DUP2 #0008 ADD2 SWP2 STHk
89- &>l ( -- )
90- STHkr #80 LTH #02 SWP SUB ;<draw-char>/color STA
91- LDAk <draw-byte>
92- STHkr #ff NEQ ?{
93- [ LIT2 25 -Screen/auto ] DEO
94- ;spacer-icn .Screen/addr DEO2
95- .Screen/y DEI2k #0004 SUB2 ROT DEO2
96- [ LIT2 03 -Screen/sprite ] DEO
97- .Screen/x DEI2k #0008 SUB2 ROT DEO2
98- .Screen/y DEI2k #0004 ADD2 ROT DEO2 }
99- <draw-space>
100- INCr INC2 GTH2k ?&>l
101- POP2 POP2 POPr
102- ( | arrow )
103- [ LIT2 15 -Screen/auto ] DEO
104- ;direction-icn .Screen/addr DEO2
105- [ LIT2 01 -Screen/sprite ] DEO
106- JMP2r
107-
108-@<draw-text> ( str* -- )
109- .Screen/x DEI2 ,&anchor-x STR2
110- [ LIT2 15 -Screen/auto ] DEO
111- &>w ( -- )
112- LDAk #0a NEQ ?{
113- [ LIT2 &anchor-x $2 ] .Screen/x DEO2
114- .Screen/y DEI2k #0010 ADD2 ROT DEO2 !&res }
115- LDAk <draw-char> &res INC2 LDAk ?&>w
116- POP2 JMP2r
117-
118-@<draw-byte> ( byte -- )
119- [ LIT2 15 -Screen/auto ] DEO
120- DUP #04 SFT <draw-hex>
121-
122-@<draw-hex> ( byte -- )
123- #0f AND #00 SWP ;base16-lut ADD2 LDA
124-
125-@<draw-char> ( char -- )
126- #20 SUB #00 SWP #40 SFT2 ;font-icn ADD2 .Screen/addr DEO2
127- [ LIT2 &color 01 -Screen/sprite ] DEO
128- JMP2r
129-
130-(
131-@|stdlib )
132-
133-@scap ( str* -: end* )
134- INC2 & LDAk ?scap
135- JMP2r
136-
137-@<phex> ( short* -: )
138- SWP /b
139- &b ( byte -: )
140- DUP #04 SFT /c
141- &c ( byte -: )
142- #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO
143- JMP2r
144-
145-(
146-@|assets )
147-
148-@dict
149- &wst-txt "WST $1
150- &rst-txt "RST $1
151-
152-@base16-lut [ "0123456789abcdef ]
153-
154-@fill-icn [ ffff ffff ffff ffff ]
155-
156-@halftone-icn [ aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55 ]
157-
158-@spacer-icn [
159- 0010 0010 0010 0010 0010 0010 0010 0010
160- 0010 0010 0010 0010 ]
161-
162-@direction-icn [ 0000 0000 0000 2040 8040 2000 0000 0000 ]
163-
164-@font-icn [
165- 0000 0000 0000 0000 0000 0000 0000 0000
166- 0038 3838 3838 3810 1010 1000 0010 3810
167- 6c6c 2424 4800 0000 0000 0000 0000 0000
168- 0012 1212 7f24 2424 2424 fe48 4848 4800
169- 1038 5492 9690 5038 1412 d292 9478 1010
170- 0262 9494 9498 6810 102c 3252 5252 8c80
171- 0030 4848 4850 202e 5454 9488 8c72 0000
172- e0e0 2020 c000 0000 0000 0000 0000 0000
173- 0204 0808 1010 1010 1010 1010 0808 0402
174- 8040 2020 1010 1010 1010 1010 2020 4080
175- 0000 0010 3892 d638 d692 3810 0000 0000
176- 0000 0010 1010 10fe 1010 1010 0000 0000
177- 0000 0000 0000 0000 0000 00e0 e020 20c0
178- 0000 0000 0000 00fe 0000 0000 0000 0000
179- 0000 0000 0000 0000 0000 0040 e0e0 4000
180- 0202 0404 0808 0810 1010 2020 4040 8080
181- 0018 2424 4242 4242 4242 4242 2424 1800
182- 0010 7010 1010 1010 1010 1010 107c 0000
183- 0018 2442 6202 0408 0810 2022 427e 0000
184- 0038 4482 8202 0438 0402 8282 4438 0000
185- 0008 1828 2848 4888 88fe 0808 083c 0000
186- 00fc 8080 80b8 c482 0202 c282 4438 0000
187- 003c 4246 8080 b8c4 8282 8282 4438 0000
188- 00fe 8282 0404 0408 0808 0810 1010 1000
189- 0038 4482 8282 4438 4482 8282 4438 0000
190- 0038 4482 8282 8246 3a02 0282 4438 0000
191- 0000 0000 0038 3800 0000 0000 3838 0000
192- 0000 0000 0038 3800 0000 0038 3818 1030
193- 0204 0408 0810 1020 2010 1008 0804 0402
194- 0000 0000 00fe 0000 00fe 0000 0000 0000
195- 8040 4020 2010 1008 0810 1020 2040 4080
196- 0038 4482 c202 0404 0810 1000 0010 3810
197- 003c 4282 9aa6 a2a2 a2a6 9a80 423c 0000
198- 0010 2828 2844 4444 447c 8282 82c6 0000
199- 00f8 4442 4242 4478 4442 4242 42fc 0000
200- 003a 4642 8080 8080 8080 8242 423c 0000
201- 00f8 4444 4242 4242 4242 4244 44f8 0000
202- 00fe 4242 4048 4878 4848 4242 42fe 0000
203- 00fe 4242 4048 4878 4848 4040 40f0 0000
204- 001a 2642 4080 808f 8282 8242 661a 0000
205- 00e7 4242 4242 7e42 4242 4242 42e7 0000
206- 00fe 1010 1010 1010 1010 1010 10fe 0000
207- 001f 0202 0202 0202 0282 8282 4438 0000
208- 00e6 4444 4848 7050 4848 4444 42e3 0000
209- 00f0 4040 4040 4040 4040 4242 42fe 0000
210- 0082 c6aa aaaa 9292 9282 8282 82c6 0000
211- 0087 c2a2 a2a2 9292 928a 8a8a 86c2 0000
212- 0038 4482 8282 8282 8282 8282 4438 0000
213- 00f8 4442 4242 4244 7840 4040 40f0 0000
214- 0038 4444 8282 8282 8282 ba44 4438 0806
215- 00f8 4442 4242 4478 4844 4444 42e3 0000
216- 0034 4c84 8080 6018 0482 8282 c4b8 0000
217- 00fe 9292 1010 1010 1010 1010 107c 0000
218- 00e7 4242 4242 4242 4242 4242 423c 0000
219- 00c6 8282 8282 4444 4444 2828 1010 0000
220- 00c6 8282 8292 9292 aaaa aa44 4444 0000
221- 00ee 4444 2828 1028 2828 4444 82c6 0000
222- 00c6 8244 4444 2828 1010 1010 107c 0000
223- 00fe 8488 0810 1010 2020 4242 82fe 0000
224- 1e10 1010 1010 1010 1010 1010 1010 101e
225- 0080 8040 4020 2010 1008 0804 0402 0200
226- f010 1010 1010 1010 1010 1010 1010 10f0
227- 1028 4482 0000 0000 0000 0000 0000 0000
228- 0000 0000 0000 0000 0000 0000 0000 00ff
229- 3030 2020 1000 0000 0000 0000 0000 0000
230- 0000 0000 003c 4202 3e42 8282 867b 0000
231- 00c0 4040 4078 4442 4242 4242 4478 0000
232- 0000 0000 003a 4682 8080 8082 423c 0000
233- 0006 0404 043c 4484 8484 8484 443e 0000
234- 0000 0000 0038 4482 fe80 8082 423c 0000
235- 000e 1110 10fe 1010 1010 1010 107c 0000
236- 0000 0000 003b 4444 4438 4078 8482 827c
237- 00c0 4040 405c 6242 4242 4242 42e7 0000
238- 1818 0000 0078 0808 0808 0808 08ff 0000
239- 0606 0000 003e 0202 0202 0202 8282 4438
240- 00c0 4040 4042 4448 5864 4442 42e3 0000
241- 0078 0808 0808 0808 0808 0808 08ff 0000
242- 0000 0000 006c 9292 9292 9292 92db 0000
243- 0000 0000 00dc 6242 4242 4242 42e7 0000
244- 0000 0000 0038 4482 8282 8282 4438 0000
245- 0000 0000 00f8 4442 4242 4244 7840 40f0
246- 0000 0000 003e 4484 8484 8444 3c04 041e
247- 0000 0000 00ec 3222 2020 2020 20fc 0000
248- 0000 0000 003a 4642 403c 0282 c2bc 0000
249- 0000 2020 20fc 2020 2020 2022 221c 0000
250- 0000 0000 00c6 4242 4242 4242 4639 0000
251- 0000 0000 00c6 8282 4444 4428 2810 0000
252- 0000 0000 0092 9292 92aa aa44 4444 0000
253- 0000 0000 00ee 4428 2810 2828 44ee 0000
254- 0000 0000 00e7 4222 2414 0808 1090 a040
255- 0000 0000 007e 4408 0810 1022 42fe 0000
256- 0608 0808 0808 1020 1008 0808 0808 0806
257- 1010 1010 1010 1010 1010 1010 1010 1010
258- c020 2020 2020 1008 1020 2020 2020 20c0
259- 6092 0c00 0000 0000 0000 0000 0000 0000 ]
260-
261-@icon [
262- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
263- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
264- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
265- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
266- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
267- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
268- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
269- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
270- aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55 ]
271-
272-@metadata $1 &body $7f
273-
+0,
-102
1@@ -1,102 +0,0 @@
2-( uxncli format-c.rom file.bin )
3-
4-|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
5-|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
6-
7-|0000
8-
9- @src $40
10-
11-|0100
12-
13-@on-reset ( -> )
14- ;meta #06 DEO2
15- ;on-console .Console/vector DEO2
16- BRK
17-
18-@on-console ( -> )
19- .Console/read DEI .src skey ?{ BRK }
20- <print-program>
21- #800f DEO
22- BRK
23-
24-@meta $1
25- ( name ) "Format(C) 0a
26- ( details ) "A 20 "C-like 20 "Formatter 0a
27- ( author ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
28- ( date ) "30 20 "Nov 20 "2023 $1
29- ( fields ) 00
30-
31-@<print-program> ( src* -- )
32- ;src .File/name DEO2
33- #0001 .File/length DEO2
34- ;dict/a <pstr>
35- ;src <print-name>
36- ;dict/b <pstr>
37- [ LIT2r 0000 ]
38- &stream ( -- )
39- ;&buf feof ?&end
40- [ LIT2 "0 18 ] DEO
41- [ LIT2 "x 18 ] DEO
42- [ LIT &buf $1 ] <phex>/b
43- [ LIT2 ", 18 ] DEO
44- #2018 DEO
45- INC2r
46- ( lb ) STHkr #0f AND ?{
47- #0a18 DEO
48- #0918 DEO }
49- !&stream
50- &end POP2r #0a18 DEO
51- ;dict/c !<pstr>
52-
53-@<print-name> ( src* -- )
54- scap/ [ LIT "/ ] srew
55- &w ( -- )
56- LDAk [ LIT ". ] EQU ?&end
57- LDAk #18 DEO
58- INC2 LDAk ?&w
59- &end POP2 JMP2r
60-
61-(
62-@|stdlib )
63-
64-@skey ( key buf -- proc )
65- OVR #21 LTH ?{
66- #00 SWP scap/ STA
67- #00 JMP2r }
68- POP2 #01 JMP2r
69-
70-@srew ( str* char -- )
71- ,&t STR
72- &w ( -- )
73- LDAk [ LIT &t $1 ] EQU ?&end
74- #0001 SUB2 LDAk ?&w
75- &end INC2 JMP2r
76-
77-@scap ( str* -- end* )
78- &w ( -- )
79- INC2 & LDAk ?&w
80- JMP2r
81-
82-@feof ( buf* -- f )
83- .File/read DEO2
84- .File/success DEI2 #0000 EQU2 JMP2r
85-
86-@<phex> ( short* -- )
87- SWP <phex>/b
88- &b ( -- )
89- DUP #04 SFT <phex>/c
90- &c ( -- )
91- #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO
92- JMP2r
93-
94-@<pstr> ( str* -- )
95- &w ( -- )
96- LDAk #18 DEO
97- INC2 & LDAk ?&w
98- POP2 JMP2r
99-
100-@dict &a "unsigned 20 "char 20 $1
101- &b "_rom[] 20 "= 20 "{ 0a 09 $1
102- &c "}; 0a 00
103-
+0,
-120
1@@ -1,120 +0,0 @@
2-#include "uxn.h"
3-
4-/*
5-Copyright (u) 2022-2023 Devine Lu Linvega, Andrew Alderwick, Andrew Richards
6-
7-Permission to use, copy, modify, and distribute this software for any
8-purpose with or without fee is hereby granted, provided that the above
9-copyright notice and this permission notice appear in all copies.
10-
11-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12-WITH REGARD TO THIS SOFTWARE.
13-*/
14-
15-/* Registers
16-[ Z ][ Y ][ X ][ L ][ N ][ T ] <
17-[ . ][ . ][ . ][ H2 ][ . ] <
18-[ L2 ][ N2 ][ T2 ] <
19-*/
20-
21-#define T *(s->dat + s->ptr)
22-#define N *(s->dat + (Uint8)(s->ptr - 1))
23-#define L *(s->dat + (Uint8)(s->ptr - 2))
24-#define X *(s->dat + (Uint8)(s->ptr - 3))
25-#define Y *(s->dat + (Uint8)(s->ptr - 4))
26-#define Z *(s->dat + (Uint8)(s->ptr - 5))
27-#define T2 (N << 8 | T)
28-#define H2 (L << 8 | N)
29-#define N2 (X << 8 | L)
30-#define L2 (Z << 8 | Y)
31-#define T2_(v) { r = (v); T = r; N = r >> 8; }
32-#define N2_(v) { r = (v); L = r; X = r >> 8; }
33-#define L2_(v) { r = (v); Y = r; Z = r >> 8; }
34-#define FLIP(y) { s = ins & 0x40 ? &uxn.wst : &uxn.rst; s->ptr += y; }
35-#define SET(x, y) { s->ptr += (ins & 0x80) ? x + y : y; }
36-
37-int
38-uxn_eval(Uint16 pc)
39-{
40- Uint16 t, n, l, x, r;
41- Uint8 *rr;
42- if(!pc || uxn.dev[0x0f]) return 0;
43- for(;;) {
44- Uint8 ins = uxn.ram[pc++];
45- if(ins & 0x1f) {
46- Stack *s = ins & 0x40 ? &uxn.rst : &uxn.wst;
47- switch(ins & 0x3f) {
48- case 0x01: /* INC */ t=T; SET(1, 0) T = t + 1; break;
49- case 0x21: /* INC2 */ t=T2; SET(2, 0) T2_(t + 1) break;
50- case 0x02: /* POP */ SET(1,-1) break;
51- case 0x22: /* POP2 */ SET(2,-2) break;
52- case 0x03: /* NIP */ t=T; SET(2,-1) T = t; break;
53- case 0x23: /* NIP2 */ t=T,n=N; SET(4,-2) T = t, N = n; break;
54- case 0x04: /* SWP */ t=T;n=N; SET(2, 0) T = n, N = t; break;
55- case 0x24: /* SWP2 */ t=T,n=N,l=L,x=X;SET(4, 0) T = l, N = x, L = t, X = n; break;
56- case 0x05: /* ROT */ t=T,n=N,l=L; SET(3, 0) T = l, N = t, L = n; break;
57- case 0x25: /* ROT2 */ t=T2,n=N2,l=L2; SET(6, 0) T2_(l) N2_(t) L2_(n) break;
58- case 0x06: /* DUP */ t=T; SET(1, 1) T = t, N = t; break;
59- case 0x26: /* DUP2 */ t=T,n=N; SET(2, 2) T = t, N = n, L = t, X = n; break;
60- case 0x07: /* OVR */ t=T,n=N; SET(2, 1) T = n, N = t, L = n; break;
61- case 0x27: /* OVR2 */ t=T,n=N,l=L,x=X;SET(4, 2) T = l, N = x, L = t, X = n, Y = l, Z = x; break;
62- case 0x08: /* EQU */ t=T,n=N; SET(2,-1) T = n == t; break;
63- case 0x28: /* EQU2 */ t=T2,n=N2; SET(4,-3) T = n == t; break;
64- case 0x09: /* NEQ */ t=T,n=N; SET(2,-1) T = n != t; break;
65- case 0x29: /* NEQ2 */ t=T2,n=N2; SET(4,-3) T = n != t; break;
66- case 0x0a: /* GTH */ t=T,n=N; SET(2,-1) T = n > t; break;
67- case 0x2a: /* GTH2 */ t=T2,n=N2; SET(4,-3) T = n > t; break;
68- case 0x0b: /* LTH */ t=T,n=N; SET(2,-1) T = n < t; break;
69- case 0x2b: /* LTH2 */ t=T2,n=N2; SET(4,-3) T = n < t; break;
70- case 0x0c: /* JMP */ t=T; SET(1,-1) pc += (Sint8)t; break;
71- case 0x2c: /* JMP2 */ t=T2; SET(2,-2) pc = t; break;
72- case 0x0d: /* JCN */ t=T,n=N; SET(2,-2) if(n) pc += (Sint8)t; break;
73- case 0x2d: /* JCN2 */ t=T2,n=L; SET(3,-3) if(n) pc = t; break;
74- case 0x0e: /* JSR */ t=T; SET(1,-1) FLIP(2) T2_(pc) pc += (Sint8)t; break;
75- case 0x2e: /* JSR2 */ t=T2; SET(2,-2) FLIP(2) T2_(pc) pc = t; break;
76- case 0x0f: /* STH */ t=T; SET(1,-1) FLIP(1) T = t; break;
77- case 0x2f: /* STH2 */ t=T,n=N; SET(2,-2) FLIP(2) T = t, N = n; break;
78- case 0x10: /* LDZ */ t=T; SET(1, 0) T = uxn.ram[t]; break;
79- case 0x30: /* LDZ2 */ t=T; SET(1, 1) N = uxn.ram[t++], T = uxn.ram[(Uint8)t]; break;
80- case 0x11: /* STZ */ t=T,n=N; SET(2,-2) uxn.ram[t] = n; break;
81- case 0x31: /* STZ2 */ t=T,n=H2; SET(3,-3) uxn.ram[t++] = n >> 8, uxn.ram[(Uint8)t] = n; break;
82- case 0x12: /* LDR */ t=T; SET(1, 0) r = pc + (Sint8)t, T = uxn.ram[r]; break;
83- case 0x32: /* LDR2 */ t=T; SET(1, 1) r = pc + (Sint8)t, N = uxn.ram[r++], T = uxn.ram[r]; break;
84- case 0x13: /* STR */ t=T,n=N; SET(2,-2) r = pc + (Sint8)t, uxn.ram[r] = n; break;
85- case 0x33: /* STR2 */ t=T,n=H2; SET(3,-3) r = pc + (Sint8)t, uxn.ram[r++] = n >> 8, uxn.ram[r] = n; break;
86- case 0x14: /* LDA */ t=T2; SET(2,-1) T = uxn.ram[t]; break;
87- case 0x34: /* LDA2 */ t=T2; SET(2, 0) N = uxn.ram[t++], T = uxn.ram[t]; break;
88- case 0x15: /* STA */ t=T2,n=L; SET(3,-3) uxn.ram[t] = n; break;
89- case 0x35: /* STA2 */ t=T2,n=N2; SET(4,-4) uxn.ram[t++] = n >> 8, uxn.ram[t] = n; break;
90- case 0x16: /* DEI */ t=T; SET(1, 0) T = emu_dei(t); break;
91- case 0x36: /* DEI2 */ t=T; SET(1, 1) N = emu_dei(t++), T = emu_dei(t); break;
92- case 0x17: /* DEO */ t=T,n=N; SET(2,-2) emu_deo(t, n); break;
93- case 0x37: /* DEO2 */ t=T,n=N,l=L; SET(3,-3) emu_deo(t++, l), emu_deo(t, n); break;
94- case 0x18: /* ADD */ t=T,n=N; SET(2,-1) T = n + t; break;
95- case 0x38: /* ADD2 */ t=T2,n=N2; SET(4,-2) T2_(n + t) break;
96- case 0x19: /* SUB */ t=T,n=N; SET(2,-1) T = n - t; break;
97- case 0x39: /* SUB2 */ t=T2,n=N2; SET(4,-2) T2_(n - t) break;
98- case 0x1a: /* MUL */ t=T,n=N; SET(2,-1) T = n * t; break;
99- case 0x3a: /* MUL2 */ t=T2,n=N2; SET(4,-2) T2_(n * t) break;
100- case 0x1b: /* DIV */ t=T,n=N; SET(2,-1) T = t ? n / t : 0; break;
101- case 0x3b: /* DIV2 */ t=T2,n=N2; SET(4,-2) T2_(t ? n / t : 0) break;
102- case 0x1c: /* AND */ t=T,n=N; SET(2,-1) T = n & t; break;
103- case 0x3c: /* AND2 */ t=T2,n=N2; SET(4,-2) T2_(n & t) break;
104- case 0x1d: /* ORA */ t=T,n=N; SET(2,-1) T = n | t; break;
105- case 0x3d: /* ORA2 */ t=T2,n=N2; SET(4,-2) T2_(n | t) break;
106- case 0x1e: /* EOR */ t=T,n=N; SET(2,-1) T = n ^ t; break;
107- case 0x3e: /* EOR2 */ t=T2,n=N2; SET(4,-2) T2_(n ^ t) break;
108- case 0x1f: /* SFT */ t=T,n=N; SET(2,-1) T = n >> (t & 0xf) << (t >> 4); break;
109- case 0x3f: /* SFT2 */ t=T,n=H2; SET(3,-1) T2_(n >> (t & 0xf) << (t >> 4)) break; }
110- } else
111- switch(ins) {
112- case 0x00: /* BRK */ return 1;
113- case 0x20: /* JCI */ if(!uxn.wst.dat[uxn.wst.ptr--]) { pc += 2; break; } /* fall */
114- case 0x40: /* JMI */ rr = uxn.ram + pc, pc += 2 + PEEK2(rr); break;
115- case 0x60: /* JSI */ rr = uxn.ram + pc, pc += 2, uxn.rst.dat[++uxn.rst.ptr] = pc >> 8, uxn.rst.dat[++uxn.rst.ptr] = pc, pc += PEEK2(rr); break;
116- case 0xa0: /* LIT2 */ uxn.wst.dat[++uxn.wst.ptr] = uxn.ram[pc++]; /* fall */
117- case 0x80: /* LIT */ uxn.wst.dat[++uxn.wst.ptr] = uxn.ram[pc++]; break;
118- case 0xe0: /* LIT2r */ uxn.rst.dat[++uxn.rst.ptr] = uxn.ram[pc++]; /* fall */
119- case 0xc0: /* LITr */ uxn.rst.dat[++uxn.rst.ptr] = uxn.ram[pc++]; break; }
120- }
121-}
+0,
-2037
1@@ -1,2037 +0,0 @@
2-/* $Xorg: keysymdef.h,v 1.4 2001/02/09 02:03:23 $ */
3-
4-/***********************************************************
5-Copyright 1987, 1994, 1998 The Open Group
6-
7-Permission to use, copy, modify, distribute, and sell this software and its
8-documentation for any purpose is hereby granted without fee, provided that
9-the above copyright notice appear in all copies and that both that
10-copyright notice and this permission notice appear in supporting
11-documentation.
12-
13-The above copyright notice and this permission notice shall be included
14-in all copies or substantial portions of the Software.
15-
16-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
20-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22-OTHER DEALINGS IN THE SOFTWARE.
23-
24-Except as contained in this notice, the name of The Open Group shall
25-not be used in advertising or otherwise to promote the sale, use or
26-other dealings in this Software without prior written authorization
27-from The Open Group.
28-
29-
30-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
31-
32- All Rights Reserved
33-
34-Permission to use, copy, modify, and distribute this software and its
35-documentation for any purpose and without fee is hereby granted,
36-provided that the above copyright notice appear in all copies and that
37-both that copyright notice and this permission notice appear in
38-supporting documentation, and that the name of Digital not be
39-used in advertising or publicity pertaining to distribution of the
40-software without specific, written prior permission.
41-
42-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
43-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
44-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
46-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
47-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48-SOFTWARE.
49-
50-******************************************************************/
51-/* $XFree86: $ */
52-
53-/*
54- * The "X11 Window System Protocol" standard defines in Appendix A the
55- * keysym codes. These 29-bit integer values identify characters or
56- * functions associated with each key (e.g., via the visible
57- * engraving) of a keyboard layout. This file assigns mnemonic macro
58- * names for these keysyms.
59- *
60- * This file is also compiled (by xc/lib/X11/util/makekeys.c) into
61- * hash tables that can be accessed with X11 library functions such as
62- * XStringToKeysym() and XKeysymToString().
63- *
64- * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
65- * character, this is noted in a comment that provides both the U+xxxx
66- * Unicode position, as well as the official Unicode name of the
67- * character.
68- *
69- * Where the correspondence is either not one-to-one or semantically
70- * unclear, the Unicode position and name are enclosed in
71- * parentheses. Such legacy keysyms should be considered deprecated
72- * and are not recommended for use in future keyboard mappings.
73- *
74- * For any future extension of the keysyms with characters already
75- * found in ISO 10646 / Unicode, the following algorithm shall be
76- * used. The new keysym code position will simply be the character's
77- * Unicode number plus 0x01000000. The keysym values in the range
78- * 0x01000100 to 0x0110ffff are reserved to represent Unicode
79- * characters in the range U+0100 to U+10FFFF.
80- *
81- * While most newer Unicode-based X11 clients do already accept
82- * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
83- * will remain necessary for clients -- in the interest of
84- * compatibility with existing servers -- to also understand the
85- * existing legacy keysym values in the range 0x0100 to 0x20ff.
86- *
87- * Where several mnemonic names are defined for the same keysym in this
88- * file, all but the first one listed should be considered deprecated.
89- *
90- * Mnemonic names for keysyms are defined in this file with lines
91- * that match one of these Perl regular expressions:
92- *
93- * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
94- * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
95- * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
96- *
97- * When adding new keysyms to this file, do not forget to also update the
98- * mappings in xc/lib/X11/KeyBind.c and the protocol specification in
99- * xc/doc/specs/XProtocol/X11.keysyms.
100- */
101-
102-#define XK_VoidSymbol 0xffffff /* Void symbol */
103-
104-#ifdef XK_MISCELLANY
105-/*
106- * TTY function keys, cleverly chosen to map to ASCII, for convenience of
107- * programming, but could have been arbitrary (at the cost of lookup
108- * tables in client code).
109- */
110-
111-#define XK_BackSpace 0xff08 /* Back space, back char */
112-#define XK_Tab 0xff09
113-#define XK_Linefeed 0xff0a /* Linefeed, LF */
114-#define XK_Clear 0xff0b
115-#define XK_Return 0xff0d /* Return, enter */
116-#define XK_Pause 0xff13 /* Pause, hold */
117-#define XK_Scroll_Lock 0xff14
118-#define XK_Sys_Req 0xff15
119-#define XK_Escape 0xff1b
120-#define XK_Delete 0xffff /* Delete, rubout */
121-
122-
123-
124-/* International & multi-key character composition */
125-
126-#define XK_Multi_key 0xff20 /* Multi-key character compose */
127-#define XK_Codeinput 0xff37
128-#define XK_SingleCandidate 0xff3c
129-#define XK_MultipleCandidate 0xff3d
130-#define XK_PreviousCandidate 0xff3e
131-
132-/* Japanese keyboard support */
133-
134-#define XK_Kanji 0xff21 /* Kanji, Kanji convert */
135-#define XK_Muhenkan 0xff22 /* Cancel Conversion */
136-#define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */
137-#define XK_Henkan 0xff23 /* Alias for Henkan_Mode */
138-#define XK_Romaji 0xff24 /* to Romaji */
139-#define XK_Hiragana 0xff25 /* to Hiragana */
140-#define XK_Katakana 0xff26 /* to Katakana */
141-#define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
142-#define XK_Zenkaku 0xff28 /* to Zenkaku */
143-#define XK_Hankaku 0xff29 /* to Hankaku */
144-#define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
145-#define XK_Touroku 0xff2b /* Add to Dictionary */
146-#define XK_Massyo 0xff2c /* Delete from Dictionary */
147-#define XK_Kana_Lock 0xff2d /* Kana Lock */
148-#define XK_Kana_Shift 0xff2e /* Kana Shift */
149-#define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */
150-#define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */
151-#define XK_Kanji_Bangou 0xff37 /* Codeinput */
152-#define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
153-#define XK_Mae_Koho 0xff3e /* Previous Candidate */
154-
155-/* 0xff31 thru 0xff3f are under XK_KOREAN */
156-
157-/* Cursor control & motion */
158-
159-#define XK_Home 0xff50
160-#define XK_Left 0xff51 /* Move left, left arrow */
161-#define XK_Up 0xff52 /* Move up, up arrow */
162-#define XK_Right 0xff53 /* Move right, right arrow */
163-#define XK_Down 0xff54 /* Move down, down arrow */
164-#define XK_Prior 0xff55 /* Prior, previous */
165-#define XK_Page_Up 0xff55
166-#define XK_Next 0xff56 /* Next */
167-#define XK_Page_Down 0xff56
168-#define XK_End 0xff57 /* EOL */
169-#define XK_Begin 0xff58 /* BOL */
170-
171-
172-/* Misc functions */
173-
174-#define XK_Select 0xff60 /* Select, mark */
175-#define XK_Print 0xff61
176-#define XK_Execute 0xff62 /* Execute, run, do */
177-#define XK_Insert 0xff63 /* Insert, insert here */
178-#define XK_Undo 0xff65
179-#define XK_Redo 0xff66 /* Redo, again */
180-#define XK_Menu 0xff67
181-#define XK_Find 0xff68 /* Find, search */
182-#define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */
183-#define XK_Help 0xff6a /* Help */
184-#define XK_Break 0xff6b
185-#define XK_Mode_switch 0xff7e /* Character set switch */
186-#define XK_script_switch 0xff7e /* Alias for mode_switch */
187-#define XK_Num_Lock 0xff7f
188-
189-/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
190-
191-#define XK_KP_Space 0xff80 /* Space */
192-#define XK_KP_Tab 0xff89
193-#define XK_KP_Enter 0xff8d /* Enter */
194-#define XK_KP_F1 0xff91 /* PF1, KP_A, ... */
195-#define XK_KP_F2 0xff92
196-#define XK_KP_F3 0xff93
197-#define XK_KP_F4 0xff94
198-#define XK_KP_Home 0xff95
199-#define XK_KP_Left 0xff96
200-#define XK_KP_Up 0xff97
201-#define XK_KP_Right 0xff98
202-#define XK_KP_Down 0xff99
203-#define XK_KP_Prior 0xff9a
204-#define XK_KP_Page_Up 0xff9a
205-#define XK_KP_Next 0xff9b
206-#define XK_KP_Page_Down 0xff9b
207-#define XK_KP_End 0xff9c
208-#define XK_KP_Begin 0xff9d
209-#define XK_KP_Insert 0xff9e
210-#define XK_KP_Delete 0xff9f
211-#define XK_KP_Equal 0xffbd /* Equals */
212-#define XK_KP_Multiply 0xffaa
213-#define XK_KP_Add 0xffab
214-#define XK_KP_Separator 0xffac /* Separator, often comma */
215-#define XK_KP_Subtract 0xffad
216-#define XK_KP_Decimal 0xffae
217-#define XK_KP_Divide 0xffaf
218-
219-#define XK_KP_0 0xffb0
220-#define XK_KP_1 0xffb1
221-#define XK_KP_2 0xffb2
222-#define XK_KP_3 0xffb3
223-#define XK_KP_4 0xffb4
224-#define XK_KP_5 0xffb5
225-#define XK_KP_6 0xffb6
226-#define XK_KP_7 0xffb7
227-#define XK_KP_8 0xffb8
228-#define XK_KP_9 0xffb9
229-
230-
231-
232-/*
233- * Auxilliary functions; note the duplicate definitions for left and right
234- * function keys; Sun keyboards and a few other manufactures have such
235- * function key groups on the left and/or right sides of the keyboard.
236- * We've not found a keyboard with more than 35 function keys total.
237- */
238-
239-#define XK_F1 0xffbe
240-#define XK_F2 0xffbf
241-#define XK_F3 0xffc0
242-#define XK_F4 0xffc1
243-#define XK_F5 0xffc2
244-#define XK_F6 0xffc3
245-#define XK_F7 0xffc4
246-#define XK_F8 0xffc5
247-#define XK_F9 0xffc6
248-#define XK_F10 0xffc7
249-#define XK_F11 0xffc8
250-#define XK_L1 0xffc8
251-#define XK_F12 0xffc9
252-#define XK_L2 0xffc9
253-#define XK_F13 0xffca
254-#define XK_L3 0xffca
255-#define XK_F14 0xffcb
256-#define XK_L4 0xffcb
257-#define XK_F15 0xffcc
258-#define XK_L5 0xffcc
259-#define XK_F16 0xffcd
260-#define XK_L6 0xffcd
261-#define XK_F17 0xffce
262-#define XK_L7 0xffce
263-#define XK_F18 0xffcf
264-#define XK_L8 0xffcf
265-#define XK_F19 0xffd0
266-#define XK_L9 0xffd0
267-#define XK_F20 0xffd1
268-#define XK_L10 0xffd1
269-#define XK_F21 0xffd2
270-#define XK_R1 0xffd2
271-#define XK_F22 0xffd3
272-#define XK_R2 0xffd3
273-#define XK_F23 0xffd4
274-#define XK_R3 0xffd4
275-#define XK_F24 0xffd5
276-#define XK_R4 0xffd5
277-#define XK_F25 0xffd6
278-#define XK_R5 0xffd6
279-#define XK_F26 0xffd7
280-#define XK_R6 0xffd7
281-#define XK_F27 0xffd8
282-#define XK_R7 0xffd8
283-#define XK_F28 0xffd9
284-#define XK_R8 0xffd9
285-#define XK_F29 0xffda
286-#define XK_R9 0xffda
287-#define XK_F30 0xffdb
288-#define XK_R10 0xffdb
289-#define XK_F31 0xffdc
290-#define XK_R11 0xffdc
291-#define XK_F32 0xffdd
292-#define XK_R12 0xffdd
293-#define XK_F33 0xffde
294-#define XK_R13 0xffde
295-#define XK_F34 0xffdf
296-#define XK_R14 0xffdf
297-#define XK_F35 0xffe0
298-#define XK_R15 0xffe0
299-
300-/* Modifiers */
301-
302-#define XK_Shift_L 0xffe1 /* Left shift */
303-#define XK_Shift_R 0xffe2 /* Right shift */
304-#define XK_Control_L 0xffe3 /* Left control */
305-#define XK_Control_R 0xffe4 /* Right control */
306-#define XK_Caps_Lock 0xffe5 /* Caps lock */
307-#define XK_Shift_Lock 0xffe6 /* Shift lock */
308-
309-#define XK_Meta_L 0xffe7 /* Left meta */
310-#define XK_Meta_R 0xffe8 /* Right meta */
311-#define XK_Alt_L 0xffe9 /* Left alt */
312-#define XK_Alt_R 0xffea /* Right alt */
313-#define XK_Super_L 0xffeb /* Left super */
314-#define XK_Super_R 0xffec /* Right super */
315-#define XK_Hyper_L 0xffed /* Left hyper */
316-#define XK_Hyper_R 0xffee /* Right hyper */
317-#endif /* XK_MISCELLANY */
318-
319-/*
320- * Keyboard (XKB) Extension function and modifier keys
321- * (from Appendix C of "The X Keyboard Extension: Protocol Specification")
322- * Byte 3 = 0xfe
323- */
324-
325-#ifdef XK_XKB_KEYS
326-#define XK_ISO_Lock 0xfe01
327-#define XK_ISO_Level2_Latch 0xfe02
328-#define XK_ISO_Level3_Shift 0xfe03
329-#define XK_ISO_Level3_Latch 0xfe04
330-#define XK_ISO_Level3_Lock 0xfe05
331-#define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
332-#define XK_ISO_Group_Latch 0xfe06
333-#define XK_ISO_Group_Lock 0xfe07
334-#define XK_ISO_Next_Group 0xfe08
335-#define XK_ISO_Next_Group_Lock 0xfe09
336-#define XK_ISO_Prev_Group 0xfe0a
337-#define XK_ISO_Prev_Group_Lock 0xfe0b
338-#define XK_ISO_First_Group 0xfe0c
339-#define XK_ISO_First_Group_Lock 0xfe0d
340-#define XK_ISO_Last_Group 0xfe0e
341-#define XK_ISO_Last_Group_Lock 0xfe0f
342-
343-#define XK_ISO_Left_Tab 0xfe20
344-#define XK_ISO_Move_Line_Up 0xfe21
345-#define XK_ISO_Move_Line_Down 0xfe22
346-#define XK_ISO_Partial_Line_Up 0xfe23
347-#define XK_ISO_Partial_Line_Down 0xfe24
348-#define XK_ISO_Partial_Space_Left 0xfe25
349-#define XK_ISO_Partial_Space_Right 0xfe26
350-#define XK_ISO_Set_Margin_Left 0xfe27
351-#define XK_ISO_Set_Margin_Right 0xfe28
352-#define XK_ISO_Release_Margin_Left 0xfe29
353-#define XK_ISO_Release_Margin_Right 0xfe2a
354-#define XK_ISO_Release_Both_Margins 0xfe2b
355-#define XK_ISO_Fast_Cursor_Left 0xfe2c
356-#define XK_ISO_Fast_Cursor_Right 0xfe2d
357-#define XK_ISO_Fast_Cursor_Up 0xfe2e
358-#define XK_ISO_Fast_Cursor_Down 0xfe2f
359-#define XK_ISO_Continuous_Underline 0xfe30
360-#define XK_ISO_Discontinuous_Underline 0xfe31
361-#define XK_ISO_Emphasize 0xfe32
362-#define XK_ISO_Center_Object 0xfe33
363-#define XK_ISO_Enter 0xfe34
364-
365-#define XK_dead_grave 0xfe50
366-#define XK_dead_acute 0xfe51
367-#define XK_dead_circumflex 0xfe52
368-#define XK_dead_tilde 0xfe53
369-#define XK_dead_macron 0xfe54
370-#define XK_dead_breve 0xfe55
371-#define XK_dead_abovedot 0xfe56
372-#define XK_dead_diaeresis 0xfe57
373-#define XK_dead_abovering 0xfe58
374-#define XK_dead_doubleacute 0xfe59
375-#define XK_dead_caron 0xfe5a
376-#define XK_dead_cedilla 0xfe5b
377-#define XK_dead_ogonek 0xfe5c
378-#define XK_dead_iota 0xfe5d
379-#define XK_dead_voiced_sound 0xfe5e
380-#define XK_dead_semivoiced_sound 0xfe5f
381-#define XK_dead_belowdot 0xfe60
382-#define XK_dead_hook 0xfe61
383-#define XK_dead_horn 0xfe62
384-
385-#define XK_First_Virtual_Screen 0xfed0
386-#define XK_Prev_Virtual_Screen 0xfed1
387-#define XK_Next_Virtual_Screen 0xfed2
388-#define XK_Last_Virtual_Screen 0xfed4
389-#define XK_Terminate_Server 0xfed5
390-
391-#define XK_AccessX_Enable 0xfe70
392-#define XK_AccessX_Feedback_Enable 0xfe71
393-#define XK_RepeatKeys_Enable 0xfe72
394-#define XK_SlowKeys_Enable 0xfe73
395-#define XK_BounceKeys_Enable 0xfe74
396-#define XK_StickyKeys_Enable 0xfe75
397-#define XK_MouseKeys_Enable 0xfe76
398-#define XK_MouseKeys_Accel_Enable 0xfe77
399-#define XK_Overlay1_Enable 0xfe78
400-#define XK_Overlay2_Enable 0xfe79
401-#define XK_AudibleBell_Enable 0xfe7a
402-
403-#define XK_Pointer_Left 0xfee0
404-#define XK_Pointer_Right 0xfee1
405-#define XK_Pointer_Up 0xfee2
406-#define XK_Pointer_Down 0xfee3
407-#define XK_Pointer_UpLeft 0xfee4
408-#define XK_Pointer_UpRight 0xfee5
409-#define XK_Pointer_DownLeft 0xfee6
410-#define XK_Pointer_DownRight 0xfee7
411-#define XK_Pointer_Button_Dflt 0xfee8
412-#define XK_Pointer_Button1 0xfee9
413-#define XK_Pointer_Button2 0xfeea
414-#define XK_Pointer_Button3 0xfeeb
415-#define XK_Pointer_Button4 0xfeec
416-#define XK_Pointer_Button5 0xfeed
417-#define XK_Pointer_DblClick_Dflt 0xfeee
418-#define XK_Pointer_DblClick1 0xfeef
419-#define XK_Pointer_DblClick2 0xfef0
420-#define XK_Pointer_DblClick3 0xfef1
421-#define XK_Pointer_DblClick4 0xfef2
422-#define XK_Pointer_DblClick5 0xfef3
423-#define XK_Pointer_Drag_Dflt 0xfef4
424-#define XK_Pointer_Drag1 0xfef5
425-#define XK_Pointer_Drag2 0xfef6
426-#define XK_Pointer_Drag3 0xfef7
427-#define XK_Pointer_Drag4 0xfef8
428-#define XK_Pointer_Drag5 0xfefd
429-
430-#define XK_Pointer_EnableKeys 0xfef9
431-#define XK_Pointer_Accelerate 0xfefa
432-#define XK_Pointer_DfltBtnNext 0xfefb
433-#define XK_Pointer_DfltBtnPrev 0xfefc
434-
435-#endif /* XK_XKB_KEYS */
436-
437-/*
438- * 3270 Terminal Keys
439- * Byte 3 = 0xfd
440- */
441-
442-#ifdef XK_3270
443-#define XK_3270_Duplicate 0xfd01
444-#define XK_3270_FieldMark 0xfd02
445-#define XK_3270_Right2 0xfd03
446-#define XK_3270_Left2 0xfd04
447-#define XK_3270_BackTab 0xfd05
448-#define XK_3270_EraseEOF 0xfd06
449-#define XK_3270_EraseInput 0xfd07
450-#define XK_3270_Reset 0xfd08
451-#define XK_3270_Quit 0xfd09
452-#define XK_3270_PA1 0xfd0a
453-#define XK_3270_PA2 0xfd0b
454-#define XK_3270_PA3 0xfd0c
455-#define XK_3270_Test 0xfd0d
456-#define XK_3270_Attn 0xfd0e
457-#define XK_3270_CursorBlink 0xfd0f
458-#define XK_3270_AltCursor 0xfd10
459-#define XK_3270_KeyClick 0xfd11
460-#define XK_3270_Jump 0xfd12
461-#define XK_3270_Ident 0xfd13
462-#define XK_3270_Rule 0xfd14
463-#define XK_3270_Copy 0xfd15
464-#define XK_3270_Play 0xfd16
465-#define XK_3270_Setup 0xfd17
466-#define XK_3270_Record 0xfd18
467-#define XK_3270_ChangeScreen 0xfd19
468-#define XK_3270_DeleteWord 0xfd1a
469-#define XK_3270_ExSelect 0xfd1b
470-#define XK_3270_CursorSelect 0xfd1c
471-#define XK_3270_PrintScreen 0xfd1d
472-#define XK_3270_Enter 0xfd1e
473-#endif /* XK_3270 */
474-
475-/*
476- * Latin 1
477- * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
478- * Byte 3 = 0
479- */
480-#ifdef XK_LATIN1
481-#define XK_space 0x0020 /* U+0020 SPACE */
482-#define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
483-#define XK_quotedbl 0x0022 /* U+0022 QUOTATION MARK */
484-#define XK_numbersign 0x0023 /* U+0023 NUMBER SIGN */
485-#define XK_dollar 0x0024 /* U+0024 DOLLAR SIGN */
486-#define XK_percent 0x0025 /* U+0025 PERCENT SIGN */
487-#define XK_ampersand 0x0026 /* U+0026 AMPERSAND */
488-#define XK_apostrophe 0x0027 /* U+0027 APOSTROPHE */
489-#define XK_quoteright 0x0027 /* deprecated */
490-#define XK_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */
491-#define XK_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */
492-#define XK_asterisk 0x002a /* U+002A ASTERISK */
493-#define XK_plus 0x002b /* U+002B PLUS SIGN */
494-#define XK_comma 0x002c /* U+002C COMMA */
495-#define XK_minus 0x002d /* U+002D HYPHEN-MINUS */
496-#define XK_period 0x002e /* U+002E FULL STOP */
497-#define XK_slash 0x002f /* U+002F SOLIDUS */
498-#define XK_0 0x0030 /* U+0030 DIGIT ZERO */
499-#define XK_1 0x0031 /* U+0031 DIGIT ONE */
500-#define XK_2 0x0032 /* U+0032 DIGIT TWO */
501-#define XK_3 0x0033 /* U+0033 DIGIT THREE */
502-#define XK_4 0x0034 /* U+0034 DIGIT FOUR */
503-#define XK_5 0x0035 /* U+0035 DIGIT FIVE */
504-#define XK_6 0x0036 /* U+0036 DIGIT SIX */
505-#define XK_7 0x0037 /* U+0037 DIGIT SEVEN */
506-#define XK_8 0x0038 /* U+0038 DIGIT EIGHT */
507-#define XK_9 0x0039 /* U+0039 DIGIT NINE */
508-#define XK_colon 0x003a /* U+003A COLON */
509-#define XK_semicolon 0x003b /* U+003B SEMICOLON */
510-#define XK_less 0x003c /* U+003C LESS-THAN SIGN */
511-#define XK_equal 0x003d /* U+003D EQUALS SIGN */
512-#define XK_greater 0x003e /* U+003E GREATER-THAN SIGN */
513-#define XK_question 0x003f /* U+003F QUESTION MARK */
514-#define XK_at 0x0040 /* U+0040 COMMERCIAL AT */
515-#define XK_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */
516-#define XK_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */
517-#define XK_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */
518-#define XK_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */
519-#define XK_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */
520-#define XK_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */
521-#define XK_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */
522-#define XK_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */
523-#define XK_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */
524-#define XK_J 0x004a /* U+004A LATIN CAPITAL LETTER J */
525-#define XK_K 0x004b /* U+004B LATIN CAPITAL LETTER K */
526-#define XK_L 0x004c /* U+004C LATIN CAPITAL LETTER L */
527-#define XK_M 0x004d /* U+004D LATIN CAPITAL LETTER M */
528-#define XK_N 0x004e /* U+004E LATIN CAPITAL LETTER N */
529-#define XK_O 0x004f /* U+004F LATIN CAPITAL LETTER O */
530-#define XK_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */
531-#define XK_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */
532-#define XK_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */
533-#define XK_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */
534-#define XK_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */
535-#define XK_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */
536-#define XK_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */
537-#define XK_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */
538-#define XK_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */
539-#define XK_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */
540-#define XK_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */
541-#define XK_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */
542-#define XK_backslash 0x005c /* U+005C REVERSE SOLIDUS */
543-#define XK_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */
544-#define XK_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */
545-#define XK_underscore 0x005f /* U+005F LOW LINE */
546-#define XK_grave 0x0060 /* U+0060 GRAVE ACCENT */
547-#define XK_quoteleft 0x0060 /* deprecated */
548-#define XK_a 0x0061 /* U+0061 LATIN SMALL LETTER A */
549-#define XK_b 0x0062 /* U+0062 LATIN SMALL LETTER B */
550-#define XK_c 0x0063 /* U+0063 LATIN SMALL LETTER C */
551-#define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
552-#define XK_e 0x0065 /* U+0065 LATIN SMALL LETTER E */
553-#define XK_f 0x0066 /* U+0066 LATIN SMALL LETTER F */
554-#define XK_g 0x0067 /* U+0067 LATIN SMALL LETTER G */
555-#define XK_h 0x0068 /* U+0068 LATIN SMALL LETTER H */
556-#define XK_i 0x0069 /* U+0069 LATIN SMALL LETTER I */
557-#define XK_j 0x006a /* U+006A LATIN SMALL LETTER J */
558-#define XK_k 0x006b /* U+006B LATIN SMALL LETTER K */
559-#define XK_l 0x006c /* U+006C LATIN SMALL LETTER L */
560-#define XK_m 0x006d /* U+006D LATIN SMALL LETTER M */
561-#define XK_n 0x006e /* U+006E LATIN SMALL LETTER N */
562-#define XK_o 0x006f /* U+006F LATIN SMALL LETTER O */
563-#define XK_p 0x0070 /* U+0070 LATIN SMALL LETTER P */
564-#define XK_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */
565-#define XK_r 0x0072 /* U+0072 LATIN SMALL LETTER R */
566-#define XK_s 0x0073 /* U+0073 LATIN SMALL LETTER S */
567-#define XK_t 0x0074 /* U+0074 LATIN SMALL LETTER T */
568-#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */
569-#define XK_v 0x0076 /* U+0076 LATIN SMALL LETTER V */
570-#define XK_w 0x0077 /* U+0077 LATIN SMALL LETTER W */
571-#define XK_x 0x0078 /* U+0078 LATIN SMALL LETTER X */
572-#define XK_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */
573-#define XK_z 0x007a /* U+007A LATIN SMALL LETTER Z */
574-#define XK_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */
575-#define XK_bar 0x007c /* U+007C VERTICAL LINE */
576-#define XK_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */
577-#define XK_asciitilde 0x007e /* U+007E TILDE */
578-
579-#define XK_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */
580-#define XK_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */
581-#define XK_cent 0x00a2 /* U+00A2 CENT SIGN */
582-#define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */
583-#define XK_currency 0x00a4 /* U+00A4 CURRENCY SIGN */
584-#define XK_yen 0x00a5 /* U+00A5 YEN SIGN */
585-#define XK_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */
586-#define XK_section 0x00a7 /* U+00A7 SECTION SIGN */
587-#define XK_diaeresis 0x00a8 /* U+00A8 DIAERESIS */
588-#define XK_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */
589-#define XK_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */
590-#define XK_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
591-#define XK_notsign 0x00ac /* U+00AC NOT SIGN */
592-#define XK_hyphen 0x00ad /* U+00AD SOFT HYPHEN */
593-#define XK_registered 0x00ae /* U+00AE REGISTERED SIGN */
594-#define XK_macron 0x00af /* U+00AF MACRON */
595-#define XK_degree 0x00b0 /* U+00B0 DEGREE SIGN */
596-#define XK_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */
597-#define XK_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */
598-#define XK_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */
599-#define XK_acute 0x00b4 /* U+00B4 ACUTE ACCENT */
600-#define XK_mu 0x00b5 /* U+00B5 MICRO SIGN */
601-#define XK_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */
602-#define XK_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */
603-#define XK_cedilla 0x00b8 /* U+00B8 CEDILLA */
604-#define XK_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */
605-#define XK_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */
606-#define XK_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
607-#define XK_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */
608-#define XK_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */
609-#define XK_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */
610-#define XK_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */
611-#define XK_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */
612-#define XK_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */
613-#define XK_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
614-#define XK_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */
615-#define XK_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */
616-#define XK_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */
617-#define XK_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */
618-#define XK_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */
619-#define XK_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */
620-#define XK_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
621-#define XK_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
622-#define XK_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */
623-#define XK_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */
624-#define XK_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */
625-#define XK_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
626-#define XK_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */
627-#define XK_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */
628-#define XK_Eth 0x00d0 /* deprecated */
629-#define XK_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */
630-#define XK_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */
631-#define XK_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */
632-#define XK_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
633-#define XK_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */
634-#define XK_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */
635-#define XK_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */
636-#define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
637-#define XK_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
638-#define XK_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */
639-#define XK_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */
640-#define XK_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
641-#define XK_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */
642-#define XK_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */
643-#define XK_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */
644-#define XK_Thorn 0x00de /* deprecated */
645-#define XK_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */
646-#define XK_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */
647-#define XK_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */
648-#define XK_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */
649-#define XK_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */
650-#define XK_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */
651-#define XK_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */
652-#define XK_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */
653-#define XK_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */
654-#define XK_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */
655-#define XK_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
656-#define XK_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */
657-#define XK_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */
658-#define XK_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */
659-#define XK_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */
660-#define XK_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */
661-#define XK_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */
662-#define XK_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */
663-#define XK_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */
664-#define XK_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */
665-#define XK_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */
666-#define XK_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */
667-#define XK_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */
668-#define XK_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */
669-#define XK_division 0x00f7 /* U+00F7 DIVISION SIGN */
670-#define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
671-#define XK_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
672-#define XK_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */
673-#define XK_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */
674-#define XK_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */
675-#define XK_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */
676-#define XK_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */
677-#define XK_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */
678-#define XK_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
679-#endif /* XK_LATIN1 */
680-
681-/*
682- * Latin 2
683- * Byte 3 = 1
684- */
685-
686-#ifdef XK_LATIN2
687-#define XK_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */
688-#define XK_breve 0x01a2 /* U+02D8 BREVE */
689-#define XK_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
690-#define XK_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */
691-#define XK_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */
692-#define XK_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */
693-#define XK_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */
694-#define XK_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */
695-#define XK_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */
696-#define XK_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */
697-#define XK_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */
698-#define XK_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */
699-#define XK_ogonek 0x01b2 /* U+02DB OGONEK */
700-#define XK_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */
701-#define XK_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */
702-#define XK_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */
703-#define XK_caron 0x01b7 /* U+02C7 CARON */
704-#define XK_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */
705-#define XK_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */
706-#define XK_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */
707-#define XK_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */
708-#define XK_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */
709-#define XK_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */
710-#define XK_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */
711-#define XK_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */
712-#define XK_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */
713-#define XK_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */
714-#define XK_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */
715-#define XK_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */
716-#define XK_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */
717-#define XK_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */
718-#define XK_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */
719-#define XK_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */
720-#define XK_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */
721-#define XK_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */
722-#define XK_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
723-#define XK_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */
724-#define XK_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */
725-#define XK_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
726-#define XK_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */
727-#define XK_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */
728-#define XK_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */
729-#define XK_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */
730-#define XK_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */
731-#define XK_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */
732-#define XK_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */
733-#define XK_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */
734-#define XK_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */
735-#define XK_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */
736-#define XK_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */
737-#define XK_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */
738-#define XK_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */
739-#define XK_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */
740-#define XK_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */
741-#define XK_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */
742-#define XK_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */
743-#define XK_abovedot 0x01ff /* U+02D9 DOT ABOVE */
744-#endif /* XK_LATIN2 */
745-
746-/*
747- * Latin 3
748- * Byte 3 = 2
749- */
750-
751-#ifdef XK_LATIN3
752-#define XK_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */
753-#define XK_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
754-#define XK_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */
755-#define XK_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */
756-#define XK_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
757-#define XK_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */
758-#define XK_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */
759-#define XK_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */
760-#define XK_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */
761-#define XK_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */
762-#define XK_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */
763-#define XK_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
764-#define XK_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */
765-#define XK_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
766-#define XK_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */
767-#define XK_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
768-#define XK_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */
769-#define XK_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */
770-#define XK_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */
771-#define XK_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */
772-#define XK_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */
773-#define XK_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */
774-#endif /* XK_LATIN3 */
775-
776-
777-/*
778- * Latin 4
779- * Byte 3 = 3
780- */
781-
782-#ifdef XK_LATIN4
783-#define XK_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */
784-#define XK_kappa 0x03a2 /* deprecated */
785-#define XK_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */
786-#define XK_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */
787-#define XK_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */
788-#define XK_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */
789-#define XK_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */
790-#define XK_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */
791-#define XK_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */
792-#define XK_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */
793-#define XK_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */
794-#define XK_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */
795-#define XK_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */
796-#define XK_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */
797-#define XK_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */
798-#define XK_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */
799-#define XK_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */
800-#define XK_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */
801-#define XK_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */
802-#define XK_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */
803-#define XK_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */
804-#define XK_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */
805-#define XK_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */
806-#define XK_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */
807-#define XK_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */
808-#define XK_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */
809-#define XK_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */
810-#define XK_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */
811-#define XK_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */
812-#define XK_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */
813-#define XK_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */
814-#define XK_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */
815-#define XK_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */
816-#define XK_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */
817-#define XK_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */
818-#define XK_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */
819-#endif /* XK_LATIN4 */
820-
821-/*
822- * Latin 8
823- */
824-#ifdef XK_LATIN8
825-#define XK_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */
826-#define XK_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */
827-#define XK_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */
828-#define XK_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */
829-#define XK_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */
830-#define XK_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */
831-#define XK_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */
832-#define XK_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */
833-#define XK_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */
834-#define XK_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */
835-#define XK_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */
836-#define XK_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */
837-#define XK_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */
838-#define XK_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */
839-#define XK_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */
840-#define XK_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */
841-#define XK_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */
842-#define XK_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */
843-#define XK_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */
844-#define XK_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */
845-#define XK_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
846-#define XK_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */
847-#define XK_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
848-#define XK_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */
849-#define XK_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */
850-#define XK_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */
851-#endif /* XK_LATIN8 */
852-
853-/*
854- * Latin 9
855- * Byte 3 = 0x13
856- */
857-
858-#ifdef XK_LATIN9
859-#define XK_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */
860-#define XK_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */
861-#define XK_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */
862-#endif /* XK_LATIN9 */
863-
864-/*
865- * Katakana
866- * Byte 3 = 4
867- */
868-
869-#ifdef XK_KATAKANA
870-#define XK_overline 0x047e /* U+203E OVERLINE */
871-#define XK_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */
872-#define XK_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */
873-#define XK_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */
874-#define XK_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */
875-#define XK_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */
876-#define XK_kana_middledot 0x04a5 /* deprecated */
877-#define XK_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */
878-#define XK_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */
879-#define XK_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */
880-#define XK_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */
881-#define XK_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */
882-#define XK_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */
883-#define XK_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */
884-#define XK_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */
885-#define XK_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */
886-#define XK_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */
887-#define XK_kana_tu 0x04af /* deprecated */
888-#define XK_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */
889-#define XK_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */
890-#define XK_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */
891-#define XK_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */
892-#define XK_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */
893-#define XK_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */
894-#define XK_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */
895-#define XK_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */
896-#define XK_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */
897-#define XK_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */
898-#define XK_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */
899-#define XK_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */
900-#define XK_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */
901-#define XK_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */
902-#define XK_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */
903-#define XK_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */
904-#define XK_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */
905-#define XK_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */
906-#define XK_kana_TI 0x04c1 /* deprecated */
907-#define XK_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */
908-#define XK_kana_TU 0x04c2 /* deprecated */
909-#define XK_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */
910-#define XK_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */
911-#define XK_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */
912-#define XK_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */
913-#define XK_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */
914-#define XK_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */
915-#define XK_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */
916-#define XK_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */
917-#define XK_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */
918-#define XK_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */
919-#define XK_kana_HU 0x04cc /* deprecated */
920-#define XK_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */
921-#define XK_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */
922-#define XK_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */
923-#define XK_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */
924-#define XK_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */
925-#define XK_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */
926-#define XK_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */
927-#define XK_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */
928-#define XK_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */
929-#define XK_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */
930-#define XK_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */
931-#define XK_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */
932-#define XK_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */
933-#define XK_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */
934-#define XK_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */
935-#define XK_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */
936-#define XK_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */
937-#define XK_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */
938-#define XK_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
939-#define XK_kana_switch 0xff7e /* Alias for mode_switch */
940-#endif /* XK_KATAKANA */
941-
942-/*
943- * Arabic
944- * Byte 3 = 5
945- */
946-
947-#ifdef XK_ARABIC
948-#define XK_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */
949-#define XK_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */
950-#define XK_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */
951-#define XK_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */
952-#define XK_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */
953-#define XK_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */
954-#define XK_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */
955-#define XK_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */
956-#define XK_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */
957-#define XK_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */
958-#define XK_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */
959-#define XK_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */
960-#define XK_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */
961-#define XK_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */
962-#define XK_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */
963-#define XK_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */
964-#define XK_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */
965-#define XK_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */
966-#define XK_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */
967-#define XK_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */
968-#define XK_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */
969-#define XK_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */
970-#define XK_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */
971-#define XK_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */
972-#define XK_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */
973-#define XK_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */
974-#define XK_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */
975-#define XK_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */
976-#define XK_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */
977-#define XK_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */
978-#define XK_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */
979-#define XK_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */
980-#define XK_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
981-#define XK_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
982-#define XK_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
983-#define XK_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
984-#define XK_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
985-#define XK_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */
986-#define XK_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */
987-#define XK_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */
988-#define XK_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */
989-#define XK_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */
990-#define XK_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */
991-#define XK_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */
992-#define XK_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */
993-#define XK_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */
994-#define XK_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */
995-#define XK_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */
996-#define XK_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */
997-#define XK_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */
998-#define XK_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */
999-#define XK_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */
1000-#define XK_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */
1001-#define XK_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */
1002-#define XK_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */
1003-#define XK_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */
1004-#define XK_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */
1005-#define XK_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */
1006-#define XK_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */
1007-#define XK_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */
1008-#define XK_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */
1009-#define XK_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */
1010-#define XK_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */
1011-#define XK_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */
1012-#define XK_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */
1013-#define XK_Arabic_heh 0x05e7 /* deprecated */
1014-#define XK_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */
1015-#define XK_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */
1016-#define XK_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */
1017-#define XK_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */
1018-#define XK_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */
1019-#define XK_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */
1020-#define XK_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */
1021-#define XK_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */
1022-#define XK_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */
1023-#define XK_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */
1024-#define XK_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */
1025-#define XK_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */
1026-#define XK_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */
1027-#define XK_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */
1028-#define XK_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */
1029-#define XK_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */
1030-#define XK_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */
1031-#define XK_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */
1032-#define XK_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */
1033-#define XK_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
1034-#define XK_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
1035-#define XK_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
1036-#define XK_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */
1037-#define XK_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */
1038-#define XK_Arabic_switch 0xff7e /* Alias for mode_switch */
1039-#endif /* XK_ARABIC */
1040-
1041-/*
1042- * Cyrillic
1043- * Byte 3 = 6
1044- */
1045-#ifdef XK_CYRILLIC
1046-#define XK_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */
1047-#define XK_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */
1048-#define XK_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */
1049-#define XK_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */
1050-#define XK_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */
1051-#define XK_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */
1052-#define XK_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */
1053-#define XK_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */
1054-#define XK_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */
1055-#define XK_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */
1056-#define XK_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */
1057-#define XK_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */
1058-#define XK_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */
1059-#define XK_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */
1060-#define XK_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */
1061-#define XK_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */
1062-#define XK_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */
1063-#define XK_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */
1064-#define XK_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */
1065-#define XK_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */
1066-#define XK_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */
1067-#define XK_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */
1068-
1069-#define XK_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */
1070-#define XK_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */
1071-#define XK_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */
1072-#define XK_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */
1073-#define XK_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */
1074-#define XK_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */
1075-#define XK_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */
1076-#define XK_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */
1077-
1078-#define XK_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */
1079-#define XK_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */
1080-#define XK_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */
1081-#define XK_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */
1082-#define XK_Ukranian_je 0x06a4 /* deprecated */
1083-#define XK_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */
1084-#define XK_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
1085-#define XK_Ukranian_i 0x06a6 /* deprecated */
1086-#define XK_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */
1087-#define XK_Ukranian_yi 0x06a7 /* deprecated */
1088-#define XK_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */
1089-#define XK_Serbian_je 0x06a8 /* deprecated */
1090-#define XK_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */
1091-#define XK_Serbian_lje 0x06a9 /* deprecated */
1092-#define XK_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */
1093-#define XK_Serbian_nje 0x06aa /* deprecated */
1094-#define XK_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */
1095-#define XK_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */
1096-#define XK_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */
1097-#define XK_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */
1098-#define XK_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */
1099-#define XK_Serbian_dze 0x06af /* deprecated */
1100-#define XK_numerosign 0x06b0 /* U+2116 NUMERO SIGN */
1101-#define XK_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */
1102-#define XK_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */
1103-#define XK_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */
1104-#define XK_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */
1105-#define XK_Ukranian_JE 0x06b4 /* deprecated */
1106-#define XK_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */
1107-#define XK_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
1108-#define XK_Ukranian_I 0x06b6 /* deprecated */
1109-#define XK_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */
1110-#define XK_Ukranian_YI 0x06b7 /* deprecated */
1111-#define XK_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */
1112-#define XK_Serbian_JE 0x06b8 /* deprecated */
1113-#define XK_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */
1114-#define XK_Serbian_LJE 0x06b9 /* deprecated */
1115-#define XK_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */
1116-#define XK_Serbian_NJE 0x06ba /* deprecated */
1117-#define XK_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */
1118-#define XK_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */
1119-#define XK_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
1120-#define XK_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */
1121-#define XK_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */
1122-#define XK_Serbian_DZE 0x06bf /* deprecated */
1123-#define XK_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */
1124-#define XK_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */
1125-#define XK_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */
1126-#define XK_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */
1127-#define XK_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */
1128-#define XK_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */
1129-#define XK_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */
1130-#define XK_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */
1131-#define XK_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */
1132-#define XK_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */
1133-#define XK_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */
1134-#define XK_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */
1135-#define XK_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */
1136-#define XK_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */
1137-#define XK_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */
1138-#define XK_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */
1139-#define XK_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */
1140-#define XK_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */
1141-#define XK_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */
1142-#define XK_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */
1143-#define XK_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */
1144-#define XK_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */
1145-#define XK_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */
1146-#define XK_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */
1147-#define XK_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */
1148-#define XK_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */
1149-#define XK_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */
1150-#define XK_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */
1151-#define XK_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */
1152-#define XK_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */
1153-#define XK_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */
1154-#define XK_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */
1155-#define XK_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */
1156-#define XK_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */
1157-#define XK_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */
1158-#define XK_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */
1159-#define XK_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */
1160-#define XK_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */
1161-#define XK_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */
1162-#define XK_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */
1163-#define XK_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */
1164-#define XK_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */
1165-#define XK_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */
1166-#define XK_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */
1167-#define XK_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */
1168-#define XK_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */
1169-#define XK_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */
1170-#define XK_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */
1171-#define XK_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */
1172-#define XK_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */
1173-#define XK_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */
1174-#define XK_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */
1175-#define XK_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */
1176-#define XK_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */
1177-#define XK_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */
1178-#define XK_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */
1179-#define XK_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */
1180-#define XK_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */
1181-#define XK_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */
1182-#define XK_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */
1183-#define XK_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */
1184-#define XK_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
1185-#define XK_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */
1186-#define XK_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */
1187-#endif /* XK_CYRILLIC */
1188-
1189-/*
1190- * Greek
1191- * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)
1192- * Byte 3 = 7
1193- */
1194-
1195-#ifdef XK_GREEK
1196-#define XK_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */
1197-#define XK_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */
1198-#define XK_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */
1199-#define XK_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */
1200-#define XK_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
1201-#define XK_Greek_IOTAdiaeresis 0x07a5 /* old typo */
1202-#define XK_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */
1203-#define XK_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */
1204-#define XK_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
1205-#define XK_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */
1206-#define XK_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */
1207-#define XK_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */
1208-#define XK_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */
1209-#define XK_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */
1210-#define XK_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */
1211-#define XK_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */
1212-#define XK_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */
1213-#define XK_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
1214-#define XK_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */
1215-#define XK_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */
1216-#define XK_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
1217-#define XK_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
1218-#define XK_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */
1219-#define XK_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */
1220-#define XK_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */
1221-#define XK_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */
1222-#define XK_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */
1223-#define XK_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */
1224-#define XK_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */
1225-#define XK_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */
1226-#define XK_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */
1227-#define XK_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */
1228-#define XK_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */
1229-#define XK_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
1230-#define XK_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
1231-#define XK_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */
1232-#define XK_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */
1233-#define XK_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */
1234-#define XK_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */
1235-#define XK_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */
1236-#define XK_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */
1237-#define XK_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */
1238-#define XK_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */
1239-#define XK_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */
1240-#define XK_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */
1241-#define XK_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */
1242-#define XK_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */
1243-#define XK_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */
1244-#define XK_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */
1245-#define XK_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */
1246-#define XK_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */
1247-#define XK_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */
1248-#define XK_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */
1249-#define XK_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */
1250-#define XK_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */
1251-#define XK_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */
1252-#define XK_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */
1253-#define XK_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */
1254-#define XK_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
1255-#define XK_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
1256-#define XK_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */
1257-#define XK_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */
1258-#define XK_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */
1259-#define XK_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */
1260-#define XK_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */
1261-#define XK_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */
1262-#define XK_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */
1263-#define XK_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */
1264-#define XK_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */
1265-#define XK_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */
1266-#define XK_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */
1267-#define XK_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */
1268-#define XK_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */
1269-#define XK_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */
1270-#define XK_Greek_switch 0xff7e /* Alias for mode_switch */
1271-#endif /* XK_GREEK */
1272-
1273-/*
1274- * Technical
1275- * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)
1276- * Byte 3 = 8
1277- */
1278-
1279-#ifdef XK_TECHNICAL
1280-#define XK_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */
1281-#define XK_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/
1282-#define XK_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/
1283-#define XK_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */
1284-#define XK_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */
1285-#define XK_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/
1286-#define XK_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */
1287-#define XK_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */
1288-#define XK_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */
1289-#define XK_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */
1290-#define XK_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */
1291-#define XK_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */
1292-#define XK_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */
1293-#define XK_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */
1294-#define XK_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */
1295-#define XK_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */
1296-#define XK_topleftsummation 0x08b1
1297-#define XK_botleftsummation 0x08b2
1298-#define XK_topvertsummationconnector 0x08b3
1299-#define XK_botvertsummationconnector 0x08b4
1300-#define XK_toprightsummation 0x08b5
1301-#define XK_botrightsummation 0x08b6
1302-#define XK_rightmiddlesummation 0x08b7
1303-#define XK_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */
1304-#define XK_notequal 0x08bd /* U+2260 NOT EQUAL TO */
1305-#define XK_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */
1306-#define XK_integral 0x08bf /* U+222B INTEGRAL */
1307-#define XK_therefore 0x08c0 /* U+2234 THEREFORE */
1308-#define XK_variation 0x08c1 /* U+221D PROPORTIONAL TO */
1309-#define XK_infinity 0x08c2 /* U+221E INFINITY */
1310-#define XK_nabla 0x08c5 /* U+2207 NABLA */
1311-#define XK_approximate 0x08c8 /* U+223C TILDE OPERATOR */
1312-#define XK_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */
1313-#define XK_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */
1314-#define XK_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */
1315-#define XK_identical 0x08cf /* U+2261 IDENTICAL TO */
1316-#define XK_radical 0x08d6 /* U+221A SQUARE ROOT */
1317-#define XK_includedin 0x08da /* U+2282 SUBSET OF */
1318-#define XK_includes 0x08db /* U+2283 SUPERSET OF */
1319-#define XK_intersection 0x08dc /* U+2229 INTERSECTION */
1320-#define XK_union 0x08dd /* U+222A UNION */
1321-#define XK_logicaland 0x08de /* U+2227 LOGICAL AND */
1322-#define XK_logicalor 0x08df /* U+2228 LOGICAL OR */
1323-#define XK_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */
1324-#define XK_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */
1325-#define XK_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */
1326-#define XK_uparrow 0x08fc /* U+2191 UPWARDS ARROW */
1327-#define XK_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */
1328-#define XK_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */
1329-#endif /* XK_TECHNICAL */
1330-
1331-/*
1332- * Special
1333- * (from the DEC VT100 Special Graphics Character Set)
1334- * Byte 3 = 9
1335- */
1336-
1337-#ifdef XK_SPECIAL
1338-#define XK_blank 0x09df
1339-#define XK_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */
1340-#define XK_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */
1341-#define XK_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */
1342-#define XK_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */
1343-#define XK_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */
1344-#define XK_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */
1345-#define XK_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */
1346-#define XK_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */
1347-#define XK_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */
1348-#define XK_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */
1349-#define XK_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */
1350-#define XK_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */
1351-#define XK_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
1352-#define XK_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */
1353-#define XK_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */
1354-#define XK_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */
1355-#define XK_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */
1356-#define XK_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */
1357-#define XK_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
1358-#define XK_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */
1359-#define XK_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */
1360-#define XK_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
1361-#define XK_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
1362-#endif /* XK_SPECIAL */
1363-
1364-/*
1365- * Publishing
1366- * (these are probably from a long forgotten DEC Publishing
1367- * font that once shipped with DECwrite)
1368- * Byte 3 = 0x0a
1369- */
1370-
1371-#ifdef XK_PUBLISHING
1372-#define XK_emspace 0x0aa1 /* U+2003 EM SPACE */
1373-#define XK_enspace 0x0aa2 /* U+2002 EN SPACE */
1374-#define XK_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */
1375-#define XK_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */
1376-#define XK_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */
1377-#define XK_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */
1378-#define XK_thinspace 0x0aa7 /* U+2009 THIN SPACE */
1379-#define XK_hairspace 0x0aa8 /* U+200A HAIR SPACE */
1380-#define XK_emdash 0x0aa9 /* U+2014 EM DASH */
1381-#define XK_endash 0x0aaa /* U+2013 EN DASH */
1382-#define XK_signifblank 0x0aac /*(U+2423 OPEN BOX)*/
1383-#define XK_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */
1384-#define XK_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */
1385-#define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */
1386-#define XK_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */
1387-#define XK_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */
1388-#define XK_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */
1389-#define XK_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */
1390-#define XK_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */
1391-#define XK_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */
1392-#define XK_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */
1393-#define XK_careof 0x0ab8 /* U+2105 CARE OF */
1394-#define XK_figdash 0x0abb /* U+2012 FIGURE DASH */
1395-#define XK_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
1396-#define XK_decimalpoint 0x0abd /*(U+002E FULL STOP)*/
1397-#define XK_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/
1398-#define XK_marker 0x0abf
1399-#define XK_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */
1400-#define XK_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */
1401-#define XK_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */
1402-#define XK_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */
1403-#define XK_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */
1404-#define XK_signaturemark 0x0aca /*(U+2613 SALTIRE)*/
1405-#define XK_trademarkincircle 0x0acb
1406-#define XK_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/
1407-#define XK_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/
1408-#define XK_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/
1409-#define XK_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/
1410-#define XK_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */
1411-#define XK_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */
1412-#define XK_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */
1413-#define XK_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */
1414-#define XK_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */
1415-#define XK_minutes 0x0ad6 /* U+2032 PRIME */
1416-#define XK_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */
1417-#define XK_latincross 0x0ad9 /* U+271D LATIN CROSS */
1418-#define XK_hexagram 0x0ada
1419-#define XK_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/
1420-#define XK_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/
1421-#define XK_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/
1422-#define XK_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/
1423-#define XK_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/
1424-#define XK_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/
1425-#define XK_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/
1426-#define XK_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/
1427-#define XK_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/
1428-#define XK_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/
1429-#define XK_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/
1430-#define XK_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/
1431-#define XK_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/
1432-#define XK_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/
1433-#define XK_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/
1434-#define XK_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/
1435-#define XK_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/
1436-#define XK_club 0x0aec /* U+2663 BLACK CLUB SUIT */
1437-#define XK_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */
1438-#define XK_heart 0x0aee /* U+2665 BLACK HEART SUIT */
1439-#define XK_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */
1440-#define XK_dagger 0x0af1 /* U+2020 DAGGER */
1441-#define XK_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */
1442-#define XK_checkmark 0x0af3 /* U+2713 CHECK MARK */
1443-#define XK_ballotcross 0x0af4 /* U+2717 BALLOT X */
1444-#define XK_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */
1445-#define XK_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */
1446-#define XK_malesymbol 0x0af7 /* U+2642 MALE SIGN */
1447-#define XK_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */
1448-#define XK_telephone 0x0af9 /* U+260E BLACK TELEPHONE */
1449-#define XK_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */
1450-#define XK_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */
1451-#define XK_caret 0x0afc /* U+2038 CARET */
1452-#define XK_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */
1453-#define XK_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */
1454-#define XK_cursor 0x0aff
1455-#endif /* XK_PUBLISHING */
1456-
1457-/*
1458- * APL
1459- * Byte 3 = 0x0b
1460- */
1461-
1462-#ifdef XK_APL
1463-#define XK_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/
1464-#define XK_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/
1465-#define XK_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/
1466-#define XK_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/
1467-#define XK_overbar 0x0bc0 /*(U+00AF MACRON)*/
1468-#define XK_downtack 0x0bc2 /* U+22A5 UP TACK */
1469-#define XK_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/
1470-#define XK_downstile 0x0bc4 /* U+230A LEFT FLOOR */
1471-#define XK_underbar 0x0bc6 /*(U+005F LOW LINE)*/
1472-#define XK_jot 0x0bca /* U+2218 RING OPERATOR */
1473-#define XK_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */
1474-#define XK_uptack 0x0bce /* U+22A4 DOWN TACK */
1475-#define XK_circle 0x0bcf /* U+25CB WHITE CIRCLE */
1476-#define XK_upstile 0x0bd3 /* U+2308 LEFT CEILING */
1477-#define XK_downshoe 0x0bd6 /*(U+222A UNION)*/
1478-#define XK_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/
1479-#define XK_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/
1480-#define XK_lefttack 0x0bdc /* U+22A2 RIGHT TACK */
1481-#define XK_righttack 0x0bfc /* U+22A3 LEFT TACK */
1482-#endif /* XK_APL */
1483-
1484-/*
1485- * Hebrew
1486- * Byte 3 = 0x0c
1487- */
1488-
1489-#ifdef XK_HEBREW
1490-#define XK_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */
1491-#define XK_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */
1492-#define XK_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */
1493-#define XK_hebrew_beth 0x0ce1 /* deprecated */
1494-#define XK_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */
1495-#define XK_hebrew_gimmel 0x0ce2 /* deprecated */
1496-#define XK_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */
1497-#define XK_hebrew_daleth 0x0ce3 /* deprecated */
1498-#define XK_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */
1499-#define XK_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */
1500-#define XK_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */
1501-#define XK_hebrew_zayin 0x0ce6 /* deprecated */
1502-#define XK_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */
1503-#define XK_hebrew_het 0x0ce7 /* deprecated */
1504-#define XK_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */
1505-#define XK_hebrew_teth 0x0ce8 /* deprecated */
1506-#define XK_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */
1507-#define XK_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */
1508-#define XK_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */
1509-#define XK_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */
1510-#define XK_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */
1511-#define XK_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */
1512-#define XK_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */
1513-#define XK_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */
1514-#define XK_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */
1515-#define XK_hebrew_samekh 0x0cf1 /* deprecated */
1516-#define XK_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */
1517-#define XK_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */
1518-#define XK_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */
1519-#define XK_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */
1520-#define XK_hebrew_finalzadi 0x0cf5 /* deprecated */
1521-#define XK_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */
1522-#define XK_hebrew_zadi 0x0cf6 /* deprecated */
1523-#define XK_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */
1524-#define XK_hebrew_kuf 0x0cf7 /* deprecated */
1525-#define XK_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */
1526-#define XK_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */
1527-#define XK_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */
1528-#define XK_hebrew_taf 0x0cfa /* deprecated */
1529-#define XK_Hebrew_switch 0xff7e /* Alias for mode_switch */
1530-#endif /* XK_HEBREW */
1531-
1532-/*
1533- * Thai
1534- * Byte 3 = 0x0d
1535- */
1536-
1537-#ifdef XK_THAI
1538-#define XK_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */
1539-#define XK_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */
1540-#define XK_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */
1541-#define XK_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */
1542-#define XK_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */
1543-#define XK_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */
1544-#define XK_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */
1545-#define XK_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */
1546-#define XK_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */
1547-#define XK_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */
1548-#define XK_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */
1549-#define XK_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */
1550-#define XK_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */
1551-#define XK_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */
1552-#define XK_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */
1553-#define XK_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */
1554-#define XK_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */
1555-#define XK_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */
1556-#define XK_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */
1557-#define XK_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */
1558-#define XK_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */
1559-#define XK_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */
1560-#define XK_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */
1561-#define XK_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */
1562-#define XK_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */
1563-#define XK_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */
1564-#define XK_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */
1565-#define XK_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */
1566-#define XK_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */
1567-#define XK_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */
1568-#define XK_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */
1569-#define XK_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */
1570-#define XK_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */
1571-#define XK_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */
1572-#define XK_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */
1573-#define XK_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */
1574-#define XK_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */
1575-#define XK_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */
1576-#define XK_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */
1577-#define XK_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */
1578-#define XK_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */
1579-#define XK_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */
1580-#define XK_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */
1581-#define XK_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */
1582-#define XK_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */
1583-#define XK_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */
1584-#define XK_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */
1585-#define XK_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */
1586-#define XK_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */
1587-#define XK_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */
1588-#define XK_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */
1589-#define XK_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */
1590-#define XK_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */
1591-#define XK_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */
1592-#define XK_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */
1593-#define XK_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */
1594-#define XK_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */
1595-#define XK_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */
1596-#define XK_Thai_maihanakat_maitho 0x0dde
1597-#define XK_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */
1598-#define XK_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */
1599-#define XK_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */
1600-#define XK_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */
1601-#define XK_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */
1602-#define XK_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */
1603-#define XK_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */
1604-#define XK_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */
1605-#define XK_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */
1606-#define XK_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */
1607-#define XK_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */
1608-#define XK_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */
1609-#define XK_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */
1610-#define XK_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */
1611-#define XK_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */
1612-#define XK_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */
1613-#define XK_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */
1614-#define XK_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */
1615-#define XK_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */
1616-#define XK_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */
1617-#define XK_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */
1618-#define XK_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */
1619-#define XK_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */
1620-#define XK_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */
1621-#define XK_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */
1622-#endif /* XK_THAI */
1623-
1624-/*
1625- * Korean
1626- * Byte 3 = 0x0e
1627- */
1628-
1629-#ifdef XK_KOREAN
1630-
1631-#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */
1632-#define XK_Hangul_Start 0xff32 /* Hangul start */
1633-#define XK_Hangul_End 0xff33 /* Hangul end, English start */
1634-#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */
1635-#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */
1636-#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */
1637-#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */
1638-#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */
1639-#define XK_Hangul_Banja 0xff39 /* Banja mode */
1640-#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */
1641-#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */
1642-#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */
1643-#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */
1644-#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */
1645-#define XK_Hangul_Special 0xff3f /* Special symbols */
1646-#define XK_Hangul_switch 0xff7e /* Alias for mode_switch */
1647-
1648-/* Hangul Consonant Characters */
1649-#define XK_Hangul_Kiyeog 0x0ea1
1650-#define XK_Hangul_SsangKiyeog 0x0ea2
1651-#define XK_Hangul_KiyeogSios 0x0ea3
1652-#define XK_Hangul_Nieun 0x0ea4
1653-#define XK_Hangul_NieunJieuj 0x0ea5
1654-#define XK_Hangul_NieunHieuh 0x0ea6
1655-#define XK_Hangul_Dikeud 0x0ea7
1656-#define XK_Hangul_SsangDikeud 0x0ea8
1657-#define XK_Hangul_Rieul 0x0ea9
1658-#define XK_Hangul_RieulKiyeog 0x0eaa
1659-#define XK_Hangul_RieulMieum 0x0eab
1660-#define XK_Hangul_RieulPieub 0x0eac
1661-#define XK_Hangul_RieulSios 0x0ead
1662-#define XK_Hangul_RieulTieut 0x0eae
1663-#define XK_Hangul_RieulPhieuf 0x0eaf
1664-#define XK_Hangul_RieulHieuh 0x0eb0
1665-#define XK_Hangul_Mieum 0x0eb1
1666-#define XK_Hangul_Pieub 0x0eb2
1667-#define XK_Hangul_SsangPieub 0x0eb3
1668-#define XK_Hangul_PieubSios 0x0eb4
1669-#define XK_Hangul_Sios 0x0eb5
1670-#define XK_Hangul_SsangSios 0x0eb6
1671-#define XK_Hangul_Ieung 0x0eb7
1672-#define XK_Hangul_Jieuj 0x0eb8
1673-#define XK_Hangul_SsangJieuj 0x0eb9
1674-#define XK_Hangul_Cieuc 0x0eba
1675-#define XK_Hangul_Khieuq 0x0ebb
1676-#define XK_Hangul_Tieut 0x0ebc
1677-#define XK_Hangul_Phieuf 0x0ebd
1678-#define XK_Hangul_Hieuh 0x0ebe
1679-
1680-/* Hangul Vowel Characters */
1681-#define XK_Hangul_A 0x0ebf
1682-#define XK_Hangul_AE 0x0ec0
1683-#define XK_Hangul_YA 0x0ec1
1684-#define XK_Hangul_YAE 0x0ec2
1685-#define XK_Hangul_EO 0x0ec3
1686-#define XK_Hangul_E 0x0ec4
1687-#define XK_Hangul_YEO 0x0ec5
1688-#define XK_Hangul_YE 0x0ec6
1689-#define XK_Hangul_O 0x0ec7
1690-#define XK_Hangul_WA 0x0ec8
1691-#define XK_Hangul_WAE 0x0ec9
1692-#define XK_Hangul_OE 0x0eca
1693-#define XK_Hangul_YO 0x0ecb
1694-#define XK_Hangul_U 0x0ecc
1695-#define XK_Hangul_WEO 0x0ecd
1696-#define XK_Hangul_WE 0x0ece
1697-#define XK_Hangul_WI 0x0ecf
1698-#define XK_Hangul_YU 0x0ed0
1699-#define XK_Hangul_EU 0x0ed1
1700-#define XK_Hangul_YI 0x0ed2
1701-#define XK_Hangul_I 0x0ed3
1702-
1703-/* Hangul syllable-final (JongSeong) Characters */
1704-#define XK_Hangul_J_Kiyeog 0x0ed4
1705-#define XK_Hangul_J_SsangKiyeog 0x0ed5
1706-#define XK_Hangul_J_KiyeogSios 0x0ed6
1707-#define XK_Hangul_J_Nieun 0x0ed7
1708-#define XK_Hangul_J_NieunJieuj 0x0ed8
1709-#define XK_Hangul_J_NieunHieuh 0x0ed9
1710-#define XK_Hangul_J_Dikeud 0x0eda
1711-#define XK_Hangul_J_Rieul 0x0edb
1712-#define XK_Hangul_J_RieulKiyeog 0x0edc
1713-#define XK_Hangul_J_RieulMieum 0x0edd
1714-#define XK_Hangul_J_RieulPieub 0x0ede
1715-#define XK_Hangul_J_RieulSios 0x0edf
1716-#define XK_Hangul_J_RieulTieut 0x0ee0
1717-#define XK_Hangul_J_RieulPhieuf 0x0ee1
1718-#define XK_Hangul_J_RieulHieuh 0x0ee2
1719-#define XK_Hangul_J_Mieum 0x0ee3
1720-#define XK_Hangul_J_Pieub 0x0ee4
1721-#define XK_Hangul_J_PieubSios 0x0ee5
1722-#define XK_Hangul_J_Sios 0x0ee6
1723-#define XK_Hangul_J_SsangSios 0x0ee7
1724-#define XK_Hangul_J_Ieung 0x0ee8
1725-#define XK_Hangul_J_Jieuj 0x0ee9
1726-#define XK_Hangul_J_Cieuc 0x0eea
1727-#define XK_Hangul_J_Khieuq 0x0eeb
1728-#define XK_Hangul_J_Tieut 0x0eec
1729-#define XK_Hangul_J_Phieuf 0x0eed
1730-#define XK_Hangul_J_Hieuh 0x0eee
1731-
1732-/* Ancient Hangul Consonant Characters */
1733-#define XK_Hangul_RieulYeorinHieuh 0x0eef
1734-#define XK_Hangul_SunkyeongeumMieum 0x0ef0
1735-#define XK_Hangul_SunkyeongeumPieub 0x0ef1
1736-#define XK_Hangul_PanSios 0x0ef2
1737-#define XK_Hangul_KkogjiDalrinIeung 0x0ef3
1738-#define XK_Hangul_SunkyeongeumPhieuf 0x0ef4
1739-#define XK_Hangul_YeorinHieuh 0x0ef5
1740-
1741-/* Ancient Hangul Vowel Characters */
1742-#define XK_Hangul_AraeA 0x0ef6
1743-#define XK_Hangul_AraeAE 0x0ef7
1744-
1745-/* Ancient Hangul syllable-final (JongSeong) Characters */
1746-#define XK_Hangul_J_PanSios 0x0ef8
1747-#define XK_Hangul_J_KkogjiDalrinIeung 0x0ef9
1748-#define XK_Hangul_J_YeorinHieuh 0x0efa
1749-
1750-/* Korean currency symbol */
1751-#define XK_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/
1752-
1753-#endif /* XK_KOREAN */
1754-
1755-/*
1756- * Armenian
1757- */
1758-
1759-#ifdef XK_ARMENIAN
1760-#define XK_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */
1761-#define XK_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */
1762-#define XK_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */
1763-#define XK_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */
1764-#define XK_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */
1765-#define XK_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */
1766-#define XK_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */
1767-#define XK_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
1768-#define XK_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
1769-#define XK_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
1770-#define XK_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
1771-#define XK_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */
1772-#define XK_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */
1773-#define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
1774-#define XK_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */
1775-#define XK_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */
1776-#define XK_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */
1777-#define XK_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */
1778-#define XK_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */
1779-#define XK_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */
1780-#define XK_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */
1781-#define XK_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */
1782-#define XK_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */
1783-#define XK_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */
1784-#define XK_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */
1785-#define XK_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */
1786-#define XK_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */
1787-#define XK_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */
1788-#define XK_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */
1789-#define XK_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */
1790-#define XK_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */
1791-#define XK_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */
1792-#define XK_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */
1793-#define XK_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */
1794-#define XK_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */
1795-#define XK_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */
1796-#define XK_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */
1797-#define XK_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */
1798-#define XK_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */
1799-#define XK_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */
1800-#define XK_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */
1801-#define XK_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */
1802-#define XK_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */
1803-#define XK_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */
1804-#define XK_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */
1805-#define XK_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */
1806-#define XK_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */
1807-#define XK_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */
1808-#define XK_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */
1809-#define XK_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */
1810-#define XK_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */
1811-#define XK_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */
1812-#define XK_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */
1813-#define XK_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */
1814-#define XK_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */
1815-#define XK_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */
1816-#define XK_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */
1817-#define XK_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */
1818-#define XK_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */
1819-#define XK_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */
1820-#define XK_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */
1821-#define XK_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */
1822-#define XK_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */
1823-#define XK_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */
1824-#define XK_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */
1825-#define XK_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */
1826-#define XK_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */
1827-#define XK_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */
1828-#define XK_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */
1829-#define XK_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */
1830-#define XK_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */
1831-#define XK_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */
1832-#define XK_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */
1833-#define XK_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */
1834-#define XK_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */
1835-#define XK_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */
1836-#define XK_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */
1837-#define XK_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */
1838-#define XK_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */
1839-#define XK_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */
1840-#define XK_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */
1841-#define XK_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */
1842-#define XK_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */
1843-#define XK_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */
1844-#define XK_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */
1845-#define XK_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */
1846-#define XK_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */
1847-#define XK_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */
1848-#define XK_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */
1849-#define XK_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */
1850-#endif /* XK_ARMENIAN */
1851-
1852-/*
1853- * Georgian
1854- */
1855-
1856-#ifdef XK_GEORGIAN
1857-#define XK_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */
1858-#define XK_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */
1859-#define XK_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */
1860-#define XK_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */
1861-#define XK_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */
1862-#define XK_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */
1863-#define XK_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */
1864-#define XK_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */
1865-#define XK_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */
1866-#define XK_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */
1867-#define XK_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */
1868-#define XK_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */
1869-#define XK_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */
1870-#define XK_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */
1871-#define XK_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */
1872-#define XK_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */
1873-#define XK_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */
1874-#define XK_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */
1875-#define XK_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */
1876-#define XK_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */
1877-#define XK_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */
1878-#define XK_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */
1879-#define XK_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */
1880-#define XK_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */
1881-#define XK_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */
1882-#define XK_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */
1883-#define XK_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */
1884-#define XK_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */
1885-#define XK_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */
1886-#define XK_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */
1887-#define XK_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */
1888-#define XK_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */
1889-#define XK_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */
1890-#define XK_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */
1891-#define XK_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */
1892-#define XK_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */
1893-#define XK_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */
1894-#define XK_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */
1895-#define XK_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */
1896-#endif /* XK_GEORGIAN */
1897-
1898-/*
1899- * Azeri (and other Turkic or Caucasian languages)
1900- */
1901-
1902-#ifdef XK_CAUCASUS
1903-/* latin */
1904-#define XK_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */
1905-#define XK_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */
1906-#define XK_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */
1907-#define XK_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */
1908-#define XK_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */
1909-#define XK_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */
1910-#define XK_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */
1911-#define XK_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */
1912-#define XK_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */
1913-#define XK_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */
1914-#define XK_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */
1915-#define XK_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */
1916-#define XK_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */
1917-#define XK_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */
1918-/* those are not really Caucasus */
1919-/* For Inupiak */
1920-#define XK_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */
1921-#define XK_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */
1922-#endif /* XK_CAUCASUS */
1923-
1924-/*
1925- * Vietnamese
1926- */
1927-
1928-#ifdef XK_VIETNAMESE
1929-#define XK_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */
1930-#define XK_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */
1931-#define XK_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */
1932-#define XK_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */
1933-#define XK_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */
1934-#define XK_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */
1935-#define XK_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */
1936-#define XK_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */
1937-#define XK_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
1938-#define XK_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
1939-#define XK_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */
1940-#define XK_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */
1941-#define XK_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
1942-#define XK_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
1943-#define XK_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */
1944-#define XK_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */
1945-#define XK_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */
1946-#define XK_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */
1947-#define XK_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */
1948-#define XK_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */
1949-#define XK_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */
1950-#define XK_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */
1951-#define XK_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */
1952-#define XK_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */
1953-#define XK_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */
1954-#define XK_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */
1955-#define XK_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */
1956-#define XK_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */
1957-#define XK_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */
1958-#define XK_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */
1959-#define XK_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */
1960-#define XK_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */
1961-#define XK_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */
1962-#define XK_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */
1963-#define XK_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
1964-#define XK_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
1965-#define XK_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */
1966-#define XK_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */
1967-#define XK_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
1968-#define XK_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
1969-#define XK_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */
1970-#define XK_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */
1971-#define XK_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */
1972-#define XK_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */
1973-#define XK_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */
1974-#define XK_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */
1975-#define XK_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */
1976-#define XK_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */
1977-#define XK_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
1978-#define XK_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */
1979-#define XK_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */
1980-#define XK_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */
1981-#define XK_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
1982-#define XK_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
1983-#define XK_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */
1984-#define XK_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */
1985-#define XK_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
1986-#define XK_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
1987-#define XK_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */
1988-#define XK_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */
1989-#define XK_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */
1990-#define XK_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */
1991-#define XK_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */
1992-#define XK_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */
1993-#define XK_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */
1994-#define XK_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */
1995-#define XK_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */
1996-#define XK_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */
1997-#define XK_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */
1998-#define XK_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */
1999-#define XK_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */
2000-#define XK_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */
2001-#define XK_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */
2002-#define XK_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */
2003-#define XK_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */
2004-#define XK_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */
2005-#define XK_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */
2006-#define XK_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */
2007-#define XK_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */
2008-#define XK_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */
2009-#define XK_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */
2010-#define XK_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */
2011-#define XK_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */
2012-#define XK_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */
2013-#define XK_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */
2014-#define XK_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */
2015-#define XK_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */
2016-#define XK_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */
2017-#define XK_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */
2018-#define XK_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */
2019-#define XK_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */
2020-#define XK_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */
2021-
2022-#endif /* XK_VIETNAMESE */
2023-
2024-#ifdef XK_CURRENCY
2025-#define XK_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */
2026-#define XK_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */
2027-#define XK_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */
2028-#define XK_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */
2029-#define XK_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */
2030-#define XK_MillSign 0x10020a5 /* U+20A5 MILL SIGN */
2031-#define XK_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */
2032-#define XK_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */
2033-#define XK_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */
2034-#define XK_WonSign 0x10020a9 /* U+20A9 WON SIGN */
2035-#define XK_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */
2036-#define XK_DongSign 0x10020ab /* U+20AB DONG SIGN */
2037-#define XK_EuroSign 0x20ac /* U+20AC EURO SIGN */
2038-#endif /* XK_CURRENCY */
M
makefile
+40,
-48
1@@ -1,79 +1,71 @@
2 CLI_src=src/uxn.c src/devices/system.c src/devices/console.c src/devices/file.c src/devices/datetime.c
3 EMU_src=${CLI_src} src/devices/screen.c src/devices/controller.c src/devices/mouse.c
4-
5 RELEASE_flags=-DNDEBUG -O2 -g0 -s
6 DEBUG_flags=-std=c89 -D_POSIX_C_SOURCE=199309L -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined
7
8 PREFIX=${HOME}/.local
9
10-.PHONY: all debug run test install uninstall format clean grab archive
11+.PHONY: all debug run test install uninstall format clean grab
12
13-all: bin/uxnasm bin/uxncli bin/uxn11
14+all: bin/uxncli bin/uxn11
15
16 run: all bin/mouse.rom
17 @ bin/uxn11 bin/mouse.rom
18-debug: bin/uxnasm-debug bin/uxncli-debug bin/uxn11-debug bin/opctest.rom bin/console.rom
19- # @ bin/uxncli-debug bin/opctest.rom
20- # @ bin/uxncli-debug bin/console.rom "foo bar" baz
21+
22+debug: bin/uxncli-debug bin/uxn11-debug bin/opctest.rom bin/console.rom
23+ @ bin/uxncli-debug bin/opctest.rom
24+ @ bin/uxncli-debug bin/console.rom "foo bar" baz
25 @ bin/uxn11-debug bin/mouse.rom
26-screen: bin/uxn11
27- @ uxnasm etc/screen.bounds.tal bin/test.rom
28- @ bin/uxn11 bin/test.rom
29-test: all bin/opctest.rom bin/expansion.rom bin/file.rom
30- bin/uxncli
31- bin/uxncli -v
32- bin/uxn11
33- bin/uxn11 -v
34- bin/uxnasm
35- bin/uxnasm -v
36- bin/uxncli bin/opctest.rom
37- bin/uxncli bin/expansion.rom
38- bin/uxncli bin/file.rom
39+
40+test: all bin/uxncli-debug bin/uxn11-debug bin/opctest.rom bin/screen.rom
41+ bin/uxncli-debug
42+ bin/uxncli-debug -v
43+ bin/uxn11-debug
44+ bin/uxn11-debug -v
45+ bin/uxncli-debug bin/opctest.rom
46+ bin/uxn11-debug bin/screen.rom
47+
48+format:
49+ @ clang-format -i src/uxncli.c src/uxn11.c src/devices/*
50+
51+grab:
52+ @ cp ../uxn-utils/cli/opctest/src/opctest.tal etc/examples/opctest.tal
53+ @ cp ../drifblim/etc/drifblim.rom.txt etc/utils/asm.rom.txt
54+
55+clean:
56+ @ rm -fr bin
57+
58 install: all
59 @ mkdir -p ${PREFIX}/bin
60- @ cp bin/uxn11 bin/uxnasm bin/uxncli ${PREFIX}/bin
61+ @ cp bin/uxn11 bin/uxncli ${PREFIX}/bin
62 @ mkdir -p ${PREFIX}/share/man/man7
63 @ cp doc/man/uxntal.7 ${PREFIX}/share/man/man7
64+
65 uninstall:
66- @ rm -f ${PREFIX}/bin/uxn11 ${PREFIX}/bin/uxnasm ${PREFIX}/bin/uxncli
67-format:
68- @ clang-format -i src/uxnasm.c src/uxncli.c src/uxn11.c src/devices/*
69-lint:
70- @ bin/uxncli ~/roms/uxnlin.rom
71-grab:
72- @ cp ../uxn-utils/cli/opctest/src/opctest.tal etc/opctest.tal
73-archive:
74- @ cp src/uxnasm.c ../oscean/etc/uxnasm.c.txt
75-clean:
76- @ rm -fr bin
77+ @ rm -f ${PREFIX}/bin/uxn11 ${PREFIX}/bin/uxncli
78
79-bin/opctest.rom: bin/uxnasm
80- @ bin/uxnasm etc/opctest.tal bin/opctest.rom
81-bin/expansion.rom: bin/uxnasm
82- @ bin/uxnasm etc/system.expansion.tal bin/expansion.rom
83-bin/file.rom: bin/uxnasm
84- @ bin/uxnasm etc/file.tal bin/file.rom
85-bin/mouse.rom: bin/uxnasm etc/mouse.tal
86- @ bin/uxnasm etc/mouse.tal bin/mouse.rom
87-bin/console.rom: bin/uxnasm etc/console.tal
88- @ bin/uxnasm etc/console.tal bin/console.rom
89+bin/asm.rom: etc/utils/asm.rom.txt
90+ @ xxd -r -p etc/utils/asm.rom.txt bin/asm.rom
91+
92+bin/opctest.rom: bin/uxncli bin/asm.rom
93+ @ bin/uxncli bin/asm.rom etc/examples/opctest.tal bin/opctest.rom
94+bin/mouse.rom: bin/uxncli bin/asm.rom etc/examples/mouse.tal
95+ @ bin/uxncli bin/asm.rom etc/examples/mouse.tal bin/mouse.rom
96+bin/console.rom: bin/uxncli bin/asm.rom etc/examples/console.tal
97+ @ bin/uxncli bin/asm.rom etc/examples/console.tal bin/console.rom
98+bin/screen.rom: bin/uxncli bin/asm.rom etc/examples/screen.tal
99+ @ bin/uxncli bin/asm.rom etc/examples/screen.tal bin/screen.rom
100
101-bin/uxnasm: src/uxnasm.c
102- @ mkdir -p bin
103- @ cc ${RELEASE_flags} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
104 bin/uxncli: src/uxncli.c
105 @ mkdir -p bin
106 @ cc ${RELEASE_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli
107 bin/uxn11: ${EMU_src} src/uxn11.c
108 @ mkdir -p bin
109 @ cc ${RELEASE_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11
110-
111-bin/uxnasm-debug: src/uxnasm.c
112- @ mkdir -p bin
113- @ cc ${DEBUG_flags} ${CFLAGS} src/uxnasm.c -o bin/uxnasm-debug
114 bin/uxncli-debug: ${CLI_src} src/uxncli.c
115 @ mkdir -p bin
116 @ cc ${DEBUG_flags} ${CFLAGS} ${CLI_src} src/uxncli.c -lutil -o bin/uxncli-debug
117 bin/uxn11-debug: ${EMU_src} src/uxn11.c
118 @ mkdir -p bin
119 @ cc ${DEBUG_flags} ${CFLAGS} ${EMU_src} src/uxn11.c -lX11 -lutil -o bin/uxn11-debug
120+
+0,
-481
1@@ -1,481 +0,0 @@
2-#include <stdio.h>
3-
4-/*
5-Copyright (c) 2021-2024 Devine Lu Linvega, Andrew Alderwick
6-
7-Permission to use, copy, modify, and distribute this software for any
8-purpose with or without fee is hereby granted, provided that the above
9-copyright notice and this permission notice appear in all copies.
10-
11-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12-WITH REGARD TO THIS SOFTWARE.
13-*/
14-
15-/* clang-format off */
16-
17-#define PAGE 0x0100
18-#define ishex(x) (shex(x) >= 0)
19-#define isopc(x) (findopcode(x) || scmp(x, "BRK", 4))
20-#define isinvalid(x) (!x[0] || ishex(x) || isopc(x) || find(runes, x[0]) >= 0)
21-#define writeshort(x) (writebyte(x >> 8, ctx) && writebyte(x & 0xff, ctx))
22-#define findlabel(x) finditem(x, labels, labels_len)
23-#define findmacro(x) finditem(x, macros, macro_len)
24-#define error_top(id, msg) !printf("%s: %s\n", id, msg)
25-#define error_asm(id) !printf("%s: %s in @%s, %s:%d.\n", id, token, scope, ctx->path, ctx->line)
26-#define error_ref(id) !printf("%s: %s, %s:%d\n", id, r->name, r->data, r->line)
27-
28-typedef unsigned char Uint8;
29-typedef signed char Sint8;
30-typedef unsigned short Uint16;
31-typedef struct { int line; char *path; } Context;
32-typedef struct { char *name, rune, *data; Uint16 addr, refs, line; } Item;
33-
34-static int ptr, length;
35-static char token[0x30], scope[0x40], lambda[0x05];
36-static char dict[0x8000], *dictnext = dict;
37-static Uint8 data[0x10000], lambda_stack[0x100], lambda_ptr, lambda_len;
38-static Uint16 labels_len, refs_len, macro_len;
39-static Item labels[0x400], refs[0x1000], macros[0x100];
40-
41-static char *runes = "|$@&,_.-;=!?#\"%~";
42-static char *hexad = "0123456789abcdef";
43-static char ops[][4] = {
44- "LIT", "INC", "POP", "NIP", "SWP", "ROT", "DUP", "OVR",
45- "EQU", "NEQ", "GTH", "LTH", "JMP", "JCN", "JSR", "STH",
46- "LDZ", "STZ", "LDR", "STR", "LDA", "STA", "DEI", "DEO",
47- "ADD", "SUB", "MUL", "DIV", "AND", "ORA", "EOR", "SFT"
48-};
49-
50-/* clang-format on */
51-
52-static int
53-find(char *s, char t)
54-{
55- int i = 0;
56- char c;
57- while((c = *s++)) {
58- if(c == t) return i;
59- i++;
60- }
61- return -1;
62-}
63-
64-static int
65-shex(char *s)
66-{
67- int d, n = 0;
68- char c;
69- while((c = *s++)) {
70- d = find(hexad, c);
71- if(d < 0) return d;
72- n = n << 4, n |= d;
73- }
74- return n;
75-}
76-
77-static int
78-scmp(char *a, char *b, int len)
79-{
80- int i = 0;
81- while(a[i] == b[i])
82- if(!a[i] || ++i >= len) return 1;
83- return 0;
84-}
85-
86-static char *
87-copy(char *src, char *dst, char c)
88-{
89- while(*src && *src != c) *dst++ = *src++;
90- *dst++ = 0;
91- return dst;
92-}
93-
94-static char *
95-save(char *s, char c)
96-{
97- char *o = dictnext;
98- while((*dictnext++ = *s++) && *s);
99- *dictnext++ = c;
100- return o;
101-}
102-
103-static char *
104-join(char *a, char j, char *b)
105-{
106- char *res = dictnext;
107- save(a, j), save(b, 0);
108- return res;
109-}
110-
111-static char *
112-push(char *s, char c)
113-{
114- char *d;
115- for(d = dict; d < dictnext; d++) {
116- char *ss = s, *dd = d, a, b;
117- while((a = *dd++) == (b = *ss++))
118- if(!a && !b) return d;
119- }
120- return save(s, c);
121-}
122-
123-static Item *
124-finditem(char *name, Item *list, int len)
125-{
126- int i;
127- if(name[0] == '&')
128- name = join(scope, '/', name + 1);
129- for(i = 0; i < len; i++)
130- if(scmp(list[i].name, name, 0x40))
131- return &list[i];
132- return NULL;
133-}
134-
135-static Uint8
136-findopcode(char *s)
137-{
138- int i;
139- for(i = 0; i < 0x20; i++) {
140- int m = 3;
141- if(!scmp(ops[i], s, 3)) continue;
142- if(!i) i |= (1 << 7);
143- while(s[m]) {
144- if(s[m] == '2')
145- i |= (1 << 5);
146- else if(s[m] == 'r')
147- i |= (1 << 6);
148- else if(s[m] == 'k')
149- i |= (1 << 7);
150- else
151- return 0;
152- m++;
153- }
154- return i;
155- }
156- return 0;
157-}
158-
159-static int
160-walkcomment(FILE *f, Context *ctx)
161-{
162- char c, last = 0;
163- int depth = 1;
164- while(f && fread(&c, 1, 1, f)) {
165- if(c <= 0x20) {
166- if(c == 0xa) ctx->line++;
167- if(last == '(')
168- depth++;
169- else if(last == ')' && --depth < 1)
170- return 1;
171- last = 0;
172- } else if(last <= 0x20)
173- last = c;
174- else
175- last = '~';
176- }
177- return error_asm("Comment incomplete");
178-}
179-
180-static int parse(char *w, FILE *f, Context *ctx);
181-
182-static int
183-walkmacro(Item *m, Context *ctx)
184-{
185- unsigned char c;
186- char *dataptr = m->data, *_token = token;
187- while((c = *dataptr++)) {
188- if(c < 0x21) {
189- *_token = 0x00;
190- if(token[0] && !parse(token, NULL, ctx)) return 0;
191- _token = token;
192- } else if(_token - token < 0x2f)
193- *_token++ = c;
194- else
195- return error_asm("Token size exceeded");
196- }
197- return 1;
198-}
199-
200-static int
201-walkfile(FILE *f, Context *ctx)
202-{
203- unsigned char c;
204- char *_token = token;
205- while(f && fread(&c, 1, 1, f)) {
206- if(c < 0x21) {
207- *_token = 0x00;
208- if(token[0] && !parse(token, f, ctx)) return 0;
209- if(c == 0xa) ctx->line++;
210- _token = token;
211- } else if(_token - token < 0x2f)
212- *_token++ = c;
213- else
214- return error_asm("Token size exceeded");
215- }
216- *_token = 0;
217- return parse(token, f, ctx);
218-}
219-
220-static char *
221-makelambda(int id)
222-{
223- lambda[0] = (char)0xce;
224- lambda[1] = (char)0xbb;
225- lambda[2] = hexad[id >> 0x4];
226- lambda[3] = hexad[id & 0xf];
227- return lambda;
228-}
229-
230-static int
231-makemacro(char *name, FILE *f, Context *ctx)
232-{
233- int depth = 0;
234- char c;
235- Item *m;
236- if(macro_len >= 0x100) return error_asm("Macros limit exceeded");
237- if(isinvalid(name)) return error_asm("Macro invalid");
238- if(findmacro(name)) return error_asm("Macro duplicate");
239- if(findlabel(name)) return error_asm("Label duplicate");
240- m = ¯os[macro_len++];
241- m->name = push(name, 0);
242- m->data = dictnext;
243- while(f && fread(&c, 1, 1, f) && c != '{')
244- if(c == 0xa) ctx->line++;
245- while(f && fread(&c, 1, 1, f)) {
246- if(c == 0xa) ctx->line++;
247- if(c == '%') return error_asm("Macro nested");
248- if(c == '{') depth++;
249- if(c == '}' && --depth) break;
250- *dictnext++ = c;
251- }
252- *dictnext++ = 0;
253- return 1;
254-}
255-
256-static int
257-makelabel(char *name, int setscope, Context *ctx)
258-{
259- Item *l;
260- if(name[0] == '&')
261- name = join(scope, '/', name + 1);
262- if(labels_len >= 0x400) return error_asm("Labels limit exceeded");
263- if(isinvalid(name)) return error_asm("Label invalid");
264- if(findmacro(name)) return error_asm("Label duplicate");
265- if(findlabel(name)) return error_asm("Label duplicate");
266- l = &labels[labels_len++];
267- l->name = push(name, 0);
268- l->addr = ptr;
269- l->refs = 0;
270- if(setscope) copy(name, scope, '/');
271- return 1;
272-}
273-
274-static int
275-makeref(char *label, char rune, Uint16 addr, Context *ctx)
276-{
277- Item *r;
278- if(refs_len >= 0x1000) return error_asm("References limit exceeded");
279- r = &refs[refs_len++];
280- if(label[0] == '{') {
281- lambda_stack[lambda_ptr++] = lambda_len;
282- r->name = push(makelambda(lambda_len++), 0);
283- if(label[1]) return error_asm("Label invalid");
284- } else if(label[0] == '&' || label[0] == '/') {
285- r->name = join(scope, '/', label + 1);
286- } else
287- r->name = push(label, 0);
288- r->rune = rune;
289- r->addr = addr;
290- r->line = ctx->line;
291- r->data = ctx->path;
292- return 1;
293-}
294-
295-static int
296-writepad(char *w, Context *ctx)
297-{
298- Item *l;
299- int rel = w[0] == '$' ? ptr : 0;
300- if(ishex(w + 1)) {
301- ptr = shex(w + 1) + rel;
302- return 1;
303- }
304- if((l = findlabel(w + 1))) {
305- ptr = l->addr + rel;
306- return 1;
307- }
308- return error_asm("Padding invalid");
309-}
310-
311-static int
312-writebyte(Uint8 b, Context *ctx)
313-{
314- if(ptr < PAGE)
315- return error_asm("Writing zero-page");
316- else if(ptr >= 0x10000)
317- return error_asm("Writing outside memory");
318- else if(ptr < length)
319- return error_asm("Writing rewind");
320- data[ptr++] = b;
321- if(b)
322- length = ptr;
323- return 1;
324-}
325-
326-static int
327-writehex(char *w, Context *ctx)
328-{
329- if(*w == '#')
330- writebyte(findopcode("LIT") | !!(++w)[2] << 5, ctx);
331- if(ishex(w)) {
332- if(w[1] && !w[2])
333- return writebyte(shex(w), ctx);
334- else if(w[3] && !w[4])
335- return writeshort(shex(w));
336- }
337- return error_asm("Hexadecimal invalid");
338-}
339-
340-static int
341-writestring(char *w, Context *ctx)
342-{
343- char c;
344- while((c = *(w++)))
345- if(!writebyte(c, ctx)) return error_asm("String invalid");
346- return 1;
347-}
348-
349-static int
350-assemble(char *filename)
351-{
352- FILE *f;
353- int res;
354- Context ctx;
355- ctx.line = 1;
356- ctx.path = push(filename, 0);
357- if(!(f = fopen(filename, "r")))
358- return error_top("File missing", filename);
359- res = walkfile(f, &ctx);
360- fclose(f);
361- return res;
362-}
363-
364-static int
365-parse(char *w, FILE *f, Context *ctx)
366-{
367- Item *m;
368- switch(w[0]) {
369- case 0x0: return 1;
370- case '(':
371- if(w[1] <= 0x20)
372- return walkcomment(f, ctx);
373- else
374- return error_asm("Invalid word");
375- case '%': return makemacro(w + 1, f, ctx);
376- case '@': return makelabel(w + 1, 1, ctx);
377- case '&': return makelabel(w, 0, ctx);
378- case '}': return makelabel(makelambda(lambda_stack[--lambda_ptr]), 0, ctx);
379- case '#': return writehex(w, ctx);
380- case '_': return makeref(w + 1, w[0], ptr, ctx) && writebyte(0xff, ctx);
381- case ',': return makeref(w + 1, w[0], ptr + 1, ctx) && writebyte(findopcode("LIT"), ctx) && writebyte(0xff, ctx);
382- case '-': return makeref(w + 1, w[0], ptr, ctx) && writebyte(0xff, ctx);
383- case '.': return makeref(w + 1, w[0], ptr + 1, ctx) && writebyte(findopcode("LIT"), ctx) && writebyte(0xff, ctx);
384- case ':': printf("Deprecated rune %s, use =%s\n", w, w + 1); /* fall-through */
385- case '=': return makeref(w + 1, w[0], ptr, ctx) && writeshort(0xffff);
386- case ';': return makeref(w + 1, w[0], ptr + 1, ctx) && writebyte(findopcode("LIT2"), ctx) && writeshort(0xffff);
387- case '?': return makeref(w + 1, w[0], ptr + 1, ctx) && writebyte(0x20, ctx) && writeshort(0xffff);
388- case '!': return makeref(w + 1, w[0], ptr + 1, ctx) && writebyte(0x40, ctx) && writeshort(0xffff);
389- case '"': return writestring(w + 1, ctx);
390- case '~': return !assemble(w + 1) ? error_asm("Include missing") : 1;
391- case '$':
392- case '|': return writepad(w, ctx);
393- case '[':
394- case ']': return 1;
395- }
396- if(ishex(w)) return writehex(w, ctx);
397- if(isopc(w)) return writebyte(findopcode(w), ctx);
398- if((m = findmacro(w))) return walkmacro(m, ctx);
399- return makeref(w, ' ', ptr + 1, ctx) && writebyte(0x60, ctx) && writeshort(0xffff);
400-}
401-
402-static int
403-resolve(char *filename)
404-{
405- int i, rel;
406- if(!length) return error_top("Output empty", filename);
407- for(i = 0; i < refs_len; i++) {
408- Item *r = &refs[i], *l = findlabel(r->name);
409- Uint8 *rom = data + r->addr;
410- if(!l) return error_ref("Label unknown");
411- switch(r->rune) {
412- case '_':
413- case ',':
414- *rom = rel = l->addr - r->addr - 2;
415- if((Sint8)data[r->addr] != rel)
416- return error_ref("Reference too far");
417- break;
418- case '-':
419- case '.':
420- *rom = l->addr;
421- break;
422- case ':':
423- case '=':
424- case ';':
425- *rom++ = l->addr >> 8, *rom = l->addr;
426- break;
427- case '?':
428- case '!':
429- default:
430- rel = l->addr - r->addr - 2;
431- *rom++ = rel >> 8, *rom = rel;
432- break;
433- }
434- l->refs++;
435- }
436- return 1;
437-}
438-
439-static int
440-build(char *rompath)
441-{
442- int i;
443- FILE *dst, *dstsym;
444- char *sympath = join(rompath, '.', "sym");
445- /* rom */
446- if(!(dst = fopen(rompath, "wb")))
447- return !error_top("Output file invalid", rompath);
448- for(i = 0; i < labels_len; i++)
449- if(!labels[i].refs && (unsigned char)(labels[i].name[0] - 'A') > 25)
450- printf("-- Unused label: %s\n", labels[i].name);
451- fwrite(data + PAGE, length - PAGE, 1, dst);
452- printf(
453- "Assembled %s in %d bytes(%.2f%% used), %d labels, %d macros.\n",
454- rompath,
455- length - PAGE,
456- (length - PAGE) / 652.80,
457- labels_len,
458- macro_len);
459- /* sym */
460- if(!(dstsym = fopen(sympath, "wb")))
461- return !error_top("Symbols file invalid", sympath);
462- for(i = 0; i < labels_len; i++) {
463- Uint8 hb = labels[i].addr >> 8, lb = labels[i].addr;
464- char c, d = 0, *name = labels[i].name;
465- fwrite(&hb, 1, 1, dstsym);
466- fwrite(&lb, 1, 1, dstsym);
467- while((c = *name++)) fwrite(&c, 1, 1, dstsym);
468- fwrite(&d, 1, 1, dstsym);
469- }
470- fclose(dst), fclose(dstsym);
471- return 1;
472-}
473-
474-int
475-main(int argc, char *argv[])
476-{
477- ptr = PAGE;
478- copy("on-reset", scope, 0);
479- if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 15 Jan 2025.\n");
480- if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom");
481- return !assemble(argv[1]) || !resolve(argv[2]) || !build(argv[2]);
482-}