gedit Syntax-Highlighting für ACME (aktualisiert) ....
Suche
Index
FAQ
Kontakt
Zurück
/usr/share/gtksourceview-3.0/language-specs/6510.lang

<?xml version="1.0" encoding="UTF-8"?>
<!--
6510.lang

2013 by Spider Jerusalem

gedit syntax highlighting definition file for 
* ACME
* 64tass
including ILLEGAL OPCODES

copy to
~/.local/share/gtksourceview-3.0/language-specs/		(one user)
/usr/share/gtksourceview-3.0/language-specs/				(all users)

based on k2src.lang, 6502.lang

highlight rules:
================
comments:				single comment starting with ;
								docstyle comment starting with ;;
								
strings:				starting with " ending with " or EOL

lib-includes:   starting with < ending with >

6510 OPCODES:   taken from the AAY64 list:
								http://unusedino.de/ec64/technical/aay/c64/bmain.htm
								
6510 ILLEGALS:	taken from Illegals.txt (in ACME docs folder)

PSEUDO OPs:			acme: from AllPOs.txt (in ACME docs folder)
(directives)		64tass: from README
								!!! 65816 PSEUDO OPs/DIRECTIVES NOT INCLUDED !!!
								PC will be highlighted when used *= without space in between
								
constant char:  starting with ' ending with ' or EOL

numbers:				decimals starting with #
								hex values starting with $
								binary values starting with %
								
macros:					starting with + with only space/tabs from linestart

labels:					global labels ending with :
								local labels starting with .
								anonymous labels + or - at linestart


[old header - from 6502.lang :]

Syntax File for Highlighting, for gedit

Just copy it into e.g. /usr/share/gtksourceview-2.0/language-specs

Is especially suited for k2asm (e.g. dnc,python,ifdef) but should
be ok for any sane 6502 assembler.

[/] 2008 by Zed Yago/K2
Partly based on c.lang

[/] 2009 modified by cbmhardware/pol for ACME

[/] 2011 modified by spider-jerusalem/SOA
added complete C64 and ACME specific pseudo opcodes

-->
<language id="6510" _name="6510" version="2.0" _section="Sources">
  <metadata>
    <property name="mimetypes">text/plain</property>
    <property name="globs">*.asm;*.inc;*.a;*.s;</property>
    <property name="line-comment-start">;</property>
  </metadata>

  <styles>
    <style id="comment" _name="Comment" map-to="def:comment"/>
    <style id="doc" _name="Documentation" map-to="def:doc-comment-element"/>
    <style id="function" _name="Function" map-to="def:function"/>
    <style id="string" _name="String" map-to="def:string"/>
    <style id="lib-include" _name="Lib Include" map-to="def:string"/>
    <style id="keyword" _name="Keyword" map-to="def:keyword"/>
    <style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
    <style id="decimal" _name="Decimal" map-to="def:decimal"/>
    <style id="pseudo-ops" _name="Pseudo Opcodes" map-to="def:type"/>
    <style id="pseudo-ops-64tass" _name="Pseudo Opcodes 64tass" map-to="def:type"/>
    <style id="data-type" _name="Data Type" map-to="def:type"/>
    <style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
  </styles>

  <definitions>

    <context id="line-comment-docstyle" style-ref="doc" end-at-line-end="true">
      <start>;;</start>
      <include>
        <context ref="def:escape"/>
        <context ref="def:line-continue"/>
      </include>
    </context>

    <context id="line-comment" style-ref="comment" end-at-line-end="true">
      <start>;</start>
      <include>
        <context ref="def:escape"/>
        <context ref="def:line-continue"/>
      </include>
    </context>


    <context id="ifzero-comment" style-ref="comment">
      <start>^[ t]*#[ t]*if[ t]*0</start>
      <end>[ t]*#[ t]*(endif|else)</end>
      <include>
        <context ref="def:escape"/>
        <context ref="def:line-continue"/>
      </include>
    </context>
   
    <context id="string" style-ref="string" end-at-line-end="true">
      <start>"</start>
      <end>"</end>
      <include>
        <context ref="def:escape"/>
        <context ref="def:line-continue"/>
      </include>
    </context>

    <context id="lib-include" style-ref="lib-include">
      <match>[<][_./a-zA-Z0-9]+[>]</match>
    </context>

    <context id="keywords" style-ref="keyword">
      <keyword>adc</keyword>
      <keyword>and</keyword>
      <keyword>asl</keyword>
      
      <keyword>bcc</keyword>
      <keyword>bcs</keyword>
      <keyword>beq</keyword>
      <keyword>bit</keyword>
      <keyword>bmi</keyword>
      <keyword>bne</keyword>
      <keyword>bpl</keyword>
      <keyword>brk</keyword>
      <keyword>bvc</keyword>
      <keyword>bvs</keyword>
      
      <keyword>clc</keyword>
      <keyword>cld</keyword>
      <keyword>cli</keyword>
      <keyword>clv</keyword>
      <keyword>cmp</keyword>
      <keyword>cpx</keyword>
      <keyword>cpy</keyword>
      
      <keyword>dec</keyword>
      <keyword>dex</keyword>
      <keyword>dey</keyword>
      
      <keyword>eor</keyword>
      
      <keyword>inc</keyword>
      <keyword>inx</keyword>
      <keyword>iny</keyword>
      
      <keyword>jmp</keyword>
      <keyword>jsr</keyword>
      
      <keyword>lda</keyword>
      <keyword>ldx</keyword>
      <keyword>ldy</keyword>
      <keyword>lsr</keyword>
      
      <keyword>nop</keyword>
      
      <keyword>ora</keyword>
      
      <keyword>pha</keyword>
      <keyword>php</keyword>
      <keyword>pla</keyword>
      <keyword>plp</keyword>
      
      <keyword>rol</keyword>
      <keyword>ror</keyword>
      <keyword>rti</keyword>
      <keyword>rts</keyword>
      
      <keyword>sbc</keyword>
      <keyword>sec</keyword>
      <keyword>sed</keyword>
      <keyword>sei</keyword>
      <keyword>sta</keyword>
      <keyword>stx</keyword>
      <keyword>sty</keyword>
      
      <keyword>tax</keyword>
      <keyword>tay</keyword>
      <keyword>tsx</keyword>
      <keyword>txa</keyword>
      <keyword>txs</keyword>
      <keyword>tya</keyword>
      
      <!-- ILLEGAL OPCODES -->
      <keyword>anc</keyword>
      <keyword>arr</keyword>
      <keyword>asr</keyword>
      
      <keyword>dcp</keyword>
      <keyword>dop</keyword>
      
      <keyword>isc</keyword>
      
      <keyword>jam</keyword>
      
      <keyword>lax</keyword>
      
      <keyword>rra</keyword>
      
      <keyword>sax</keyword>
      <keyword>sbx</keyword>
      <keyword>slo</keyword>
      <keyword>sre</keyword>
      
      <keyword>top</keyword>
    </context>
    <context id="pseudo-ops" style-ref="pseudo-ops">
      <prefix>!</prefix>
      <suffix></suffix>
      <keyword>08</keyword>
      <keyword>8</keyword>
      <keyword>16</keyword>
      <keyword>24</keyword>
      <keyword>32</keyword>
      
      <keyword>align</keyword>
      
      <keyword>binary</keyword>
      <keyword>bin</keyword>
      <keyword>byte</keyword>
      <keyword>by</keyword>
      
      <keyword>cbm</keyword>
      <keyword>convtab</keyword>
      <keyword>cpu</keyword>
      <keyword>ct</keyword>
      
      <keyword>do</keyword>
      
      <keyword>endoffile</keyword>
      <keyword>eof</keyword>
      <keyword>error</keyword>
      
      <keyword>fill</keyword>
      <keyword>fi</keyword>
      <keyword>for</keyword>
      
      <keyword>ifndef</keyword>
      <keyword>ifdef</keyword>
      <keyword>if</keyword>
      <keyword>initmem</keyword>
      
      <keyword>macro</keyword>
            
      <keyword>pet</keyword>
      <keyword>pseudopc</keyword>
            
      <keyword>raw</keyword>
      <keyword>realpc</keyword>

      <keyword>scrxor</keyword>
      <keyword>scr</keyword>
      <keyword>serious</keyword>
      <keyword>set</keyword>
      <keyword>sl</keyword>
      <keyword>source</keyword>
      <keyword>src</keyword>
      <keyword>subzone</keyword>
      <keyword>sz</keyword>
      
      <keyword>text</keyword>
      <keyword>to</keyword>
      <keyword>tx</keyword>
      <keyword>text</keyword>
      
      <keyword>org</keyword>
      
      <keyword>warn</keyword>
      <keyword>word</keyword>
      <keyword>wo</keyword>
      
      <keyword>zn</keyword>
      <keyword>zone</keyword>
    </context>

		<context id="pseudo-ops-64tass" style-ref="pseudo-ops-64tass">
      <prefix>.</prefix>
      <suffix></suffix>
      <keyword>align</keyword>
      
      <keyword>bend</keyword>
      <keyword>binary</keyword>
      <keyword>block</keyword>
      <keyword>byte</keyword>
      
      <keyword>cdef</keyword>
      <keyword>cerror</keyword>
      <keyword>char</keyword>
      <keyword>comment</keyword>
      <keyword>cpu</keyword>
      <keyword>cwarn</keyword>
      
      <keyword>dint</keyword>
      <keyword>dsection</keyword>
      <keyword>dstruct</keyword>
      <keyword>dunion</keyword>
      <keyword>dword</keyword>
      
      <keyword>edef</keyword>
      <keyword>else</keyword>
      <keyword>elsif</keyword>
      <keyword>enc</keyword>
      <keyword>endc</keyword>
      <keyword>endif</keyword>
      <keyword>endm</keyword>
      <keyword>endp</keyword>
      <keyword>ends</keyword>
      <keyword>endu</keyword>
      <keyword>end</keyword>
      <keyword>error</keyword>
      <keyword>eor</keyword>
      
      <keyword>fill</keyword>
      <keyword>fi</keyword>
      <keyword>for</keyword>
      
      <keyword>goto</keyword>
      
      <keyword>here</keyword>
      
      <keyword>ifeq</keyword>
      <keyword>ifmi</keyword>
      <keyword>ifne</keyword>
      <keyword>ifpl</keyword>
      <keyword>if</keyword>
      <keyword>include</keyword>
      <keyword>int</keyword>
      
      <keyword>lbl</keyword>
      <keyword>logical</keyword>
      <keyword>long</keyword>
      
      <keyword>macro</keyword>
      
      <keyword>next</keyword>
      <keyword>null</keyword>
      
      <keyword>offs</keyword>
      <keyword>option</keyword>
      
      <keyword>page</keyword>
      <keyword>pend</keyword>
      <keyword>proc</keyword>
      <keyword>pron</keyword>
      <keyword>proff</keyword>
      <keyword>ptext</keyword>
      
      <keyword>rept</keyword>
      <keyword>rta</keyword>
      
      <keyword>section</keyword>
      <keyword>send</keyword>
      <keyword>segment</keyword>
      <keyword>shiftl</keyword>
      <keyword>shift</keyword>
      <keyword>struct</keyword>
      
      <keyword>text</keyword>
      
      <keyword>union</keyword>
      
      <keyword>var</keyword>
      
      <keyword>warn</keyword>
      <keyword>word</keyword>
    </context>

    <context id="mem" style-ref="data-type">
      <prefix>*</prefix>
      <suffix></suffix>
      <keyword>=</keyword>
    </context>

		<context id="else" style-ref="data-type">
      <prefix></prefix>
      <suffix></suffix>
      <keyword>else</keyword>
      <keyword>until</keyword>
      <keyword>while</keyword>
    </context>

    <context id="character-constant" style-ref="string" end-at-line-end="true">
      <start>'</start>
      <end>'</end>
      <include>
        <context ref="def:escape"/>
        <context ref="def:line-continue"/>
      </include>
    </context>
    <context id="decimal" style-ref="decimal">
      <match>#[0-9?]+</match>
    </context>
    <context id="binary-number" style-ref="base-n-integer">
      <match>%[01?#.]+</match>
    </context>
    <context id="hex-number" style-ref="base-n-integer">
      <match>$[0-9a-fA-F?]+</match>
    </context>
    <context id="macros" style-ref="preprocessor">
      <match>^[s]*[+][_a-zA-Z0-9]+</match>
    </context>

    <context id="label" style-ref="function">
     <match>[ t]*[_a-zA-Z][_a-zA-Z0-9]+:</match>
    </context>
    
    <context id="local-label" style-ref="function">
     <match>^[.][_a-zA-Z0-9]+</match>
    </context>
    
    <context id="anon-label-plus" style-ref="function">
    	<match>^[+]+</match>
   	</context>
   	
   	<context id="anon-label-minus" style-ref="function">
   		<match>^[-]+</match>
   	</context>
    
    <context id="6510">
      <include>
        <context ref="line-comment-docstyle"/>
        <context ref="line-comment"/>
        <context ref="ifzero-comment"/>
        <context ref="lib-include"/>
        <context ref="string"/>
        <context ref="keywords"/>
        <context ref="pseudo-ops"/>
        <context ref="pseudo-ops-64tass"/>
        <context ref="mem"/>
        <context ref="else"/>
        <context ref="character-constant"/>
        <context ref="decimal"/>
        <context ref="binary-number"/>
        <context ref="hex-number"/>
        <context ref="macros"/>
				<context ref="label"/>
				<context ref="local-label"/>
				<context ref="anon-label-plus" />
				<context ref="anon-label-minus" />
      </include>
    </context>
  </definitions>
</language>

 

Letzte Änderung: 2019-01-04 10:04:21
  Rubrik:  CBM PET
Rubriken-Übersicht
 8 Besucher online 

Valid XHTML 1.0 Transitional Valid CSS!