This is a browser-based assembler written in JavaScript! It takes assembly language and spits out machine code in .hack
files to run on the Hack computer for the free and open NAND2Tetris course on computer science from first principles.
Try it out: http://learningnerd.github.io/js-hack-assembler/
Note: Don't look at the code until after you've already completed the project yourself!
I decided to publish this publicly because I think there's tremendous benefit to being able to compare your finished code to somebody else's version. I hate to go against the wishes of the course instructors, but I think the risk of ruining somebody else's learning experience is minimal in this case. (Besides, complete solutions have already been posted online.)
Blog posts on my learning process:
I experimented with keeping detailed notes as I went through this course. You can see the notes I wrote while building my very first assembler here: