A simplistic virtual machine and assembler implemented in C++. The basic stuff works. A general bus system with which multi-core-machines or keyboard input could be implemented is currently work in progress.
A (very basic) documentation can be found in doc.pdf.
To compile and run the test program Prim:
-
Make asm
compiles main_asm.cpp, creates a program called asm -
Make vm
compiles main_vm.cpp, creates a program called vm -
run asm
compiles the programm in "Prim.txt" from assembly-code to machine-code. Creates a new file "mc_Prim.txt". -
run vm
runs the Virtual machine, which is initialized by the program from "mc_Prim.txt" -
enjoy :)
-
see the file ram.txt which is displays the status of the ram of the vm at termination.
See main_asm.cpp and main_vm.cpp for some general settings and to change input- and output- filenames. See include/Instructions_VM.hpp for an overview of all instructions provided by the virtual machine.