aboutsummaryrefslogtreecommitdiff
path: root/projects/08/ProgramFlow/BasicLoop
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-06 17:24:28 +0100
committerYuchen Pei <me@ypei.me>2018-01-06 17:24:28 +0100
commit29a1931f2ee4e72ddd240096bf6fe9a04668f131 (patch)
tree03bbc0366ed2b00de6a276f908c751971d0d5628 /projects/08/ProgramFlow/BasicLoop
parentf84dcda74e13120c5433591feeeed7e7d4c5f322 (diff)
finished project 8.
Diffstat (limited to 'projects/08/ProgramFlow/BasicLoop')
-rw-r--r--projects/08/ProgramFlow/BasicLoop/BasicLoop.asm11
1 files changed, 2 insertions, 9 deletions
diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm b/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm
index 62aa0cf..b2e42a7 100644
--- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm
+++ b/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm
@@ -1,7 +1,3 @@
-@256
-D=A
-@SP
-M=D
@0
D=A
@SP
@@ -21,7 +17,7 @@ D=M
@R13
A=M
M=D
-(LOOP_START)
+($LOOP_START)
@ARG
D=M
@0
@@ -122,7 +118,7 @@ M=M+1
@SP
AM=M-1
D=M
-@LOOP_START
+@$LOOP_START
D;JNE
@LCL
D=M
@@ -135,6 +131,3 @@ A=M
M=D
@SP
M=M+1
-(END)
-@END
-0;JMP \ No newline at end of file