codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: xa 6502 cross assembler3" Maintainer: Clemens Kirchgatterer <clemens@1541.org>4" Last Change: 2016 Aug 315 6" quit when a syntax file was already loaded7if exists("b:current_syntax")8 finish9endif10 11syn case ignore12 13" Opcodes14syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address15syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address16syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address17syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address18syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address19syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address20syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address21syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address22syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address23syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address24syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address25syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address26syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address27syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address28syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address29syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address30syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address31syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address32syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address33syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address34syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address35syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address36syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address37syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address38syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address39syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address40syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address41syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address42syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address43syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address44syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address45syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address46syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address47syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address48syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address49syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address50syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address51syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address52syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address53syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address54syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address55syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address56syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address57syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address58syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address59syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address60syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address61syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address62syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address63syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address64syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address65syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address66syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address67syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address68syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address69syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address70syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address71syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address72syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address73syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address74syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address75syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address76syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address77syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address78syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address79syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address80syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address81 82" Addresses83syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)"84syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)"85syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)"86syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)"87syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)"88syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)"89syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)"90syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)"91syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)"92syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)"93 94" Numbers95syn match a65Number "#\=[0-9]*\>"96syn match a65Number "#\=$[0-9A-F]*\>"97syn match a65Number "#\=&[0-7]*\>"98syn match a65Number "#\=%[01]*\>"99 100syn case match101 102" Types103syn match a65Type "\(^\|\s\)\.byt\($\|\s\)"104syn match a65Type "\(^\|\s\)\.word\($\|\s\)"105syn match a65Type "\(^\|\s\)\.asc\($\|\s\)"106syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)"107syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)"108syn match a65Type "\(^\|\s\)\.text\($\|\s\)"109syn match a65Type "\(^\|\s\)\.data\($\|\s\)"110syn match a65Type "\(^\|\s\)\.bss\($\|\s\)"111syn match a65Type "\(^\|\s\)\.zero\($\|\s\)"112syn match a65Type "\(^\|\s\)\.align\($\|\s\)"113 114" Blocks115syn match a65Section "\(^\|\s\)\.(\($\|\s\)"116syn match a65Section "\(^\|\s\)\.)\($\|\s\)"117 118" Strings119syn match a65String "\".*\""120 121" Program Counter122syn region a65PC start="\*=" end="\>" keepend123 124" HI/LO Byte125syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend126 127" Comments128syn keyword a65Todo TODO XXX FIXME BUG contained129syn match a65Comment ";.*"hs=s+1 contains=a65Todo130syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment131 132" Preprocessor133syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue134syn match a65End excludenl /end$/ contained135syn match a65Continue "\\$" contained136 137" Define the default highlighting.138" Only when an item doesn't have highlighting yet139 140hi def link a65Section Special141hi def link a65Address Special142hi def link a65Comment Comment143hi def link a65PreProc PreProc144hi def link a65Number Number145hi def link a65String String146hi def link a65Type Statement147hi def link a65Opcode Type148hi def link a65PC Error149hi def link a65Todo Todo150hi def link a65HiLo Number151 152 153let b:current_syntax = "a65"154 