summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/asmh8300.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
commitaed8ce9da277f5ecffe968b324f242c41c3b752a (patch)
treed2e538394cb7a8a7c42a4aac6ccf1a8e3256999b /runtime/syntax/asmh8300.vim
parentInitial commit. (diff)
downloadvim-aed8ce9da277f5ecffe968b324f242c41c3b752a.tar.xz
vim-aed8ce9da277f5ecffe968b324f242c41c3b752a.zip
Adding upstream version 2:9.0.1378.upstream/2%9.0.1378upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--runtime/syntax/asmh8300.vim58
1 files changed, 58 insertions, 0 deletions
diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim
new file mode 100644
index 0000000..2eabb7e
--- /dev/null
+++ b/runtime/syntax/asmh8300.vim
@@ -0,0 +1,58 @@
+" Vim syntax file
+" 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
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/asm.vim
+
+syn case ignore
+
+syn match asmDirective "\.h8300[hs]n\="
+
+"h8300[h] registers
+syn match asmRegister "e\=r\o[lh]\="
+
+"h8300[h] opcodes - order is important!
+syn match asmOpcode "add\.[lbw]"
+syn match asmOpcode "add[sx :]"
+syn match asmOpcode "and\.[lbw]"
+syn match asmOpcode "bl[deots]"
+syn match asmOpcode "cmp\.[lbw]"
+syn match asmOpcode "dec\.[lbw]"
+syn match asmOpcode "divx[us].[bw]"
+syn match asmOpcode "ext[su]\.[lw]"
+syn match asmOpcode "inc\.[lw]"
+syn match asmOpcode "mov\.[lbw]"
+syn match asmOpcode "mulx[su]\.[bw]"
+syn match asmOpcode "neg\.[lbw]"
+syn match asmOpcode "not\.[lbw]"
+syn match asmOpcode "or\.[lbw]"
+syn match asmOpcode "pop\.[wl]"
+syn match asmOpcode "push\.[wl]"
+syn match asmOpcode "rotx\=[lr]\.[lbw]"
+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
+
+hi def link asmOpcode Statement
+hi def link asmRegister Identifier
+
+let b:current_syntax = "asmh8300"
+
+" vim: nowrap sw=2 sts=2 ts=8 noet