annotate runtime/syntax/z8a.vim @ 3902:d24d309c365f v7.3.707

updated for version 7.3.707 Problem: Problems loading a library for a file name with non-latin characters. Solution: Use wide system functions when possible. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Sun, 21 Oct 2012 21:38:45 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Common Z80 Assembly instructions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword z8aInstruction adc add and bit ccf cp cpd cpdr cpi cpir cpl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword z8aInstruction daa di djnz ei exx halt im in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword z8aInstruction ind ini indr inir jp jr ld ldd lddr ldi ldir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword z8aInstruction neg nop or otdr otir out outd outi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword z8aInstruction res rl rla rlc rlca rld
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword z8aInstruction rr rra rrc rrca rrd sbc scf set sla sra
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword z8aInstruction srl sub xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " syn keyword z8aInstruction push pop call ret reti retn inc dec ex rst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Any other stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match z8aIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Instructions changing stack
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword z8aSpecInst push pop call ret reti retn rst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match z8aInstruction "\<inc\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match z8aInstruction "\<dec\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match z8aInstruction "\<ex\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match z8aSpecInst "\<inc\s\+sp\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match z8aSpecInst "\<dec\s\+sp\>"me=s+3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match z8aSpecInst "\<ex\s\+(\s*sp\s*)\s*,\s*hl\>"me=s+2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 "Labels
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match z8aLabel "[a-z_][a-z0-9_]*:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match z8aSpecialLabel "[a-z_][a-z0-9_]*::"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " PreProcessor commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match z8aPreProc "\.org"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match z8aPreProc "\.globl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match z8aPreProc "\.db"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match z8aPreProc "\.dw"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match z8aPreProc "\.ds"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match z8aPreProc "\.byte"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match z8aPreProc "\.word"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match z8aPreProc "\.blkb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match z8aPreProc "\.blkw"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match z8aPreProc "\.ascii"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match z8aPreProc "\.asciz"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match z8aPreProc "\.module"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match z8aPreProc "\.title"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match z8aPreProc "\.sbttl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match z8aPreProc "\.even"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match z8aPreProc "\.odd"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match z8aPreProc "\.area"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match z8aPreProc "\.page"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match z8aPreProc "\.setdp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match z8aPreProc "\.radix"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match z8aInclude "\.include"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match z8aPreCondit "\.if"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match z8aPreCondit "\.else"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match z8aPreCondit "\.endif"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " Common strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match z8aString "\".*\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match z8aString "\'.*\'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match z8aNumber "[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match z8aNumber "0[xXhH][0-9a-fA-F]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match z8aNumber "0[bB][0-1]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match z8aNumber "0[oO\@qQ][0-7]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match z8aNumber "0[dD][0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Character constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match z8aString "\#\'."hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match z8aComment ";.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 if version >= 508 || !exists("did_z8a_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 let did_z8a_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink z8aSection Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink z8aLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink z8aSpecialLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink z8aComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink z8aInstruction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink z8aSpecInst Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink z8aInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink z8aPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 HiLink z8aPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 HiLink z8aNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 HiLink z8aString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 let b:current_syntax = "z8a"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " vim: ts=8