Skip to content
/ MIPS-VM Public

Building a custom VM for MIPS architecture.

Notifications You must be signed in to change notification settings

ucsb/MIPS-VM

Repository files navigation

CS293C-MIPS_VM-taanya

Building a custom VM for MIPS architecture.

Requirements

  • Python version 3
  • Clang

Steps to execute

  • To ensure clang has the required extensions (this is not needed when running only asm files)
make
  • To ensure the code is working properly through tests
make test
  • For converting C++ programs to Assembly files
python highlevel_to_assembly.py
  • For converting assembly file to bytecode
python assembly_to_bytecode.py tests/easy/auto_integers_basic.asm
  • For executing bytecode
python bytecode_execution.py --asm tests/demo/auto_binary_search.asm
python bytecode_execution.py --source examples/demo/reverse_string.cpp
  • Example of an assert statement
assert run_vm("tests/easy/auto_integers_basic_io.asm", [8, 20, -5]) == [8, 20, -5]

References

Conversion from Assembly Code to Byte Code

  • Arithmetic & Logical Instructions
  • Branch and Jump Instructions
  • Functions
  • Data Segment
  • Floats
  • Arrays
  • String
  • Print Statements

Execution of Byte Code

  • Arithmetic & Logical Instructions
  • Branch and Jump Instructions
  • Unsigned & Negative Numbers
  • Functions
  • Data Segment
  • Floats
  • Arrays
  • String
  • Print Statements

About

Building a custom VM for MIPS architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published