1 | # |
---|
2 | # NASM,WASM,TASM,MASM and GAS x86 syntax highlight |
---|
3 | # // Mike Gorchak |
---|
4 | # // Andres Farfan 2012 |
---|
5 | # |
---|
6 | |
---|
7 | caseinsensitive |
---|
8 | |
---|
9 | context default lightgray |
---|
10 | |
---|
11 | # NASM directives |
---|
12 | keyword whole BITS white |
---|
13 | keyword whole SECTION white |
---|
14 | keyword whole SEGMENT white |
---|
15 | keyword whole ABSOLUTE white |
---|
16 | keyword whole EXTERN white |
---|
17 | keyword whole GLOBAL white |
---|
18 | keyword whole COMMON white |
---|
19 | keyword whole CPU white |
---|
20 | |
---|
21 | # NASM, WASM, TASM, MASM and common modifiers |
---|
22 | keyword whole ALIGN white |
---|
23 | keyword whole ALIGNB white |
---|
24 | keyword whole STRUC white |
---|
25 | keyword whole ENDSTRUC white |
---|
26 | keyword whole ISTRUC white |
---|
27 | keyword whole IEND white |
---|
28 | keyword whole AT white |
---|
29 | keyword whole __FILE__ white |
---|
30 | keyword whole __LINE__ white |
---|
31 | keyword whole __NASM_VER__ white |
---|
32 | keyword whole __NASM_VERSION_ID__ white |
---|
33 | keyword whole __NASM_MAJOR__ white |
---|
34 | keyword whole __NASM_MINOR__ white |
---|
35 | keyword whole __NASM_SUBMINOR__ white |
---|
36 | keyword whole __NASM_PATCHLEVEL__ white |
---|
37 | keyword whole __SECT__ white |
---|
38 | keyword whole STRICT white |
---|
39 | keyword whole SEG white |
---|
40 | keyword whole WRT white |
---|
41 | keyword whole NOSPLIT white |
---|
42 | keyword whole BYTE white |
---|
43 | keyword whole WORD white |
---|
44 | keyword whole DWORD white |
---|
45 | keyword whole QWORD white |
---|
46 | keyword whole TWORD white |
---|
47 | |
---|
48 | # Pseudo instructions |
---|
49 | keyword whole ORG white |
---|
50 | keyword whole EQU white |
---|
51 | keyword whole DB white |
---|
52 | keyword whole DW white |
---|
53 | keyword whole DD white |
---|
54 | keyword whole DQ white |
---|
55 | keyword whole DT white |
---|
56 | keyword whole RESB white |
---|
57 | keyword whole RESW white |
---|
58 | keyword whole RESD white |
---|
59 | keyword whole RESQ white |
---|
60 | keyword whole REST white |
---|
61 | keyword whole INCBIN white |
---|
62 | keyword whole TIMES white |
---|
63 | |
---|
64 | # GAS specific |
---|
65 | keyword whole .string white |
---|
66 | keyword whole .section white |
---|
67 | keyword whole .align white |
---|
68 | keyword whole .type white |
---|
69 | keyword whole .size white |
---|
70 | keyword whole .comm white |
---|
71 | keyword whole .ident white |
---|
72 | keyword whole .globl white |
---|
73 | keyword whole .rodata brightblue |
---|
74 | keyword whole .data brightblue |
---|
75 | keyword whole .text brightblue |
---|
76 | keyword whole .bss brightblue |
---|
77 | |
---|
78 | # NASM/TASM Macroses |
---|
79 | keyword whole %ifdef brightred |
---|
80 | keyword whole %define brightred |
---|
81 | keyword whole %else brightred |
---|
82 | keyword whole %elif brightred |
---|
83 | keyword whole %endif brightred |
---|
84 | keyword whole %macro brightred |
---|
85 | keyword whole %endmacro brightred |
---|
86 | keyword whole %rep brightred |
---|
87 | keyword whole %repl brightred |
---|
88 | keyword whole %strlen brightred |
---|
89 | keyword whole %substr brightred |
---|
90 | keyword whole %arg brightred |
---|
91 | keyword whole %stacksize brightred |
---|
92 | keyword whole %local brightred |
---|
93 | keyword whole %push brightred |
---|
94 | keyword whole %pop brightred |
---|
95 | keyword whole %line brightred |
---|
96 | keyword whole %\! brightred |
---|
97 | keyword whole %\+ brightred |
---|
98 | |
---|
99 | # Generic 16-bit registers set |
---|
100 | keyword whole %al brightmagenta |
---|
101 | keyword whole %bl brightmagenta |
---|
102 | keyword whole %cl brightmagenta |
---|
103 | keyword whole %dl brightmagenta |
---|
104 | keyword whole %ah brightmagenta |
---|
105 | keyword whole %bh brightmagenta |
---|
106 | keyword whole %ch brightmagenta |
---|
107 | keyword whole %dh brightmagenta |
---|
108 | keyword whole %ax brightmagenta |
---|
109 | keyword whole %bx brightmagenta |
---|
110 | keyword whole %cx brightmagenta |
---|
111 | keyword whole %dx brightmagenta |
---|
112 | keyword whole %si brightmagenta |
---|
113 | keyword whole %di brightmagenta |
---|
114 | keyword whole %bp brightmagenta |
---|
115 | keyword whole %sp brightmagenta |
---|
116 | keyword whole %es brightmagenta |
---|
117 | keyword whole %cs brightmagenta |
---|
118 | keyword whole %ds brightmagenta |
---|
119 | |
---|
120 | keyword whole AL brightmagenta |
---|
121 | keyword whole BL brightmagenta |
---|
122 | keyword whole CL brightmagenta |
---|
123 | keyword whole DL brightmagenta |
---|
124 | keyword whole AH brightmagenta |
---|
125 | keyword whole BH brightmagenta |
---|
126 | keyword whole CH brightmagenta |
---|
127 | keyword whole DH brightmagenta |
---|
128 | keyword whole AX brightmagenta |
---|
129 | keyword whole BX brightmagenta |
---|
130 | keyword whole CX brightmagenta |
---|
131 | keyword whole DX brightmagenta |
---|
132 | keyword whole SI brightmagenta |
---|
133 | keyword whole DI brightmagenta |
---|
134 | keyword whole BP brightmagenta |
---|
135 | keyword whole SP brightmagenta |
---|
136 | keyword whole ES brightmagenta |
---|
137 | keyword whole CS brightmagenta |
---|
138 | keyword whole DS brightmagenta |
---|
139 | |
---|
140 | # Generic 32-bit registers set |
---|
141 | keyword whole %eax brightmagenta |
---|
142 | keyword whole %ebx brightmagenta |
---|
143 | keyword whole %ecx brightmagenta |
---|
144 | keyword whole %edx brightmagenta |
---|
145 | keyword whole %esi brightmagenta |
---|
146 | keyword whole %edi brightmagenta |
---|
147 | keyword whole %ebp brightmagenta |
---|
148 | keyword whole %esp brightmagenta |
---|
149 | keyword whole %fs brightmagenta |
---|
150 | keyword whole %gs brightmagenta |
---|
151 | |
---|
152 | keyword whole EAX brightmagenta |
---|
153 | keyword whole EBX brightmagenta |
---|
154 | keyword whole ECX brightmagenta |
---|
155 | keyword whole EDX brightmagenta |
---|
156 | keyword whole ESI brightmagenta |
---|
157 | keyword whole EDI brightmagenta |
---|
158 | keyword whole EBP brightmagenta |
---|
159 | keyword whole ESP brightmagenta |
---|
160 | keyword whole FS brightmagenta |
---|
161 | keyword whole GS brightmagenta |
---|
162 | |
---|
163 | keyword whole CR0 magenta |
---|
164 | keyword whole CR1 magenta |
---|
165 | keyword whole CR2 magenta |
---|
166 | keyword whole CR3 magenta |
---|
167 | keyword whole DR0 magenta |
---|
168 | keyword whole DR1 magenta |
---|
169 | keyword whole DR3 magenta |
---|
170 | keyword whole DR4 magenta |
---|
171 | keyword whole DR5 magenta |
---|
172 | keyword whole DR6 magenta |
---|
173 | keyword whole DR7 magenta |
---|
174 | keyword whole TR0 magenta |
---|
175 | keyword whole TR1 magenta |
---|
176 | keyword whole TR2 magenta |
---|
177 | keyword whole TR3 magenta |
---|
178 | keyword whole TR4 magenta |
---|
179 | keyword whole TR5 magenta |
---|
180 | keyword whole TR6 magenta |
---|
181 | keyword whole TR7 magenta |
---|
182 | keyword whole TR8 magenta |
---|
183 | keyword whole TR9 magenta |
---|
184 | keyword whole TR10 magenta |
---|
185 | keyword whole TR11 magenta |
---|
186 | |
---|
187 | # Generic AMD64 registers set |
---|
188 | keyword whole %rax brightmagenta |
---|
189 | keyword whole %rbx brightmagenta |
---|
190 | keyword whole %rcx brightmagenta |
---|
191 | keyword whole %rdx brightmagenta |
---|
192 | keyword whole %rsi brightmagenta |
---|
193 | keyword whole %rdi brightmagenta |
---|
194 | keyword whole %rbp brightmagenta |
---|
195 | keyword whole %rsp brightmagenta |
---|
196 | keyword whole %r8 brightmagenta |
---|
197 | keyword whole %r9 brightmagenta |
---|
198 | keyword whole %r10 brightmagenta |
---|
199 | keyword whole %r11 brightmagenta |
---|
200 | keyword whole %r12 brightmagenta |
---|
201 | keyword whole %r13 brightmagenta |
---|
202 | keyword whole %r14 brightmagenta |
---|
203 | keyword whole %r15 brightmagenta |
---|
204 | |
---|
205 | keyword whole RAX brightmagenta |
---|
206 | keyword whole RBX brightmagenta |
---|
207 | keyword whole RCX brightmagenta |
---|
208 | keyword whole RDX brightmagenta |
---|
209 | keyword whole RSI brightmagenta |
---|
210 | keyword whole RDI brightmagenta |
---|
211 | keyword whole RBP brightmagenta |
---|
212 | keyword whole RSP brightmagenta |
---|
213 | keyword whole R8 brightmagenta |
---|
214 | keyword whole R9 brightmagenta |
---|
215 | keyword whole R10 brightmagenta |
---|
216 | keyword whole R11 brightmagenta |
---|
217 | keyword whole R12 brightmagenta |
---|
218 | keyword whole R13 brightmagenta |
---|
219 | keyword whole R14 brightmagenta |
---|
220 | keyword whole R15 brightmagenta |
---|
221 | |
---|
222 | #AMD64 32-bit registers. 64-bit mode |
---|
223 | keyword whole %r8d brightmagenta |
---|
224 | keyword whole %r9d brightmagenta |
---|
225 | keyword whole %r10d brightmagenta |
---|
226 | keyword whole %r11d brightmagenta |
---|
227 | keyword whole %r12d brightmagenta |
---|
228 | keyword whole %r13d brightmagenta |
---|
229 | keyword whole %r14d brightmagenta |
---|
230 | keyword whole %r15d brightmagenta |
---|
231 | |
---|
232 | keyword whole R8D brightmagenta |
---|
233 | keyword whole R9D brightmagenta |
---|
234 | keyword whole R10D brightmagenta |
---|
235 | keyword whole R11D brightmagenta |
---|
236 | keyword whole R12D brightmagenta |
---|
237 | keyword whole R13D brightmagenta |
---|
238 | keyword whole R14D brightmagenta |
---|
239 | keyword whole R15D brightmagenta |
---|
240 | |
---|
241 | #AMD64 16-bit registers. 64-bit mode |
---|
242 | keyword whole %r8w brightmagenta |
---|
243 | keyword whole %r9w brightmagenta |
---|
244 | keyword whole %r10w brightmagenta |
---|
245 | keyword whole %r11w brightmagenta |
---|
246 | keyword whole %r12w brightmagenta |
---|
247 | keyword whole %r13w brightmagenta |
---|
248 | keyword whole %r14w brightmagenta |
---|
249 | keyword whole %r15w brightmagenta |
---|
250 | |
---|
251 | keyword whole R8W brightmagenta |
---|
252 | keyword whole R9W brightmagenta |
---|
253 | keyword whole R10W brightmagenta |
---|
254 | keyword whole R11W brightmagenta |
---|
255 | keyword whole R12W brightmagenta |
---|
256 | keyword whole R13W brightmagenta |
---|
257 | keyword whole R14W brightmagenta |
---|
258 | keyword whole R15W brightmagenta |
---|
259 | |
---|
260 | #AMD64 8-bit registers. 64-bit mode |
---|
261 | keyword whole %sil brightmagenta |
---|
262 | keyword whole %dil brightmagenta |
---|
263 | keyword whole %bpl brightmagenta |
---|
264 | keyword whole %spl brightmagenta |
---|
265 | keyword whole %r8b brightmagenta |
---|
266 | keyword whole %r9b brightmagenta |
---|
267 | keyword whole %r10b brightmagenta |
---|
268 | keyword whole %r11b brightmagenta |
---|
269 | keyword whole %r12b brightmagenta |
---|
270 | keyword whole %r13b brightmagenta |
---|
271 | keyword whole %r14b brightmagenta |
---|
272 | keyword whole %r15b brightmagenta |
---|
273 | |
---|
274 | keyword whole SIL brightmagenta |
---|
275 | keyword whole DIL brightmagenta |
---|
276 | keyword whole BPL brightmagenta |
---|
277 | keyword whole SPL brightmagenta |
---|
278 | keyword whole R8B brightmagenta |
---|
279 | keyword whole R9B brightmagenta |
---|
280 | keyword whole R10B brightmagenta |
---|
281 | keyword whole R11B brightmagenta |
---|
282 | keyword whole R12B brightmagenta |
---|
283 | keyword whole R13B brightmagenta |
---|
284 | keyword whole R14B brightmagenta |
---|
285 | keyword whole R15B brightmagenta |
---|
286 | |
---|
287 | #AMD64 System registers. 64-bit mode |
---|
288 | keyword whole CR8 magenta |
---|
289 | |
---|
290 | #AMD64 SSE Registers. 64-bit mode |
---|
291 | keyword whole %xmm8 brightcyan |
---|
292 | keyword whole %xmm9 brightcyan |
---|
293 | keyword whole %xmm10 brightcyan |
---|
294 | keyword whole %xmm11 brightcyan |
---|
295 | keyword whole %xmm12 brightcyan |
---|
296 | keyword whole %xmm13 brightcyan |
---|
297 | keyword whole %xmm14 brightcyan |
---|
298 | keyword whole %xmm15 brightcyan |
---|
299 | |
---|
300 | keyword whole xmm8 brightcyan |
---|
301 | keyword whole xmm9 brightcyan |
---|
302 | keyword whole xmm10 brightcyan |
---|
303 | keyword whole xmm11 brightcyan |
---|
304 | keyword whole xmm12 brightcyan |
---|
305 | keyword whole xmm13 brightcyan |
---|
306 | keyword whole xmm14 brightcyan |
---|
307 | keyword whole xmm15 brightcyan |
---|
308 | |
---|
309 | # FPU registers set |
---|
310 | keyword whole st0 brightcyan |
---|
311 | keyword whole st1 brightcyan |
---|
312 | keyword whole st2 brightcyan |
---|
313 | keyword whole st3 brightcyan |
---|
314 | keyword whole st4 brightcyan |
---|
315 | keyword whole st5 brightcyan |
---|
316 | keyword whole st6 brightcyan |
---|
317 | keyword whole st7 brightcyan |
---|
318 | keyword whole %st0 brightcyan |
---|
319 | keyword whole %st1 brightcyan |
---|
320 | keyword whole %st2 brightcyan |
---|
321 | keyword whole %st3 brightcyan |
---|
322 | keyword whole %st4 brightcyan |
---|
323 | keyword whole %st5 brightcyan |
---|
324 | keyword whole %st6 brightcyan |
---|
325 | keyword whole %st7 brightcyan |
---|
326 | |
---|
327 | # MMX/3DNOW registers set |
---|
328 | keyword whole mm0 brightcyan |
---|
329 | keyword whole mm1 brightcyan |
---|
330 | keyword whole mm2 brightcyan |
---|
331 | keyword whole mm3 brightcyan |
---|
332 | keyword whole mm4 brightcyan |
---|
333 | keyword whole mm5 brightcyan |
---|
334 | keyword whole mm6 brightcyan |
---|
335 | keyword whole mm7 brightcyan |
---|
336 | keyword whole %mm0 brightcyan |
---|
337 | keyword whole %mm1 brightcyan |
---|
338 | keyword whole %mm2 brightcyan |
---|
339 | keyword whole %mm3 brightcyan |
---|
340 | keyword whole %mm4 brightcyan |
---|
341 | keyword whole %mm5 brightcyan |
---|
342 | keyword whole %mm6 brightcyan |
---|
343 | keyword whole %mm7 brightcyan |
---|
344 | |
---|
345 | # SSE registers set |
---|
346 | keyword whole xmm0 brightcyan |
---|
347 | keyword whole xmm1 brightcyan |
---|
348 | keyword whole xmm2 brightcyan |
---|
349 | keyword whole xmm3 brightcyan |
---|
350 | keyword whole xmm4 brightcyan |
---|
351 | keyword whole xmm5 brightcyan |
---|
352 | keyword whole xmm6 brightcyan |
---|
353 | keyword whole xmm7 brightcyan |
---|
354 | keyword whole %xmm0 brightcyan |
---|
355 | keyword whole %xmm1 brightcyan |
---|
356 | keyword whole %xmm2 brightcyan |
---|
357 | keyword whole %xmm3 brightcyan |
---|
358 | keyword whole %xmm4 brightcyan |
---|
359 | keyword whole %xmm5 brightcyan |
---|
360 | keyword whole %xmm6 brightcyan |
---|
361 | keyword whole %xmm7 brightcyan |
---|
362 | |
---|
363 | # Common symbols |
---|
364 | keyword ; brown |
---|
365 | keyword ! brown |
---|
366 | keyword /\* brown |
---|
367 | keyword \*/ brown |
---|
368 | keyword [ white |
---|
369 | keyword ] white |
---|
370 | keyword , white |
---|
371 | keyword \+ white |
---|
372 | keyword - white |
---|
373 | keyword . white |
---|
374 | keyword ( white |
---|
375 | keyword ) white |
---|
376 | keyword : white |
---|
377 | keyword @ white |
---|
378 | keyword >> white |
---|
379 | keyword << white |
---|
380 | keyword % white |
---|
381 | keyword \\ white |
---|
382 | keyword / white |
---|
383 | keyword // white |
---|
384 | keyword ~ white |
---|
385 | keyword ^ white |
---|
386 | keyword & white |
---|
387 | keyword \* white |
---|
388 | keyword | white |
---|
389 | keyword $ brightgreen |
---|
390 | keyword $$ brightgreen |
---|
391 | keyword %% cyan |
---|
392 | |
---|
393 | context " " green |
---|
394 | context ' ' brightgreen |
---|
395 | context exclusive ; \n brown |
---|
396 | spellcheck |
---|
397 | |
---|
398 | context exclusive /\* \*/ brown |
---|
399 | spellcheck |
---|
400 | |
---|
401 | context exclusive ! \n brown |
---|
402 | spellcheck |
---|