Skip to content

OskarAhl/Hack-Machine-Language-Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hack Machine Language Assembler

Created by Oskar Ahlroth 🎄

  • Dependendency free assembler written in node.js
  • Assembles machine language .asm into .hack machine code
  • Supports symbols (variables + labels)
  • To learn more about hack - check out Nand2Tetris

Usage:


node file_name.asm 
  • --> creates a new file file_name.hack

E.g. add.asm

// Adds 2 + 3 and puts the result into Register 0
@2
D=A
@3
D=D+A
@0
M=D

turns into add.hack:

0000000000000010
1110110000010000
0000000000000011
1110000010010000
0000000000000000
1110001100001000

Releases

No releases published

Packages

No packages published