" Vim syntax file " Language: Motorola 68000 Assembler " Maintainer: Steve Wall " Last change: 2001 May 01 " " This is incomplete. In particular, support for 68020 and " up and 68851/68881 co-processors is partial or non-existant. " Feel free to contribute... " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Partial list of register symbols syn keyword asm68kReg a0 a1 a2 a3 a4 a5 a6 a7 d0 d1 d2 d3 d4 d5 d6 d7 syn keyword asm68kReg pc sr ccr sp usp ssp " MC68010 syn keyword asm68kReg vbr sfc sfcr dfc dfcr " MC68020 syn keyword asm68kReg msp isp zpc cacr caar syn keyword asm68kReg za0 za1 za2 za3 za4 za5 za6 za7 syn keyword asm68kReg zd0 zd1 zd2 zd3 zd4 zd5 zd6 zd7 " MC68030 syn keyword asm68kReg crp srp tc ac0 ac1 acusr tt0 tt1 mmusr " MC68040 syn keyword asm68kReg dtt0 dtt1 itt0 itt1 urp " MC68851 registers syn keyword asm68kReg cal val scc crp srp drp tc ac psr pcsr syn keyword asm68kReg bac0 bac1 bac2 bac3 bac4 bac5 bac6 bac7 syn keyword asm68kReg bad0 bad1 bad2 bad3 bad4 bad5 bad6 bad7 " MC68881/82 registers syn keyword asm68kReg fp0 fp1 fp2 fp3 fp4 fp5 fp6 fp7 syn keyword asm68kReg control status iaddr fpcr fpsr fpiar " M68000 opcodes - order is important! syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match asm68kOpcode "\" syn match hexNumber "\<[0-9][0-9a-fA-F]*H\>" syn match octNumber "@[0-7]\+\>" syn match octNumber "\<[0-7]\+[QO]\>" syn match binNumber "%[01]\+\>" syn match binNumber "\<[01]\+B\>" syn match decNumber "\<[0-9]\+D\=\>" syn match floatE "_*E_*" contained syn match floatExponent "_*E_*[-+]\=[0-9]\+" contained contains=floatE syn match floatNumber "[-+]\=[0-9]\+_*E_*[-+]\=[0-9]\+" contains=floatExponent syn match floatNumber "[-+]\=[0-9]\+\.[0-9]\+\(E[-+]\=[0-9]\+\)\=" contains=floatExponent syn match floatNumber ":\([0-9a-f]\+_*\)\+" " Character string constants syn match asm68kStringError "'[ -~]*'" syn match asm68kStringError "'[ -~]*$" syn region asm68kString start="'" skip="''" end="'" oneline contains=asm68kCharError syn match asm68kCharError "[^ -~]" contained " Immediate data syn match asm68kImmediate "#\$[0-9a-fA-F]\+" contains=hexNumber syn match asm68kImmediate "#[0-9][0-9a-fA-F]*H" contains=hexNumber syn match asm68kImmediate "#@[0-7]\+" contains=octNumber syn match asm68kImmediate "#[0-7]\+[QO]" contains=octNumber syn match asm68kImmediate "#%[01]\+" contains=binNumber syn match asm68kImmediate "#[01]\+B" contains=binNumber syn match asm68kImmediate "#[0-9]\+D\=" contains=decNumber syn match asm68kSymbol "[a-z_?.][a-z0-9_?.$]*" contained syn match asm68kImmediate "#[a-z_?.][a-z0-9_?.]*" contains=asm68kSymbol " Special items for comments syn keyword asm68kTodo contained TODO " Operators syn match asm68kOperator "[-+*/]" " Must occur before Comments syn match asm68kOperator "\.SIZEOF\." syn match asm68kOperator "\.STARTOF\." syn match asm68kOperator "<<" " shift left syn match asm68kOperator ">>" " shift right syn match asm68kOperator "&" " bit-wise logical and syn match asm68kOperator "!" " bit-wise logical or syn match asm68kOperator "!!" " exclusive or syn match asm68kOperator "<>" " inequality syn match asm68kOperator "=" " must be before other ops containing '=' syn match asm68kOperator ">=" syn match asm68kOperator "<=" syn match asm68kOperator "==" " operand existence - used in macro definitions " Condition code style operators syn match asm68kOperator "<[CV][CS]>" syn match asm68kOperator "" syn match asm68kOperator "" syn match asm68kOperator "<[HM]I>" syn match asm68kOperator "" syn match asm68kOperator "" syn match asm68kOperator "" " Comments syn match asm68kComment ";.*" contains=asm68kTodo syn match asm68kComment "\s!.*"ms=s+1 contains=asm68kTodo syn match asm68kComment "^\s*[*!].*" contains=asm68kTodo " Include syn match asm68kInclude "\" syn match asm68kCond "\" syn match asm68kCond "\" syn match asm68kCond "\" syn match asm68kRepeat "\" syn match asm68kRepeat "\" syn match asm68kRepeat "\" syn match asm68kRepeat "\" syn match asm68kRepeat "\" " Macro definition syn match asm68kMacro "\" syn match asm68kMacro "\" syn match asm68kMacro "\" syn match asm68kMacroParam "\\[0-9]" " Conditional assembly syn match asm68kPreCond "\" syn match asm68kPreCond "\" syn match asm68kPreCond "\" " Loop control syn match asm68kPreCond "\" " Directives syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\<\(NO\)\=LIST\>" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\<\(NO\)\=PAGE\>" syn match asm68kDirective "\" syn match asm68kDirective "\" syn match asm68kDirective "\