Skip to content

Commit 7f0eecf

Browse files
committed
Iniitial commit
1 parent a7c2010 commit 7f0eecf

18 files changed

+7546
-154
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# z-assembler
1+
# hack-assembler
22

3-
Assembler for the Hack language ecosystem
3+
This is my TypeScript implementation of the nand2Tetris Assembler for the 16-bit Hack programming language.

package-lock.json

Lines changed: 7519 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "z-assembler",
2+
"name": "hack-assembler",
33
"version": "1.0.0",
44
"description": "Assembler for the Hack language ecosystem",
55
"main": "build/main/index.js",
66
"typings": "build/main/index.d.ts",
77
"module": "build/module/index.js",
8-
"repository": "https://github.com/zbennett10/z-assembler",
8+
"repository": "https://github.com/zbennett10/hack-assembler",
99
"license": "MIT",
1010
"keywords": [],
1111
"scripts": {

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
export * from './lib/async';
2-
export * from './lib/hash';
3-
export * from './lib/number';
1+
export * from './lib/index';

src/lib/async.spec.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/lib/async.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/lib/binary-code-generator.spec.ts

Whitespace-only changes.

src/lib/binary-code-generator.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// tslint:disable-next-line: no-class
2+
export class BinaryCodeGenerator {
3+
4+
constructor() {
5+
6+
}
7+
8+
/**
9+
*
10+
* @param asmCode Assembly code that needs to be translated into 16-bit machine language
11+
*/
12+
public generate(asmCode: string): string {
13+
// Read assembly code and build symbol table
14+
// Parse each line of assembly code and write hack binary code using symbol table
15+
return asmCode;
16+
}
17+
18+
}

src/lib/hash.spec.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/lib/hash.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)