1# JOE syntax highlight file for ACME assembly language
2# new in version 3: added jml, jsl
3# new in version 4: added !warn, !error, !serious
4# new in version 5: changed mnemo colors
5# new in version 6: added !ifndef, !addr
6# new in version 7: added !symbollist
7# new in version 8: adjusted for ACME 0.97
8#	added backslash escaping,
9#	added "//" comments,
10#	added new mnemonics, keywords and pseudo opcodes,
11#	reduced colors for different instruction sets
12
13# define colors
14#
15# bold inverse blink dim underline
16# white cyan magenta blue yellow green red black
17# bg_white bg_cyan bg_magenta bg_blue bg_yellow bg_green bg_red bg_black
18
19=Idle
20=Ident
21=Anon		bold
22=Bad		bold red
23=Call		bold
24=Comment 	green
25=Constant 	cyan
26=Escape		bold cyan
27=Keyword 	bold
28=Pseudo		bold
29=Mnemo6502	bold yellow
30=PCMnemo6502	bold red
31=MnemoExt	bg_blue bold yellow
32=PCMnemoExt	bg_blue bold red
33
34:reset Idle
35	*		idle		noeat
36	" \t"		reset
37
38:slash Idle
39	*		idle		noeat
40	"/"		line_comment	recolor=-2
41
42:idle Idle
43	*		idle
44	";"		line_comment	recolor=-1
45	"/"		slash
46	":{\n"		reset
47	"!.a-zA-Z_�-"	checkstring	recolor=-1 buffer
48	"+"		anonf_or_macro	recolor=-1
49	"-"		anonb		recolor=-1
50	"0"		got_zero	recolor=-1
51	"%"		binary		recolor=-1
52	"&"		octal		recolor=-1
53	"1-9"		decimal		recolor=-1
54	"$"		hex		recolor=-1
55	"'"		char		recolor=-1
56	"\""		string		recolor=-1
57# *=	"*"
58#	",:=()><[]*&|!~+\-%^"	control		recolor=-1
59
60:line_comment Comment
61	*		line_comment
62	"\n"		reset
63
64:call	Call
65	*		idle		noeat
66	"a-zA-Z0-9�-"	call
67
68:anonf_or_macro Anon
69	*		idle		noeat
70	"+"		anonf
71	".a-zA-Z0-9�-"	call		recolor=-2
72
73:anonf Anon
74	*		idle		noeat
75	"+"		anonf
76
77:anonb	Anon
78	*		idle		noeat
79	"-"		anonb
80
81:got_zero Constant
82	*		idle	noeat
83	"xX"		hex
84	"0-9"		decimal	noeat
85
86:binary Constant
87	*		idle	noeat
88	"01.#"		binary
89	"2-9"		badnum	noeat
90
91:octal Constant
92	*		idle	noeat
93	"0-7"		octal
94	"89"		badnum	noeat
95
96:hex Constant
97	*		idle	noeat
98	"0-9A-Fa-f"	hex
99
100:decimal Constant
101	*		idle	noeat
102	"0-9"		decimal
103
104:badnum Bad
105	*		idle	noeat
106	"0-9"		badnum
107
108:string	Constant
109	*		string
110	"\""		idle
111	"\\"		string_escape	recolor=-1
112
113:string_escape Escape
114	*		string
115
116:char Constant
117	*		char
118	"'"		idle
119	"\\"		char_escape	recolor=-1
120
121:char_escape Escape
122	*		char
123
124:ident Idle
125	*		idle		noeat
126	"a-zA-Z0-9_"	ident
127
128:checkstring Ident
129	*		idle		noeat istrings
130	"!8"		pseudo
131	"!08"		pseudo
132	"!by"		pseudo
133	"!byte"		pseudo
134	"!16"		pseudo
135	"!le16"		pseudo
136	"!be16"		pseudo
137	"!wo"		pseudo
138	"!word"		pseudo
139	"!24"		pseudo
140	"!le24"		pseudo
141	"!be24"		pseudo
142	"!32"		pseudo
143	"!le32"		pseudo
144	"!be32"		pseudo
145	"!tx"		pseudo
146	"!text"		pseudo
147	"!raw"		pseudo
148	"!pet"		pseudo
149	"!scr"		pseudo
150	"!scrxor"	pseudo
151	"!ct"		pseudo
152	"!convtab"	pseudo
153	"!fi"		pseudo
154	"!fill"		pseudo
155	"!zn"		pseudo
156	"!zone"		pseudo
157	"!sl"		pseudo
158	"!symbollist"	pseudo
159	"!src"		pseudo
160	"!source"	pseudo
161	"!bin"		pseudo
162	"!binary"	pseudo
163	"!eof"		pseudo
164	"!endoffile"	pseudo
165	"!pseudopc"	pseudo
166	"!align"	pseudo
167	"!cpu"		pseudo
168	"!to"		pseudo
169	"!set"		pseudo
170	"!macro"	pseudo
171	"!if"		pseudo
172	"!ifdef"	pseudo
173	"!ifndef"	pseudo
174	"else"		keyword
175	"if"		keyword
176	"ifdef"		keyword
177	"ifndef"	keyword
178	"!for"		pseudo
179	"!while"	pseudo
180	"!do"		pseudo
181	"until"		keyword
182	"while"		keyword
183	"!al"		pseudo
184	"!as"		pseudo
185	"!rl"		pseudo
186	"!rs"		pseudo
187	"!initmem"	pseudo
188	"!warn"		pseudo
189	"!error"	pseudo
190	"!serious"	pseudo
191	"!addr"		pseudo
192	"!address"	pseudo
193	"!h"		pseudo
194	"!hex"		pseudo
195	"!xor"		pseudo
196	"!skip"		pseudo
197	"ora"	mnemo6502
198	"asl"	mnemo6502
199	"and"	mnemo6502
200	"rol"	mnemo6502
201	"eor"	mnemo6502
202	"lsr"	mnemo6502
203	"adc"	mnemo6502
204	"ror"	mnemo6502
205	"sta"	mnemo6502
206	"stx"	mnemo6502
207	"lda"	mnemo6502
208	"ldx"	mnemo6502
209	"cmp"	mnemo6502
210	"dec"	mnemo6502
211	"sbc"	mnemo6502
212	"inc"	mnemo6502
213	"bit"	mnemo6502
214	"cpx"	mnemo6502
215	"cpy"	mnemo6502
216	"ldy"	mnemo6502
217	"sty"	mnemo6502
218	"php"	mnemo6502
219	"clc"	mnemo6502
220	"plp"	mnemo6502
221	"sec"	mnemo6502
222	"pha"	mnemo6502
223	"cli"	mnemo6502
224	"pla"	mnemo6502
225	"sei"	mnemo6502
226	"dey"	mnemo6502
227	"txa"	mnemo6502
228	"tya"	mnemo6502
229	"txs"	mnemo6502
230	"tay"	mnemo6502
231	"tax"	mnemo6502
232	"clv"	mnemo6502
233	"tsx"	mnemo6502
234	"iny"	mnemo6502
235	"dex"	mnemo6502
236	"cld"	mnemo6502
237	"inx"	mnemo6502
238	"nop"	mnemo6502
239	"sed"	mnemo6502
240	"jsr"	mnemo6502
241	"brk"	pcmnemo6502
242	"jmp"	pcmnemo6502
243	"bpl"	pcmnemo6502
244	"bmi"	pcmnemo6502
245	"bvc"	pcmnemo6502
246	"bvs"	pcmnemo6502
247	"bcc"	pcmnemo6502
248	"bcs"	pcmnemo6502
249	"bne"	pcmnemo6502
250	"beq"	pcmnemo6502
251	"rti"	pcmnemo6502
252	"rts"	pcmnemo6502
253	"phy"	mnemoExt
254	"ply"	mnemoExt
255	"phx"	mnemoExt
256	"plx"	mnemoExt
257	"tsb"	mnemoExt
258	"trb"	mnemoExt
259	"stz"	mnemoExt
260	"bra"	pcmnemoExt
261	"rmb0"	mnemoExt
262	"bbr0"	mnemoExt
263	"smb0"	mnemoExt
264	"bbs0"	mnemoExt
265	"rmb1"	mnemoExt
266	"bbr1"	mnemoExt
267	"smb1"	mnemoExt
268	"bbs1"	mnemoExt
269	"rmb2"	mnemoExt
270	"bbr2"	mnemoExt
271	"smb2"	mnemoExt
272	"bbs2"	mnemoExt
273	"rmb3"	mnemoExt
274	"bbr3"	mnemoExt
275	"smb3"	mnemoExt
276	"bbs3"	mnemoExt
277	"rmb4"	mnemoExt
278	"bbr4"	mnemoExt
279	"smb4"	mnemoExt
280	"bbs4"	mnemoExt
281	"rmb5"	mnemoExt
282	"bbr5"	mnemoExt
283	"smb5"	mnemoExt
284	"bbs5"	mnemoExt
285	"rmb6"	mnemoExt
286	"bbr6"	mnemoExt
287	"smb6"	mnemoExt
288	"bbs6"	mnemoExt
289	"rmb7"	mnemoExt
290	"bbr7"	mnemoExt
291	"smb7"	mnemoExt
292	"bbs7"	mnemoExt
293	"wai"	mnemoExt
294	"pei"	mnemoExt
295	"per"	mnemoExt
296	"mvp"	mnemoExt
297	"mvn"	mnemoExt
298	"rep"	mnemoExt
299	"sep"	mnemoExt
300	"pea"	mnemoExt
301	"phd"	mnemoExt
302	"tcs"	mnemoExt
303	"pld"	mnemoExt
304	"tsc"	mnemoExt
305	"wdm"	mnemoExt
306	"phk"	mnemoExt
307	"tcd"	mnemoExt
308	"tdc"	mnemoExt
309	"phb"	mnemoExt
310	"txy"	mnemoExt
311	"plb"	mnemoExt
312	"tyx"	mnemoExt
313	"xba"	mnemoExt
314	"xce"	mnemoExt
315	"brl"	pcmnemoExt
316	"cop"	mnemoExt
317	"jml"	pcmnemoExt
318	"jsl"	mnemoExt
319	"rtl"	pcmnemoExt
320	"stp"	pcmnemoExt
321	"slo"	mnemoExt
322	"rla"	mnemoExt
323	"sre"	mnemoExt
324	"rra"	mnemoExt
325	"sax"	mnemoExt
326	"lax"	mnemoExt
327	"dcp"	mnemoExt
328	"isc"	mnemoExt
329	"anc"	mnemoExt
330	"ane"	mnemoExt
331	"asr"	mnemoExt
332	"arr"	mnemoExt
333	"alr"	mnemoExt
334	"sbx"	mnemoExt
335	"sha"	mnemoExt
336	"shx"	mnemoExt
337	"shy"	mnemoExt
338	"las"	mnemoExt
339	"tas"	mnemoExt
340	"dop"	mnemoExt
341	"top"	mnemoExt
342	"lxa"	mnemoExt
343	"jam"	pcmnemoExt
344	"map"	mnemoExt
345	"eom"	mnemoExt
346	"aug"	mnemoExt
347	"sac"	mnemoExt
348	"sir"	mnemoExt
349	"orq"	mnemoExt
350	"aslq"	mnemoExt
351	"inq"	mnemoExt
352	"bitq"	mnemoExt
353	"andq"	mnemoExt
354	"rolq"	mnemoExt
355	"deq"	mnemoExt
356	"asrq"	mnemoExt
357	"eorq"	mnemoExt
358	"lsrq"	mnemoExt
359	"adcq"	mnemoExt
360	"rorq"	mnemoExt
361	"stq"	mnemoExt
362	"ldq"	mnemoExt
363	"cpq"	mnemoExt
364	"sbcq"	mnemoExt
365	"cle"	mnemoExt
366	"see"	mnemoExt
367	"tsy"	mnemoExt
368	"inz"	mnemoExt
369	"tys"	mnemoExt
370	"dez"	mnemoExt
371	"neg"	mnemoExt
372	"taz"	mnemoExt
373	"tab"	mnemoExt
374	"bsr"	mnemoExt
375	"tza"	mnemoExt
376	"tba"	mnemoExt
377	"ldz"	mnemoExt
378	"cpz"	mnemoExt
379	"dew"	mnemoExt
380	"asw"	mnemoExt
381	"phz"	mnemoExt
382	"inw"	mnemoExt
383	"row"	mnemoExt
384	"phw"	mnemoExt
385	"plz"	mnemoExt
386	"lbpl"	pcmnemoExt
387	"lbmi"	pcmnemoExt
388	"lbvc"	pcmnemoExt
389	"lbvs"	pcmnemoExt
390	"lbra"	pcmnemoExt
391	"lbcc"	pcmnemoExt
392	"lbcs"	pcmnemoExt
393	"lbne"	pcmnemoExt
394	"lbeq"	pcmnemoExt
395	"rtn"	pcmnemoExt
396done
397	"!a-zA-Z0-9"	checkstring
398#	" \t"		idle		noeat
399
400:pseudo		Pseudo
401	*		idle		noeat
402:mnemo6502	Mnemo6502
403	*		idle		noeat
404:pcmnemo6502	PCMnemo6502
405	*		idle		noeat
406:mnemoExt	MnemoExt
407	*		idle		noeat
408:pcmnemoExt	PCMnemoExt
409	*		idle		noeat
410:keyword	Keyword
411	*		idle		noeat
412