Me and my colleague, Nicole Freites, wrote a virtual machine designed to execute p-code or the assembly language of a CPU.
To compile code from command line: gcc P-machine.c
To run the program: ./a.out INSERT_FILENAME_HERE.txt
- Make sure you insert your preferred input.txt file where it says INSERT_FILENAME_HERE.txt
The output will print directly to the terminal.
If there is a comment, starting with /*, that has no end */, then nothing will print.
Nicole Freites