-
Notifications
You must be signed in to change notification settings - Fork 0
ISA
0xC0ba1t edited this page May 12, 2023
·
9 revisions
New and improved, overhauled ISA:
Data Types:
- Byte: 8 bits
- Halfword: 16 bits
- Word: 32 bits
Registers:
- 16 general-purpose registers (R0-R15)
- 1 program counter (PC)
- 1 stack pointer (SP)
Instruction Set:
Load/Store Instructions:
- LD (Load): Load a value from memory to a register
- ST (Store): Store a value from a register to memory
Arithmetic Instructions:
- ADD: Add two values
- SUB: Subtract two values
- MUL: Multiply two values
- DIV: Divide two values
Logic Instructions:
- AND: Bitwise AND two values
- OR: Bitwise OR two values
- XOR: Bitwise XOR two values
Control Flow Instructions:
- JMP (Jump): Unconditional jump to a label
- JEQ (Jump if Equal): Jump to a label if two values are equal
- JNE (Jump if Not Equal): Jump to a label if two values are not equal
- JGT (Jump if Greater Than): Jump to a label if the first value is greater than the second value
- JLT (Jump if Less Than): Jump to a label if the first value is less than the second value
- CALL: Call a subroutine
- RET (Return): Return from a subroutine
Input/Output Instructions:
- IN: Read a byte from an input port
- OUT: Write a byte to an output port
Video Processing Instructions:
- LOADVID (Load Video): Load a video frame from memory to a video processing hardware
- DRAW (Draw): Draw an image to the video processing hardware
- SYNC (Synchronize): Synchronize the video processing hardware with the CPU
Expansion Instructions:
- NOP (No Operation): Do nothing
- HALT: Stop the CPU