Skip to content

TiagoMaiaL/hack-assembler-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hack assembler

C Implementation of the Hack assembler for the Hack computing system described in nand2tetris.

TODOS:

Phase 1

  • Instruction translation module
  • Organize files into modules and helper functions
  • Write build scripts
  • Unit-testing library
  • Unit-test instruction translation module
  • Tokenization module
  • Unit-test tokenization module
  • Parsing module creating instructions from tokens
  • Unit-test parsing module
  • Add module to read an input file and write to an output one
  • Add module to read lines, parse, and translate
  • Test the assembler with simpler hack asm files

Phase 2

  • hash-table for symbols
  • Unit-test hash-table
  • Symbol parsing phase
  • Unit-test symbol parsing phase
  • Symbol substitution phase
  • Test the assembler with programs written in hack asm

Nice to have

  • Build script
  • Script to test parsing asm files
  • Refactor structs and enums to use typedef
  • Refactor naming
  • Document main functions
  • Errors should mention file line
  • Produce debug output
  • Colorful test outputs
  • Test results for all suites in the end
  • String describing assertions in case of errors

About

Implementation of Nand2tetris Hack assembler in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published