Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hack Assembler

An assembler for the Hack platform written in C++. Translates the given .asm file to a .hack file.

Pong

Here's the translated Pong.hack file running on a Hack CPU Emulator. Pong

A shorter example

Add.asm translated to Add.hack

  // Computes R0 = 2 + 3  (R0 refers to RAM[0])            
  @2                                            // 0000000000000010
  D=A                                           // 1110110000010000
  @3                                            // 0000000000000011
  D=D+A                                         // 1110000010010000
  @0                                            // 0000000000000000
  M=D                                           // 1110001100001000

Language Specification

About

An assembler for Hack written in C++.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages