annotate runtime/syntax/tasm.vim @ 13705:7dd71a906267

Added tag v8.0.1724 for changeset e7b8c896fa96e91f239ec522e3b7bb885887f53f
author Christian Brabandt <cb@256bit.org>
date Mon, 16 Apr 2018 15:45:07 +0200
parents 46763b01cd9a
children bc1a8d21c811
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: TASM: turbo assembler by Borland
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintaner: FooLman of United Force <foolman@bigfoot.com>
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2012 Feb 03 by Thilo Six
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
6 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
11 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
12 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match tasmLabel "^[\ \t]*[@a-z_$][a-z0-9_$@]*\ *:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword tasmDirective ALIAS ALIGN ARG ASSUME %BIN CATSRT CODESEG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match tasmDirective "\<\(byte\|word\|dword\|qword\)\ ptr\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " CALL extended syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword tasmDirective COMM %CONDS CONST %CREF %CREFALL %CREFREF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword tasmDirective %CREFUREF %CTLS DATASEG DB DD %DEPTH DF DISPLAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword tasmDirective DOSSEG DP DQ DT DW ELSE EMUL END ENDIF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " IF XXXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword tasmDirective ENDM ENDP ENDS ENUM EQU ERR EVEN EVENDATA EXITCODE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword tasmDirective EXITM EXTRN FARDATA FASTIMUL FLIPFLAG GETFIELD GLOBAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword tasmDirective GOTO GROUP IDEAL %INCL INCLUDE INCLUDELIB INSTR IRP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 "JMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword tasmDirective IRPC JUMPS LABEL LARGESTACK %LINUM %LIST LOCAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword tasmDirective LOCALS MACRO %MACS MASKFLAG MASM MASM51 MODEL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword tasmDirective MULTERRS NAME %NEWPAGE %NOCONDS %NOCREF %NOCTLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword tasmDirective NOEMUL %NOINCL NOJUMPS %NOLIST NOLOCALS %NOMACS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword tasmDirective NOMASM51 NOMULTERRS NOSMART %NOSYMS %NOTRUNC NOWARN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword tasmDirective %PAGESIZE %PCNT PNO87 %POPLCTL POPSTATE PROC PROCDESC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword tasmDirective PROCTYPE PUBLIC PUBLICDLL PURGE %PUSHCTL PUSHSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 "rept, ret
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword tasmDirective QUIRKS RADIX RECORD RETCODE SEGMENT SETFIELD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword tasmDirective SETFLAG SIZESTR SMALLSTACK SMART STACK STARTUPCODE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword tasmDirective STRUC SUBSTR %SUBTTL %SYMS TABLE %TABSIZE TBLINIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword tasmDirective TBLINST TBLPTR TESTFLAG %TEXT %TITLE %TRUNC TYPEDEF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword tasmDirective UDATASEG UFARDATA UNION USES VERSION WAR WHILE ?DEBUG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword tasmInstruction AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF BSR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword tasmInstruction BSWAP BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword tasmInstruction CMC CMP CMPXCHG CMPXCHG8B CPUID CWD CDQ CWDE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword tasmInstruction DAA DAS DEC DIV ENTER RETN RETF F2XM1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword tasmCoprocInstr FABS FADD FADDP FBLD FBSTP FCHG FCOM FCOM2 FCOMI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword tasmCoprocInstr FCOMIP FCOMP FCOMP3 FCOMP5 FCOMPP FCOS FDECSTP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword tasmCoprocInstr FDISI FDIV FDIVP FDIVR FENI FFREE FFREEP FIADD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword tasmCoprocInstr FICOM FICOMP FIDIV FIDIVR FILD FIMUL FINIT FINCSTP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword tasmCoprocInstr FIST FISTP FISUB FISUBR FLD FLD1 FLDCW FLDENV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword tasmCoprocInstr FLDL2E FLDL2T FLDLG2 FLDLN2 FLDPI FLDZ FMUL FMULP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword tasmCoprocInstr FNCLEX FNINIT FNOP FNSAVE FNSTCW FNSTENV FNSTSW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword tasmCoprocInstr FPATAN FPREM FPREM1 FPTAN FRNDINT FRSTOR FSCALE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword tasmCoprocInstr FSETPM FSIN FSINCOM FSQRT FST FSTP FSTP1 FSTP8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword tasmCoprocInstr FSTP9 FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword tasmCoprocInstr FUCOMPP FWAIT FXAM FXCH FXCH4 FXCH7 FXTRACT FYL2X
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword tasmCoprocInstr FYL2XP1 FSTCW FCHS FSINCOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword tasmInstruction IDIV IMUL IN INC INT INTO INVD INVLPG IRET JMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword tasmInstruction LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword tasmInstruction LMSW LOCK LODSB LSL LSS LTR MOV MOVSX MOVZX MUL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword tasmInstruction NEG NOP NOT OR OUT POP POPA POPAD POPF POPFD PUSH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword tasmInstruction PUSHA PUSHAD PUSHF PUSHFD RCL RCR RDMSR RDPMC RDTSC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword tasmInstruction REP RET ROL ROR RSM SAHF SAR SBB SGDT SHL SAL SHLD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword tasmInstruction SHR SHRD SIDT SMSW STC STD STI STR SUB TEST VERR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword tasmInstruction VERW WBINVD WRMSR XADD XCHG XLAT XOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword tasmMMXinst EMMS MOVD MOVQ PACKSSDW PACKSSWB PACKUSWB PADDB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword tasmMMXinst PADDD PADDSB PADDSB PADDSW PADDUSB PADDUSW PADDW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword tasmMMXinst PAND PANDN PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword tasmMMXinst PCMPGTW PMADDWD PMULHW PMULLW POR PSLLD PSLLQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword tasmMMXinst PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW PSUBB PSUBD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword tasmMMXinst PSUBSB PSUBSW PSUBUSB PSUBUSW PSUBW PUNPCKHBW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword tasmMMXinst PUNPCKHBQ PUNPCKHWD PUNPCKLBW PUNPCKLDQ PUNPCKLWD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword tasmMMXinst PXOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 "FCMOV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match tasmInstruction "\<\(CMPS\|MOVS\|OUTS\|SCAS\|STOS\|LODS\|INS\)[BWD]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABCGLESXZ]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABGL]E\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match tasmInstruction "\<\(LOOP\|REP\)N\=[EZ]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match tasmRegister "\<[A-D][LH]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match tasmRegister "\<E\=\([A-D]X\|[SD]I\|[BS]P\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match tasmRegister "\<[C-GS]S\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region tasmComment start=";" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 "HACK! comment ? ... selection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn region tasmComment start="comment \+\$" end="\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn region tasmComment start="comment \+\~" end="\~"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn region tasmComment start="comment \+#" end="#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn region tasmString start="'" end="'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn region tasmString start='"' end='"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match tasmDec "\<-\=[0-9]\+\.\=[0-9]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match tasmHex "\<[0-9][0-9A-F]*H\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match tasmOct "\<[0-7]\+O\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match tasmBin "\<[01]\+B\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
95 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link tasmString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
98 hi def link tasmDec Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
99 hi def link tasmHex Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
100 hi def link tasmOct Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 hi def link tasmBin Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
102 hi def link tasmInstruction Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
103 hi def link tasmCoprocInstr Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
104 hi def link tasmMMXInst Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
105 hi def link tasmDirective PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
106 hi def link tasmRegister Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
107 hi def link tasmProctype PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
108 hi def link tasmComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
109 hi def link tasmLabel Label
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 let b:curret_syntax = "tasm"
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
113
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
114 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
115 unlet s:cpo_save