Mercurial > vim
annotate runtime/syntax/asmh8300.vim @ 19751:4bed205e29d9
Added tag v8.2.0431 for changeset aa674de6d813b32fb9ea05a1bcdef1bc3f71ce29
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 23 Mar 2020 19:30:06 +0100 |
parents | 46763b01cd9a |
children | 8dad79c661d1 |
rev | line source |
---|---|
7 | 1 " 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 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
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:
7
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 syn case ignore | |
12 | |
13 syn match asmDirective "\.h8300[h]*" | |
14 | |
15 "h8300[h] registers | |
16 syn match asmReg "e\=r[0-7][lh]\=" | |
17 | |
18 "h8300[h] opcodes - order is important! | |
19 syn match asmOpcode "add\.[lbw]" | |
20 syn match asmOpcode "add[sx :]" | |
21 syn match asmOpcode "and\.[lbw]" | |
22 syn match asmOpcode "bl[deots]" | |
23 syn match asmOpcode "cmp\.[lbw]" | |
24 syn match asmOpcode "dec\.[lbw]" | |
25 syn match asmOpcode "divx[us].[bw]" | |
26 syn match asmOpcode "ext[su]\.[lw]" | |
27 syn match asmOpcode "inc\.[lw]" | |
28 syn match asmOpcode "mov\.[lbw]" | |
29 syn match asmOpcode "mulx[su]\.[bw]" | |
30 syn match asmOpcode "neg\.[lbw]" | |
31 syn match asmOpcode "not\.[lbw]" | |
32 syn match asmOpcode "or\.[lbw]" | |
33 syn match asmOpcode "pop\.[wl]" | |
34 syn match asmOpcode "push\.[wl]" | |
35 syn match asmOpcode "rotx\=[lr]\.[lbw]" | |
36 syn match asmOpcode "sha[lr]\.[lbw]" | |
37 syn match asmOpcode "shl[lr]\.[lbw]" | |
38 syn match asmOpcode "sub\.[lbw]" | |
39 syn match asmOpcode "xor\.[lbw]" | |
40 syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt" | |
41 syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi" | |
42 syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset" | |
43 syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa" | |
44 syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe" | |
45 syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc" | |
46 syn keyword asmOpcode "sub" "trapa" "xorc" | |
47 | |
48 syn case match | |
49 | |
50 | |
51 " Read the general asm syntax | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
52 runtime! syntax/asm.vim |
7 | 53 |
54 | |
55 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
56 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
57 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link asmOpcode Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link asmRegister Identifier |
7 | 60 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
61 " My default-color overrides: |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
62 "hi asmOpcode ctermfg=yellow |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
63 "hi asmReg ctermfg=lightmagenta |
7 | 64 |
65 | |
66 let b:current_syntax = "asmh8300" | |
67 | |
68 " vim: ts=8 |