summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/asmh8300.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-05 20:41:49 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-05 20:41:49 +0100
commit3132cddd209ee510bde48b6520290cb26c8f604a (patch)
treebc010e66539817a382c76bc11cfb513605dcf033 /runtime/syntax/asmh8300.vim
parent00806bceb6dc9c8dcd308e5f7e50f720f7dc71b0 (diff)
Update runtime files
Diffstat (limited to 'runtime/syntax/asmh8300.vim')
-rw-r--r--runtime/syntax/asmh8300.vim48
1 files changed, 19 insertions, 29 deletions
diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim
index 8560fb7ae4..2eabb7e4e5 100644
--- a/runtime/syntax/asmh8300.vim
+++ b/runtime/syntax/asmh8300.vim
@@ -1,19 +1,21 @@
" Vim syntax file
-" Language: Hitachi H-8300h specific syntax for GNU Assembler
-" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
-" Last Change: 2002 Sep 19
+" Language: Hitachi H-8300h specific syntax for GNU Assembler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
+" Last Change: 2020 Oct 31
-" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
+runtime! syntax/asm.vim
+
syn case ignore
-syn match asmDirective "\.h8300[h]*"
+syn match asmDirective "\.h8300[hs]n\="
"h8300[h] registers
-syn match asmReg "e\=r[0-7][lh]\="
+syn match asmRegister "e\=r\o[lh]\="
"h8300[h] opcodes - order is important!
syn match asmOpcode "add\.[lbw]"
@@ -37,32 +39,20 @@ syn match asmOpcode "sha[lr]\.[lbw]"
syn match asmOpcode "shl[lr]\.[lbw]"
syn match asmOpcode "sub\.[lbw]"
syn match asmOpcode "xor\.[lbw]"
-syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
-syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
-syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
-syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
-syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
-syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
-syn keyword asmOpcode "sub" "trapa" "xorc"
-
-syn case match
-
-" Read the general asm syntax
-runtime! syntax/asm.vim
-
-
-" Define the default highlighting.
-" Only when an item doesn't have highlighting yet
+syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
+syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
+syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
+syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
+syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
+syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
+syn keyword asmOpcode sub trapa xorc
-hi def link asmOpcode Statement
-hi def link asmRegister Identifier
-
-" My default-color overrides:
-"hi asmOpcode ctermfg=yellow
-"hi asmReg ctermfg=lightmagenta
+syn case match
+hi def link asmOpcode Statement
+hi def link asmRegister Identifier
let b:current_syntax = "asmh8300"
-" vim: ts=8
+" vim: nowrap sw=2 sts=2 ts=8 noet