Skip to content

Commit

Permalink
Tabulated instruction set
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Wood committed Apr 26, 2011
1 parent 7227895 commit 90669a7
Showing 1 changed file with 72 additions and 37 deletions.
109 changes: 72 additions & 37 deletions docs/instructions.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,73 @@
Proposed instruction set
==============================
RFC - Proposed instruction set
=============================

====== ======== ===========
Opcode Mnemonic Description
====== ======== ===========
0x PFIX PREFIX
1x LDAV LOADBVAR
2x LDBV LOADBVAR
3x LDAI LOADALIT
4x LDBI LOADBLIT
5x STAV STOREAVAR
6x LDAIN LOADAIND
7x STBIN STOREBIND
8x JMP JUMP
9x JMPN JUMPFALSE
Ax EQU EQUALALIT
Bx ADDI ADDALIT
Cx ADJ ADJUST
Dx CALL CALL
Ex OPR OPERATE
----- --------- ----------
x0 BOOT BOOT
x1 IN INPUT
x2 OUT OUTPUT
x3 ALT ALTERNATIVE
x4 GT GREATER
x5 SHL SHIFTLEFT
x6 SHR SHIFTRIGHT
x7 OR ORBITS
x8 XOR XORBITS
x9 AND ANDBITS
xA ADD ADD
xB SUB SUBTRACT
xC MUL MULTIPLY
xD DIV DIVIDE
xE REM REMAINDER
xF REV REVERSE
====== ======== ===========
+-------+----------+------------+
|Opcode | Mnemonic | Description|
+=======+==========+============+
| 0x | PFIX | PREFIX |
+-------+----------+------------+
| 1x | LDAV | LOADBVAR |
+-------+----------+------------+
| 2x | LDBV | LOADBVAR |
+-------+----------+------------+
| 3x | LDAI | LOADALIT |
+-------+----------+------------+
| 4x | LDBI | LOADBLIT |
+-------+----------+------------+
| 5x | STAV | STOREAVAR |
+-------+----------+------------+
| 6x | LDAIN | LOADAIND |
+-------+----------+------------+
| 7x | STBIN | STOREBIND |
+-------+----------+------------+
| 8x | JMP | JUMP |
+-------+----------+------------+
| 9x | JMPN | JUMPFALSE |
+-------+----------+------------+
| Ax | EQU | EQUALALIT |
+-------+----------+------------+
| Bx | ADDI | ADDALIT |
+-------+----------+------------+
| Cx | ADJ | ADJUST |
+-------+----------+------------+
| Dx | CALL | CALL |
+-------+----------+------------+
| Ex | OPR | OPERATE |
+-------+----------+------------+
| | | |
+-------+----------+------------+
| x0 | BOOT | BOOT |
+-------+----------+------------+
| x1 | IN | INPUT |
+-------+----------+------------+
| x2 | OUT | OUTPUT |
+-------+----------+------------+
| x3 | ALT | ALTERNATIVE|
+-------+----------+------------+
| x4 | GT | GREATER |
+-------+----------+------------+
| x5 | SHL | SHIFTLEFT |
+-------+----------+------------+
| x6 | SHR | SHIFTRIGHT |
+-------+----------+------------+
| x7 | OR | ORBITS |
+-------+----------+------------+
| x8 | XOR | XORBITS |
+-------+----------+------------+
| x9 | AND | ANDBITS |
+-------+----------+------------+
| xA | ADD | ADD |
+-------+----------+------------+
| xB | SUB | SUBTRACT |
+-------+----------+------------+
| xC | MUL | MULTIPLY |
+-------+----------+------------+
| xD | DIV | DIVIDE |
+-------+----------+------------+
| xE | REM | REMAINDER |
+-------+----------+------------+
| xF | REV | REVERSE |
+-------+----------+------------+

*Subject to change

0 comments on commit 90669a7

Please sign in to comment.