A simple virtual machine, with register file and stack, able to execute simple machine code (proprietary machine code).
A simple virtual machine, with register file and stack, able to execute simple machine code (proprietary machine code).
Documentation (italian language):
This project was realized for the C programming course of Ca' Foscari University of Venice.
The code is abundantly commented as required by the project specifications, and for future reference.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
A Unix based distrubution with these software installed is needed (WSL supported, too):
Clone/Download the repository.
git clone https://github.com/jackroi/virtual-machine.git
Enter into virtual-machine folder and run make
command to compile the source code.
cd virtual-machine
make
If all went well, you should see vm.out
file into the project directory.
The virtual machine supports 2 commands:
- run: execute a virtual machine program
- print: print the source code of a program
./vm.out run machine-code.cvm
Executes machine-code.cvm
.
./vm.out print machine-code.cvm
Prints the source code of machine-code.cvm
.
Under test/all
folder you can find simple test programs (file .cvm
).
- @jackroi - Architecture and implementation
- Laboratory professors and course tutors for the project idea and specifications.