From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/syntax/a65.vim | 153 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 runtime/syntax/a65.vim (limited to 'runtime/syntax/a65.vim') diff --git a/runtime/syntax/a65.vim b/runtime/syntax/a65.vim new file mode 100644 index 0000000..b232e82 --- /dev/null +++ b/runtime/syntax/a65.vim @@ -0,0 +1,153 @@ +" Vim syntax file +" Language: xa 6502 cross assembler +" Maintainer: Clemens Kirchgatterer +" Last Change: 2016 Aug 31 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" Opcodes +syn match a65Opcode "\" +syn match a65Number "#\=$[0-9A-F]*\>" +syn match a65Number "#\=&[0-7]*\>" +syn match a65Number "#\=%[01]*\>" + +syn case match + +" Types +syn match a65Type "\(^\|\s\)\.byt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.word\($\|\s\)" +syn match a65Type "\(^\|\s\)\.asc\($\|\s\)" +syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)" +syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.text\($\|\s\)" +syn match a65Type "\(^\|\s\)\.data\($\|\s\)" +syn match a65Type "\(^\|\s\)\.bss\($\|\s\)" +syn match a65Type "\(^\|\s\)\.zero\($\|\s\)" +syn match a65Type "\(^\|\s\)\.align\($\|\s\)" + +" Blocks +syn match a65Section "\(^\|\s\)\.(\($\|\s\)" +syn match a65Section "\(^\|\s\)\.)\($\|\s\)" + +" Strings +syn match a65String "\".*\"" + +" Programm Counter +syn region a65PC start="\*=" end="\>" keepend + +" HI/LO Byte +syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend + +" Comments +syn keyword a65Todo TODO XXX FIXME BUG contained +syn match a65Comment ";.*"hs=s+1 contains=a65Todo +syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment + +" Preprocessor +syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue +syn match a65End excludenl /end$/ contained +syn match a65Continue "\\$" contained + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link a65Section Special +hi def link a65Address Special +hi def link a65Comment Comment +hi def link a65PreProc PreProc +hi def link a65Number Number +hi def link a65String String +hi def link a65Type Statement +hi def link a65Opcode Type +hi def link a65PC Error +hi def link a65Todo Todo +hi def link a65HiLo Number + + +let b:current_syntax = "a65" -- cgit v1.2.3