Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 6 | " quit when a syntax file was already loaded |
| 7 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 52 | runtime! syntax/asm.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 53 | |
| 54 | |
| 55 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 56 | " Only when an item doesn't have highlighting yet |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 57 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 58 | hi def link asmOpcode Statement |
| 59 | hi def link asmRegister Identifier |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 60 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 61 | " My default-color overrides: |
| 62 | "hi asmOpcode ctermfg=yellow |
| 63 | "hi asmReg ctermfg=lightmagenta |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 64 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 65 | |
| 66 | let b:current_syntax = "asmh8300" |
| 67 | |
| 68 | " vim: ts=8 |