Created
January 13, 2015 16:17
-
-
Save Willem3141/a631a0787004bc0bbc25 to your computer and use it in GitHub Desktop.
Kate syntax highlighting XML file for Z80 assembly (sass/KnightOS style)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<language name="z80 Assembler" section="Assembler" extensions="*.asm;*.z80" casesensitive="0" author="Willem Sonke ([email protected])" license="LGPL"> | |
<general> | |
<comments> | |
<comment name="singleLine" start=";" /> | |
</comments> | |
</general> | |
<highlighting> | |
<contexts> | |
<!-- Normal code (non-comment) --> | |
<context name="Normal" attribute="Normal" lineEndContext="#stay"> | |
<Detect2Chars char=";" char1=";" attribute="Documentation Comment" context="DocComment"/> | |
<DetectChar char=";" attribute="Comment" context="Comment"/> | |
<RegExpr String="\.?\w+:" attribute="Label" context="#stay"/> | |
<RegExpr String="\"[^\n]*\"" attribute="String" context="#stay"/> | |
<RegExpr String="0x[0-9a-fA-F]+" attribute="Constant" context="#stay"/> | |
<RegExpr String="0b[01]+" attribute="Constant" context="#stay"/> | |
<RegExpr String="[-]?[0-9]+" attribute="Constant" context="#stay"/> | |
<HlCChar attribute="Char" context="#stay"/> | |
<RegExpr String="[.#](asciiz|asciip|ascii|block|db|dw|define|echo|else|endif|endmacro|equ|fill|ifdef|ifndef|if|include|list|macro|nolist|org)" attribute="Directive" context="#stay"/> | |
<keyword String="data_instructions" attribute="Data Instruction" context="#stay"/> | |
<keyword String="stack_instructions" attribute="Stack Instruction" context="#stay"/> | |
<keyword String="arithmetic_instructions" attribute="Arithmetic Instruction" context="#stay"/> | |
<keyword String="bit_instructions" attribute="Bit Instruction" context="#stay"/> | |
<keyword String="shift_instructions" attribute="Shift Instruction" context="#stay"/> | |
<keyword String="control_instructions" attribute="Control Instruction" context="#stay"/> | |
<keyword String="hardware_instructions" attribute="Hardware Instruction" context="#stay"/> | |
<keyword String="registers" attribute="Normal" context="#stay"/> | |
<keyword String="flags" attribute="Normal" context="#stay"/> | |
<RegExpr String="[-+]*_" attribute="Label" context="#stay"/> | |
<RegExpr String="\.?\w+" attribute="Label" context="#stay"/> | |
</context> | |
<!-- Comments --> | |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> | |
<RegExpr String="(FIXME|TODO):?" attribute="Alert" context="#stay"/> | |
</context> | |
<context name="DocComment" attribute="Documentation Comment" lineEndContext="#pop"> | |
<RegExpr String="(Inputs|Outputs|Notes):" attribute="Documentation Keyword" context="#stay"/> | |
<RegExpr String="(FIXME|TODO):?" attribute="Alert" context="#stay"/> | |
</context> | |
</contexts> | |
<itemDatas> | |
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="false"/> | |
<itemData name="Data Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Stack Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Arithmetic Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Bit Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Shift Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Control Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Hardware Instruction" defStyleNum="dsKeyword" spellChecking="false"/> | |
<itemData name="Directive" defStyleNum="dsOthers" spellChecking="false"/> | |
<itemData name="Label" defStyleNum="dsRegionMarker" spellChecking="false"/> | |
<itemData name="Constant" defStyleNum="dsDecVal" spellChecking="false"/> | |
<itemData name="Char" defStyleNum="dsChar" spellChecking="true"/> | |
<itemData name="String" defStyleNum="dsString" spellChecking="true"/> | |
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true"/> | |
<itemData name="Documentation Comment" defStyleNum="dsComment" color="#008000" selColor="#FFFFFF" spellChecking="true"/> | |
<itemData name="Documentation Keyword" defStyleNum="dsKeyword" color="#008000" selColor="#FFFFFF" bold="true" spellChecking="true"/> | |
<itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/> | |
</itemDatas> | |
<list name="data_instructions"> | |
<item>ex</item> | |
<item>exx</item> | |
<item>kld</item> <!-- actually a macro --> | |
<item>ld</item> | |
<item>ldd</item> | |
<item>lddr</item> | |
<item>ldi</item> | |
<item>ldir</item> | |
</list> | |
<list name="stack_instructions"> | |
<item>pop</item> | |
<item>push</item> | |
</list> | |
<list name="arithmetic_instructions"> | |
<item>adc</item> | |
<item>add</item> | |
<item>cp</item> | |
<item>cpd</item> | |
<item>cpdr</item> | |
<item>cpi</item> | |
<item>cpir</item> | |
<item>cpl</item> | |
<item>daa</item> | |
<item>dec</item> | |
<item>inc</item> | |
<item>neg</item> | |
<item>sbc</item> | |
<item>sub</item> | |
</list> | |
<list name="bit_instructions"> | |
<item>and</item> | |
<item>bit</item> | |
<item>ccf</item> | |
<item>or</item> | |
<item>res</item> | |
<item>scf</item> | |
<item>set</item> | |
<item>xor</item> | |
</list> | |
<list name="shift_instructions"> | |
<item>rl</item> | |
<item>rla</item> | |
<item>rlc</item> | |
<item>rlca</item> | |
<item>rld</item> | |
<item>rr</item> | |
<item>rra</item> | |
<item>rrc</item> | |
<item>rrca</item> | |
<item>rrd</item> | |
<item>rst</item> | |
<item>sla</item> | |
<item>sra</item> | |
<item>srl</item> | |
</list> | |
<list name="control_instructions"> | |
<item>call</item> | |
<item>corelib</item> <!-- actually a macro --> | |
<item>djnz</item> | |
<item>jp</item> | |
<item>jr</item> | |
<item>kcall</item> <!-- actually a macro --> | |
<item>kjp</item> <!-- actually a macro --> | |
<item>nop</item> | |
<item>pcall</item> <!-- actually a macro --> | |
<item>ret</item> | |
<item>reti</item> | |
<item>retn</item> | |
</list> | |
<list name="hardware_instructions"> | |
<item>di</item> | |
<item>ei</item> | |
<item>halt</item> | |
<item>im</item> | |
<item>in</item> | |
<item>ind</item> | |
<item>indr</item> | |
<item>ini</item> | |
<item>inir</item> | |
<item>otdr</item> | |
<item>otir</item> | |
<item>out</item> | |
<item>outd</item> | |
<item>outi</item> | |
</list> | |
<list name="registers"> | |
<item>a</item> | |
<item>b</item> | |
<item>c</item> | |
<item>d</item> | |
<item>e</item> | |
<item>h</item> | |
<item>l</item> | |
<item>af</item> | |
<item>bc</item> | |
<item>de</item> | |
<item>hl</item> | |
<item>sp</item> | |
<item>ix</item> | |
<item>iy</item> | |
<item>ixh</item> | |
<item>iyh</item> | |
<item>ixl</item> | |
<item>iyl</item> | |
<item>i</item> | |
<item>r</item> | |
</list> | |
<list name="flags"> | |
<item>z</item> | |
<item>nz</item> | |
<item>c</item> | |
<item>nc</item> | |
<item>po</item> | |
<item>pe</item> | |
<item>p</item> | |
<item>m</item> | |
</list> | |
</highlighting> | |
</language> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment