Skip to content

MlkMahmud/hack-assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hack Assembler

About

The Hack Assembler converts code written in the Hack assembly language to machine code that can be directly executed on the Hack computer. This project is one of the many enlightening projects from the book The Elements of Computing Systems: Building a Modern Computer from First Principles. The lessons in this book are also available as a two-part series of Massive Open Online Courses (M.O.O.C) on Coursera. You can find out more about the Hack Computer and it's instruction set here.

Usage

These instructions assume you haver the GNU Make utility and the GNU Compiler Collection (GCC) installed locally. If you don't, you can find download instructions here and here.

  1. Clone this repo to your machine
      git clone git@github.com:MlkMahmud/hack-assembler.git && cd hack-assembler/
  2. From the root directory, compile the source files (outputs an executable named main )
      make
  3. Run the assembler
      ./main path_to_asm_file
    On success, the program generates a new file with the same name as your source file, but with a ".hack" extension instead of ".asm".

About

An assembler for the Hack computer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published