blob: 0eb82fad10541e7ceac855e2461298c899908c01 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: NASM - The Netwide Assembler (v0.98)
Bram Moolenaar690afe12017-01-28 18:34:47 +01003" Maintainer: Andrii Sokolov <andriy145@gmail.com>
Bram Moolenaar4a748032010-09-30 21:47:56 +02004" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
5" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
Bram Moolenaarb7398fe2023-05-14 18:50:25 +01006" Contributors:
7" Leonard König <leonard.r.koenig@gmail.com> (C string highlighting),
8" Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers)
9" Frédéric Hamel <rederic.hamel123@gmail.com> (F16c support, partial AVX
10" support, other)
11" Last Change: 2022 May 3
Bram Moolenaar4a748032010-09-30 21:47:56 +020012" NASM Home: http://www.nasm.us/
Bram Moolenaar071d4272004-06-13 20:20:40 +000013
14
15
16" Setup Syntax:
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020017" quit when a syntax file was already loaded
18if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000019 finish
20endif
21" Assembler syntax is case insensetive
22syn case ignore
23
24
25
26" Vim search and movement commands on identifers
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020027" Comments at start of a line inside which to skip search for indentifiers
28setlocal comments=:;
29" Identifier Keyword characters (defines \k)
30setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~
Bram Moolenaar071d4272004-06-13 20:20:40 +000031
32
33" Comments:
34syn region nasmComment start=";" keepend end="$" contains=@nasmGrpInComments
35syn region nasmSpecialComment start=";\*\*\*" keepend end="$"
36syn keyword nasmInCommentTodo contained TODO FIXME XXX[XXXXX]
37syn cluster nasmGrpInComments contains=nasmInCommentTodo
38syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialComment
39
40
41
42" Label Identifiers:
43" in NASM: 'Everything is a Label'
44" Definition Label = label defined by %[i]define or %[i]assign
45" Identifier Label = label defined as first non-keyword on a line or %[i]macro
Bram Moolenaar5dc62522012-02-13 00:05:22 +010046syn match nasmLabelError "$\=\(\d\+\K\|[#.@]\|\$\$\k\)\k*\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000047syn match nasmLabel "\<\(\h\|[?@]\)\k*\>"
48syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1
49" Labels starting with one or two '.' are special
50syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>"
51syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1
52if !exists("nasm_no_warn")
Bram Moolenaar5dc62522012-02-13 00:05:22 +010053 syn match nasmLabelWarn "\<\~\=\$\=[_.][_.\~]*\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000054endif
55if exists("nasm_loose_syntax")
56 syn match nasmSpecialLabel "\<\.\.@\k\+\>"
57 syn match nasmSpecialLabel "\<\$\.\.@\k\+\>"ms=s+1
58 if !exists("nasm_no_warn")
59 syn match nasmLabelWarn "\<\$\=\.\.@\(\d\|[#$\.~]\)\k*\>"
60 endif
61 " disallow use of nasm internal label format
62 syn match nasmLabelError "\<\$\=\.\.@\d\+\.\k*\>"
63else
64 syn match nasmSpecialLabel "\<\.\.@\(\h\|[?@]\)\k*\>"
65 syn match nasmSpecialLabel "\<\$\.\.@\(\h\|[?@]\)\k*\>"ms=s+1
66endif
67" Labels can be dereferenced with '$' to destinguish them from reserved words
68syn match nasmLabelError "\<\$\K\k*\s*:"
69syn match nasmLabelError "^\s*\$\K\k*\>"
70syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)"
71
72
73
74" Constants:
Bram Moolenaar690afe12017-01-28 18:34:47 +010075syn match nasmStringError +["'`]+
76" NASM is case sensitive here: eg. u-prefix allows for 4-digit, U-prefix for
77" 8-digit Unicode characters
78syn case match
79" one-char escape-sequences
80syn match nasmCStringEscape display contained "\\[’"‘\\\?abtnvfre]"
81" hex and octal numbers
82syn match nasmCStringEscape display contained "\\\(x\x\{2}\|\o\{1,3}\)"
83" Unicode characters
84syn match nasmCStringEscape display contained "\\\(u\x\{4}\|U\x\{8}\)"
85" ISO C99 format strings (copied from cFormat in runtime/syntax/c.vim)
86syn match nasmCStringFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
87syn match nasmCStringFormat display "%%" contained
Bram Moolenaar071d4272004-06-13 20:20:40 +000088syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+
Bram Moolenaar690afe12017-01-28 18:34:47 +010089" Highlight C escape- and format-sequences within ``-strings
90syn match nasmCString +\(`[^`]\{-}`\)+ contains=nasmCStringEscape,nasmCStringFormat extend
91syn case ignore
Bram Moolenaar071d4272004-06-13 20:20:40 +000092syn match nasmBinNumber "\<[0-1]\+b\>"
93syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1
94syn match nasmOctNumber "\<\o\+q\>"
95syn match nasmOctNumber "\<\~\o\+q\>"lc=1
96syn match nasmDecNumber "\<\d\+\>"
97syn match nasmDecNumber "\<\~\d\+\>"lc=1
98syn match nasmHexNumber "\<\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"
99syn match nasmHexNumber "\<\~\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"lc=1
100syn match nasmFltNumber "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>"
101syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN
102syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>"
103
104
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105" Netwide Assembler Storage Directives:
106" Storage types
107syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE
108syn keyword nasmType FAR NEAR SHORT
109syn keyword nasmType BYTE WORD DWORD QWORD DQWORD HWORD DHWORD TWORD
110syn keyword nasmType CDECL FASTCALL NONE PASCAL STDCALL
111syn keyword nasmStorage DB DW DD DQ DDQ DT
112syn keyword nasmStorage RESB RESW RESD RESQ RESDQ REST
113syn keyword nasmStorage EXTERN GLOBAL COMMON
114" Structured storage types
115syn match nasmTypeError "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>"
116syn match nasmStructureLabel contained "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>"
117" structures cannot be nested (yet) -> use: 'keepend' and 're='
118syn cluster nasmGrpCntnStruc contains=ALLBUT,@nasmGrpInComments,nasmMacroDef,@nasmGrpInMacros,@nasmGrpInPreCondits,nasmStructureDef,@nasmGrpInStrucs
119syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnStruc
120syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnStruc
121syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure
122" union types are not part of nasm (yet)
123"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnStruc
124"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure
125syn match nasmInStructure contained "^\s*AT\>"hs=e-1
126syn cluster nasmGrpInStrucs contains=nasmStructure,nasmInStructure,nasmStructureLabel
127
128
129
130" PreProcessor Instructions:
131" NAsm PreProcs start with %, but % is not a character
132syn match nasmPreProcError "%{\=\(%\=\k\+\|%%\+\k*\|[+-]\=\d\+\)}\="
133if exists("nasm_loose_syntax")
134 syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError
135else
136 syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLabelError,nasmPreProcError
137endif
138
139" Multi-line macro
140syn cluster nasmGrpCntnMacro contains=ALLBUT,@nasmGrpInComments,nasmStructureDef,@nasmGrpInStrucs,nasmMacroDef,@nasmGrpPreCondits,nasmMemReference,nasmInMacPreCondit,nasmInMacStrucDef
141syn region nasmMacroDef matchgroup=nasmMacro keepend start="^\s*%macro\>"hs=e-5 start="^\s*%imacro\>"hs=e-6 end="^\s*%endmacro\>"re=e-9 contains=@nasmGrpCntnMacro,nasmInMacStrucDef
142if exists("nasm_loose_syntax")
143 syn match nasmInMacLabel contained "%\(%\k\+\>\|{%\k\+}\)"
144 syn match nasmInMacLabel contained "%\($\+\(\w\|[#\.?@~]\)\k*\>\|{$\+\(\w\|[#\.?@~]\)\k*}\)"
145 syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=nasmStructureLabel,nasmLabel,nasmInMacParam,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError
146 if !exists("nasm_no_warn")
147 syn match nasmInMacLblWarn contained "%\(%[$\.]\k*\>\|{%[$\.]\k*}\)"
148 syn match nasmInMacLblWarn contained "%\($\+\(\d\|[#\.@~]\)\k*\|{\$\+\(\d\|[#\.@~]\)\k*}\)"
149 hi link nasmInMacCatLabel nasmInMacLblWarn
150 else
151 hi link nasmInMacCatLabel nasmInMacLabel
152 endif
153else
154 syn match nasmInMacLabel contained "%\(%\(\w\|[#?@~]\)\k*\>\|{%\(\w\|[#?@~]\)\k*}\)"
155 syn match nasmInMacLabel contained "%\($\+\(\h\|[?@]\)\k*\>\|{$\+\(\h\|[?@]\)\k*}\)"
156 hi link nasmInMacCatLabel nasmLabelError
157endif
158syn match nasmInMacCatLabel contained "\d\K\k*"lc=1
159syn match nasmInMacLabel contained "\d}\k\+"lc=2
160if !exists("nasm_no_warn")
161 syn match nasmInMacLblWarn contained "%\(\($\+\|%\)[_~][._~]*\>\|{\($\+\|%\)[_~][._~]*}\)"
162endif
163syn match nasmInMacPreProc contained "^\s*%pop\>"hs=e-3
164syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx
165" structures cannot be nested (yet) -> use: 'keepend' and 're='
166syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnMacro
167syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnMacro
168syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure
169" union types are not part of nasm (yet)
170"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro
171"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure
172syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit
Bram Moolenaar4a748032010-09-30 21:47:56 +0200173" Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx
175syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx
176syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx
177syn match nasmInMacParamNum contained "\<\d\+\.list\>"me=e-5
178syn match nasmInMacParamNum contained "\<\d\+\.nolist\>"me=e-7
179syn match nasmInMacDirective contained "\.\(no\)\=list\>"
180syn match nasmInMacMacro contained transparent "macro\s"lc=5 skipwhite nextgroup=nasmStructureLabel
181syn match nasmInMacMacro contained "^\s*%rotate\>"hs=e-6
182syn match nasmInMacParam contained "%\([+-]\=\d\+\|{[+-]\=\d\+}\)"
183" nasm conditional macro operands/arguments
184" Todo: check feasebility; add too nasmGrpInMacros, etc.
185"syn match nasmInMacCond contained "\<\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>"
186syn cluster nasmGrpInMacros contains=nasmMacro,nasmInMacMacro,nasmInMacParam,nasmInMacParamNum,nasmInMacDirective,nasmInMacLabel,nasmInMacLblWarn,nasmInMacMemRef,nasmInMacPreConDef,nasmInMacPreCondit,nasmInMacPreProc,nasmInMacStrucDef
187
188" Context pre-procs that are better used inside a macro
189if exists("nasm_ctx_outside_macro")
190 syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon
191 syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3
192 if exists("nasm_loose_syntax")
Bram Moolenaar5dc62522012-02-13 00:05:22 +0100193 syn match nasmCtxLocLabel "%$\+\(\w\|[#.?@~]\)\k*\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194 else
195 syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>"
196 endif
197 syn match nasmCtxPreProc "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx
198 syn match nasmCtxPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx
199 syn match nasmCtxPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx
200 syn match nasmCtxPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx
201 if exists("nasm_no_warn")
202 hi link nasmCtxPreCondit nasmPreCondit
203 hi link nasmCtxPreProc nasmPreProc
204 hi link nasmCtxLocLabel nasmLocalLabel
205 else
206 hi link nasmCtxPreCondit nasmPreProcWarn
207 hi link nasmCtxPreProc nasmPreProcWarn
208 hi link nasmCtxLocLabel nasmLabelWarn
209 endif
210endif
211
212" Conditional assembly
213syn cluster nasmGrpCntnPreCon contains=ALLBUT,@nasmGrpInComments,@nasmGrpInMacros,@nasmGrpInStrucs
214syn region nasmPreConditDef transparent matchgroup=nasmPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnPreCon
215syn match nasmInPreCondit contained "^\s*%el\(if\|se\)\>"hs=e-4
216syn match nasmInPreCondit contained "^\s*%elifid\>"hs=e-6
217syn match nasmInPreCondit contained "^\s*%elif\(def\|idn\|nid\|num\|str\)\>"hs=e-7
218syn match nasmInPreCondit contained "^\s*%elif\(n\(def\|idn\|num\|str\)\|idni\)\>"hs=e-8
219syn match nasmInPreCondit contained "^\s*%elifnidni\>"hs=e-9
220syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPreCondit
221syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel
222
223" Other pre-processor statements
Bram Moolenaar4a748032010-09-30 21:47:56 +0200224syn match nasmPreProc "^\s*%\(rep\|use\)\>"hs=e-3
Bram Moolenaar071d4272004-06-13 20:20:40 +0000225syn match nasmPreProc "^\s*%line\>"hs=e-4
Bram Moolenaar4a748032010-09-30 21:47:56 +0200226syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5
227syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6
228syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"hs=e-7
Bram Moolenaar071d4272004-06-13 20:20:40 +0000229syn match nasmDefine "^\s*%undef\>"hs=e-5
230syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6
231syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7
Bram Moolenaar4a748032010-09-30 21:47:56 +0200232syn match nasmDefine "^\s*%unmacro\>"hs=e-7
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233syn match nasmInclude "^\s*%include\>"hs=e-7
Bram Moolenaar4a748032010-09-30 21:47:56 +0200234" Todo: Treat the line tail after %fatal, %error, %warning as text
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235
236" Multiple pre-processor instructions on single line detection (obsolete)
237"syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+
238syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCondits,nasmPreProc,nasmDefine,nasmInclude,nasmPreProcWarn,nasmPreProcError
239
240
241
242" Register Identifiers:
243" Register operands:
244syn match nasmGen08Register "\<[A-D][HL]\>"
245syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>"
246syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>"
Bram Moolenaar130cbfc2021-04-07 21:07:20 +0200247syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WDB]\|1[0-5][WDB]\)\>"
248syn match nasmExtRegister "\<\([SB]PL\|[SD]IL\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249syn match nasmSegRegister "\<[C-GS]S\>"
250syn match nasmSpcRegister "\<E\=IP\>"
251syn match nasmFpuRegister "\<ST\o\>"
252syn match nasmMmxRegister "\<MM\o\>"
253syn match nasmSseRegister "\<XMM\o\>"
254syn match nasmCtrlRegister "\<CR\o\>"
255syn match nasmDebugRegister "\<DR\o\>"
256syn match nasmTestRegister "\<TR\o\>"
257syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>"
258syn match nasmRegisterError "\<X\=MM[8-9]\>"
259syn match nasmRegisterError "\<ST\((\d)\|[8-9]\>\)"
260syn match nasmRegisterError "\<E\([A-D][HL]\|[C-GS]S\)\>"
261" Memory reference operand (address):
Bram Moolenaar5dc62522012-02-13 00:05:22 +0100262syn match nasmMemRefError "[[\]]"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError
Bram Moolenaar5dc62522012-02-13 00:05:22 +0100264syn match nasmInMacMemRef contained "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam
265syn match nasmMemReference "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266
267
268
269" Netwide Assembler Directives:
270" Compilation constants
271syn keyword nasmConstant __BITS__ __DATE__ __FILE__ __FORMAT__ __LINE__
272syn keyword nasmConstant __NASM_MAJOR__ __NASM_MINOR__ __NASM_VERSION__
273syn keyword nasmConstant __TIME__
274" Instruction modifiers
275syn match nasmInstructnError "\<TO\>"
276syn match nasmInstrModifier "\(^\|:\)\s*[C-GS]S\>"ms=e-1
277syn keyword nasmInstrModifier A16 A32 O16 O32
278syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)\s\+TO\>"lc=5,ms=e-1
279" the 'to' keyword is not allowed for fpu-pop instructions (yet)
280"syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)P\s\+TO\>"lc=6,ms=e-1
281" NAsm directives
282syn keyword nasmRepeat TIMES
283syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100284syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT DEFAULT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000285syn keyword nasmDirective ENDSECTION ENDSEGMENT
286syn keyword nasmDirective __SECT__
287" Macro created standard directives: (requires %include)
288syn case match
289syn keyword nasmStdDirective ENDPROC EPILOGUE LOCALS PROC PROLOGUE USES
290syn keyword nasmStdDirective ENDIF ELSE ELIF ELSIF IF
291"syn keyword nasmStdDirective BREAK CASE DEFAULT ENDSWITCH SWITCH
292"syn keyword nasmStdDirective CASE OF ENDCASE
293syn keyword nasmStdDirective DO ENDFOR ENDWHILE FOR REPEAT UNTIL WHILE EXIT
294syn case ignore
295" Format specific directives: (all formats)
296" (excluded: extension directives to section, global, common and extern)
297syn keyword nasmFmtDirective ORG
298syn keyword nasmFmtDirective EXPORT IMPORT GROUP UPPERCASE SEG WRT
299syn keyword nasmFmtDirective LIBRARY
300syn case match
301syn keyword nasmFmtDirective _GLOBAL_OFFSET_TABLE_ __GLOBAL_OFFSET_TABLE_
302syn keyword nasmFmtDirective ..start ..got ..gotoff ..gotpc ..plt ..sym
303syn case ignore
304
305
306
307" Standard Instructions:
308syn match nasmInstructnError "\<\(F\=CMOV\|SET\)N\=\a\{0,2}\>"
309syn keyword nasmInstructnError CMPS MOVS LCS LODS STOS XLAT
310syn match nasmStdInstruction "\<MOV\>"
311syn match nasmInstructnError "\<MOV\s[^,;[]*\<CS\>\s*[^:]"he=e-1
312syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>"
313syn match nasmStdInstruction "\<POP\>"
314syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND
315syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100316syn keyword nasmStdInstruction CALL CBW CDQ CDQE CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ
Bram Moolenaar4a748032010-09-30 21:47:56 +0200317syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO
Bram Moolenaar071d4272004-06-13 20:20:40 +0000318syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER
Bram Moolenaar4a748032010-09-30 21:47:56 +0200319syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320syn keyword nasmStdInstruction JCXZ JECXZ JMP
Bram Moolenaar4a748032010-09-30 21:47:56 +0200321syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ
Bram Moolenaar071d4272004-06-13 20:20:40 +0000322syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS
Bram Moolenaar4a748032010-09-30 21:47:56 +0200323syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT
324syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ
325syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100326syn keyword nasmStdInstruction PAUSE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000327syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR
328syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW
Bram Moolenaar4a748032010-09-30 21:47:56 +0200329syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR
Bram Moolenaar4a748032010-09-30 21:47:56 +0200331syn keyword nasmStdInstruction LFENCE MFENCE SFENCE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000332
333
334" System Instructions: (usually privileged)
335" Verification of pointer parameters
336syn keyword nasmSysInstruction ARPL LAR LSL VERR VERW
337" Addressing descriptor tables
338syn keyword nasmSysInstruction LLDT SLDT LGDT SGDT
339" Multitasking
340syn keyword nasmSysInstruction LTR STR
341" Coprocessing and Multiprocessing (requires fpu and multiple cpu's resp.)
342syn keyword nasmSysInstruction CLTS LOCK WAIT
343" Input and Output
344syn keyword nasmInstructnError INS OUTS
345syn keyword nasmSysInstruction IN INSB INSW INSD OUT OUTSB OUTSB OUTSW OUTSD
346" Interrupt control
347syn keyword nasmSysInstruction CLI STI LIDT SIDT
348" System control
349syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<CR\o\>"me=s+3
350syn keyword nasmSysInstruction HLT INVD LMSW
351syn keyword nasmSseInstruction PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA
352syn keyword nasmSseInstruction RSM SFENCE SMSW SYSENTER SYSEXIT UD2 WBINVD
353" TLB (Translation Lookahead Buffer) testing
354syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<TR\o\>"me=s+3
355syn keyword nasmSysInstruction INVLPG
356
357" Debugging Instructions: (privileged)
358syn match nasmDbgInstruction "\<MOV\s[^;]\{-}\<DR\o\>"me=s+3
359syn keyword nasmDbgInstruction INT1 INT3 RDMSR RDTSC RDPMC WRMSR
360
361
362" Floating Point Instructions: (requires FPU)
363syn match nasmFpuInstruction "\<FCMOVN\=\([AB]E\=\|[CEPUZ]\)\>"
364syn keyword nasmFpuInstruction F2XM1 FABS FADD[P] FBLD FBSTP
365syn keyword nasmFpuInstruction FCHS FCLEX FCOM[IP] FCOMP[P] FCOS
366syn keyword nasmFpuInstruction FDECSTP FDISI FDIV[P] FDIVR[P] FENI FFREE
367syn keyword nasmFpuInstruction FIADD FICOM[P] FIDIV[R] FILD
368syn keyword nasmFpuInstruction FIMUL FINCSTP FINIT FIST[P] FISUB[R]
369syn keyword nasmFpuInstruction FLD[1] FLDCW FLDENV FLDL2E FLDL2T FLDLG2
370syn keyword nasmFpuInstruction FLDLN2 FLDPI FLDZ FMUL[P]
371syn keyword nasmFpuInstruction FNCLEX FNDISI FNENI FNINIT FNOP FNSAVE
372syn keyword nasmFpuInstruction FNSTCW FNSTENV FNSTSW FNSTSW
373syn keyword nasmFpuInstruction FPATAN FPREM[1] FPTAN FRNDINT FRSTOR
374syn keyword nasmFpuInstruction FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT
375syn keyword nasmFpuInstruction FSTCW FSTENV FST[P] FSTSW FSUB[P] FSUBR[P]
376syn keyword nasmFpuInstruction FTST FUCOM[IP] FUCOMP[P]
377syn keyword nasmFpuInstruction FXAM FXCH FXTRACT FYL2X FYL2XP1
378
379
380" Multi Media Xtension Packed Instructions: (requires MMX unit)
381" Standard MMX instructions: (requires MMX1 unit)
382syn match nasmInstructnError "\<P\(ADD\|SUB\)U\=S\=[DQ]\=\>"
383syn match nasmInstructnError "\<PCMP\a\{0,2}[BDWQ]\=\>"
384syn keyword nasmMmxInstruction EMMS MOVD MOVQ
385syn keyword nasmMmxInstruction PACKSSDW PACKSSWB PACKUSWB PADDB PADDD PADDW
386syn keyword nasmMmxInstruction PADDSB PADDSW PADDUSB PADDUSW PAND[N]
387syn keyword nasmMmxInstruction PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD PCMPGTW
388syn keyword nasmMmxInstruction PMACHRIW PMADDWD PMULHW PMULLW POR
389syn keyword nasmMmxInstruction PSLLD PSLLQ PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW
390syn keyword nasmMmxInstruction PSUBB PSUBD PSUBW PSUBSB PSUBSW PSUBUSB PSUBUSW
391syn keyword nasmMmxInstruction PUNPCKHBW PUNPCKHDQ PUNPCKHWD
392syn keyword nasmMmxInstruction PUNPCKLBW PUNPCKLDQ PUNPCKLWD PXOR
393" Extended MMX instructions: (requires MMX2/SSE unit)
394syn keyword nasmMmxInstruction MASKMOVQ MOVNTQ
395syn keyword nasmMmxInstruction PAVGB PAVGW PEXTRW PINSRW PMAXSW PMAXUB
396syn keyword nasmMmxInstruction PMINSW PMINUB PMOVMSKB PMULHUW PSADBW PSHUFW
397
398
399" Streaming SIMD Extension Packed Instructions: (requires SSE unit)
400syn match nasmInstructnError "\<CMP\a\{1,5}[PS]S\>"
401syn match nasmSseInstruction "\<CMP\(N\=\(EQ\|L[ET]\)\|\(UN\)\=ORD\)\=[PS]S\>"
402syn keyword nasmSseInstruction ADDPS ADDSS ANDNPS ANDPS
403syn keyword nasmSseInstruction COMISS CVTPI2PS CVTPS2PI
404syn keyword nasmSseInstruction CVTSI2SS CVTSS2SI CVTTPS2PI CVTTSS2SI
405syn keyword nasmSseInstruction DIVPS DIVSS FXRSTOR FXSAVE LDMXCSR
406syn keyword nasmSseInstruction MAXPS MAXSS MINPS MINSS MOVAPS MOVHLPS MOVHPS
407syn keyword nasmSseInstruction MOVLHPS MOVLPS MOVMSKPS MOVNTPS MOVSS MOVUPS
408syn keyword nasmSseInstruction MULPS MULSS
409syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS
410syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS
411syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS
412
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100413" F16c Instructions
414syn keyword nasmF16CInstruction VCVTPH2PS VCVTPS2PH
415
416" AVX Instructions
417syn keyword nasmAVXInstruction VCVTDQ2PD VCVTDQ2PS VCVTPD2DQ VCVTPD2P VCVTPD2PS
418syn keyword nasmAVXInstruction VCVTPS2DQ VCVTPS2PD
419syn keyword nasmAVXInstruction VCVTSD2SI VCVTSD2SS VCVTSI2SD VCVTSI2SS VCVTSS2SD VCVTSS2SI
420syn keyword nasmAVXInstruction VMAXPS VMAXSS VMINPS VMINSS VMOVAPS VMOVHLPS VMOVHPS
421syn keyword nasmAVXInstruction VMAXPD VMAXSD VMINPD VMINSD VMOVAPD VMOVHLPD VMOVHPD
422syn keyword nasmAVXInstruction VMOVLHPS VMOVLPS VMOVMSKPS VMOVNTPS VMOVSS VMOVUPS
423syn keyword nasmAVXInstruction VMULPS VMULSS VPXOR
424
425syn match nasmInstructnError "\<VP\a\{3}R\a\>"
426syn match nasmAVXInstruction "\<VP\(INS\|EXT\)R[BDQW]\>"
427
428syn keyword nasmAVXInstruction VORPS VPABSB VPABSD VPABSW
429syn keyword nasmAVXInstruction PACKSSDW VPACKSSWB VPACKUSDW VPACKUSWB VPADDD
430syn keyword nasmAVXInstruction PADDQ VPADDSB VPADDSW VPADDUSB VPADDUSW
431syn keyword nasmAVXInstruction PADDW VPALIGNR VPAND VPANDN VPAVGB
432syn keyword nasmAVXInstruction PAVGW VPBLENDD VPBLENDVB VPBLENDW VPBROADCASTB
433syn keyword nasmAVXInstruction PBROADCASTD VPBROADCASTQ VPBROADCASTW VPCLMULQDQ VPCMOV
434syn keyword nasmAVXInstruction PCMPEQB VPCMPEQD VPCMPEQQ VPCMPEQW VPCMPESTRI
435syn keyword nasmAVXInstruction PCMPESTRM VPCMPGTB VPCMPGTD VPCMPGTQ VPCMPGTW
436syn keyword nasmAVXInstruction PCMPISTRI VPCMPISTRM VPCOMB VPCOMD VPCOMQ
437syn keyword nasmAVXInstruction PCOMUB VPCOMUD VPCOMUQ VPCOMUW VPCOMW
438syn keyword nasmAVXInstruction PERM2FVPERM2IVPERMD VPERMIL2PD VPERMIL2PS VPERMILPD VPERMILPS
439syn keyword nasmAVXInstruction PERMPD VPERMPS VPERMQ VPEXTRB VPEXTRD
440syn keyword nasmAVXInstruction PEXTRQ VPEXTRW VPGATHERDD VPGATHERDQ VPGATHERQD
441syn keyword nasmAVXInstruction PGATHERQQ VPHADDBD VPHADDBQ VPHADDBW VPHADDD
442syn keyword nasmAVXInstruction PHADDDQ VPHADDSW VPHADDUBQ VPHADDUBW VPHADDUDQ
443syn keyword nasmAVXInstruction PHADDUWD VPHADDUWQ VPHADDW VPHADDWD VPHADDWQ
444syn keyword nasmAVXInstruction PHMINPOSUW VPHSUBBW VPHSUBD VPHSUBDQ VPHSUBSW
445syn keyword nasmAVXInstruction PHSUBW VPHSUBWD VPINSRB VPINSRD VPINSRQ
446syn keyword nasmAVXInstruction PINSRW VPMACSDD VPMACSDQH
447syn keyword nasmAVXInstruction VPMACSDQL VPMACSSDD VPMACSSDQL VPMACSSQH VPMACSSWD
448syn keyword nasmAVXInstruction VPMACSSWW VPMACSWD VPMACSWW VPMADCSSWD VPMADCSWD
449syn keyword nasmAVXInstruction VPMADDUBSW VPMADDWD VPMASKMOVD VPMASKMOVQ VPMAXSB
450syn keyword nasmAVXInstruction VPMAXSD VPMAXSW VPMAXUB VPMAXUD VPMAXUW
451syn keyword nasmAVXInstruction VPMINSB VPMINSD VPMINSW VPMINUB VPMINUD
452syn keyword nasmAVXInstruction VPMINUW VPMOVMSKB VPMOVSXBD VPMOVSXBQ VPMOVSXBW
453syn keyword nasmAVXInstruction VPMOVSXDQ VPMOVSXWD VPMOVSXWQ VPMOVZXBD VPMOVZXBQ
454syn keyword nasmAVXInstruction VPMOVZXBW VPMOVZXDQ VPMOVZXWD VPMOVZXWQ VPMULDQ
455syn keyword nasmAVXInstruction VPMULHRSW VPMULHUW VPMULHW VPMULLD VPMULLW
456syn keyword nasmAVXInstruction VPMULUDQ VPOR VPPERM VPROTB VPROTD
457syn keyword nasmAVXInstruction VPROTQ VPROTW VPSADBW VPSHAB VPSHAD
458syn keyword nasmAVXInstruction VPSHAQ VPSHAW VPSHLB VPSHLD VPSHLQ
459syn keyword nasmAVXInstruction VPSHLW VPSHUFB VPSHUFD VPSHUFHW VPSHUFLW
460syn keyword nasmAVXInstruction VPSIGNB VPSIGND VPSIGNW VPSLLD VPSLLDQ
461syn keyword nasmAVXInstruction VPSLLQ VPSLLVD VPSLLVQ VPSLLW VPSRAD
462syn keyword nasmAVXInstruction VPSRAVD VPSRAW VPSRLD VPSRLDQ VPSRLQ
463syn keyword nasmAVXInstruction VPSRLVD VPSRLVQ VPSRLW VPSUBB VPSUBD
464syn keyword nasmAVXInstruction VPSUBQ VPSUBSB VPSUBSW VPSUBUSB VPSUBUSW
465syn keyword nasmAVXInstruction VPSUBW VPTEST VPUNPCKHBW VPUNPCKHDQ VPUNPCKHQDQ
466syn keyword nasmAVXInstruction VPUNPCKHWD VPUNPCKLBW VPUNPCKLDQ VPUNPCKLQDQ VPUNPCKLWD
467syn keyword nasmAVXInstruction VPXOR VRCPPS
468
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469
470" Three Dimensional Now Packed Instructions: (requires 3DNow! unit)
471syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE
472syn keyword nasmNowInstruction PFCMPGT PFMAX PFMIN PFMUL PFRCP PFRCPIT1
473syn keyword nasmNowInstruction PFRCPIT2 PFRSQIT1 PFRSQRT PFSUB[R] PI2FD
474syn keyword nasmNowInstruction PMULHRWA PREFETCH[W]
475
476
477" Vendor Specific Instructions:
478" Cyrix instructions (requires Cyrix processor)
479syn keyword nasmCrxInstruction PADDSIW PAVEB PDISTIB PMAGW PMULHRW[C] PMULHRIW
480syn keyword nasmCrxInstruction PMVGEZB PMVLZB PMVNZB PMVZB PSUBSIW
481syn keyword nasmCrxInstruction RDSHR RSDC RSLDT SMINT SMINTOLD SVDC SVLDT SVTS
482syn keyword nasmCrxInstruction WRSHR
483" AMD instructions (requires AMD processor)
484syn keyword nasmAmdInstruction SYSCALL SYSRET
485
486
487" Undocumented Instructions:
488syn match nasmUndInstruction "\<POP\s[^;]*\<CS\>"me=s+3
489syn keyword nasmUndInstruction CMPXCHG486 IBTS ICEBP INT01 INT03 LOADALL
490syn keyword nasmUndInstruction LOADALL286 LOADALL386 SALC SMI UD1 UMOV XBTS
491
492
493
494" Synchronize Syntax:
495syn sync clear
496syn sync minlines=50 "for multiple region nesting
497syn sync match nasmSync grouphere nasmMacroDef "^\s*%i\=macro\>"me=s-1
498syn sync match nasmSync grouphere NONE "^\s*%endmacro\>"
499
500
501" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200502" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +0000503
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200504" Sub Links:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200505hi def link nasmInMacDirective nasmDirective
506hi def link nasmInMacLabel nasmLocalLabel
507hi def link nasmInMacLblWarn nasmLabelWarn
508hi def link nasmInMacMacro nasmMacro
509hi def link nasmInMacParam nasmMacro
510hi def link nasmInMacParamNum nasmDecNumber
511hi def link nasmInMacPreCondit nasmPreCondit
512hi def link nasmInMacPreProc nasmPreProc
513hi def link nasmInPreCondit nasmPreCondit
514hi def link nasmInStructure nasmStructure
515hi def link nasmStructureLabel nasmStructure
Bram Moolenaar071d4272004-06-13 20:20:40 +0000516
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200517" Comment Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200518hi def link nasmComment Comment
519hi def link nasmSpecialComment SpecialComment
520hi def link nasmInCommentTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000521
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200522" Constant Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200523hi def link nasmString String
Bram Moolenaar690afe12017-01-28 18:34:47 +0100524hi def link nasmCString String
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200525hi def link nasmStringError Error
Bram Moolenaar690afe12017-01-28 18:34:47 +0100526hi def link nasmCStringEscape SpecialChar
527hi def link nasmCStringFormat SpecialChar
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200528hi def link nasmBinNumber Number
529hi def link nasmOctNumber Number
530hi def link nasmDecNumber Number
531hi def link nasmHexNumber Number
532hi def link nasmFltNumber Float
533hi def link nasmNumberError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000534
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200535" Identifier Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200536hi def link nasmLabel Identifier
537hi def link nasmLocalLabel Identifier
538hi def link nasmSpecialLabel Special
539hi def link nasmLabelError Error
540hi def link nasmLabelWarn Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000541
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200542" PreProc Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200543hi def link nasmPreProc PreProc
544hi def link nasmDefine Define
545hi def link nasmInclude Include
546hi def link nasmMacro Macro
547hi def link nasmPreCondit PreCondit
548hi def link nasmPreProcError Error
549hi def link nasmPreProcWarn Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000550
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200551" Type Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200552hi def link nasmType Type
553hi def link nasmStorage StorageClass
554hi def link nasmStructure Structure
555hi def link nasmTypeError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000556
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200557" Directive Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200558hi def link nasmConstant Constant
559hi def link nasmInstrModifier Operator
560hi def link nasmRepeat Repeat
561hi def link nasmDirective Keyword
562hi def link nasmStdDirective Operator
563hi def link nasmFmtDirective Keyword
Bram Moolenaar071d4272004-06-13 20:20:40 +0000564
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200565" Register Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200566hi def link nasmCtrlRegister Special
567hi def link nasmDebugRegister Debug
568hi def link nasmTestRegister Special
569hi def link nasmRegisterError Error
570hi def link nasmMemRefError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000571
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200572" Instruction Group:
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200573hi def link nasmStdInstruction Statement
574hi def link nasmSysInstruction Statement
575hi def link nasmDbgInstruction Debug
576hi def link nasmFpuInstruction Statement
577hi def link nasmMmxInstruction Statement
578hi def link nasmSseInstruction Statement
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100579hi def link nasmF16cInstruction Statement
580hi def link nasmAVXInstruction Statement
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200581hi def link nasmNowInstruction Statement
582hi def link nasmAmdInstruction Special
583hi def link nasmCrxInstruction Special
584hi def link nasmUndInstruction Todo
585hi def link nasmInstructnError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587let b:current_syntax = "nasm"
588
589" vim:ts=8 sw=4