blob: 8560fb7ae429652a7d15bedd4467fee7248fb60b [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Hitachi H-8300h specific syntax for GNU Assembler
3" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
4" Last Change: 2002 Sep 19
5
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02006" quit when a syntax file was already loaded
7if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008 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
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020052runtime! syntax/asm.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000053
54
55" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020056" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +000057
Bram Moolenaarf37506f2016-08-31 22:22:10 +020058hi def link asmOpcode Statement
59hi def link asmRegister Identifier
Bram Moolenaar071d4272004-06-13 20:20:40 +000060
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020061" My default-color overrides:
62"hi asmOpcode ctermfg=yellow
63"hi asmReg ctermfg=lightmagenta
Bram Moolenaar071d4272004-06-13 20:20:40 +000064
Bram Moolenaar071d4272004-06-13 20:20:40 +000065
66let b:current_syntax = "asmh8300"
67
68" vim: ts=8