mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
Updated Instruction Encoding (markdown)
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* |
|
Loading…
x
Reference in New Issue
Block a user