Skip to content

ChakirMrabet/HeckCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hack Virtual Machine Compiler

Introduction

This is a compiler for HACK computers that converts Virtual Machine byte code into ASM code.

I made this program with C language, as part of the Nand2Tetris course.

HECK compiler in action

Usage

The compiler can process single .vm files or entire directories containing .vm files.

Use as follows:

VMTranslator <dirname> -c

VMTranslator <filename> -c

When -c is provided the compiler will include comments in the generated ASM file.

The compiler will generate one single .asm file, named after the provided file or directory, containing the generated ASM code.

Requirements

This program is written for Linux machines with libc, however its portability to other operating systems should be fairly trivial.

Build Process

The project comes with a makefile that you can run to build the binary.

About

Compiler for HECK machines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published