assembler.syntax 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. #
  2. # NASM,WASM,TASM,MASM and GAS x86 syntax highlight
  3. # // Mike Gorchak
  4. #
  5. context default lightgray
  6. # NASM directives
  7. keyword whole BITS white
  8. keyword whole SECTION white
  9. keyword whole SEGMENT white
  10. keyword whole ABSOLUTE white
  11. keyword whole EXTERN white
  12. keyword whole GLOBAL white
  13. keyword whole COMMON white
  14. keyword whole CPU white
  15. # NASM, WASM, TASM, MASM and common modifiers
  16. keyword whole ALIGN white
  17. keyword whole ALIGNB white
  18. keyword whole STRUC white
  19. keyword whole ENDSTRUC white
  20. keyword whole ISTRUC white
  21. keyword whole IEND white
  22. keyword whole AT white
  23. keyword whole __FILE__ white
  24. keyword whole __LINE__ white
  25. keyword whole __NASM_VER__ white
  26. keyword whole __NASM_VERSION_ID__ white
  27. keyword whole __NASM_MAJOR__ white
  28. keyword whole __NASM_MINOR__ white
  29. keyword whole __NASM_SUBMINOR__ white
  30. keyword whole __NASM_PATCHLEVEL__ white
  31. keyword whole __SECT__ white
  32. keyword whole STRICT white
  33. keyword whole SEG white
  34. keyword whole WRT white
  35. keyword whole NOSPLIT white
  36. keyword whole BYTE white
  37. keyword whole WORD white
  38. keyword whole DWORD white
  39. keyword whole QWORD white
  40. keyword whole TWORD white
  41. keyword whole align white
  42. keyword whole alignb white
  43. keyword whole struc white
  44. keyword whole endstruc white
  45. keyword whole istruc white
  46. keyword whole iend white
  47. keyword whole at white
  48. keyword whole strict white
  49. keyword whole seg white
  50. keyword whole wrt white
  51. keyword whole nosplit white
  52. keyword whole byte white
  53. keyword whole word white
  54. keyword whole dword white
  55. keyword whole qword white
  56. keyword whole tword white
  57. # Pseudo instructions
  58. keyword whole Org white
  59. keyword whole Equ white
  60. keyword whole Db white
  61. keyword whole Dw white
  62. keyword whole Dd white
  63. keyword whole Dq white
  64. keyword whole Dt white
  65. keyword whole Resb white
  66. keyword whole Resw white
  67. keyword whole Resd white
  68. keyword whole Resq white
  69. keyword whole Rest white
  70. keyword whole Incbin white
  71. keyword whole Times white
  72. keyword whole org white
  73. keyword whole equ white
  74. keyword whole db white
  75. keyword whole dw white
  76. keyword whole dd white
  77. keyword whole dq white
  78. keyword whole dt white
  79. keyword whole resb white
  80. keyword whole resw white
  81. keyword whole resd white
  82. keyword whole resq white
  83. keyword whole rest white
  84. keyword whole incbin white
  85. keyword whole times white
  86. keyword whole ORG white
  87. keyword whole EQU white
  88. keyword whole DB white
  89. keyword whole DW white
  90. keyword whole DD white
  91. keyword whole DQ white
  92. keyword whole DT white
  93. keyword whole RESB white
  94. keyword whole RESW white
  95. keyword whole RESD white
  96. keyword whole RESQ white
  97. keyword whole REST white
  98. keyword whole INCBIN white
  99. keyword whole TIMES white
  100. # GAS specific
  101. keyword whole .string white
  102. keyword whole .section white
  103. keyword whole .align white
  104. keyword whole .type white
  105. keyword whole .size white
  106. keyword whole .comm white
  107. keyword whole .ident white
  108. keyword whole .globl white
  109. keyword whole .rodata brightblue
  110. keyword whole .data brightblue
  111. keyword whole .text brightblue
  112. keyword whole .bss brightblue
  113. # NASM/TASM Macroses
  114. keyword whole %ifdef brightred
  115. keyword whole %define brightred
  116. keyword whole %else brightred
  117. keyword whole %elif brightred
  118. keyword whole %endif brightred
  119. keyword whole %macro brightred
  120. keyword whole %endmacro brightred
  121. keyword whole %rep brightred
  122. keyword whole %repl brightred
  123. keyword whole %strlen brightred
  124. keyword whole %substr brightred
  125. keyword whole %arg brightred
  126. keyword whole %stacksize brightred
  127. keyword whole %local brightred
  128. keyword whole %push brightred
  129. keyword whole %pop brightred
  130. keyword whole %line brightred
  131. keyword whole %\! brightred
  132. keyword whole %\+ brightred
  133. # Generic 16-bit registers set
  134. keyword whole al brightmagenta
  135. keyword whole bl brightmagenta
  136. keyword whole cl brightmagenta
  137. keyword whole dl brightmagenta
  138. keyword whole ah brightmagenta
  139. keyword whole bh brightmagenta
  140. keyword whole ch brightmagenta
  141. keyword whole dh brightmagenta
  142. keyword whole ax brightmagenta
  143. keyword whole bx brightmagenta
  144. keyword whole cx brightmagenta
  145. keyword whole dx brightmagenta
  146. keyword whole si brightmagenta
  147. keyword whole di brightmagenta
  148. keyword whole bp brightmagenta
  149. keyword whole sp brightmagenta
  150. keyword whole es brightmagenta
  151. keyword whole cs brightmagenta
  152. keyword whole ds brightmagenta
  153. keyword whole %al brightmagenta
  154. keyword whole %bl brightmagenta
  155. keyword whole %cl brightmagenta
  156. keyword whole %dl brightmagenta
  157. keyword whole %ah brightmagenta
  158. keyword whole %bh brightmagenta
  159. keyword whole %ch brightmagenta
  160. keyword whole %dh brightmagenta
  161. keyword whole %ax brightmagenta
  162. keyword whole %bx brightmagenta
  163. keyword whole %cx brightmagenta
  164. keyword whole %dx brightmagenta
  165. keyword whole %si brightmagenta
  166. keyword whole %di brightmagenta
  167. keyword whole %bp brightmagenta
  168. keyword whole %sp brightmagenta
  169. keyword whole %es brightmagenta
  170. keyword whole %cs brightmagenta
  171. keyword whole %ds brightmagenta
  172. keyword whole AL brightmagenta
  173. keyword whole BL brightmagenta
  174. keyword whole CL brightmagenta
  175. keyword whole DL brightmagenta
  176. keyword whole AH brightmagenta
  177. keyword whole BH brightmagenta
  178. keyword whole CH brightmagenta
  179. keyword whole DH brightmagenta
  180. keyword whole AX brightmagenta
  181. keyword whole BX brightmagenta
  182. keyword whole CX brightmagenta
  183. keyword whole DX brightmagenta
  184. keyword whole SI brightmagenta
  185. keyword whole DI brightmagenta
  186. keyword whole BP brightmagenta
  187. keyword whole SP brightmagenta
  188. keyword whole ES brightmagenta
  189. keyword whole CS brightmagenta
  190. keyword whole DS brightmagenta
  191. # Generic 32-bit registers set
  192. keyword whole eax brightmagenta
  193. keyword whole ebx brightmagenta
  194. keyword whole ecx brightmagenta
  195. keyword whole edx brightmagenta
  196. keyword whole esi brightmagenta
  197. keyword whole edi brightmagenta
  198. keyword whole ebp brightmagenta
  199. keyword whole esp brightmagenta
  200. keyword whole fs brightmagenta
  201. keyword whole gs brightmagenta
  202. keyword whole %eax brightmagenta
  203. keyword whole %ebx brightmagenta
  204. keyword whole %ecx brightmagenta
  205. keyword whole %edx brightmagenta
  206. keyword whole %esi brightmagenta
  207. keyword whole %edi brightmagenta
  208. keyword whole %ebp brightmagenta
  209. keyword whole %esp brightmagenta
  210. keyword whole %fs brightmagenta
  211. keyword whole %gs brightmagenta
  212. keyword whole EAX brightmagenta
  213. keyword whole EBX brightmagenta
  214. keyword whole ECX brightmagenta
  215. keyword whole EDX brightmagenta
  216. keyword whole ESI brightmagenta
  217. keyword whole EDI brightmagenta
  218. keyword whole EBP brightmagenta
  219. keyword whole ESP brightmagenta
  220. keyword whole FS brightmagenta
  221. keyword whole GS brightmagenta
  222. keyword whole cr0 magenta
  223. keyword whole cr1 magenta
  224. keyword whole cr2 magenta
  225. keyword whole dr0 magenta
  226. keyword whole dr1 magenta
  227. keyword whole tr0 magenta
  228. keyword whole tr1 magenta
  229. keyword whole CR0 magenta
  230. keyword whole CR1 magenta
  231. keyword whole CR2 magenta
  232. keyword whole DR0 magenta
  233. keyword whole DR1 magenta
  234. keyword whole TR0 magenta
  235. keyword whole TR1 magenta
  236. # Generic AMD64 registers set
  237. keyword whole rax brightmagenta
  238. keyword whole rbx brightmagenta
  239. keyword whole rcx brightmagenta
  240. keyword whole rdx brightmagenta
  241. keyword whole rsi brightmagenta
  242. keyword whole rdi brightmagenta
  243. keyword whole rbp brightmagenta
  244. keyword whole rsp brightmagenta
  245. keyword whole r8 brightmagenta
  246. keyword whole r9 brightmagenta
  247. keyword whole r10 brightmagenta
  248. keyword whole r11 brightmagenta
  249. keyword whole r12 brightmagenta
  250. keyword whole r13 brightmagenta
  251. keyword whole r14 brightmagenta
  252. keyword whole r15 brightmagenta
  253. keyword whole %rax brightmagenta
  254. keyword whole %rbx brightmagenta
  255. keyword whole %rcx brightmagenta
  256. keyword whole %rdx brightmagenta
  257. keyword whole %rsi brightmagenta
  258. keyword whole %rdi brightmagenta
  259. keyword whole %rbp brightmagenta
  260. keyword whole %rsp brightmagenta
  261. keyword whole %r8 brightmagenta
  262. keyword whole %r9 brightmagenta
  263. keyword whole %r10 brightmagenta
  264. keyword whole %r11 brightmagenta
  265. keyword whole %r12 brightmagenta
  266. keyword whole %r13 brightmagenta
  267. keyword whole %r14 brightmagenta
  268. keyword whole %r15 brightmagenta
  269. keyword whole RAX brightmagenta
  270. keyword whole RBX brightmagenta
  271. keyword whole RCX brightmagenta
  272. keyword whole RDX brightmagenta
  273. keyword whole RSI brightmagenta
  274. keyword whole RDI brightmagenta
  275. keyword whole RBP brightmagenta
  276. keyword whole RSP brightmagenta
  277. keyword whole R8 brightmagenta
  278. keyword whole R9 brightmagenta
  279. keyword whole R10 brightmagenta
  280. keyword whole R11 brightmagenta
  281. keyword whole R12 brightmagenta
  282. keyword whole R13 brightmagenta
  283. keyword whole R14 brightmagenta
  284. keyword whole R15 brightmagenta
  285. # FPU registers set
  286. keyword whole st0 brightcyan
  287. keyword whole st1 brightcyan
  288. keyword whole st2 brightcyan
  289. keyword whole st3 brightcyan
  290. keyword whole st4 brightcyan
  291. keyword whole st5 brightcyan
  292. keyword whole st6 brightcyan
  293. keyword whole st7 brightcyan
  294. keyword whole %st0 brightcyan
  295. keyword whole %st1 brightcyan
  296. keyword whole %st2 brightcyan
  297. keyword whole %st3 brightcyan
  298. keyword whole %st4 brightcyan
  299. keyword whole %st5 brightcyan
  300. keyword whole %st6 brightcyan
  301. keyword whole %st7 brightcyan
  302. # MMX/3DNOW registers set
  303. keyword whole mm0 brightcyan
  304. keyword whole mm1 brightcyan
  305. keyword whole mm2 brightcyan
  306. keyword whole mm3 brightcyan
  307. keyword whole mm4 brightcyan
  308. keyword whole mm5 brightcyan
  309. keyword whole mm6 brightcyan
  310. keyword whole mm7 brightcyan
  311. keyword whole %mm0 brightcyan
  312. keyword whole %mm1 brightcyan
  313. keyword whole %mm2 brightcyan
  314. keyword whole %mm3 brightcyan
  315. keyword whole %mm4 brightcyan
  316. keyword whole %mm5 brightcyan
  317. keyword whole %mm6 brightcyan
  318. keyword whole %mm7 brightcyan
  319. # SSE registers set
  320. keyword whole xmm0 brightcyan
  321. keyword whole xmm1 brightcyan
  322. keyword whole xmm2 brightcyan
  323. keyword whole xmm3 brightcyan
  324. keyword whole xmm4 brightcyan
  325. keyword whole xmm5 brightcyan
  326. keyword whole xmm6 brightcyan
  327. keyword whole xmm7 brightcyan
  328. keyword whole %xmm0 brightcyan
  329. keyword whole %xmm1 brightcyan
  330. keyword whole %xmm2 brightcyan
  331. keyword whole %xmm3 brightcyan
  332. keyword whole %xmm4 brightcyan
  333. keyword whole %xmm5 brightcyan
  334. keyword whole %xmm6 brightcyan
  335. keyword whole %xmm7 brightcyan
  336. # Common symbols
  337. keyword ; brown
  338. keyword ! brown
  339. keyword /\* brown
  340. keyword \*/ brown
  341. keyword [ white
  342. keyword ] white
  343. keyword , white
  344. keyword \+ white
  345. keyword - white
  346. keyword . white
  347. keyword ( white
  348. keyword ) white
  349. keyword : white
  350. keyword @ white
  351. keyword >> white
  352. keyword << white
  353. keyword % white
  354. keyword \\ white
  355. keyword / white
  356. keyword // white
  357. keyword ~ white
  358. keyword ^ white
  359. keyword & white
  360. keyword \* white
  361. keyword | white
  362. keyword $ brightgreen
  363. keyword $$ brightgreen
  364. keyword %% cyan
  365. context " " green
  366. context ' ' brightgreen
  367. context exclusive ; \n brown
  368. spellcheck
  369. context exclusive /\* \*/ brown
  370. spellcheck
  371. context exclusive ! \n brown
  372. spellcheck