<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<!-- Apollo Guidance Computer (AGC) Assembly mode by Jim Lawton (jim DOT lawton AT gmail DOT com). -->

<MODE>

	<PROPS>
		<PROPERTY NAME="lineComment" VALUE="#" />
	</PROPS>

	<RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
		<EOL_SPAN TYPE="COMMENT2">##</EOL_SPAN>
		<EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>

		<MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
			AT_LINE_START="TRUE">&#09;</MARK_PREVIOUS>

		<!-- Binary Operators -->
		<SEQ TYPE="OPERATOR">+</SEQ>
		<SEQ TYPE="OPERATOR">-</SEQ>

		<KEYWORDS>
			<!-- Directives -->
			<FUNCTION>ORG</FUNCTION> 
			<FUNCTION>BSS</FUNCTION> 
			<FUNCTION>BES</FUNCTION> 
			<FUNCTION>SYN</FUNCTION> 
			<FUNCTION>EQU</FUNCTION> 
			<FUNCTION>DEFINE</FUNCTION> 
			<FUNCTION>DEC</FUNCTION> 
			<FUNCTION>OCT</FUNCTION> 
			<FUNCTION>END</FUNCTION>

			<!-- Registers -->
			<KEYWORD3>A</KEYWORD3>
			<KEYWORD3>Q</KEYWORD3>
			<KEYWORD3>INDEX</KEYWORD3>

			<!-- Opcodes -->
			<KEYWORD1>ABS</KEYWORD1>
			<KEYWORD1>ADD</KEYWORD1> 
			<KEYWORD1>ADZ</KEYWORD1> 
			<KEYWORD1>ALS</KEYWORD1> 
			<KEYWORD1>AXT</KEYWORD1> 
			<KEYWORD1>CLA</KEYWORD1> 
			<KEYWORD1>CLZ</KEYWORD1> 
			<KEYWORD1>COM</KEYWORD1> 
			<KEYWORD1>DLY</KEYWORD1> 
			<KEYWORD1>DVP</KEYWORD1> 
			<KEYWORD1>INP</KEYWORD1> 
			<KEYWORD1>LDQ</KEYWORD1> 
			<KEYWORD1>LLS</KEYWORD1> 
			<KEYWORD1>LRS</KEYWORD1> 
			<KEYWORD1>MPR</KEYWORD1> 
			<KEYWORD1>MPY</KEYWORD1> 
			<KEYWORD1>MPZ</KEYWORD1> 
			<KEYWORD1>OUT</KEYWORD1>
			<KEYWORD1>STO</KEYWORD1> 
			<KEYWORD1>STQ</KEYWORD1> 
			<KEYWORD1>SUB</KEYWORD1> 
			<KEYWORD1>SUZ</KEYWORD1> 
			<KEYWORD1>TIX</KEYWORD1> 
			<KEYWORD1>TMI</KEYWORD1> 
			<KEYWORD1>TOV</KEYWORD1> 
			<KEYWORD1>TRA</KEYWORD1> 
			<KEYWORD1>TSQ</KEYWORD1> 

		</KEYWORDS>
	</RULES>
</MODE>
