A simple CPU emulator mostly based on my understanding of computers and CPUs, written in C++17.
- A C++17 compatible compiler.
- CMake >= 3.20
$ cmake -B build -S
$ cmake --build buildFirst, you should provide a source code with the following instructions:
- ADD
- DUMP
- EXIT
NOTE: You should write one instruction per-line
For example:
ADD
20
30
DUMP
EXITThen:
$ ./build/cpu my_asm.cpu
--------------------------------
0 14 1e 1
Memory usage: 4B
Registers:
A: 20
B: 30
C: 50
I: 1
--------------------------------