Escapement
cpu16: a C++ instruction-set simulator and assembler that actually implements the diagrammed CPU (CU/ALU/register-file/RAM-ROM/bus), replacing x86 calls that never touched the design.
Started as a Computer Organization and Assembly Language project that diagrammed a custom CPU (control unit, ALU, a 4-register array R1/R2/R3/RES, a RAM/ROM memory unit, address/data/control buses) but implemented it as plain x86 assembly that never touched a register file or fetched an instruction from memory. Rebuilt into cpu16: a real 16-bit instruction-set simulator with genuine binary machine-word encoding, a fetch-decode-execute cycle, a two-pass assembler, and a per-instruction trace exposing real address/data/control-bus activity -- making the diagrammed architecture executable for the first time. Reproduces the original's exact documented test cases (5+3=8, 6x7=42, 20/4=5) as real assembled-and-executed programs. The original x86 source, report, and presentation have been moved to a personal academic-archive repo (not yet published); the architecture diagrams remain in this repo's diagrams/ folder.
Full source, tests, and documentation live in the repo.
view on github →