xref: /vim-8.2.3635/runtime/syntax/asmh8300.vim (revision 3132cddd)
1" Vim syntax file
2" Language:		Hitachi H-8300h specific syntax for GNU Assembler
3" Maintainer:		Doug Kearns <[email protected]>
4" Previous Maintainer:	Kevin Dahlhausen <[email protected]>
5" Last Change:		2020 Oct 31
6
7if exists("b:current_syntax")
8  finish
9endif
10
11runtime! syntax/asm.vim
12
13syn case ignore
14
15syn match asmDirective	"\.h8300[hs]n\="
16
17"h8300[h] registers
18syn match asmRegister	"e\=r\o[lh]\="
19
20"h8300[h] opcodes - order is important!
21syn match asmOpcode "add\.[lbw]"
22syn match asmOpcode "add[sx :]"
23syn match asmOpcode "and\.[lbw]"
24syn match asmOpcode "bl[deots]"
25syn match asmOpcode "cmp\.[lbw]"
26syn match asmOpcode "dec\.[lbw]"
27syn match asmOpcode "divx[us].[bw]"
28syn match asmOpcode "ext[su]\.[lw]"
29syn match asmOpcode "inc\.[lw]"
30syn match asmOpcode "mov\.[lbw]"
31syn match asmOpcode "mulx[su]\.[bw]"
32syn match asmOpcode "neg\.[lbw]"
33syn match asmOpcode "not\.[lbw]"
34syn match asmOpcode "or\.[lbw]"
35syn match asmOpcode "pop\.[wl]"
36syn match asmOpcode "push\.[wl]"
37syn match asmOpcode "rotx\=[lr]\.[lbw]"
38syn match asmOpcode "sha[lr]\.[lbw]"
39syn match asmOpcode "shl[lr]\.[lbw]"
40syn match asmOpcode "sub\.[lbw]"
41syn match asmOpcode "xor\.[lbw]"
42
43syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
44syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
45syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
46syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
47syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
48syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
49syn keyword asmOpcode sub trapa xorc
50
51syn case match
52
53hi def link asmOpcode	Statement
54hi def link asmRegister	Identifier
55
56let b:current_syntax = "asmh8300"
57
58" vim: nowrap sw=2 sts=2 ts=8 noet
59