⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

An assembler for the Hack assembly language as defined in the nand2tetris course.

License

Notifications You must be signed in to change notification settings

mfl28/HackAssembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackAssembler

Build Status Language grade: C/C++

OS Build & Test Pipeline Status
Linux Build Status
MacOS Build Status
Windows Build Status

This is a C++-implementation of an assembler for the Hack assembly-language as defined in the nand2tetris-course project 6. The program gets a single .asm-file containing Hack assembly-language code as argument, translates it into binary code and outputs the result into a .hack-file.

Building the program

Note: To build this program, a compiler that supports C++17 and std::filesystem is required (e.g. gcc version ≥ 8).

git clone https://github.com/mfl28/HackAssembler.git
cd HackAssembler
cmake -B build    # Use option "-D BUILD_TESTING=OFF" if you do not want to build the unit-tests.
cmake --build build   

Running the program

After you built the program, do the following from within the build-directory:

Linux

./HackAssembler path/to/filename.asm

Windows

cd Debug    # Or "cd Release" if you built using Release-configuration.
.\HackAssembler.exe path\to\filename.asm

Running the tests

If you built the program including the unit-tests, then these can be run from within the build-directory by doing the following:

Linux

ctest -V

Windows

ctest -C Debug -V    # Or "ctest -C Release -V" if you built using Release-configuration.

References

About

An assembler for the Hack assembly language as defined in the nand2tetris course.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published