Formatting README
This commit is contained in:
parent
9d02af574f
commit
74ea060849
57
README.org
57
README.org
|
|
@ -16,8 +16,11 @@ Additionally, it contains a single input and a single output, which together are
|
|||
The instructions can be split into 4 categories, which can be distinguished by the most significant two bits.
|
||||
|
||||
🔴🔴🟤🟤🟤🟤🟤🟤 Immidiate instructions.
|
||||
|
||||
🔴🟢🟤🟤🟤🟤🟤🟤 Calculate instructions.
|
||||
|
||||
🟢🔴🟤🟤🟤🟤🟤🟤 Copy instructions.
|
||||
|
||||
🟢🟢🟤🟤🟤🟤🟤🟤 Condition instructions.
|
||||
|
||||
* Immediate 🔴🔴🟤🟤🟤🟤🟤🟤
|
||||
|
|
@ -30,42 +33,64 @@ Generally, these instructions are represented directly by using the value (a num
|
|||
This set of instructions use the 3 least significant bits to indicate which instruction to preform on the contents of Register 1 and Register 2
|
||||
|
||||
🔴🟢🟤🟤🟤🔴🔴🔴 OR
|
||||
|
||||
🔴🟢🟤🟤🟤🔴🔴🟢 NAND
|
||||
|
||||
🔴🟢🟤🟤🟤🔴🟢🔴 NOR
|
||||
|
||||
🔴🟢🟤🟤🟤🔴🟢🟢 AND
|
||||
|
||||
🔴🟢🟤🟤🟤🟢🔴🔴 ADD
|
||||
|
||||
🔴🟢🟤🟤🟤🟢🔴🟢 SUB
|
||||
|
||||
|
||||
|
||||
OR 🔴🟢🟤🟤🟤🔴🔴🔴
|
||||
|
||||
A bitwise OR of the values stored in Register 1 and register 2, with the result being placed in Register 3
|
||||
|
||||
|
||||
NAND 🔴🟢🟤🟤🟤🔴🔴🟢
|
||||
|
||||
A bitwise NAND of the values stored in Register 1 and register 2, with the result being placed in Register 3
|
||||
|
||||
|
||||
NOR 🔴🟢🟤🟤🟤🔴🟢🔴
|
||||
|
||||
A bitwise NOR of the values stored in Register 1 and register 2, with the result being placed in Register 3
|
||||
|
||||
|
||||
AND 🔴🟢🟤🟤🟤🔴🟢🟢
|
||||
|
||||
A bitwise AND of the values stored in Register 1 and register 2, with the result being placed in Register 3
|
||||
|
||||
|
||||
ADD 🔴🟢🟤🟤🟤🟢🔴🔴
|
||||
|
||||
Mathematically adds the the values stored in Register 1 and register 2 together, (without support for a carry), with the result being placed in Register 3
|
||||
|
||||
|
||||
SUB 🔴🟢🟤🟤🟤🟢🔴🟢
|
||||
|
||||
Subtracts the the values stored in Register 2 from the value stored in register 1 using 2-complements logic, with the result being placed in Register 3
|
||||
|
||||
Assembly Mnemonics
|
||||
** Assembly Mnemonics
|
||||
The assembly mnemonics for these commands are simply these commands written on their own.
|
||||
|
||||
#+BEGIN_SRC
|
||||
or
|
||||
|
||||
nand
|
||||
|
||||
nor
|
||||
|
||||
and
|
||||
|
||||
add
|
||||
|
||||
sub
|
||||
|
||||
#+BEGIN_SRC
|
||||
const or 64
|
||||
const nand 65
|
||||
const nor 66
|
||||
|
|
@ -80,26 +105,39 @@ These instructions allow you to represent a copy action between a source locatio
|
|||
There are 7 possible sources to read from:
|
||||
|
||||
🟢🔴🔴🔴🔴🟤🟤🟤 Register 0
|
||||
|
||||
🟢🔴🔴🔴🟢🟤🟤🟤 Register 1
|
||||
|
||||
🟢🔴🔴🟢🔴🟤🟤🟤 Register 2
|
||||
|
||||
🟢🔴🔴🟢🟢🟤🟤🟤 Register 3
|
||||
|
||||
🟢🔴🟢🔴🔴🟤🟤🟤 Register 4
|
||||
|
||||
🟢🔴🟢🔴🟢🟤🟤🟤 Register 5
|
||||
|
||||
🟢🔴🟢🟢🔴🟤🟤🟤 Input
|
||||
|
||||
|
||||
There are 7 possible destinations to write to:
|
||||
|
||||
🟢🔴🟤🟤🟤🔴🔴🔴 Register 0
|
||||
|
||||
🟢🔴🟤🟤🟤🔴🔴🟢 Register 1
|
||||
|
||||
🟢🔴🟤🟤🟤🔴🟢🔴 Register 2
|
||||
|
||||
🟢🔴🟤🟤🟤🔴🟢🟢 Register 3
|
||||
|
||||
🟢🔴🟤🟤🟤🟢🔴🔴 Register 4
|
||||
|
||||
🟢🔴🟤🟤🟤🟢🔴🟢 Register 5
|
||||
|
||||
🟢🔴🟤🟤🟤🟢🟢🔴 Output
|
||||
|
||||
|
||||
Assembly Mnemonics
|
||||
|
||||
** Assembly Mnemonics
|
||||
|
||||
A common method of representing the commands is by idividually specifying the parts of the command and adding them together using the OR operator.
|
||||
|
||||
|
|
@ -124,7 +162,8 @@ const out 6
|
|||
Example, which allows you to copy from Register 3 to Register 0
|
||||
cp|s3|d0
|
||||
|
||||
Off Label Usage
|
||||
** Off Label Usage
|
||||
|
||||
This section is non-normative
|
||||
|
||||
Most common implementations are implemented in such way that if you specify the non-defined option as a source, a zero is read
|
||||
|
|
@ -132,6 +171,7 @@ Most common implementations are implemented in such way that if you specify the
|
|||
🟢🔴🟢🟢🟢🟤🟤🟤 Clear Destination Register
|
||||
|
||||
* Condition 🟢🟢🟤🟤🟤🟤🟤🟤
|
||||
|
||||
This set of instructions allow you to jump to a certain point in your program.
|
||||
|
||||
The destination of the jump is specified by the Register 0.
|
||||
|
|
@ -139,16 +179,23 @@ The destination of the jump is specified by the Register 0.
|
|||
The jump will only be performed if the value in Register 3 matches the condition set by the least significant 3 bits of the instruction.
|
||||
|
||||
🟢🟢🟤🟤🟤🔴🔴🔴 Never
|
||||
|
||||
🟢🟢🟤🟤🟤🔴🔴🟢 Equals 0
|
||||
|
||||
🟢🟢🟤🟤🟤🔴🟢🔴 Less Than 0
|
||||
|
||||
🟢🟢🟤🟤🟤🔴🟢🟢 Less than or equals 0
|
||||
|
||||
🟢🟢🟤🟤🟤🟢🔴🔴 Always
|
||||
|
||||
🟢🟢🟤🟤🟤🟢🔴🟢 Not equals 0
|
||||
|
||||
🟢🟢🟤🟤🟤🟢🟢🔴 Greater than or equals 0
|
||||
|
||||
🟢🟢🟤🟤🟤🟢🟢🟢 Greater than 0
|
||||
|
||||
|
||||
Assembly Mnemonics
|
||||
** Assembly Mnemonics
|
||||
#+BEGIN_SRC
|
||||
const never 192
|
||||
const eq 193
|
||||
|
|
|
|||
Loading…
Reference in New Issue