A very basic CPU simulator.
Custom instruction set.
Assembler included.
Built with Go.
-
Clone this repo.
-
Write assembly.
loop.gm
MOV r1 3 MOV r2 2 ADD r3 r1 r2 loop: INC r4 ADD r0 r0 r3 CMP r4 10 JLT loop
-
Compile
gomachine
.$ make
-
Run it.
$ ./gomachine loop.gm
TODO
- debug flag (log machine steps)
- user input
- cli help message
- docs