28376 lines
195 KiB
NASM
28376 lines
195 KiB
NASM
// 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/pong/Pong.asm
|
|
|
|
// The Pong game program was originally written in the high-level Jack language.
|
|
// The Jack code was then translated by the Jack compiler into VM code.
|
|
// The VM code was then translated by the VM translator into the Hack
|
|
// assembly code shown here.
|
|
|
|
@256
|
|
D=A
|
|
@SP
|
|
M=D
|
|
@133
|
|
0;JMP
|
|
@R15
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
D=M-D
|
|
M=0
|
|
@END_EQ
|
|
D;JNE
|
|
@SP
|
|
A=M-1
|
|
M=-1
|
|
(END_EQ)
|
|
@R15
|
|
A=M
|
|
0;JMP
|
|
@R15
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
D=M-D
|
|
M=0
|
|
@END_GT
|
|
D;JLE
|
|
@SP
|
|
A=M-1
|
|
M=-1
|
|
(END_GT)
|
|
@R15
|
|
A=M
|
|
0;JMP
|
|
@R15
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
D=M-D
|
|
M=0
|
|
@END_LT
|
|
D;JGE
|
|
@SP
|
|
A=M-1
|
|
M=-1
|
|
(END_LT)
|
|
@R15
|
|
A=M
|
|
0;JMP
|
|
@5
|
|
D=A
|
|
@LCL
|
|
A=M-D
|
|
D=M
|
|
@R13
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
A=M
|
|
M=D
|
|
D=A
|
|
@SP
|
|
M=D+1
|
|
@LCL
|
|
D=M
|
|
@R14
|
|
AM=D-1
|
|
D=M
|
|
@THAT
|
|
M=D
|
|
@R14
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@R14
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
M=D
|
|
@R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=M-1
|
|
D=M
|
|
@ball.move$if_true1
|
|
D;JNE
|
|
@ball.move$if_false1
|
|
0;JMP
|
|
(ball.move$if_true1)
|
|
@THIS
|
|
D=M
|
|
@7
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ball.move$if_true2
|
|
D;JNE
|
|
@ball.move$if_false2
|
|
0;JMP
|
|
(ball.move$if_true2)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M
|
|
M=D
|
|
@ball.move$if_end2
|
|
0;JMP
|
|
(ball.move$if_false2)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
M=D
|
|
(ball.move$if_end2)
|
|
@ball.move$if_end1
|
|
0;JMP
|
|
(ball.move$if_false1)
|
|
@THIS
|
|
D=M
|
|
@7
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ball.move$if_true3
|
|
D;JNE
|
|
@ball.move$if_false3
|
|
0;JMP
|
|
(ball.move$if_true3)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M
|
|
M=D
|
|
@ball.move$if_end3
|
|
0;JMP
|
|
(ball.move$if_false3)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
M=D
|
|
(ball.move$if_end3)
|
|
(ball.move$if_end1)
|
|
(ball.move$if_end0)
|
|
@THIS
|
|
D=M
|
|
@8
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ball.move$if_true4
|
|
D;JNE
|
|
@ball.move$if_false4
|
|
0;JMP
|
|
(ball.move$if_true4)
|
|
@THIS
|
|
D=M
|
|
@7
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ball.move$if_true5
|
|
D;JNE
|
|
@ball.move$if_false5
|
|
0;JMP
|
|
(ball.move$if_true5)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
M=D
|
|
@ball.move$if_end5
|
|
0;JMP
|
|
(ball.move$if_false5)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M
|
|
M=D
|
|
(ball.move$if_end5)
|
|
@ball.move$if_end4
|
|
0;JMP
|
|
(ball.move$if_false4)
|
|
@THIS
|
|
D=M
|
|
@7
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ball.move$if_true6
|
|
D;JNE
|
|
@ball.move$if_false6
|
|
0;JMP
|
|
(ball.move$if_true6)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
M=D
|
|
@ball.move$if_end6
|
|
0;JMP
|
|
(ball.move$if_false6)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@4
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M
|
|
M=D
|
|
(ball.move$if_end6)
|
|
(ball.move$if_end4)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|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L58
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL58)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@22
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.movecursor
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL59
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL59)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@8
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL60
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL60)
|
|
@83
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL61
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL61)
|
|
@99
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL62
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL62)
|
|
@111
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL63
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL63)
|
|
@114
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL64
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL64)
|
|
@101
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL65
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL65)
|
|
@58
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL66
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL66)
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL67
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL67)
|
|
@48
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL68
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL68)
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D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=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@THIS
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@ponggame.moveball
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL76
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL76)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@ponggame.run$while_exp1
|
|
0;JMP
|
|
(ponggame.run$while_end1)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@130
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ8
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ8)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.run$if_true0
|
|
D;JNE
|
|
@ponggame.run$if_false0
|
|
0;JMP
|
|
(ponggame.run$if_true0)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@bat.setdirection
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL77
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL77)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@ponggame.run$if_end0
|
|
0;JMP
|
|
(ponggame.run$if_false0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@132
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ9
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ9)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.run$if_true1
|
|
D;JNE
|
|
@ponggame.run$if_false1
|
|
0;JMP
|
|
(ponggame.run$if_true1)
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@bat.setdirection
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL78
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL78)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@ponggame.run$if_end1
|
|
0;JMP
|
|
(ponggame.run$if_false1)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@140
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ10
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ10)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.run$if_true2
|
|
D;JNE
|
|
@ponggame.run$if_false2
|
|
0;JMP
|
|
(ponggame.run$if_true2)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
(ponggame.run$if_false2)
|
|
(ponggame.run$if_end1)
|
|
(ponggame.run$if_end0)
|
|
(ponggame.run$while_exp2)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
A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=M
|
|
@R5
|
|
M=D
|
|
@ponggame.run$while_exp2
|
|
0;JMP
|
|
(ponggame.run$while_end2)
|
|
@ponggame.run$while_exp0
|
|
0;JMP
|
|
(ponggame.run$while_end0)
|
|
@THIS
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.run$if_true3
|
|
D;JNE
|
|
@ponggame.run$if_false3
|
|
0;JMP
|
|
(ponggame.run$if_true3)
|
|
@10
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@27
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.movecursor
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL82
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL82)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@9
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL83
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL83)
|
|
@71
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL84
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL84)
|
|
@97
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL85
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL85)
|
|
@109
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL86
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL86)
|
|
@101
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL87
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL87)
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL88
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL88)
|
|
@79
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL89
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL89)
|
|
@118
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL90
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL90)
|
|
@101
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL91
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL91)
|
|
@114
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL92
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL92)
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printstring
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL93
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL93)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(ponggame.run$if_false3)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(ponggame.moveball)
|
|
@5
|
|
D=A
|
|
(LOOP_ponggame.moveball)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_ponggame.moveball
|
|
D;JGT
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@ball.move
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL94
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
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|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@10
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@RET_ADDRESS_LT12
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT12)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.moveball$if_true3
|
|
D;JNE
|
|
@ponggame.moveball$if_false3
|
|
0;JMP
|
|
(ponggame.moveball$if_true3)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@ponggame.moveball$if_end3
|
|
0;JMP
|
|
(ponggame.moveball$if_false3)
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@10
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@RET_ADDRESS_GT5
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT5)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ponggame.moveball$if_true4
|
|
D;JNE
|
|
@ponggame.moveball$if_false4
|
|
0;JMP
|
|
(ponggame.moveball$if_true4)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LC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
|
@R13
|
|
M=D
|
|
@output.movecursor
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL100
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL100)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@THIS
|
|
D=M
|
|
@4
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printint
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL101
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL101)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(ponggame.moveball$if_false2)
|
|
(ponggame.moveball$if_false1)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@ball.bounce
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL102
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL102)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(ponggame.moveball$if_false0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(array.new)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT6
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT6)
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@array.new$if_true0
|
|
D;JNE
|
|
@array.new$if_false0
|
|
0;JMP
|
|
(array.new$if_true0)
|
|
@2
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL103
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL103)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(array.new$if_false0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@memory.alloc
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL104
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL104)
|
|
@54
|
|
0;JMP
|
|
(array.dispose)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@memory.dealloc
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL105
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL105)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(keyboard.init)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(keyboard.keypressed)
|
|
@24576
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@memory.peek
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL106
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL106)
|
|
@54
|
|
0;JMP
|
|
(keyboard.readchar)
|
|
@SP
|
|
A=M
|
|
M=0
|
|
AD=A+1
|
|
M=0
|
|
@SP
|
|
M=D+1
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL107
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL107)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(keyboard.readchar$while_exp0)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ14
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ14)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT7
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT7)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@keyboard.readchar$while_end0
|
|
D;JNE
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@keyboard.keypressed
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL108
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL108)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT8
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT8)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@keyboard.readchar$if_true0
|
|
D;JNE
|
|
@keyboard.readchar$if_false0
|
|
0;JMP
|
|
(keyboard.readchar$if_true0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
(keyboard.readchar$if_false0)
|
|
@keyboard.readchar$while_exp0
|
|
0;JMP
|
|
(keyboard.readchar$while_end0)
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.backspace
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL109
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL109)
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL110
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL110)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL111
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL111)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(keyboard.readline)
|
|
@5
|
|
D=A
|
|
(LOOP_keyboard.readline)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_keyboard.readline
|
|
D;JGT
|
|
@80
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL112
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL112)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printstring
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL113
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL113)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.newline
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL114
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL114)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.backspace
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL115
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL115)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
(keyboard.readline$while_exp0)
|
|
@LCL
|
|
D=M
|
|
@4
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@keyboard.readline$while_end0
|
|
D;JNE
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@keyboard.readchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL116
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL116)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ15
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ15)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@LCL
|
|
D=M
|
|
@4
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@keyboard.readline$if_true0
|
|
D;JNE
|
|
@keyboard.readline$if_false0
|
|
0;JMP
|
|
(keyboard.readline$if_true0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ16
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ16)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@keyboard.readline$if_true1
|
|
D;JNE
|
|
@keyboard.readline$if_false1
|
|
0;JMP
|
|
(keyboard.readline$if_true1)
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.eraselastchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL117
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL117)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@keyboard.readline$if_end1
|
|
0;JMP
|
|
(keyboard.readline$if_false1)
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL118
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL118)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
(keyboard.readline$if_end1)
|
|
(keyboard.readline$if_false0)
|
|
@keyboard.readline$while_exp0
|
|
0;JMP
|
|
(keyboard.readline$while_end0)
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(keyboard.readint)
|
|
@SP
|
|
A=M
|
|
M=0
|
|
AD=A+1
|
|
M=0
|
|
@SP
|
|
M=D+1
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@keyboard.readline
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL119
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL119)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.intvalue
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL120
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL120)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.dispose
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL121
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL121)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JM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|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@math.multiply$while_exp0
|
|
0;JMP
|
|
(math.multiply$while_end0)
|
|
@LCL
|
|
D=M
|
|
@4
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@math.multiply$if_true2
|
|
D;JNE
|
|
@math.multiply$if_false2
|
|
0;JMP
|
|
(math.multiply$if_true2)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
(math.multiply$if_false2)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(math.divide)
|
|
@4
|
|
D=A
|
|
(LOOP_math.divide)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_math.divide
|
|
D;JGT
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ17
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ17)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@math.divide$if_true0
|
|
D;JNE
|
|
@math.divide$if_false0
|
|
0;JMP
|
|
(math.divide$if_true0)
|
|
@3
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
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A-1
|
|
M=D+M
|
|
@math.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
M=D
|
|
@THAT
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_GT14
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT14)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@math.divide$if_true2
|
|
D;JNE
|
|
@math.divide$if_false2
|
|
0;JMP
|
|
(math.divide$if_true2)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
(math.divide$if_false2)
|
|
(math.divide$if_false1)
|
|
@math.divide$while_exp0
|
|
0;JMP
|
|
(math.divide$while_end0)
|
|
(math.divide$while_exp1)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
A=M-1
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|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_GT19
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT19)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@math.max$if_true0
|
|
D;JNE
|
|
@math.max$if_false0
|
|
0;JMP
|
|
(math.max$if_true0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
A=M+1
|
|
M=D
|
|
(math.max$if_false0)
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(math.min)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_LT24
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT24)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@math.min$if_true0
|
|
D;JNE
|
|
@math.min$if_false0
|
|
0;JMP
|
|
(math.min$if_true0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
A=M+1
|
|
M=D
|
|
(math.min$if_false0)
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(memory.init)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
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
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.4
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.2
|
|
M=D
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@6
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL133
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL133)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.3
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.initmap
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL134
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL134)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.createshiftedmap
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL135
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL135)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.initmap)
|
|
@127
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|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|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@output.createshiftedmap$while_exp1
|
|
0;JMP
|
|
(output.createshiftedmap$while_end1)
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ21
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ21)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.createshiftedmap$if_true0
|
|
D;JNE
|
|
@output.createshiftedmap$if_false0
|
|
0;JMP
|
|
(output.createshiftedmap$if_true0)
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@output.createshiftedmap$if_end0
|
|
0;JMP
|
|
(output.createshiftedmap$if_false0)
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
(output.createshiftedmap$if_end0)
|
|
@output.createshiftedmap$while_exp0
|
|
0;JMP
|
|
(output.createshiftedmap$while_end0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.getmap)
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_LT29
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT29)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@126
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_GT22
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT22)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.getmap$if_true0
|
|
D;JNE
|
|
@output.getmap$if_false0
|
|
0;JMP
|
|
(output.getmap$if_true0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
A=M
|
|
M=D
|
|
(output.getmap$if_false0)
|
|
@output.2
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.getmap$if_true1
|
|
D;JNE
|
|
@output.getmap$if_false1
|
|
0;JMP
|
|
(output.getmap$if_true1)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@output.5
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
M=D
|
|
@THAT
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@output.getmap$if_end1
|
|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
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_LT30
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT30)
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.drawchar$while_end0
|
|
D;JNE
|
|
@output.2
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.drawchar$if_true0
|
|
D;JNE
|
|
@output.drawchar$if_false0
|
|
0;JMP
|
|
(output.drawchar$if_true0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@output.4
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
M=D
|
|
@THAT
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@256
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D&M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@output.drawchar$if_end0
|
|
0;JMP
|
|
(output.drawchar$if_false0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@output.4
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|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SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_LT32
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT32)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@63
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_GT24
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT24)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.movecursor$if_true0
|
|
D;JNE
|
|
@output.movecursor$if_false0
|
|
0;JMP
|
|
(output.movecursor$if_true0)
|
|
@20
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL238
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL238)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(output.movecursor$if_false0)
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@math.divide
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL239
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL239)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@32
|
|
D=A
|
|
@S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D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL242)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.printchar)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.newline
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL243
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL243)
|
|
@RET_ADDRESS_EQ23
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ23)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.printchar$if_true0
|
|
D;JNE
|
|
@output.printchar$if_false0
|
|
0;JMP
|
|
(output.printchar$if_true0)
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.println
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL244
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL244)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@output.printchar$if_end0
|
|
0;JMP
|
|
(output.printchar$if_false0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.backspace
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL245
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL245)
|
|
@RET_ADDRESS_EQ24
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ24)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.printchar$if_true1
|
|
D;JNE
|
|
@output.printchar$if_false1
|
|
0;JMP
|
|
(output.printchar$if_true1)
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.backspace
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL246
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL246)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@output.printchar$if_end1
|
|
0;JMP
|
|
(output.printchar$if_false1)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.drawchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL247
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL247)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@output.2
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.printchar$if_true2
|
|
D;JNE
|
|
@output.printchar$if_false2
|
|
0;JMP
|
|
(output.printchar$if_true2)
|
|
@output.0
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
(output.printchar$if_false2)
|
|
@output.0
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ25
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ25)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.printchar$if_true3
|
|
D;JNE
|
|
@output.printchar$if_false3
|
|
0;JMP
|
|
(output.printchar$if_true3)
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.println
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL248
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL248)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@output.printchar$if_end3
|
|
0;JMP
|
|
(output.printchar$if_false3)
|
|
@output.2
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.2
|
|
M=D
|
|
(output.printchar$if_end3)
|
|
(output.printchar$if_end1)
|
|
(output.printchar$if_end0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.printstring)
|
|
@SP
|
|
A=M
|
|
M=0
|
|
AD=A+1
|
|
M=0
|
|
@SP
|
|
M=D+1
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.length
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL249
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL249)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
(output.printstring$while_exp0)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_LT33
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT33)
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.printstring$while_end0
|
|
D;JNE
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.charat
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL250
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL250)
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL251
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL251)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@output.printstring$while_exp0
|
|
0;JMP
|
|
(output.printstring$while_end0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.printint)
|
|
@output.3
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.setint
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL252
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL252)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@output.3
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printstring
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL253
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL253)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.println)
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@352
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@output.0
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.2
|
|
M=D
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@8128
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ26
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ26)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.println$if_true0
|
|
D;JNE
|
|
@output.println$if_false0
|
|
0;JMP
|
|
(output.println$if_true0)
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
(output.println$if_false0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(output.backspace)
|
|
@output.2
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.backspace$if_true0
|
|
D;JNE
|
|
@output.backspace$if_false0
|
|
0;JMP
|
|
(output.backspace$if_true0)
|
|
@output.0
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT25
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT25)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.backspace$if_true1
|
|
D;JNE
|
|
@output.backspace$if_false1
|
|
0;JMP
|
|
(output.backspace$if_true1)
|
|
@output.0
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
@output.backspace$if_end1
|
|
0;JMP
|
|
(output.backspace$if_false1)
|
|
@31
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.0
|
|
M=D
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ27
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ27)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.backspace$if_true2
|
|
D;JNE
|
|
@output.backspace$if_false2
|
|
0;JMP
|
|
(output.backspace$if_true2)
|
|
@8128
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
(output.backspace$if_false2)
|
|
@output.1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@321
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.1
|
|
M=D
|
|
(output.backspace$if_end1)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.2
|
|
M=D
|
|
@output.backspace$if_end0
|
|
0;JMP
|
|
(output.backspace$if_false0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@output.2
|
|
M=D
|
|
(output.backspace$if_end0)
|
|
@32
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.drawchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL254
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL254)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(screen.init)
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@16384
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@screen.1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@screen.2
|
|
M=D
|
|
@17
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@array.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL255
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL255)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@screen.0
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
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drawconditional$if_true0)
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.drawpixel
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL261
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL261)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@screen.drawconditional$if_end0
|
|
0;JMP
|
|
(screen.drawconditional$if_false0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.drawpixel
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL262
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL262)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(screen.drawconditional$if_end0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(screen.drawline)
|
|
@11
|
|
D=A
|
|
(LOOP_screen.drawline)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_screen.drawline
|
|
D;JGT
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_LT38
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT38)
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
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@screen.drawline$if_end4
|
|
0;JMP
|
|
(screen.drawline$if_false4)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
(screen.drawline$if_end4)
|
|
(screen.drawline$if_end3)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
D=M
|
|
@6
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@3
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.drawconditional
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL270
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL270)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@screen.drawline$while_exp0
|
|
0;JMP
|
|
(screen.drawline$while_end0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(screen.drawrectangle)
|
|
@9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1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_LT46
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT46)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@ARG
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@255
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_GT35
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT35)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@screen.drawrectangle$if_true0
|
|
D;JNE
|
|
@screen.drawrectangle$if_false0
|
|
0;JMP
|
|
(screen.drawrectangle$if_true0)
|
|
@9
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL271
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL271)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(screen.drawrectangle$if_false0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@16
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@math.divide
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL272
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_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|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_LT47
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT47)
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@screen.drawrectangle$while_end1
|
|
D;JNE
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.updatelocation
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL279
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL279)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
@screen.drawrectangle$while_exp1
|
|
0;JMP
|
|
(screen.drawrectangle$while_end1)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@LCL
|
|
D=M
|
|
@5
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.updatelocation
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL280
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL280)
|
|
@SP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
D=M
|
|
@string.new$if_true0
|
|
D;JNE
|
|
@string.new$if_false0
|
|
0;JMP
|
|
(string.new$if_true0)
|
|
@14
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL305
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL305)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.new$if_false0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT44
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT44)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.new$if_true1
|
|
D;JNE
|
|
@string.new$if_false1
|
|
0;JMP
|
|
(string.new$if_true1)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@array.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL306
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL306)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
M=D
|
|
(string.new$if_false1)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@THIS
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(string.dispose)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT45
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT45)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.dispose$if_true0
|
|
D;JNE
|
|
@string.dispose$if_false0
|
|
0;JMP
|
|
(string.dispose$if_true0)
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@array.dispose
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL307
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL307)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.dispose$if_false0)
|
|
@THIS
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@memory.dealloc
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL308
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL308)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(string.length)
|
|
@ARG
|
|
A=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M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
A=M
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(string.appendchar)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@RET_ADDRESS_EQ32
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ32)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.appendchar$if_true0
|
|
D;JNE
|
|
@string.appendchar$if_false0
|
|
0;JMP
|
|
(string.appendchar$if_true0)
|
|
@17
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL311
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL311)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.appendchar$if_false0)
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
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@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL312
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL312)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.eraselastchar$if_false0)
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=M-D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(string.intvalue)
|
|
@5
|
|
D=A
|
|
(LOOP_string.intvalue)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_string.intvalue
|
|
D;JGT
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ34
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ34)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.intvalue$if_true0
|
|
D;JNE
|
|
@string.intvalue$if_false0
|
|
0;JMP
|
|
(string.intvalue$if_true0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(string.intvalue$if_false0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|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S_GT48)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D|M
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@LCL
|
|
D=M
|
|
@3
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.intvalue$if_true2
|
|
D;JNE
|
|
@string.intvalue$if_false2
|
|
0;JMP
|
|
(string.intvalue$if_true2)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@10
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@math.multiply
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL313
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL313)
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M
|
|
M=D
|
|
(string.intvalue$if_false2)
|
|
@string.intvalue$while_exp0
|
|
0;JMP
|
|
(string.intvalue$while_end0)
|
|
@LCL
|
|
D=M
|
|
@4
|
|
A=D+A
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.intvalue$if_true3
|
|
D;JNE
|
|
@string.intvalue$if_false3
|
|
0;JMP
|
|
(string.intvalue$if_true3)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
M=D
|
|
(string.intvalue$if_false3)
|
|
@LCL
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(string.setint)
|
|
@4
|
|
D=A
|
|
(LOOP_string.setint)
|
|
D=D-1
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@LOOP_string.setint
|
|
D;JGT
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
M=D
|
|
@THIS
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ36
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ36)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.setint$if_true0
|
|
D;JNE
|
|
@string.setint$if_false0
|
|
0;JMP
|
|
(string.setint$if_true0)
|
|
@19
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL314
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL314)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.setint$if_false0)
|
|
@6
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@array.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL315
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL315)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_LT61
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT61)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.setint$if_true1
|
|
D;JNE
|
|
@string.setint$if_false1
|
|
0;JMP
|
|
(string.setint$if_true1)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
A=A+1
|
|
M=D
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
A=M-1
|
|
D=!M
|
|
M=D+1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@ARG
|
|
A=M+1
|
|
M=D
|
|
(string.setint$if_false1)
|
|
@ARG
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
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
|
D=M
|
|
@R5
|
|
M=D
|
|
(string.setint$if_false3)
|
|
@LCL
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_EQ37
|
|
D=A
|
|
@6
|
|
0;JMP
|
|
(RET_ADDRESS_EQ37)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@string.setint$if_true4
|
|
D;JNE
|
|
@string.setint$if_false4
|
|
0;JMP
|
|
(string.setint$if_true4)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@THIS
|
|
A=M+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@48
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
M=D
|
|
@R5
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
A=M
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@string.setint$if_end4
|
|
0;JMP
|
|
(string.setint$if_false4)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
(string.setint$while_exp1)
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@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P
|
|
AM=M-1
|
|
D=M
|
|
@THAT
|
|
A=M
|
|
M=D
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
A=A-1
|
|
M=D+M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@THIS
|
|
A=M+1
|
|
A=A+1
|
|
M=D
|
|
@string.setint$while_exp1
|
|
0;JMP
|
|
(string.setint$while_end1)
|
|
(string.setint$if_end4)
|
|
@LCL
|
|
A=M+1
|
|
A=A+1
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@array.dispose
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL319
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL319)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@54
|
|
0;JMP
|
|
(string.newline)
|
|
@128
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(string.backspace)
|
|
@129
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(string.doublequote)
|
|
@34
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@54
|
|
0;JMP
|
|
(sys.init)
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@memory.init
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL320
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL320)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@math.init
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL321
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL321)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@screen.init
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL322
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL322)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.init
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL323
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL323)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@keyboard.init
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL324
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL324)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@main.main
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL325
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL325)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.halt
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL326
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL326)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(sys.halt)
|
|
(sys.halt$while_exp0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@sys.halt$while_end0
|
|
D;JNE
|
|
@sys.halt$while_exp0
|
|
0;JMP
|
|
(sys.halt$while_end0)
|
|
(sys.wait)
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=0
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_LT64
|
|
D=A
|
|
@38
|
|
0;JMP
|
|
(RET_ADDRESS_LT64)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@sys.wait$if_true0
|
|
D;JNE
|
|
@sys.wait$if_false0
|
|
0;JMP
|
|
(sys.wait$if_true0)
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=1
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.error
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL327
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL327)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
(sys.wait$if_false0)
|
|
(sys.wait$while_exp0)
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@SP
|
|
M=M+1
|
|
A=M-1
|
|
M=0
|
|
@RET_ADDRESS_GT50
|
|
D=A
|
|
@22
|
|
0;JMP
|
|
(RET_ADDRESS_GT50)
|
|
@SP
|
|
A=M-1
|
|
M=!M
|
|
@SP
|
|
AM=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
|
M=D
|
|
@string.new
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL328
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL328)
|
|
@69
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL329
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL329)
|
|
@82
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL330
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL330)
|
|
@82
|
|
D=A
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@2
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@string.appendchar
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL331
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL331)
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printstring
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL332
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL332)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@ARG
|
|
A=M
|
|
D=M
|
|
@SP
|
|
AM=M+1
|
|
A=A-1
|
|
M=D
|
|
@1
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@output.printint
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL333
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL333)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|
|
@0
|
|
D=A
|
|
@R13
|
|
M=D
|
|
@sys.halt
|
|
D=A
|
|
@R14
|
|
M=D
|
|
@RET_ADDRESS_CALL334
|
|
D=A
|
|
@95
|
|
0;JMP
|
|
(RET_ADDRESS_CALL334)
|
|
@SP
|
|
AM=M-1
|
|
D=M
|
|
@R5
|
|
M=D
|