Updated Instruction Encoding (markdown)

Hayden Kroepfl 2018-01-07 23:44:44 -07:00
parent 895aa128f3
commit 1814be405e

@ -1,6 +1,6 @@
**Under Construction**
Instructions are represented internally by either one, two, or three words. The basic instruction word combines a 6-bit opcode with two 5-bit source and destination selectors. Certain addressing modes/selectors require an additional word for either the source or destination after the basic instruction word.
Instructions are represented internally by either one, two, or three words. The basic instruction word combines a 6-bit opcode with two 5-bit source and destination selectors. Certain addressing modes/selectors require an additional word for either the source and/or destination after the basic instruction word.
## Basic Instruction Word
The basic instruction word is required for every instruction encoding, it comes as the first word of an instruction. The word takes the following form:
@ -33,3 +33,10 @@ Selectors are 5-bit values that determine the addressing mode and registers invo
| Y | | |
| SP | | |
| BP | | |
## Supplemental Words
If either the destination or source require a 16-bit immediate value as part of their addressing mode, then one or two additional word will be suffixed to the basic instruction word. If both a source and destination supplimental word are required, then the source word will come first in order.
| Word 0 | Word 1 | Word 2 |
| --- | --- | --- |
| Basic Instruction | *Source operand* | *Destination operand* |