LBSC_Thomas_70

16-Bit Instruction Set for a Minecraft Computer

Aug 16th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. 16-Bit Instruction Set for a Minecraft Computer
  2. -=============================================-
  3. The instructions are formatted like this: x xxxx xx xxx xxx xxx.
  4.  
  5. First bit: Defines if the instruction is an immediate or compute instructions. If the bit is on
  6. the first 8 bits will become immediates and the remaining 7 (without the first bit) aren't used.
  7.  
  8. If the instruction is a compute one, each section will do this:
  9. First bit = I already mentioned that.
  10. Next four bits = Opcode
  11. 0000 = NoOP
  12. 0001 = Add
  13. 0010 = Sub (A-B)
  14. 0011 = And
  15. 0100 = Or
  16. 0101 = Not (A)
  17. 0110 = Xor
  18. 0111 = Nand
  19. 1000 = Nor
  20. 1001 = Xnor
  21. 1010 = Not (B)
  22.  
  23. Next 2 bits = Flags
  24. First bit (out of this set) = If zero
  25. Second bit (out of this set) = If overflow
  26.  
  27. Next 3 bits = A source register
  28.  
  29. Next 3 bits = Destination register
  30.  
  31. Next 3 bits = B Source register
  32.  
  33. Note: The ALU has 2, 8 bit operands.
Advertisement
Add Comment
Please, Sign In to add comment