assembler.syntax 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. #
  2. # NASM,WASM,TASM,MASM and GAS x86 syntax highlight
  3. # // Mike Gorchak
  4. #
  5. caseinsensitive
  6. context default lightgray
  7. # NASM directives
  8. keyword whole BITS white
  9. keyword whole SECTION white
  10. keyword whole SEGMENT white
  11. keyword whole ABSOLUTE white
  12. keyword whole EXTERN white
  13. keyword whole GLOBAL white
  14. keyword whole COMMON white
  15. keyword whole CPU white
  16. # NASM, WASM, TASM, MASM and common modifiers
  17. keyword whole ALIGN white
  18. keyword whole ALIGNB white
  19. keyword whole STRUC white
  20. keyword whole ENDSTRUC white
  21. keyword whole ISTRUC white
  22. keyword whole IEND white
  23. keyword whole AT white
  24. keyword whole __FILE__ white
  25. keyword whole __LINE__ white
  26. keyword whole __NASM_VER__ white
  27. keyword whole __NASM_VERSION_ID__ white
  28. keyword whole __NASM_MAJOR__ white
  29. keyword whole __NASM_MINOR__ white
  30. keyword whole __NASM_SUBMINOR__ white
  31. keyword whole __NASM_PATCHLEVEL__ white
  32. keyword whole __SECT__ white
  33. keyword whole STRICT white
  34. keyword whole SEG white
  35. keyword whole WRT white
  36. keyword whole NOSPLIT white
  37. keyword whole BYTE white
  38. keyword whole WORD white
  39. keyword whole DWORD white
  40. keyword whole QWORD white
  41. keyword whole TWORD white
  42. # Pseudo instructions
  43. keyword whole ORG white
  44. keyword whole EQU white
  45. keyword whole DB white
  46. keyword whole DW white
  47. keyword whole DD white
  48. keyword whole DQ white
  49. keyword whole DT white
  50. keyword whole RESB white
  51. keyword whole RESW white
  52. keyword whole RESD white
  53. keyword whole RESQ white
  54. keyword whole REST white
  55. keyword whole INCBIN white
  56. keyword whole TIMES white
  57. # GAS specific
  58. keyword whole .string white
  59. keyword whole .section white
  60. keyword whole .align white
  61. keyword whole .type white
  62. keyword whole .size white
  63. keyword whole .comm white
  64. keyword whole .ident white
  65. keyword whole .globl white
  66. keyword whole .rodata brightblue
  67. keyword whole .data brightblue
  68. keyword whole .text brightblue
  69. keyword whole .bss brightblue
  70. # NASM/TASM Macroses
  71. keyword whole %ifdef brightred
  72. keyword whole %define brightred
  73. keyword whole %else brightred
  74. keyword whole %elif brightred
  75. keyword whole %endif brightred
  76. keyword whole %macro brightred
  77. keyword whole %endmacro brightred
  78. keyword whole %rep brightred
  79. keyword whole %repl brightred
  80. keyword whole %strlen brightred
  81. keyword whole %substr brightred
  82. keyword whole %arg brightred
  83. keyword whole %stacksize brightred
  84. keyword whole %local brightred
  85. keyword whole %push brightred
  86. keyword whole %pop brightred
  87. keyword whole %line brightred
  88. keyword whole %\! brightred
  89. keyword whole %\+ brightred
  90. # Generic 16-bit registers set
  91. keyword whole %al brightmagenta
  92. keyword whole %bl brightmagenta
  93. keyword whole %cl brightmagenta
  94. keyword whole %dl brightmagenta
  95. keyword whole %ah brightmagenta
  96. keyword whole %bh brightmagenta
  97. keyword whole %ch brightmagenta
  98. keyword whole %dh brightmagenta
  99. keyword whole %ax brightmagenta
  100. keyword whole %bx brightmagenta
  101. keyword whole %cx brightmagenta
  102. keyword whole %dx brightmagenta
  103. keyword whole %si brightmagenta
  104. keyword whole %di brightmagenta
  105. keyword whole %bp brightmagenta
  106. keyword whole %sp brightmagenta
  107. keyword whole %es brightmagenta
  108. keyword whole %cs brightmagenta
  109. keyword whole %ds brightmagenta
  110. keyword whole AL brightmagenta
  111. keyword whole BL brightmagenta
  112. keyword whole CL brightmagenta
  113. keyword whole DL brightmagenta
  114. keyword whole AH brightmagenta
  115. keyword whole BH brightmagenta
  116. keyword whole CH brightmagenta
  117. keyword whole DH brightmagenta
  118. keyword whole AX brightmagenta
  119. keyword whole BX brightmagenta
  120. keyword whole CX brightmagenta
  121. keyword whole DX brightmagenta
  122. keyword whole SI brightmagenta
  123. keyword whole DI brightmagenta
  124. keyword whole BP brightmagenta
  125. keyword whole SP brightmagenta
  126. keyword whole ES brightmagenta
  127. keyword whole CS brightmagenta
  128. keyword whole DS brightmagenta
  129. # Generic 32-bit registers set
  130. keyword whole %eax brightmagenta
  131. keyword whole %ebx brightmagenta
  132. keyword whole %ecx brightmagenta
  133. keyword whole %edx brightmagenta
  134. keyword whole %esi brightmagenta
  135. keyword whole %edi brightmagenta
  136. keyword whole %ebp brightmagenta
  137. keyword whole %esp brightmagenta
  138. keyword whole %fs brightmagenta
  139. keyword whole %gs brightmagenta
  140. keyword whole EAX brightmagenta
  141. keyword whole EBX brightmagenta
  142. keyword whole ECX brightmagenta
  143. keyword whole EDX brightmagenta
  144. keyword whole ESI brightmagenta
  145. keyword whole EDI brightmagenta
  146. keyword whole EBP brightmagenta
  147. keyword whole ESP brightmagenta
  148. keyword whole FS brightmagenta
  149. keyword whole GS brightmagenta
  150. keyword whole CR0 magenta
  151. keyword whole CR1 magenta
  152. keyword whole CR2 magenta
  153. keyword whole CR3 magenta
  154. keyword whole DR0 magenta
  155. keyword whole DR1 magenta
  156. keyword whole DR3 magenta
  157. keyword whole DR4 magenta
  158. keyword whole DR5 magenta
  159. keyword whole DR6 magenta
  160. keyword whole DR7 magenta
  161. keyword whole TR0 magenta
  162. keyword whole TR1 magenta
  163. keyword whole TR2 magenta
  164. keyword whole TR3 magenta
  165. keyword whole TR4 magenta
  166. keyword whole TR5 magenta
  167. keyword whole TR6 magenta
  168. keyword whole TR7 magenta
  169. keyword whole TR8 magenta
  170. keyword whole TR9 magenta
  171. keyword whole TR10 magenta
  172. keyword whole TR11 magenta
  173. # Generic AMD64 registers set
  174. keyword whole %rax brightmagenta
  175. keyword whole %rbx brightmagenta
  176. keyword whole %rcx brightmagenta
  177. keyword whole %rdx brightmagenta
  178. keyword whole %rsi brightmagenta
  179. keyword whole %rdi brightmagenta
  180. keyword whole %rbp brightmagenta
  181. keyword whole %rsp brightmagenta
  182. keyword whole %r8 brightmagenta
  183. keyword whole %r9 brightmagenta
  184. keyword whole %r10 brightmagenta
  185. keyword whole %r11 brightmagenta
  186. keyword whole %r12 brightmagenta
  187. keyword whole %r13 brightmagenta
  188. keyword whole %r14 brightmagenta
  189. keyword whole %r15 brightmagenta
  190. keyword whole RAX brightmagenta
  191. keyword whole RBX brightmagenta
  192. keyword whole RCX brightmagenta
  193. keyword whole RDX brightmagenta
  194. keyword whole RSI brightmagenta
  195. keyword whole RDI brightmagenta
  196. keyword whole RBP brightmagenta
  197. keyword whole RSP brightmagenta
  198. keyword whole R8 brightmagenta
  199. keyword whole R9 brightmagenta
  200. keyword whole R10 brightmagenta
  201. keyword whole R11 brightmagenta
  202. keyword whole R12 brightmagenta
  203. keyword whole R13 brightmagenta
  204. keyword whole R14 brightmagenta
  205. keyword whole R15 brightmagenta
  206. # FPU registers set
  207. keyword whole st0 brightcyan
  208. keyword whole st1 brightcyan
  209. keyword whole st2 brightcyan
  210. keyword whole st3 brightcyan
  211. keyword whole st4 brightcyan
  212. keyword whole st5 brightcyan
  213. keyword whole st6 brightcyan
  214. keyword whole st7 brightcyan
  215. keyword whole %st0 brightcyan
  216. keyword whole %st1 brightcyan
  217. keyword whole %st2 brightcyan
  218. keyword whole %st3 brightcyan
  219. keyword whole %st4 brightcyan
  220. keyword whole %st5 brightcyan
  221. keyword whole %st6 brightcyan
  222. keyword whole %st7 brightcyan
  223. # MMX/3DNOW registers set
  224. keyword whole mm0 brightcyan
  225. keyword whole mm1 brightcyan
  226. keyword whole mm2 brightcyan
  227. keyword whole mm3 brightcyan
  228. keyword whole mm4 brightcyan
  229. keyword whole mm5 brightcyan
  230. keyword whole mm6 brightcyan
  231. keyword whole mm7 brightcyan
  232. keyword whole %mm0 brightcyan
  233. keyword whole %mm1 brightcyan
  234. keyword whole %mm2 brightcyan
  235. keyword whole %mm3 brightcyan
  236. keyword whole %mm4 brightcyan
  237. keyword whole %mm5 brightcyan
  238. keyword whole %mm6 brightcyan
  239. keyword whole %mm7 brightcyan
  240. # SSE registers set
  241. keyword whole xmm0 brightcyan
  242. keyword whole xmm1 brightcyan
  243. keyword whole xmm2 brightcyan
  244. keyword whole xmm3 brightcyan
  245. keyword whole xmm4 brightcyan
  246. keyword whole xmm5 brightcyan
  247. keyword whole xmm6 brightcyan
  248. keyword whole xmm7 brightcyan
  249. keyword whole %xmm0 brightcyan
  250. keyword whole %xmm1 brightcyan
  251. keyword whole %xmm2 brightcyan
  252. keyword whole %xmm3 brightcyan
  253. keyword whole %xmm4 brightcyan
  254. keyword whole %xmm5 brightcyan
  255. keyword whole %xmm6 brightcyan
  256. keyword whole %xmm7 brightcyan
  257. # Common symbols
  258. keyword ; brown
  259. keyword ! brown
  260. keyword /\* brown
  261. keyword \*/ brown
  262. keyword [ white
  263. keyword ] white
  264. keyword , white
  265. keyword \+ white
  266. keyword - white
  267. keyword . white
  268. keyword ( white
  269. keyword ) white
  270. keyword : white
  271. keyword @ white
  272. keyword >> white
  273. keyword << white
  274. keyword % white
  275. keyword \\ white
  276. keyword / white
  277. keyword // white
  278. keyword ~ white
  279. keyword ^ white
  280. keyword & white
  281. keyword \* white
  282. keyword | white
  283. keyword $ brightgreen
  284. keyword $$ brightgreen
  285. keyword %% cyan
  286. context " " green
  287. context ' ' brightgreen
  288. context exclusive ; \n brown
  289. spellcheck
  290. context exclusive /\* \*/ brown
  291. spellcheck
  292. context exclusive ! \n brown
  293. spellcheck