Finalised day 7
[ou-summer-of-code-2017.git] / 07-interpreter / instructions.html
diff --git a/07-interpreter/instructions.html b/07-interpreter/instructions.html
new file mode 100644 (file)
index 0000000..5abe593
--- /dev/null
@@ -0,0 +1,46 @@
+<table style="width:39%;">
+<colgroup>
+<col width="19%" />
+<col width="19%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th align="left">Instruction</th>
+<th align="left">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td align="left"><code>inc r</code></td>
+<td align="left">increment contents of register <code>r</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>dec r</code></td>
+<td align="left">decrement contents of register <code>r</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>set r i</code></td>
+<td align="left">set contents of register <code>r</code> to literal value <code>i</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>cpy r s</code></td>
+<td align="left">set contents of register <code>r</code> into register <code>s</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>sto r m</code></td>
+<td align="left">store contents of register <code>r</code> into memory location <code>m</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>ld r m</code></td>
+<td align="left">load contents of memory location <code>m</code> into register <code>r</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>jmp i</code></td>
+<td align="left">jump to instruction <code>i</code> places forward</td>
+</tr>
+<tr class="even">
+<td align="left"><code>jpz r i</code></td>
+<td align="left">jump to instruction <code>i</code> places forward if<br>register <code>r</code> contains zero, otherwise continue to next instruction</td>
+</tr>
+</tbody>
+</table>