1 <?xml version="1.0"?>
\r
2 <!DOCTYPE MODE SYSTEM "xmode.dtd">
\r
6 redcode syntax highlighting file for jedit
\r
15 <PROPERTY NAME="lineComment" VALUE=";" />
\r
18 <RULES HIGHLIGHT_DIGITS="TRUE" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
\r
20 <EOL_SPAN TYPE="COMMENT2">;redcode</EOL_SPAN>
\r
21 <EOL_SPAN TYPE="COMMENT2">;author</EOL_SPAN>
\r
22 <EOL_SPAN TYPE="COMMENT2">;name</EOL_SPAN>
\r
23 <EOL_SPAN TYPE="COMMENT2">;strategy</EOL_SPAN>
\r
24 <EOL_SPAN TYPE="COMMENT2">;password</EOL_SPAN>
\r
25 <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
\r
27 <SEQ TYPE="KEYWORD3">.AB</SEQ> <!-- Instructions read the A-field of the A-instruction and the B-field of the B-instruction and write to B-fields. -->
\r
28 <SEQ TYPE="KEYWORD3">.BA</SEQ> <!-- Instructions read the B-field of the A-instruction and the A-field of the B-instruction and write to A-fields. -->
\r
29 <SEQ TYPE="KEYWORD3">.A</SEQ> <!--Instructions read and write A-fields. -->
\r
30 <SEQ TYPE="KEYWORD3">.B</SEQ> <!-- Instructions read and write B-fields. -->
\r
31 <SEQ TYPE="KEYWORD3">.F</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields (A to A and B to B). -->
\r
32 <SEQ TYPE="KEYWORD3">.X</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields exchanging fields (A to B and B to A). -->
\r
33 <SEQ TYPE="KEYWORD3">.I</SEQ> <!-- Instructions read and write entire instructions. -->
\r
35 <SEQ TYPE="OPERATOR">,</SEQ>
\r
36 <SEQ TYPE="OPERATOR">:</SEQ>
\r
37 <SEQ TYPE="OPERATOR">(</SEQ>
\r
38 <SEQ TYPE="OPERATOR">)</SEQ>
\r
40 <!-- Arithmetic: -->
\r
41 <SEQ TYPE="OPERATOR">+</SEQ> <!-- addition or unary plus -->
\r
42 <SEQ TYPE="OPERATOR">-</SEQ> <!-- subtraction or unary minus -->
\r
43 <SEQ TYPE="OPERATOR">/</SEQ> <!-- division -->
\r
44 <SEQ TYPE="OPERATOR">%</SEQ> <!-- modulo (remainder of division) -->
\r
46 <!-- Comparison (*): -->
\r
47 <SEQ TYPE="OPERATOR">==</SEQ> <!-- equality -->
\r
48 <SEQ TYPE="OPERATOR">!=</SEQ> <!-- inequality -->
\r
49 <SEQ TYPE="OPERATOR"><=</SEQ> <!-- less than or equal -->
\r
50 <SEQ TYPE="OPERATOR">>=</SEQ> <!-- greater than or equal -->
\r
51 <SEQ TYPE="OPERATOR"><</SEQ> <!-- less than -->
\r
52 <SEQ TYPE="OPERATOR">></SEQ> <!-- greater than -->
\r
54 <!-- Logical (*): -->
\r
55 <SEQ TYPE="OPERATOR">&&</SEQ> <!-- and -->
\r
56 <SEQ TYPE="OPERATOR">||</SEQ> <!-- or -->
\r
57 <SEQ TYPE="OPERATOR">!</SEQ> <!-- unary negation -->
\r
59 <!-- Assignment (*): -->
\r
60 <SEQ TYPE="OPERATOR">=</SEQ> <!-- (to register variables a..z) -->
\r
63 <SEQ TYPE="LITERAL1">$</SEQ>
\r
64 <SEQ TYPE="LITERAL1">@</SEQ>
\r
65 <SEQ TYPE="LITERAL1">#</SEQ>
\r
66 <SEQ TYPE="LITERAL1">*</SEQ>
\r
67 <SEQ TYPE="LITERAL1">{</SEQ>
\r
68 <SEQ TYPE="LITERAL1">}</SEQ>
\r
72 <LITERAL2>CORESIZE</LITERAL2> <!-- value of -s parameter (default: 8000) -->
\r
73 <LITERAL2>MAXPROCESSES</LITERAL2> <!-- value of -p parameter (default: 8000) -->
\r
74 <LITERAL2>MAXCYCLES</LITERAL2> <!-- value of -c parameter (default: 80000) -->
\r
75 <LITERAL2>MAXLENGTH</LITERAL2> <!-- value of -l parameter (default: 100) -->
\r
76 <LITERAL2>MINDISTANCE</LITERAL2> <!-- value of -d parameter (default: 100) -->
\r
77 <LITERAL2>ROUNDS</LITERAL2> <!-- (+) value of -r parameter (default: 1) -->
\r
78 <LITERAL2>PSPACESIZE</LITERAL2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
\r
79 <LITERAL2>CURLINE</LITERAL2> <!-- current line in generated assembly (starts with 0) -->
\r
80 <LITERAL2>VERSION</LITERAL2> <!-- pMARS version ("60" is v0.6.0) -->
\r
81 <LITERAL2>WARRIORS</LITERAL2> <!-- number of warriors specified on command line -->
\r
83 <KEYWORD1>DAT</KEYWORD1> <!-- terminate process -->
\r
84 <KEYWORD1>MOV</KEYWORD1> <!-- move from A to B -->
\r
85 <KEYWORD1>ADD</KEYWORD1> <!-- add A to B, store result in B -->
\r
86 <KEYWORD1>SUB</KEYWORD1> <!-- subtract A from B, store result in B -->
\r
87 <KEYWORD1>MUL</KEYWORD1> <!-- multiply A by B, store result in B -->
\r
88 <KEYWORD1>DIV</KEYWORD1> <!-- divide B by A, store result in B if A <> 0, else terminate -->
\r
89 <KEYWORD1>MOD</KEYWORD1> <!-- divide B by A, store remainder in B if A <> 0, else terminate -->
\r
90 <KEYWORD1>JMP</KEYWORD1> <!-- transfer execution to A -->
\r
91 <KEYWORD1>JMZ</KEYWORD1> <!-- transfer execution to A if B is zero -->
\r
92 <KEYWORD1>JMN</KEYWORD1> <!-- transfer execution to A if B is non-zero -->
\r
93 <KEYWORD1>DJN</KEYWORD1> <!-- decrement B, if B is non-zero, transfer execution to A -->
\r
94 <KEYWORD1>SPL</KEYWORD1> <!-- split off process to A -->
\r
95 <KEYWORD1>SLT</KEYWORD1> <!-- skip next instruction if A is less than B -->
\r
96 <KEYWORD1>CMP</KEYWORD1> <!-- same as SEQ -->
\r
97 <KEYWORD1>SEQ</KEYWORD1> <!-- (*) Skip next instruction if A is equal to B -->
\r
98 <KEYWORD1>SNE</KEYWORD1> <!-- (*) Skip next instruction if A is not equal to B -->
\r
99 <KEYWORD1>NOP</KEYWORD1> <!-- (*) No operation -->
\r
100 <KEYWORD1>LDP</KEYWORD1> <!-- (+) Load P-space cell A into core address B -->
\r
101 <KEYWORD1>STP</KEYWORD1> <!-- (+) Store A-number into P-space cell B -->
\r
103 <KEYWORD2>EQU</KEYWORD2>
\r
104 <KEYWORD2>ORG</KEYWORD2>
\r
105 <KEYWORD2>FOR</KEYWORD2>
\r
106 <KEYWORD2>ROF</KEYWORD2>
\r
107 <KEYWORD2>END</KEYWORD2>
\r
108 <KEYWORD2>PIN</KEYWORD2>
\r
109 <KEYWORD2>CORESIZE</KEYWORD2> <!-- value of -s parameter (default: 8000) -->
\r
110 <KEYWORD2>MAXPROCESSES</KEYWORD2> <!-- value of -p parameter (default: 8000) -->
\r
111 <KEYWORD2>MAXCYCLES</KEYWORD2> <!-- value of -c parameter (default: 80000) -->
\r
112 <KEYWORD2>MAXLENGTH</KEYWORD2> <!-- value of -l parameter (default: 100) -->
\r
113 <KEYWORD2>MINDISTANCE</KEYWORD2> <!-- value of -d parameter (default: 100) -->
\r
114 <KEYWORD2>ROUNDS</KEYWORD2> <!-- (+) value of -r parameter (default: 1) -->
\r
115 <KEYWORD2>PSPACESIZE</KEYWORD2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
\r
116 <KEYWORD2>CURLINE</KEYWORD2> <!-- current line in generated assembly (starts with 0) -->
\r
117 <KEYWORD2>VERSION</KEYWORD2> <!-- pMARS version ("60" is v0.6.0) -->
\r
118 <KEYWORD2>WARRIORS</KEYWORD2> <!-- number of warriors specified on command line -->
\r