annotate runtime/syntax/z8a.vim @ 19345:c221e35656dc

Added tag v8.2.0230 for changeset 77794a1d7e98d9b8dc0fe8f44c9d33a533fe9ac5
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Feb 2020 22:30:04 +0100
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Z80 assembler asz80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Milan Pikula <www@fornax.elf.stuba.sk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
6 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Common Z80 Assembly instructions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn keyword z8aInstruction adc add and bit ccf cp cpd cpdr cpi cpir cpl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn keyword z8aInstruction daa di djnz ei exx halt im in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword z8aInstruction ind ini indr inir jp jr ld ldd lddr ldi ldir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword z8aInstruction neg nop or otdr otir out outd outi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword z8aInstruction res rl rla rlc rlca rld
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword z8aInstruction rr rra rrc rrca rrd sbc scf set sla sra
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword z8aInstruction srl sub xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " syn keyword z8aInstruction push pop call ret reti retn inc dec ex rst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Any other stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match z8aIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Instructions changing stack
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword z8aSpecInst push pop call ret reti retn rst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match z8aInstruction "\<inc\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match z8aInstruction "\<dec\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match z8aInstruction "\<ex\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match z8aSpecInst "\<inc\s\+sp\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match z8aSpecInst "\<dec\s\+sp\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match z8aSpecInst "\<ex\s\+(\s*sp\s*)\s*,\s*hl\>"me=s+2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 "Labels
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match z8aLabel "[a-z_][a-z0-9_]*:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match z8aSpecialLabel "[a-z_][a-z0-9_]*::"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " PreProcessor commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match z8aPreProc "\.org"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match z8aPreProc "\.globl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match z8aPreProc "\.db"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match z8aPreProc "\.dw"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match z8aPreProc "\.ds"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match z8aPreProc "\.byte"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match z8aPreProc "\.word"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match z8aPreProc "\.blkb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match z8aPreProc "\.blkw"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match z8aPreProc "\.ascii"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match z8aPreProc "\.asciz"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match z8aPreProc "\.module"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match z8aPreProc "\.title"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match z8aPreProc "\.sbttl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match z8aPreProc "\.even"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match z8aPreProc "\.odd"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match z8aPreProc "\.area"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match z8aPreProc "\.page"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match z8aPreProc "\.setdp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match z8aPreProc "\.radix"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match z8aInclude "\.include"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match z8aPreCondit "\.if"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match z8aPreCondit "\.else"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match z8aPreCondit "\.endif"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Common strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match z8aString "\".*\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match z8aString "\'.*\'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match z8aNumber "[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match z8aNumber "0[xXhH][0-9a-fA-F]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match z8aNumber "0[bB][0-1]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match z8aNumber "0[oO\@qQ][0-7]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match z8aNumber "0[dD][0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Character constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match z8aString "\#\'."hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match z8aComment ";.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
85 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
87 hi def link z8aSection Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link z8aLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link z8aSpecialLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link z8aComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link z8aInstruction Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link z8aSpecInst Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link z8aInclude Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link z8aPreCondit PreCondit
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link z8aPreProc PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link z8aNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link z8aString String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 let b:current_syntax = "z8a"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " vim: ts=8