aboutsummaryrefslogtreecommitdiff
path: root/projects/08/FunctionCalls/SimpleFunction
diff options
context:
space:
mode:
Diffstat (limited to 'projects/08/FunctionCalls/SimpleFunction')
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm138
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp2
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out2
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst29
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm16
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm137
-rw-r--r--projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst29
7 files changed, 0 insertions, 353 deletions
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;