/hackc

A C compiler for the hack computer

Primary LanguageCGNU General Public License v3.0GPL-3.0

C Compiler for Hack CPU Computer

Description

This project is an attempt to build a C compiler for the Hack CPU-based computer described in the Elements of Computing Systems. It will compile into hack assembly language.

It will start out as a C implementation of the Turbo Pascal program presented by Jack Crenshaw Let's Build A Compiler.

A tag in github will be created at the conclusion of each part of Crenshaw's tutorial. I will diverge from his KISS language parsing in order to parse C instead, but I do intend to follow the tutorial progression. At some point, I will branch off and attempt to parse the C BNF and/or perhaps a BASIC dialect.

Requirements

Building

  • make
  • Clean with make clean.

Testing

  • Set Makefile location of CPUEmulator in EMU variable
  • make test