From 27dd67816aab49760a3ce5cad0a8c35bac7da2eb Mon Sep 17 00:00:00 2001 From: Sven Riwoldt Date: Wed, 16 Apr 2025 05:23:34 +0200 Subject: [PATCH] Project 6 --- projects/06/Asm/Add.hack | 6 ++++++ projects/06/max/MaxL.Hand.asm | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 projects/06/Asm/Add.hack create mode 100644 projects/06/max/MaxL.Hand.asm diff --git a/projects/06/Asm/Add.hack b/projects/06/Asm/Add.hack new file mode 100644 index 0000000..ede75f9 --- /dev/null +++ b/projects/06/Asm/Add.hack @@ -0,0 +1,6 @@ +0000000000000010 +1110110000010000 +0000000000000011 +1110000010010000 +0000000000000000 +1110001100001000 \ No newline at end of file diff --git a/projects/06/max/MaxL.Hand.asm b/projects/06/max/MaxL.Hand.asm new file mode 100644 index 0000000..0cb7b45 --- /dev/null +++ b/projects/06/max/MaxL.Hand.asm @@ -0,0 +1,37 @@ +// This file is part of www.nand2tetris.org +// and the book "The Elements of Computing Systems" +// by Nisan and Schocken, MIT Press. +// File name: projects/06/max/MaxL.asm + +// Symbol-less version of the Max.asm program. + +@0 +0000000000000000 +D=M +1111110000010000X +@1 +0000000000000001 +D=D-M +1111010011010000 +@10 +0000000000001010 +D;JGT +1110001100000001 +@1 +0000000000000001 +D=M +1111110000010000 +@12 +0000000000001100 +0;JMP +1110101010000111 +@0 +0000000000000000 +D=M +1111110000010000 +@2 +0000000000000010 +M=D +1111 +@14 +0;JMP