From d3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 20 Jan 2018 15:41:49 +0100 Subject: rearranged the dir for github - removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes --- .../SimpleFunction/SimpleFunction.asm | 138 --------------------- .../SimpleFunction/SimpleFunction.cmp | 2 - .../SimpleFunction/SimpleFunction.out | 2 - .../SimpleFunction/SimpleFunction.tst | 29 ----- .../FunctionCalls/SimpleFunction/SimpleFunction.vm | 16 --- .../SimpleFunction/SimpleFunction1.asm | 137 -------------------- .../SimpleFunction/SimpleFunctionVME.tst | 29 ----- 7 files changed, 353 deletions(-) delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst (limited to 'projects/08/FunctionCalls/SimpleFunction') diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm deleted file mode 100644 index de3a0da..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm +++ /dev/null @@ -1,138 +0,0 @@ -(SimpleFunction.test) -@SP -A=M -M=0 -@SP -M=M+1 -@SP -A=M -M=0 -@SP -M=M+1 -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M+D -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M+D -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@R13 -M=D -@5 -A=D-A -D=M -@R14 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@ARG -D=M+1 -@SP -M=D -@R13 -AM=M-1 -D=M -@THAT -M=D -@R13 -AM=M-1 -D=M -@THIS -M=D -@R13 -AM=M-1 -D=M -@ARG -M=D -@R13 -AM=M-1 -D=M -@LCL -M=D -@R14 -A=M -0;JMP diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp deleted file mode 100644 index c3ea911..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] |RAM[310]| -| 311 | 305 | 300 | 3010 | 4010 | 1196 | diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out deleted file mode 100644 index ef72b7a..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] |RAM[310]| -| 311 | 305 | 300 | 3010 | 4010 | 1196 | diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst deleted file mode 100644 index c7b5905..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst +++ /dev/null @@ -1,29 +0,0 @@ -// 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/08/FunctionCalls/SimpleFunction/SimpleFunction.tst - -load SimpleFunction.asm, -output-file SimpleFunction.out, -compare-to SimpleFunction.cmp, -output-list RAM[0]%D1.6.1 RAM[1]%D1.6.1 RAM[2]%D1.6.1 - RAM[3]%D1.6.1 RAM[4]%D1.6.1 RAM[310]%D1.6.1; - -set RAM[0] 317, -set RAM[1] 317, -set RAM[2] 310, -set RAM[3] 3000, -set RAM[4] 4000, -set RAM[310] 1234, -set RAM[311] 37, -set RAM[312] 1000, -set RAM[313] 305, -set RAM[314] 300, -set RAM[315] 3010, -set RAM[316] 4010, - -repeat 300 { - ticktock; -} - -output; diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm deleted file mode 100644 index d64a34f..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm +++ /dev/null @@ -1,16 +0,0 @@ -// 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/08/FunctionCalls/SimpleFunction/SimpleFunction.vm - -// Performs a simple calculation and returns the result. -function SimpleFunction.test 2 -push local 0 -push local 1 -add -not -push argument 0 -add -push argument 1 -sub -return diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm b/projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm deleted file mode 100644 index 7fe71a5..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm +++ /dev/null @@ -1,137 +0,0 @@ -(SimpleFunction.test) -@SP -A=M -M=0 -@SP -M=M+1 -@SP -A=M -M=0 -@SP -M=M+1 -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M+D -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M+D -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@R13 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@ARG -D=M+1 -@SP -M=D -@R13 -AM=M-1 -D=M -@THAT -M=D -@R13 -AM=M-1 -D=M -@THIS -M=D -@R13 -AM=M-1 -D=M -@ARG -M=D -@R13 -AM=M-1 -D=M -@LCL -M=D -@R13 -A=M-1 -A=M -0;JMP -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst b/projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst deleted file mode 100644 index c9267ee..0000000 --- a/projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst +++ /dev/null @@ -1,29 +0,0 @@ -// 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/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst - -load SimpleFunction.vm, -output-file SimpleFunction.out, -compare-to SimpleFunction.cmp, -output-list RAM[0]%D1.6.1 RAM[1]%D1.6.1 RAM[2]%D1.6.1 - RAM[3]%D1.6.1 RAM[4]%D1.6.1 RAM[310]%D1.6.1; - -set sp 317, -set local 317, -set argument 310, -set this 3000, -set that 4000, -set argument[0] 1234, -set argument[1] 37, -set argument[2] 9, -set argument[3] 305, -set argument[4] 300, -set argument[5] 3010, -set argument[6] 4010, - -repeat 10 { - vmstep; -} - -output; -- cgit v1.2.3