Skip to content

About

A simple virtual machine with register file and stack able to execute simple machine code (proprietary machine code)

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

106 Commits

Folders and files

Repository files navigation

Simple virtual machine

GitHub Workflow Status GitHub last commit GitHub issues GitHub pull requests GitHub


A simple virtual machine, with register file and stack, able to execute simple machine code (proprietary machine code).

📝 Table of Contents

🧐 About

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.

Note

The code is abundantly commented as required by the project specifications, and for future reference.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

A Unix based distrubution with these software installed is needed (WSL supported, too):

Building

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.

🎈 Usage

The virtual machine supports 2 commands:

  • run: execute a virtual machine program
  • print: print the source code of a program

Run a program

./vm.out run machine-code.cvm

Executes machine-code.cvm.

Print a program

./vm.out print machine-code.cvm

Prints the source code of machine-code.cvm.

Test programs

Under test/all folder you can find simple test programs (file .cvm).

⛏️ Built Using

  • C - Programming language
  • GNU Make - Compiling the project

✍️ Authors

  • @jackroi - Architecture and implementation

🎉 Acknowledgements

  • Laboratory professors and course tutors for the project idea and specifications.

About

A simple virtual machine with register file and stack able to execute simple machine code (proprietary machine code)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages