Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Instruction set:
- Types:
- Type is the way the instruction is being handled inside the CPU.
- A Type: Standard C=A+B, value returned will be from the ALU and therefore acessable by everything on the Main Data Buss.
- B Type: Used to load a piece of data onto the GPR's, but not be loaded onto any other register.
- C Type: Used when branching, No piece of data is being manipulated and saved.
- D Type: Used when reading from the B output of the GPR's to another mass of memory
- Operations:
- 0000-ADD - Add A and B, Save in C - A Type
- 0001-IOR - OR A and B, Save in C - A Type
- 0010-AND - AND A and B, Save in C - A Type
- 0011-XOR - XOR A and B, Save in C - A Type
- 0100-++v - 1 + A + B, Save in C - A Type
- 0101-NOR - NOR A and B, Save in C - A Type
- 0110-NAND - NAND A and B, Save in C - A Type
- 0111-XNOR - XNOR A and B, Save in C - A Type
- 1000-A!=B - Compare if A != B, Return Bool - C Type
- 1001-A>=B - Compare if A >= B, Return Bool - C Type
- 1010-True - Returns True - C Type
- 1011-rsft - Right shifts B - B Type
- 1110-Halt - stops the computer
- 1111-Sub - Subtract A and B, Save in C - A Type
- Argument C:
- | # | Name |-| Type // Note
- 0000-null
- 0001-Set MMIO 01 - A Type
- 0010-Set MMIO 10 - A Type
- 0011-Set MMIO 11 - A Type
- 0100-Push Stack - A Type
- 0101-Set GPR 01 - A Type
- 0110-Set GPR 10 - A Type
- 0111-Set GPR 11 - A Type
- 1000-Set JMP - A Type // can be used in unconditional jump
- 1001-JMP if True - C Type // If there is no comparative operation, This will return True if the COUT is on
- 11xx-Load Imm - B Type
- Argument A:
- | # | Name |-| Type // Note
- 0000-null - Null
- 0001-Read MMIO 01 - B Type
- 0010-Read MMIO 10 - B Type
- 0011-Read MMIO 11 - B Type
- 0100-Pop Stack - A Type
- 0101-Read GPR 01 - A Type
- 0110-Read GPR 10 - A Type
- 0111-Read GPR 11 - A Type
- 1XXX-RAM Write - D Type
- Argument B:
- | # | Name |-| Type // Note
- 0000-null - Null
- 0100-Read STK - A Type
- 0101-Read GPR 01 - A Type
- 0110-Read GPR 10 - A Type
- 0111-Read GPR 11 - A Type
- 1XXX-RAM Read - B Type
- Terminology:
- MMIO = Memory Mapped I/O; I/O Mapped like memory
- GPR = General Purpose Register, the registers linked directly to the ALU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement