Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Instruction Set for the Slice CPU
- NOTE: <args> refers to a 4-Bit number, only used in the LD PC instruction, hence the Slice CPU only supports 16 lines of ROM, theoretically it could support up to 65536 lines but I wanna keep it as minimalistic as possible lol. Also, the registers are indexed 1-3, 1 being A, 2 being B and 3 being C.
- Arithmetic/Logic functions:
- NOP - 00000
- ADD <source reg> <destination reg> - 00001
- SUB <source reg> <destination reg> - 00010
- AND <source reg> <destination reg> - 00011
- OR <source reg> <destination reg> - 00100
- XOR <source reg> <destination reg> - 00101
- NAND <source reg> <destination reg> - 00101 NOR <source reg> <destination reg> - 00110
- XNOR <source reg> <destination reg> - 00111
- Memory Operations:
- LD A (ALU) - 01000
- LD B (ALU) - 01001
- LD C (ALU) - 01010
- LD A <args> - 01011
- LD B <args> - 01100
- LD C <args> - 01101
- MOV <source reg> <destination reg> - 01110
- Flag Controls:
- JMP <args> - 01111
- NEG <args> - 10000
- COUT <args> - 10001
- !ZR <args> - 10010
- ZR <args> - 10011
- Program Counter Operations:
- LD PC <args> - 10100
- RST PC - 10101
- Additional Operations:
- HLT - 10110
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement