Guest User


a guest
Apr 28th, 2009
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.53 KB | None | 0 0
  1. " Vim syntax file
  2. " Language: Intel AT&T Assembler (GASM)
  3. " quick mod on the default FASM to display comments. Added movl and addl
  5. if version < 600
  6. syntax clear
  7. elseif exists("b:current_syntax")
  8. finish
  9. endif
  11. setlocal iskeyword=a-z,A-Z,48-57,.,_
  12. setlocal isident=a-z,A-Z,48-57,.,_
  13. syn case ignore
  15. syn keyword gasmRegister ah al ax bh bl bp bx ch cl cr0 cr1 cr2 cr3 cr4 cr5 cr6
  16. syn keyword gasmRegister cr7 cs cx dh di dl dr0 dr1 dr2 dr3 dr4 dr5 dr6 dr7 ds dx
  17. syn keyword gasmRegister eax ebp ebx ecx edi edx es esi esp fs gs mm0 mm1 mm2 mm3
  18. syn keyword gasmRegister mm4 mm5 mm6 mm7 si sp ss st st0 st1 st2 st3 st4 st5 st6
  19. syn keyword gasmRegister st7 tr0 tr1 tr2 tr3 tr4 tr5 tr6 tr7 xmm0 xmm1 xmm2 xmm3
  20. syn keyword gasmRegister xmm4 xmm5 xmm6 xmm7
  21. syn keyword gasmAddressSizes byte dqword dword fword pword qword tword word
  22. syn keyword gasmDataDirectives db dd df dp dq dt du dw file rb rd rf rp rq rt rw
  23. syn keyword gasmInstr aaa aad aam aas adc add addpd addps addsd addss addsubpd addl
  24. syn keyword gasmInstr addsubps and andnpd andnps andpd andps arpl bound bsf bsr
  25. syn keyword gasmInstr bswap bt btc btr bts call cbw cdq clc cld clflush cli clts
  26. syn keyword gasmInstr cmc cmova cmovae cmovb cmovbe cmovc cmove cmovg cmovge cmovl
  27. syn keyword gasmInstr cmovle cmovna cmovnae cmovnb cmovnbe cmovnc cmovne cmovng
  28. syn keyword gasmInstr cmovnge cmovnl cmovnle cmovno cmovnp cmovns cmovnz cmovo cmovp
  29. syn keyword gasmInstr cmovpe cmovpo cmovs cmovz cmp cmpeqpd cmpeqps cmpeqsd cmpeqss
  30. syn keyword gasmInstr cmplepd cmpleps cmplesd cmpless cmpltpd cmpltps cmpltsd cmpltss
  31. syn keyword gasmInstr cmpneqpd cmpneqps cmpneqsd cmpneqss cmpnlepd cmpnleps cmpnlesd
  32. syn keyword gasmInstr cmpnless cmpnltpd cmpnltps cmpnltsd cmpnltss cmpordpd cmpordps
  33. syn keyword gasmInstr cmpordsd cmpordss cmppd cmpps cmps cmpsb cmpsd cmpss cmpsw
  34. syn keyword gasmInstr cmpunordpd cmpunordps cmpunordsd cmpunordss cmpxchg cmpxchg8b
  35. syn keyword gasmInstr comisd comiss cpuid cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps
  36. syn keyword gasmInstr cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd cvtps2pi cvtsd2si cvtsd2ss
  37. syn keyword gasmInstr cvtsi2sd cvtsi2ss cvtss2sd cvtss2si cvttpd2dq cvttpd2pi cvttps2dq
  38. syn keyword gasmInstr cvttps2pi cvttsd2si cvttss2si cwd cwde daa das data dec div
  39. syn keyword gasmInstr divpd divps divsd divss else emms end enter extrn f2xm1 fabs
  40. syn keyword gasmInstr fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb
  41. syn keyword gasmInstr fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp
  42. syn keyword gasmInstr fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree
  43. syn keyword gasmInstr ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp
  44. syn keyword gasmInstr finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv
  45. syn keyword gasmInstr fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi
  46. syn keyword gasmInstr fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem
  47. syn keyword gasmInstr fprem1 fptan frndint frstor frstpm fsave fscale fsetpm fsin
  48. syn keyword gasmInstr fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr
  49. syn keyword gasmInstr fsubrp ftst fucom fucomi fucomip fucomp fucompp fwait fxam
  50. syn keyword gasmInstr fxch fxrstor fxsave fxtract fyl2x fyl2xp1 haddpd haddps heap
  51. syn keyword gasmInstr hlt hsubpd hsubps idiv if imul in inc ins insb insd insw int
  52. syn keyword gasmInstr int3 into invd invlpg iret iretd iretw ja jae jb jbe jc jcxz
  53. syn keyword gasmInstr je jecxz jg jge jl jle jmp jna jnae jnb jnbe jnc jne jng jnge
  54. syn keyword gasmInstr jnl jnle jno jnp jns jnz jo jp jpe jpo js jz lahf lar lddqu
  55. syn keyword gasmInstr ldmxcsr lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw
  56. syn keyword gasmInstr load loadall286 loadall386 lock lods lodsb lodsd lodsw loop
  57. syn keyword gasmInstr loopd loope looped loopew loopne loopned loopnew loopnz loopnzd
  58. syn keyword gasmInstr loopnzw loopw loopz loopzd loopzw lsl lss ltr maskmovdqu maskmovq
  59. syn keyword gasmInstr maxpd maxps maxsd maxss mfence minpd minps minsd minss monitor
  60. syn keyword gasmInstr mov movapd movaps movd movddup movdq2q movdqa movdqu movhlps
  61. syn keyword gasmInstr movhpd movhps movlhps movlpd movlps movmskpd movmskps movntdq
  62. syn keyword gasmInstr movnti movntpd movntps movntq movq movq2dq movs movsb movsd
  63. syn keyword gasmInstr movshdup movsldup movss movsw movsx movupd movups movzx mul movl
  64. syn keyword gasmInstr mulpd mulps mulsd mulss mwait neg nop not or org orpd orps
  65. syn keyword gasmInstr out outs outsb outsd outsw packssdw packsswb packuswb paddb
  66. syn keyword gasmInstr paddd paddq paddsb paddsw paddusb paddusw paddw pand pandn
  67. syn keyword gasmInstr pause pavgb pavgusb pavgw pcmpeqb pcmpeqd pcmpeqw pcmpgtb
  68. syn keyword gasmInstr pcmpgtd pcmpgtw pextrw pf2id pf2iw pfacc pfadd pfcmpeq pfcmpge
  69. syn keyword gasmInstr pfcmpgt pfmax pfmin pfmul pfnacc pfpnacc pfrcp pfrcpit1 pfrcpit2
  70. syn keyword gasmInstr pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pi2fw pinsrw pmaddwd pmaxsw
  71. syn keyword gasmInstr pmaxub pminsw pminub pmovmskb pmulhrw pmulhuw pmulhw pmullw
  72. syn keyword gasmInstr pmuludq pop popa popad popaw popd popf popfd popfw popw por
  73. syn keyword gasmInstr prefetch prefetchnta prefetcht0 prefetcht1 prefetcht2 prefetchw
  74. syn keyword gasmInstr psadbw pshufd pshufhw pshuflw pshufw pslld pslldq psllq psllw
  75. syn keyword gasmInstr psrad psraw psrld psrldq psrlq psrlw psubb psubd psubq psubsb
  76. syn keyword gasmInstr psubsw psubusb psubusw psubw pswapd punpckhbw punpckhdq punpckhqdq
  77. syn keyword gasmInstr punpckhwd punpcklbw punpckldq punpcklqdq punpcklwd push pusha pushl
  78. syn keyword gasmInstr pushad pushaw pushd pushf pushfd pushfw pushw pxor rcl rcpps
  79. syn keyword gasmInstr rcpss rcr rdmsr rdpmc rdtsc rep repe repne repnz repz ret
  80. syn keyword gasmInstr retd retf retfd retfw retn retnd retnw retw rol ror rsm rsqrtps
  81. syn keyword gasmInstr rsqrtss sahf sal salc sar sbb scas scasb scasd scasw seta
  82. syn keyword gasmInstr setae setalc setb setbe setc sete setg setge setl setle setna
  83. syn keyword gasmInstr setnae setnb setnbe setnc setne setng setnge setnl setnle
  84. syn keyword gasmInstr setno setnp setns setnz seto setp setpe setpo sets setz sfence
  85. syn keyword gasmInstr sgdt shl shld shr shrd shufpd shufps sidt sldt smsw sqrtpd
  86. syn keyword gasmInstr sqrtps sqrtsd sqrtss stc std sti stmxcsr store stos stosb
  87. syn keyword gasmInstr stosd stosw str sub subpd subps subsd subss sysenter sysexit
  88. syn keyword gasmInstr test ucomisd ucomiss ud2 unpckhpd unpckhps unpcklpd unpcklps
  89. syn keyword gasmInstr verr verw wait wbinvd wrmsr xadd xchg xlat xlatb xor xorpd
  90. syn keyword gasmPreprocess common equ fix forward include local macro purge restore
  91. syn keyword gasmPreprocess reverse struc
  92. syn keyword gasmDirective align binary code coff console discardable display dll
  93. syn keyword gasmDirective elf entry executable export extern far fixups format gui
  94. syn keyword gasmDirective import label ms mz native near notpageable pe public readable
  95. syn keyword gasmDirective repeat resource section segment shareable stack times
  96. syn keyword gasmDirective use16 use32 virtual wdm writeable
  97. syn keyword gasmOperator as at defined eq eqtype from mod on ptr rva used
  99. syn match gasmNumericOperator "[+-/*]"
  100. syn match gasmLogicalOperator "[=|&~<>]\|<=\|>=\|<>"
  101. " numbers
  102. syn match gasmBinaryNumber "\<[01]\+b\>"
  103. syn match gasmHexNumber "\<\d\x*h\>"
  104. syn match gasmHexNumber "\<\(0x\|$\)\x*\>"
  105. syn match gasmFPUNumber "\<\d\+\(\.\d*\)\=\(e[-+]\=\d*\)\=\>"
  106. syn match gasmOctalNumber "\<\(0\o\+o\=\|\o\+o\)\>"
  107. syn match gasmDecimalNumber "\<\(0\|[1-9]\d*\)\>"
  108. syn region gasmString start="\"" end="\"\|$"
  109. syn region gasmString start="'" end="'\|$"
  110. syn match gasmSymbol "[()|\[\]:]"
  111. syn match gasmSpecial "[#?%$,]"
  112. syn region gasmComment start="% " end="$"
  113. syn match gasmLabel "^\s*[^; \t]\+:"
  115. hi def link gasmAddressSizes type
  116. hi def link gasmNumericOperator gasmOperator
  117. hi def link gasmLogicalOperator gasmOperator
  119. hi def link gasmBinaryNumber gasmNumber
  120. hi def link gasmHexNumber gasmNumber
  121. hi def link gasmFPUNumber gasmNumber
  122. hi def link gasmOctalNumber gasmNumber
  123. hi def link gasmDecimalNumber gasmNumber
  125. hi def link gasmSymbols gasmRegister
  126. hi def link gasmPreprocess gasmDirective
  128. " link to standard syn groups so the 'colorschemes' work:
  129. hi def link gasmOperator operator
  130. hi def link gasmComment comment
  131. hi def link gasmDirective preproc
  132. hi def link gasmRegister type
  133. hi def link gasmNumber constant
  134. hi def link gasmSymbol structure
  135. hi def link gasmString String
  136. hi def link gasmSpecial special
  137. hi def link gasmInstr keyword
  138. hi def link gasmLabel label
  139. hi def link gasmPrefix preproc
  140. let b:current_syntax = "gasm"
  141. " vim: ts=8 sw=8 :
Add Comment
Please, Sign In to add comment