This is a basic CPU emulator software. It loads program code from text file.
./java source input.txt
Following example code is an app that can compute the sum of the numbers between 0 and 20.
- START
- LOAD 20
- STORE 200
- LOAD 0
- STORE 201
- STORE 202
- CMPM 200
- CJMP 15
- LOADM 202
- ADDM 201
- STORE 202
- LOADM 201
- ADD 1
- STORE 201
- JMP 6
- LOADM 202
- DISP
- HALT