Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 16-Bit Instruction Set for a Minecraft Computer
- -=============================================-
- The instructions are formatted like this: x xxxx xx xxx xxx xxx.
- First bit: Defines if the instruction is an immediate or compute instructions. If the bit is on
- the first 8 bits will become immediates and the remaining 7 (without the first bit) aren't used.
- If the instruction is a compute one, each section will do this:
- First bit = I already mentioned that.
- Next four bits = Opcode
- 0000 = NoOP
- 0001 = Add
- 0010 = Sub (A-B)
- 0011 = And
- 0100 = Or
- 0101 = Not (A)
- 0110 = Xor
- 0111 = Nand
- 1000 = Nor
- 1001 = Xnor
- 1010 = Not (B)
- Next 2 bits = Flags
- First bit (out of this set) = If zero
- Second bit (out of this set) = If overflow
- Next 3 bits = A source register
- Next 3 bits = Destination register
- Next 3 bits = B Source register
- Note: The ALU has 2, 8 bit operands.
Advertisement
Add Comment
Please, Sign In to add comment