annotate runtime/syntax/asmh8300.vim @ 4182:f4960ddda07c v7.3.843

updated for version 7.3.843 Problem: Missing test file changes. Solution: Change the tests.
author Bram Moolenaar <bram@vim.org>
date Tue, 26 Feb 2013 22:54:11 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Hitachi H-8300h specific syntax for GNU Assembler
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2002 Sep 19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match asmDirective "\.h8300[h]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 "h8300[h] registers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match asmReg "e\=r[0-7][lh]\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 "h8300[h] opcodes - order is important!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match asmOpcode "add\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match asmOpcode "add[sx :]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match asmOpcode "and\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match asmOpcode "bl[deots]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match asmOpcode "cmp\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match asmOpcode "dec\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match asmOpcode "divx[us].[bw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match asmOpcode "ext[su]\.[lw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match asmOpcode "inc\.[lw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match asmOpcode "mov\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match asmOpcode "mulx[su]\.[bw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match asmOpcode "neg\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match asmOpcode "not\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match asmOpcode "or\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match asmOpcode "pop\.[wl]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match asmOpcode "push\.[wl]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match asmOpcode "rotx\=[lr]\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match asmOpcode "sha[lr]\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match asmOpcode "shl[lr]\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match asmOpcode "sub\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match asmOpcode "xor\.[lbw]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword asmOpcode "sub" "trapa" "xorc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Read the general asm syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 source <sfile>:p:h/asm.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 runtime! syntax/asm.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 if version >= 508 || !exists("did_hitachi_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 let did_hitachi_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink asmOpcode Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink asmRegister Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " My default-color overrides:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 "hi asmOpcode ctermfg=yellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 "hi asmReg ctermfg=lightmagenta
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 let b:current_syntax = "asmh8300"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " vim: ts=8