xref: /vim-8.2.3635/runtime/syntax/asmh8300.vim (revision fb094e14)
1" Vim syntax file
2" Language:	Hitachi H-8300h specific syntax for GNU Assembler
3" Maintainer:	Kevin Dahlhausen <[email protected]>
4" Last Change:	2002 Sep 19
5
6" quit when a syntax file was already loaded
7if exists("b:current_syntax")
8  finish
9endif
10
11syn case ignore
12
13syn match asmDirective "\.h8300[h]*"
14
15"h8300[h] registers
16syn match asmReg	"e\=r[0-7][lh]\="
17
18"h8300[h] opcodes - order is important!
19syn match asmOpcode "add\.[lbw]"
20syn match asmOpcode "add[sx :]"
21syn match asmOpcode "and\.[lbw]"
22syn match asmOpcode "bl[deots]"
23syn match asmOpcode "cmp\.[lbw]"
24syn match asmOpcode "dec\.[lbw]"
25syn match asmOpcode "divx[us].[bw]"
26syn match asmOpcode "ext[su]\.[lw]"
27syn match asmOpcode "inc\.[lw]"
28syn match asmOpcode "mov\.[lbw]"
29syn match asmOpcode "mulx[su]\.[bw]"
30syn match asmOpcode "neg\.[lbw]"
31syn match asmOpcode "not\.[lbw]"
32syn match asmOpcode "or\.[lbw]"
33syn match asmOpcode "pop\.[wl]"
34syn match asmOpcode "push\.[wl]"
35syn match asmOpcode "rotx\=[lr]\.[lbw]"
36syn match asmOpcode "sha[lr]\.[lbw]"
37syn match asmOpcode "shl[lr]\.[lbw]"
38syn match asmOpcode "sub\.[lbw]"
39syn match asmOpcode "xor\.[lbw]"
40syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
41syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
42syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
43syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
44syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
45syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
46syn keyword asmOpcode "sub" "trapa" "xorc"
47
48syn case match
49
50
51" Read the general asm syntax
52runtime! syntax/asm.vim
53
54
55" Define the default highlighting.
56" Only when an item doesn't have highlighting yet
57
58hi def link asmOpcode  Statement
59hi def link asmRegister  Identifier
60
61" My default-color overrides:
62"hi asmOpcode ctermfg=yellow
63"hi asmReg	ctermfg=lightmagenta
64
65
66let b:current_syntax = "asmh8300"
67
68" vim: ts=8
69