2014-07-10 21:05:51 -07:00
|
|
|
" Vim syntax file
|
2021-05-01 14:50:17 -07:00
|
|
|
" 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
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2017-04-28 12:06:44 -07:00
|
|
|
if exists("b:current_syntax")
|
2014-07-10 21:05:51 -07:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
runtime! syntax/asm.vim
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
syn case ignore
|
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
syn match asmDirective "\.h8300[hs]n\="
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"h8300[h] registers
|
2021-05-01 14:50:17 -07:00
|
|
|
syn match asmRegister "e\=r\o[lh]\="
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"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]"
|
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
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
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
syn case match
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
hi def link asmOpcode Statement
|
|
|
|
hi def link asmRegister Identifier
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
let b:current_syntax = "asmh8300"
|
|
|
|
|
2021-05-01 14:50:17 -07:00
|
|
|
" vim: nowrap sw=2 sts=2 ts=8 noet
|