<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--

Syntax highlighting for Intel 8051 Assembler
derived from GNU Assembler highlighting

Version 0.1a
Matthias Arndt <marndt@asmsoftware.de>

Original file by:
Updated:  Roland Pabel <roland@pabel.name>
Date:     15th August, 2002
Version:  1.01

This file contains the XML syntax highlighting description for Intel 8051
Assembler, for KATE, the KDE Advanced Editor.  Keywords have been taken
from the manual of the as31 assembler.

This program, including associated files, is free software.  You may
distribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either Version 2 of
the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-->

<language name="Intel 8051 Assembler" version="0.1a" kateversion="2.1" section="Sources" extensions="*.a51;*.A51" mimetype="text/as31-src">
  <highlighting>
    <list name="keywords">
      <!-- highlighting for Pseudo-opcodes -->
      <item>.abort</item>
      <item>.byte</item>
      <item>.end</item>
      <item>.equ</item>
      <item>.org</item>
      <item>.word</item>
      <item>.flag</item>
      <item>.skip</item>
      
      <!-- highlighting for mnemonics -->
      <item>mov</item>
      <item>movc</item>
      <item>movx</item>
      <item>push</item>
      <item>pop</item>
      <item>xchd</item>
      <item>xch</item>
      <item>add</item>
      <item>addc</item>
      <item>subb</item>
      <item>da</item>
      <item>inc</item>
      <item>dec</item>
      <item>mul</item>
      <item>div</item>
      <item>anl</item>
      <item>orl</item>
      <item>xrl</item>
      <item>anl</item>
      <item>orl</item>
      <item>clr</item>
      <item>cpl</item>
      <item>setb</item>
      <item>rr</item>
      <item>rl</item>
      <item>rrc</item>
      <item>rlc</item>
      <item>swap</item>
      <item>ljmp</item>
      <item>ajmp</item>
      <item>sjmp</item>
      <item>jmp</item>
      <item>jz</item>
      <item>jnz</item>
      <item>jc</item>
      <item>jnc</item>
      <item>cjne</item>
      <item>djnz</item>
      <item>lcall</item>
      <item>acall</item>
      <item>ret</item>
      <item>reti</item>
      <item>nop</item>
    </list>

    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
        <RegExpr      attribute="Label" context="#stay" String="^\s*[A-Za-z0-9_.$]+:" />
	<keyword      attribute="Keyword" context="#stay" String="keywords"/>
	<HlCOct       attribute="Octal" context="#stay" />
        <HlCHex       attribute="Hex" context="#stay" />
        <RegExpr      attribute="Binary" context="#stay" String="0[bB][01]+" />
        <Int          attribute="Decimal" context="#stay" />
        <RegExpr      attribute="Float" context="#stay" String="0[fFeEdD][-+]?[0-9]*\.?[0-9]*[eE]?[-+]?[0-9]+" />
        <RegExpr      attribute="Normal Text" context="#stay" String="[A-Za-z_.$][A-Za-z0-9_.$]*" />
        <RegExpr      attribute="Char" context="#stay" String="'(\\x[0-9a-fA-F][0-9a-fA-F]?|\\[0-7]?[0-7]?[0-7]?|\\.|.)" />
        <DetectChar   attribute="String" context="String" char="&quot;" />
        <DetectChar   attribute="Comment" context="Commentar 2" char=";" />
        <AnyChar      attribute="Symbol" context="#stay" String="!#%&amp;*()+,-&lt;=&gt;?/:[]^{|}~" />
        <RegExpr      attribute="Preprocessor" context="Preprocessor" String="^#" />
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Commentar 1">
        <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="Commentar 2" />
      <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor" />
      <context attribute="String" lineEndContext="#pop" name="String">
        <LineContinue  attribute="String" context="Some Context" />
        <HlCStringChar attribute="String Char" context="#stay" />
        <DetectChar    attribute="String" context="#pop" char="&quot;" />
      </context>
      <context attribute="Normal Text" lineEndContext="#pop" name="Some Context" />
    </contexts>

    <itemDatas>
      <itemData name="Normal Text"  defStyleNum="dsNormal"   />
      <itemData name="Label"        defStyleNum="dsOthers"   />
      <itemData name="Keyword"      defStyleNum="dsKeyword"  />
      <itemData name="Decimal"      defStyleNum="dsDecVal"   />
      <itemData name="Octal"        defStyleNum="dsBaseN"    />
      <itemData name="Hex"          defStyleNum="dsBaseN"    />
      <itemData name="Binary"       defStyleNum="dsBaseN"    />
      <itemData name="Float"        defStyleNum="dsFloat"    />
      <itemData name="Char"         defStyleNum="dsChar"     />
      <itemData name="String"       defStyleNum="dsString"   />
      <itemData name="SFR"	    defStyleNum="dsString"   />
      <itemData name="String Char"  defStyleNum="dsChar"     />
      <itemData name="Symbol"       defStyleNum="dsNormal"   />
      <itemData name="Comment"      defStyleNum="dsComment"  />
      <itemData name="Preprocessor" defStyleNum="dsOthers"   />
    </itemDatas>
  </highlighting>

  <general>
    <comments>
      <comment name="singleLine" start=";" />
    </comments>
    <keywords casesensitive="1" weakDeliminator="_.$" />
  </general>
</language>
