Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeansberg/pythonvmtranslator

A virtual machine translator for the VM language defined in From NAND to Tetris"
https://github.com/jeansberg/pythonvmtranslator

hack nand2tetris virtual-machine

Last synced: about 1 month ago
JSON representation

A virtual machine translator for the VM language defined in From NAND to Tetris"

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/jeansberg/PythonVMTranslator.svg?branch=master)](https://travis-ci.org/jeansberg/PythonVMTranslator)
# PythonVMTranslator
This is a virtual machine translator for the VM language defined in *From NAND to Tetris Building a Modern Computer From First Principles* (http://nand2tetris.org/)

It is a console application written in Python.

## Operation
Execute VmTranslator.py with a command line parameter specifying the path to the .vm file you want to translate. The resulting .asm file will be saved in the same folder.

## Tests
Run TranslationTests.py from a test runner to translate the .vm files in the "Test files" directory and compare the resulting .asm file with the corresponding .cmp file. The .cmp files have been verified with the Hack CPU emulator.