summaryrefslogtreecommitdiff
path: root/projects/07/MemoryAccess/PointerTest
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-08-22 17:04:49 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-08-22 17:04:49 +0800
commit21c58570d3897f1f480b6cf6c572c350e7a0dd95 (patch)
treeeed5ff515d322439ab843e009b00faed0e30e9c8 /projects/07/MemoryAccess/PointerTest
parent10c9f64f592198d78aad11ebc676629d92ca6576 (diff)
Output assembly files in project 07
Diffstat (limited to 'projects/07/MemoryAccess/PointerTest')
-rw-r--r--projects/07/MemoryAccess/PointerTest/PointerTest.asm125
1 files changed, 125 insertions, 0 deletions
diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.asm b/projects/07/MemoryAccess/PointerTest/PointerTest.asm
new file mode 100644
index 0000000..9511e12
--- /dev/null
+++ b/projects/07/MemoryAccess/PointerTest/PointerTest.asm
@@ -0,0 +1,125 @@
+@3030
+D=A
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@SP
+M=M-1
+A=M
+D=M
+@THIS
+M=D
+@3040
+D=A
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@SP
+M=M-1
+A=M
+D=M
+@THAT
+M=D
+@32
+D=A
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@2
+D=A
+@THIS
+M=M+D
+@SP
+M=M-1
+A=M
+D=M
+@THIS
+A=M
+M=D
+@2
+D=A
+@THIS
+M=M-D
+@46
+D=A
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@6
+D=A
+@THAT
+M=M+D
+@SP
+M=M-1
+A=M
+D=M
+@THAT
+A=M
+M=D
+@6
+D=A
+@THAT
+M=M-D
+@THIS
+D=M
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@THAT
+D=M
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@SP
+M=M-1
+A=M
+D=M
+@SP
+A=M-1
+M=D+M
+@THIS
+D=M
+@2
+A=D+A
+D=M
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@SP
+M=M-1
+A=M
+D=M
+@SP
+A=M-1
+M=M-D
+@THAT
+D=M
+@6
+A=D+A
+D=M
+@SP
+A=M
+M=D
+@SP
+M=M+1
+@SP
+M=M-1
+A=M
+D=M
+@SP
+A=M-1
+M=D+M