annotate runtime/syntax/nasm.vim @ 4124:448a6e7cf32e v7.3.815

updated for version 7.3.815 Problem: Building with Cygwin and Ruby doesn't work. Solution: Copy some things from the MingW build file. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Wed, 13 Feb 2013 17:06:11 +0100
parents b37888de599c
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: NASM - The Netwide Assembler (v0.98)
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Andriy Sokolov <andriy145@gmail.com>
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
6 " Last Change: 2012 Feb 7
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
7 " NASM Home: http://www.nasm.us/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Setup Syntax:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Clear old syntax settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Assembler syntax is case insensetive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Vim search and movement commands on identifers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Comments at start of a line inside which to skip search for indentifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 set comments=:;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Identifier Keyword characters (defines \k)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 set iskeyword=@,48-57,#,$,.,?,@-@,_,~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Comments at start of a line inside which to skip search for indentifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 setlocal comments=:;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Identifier Keyword characters (defines \k)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Comments:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region nasmComment start=";" keepend end="$" contains=@nasmGrpInComments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region nasmSpecialComment start=";\*\*\*" keepend end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword nasmInCommentTodo contained TODO FIXME XXX[XXXXX]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn cluster nasmGrpInComments contains=nasmInCommentTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Label Identifiers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " in NASM: 'Everything is a Label'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Definition Label = label defined by %[i]define or %[i]assign
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Identifier Label = label defined as first non-keyword on a line or %[i]macro
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
51 syn match nasmLabelError "$\=\(\d\+\K\|[#.@]\|\$\$\k\)\k*\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match nasmLabel "\<\(\h\|[?@]\)\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Labels starting with one or two '.' are special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if !exists("nasm_no_warn")
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
58 syn match nasmLabelWarn "\<\~\=\$\=[_.][_.\~]*\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 if exists("nasm_loose_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match nasmSpecialLabel "\<\.\.@\k\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match nasmSpecialLabel "\<\$\.\.@\k\+\>"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 if !exists("nasm_no_warn")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match nasmLabelWarn "\<\$\=\.\.@\(\d\|[#$\.~]\)\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " disallow use of nasm internal label format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match nasmLabelError "\<\$\=\.\.@\d\+\.\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match nasmSpecialLabel "\<\.\.@\(\h\|[?@]\)\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match nasmSpecialLabel "\<\$\.\.@\(\h\|[?@]\)\k*\>"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Labels can be dereferenced with '$' to destinguish them from reserved words
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match nasmLabelError "\<\$\K\k*\s*:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match nasmLabelError "^\s*\$\K\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Constants:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match nasmStringError +["']+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match nasmBinNumber "\<[0-1]\+b\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match nasmOctNumber "\<\o\+q\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match nasmOctNumber "\<\~\o\+q\>"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match nasmDecNumber "\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match nasmDecNumber "\<\~\d\+\>"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match nasmHexNumber "\<\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match nasmHexNumber "\<\~\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match nasmFltNumber "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " Netwide Assembler Storage Directives:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 " Storage types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword nasmType FAR NEAR SHORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword nasmType BYTE WORD DWORD QWORD DQWORD HWORD DHWORD TWORD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword nasmType CDECL FASTCALL NONE PASCAL STDCALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword nasmStorage DB DW DD DQ DDQ DT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword nasmStorage RESB RESW RESD RESQ RESDQ REST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword nasmStorage EXTERN GLOBAL COMMON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 " Structured storage types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match nasmTypeError "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match nasmStructureLabel contained "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " structures cannot be nested (yet) -> use: 'keepend' and 're='
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn cluster nasmGrpCntnStruc contains=ALLBUT,@nasmGrpInComments,nasmMacroDef,@nasmGrpInMacros,@nasmGrpInPreCondits,nasmStructureDef,@nasmGrpInStrucs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnStruc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnStruc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 " union types are not part of nasm (yet)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 "syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnStruc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 "syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match nasmInStructure contained "^\s*AT\>"hs=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn cluster nasmGrpInStrucs contains=nasmStructure,nasmInStructure,nasmStructureLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 " PreProcessor Instructions:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " NAsm PreProcs start with %, but % is not a character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match nasmPreProcError "%{\=\(%\=\k\+\|%%\+\k*\|[+-]\=\d\+\)}\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 if exists("nasm_loose_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLabelError,nasmPreProcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 " Multi-line macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn cluster nasmGrpCntnMacro contains=ALLBUT,@nasmGrpInComments,nasmStructureDef,@nasmGrpInStrucs,nasmMacroDef,@nasmGrpPreCondits,nasmMemReference,nasmInMacPreCondit,nasmInMacStrucDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 if exists("nasm_loose_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match nasmInMacLabel contained "%\(%\k\+\>\|{%\k\+}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn match nasmInMacLabel contained "%\($\+\(\w\|[#\.?@~]\)\k*\>\|{$\+\(\w\|[#\.?@~]\)\k*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=nasmStructureLabel,nasmLabel,nasmInMacParam,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 if !exists("nasm_no_warn")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match nasmInMacLblWarn contained "%\(%[$\.]\k*\>\|{%[$\.]\k*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match nasmInMacLblWarn contained "%\($\+\(\d\|[#\.@~]\)\k*\|{\$\+\(\d\|[#\.@~]\)\k*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 hi link nasmInMacCatLabel nasmInMacLblWarn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 hi link nasmInMacCatLabel nasmInMacLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn match nasmInMacLabel contained "%\(%\(\w\|[#?@~]\)\k*\>\|{%\(\w\|[#?@~]\)\k*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn match nasmInMacLabel contained "%\($\+\(\h\|[?@]\)\k*\>\|{$\+\(\h\|[?@]\)\k*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 hi link nasmInMacCatLabel nasmLabelError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn match nasmInMacCatLabel contained "\d\K\k*"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn match nasmInMacLabel contained "\d}\k\+"lc=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 if !exists("nasm_no_warn")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn match nasmInMacLblWarn contained "%\(\($\+\|%\)[_~][._~]*\>\|{\($\+\|%\)[_~][._~]*}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn match nasmInMacPreProc contained "^\s*%pop\>"hs=e-3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 " structures cannot be nested (yet) -> use: 'keepend' and 're='
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 " union types are not part of nasm (yet)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn 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
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
163 " Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn match nasmInMacParamNum contained "\<\d\+\.list\>"me=e-5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn match nasmInMacParamNum contained "\<\d\+\.nolist\>"me=e-7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syn match nasmInMacDirective contained "\.\(no\)\=list\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn match nasmInMacMacro contained transparent "macro\s"lc=5 skipwhite nextgroup=nasmStructureLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 syn match nasmInMacMacro contained "^\s*%rotate\>"hs=e-6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn match nasmInMacParam contained "%\([+-]\=\d\+\|{[+-]\=\d\+}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 " nasm conditional macro operands/arguments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 " Todo: check feasebility; add too nasmGrpInMacros, etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 "syn match nasmInMacCond contained "\<\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn cluster nasmGrpInMacros contains=nasmMacro,nasmInMacMacro,nasmInMacParam,nasmInMacParamNum,nasmInMacDirective,nasmInMacLabel,nasmInMacLblWarn,nasmInMacMemRef,nasmInMacPreConDef,nasmInMacPreCondit,nasmInMacPreProc,nasmInMacStrucDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 " Context pre-procs that are better used inside a macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 if exists("nasm_ctx_outside_macro")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 if exists("nasm_loose_syntax")
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
183 syn match nasmCtxLocLabel "%$\+\(\w\|[#.?@~]\)\k*\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn match nasmCtxPreProc "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 syn match nasmCtxPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn match nasmCtxPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 syn match nasmCtxPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 if exists("nasm_no_warn")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 hi link nasmCtxPreCondit nasmPreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 hi link nasmCtxPreProc nasmPreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 hi link nasmCtxLocLabel nasmLocalLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 hi link nasmCtxPreCondit nasmPreProcWarn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 hi link nasmCtxPreProc nasmPreProcWarn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 hi link nasmCtxLocLabel nasmLabelWarn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 " Conditional assembly
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 syn cluster nasmGrpCntnPreCon contains=ALLBUT,@nasmGrpInComments,@nasmGrpInMacros,@nasmGrpInStrucs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 syn 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 syn match nasmInPreCondit contained "^\s*%el\(if\|se\)\>"hs=e-4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 syn match nasmInPreCondit contained "^\s*%elifid\>"hs=e-6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 syn match nasmInPreCondit contained "^\s*%elif\(def\|idn\|nid\|num\|str\)\>"hs=e-7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 syn match nasmInPreCondit contained "^\s*%elif\(n\(def\|idn\|num\|str\)\|idni\)\>"hs=e-8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 syn match nasmInPreCondit contained "^\s*%elifnidni\>"hs=e-9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 " Other pre-processor statements
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
214 syn match nasmPreProc "^\s*%\(rep\|use\)\>"hs=e-3
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 syn match nasmPreProc "^\s*%line\>"hs=e-4
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
216 syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
217 syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
218 syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"hs=e-7
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 syn match nasmDefine "^\s*%undef\>"hs=e-5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
222 syn match nasmDefine "^\s*%unmacro\>"hs=e-7
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 syn match nasmInclude "^\s*%include\>"hs=e-7
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
224 " Todo: Treat the line tail after %fatal, %error, %warning as text
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 " Multiple pre-processor instructions on single line detection (obsolete)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 "syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCondits,nasmPreProc,nasmDefine,nasmInclude,nasmPreProcWarn,nasmPreProcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 " Register Identifiers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 " Register operands:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 syn match nasmGen08Register "\<[A-D][HL]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>"
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
237 syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WD]\|1[0-5][WD]\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 syn match nasmSegRegister "\<[C-GS]S\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 syn match nasmSpcRegister "\<E\=IP\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 syn match nasmFpuRegister "\<ST\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 syn match nasmMmxRegister "\<MM\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 syn match nasmSseRegister "\<XMM\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 syn match nasmCtrlRegister "\<CR\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 syn match nasmDebugRegister "\<DR\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 syn match nasmTestRegister "\<TR\o\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 syn match nasmRegisterError "\<X\=MM[8-9]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 syn match nasmRegisterError "\<ST\((\d)\|[8-9]\>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 syn match nasmRegisterError "\<E\([A-D][HL]\|[C-GS]S\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 " Memory reference operand (address):
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
251 syn match nasmMemRefError "[[\]]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
253 syn match nasmInMacMemRef contained "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2596
diff changeset
254 syn match nasmMemReference "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 " Netwide Assembler Directives:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 " Compilation constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 syn keyword nasmConstant __BITS__ __DATE__ __FILE__ __FORMAT__ __LINE__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 syn keyword nasmConstant __NASM_MAJOR__ __NASM_MINOR__ __NASM_VERSION__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 syn keyword nasmConstant __TIME__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 " Instruction modifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 syn match nasmInstructnError "\<TO\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 syn match nasmInstrModifier "\(^\|:\)\s*[C-GS]S\>"ms=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 syn keyword nasmInstrModifier A16 A32 O16 O32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)\s\+TO\>"lc=5,ms=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 " the 'to' keyword is not allowed for fpu-pop instructions (yet)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 "syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)P\s\+TO\>"lc=6,ms=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 " NAsm directives
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 syn keyword nasmRepeat TIMES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 syn keyword nasmDirective ENDSECTION ENDSEGMENT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 syn keyword nasmDirective __SECT__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 " Macro created standard directives: (requires %include)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 syn keyword nasmStdDirective ENDPROC EPILOGUE LOCALS PROC PROLOGUE USES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 syn keyword nasmStdDirective ENDIF ELSE ELIF ELSIF IF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 "syn keyword nasmStdDirective BREAK CASE DEFAULT ENDSWITCH SWITCH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 "syn keyword nasmStdDirective CASE OF ENDCASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 syn keyword nasmStdDirective DO ENDFOR ENDWHILE FOR REPEAT UNTIL WHILE EXIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 " Format specific directives: (all formats)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 " (excluded: extension directives to section, global, common and extern)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 syn keyword nasmFmtDirective ORG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 syn keyword nasmFmtDirective EXPORT IMPORT GROUP UPPERCASE SEG WRT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 syn keyword nasmFmtDirective LIBRARY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 syn keyword nasmFmtDirective _GLOBAL_OFFSET_TABLE_ __GLOBAL_OFFSET_TABLE_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 syn keyword nasmFmtDirective ..start ..got ..gotoff ..gotpc ..plt ..sym
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 " Standard Instructions:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 syn match nasmInstructnError "\<\(F\=CMOV\|SET\)N\=\a\{0,2}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 syn keyword nasmInstructnError CMPS MOVS LCS LODS STOS XLAT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 syn match nasmStdInstruction "\<MOV\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 syn match nasmInstructnError "\<MOV\s[^,;[]*\<CS\>\s*[^:]"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 syn match nasmStdInstruction "\<POP\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
305 syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
306 syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
308 syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 syn keyword nasmStdInstruction JCXZ JECXZ JMP
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
310 syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
312 syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
313 syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
314 syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
317 syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR
2596
fae782ef63dd Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
319 syn keyword nasmStdInstruction LFENCE MFENCE SFENCE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 " System Instructions: (usually privileged)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 " Verification of pointer parameters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 syn keyword nasmSysInstruction ARPL LAR LSL VERR VERW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 " Addressing descriptor tables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 syn keyword nasmSysInstruction LLDT SLDT LGDT SGDT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 " Multitasking
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 syn keyword nasmSysInstruction LTR STR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 " Coprocessing and Multiprocessing (requires fpu and multiple cpu's resp.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 syn keyword nasmSysInstruction CLTS LOCK WAIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 " Input and Output
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 syn keyword nasmInstructnError INS OUTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 syn keyword nasmSysInstruction IN INSB INSW INSD OUT OUTSB OUTSB OUTSW OUTSD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 " Interrupt control
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 syn keyword nasmSysInstruction CLI STI LIDT SIDT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 " System control
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<CR\o\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 syn keyword nasmSysInstruction HLT INVD LMSW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 syn keyword nasmSseInstruction PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 syn keyword nasmSseInstruction RSM SFENCE SMSW SYSENTER SYSEXIT UD2 WBINVD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 " TLB (Translation Lookahead Buffer) testing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<TR\o\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 syn keyword nasmSysInstruction INVLPG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 " Debugging Instructions: (privileged)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 syn match nasmDbgInstruction "\<MOV\s[^;]\{-}\<DR\o\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 syn keyword nasmDbgInstruction INT1 INT3 RDMSR RDTSC RDPMC WRMSR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 " Floating Point Instructions: (requires FPU)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 syn match nasmFpuInstruction "\<FCMOVN\=\([AB]E\=\|[CEPUZ]\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 syn keyword nasmFpuInstruction F2XM1 FABS FADD[P] FBLD FBSTP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 syn keyword nasmFpuInstruction FCHS FCLEX FCOM[IP] FCOMP[P] FCOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 syn keyword nasmFpuInstruction FDECSTP FDISI FDIV[P] FDIVR[P] FENI FFREE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 syn keyword nasmFpuInstruction FIADD FICOM[P] FIDIV[R] FILD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 syn keyword nasmFpuInstruction FIMUL FINCSTP FINIT FIST[P] FISUB[R]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 syn keyword nasmFpuInstruction FLD[1] FLDCW FLDENV FLDL2E FLDL2T FLDLG2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 syn keyword nasmFpuInstruction FLDLN2 FLDPI FLDZ FMUL[P]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 syn keyword nasmFpuInstruction FNCLEX FNDISI FNENI FNINIT FNOP FNSAVE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 syn keyword nasmFpuInstruction FNSTCW FNSTENV FNSTSW FNSTSW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 syn keyword nasmFpuInstruction FPATAN FPREM[1] FPTAN FRNDINT FRSTOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 syn keyword nasmFpuInstruction FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 syn keyword nasmFpuInstruction FSTCW FSTENV FST[P] FSTSW FSUB[P] FSUBR[P]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 syn keyword nasmFpuInstruction FTST FUCOM[IP] FUCOMP[P]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 syn keyword nasmFpuInstruction FXAM FXCH FXTRACT FYL2X FYL2XP1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 " Multi Media Xtension Packed Instructions: (requires MMX unit)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 " Standard MMX instructions: (requires MMX1 unit)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 syn match nasmInstructnError "\<P\(ADD\|SUB\)U\=S\=[DQ]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 syn match nasmInstructnError "\<PCMP\a\{0,2}[BDWQ]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 syn keyword nasmMmxInstruction EMMS MOVD MOVQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 syn keyword nasmMmxInstruction PACKSSDW PACKSSWB PACKUSWB PADDB PADDD PADDW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 syn keyword nasmMmxInstruction PADDSB PADDSW PADDUSB PADDUSW PAND[N]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 syn keyword nasmMmxInstruction PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD PCMPGTW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 syn keyword nasmMmxInstruction PMACHRIW PMADDWD PMULHW PMULLW POR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 syn keyword nasmMmxInstruction PSLLD PSLLQ PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 syn keyword nasmMmxInstruction PSUBB PSUBD PSUBW PSUBSB PSUBSW PSUBUSB PSUBUSW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 syn keyword nasmMmxInstruction PUNPCKHBW PUNPCKHDQ PUNPCKHWD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 syn keyword nasmMmxInstruction PUNPCKLBW PUNPCKLDQ PUNPCKLWD PXOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 " Extended MMX instructions: (requires MMX2/SSE unit)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 syn keyword nasmMmxInstruction MASKMOVQ MOVNTQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 syn keyword nasmMmxInstruction PAVGB PAVGW PEXTRW PINSRW PMAXSW PMAXUB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 syn keyword nasmMmxInstruction PMINSW PMINUB PMOVMSKB PMULHUW PSADBW PSHUFW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 " Streaming SIMD Extension Packed Instructions: (requires SSE unit)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 syn match nasmInstructnError "\<CMP\a\{1,5}[PS]S\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389 syn match nasmSseInstruction "\<CMP\(N\=\(EQ\|L[ET]\)\|\(UN\)\=ORD\)\=[PS]S\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 syn keyword nasmSseInstruction ADDPS ADDSS ANDNPS ANDPS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 syn keyword nasmSseInstruction COMISS CVTPI2PS CVTPS2PI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 syn keyword nasmSseInstruction CVTSI2SS CVTSS2SI CVTTPS2PI CVTTSS2SI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 syn keyword nasmSseInstruction DIVPS DIVSS FXRSTOR FXSAVE LDMXCSR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 syn keyword nasmSseInstruction MAXPS MAXSS MINPS MINSS MOVAPS MOVHLPS MOVHPS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395 syn keyword nasmSseInstruction MOVLHPS MOVLPS MOVMSKPS MOVNTPS MOVSS MOVUPS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 syn keyword nasmSseInstruction MULPS MULSS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 " Three Dimensional Now Packed Instructions: (requires 3DNow! unit)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 syn keyword nasmNowInstruction PFCMPGT PFMAX PFMIN PFMUL PFRCP PFRCPIT1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 syn keyword nasmNowInstruction PFRCPIT2 PFRSQIT1 PFRSQRT PFSUB[R] PI2FD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 syn keyword nasmNowInstruction PMULHRWA PREFETCH[W]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 " Vendor Specific Instructions:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410 " Cyrix instructions (requires Cyrix processor)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 syn keyword nasmCrxInstruction PADDSIW PAVEB PDISTIB PMAGW PMULHRW[C] PMULHRIW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 syn keyword nasmCrxInstruction PMVGEZB PMVLZB PMVNZB PMVZB PSUBSIW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413 syn keyword nasmCrxInstruction RDSHR RSDC RSLDT SMINT SMINTOLD SVDC SVLDT SVTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 syn keyword nasmCrxInstruction WRSHR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 " AMD instructions (requires AMD processor)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416 syn keyword nasmAmdInstruction SYSCALL SYSRET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 " Undocumented Instructions:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 syn match nasmUndInstruction "\<POP\s[^;]*\<CS\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 syn keyword nasmUndInstruction CMPXCHG486 IBTS ICEBP INT01 INT03 LOADALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 syn keyword nasmUndInstruction LOADALL286 LOADALL386 SALC SMI UD1 UMOV XBTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 " Synchronize Syntax:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 syn sync clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 syn sync minlines=50 "for multiple region nesting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 syn sync match nasmSync grouphere nasmMacroDef "^\s*%i\=macro\>"me=s-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 syn sync match nasmSync grouphere NONE "^\s*%endmacro\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 " For version 5.8 and later : only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 if version >= 508 || !exists("did_nasm_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 let did_nasm_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 " Sub Links:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 HiLink nasmInMacDirective nasmDirective
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 HiLink nasmInMacLabel nasmLocalLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 HiLink nasmInMacLblWarn nasmLabelWarn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 HiLink nasmInMacMacro nasmMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 HiLink nasmInMacParam nasmMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 HiLink nasmInMacParamNum nasmDecNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 HiLink nasmInMacPreCondit nasmPreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 HiLink nasmInMacPreProc nasmPreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 HiLink nasmInPreCondit nasmPreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 HiLink nasmInStructure nasmStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455 HiLink nasmStructureLabel nasmStructure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 " Comment Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 HiLink nasmComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 HiLink nasmSpecialComment SpecialComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 HiLink nasmInCommentTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 " Constant Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 HiLink nasmString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 HiLink nasmStringError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 HiLink nasmBinNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 HiLink nasmOctNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 HiLink nasmDecNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 HiLink nasmHexNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 HiLink nasmFltNumber Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 HiLink nasmNumberError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 " Identifier Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 HiLink nasmLabel Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 HiLink nasmLocalLabel Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 HiLink nasmSpecialLabel Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 HiLink nasmLabelError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 HiLink nasmLabelWarn Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 " PreProc Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 HiLink nasmPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 HiLink nasmDefine Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 HiLink nasmInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 HiLink nasmMacro Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 HiLink nasmPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 HiLink nasmPreProcError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 HiLink nasmPreProcWarn Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 " Type Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 HiLink nasmType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 HiLink nasmStorage StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 HiLink nasmStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 HiLink nasmTypeError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 " Directive Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 HiLink nasmConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 HiLink nasmInstrModifier Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 HiLink nasmRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 HiLink nasmDirective Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 HiLink nasmStdDirective Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 HiLink nasmFmtDirective Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 " Register Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 HiLink nasmCtrlRegister Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 HiLink nasmDebugRegister Debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 HiLink nasmTestRegister Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 HiLink nasmRegisterError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 HiLink nasmMemRefError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 " Instruction Group:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510 HiLink nasmStdInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511 HiLink nasmSysInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 HiLink nasmDbgInstruction Debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513 HiLink nasmFpuInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 HiLink nasmMmxInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 HiLink nasmSseInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 HiLink nasmNowInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 HiLink nasmAmdInstruction Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 HiLink nasmCrxInstruction Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 HiLink nasmUndInstruction Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 HiLink nasmInstructnError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 let b:current_syntax = "nasm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 " vim:ts=8 sw=4