annotate runtime/syntax/a65.vim @ 39:c16898406ff2

synchorinize version 7.3.081
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Fri, 17 Dec 2010 17:43:06 +0900
parents 76efa0be13f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: xa 6502 cross assembler
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Clemens Kirchgatterer <clemens@thf.ath.cx>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " Last Change: 2003 May 03
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9 syntax clear
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 elseif exists("b:current_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 finish
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 syn case ignore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 " Opcodes
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25 syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39 syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55 syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 " Addresses
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94 syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 " Numbers
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 syn match a65Number "#\=[0-9]*\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99 syn match a65Number "#\=$[0-9A-F]*\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100 syn match a65Number "#\=&[0-7]*\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 syn match a65Number "#\=%[01]*\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 syn case match
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105 " Types
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 syn match a65Type "\(^\|\s\)\.byt\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 syn match a65Type "\(^\|\s\)\.word\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108 syn match a65Type "\(^\|\s\)\.asc\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 syn match a65Type "\(^\|\s\)\.text\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112 syn match a65Type "\(^\|\s\)\.data\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 syn match a65Type "\(^\|\s\)\.bss\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114 syn match a65Type "\(^\|\s\)\.zero\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115 syn match a65Type "\(^\|\s\)\.align\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117 " Blocks
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 syn match a65Section "\(^\|\s\)\.(\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 syn match a65Section "\(^\|\s\)\.)\($\|\s\)"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 " Strings
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 syn match a65String "\".*\""
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 " Programm Counter
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 syn region a65PC start="\*=" end="\>" keepend
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127 " HI/LO Byte
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 " Comments
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131 syn keyword a65Todo TODO XXX FIXME BUG contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132 syn match a65Comment ";.*"hs=s+1 contains=a65Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133 syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135 " Preprocessor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 syn match a65End excludenl /end$/ contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138 syn match a65Continue "\\$" contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140 " Define the default highlighting.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141 " For version 5.7 and earlier: only when not done already
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 " For version 5.8 and later: only when an item doesn't have highlighting yet
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143 if version >= 508 || !exists("did_a65_syntax_inits")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 if version < 508
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145 let did_a65_syntax_inits = 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 command -nargs=+ HiLink hi link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148 command -nargs=+ HiLink hi def link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151 HiLink a65Section Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 HiLink a65Address Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 HiLink a65Comment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154 HiLink a65PreProc PreProc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155 HiLink a65Number Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 HiLink a65String String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 HiLink a65Type Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158 HiLink a65Opcode Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 HiLink a65PC Error
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 HiLink a65Todo Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161 HiLink a65HiLo Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 delcommand HiLink
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166 let b:current_syntax = "a65"