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