diff --git a/Instruction-Encoding.md b/Instruction-Encoding.md index 47d7a0d..6cbcbc2 100644 --- a/Instruction-Encoding.md +++ b/Instruction-Encoding.md @@ -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: @@ -32,4 +32,11 @@ Selectors are 5-bit values that determine the addressing mode and registers invo | X | | | | Y | | | | SP | | | -| BP | | | \ No newline at end of file +| 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* | \ No newline at end of file