blob: 2eabb7e4e53de759dc9b7977da0157ea6f096268 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar3132cdd2020-11-05 20:41:49 +01002" Language: Hitachi H-8300h specific syntax for GNU Assembler
3" Maintainer: Doug Kearns <dougkearns@gmail.com>
4" Previous Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
5" Last Change: 2020 Oct 31
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02007if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008 finish
9endif
10
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010011runtime! syntax/asm.vim
12
Bram Moolenaar071d4272004-06-13 20:20:40 +000013syn case ignore
14
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010015syn match asmDirective "\.h8300[hs]n\="
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
17"h8300[h] registers
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010018syn match asmRegister "e\=r\o[lh]\="
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
20"h8300[h] opcodes - order is important!
21syn match asmOpcode "add\.[lbw]"
22syn match asmOpcode "add[sx :]"
23syn match asmOpcode "and\.[lbw]"
24syn match asmOpcode "bl[deots]"
25syn match asmOpcode "cmp\.[lbw]"
26syn match asmOpcode "dec\.[lbw]"
27syn match asmOpcode "divx[us].[bw]"
28syn match asmOpcode "ext[su]\.[lw]"
29syn match asmOpcode "inc\.[lw]"
30syn match asmOpcode "mov\.[lbw]"
31syn match asmOpcode "mulx[su]\.[bw]"
32syn match asmOpcode "neg\.[lbw]"
33syn match asmOpcode "not\.[lbw]"
34syn match asmOpcode "or\.[lbw]"
35syn match asmOpcode "pop\.[wl]"
36syn match asmOpcode "push\.[wl]"
37syn match asmOpcode "rotx\=[lr]\.[lbw]"
38syn match asmOpcode "sha[lr]\.[lbw]"
39syn match asmOpcode "shl[lr]\.[lbw]"
40syn match asmOpcode "sub\.[lbw]"
41syn match asmOpcode "xor\.[lbw]"
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010042
43syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
44syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
45syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
46syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
47syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
48syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
49syn keyword asmOpcode sub trapa xorc
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
51syn case match
52
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010053hi def link asmOpcode Statement
54hi def link asmRegister Identifier
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
56let b:current_syntax = "asmh8300"
57
Bram Moolenaar3132cdd2020-11-05 20:41:49 +010058" vim: nowrap sw=2 sts=2 ts=8 noet