
GPR-CPU (16-bit GPR CPU Emulator)
A fully functional, educational 16-bit RISC-style CPU emulator in C++ with 8 general-purpose registers, 64KB memory, and an explicit Fetch–Decode–Execute (FDE) cycle.
C++EmulatorRISC
What it does
- Architecture: Registers R0–R7 (16-bit GPRs), PC (Program Counter), FLAGS (Zero, Carry, Negative). Memory: 64KB addressable as 16-bit words. Bus: Simple read/write abstraction between CPU and memory.
- Instruction set includes HALT, MOVI, MOV, LOAD, STORE, ADD, SUB, AND, OR, XOR, NOT, SHL, SHR, JMP, JZ, NOP with 16-bit encoding.
- Instruction format: [15:12] opcode, [11:9] Rd, [8:6] Rs, [5:0] unused or imm low bits for MOVI.
