Skip to content

silacode/vm_translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VM Translator

License: MIT Python Version

A VM translator implemented in Python for the Nand2Tetris course.

Description

This program translates VM code (similar to Java bytecode) into Hack assembly language. It's part of the Nand2Tetris project, which builds a modern computer from first principles.

Features

  • Translates VM arithmetic/logical commands
  • Handles memory access commands
  • Processes program flow commands
  • Supports function calling commands

Usage

python vm_translator.py <input_file.vm>

Installation

  1. Clone this repository
  2. Ensure Python 3.9 or higher is installed
  3. No additional dependencies required

Project Structure

  • vm_translator.py: Main program file
  • parser.py: Parses VM commands
  • code_writer.py: Generates assembly code
  • test/: Test files and examples

Author

Siladitya Samaddar

License

MIT License

About

This is an implementation of vm_translator that translates VM code (similar to Java bytecode) into Hack assembly language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors