AbstractVM is a machine that uses a stack to compute simple arithmetic expressions. These arithmetic expressions are provided to the machine as basic assembly programs.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What you need to run this project is C++11
To install you'll have to clone the project to your local machine
Step 1: Clone the project
git clone https://github.com/amatshiye/Abstract_VM
Step 2: Go inside the cloned repo
cd Abstract_VM
Step 3: Compile the project
make
To recompile the project use this command:
make re
There are two ways to test the program. Either you pass a file to the program or you use the default mode (STDIN) to test it.
To use the default mode follow these instructions:
Step 1: Run the program
./avm (With no arguments or else it will fail)
Step 2: Input instructions
for example:
push int8(100)
push int32(20)
dump
add
exit;; (Add the double semi-colon and press enter to execute your instructions)
To use the file mode follow these instructions:
Step 1: Create text file (You can use any editor you want)
touch test.txt (Creating a file using a terminal)
Step 2: Write the following instructions inside the text file
push int8(100)
push int32(20)
dump
add
exit (This time around you don't need the double semi-colon)
- Visual Studio Code - The Code editor
- iTerm - A cool terminal for MacOS
- Afrika Matshiye - Github
- Yan Chernikov - YouTube