mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 02:56:44 +00:00
Updated Instruction Set (markdown)
parent
b4b59f87f7
commit
130649af3e
@ -38,4 +38,19 @@
|
|||||||
*NEG instruction: CF is set to 0 if destination=0
|
*NEG instruction: CF is set to 0 if destination=0
|
||||||
|
|
||||||
### Instruction encoding
|
### Instruction encoding
|
||||||
WIP
|
Instructions are 1-3 words long and are fully defined by the first word.
|
||||||
|
In a basic instruction, the lower 6 bits of the first word of the instruction
|
||||||
|
are the opcode, and the remaining 12 bits are split into a 5 bit destination operand
|
||||||
|
and a 5 bit source operand.
|
||||||
|
In bits, a basic instruction has the format: `sssssdddddoooooo`
|
||||||
|
|
||||||
|
Operand value:
|
||||||
|
|
||||||
|
| Description | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Invalid or none | `00000` |
|
||||||
|
| Immediate value at IP+1 | `11111` |
|
||||||
|
| [Immediate value at IP+1] | `11110` |
|
||||||
|
| Register | `00001`-`01000` |
|
||||||
|
| [Register] | `01001`-`10000` |
|
||||||
|
| Register + Immediate value at IP+1 | `10001`-`11000` |
|
Loading…
x
Reference in New Issue
Block a user