The Elements of Computing Systems, My Workbook for the NAND to Tetris course.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nand2tetris/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm

443 lines
23 KiB

@256 // (L0:0) (writeConstantToRegister(SP, 256):256)
D=A // (L0:1) (writeConstantToRegister(SP, 256):256)
@SP // (L0:2) (writeConstantToRegister(SP, 256):261)
M=D // initialized SP to 256 // (L0:3) (writeConstantToRegister(SP, 256):261)
@1 // (L0:4) (writeConstantToRegister(LCL, 1):249)
D=-A // (L0:5) (writeConstantToRegister(LCL, 1):249)
@LCL // (L0:6) (writeConstantToRegister(LCL, 1):261)
M=D // initialized LCL to 1 // (L0:7) (writeConstantToRegister(LCL, 1):261)
@2 // (L0:8) (writeConstantToRegister(ARG, 2):249)
D=-A // (L0:9) (writeConstantToRegister(ARG, 2):249)
@ARG // (L0:10) (writeConstantToRegister(ARG, 2):261)
M=D // initialized ARG to 2 // (L0:11) (writeConstantToRegister(ARG, 2):261)
@3 // (L0:12) (writeConstantToRegister(THIS, 3):249)
D=-A // (L0:13) (writeConstantToRegister(THIS, 3):249)
@THIS // (L0:14) (writeConstantToRegister(THIS, 3):261)
M=D // initialized THIS to 3 // (L0:15) (writeConstantToRegister(THIS, 3):261)
@4 // (L0:16) (writeConstantToRegister(THAT, 4):249)
D=-A // (L0:17) (writeConstantToRegister(THAT, 4):249)
@THAT // (L0:18) (writeConstantToRegister(THAT, 4):261)
M=D // initialized THAT to 4 // (L0:19) (writeConstantToRegister(THAT, 4):261)
@6e7326e08d60c5537dbe2d92224d7534 // (L0:20) (push(label, 6e7326e08d60c5537dbe2d92224d7534):53)
D=A // (L0:21) (push(label, 6e7326e08d60c5537dbe2d92224d7534):53)
@SP // (L0:22) (writeDtoSPAndBump():62)
A=M // (L0:23) (writeDtoSPAndBump():62)
M=D // (L0:24) (writeDtoSPAndBump():62)
@SP // (L0:25) (increaseSP():72)
M=M+1 // (L0:26) (increaseSP():72)
@LCL // (L0:27) (push(register, LCL, 1):42)
AD=M // (L0:28) (push(register, LCL, 1):42)
@SP // (L0:29) (writeDtoSPAndBump():62)
A=M // (L0:30) (writeDtoSPAndBump():62)
M=D // (L0:31) (writeDtoSPAndBump():62)
@SP // (L0:32) (increaseSP():72)
M=M+1 // (L0:33) (increaseSP():72)
@ARG // (L0:34) (push(register, ARG, 1):42)
AD=M // (L0:35) (push(register, ARG, 1):42)
@SP // (L0:36) (writeDtoSPAndBump():62)
A=M // (L0:37) (writeDtoSPAndBump():62)
M=D // (L0:38) (writeDtoSPAndBump():62)
@SP // (L0:39) (increaseSP():72)
M=M+1 // (L0:40) (increaseSP():72)
@THIS // (L0:41) (push(register, THIS, 1):42)
AD=M // (L0:42) (push(register, THIS, 1):42)
@SP // (L0:43) (writeDtoSPAndBump():62)
A=M // (L0:44) (writeDtoSPAndBump():62)
M=D // (L0:45) (writeDtoSPAndBump():62)
@SP // (L0:46) (increaseSP():72)
M=M+1 // (L0:47) (increaseSP():72)
@THAT // (L0:48) (push(register, THAT, 1):42)
AD=M // (L0:49) (push(register, THAT, 1):42)
@SP // (L0:50) (writeDtoSPAndBump():62)
A=M // (L0:51) (writeDtoSPAndBump():62)
M=D // (L0:52) (writeDtoSPAndBump():62)
@SP // (L0:53) (increaseSP():72)
M=M+1 // (L0:54) (increaseSP():72)
@SP // (L0:55) (copy(SP, LCL):186)
D=M // (L0:56) (copy(SP, LCL):186)
@LCL // (L0:57) (copy(SP, LCL):186)
M=D // Update LCL=SP // (L0:58) (copy(SP, LCL):186)
@SP // (L0:59) (loadOffsetToD(SP, 5, -):193)
D=M // (L0:60) (loadOffsetToD(SP, 5, -):193)
D=D-1 // should repeat 5 times // (L0:61) (loadOffsetToD(SP, 5, -):198)
D=D-1 // should repeat 5 times // (L0:62) (loadOffsetToD(SP, 5, -):198)
D=D-1 // should repeat 5 times // (L0:63) (loadOffsetToD(SP, 5, -):198)
D=D-1 // should repeat 5 times // (L0:64) (loadOffsetToD(SP, 5, -):198)
D=D-1 // should repeat 5 times // (L0:65) (loadOffsetToD(SP, 5, -):198)
@ARG // write SP-$offset to ARG // (L0:66) (writeCall(Sys.init, 0):230)
M=D // (L0:67) (writeCall(Sys.init, 0):230)
@Sys.init // Jump to Sys.init // (L0:68) (writeCall(Sys.init, 0):230)
0;JMP // (L0:69) (writeCall(Sys.init, 0):230)
(6e7326e08d60c5537dbe2d92224d7534) // return back from function here (CALL ENDS) // (L0:70) (writeCall(Sys.init, 0):230)
(__GLOBAL_TERMINATE__) // (L0:70) (writeCall(Sys.init, 0):237)
@__GLOBAL_TERMINATE__ // (L0:70) (writeCall(Sys.init, 0):237)
0;JMP // (L0:71) (writeCall(Sys.init, 0):237)
(Main.fibonacci) // function Main.fibonacci 0 // (L0:72) (writeFunction(Main.fibonacci, 0):156)
@ARG // (L1:72) (writePush(argument, 0):494)
A=M // (L1:73) (writePush(argument, 0):494)
D=M // (L1:74) (writePush(argument, 0):494)
@SP // (L1:75) (writeDtoSPAndBump():62)
A=M // (L1:76) (writeDtoSPAndBump():62)
M=D // (L1:77) (writeDtoSPAndBump():62)
@SP // (L1:78) (increaseSP():72)
M=M+1 // (L1:79) (increaseSP():72)
@2 // push constant 2 // (L2:80) (writePush(constant, 2):479)
D=A // (L2:81) (writePush(constant, 2):479)
@SP // (L2:82) (writeDtoSPAndBump():62)
A=M // (L2:83) (writeDtoSPAndBump():62)
M=D // (L2:84) (writeDtoSPAndBump():62)
@SP // (L2:85) (increaseSP():72)
M=M+1 // (L2:86) (increaseSP():72)
@SP // ==== lt ==== // (L3:87) (writeArithmetic(lt):408)
A=M-1 // (L3:88) (writeArithmetic(lt):408)
D=M // (L3:89) (writeArithmetic(lt):408)
A=A-1 // (L3:90) (booleanCompare(LT):398)
D=M-D // (L3:91) (booleanCompare(LT):398)
M=0 // (L3:92) (booleanCompare(LT):398)
M=M-1 // (L3:93) (booleanCompare(LT):398)
@100 // (L3:94) (booleanCompare(LT):398)
D;JLT // (L3:95) (booleanCompare(LT):398)
@SP // (L3:96) (booleanCompare(LT):398)
A=M-1 // (L3:97) (booleanCompare(LT):398)
A=A-1 // (L3:98) (booleanCompare(LT):398)
M=0 // (L3:99) (booleanCompare(LT):398)
@SP // (L3:100) (writeArithmetic(lt):441)
M=M-1 // end lt // (L3:101) (writeArithmetic(lt):441)
@SP // (L4:102) (writeIf(IF_TRUE):346)
AM=M-1 // (L4:103) (writeIf(IF_TRUE):346)
D=M // (L4:104) (writeIf(IF_TRUE):346)
@Main.fibonacciIF_TRUE // (L4:105) (writeIf(IF_TRUE):346)
D;JNE // end if-goto IF_TRUE // (L4:106) (writeIf(IF_TRUE):346)
@Main.fibonacciIF_FALSE // (L5:107) (writeGoto(IF_FALSE):329)
0;JMP // end goto IF_FALSE // (L5:108) (writeGoto(IF_FALSE):329)
(Main.fibonacciIF_TRUE) // end label IF_TRUE // (L6:109) (writeLabel(IF_TRUE):308)
@ARG // (L7:109) (writePush(argument, 0):494)
A=M // (L7:110) (writePush(argument, 0):494)
D=M // (L7:111) (writePush(argument, 0):494)
@SP // (L7:112) (writeDtoSPAndBump():62)
A=M // (L7:113) (writeDtoSPAndBump():62)
M=D // (L7:114) (writeDtoSPAndBump():62)
@SP // (L7:115) (increaseSP():72)
M=M+1 // (L7:116) (increaseSP():72)
@LCL // save return address first // (L8:117) (writeReturn():143)
A=M-1 // (L8:118) (writeReturn():143)
A=A-1 // (L8:119) (writeReturn():143)
A=A-1 // (L8:120) (writeReturn():143)
A=A-1 // (L8:121) (writeReturn():143)
A=A-1 // (L8:122) (writeReturn():143)
D=M // D now holds the return address // (L8:123) (writeReturn():143)
@R14 // (L8:124) (writeReturn():143)
M=D // Wrote the return address to R14 // (L8:125) (writeReturn():143)
@SP // return for Main.fibonacci starts // (L8:126) (writeReturn():143)
A=M-1 // (L8:127) (writeReturn():143)
D=M // (L8:128) (writeReturn():143)
@ARG // (L8:129) (writeReturn():143)
A=M // (L8:130) (writeReturn():143)
M=D // (L8:131) (writeReturn():143)
@ARG // (L8:132) (writeReturn():143)
D=M+1 // (L8:133) (writeReturn():143)
@SP // (L8:134) (writeReturn():143)
M=D // @SP = ARG+1 // (L8:135) (writeReturn():143)
@LCL // (L8:136) (writeReturn():143)
D=M // (L8:137) (writeReturn():143)
@R13 // (L8:138) (writeReturn():143)
M=D // Save LCL to R13 = FRAME // (L8:139) (writeReturn():143)
A=D-1 // A=*LCL-1 // (L8:140) (writeReturn():143)
D=M // D=*(*LCL-1) // (L8:141) (writeReturn():143)
@THAT // A=THAT // (L8:142) (writeReturn():143)
M=D // *that = *(*lcl-1) // (L8:143) (writeReturn():143)
@R13 // (L8:144) (writeReturn():143)
A=M-1 // (L8:145) (writeReturn():143)
A=A-1 // A=*LCL-2 // (L8:146) (writeReturn():143)
D=M // D=*(*LCL-2) // (L8:147) (writeReturn():143)
@THIS // A=THIS // (L8:148) (writeReturn():143)
M=D // *THIS = *(*lcl-2) // (L8:149) (writeReturn():143)
@R13 // (L8:150) (writeReturn():143)
A=M-1 // (L8:151) (writeReturn():143)
A=A-1 // (L8:152) (writeReturn():143)
A=A-1 // A=*LCL-3 // (L8:153) (writeReturn():143)
D=M // D=*(*LCL-3) // (L8:154) (writeReturn():143)
@ARG // A=ARG // (L8:155) (writeReturn():143)
M=D // *ARG = *(*lcl-3) // (L8:156) (writeReturn():143)
@R13 // (L8:157) (writeReturn():143)
A=M-1 // (L8:158) (writeReturn():143)
A=A-1 // (L8:159) (writeReturn():143)
A=A-1 // (L8:160) (writeReturn():143)
A=A-1 // A=*LCL-4 // (L8:161) (writeReturn():143)
D=M // D=*(*LCL-4) // (L8:162) (writeReturn():143)
@LCL // A=LCL // (L8:163) (writeReturn():143)
M=D // *LCL = *(*lcl-4) // (L8:164) (writeReturn():143)
@R14 // (L8:165) (writeReturn():143)
A=M // (L8:166) (writeReturn():143)
0;JMP // HyperJump to *(LCL-5) // (L8:167) (writeReturn():143)
(Main.fibonacciIF_FALSE) // end label IF_FALSE // (L9:168) (writeLabel(IF_FALSE):308)
@ARG // (L10:168) (writePush(argument, 0):494)
A=M // (L10:169) (writePush(argument, 0):494)
D=M // (L10:170) (writePush(argument, 0):494)
@SP // (L10:171) (writeDtoSPAndBump():62)
A=M // (L10:172) (writeDtoSPAndBump():62)
M=D // (L10:173) (writeDtoSPAndBump():62)
@SP // (L10:174) (increaseSP():72)
M=M+1 // (L10:175) (increaseSP():72)
@2 // push constant 2 // (L11:176) (writePush(constant, 2):479)
D=A // (L11:177) (writePush(constant, 2):479)
@SP // (L11:178) (writeDtoSPAndBump():62)
A=M // (L11:179) (writeDtoSPAndBump():62)
M=D // (L11:180) (writeDtoSPAndBump():62)
@SP // (L11:181) (increaseSP():72)
M=M+1 // (L11:182) (increaseSP():72)
@SP // ==== sub ==== // (L12:183) (writeArithmetic(sub):408)
A=M-1 // (L12:184) (writeArithmetic(sub):408)
D=M // (L12:185) (writeArithmetic(sub):408)
A=A-1 // (L12:186) (binaryMath(sub):362)
M=D-M // (L12:187) (binaryMath(sub):362)
M=-M // (L12:188) (binaryMath(sub):367)
@SP // (L12:189) (writeArithmetic(sub):441)
M=M-1 // end sub // (L12:190) (writeArithmetic(sub):441)
@6d2922146084c2a55380cd1ec9a8cea5 // (L13:191) (push(label, 6d2922146084c2a55380cd1ec9a8cea5):53)
D=A // (L13:192) (push(label, 6d2922146084c2a55380cd1ec9a8cea5):53)
@SP // (L13:193) (writeDtoSPAndBump():62)
A=M // (L13:194) (writeDtoSPAndBump():62)
M=D // (L13:195) (writeDtoSPAndBump():62)
@SP // (L13:196) (increaseSP():72)
M=M+1 // (L13:197) (increaseSP():72)
@LCL // (L13:198) (push(register, LCL, 1):42)
AD=M // (L13:199) (push(register, LCL, 1):42)
@SP // (L13:200) (writeDtoSPAndBump():62)
A=M // (L13:201) (writeDtoSPAndBump():62)
M=D // (L13:202) (writeDtoSPAndBump():62)
@SP // (L13:203) (increaseSP():72)
M=M+1 // (L13:204) (increaseSP():72)
@ARG // (L13:205) (push(register, ARG, 1):42)
AD=M // (L13:206) (push(register, ARG, 1):42)
@SP // (L13:207) (writeDtoSPAndBump():62)
A=M // (L13:208) (writeDtoSPAndBump():62)
M=D // (L13:209) (writeDtoSPAndBump():62)
@SP // (L13:210) (increaseSP():72)
M=M+1 // (L13:211) (increaseSP():72)
@THIS // (L13:212) (push(register, THIS, 1):42)
AD=M // (L13:213) (push(register, THIS, 1):42)
@SP // (L13:214) (writeDtoSPAndBump():62)
A=M // (L13:215) (writeDtoSPAndBump():62)
M=D // (L13:216) (writeDtoSPAndBump():62)
@SP // (L13:217) (increaseSP():72)
M=M+1 // (L13:218) (increaseSP():72)
@THAT // (L13:219) (push(register, THAT, 1):42)
AD=M // (L13:220) (push(register, THAT, 1):42)
@SP // (L13:221) (writeDtoSPAndBump():62)
A=M // (L13:222) (writeDtoSPAndBump():62)
M=D // (L13:223) (writeDtoSPAndBump():62)
@SP // (L13:224) (increaseSP():72)
M=M+1 // (L13:225) (increaseSP():72)
@SP // (L13:226) (copy(SP, LCL):186)
D=M // (L13:227) (copy(SP, LCL):186)
@LCL // (L13:228) (copy(SP, LCL):186)
M=D // Update LCL=SP // (L13:229) (copy(SP, LCL):186)
@SP // (L13:230) (loadOffsetToD(SP, 6, -):193)
D=M // (L13:231) (loadOffsetToD(SP, 6, -):193)
D=D-1 // should repeat 6 times // (L13:232) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L13:233) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L13:234) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L13:235) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L13:236) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L13:237) (loadOffsetToD(SP, 6, -):198)
@ARG // write SP-$offset to ARG // (L13:238) (writeCall(Main.fibonacci, 1):230)
M=D // (L13:239) (writeCall(Main.fibonacci, 1):230)
@Main.fibonacci // Jump to Main.fibonacci // (L13:240) (writeCall(Main.fibonacci, 1):230)
0;JMP // (L13:241) (writeCall(Main.fibonacci, 1):230)
(6d2922146084c2a55380cd1ec9a8cea5) // return back from function here (CALL ENDS) // (L13:242) (writeCall(Main.fibonacci, 1):230)
@ARG // (L14:242) (writePush(argument, 0):494)
A=M // (L14:243) (writePush(argument, 0):494)
D=M // (L14:244) (writePush(argument, 0):494)
@SP // (L14:245) (writeDtoSPAndBump():62)
A=M // (L14:246) (writeDtoSPAndBump():62)
M=D // (L14:247) (writeDtoSPAndBump():62)
@SP // (L14:248) (increaseSP():72)
M=M+1 // (L14:249) (increaseSP():72)
@1 // push constant 1 // (L15:250) (writePush(constant, 1):479)
D=A // (L15:251) (writePush(constant, 1):479)
@SP // (L15:252) (writeDtoSPAndBump():62)
A=M // (L15:253) (writeDtoSPAndBump():62)
M=D // (L15:254) (writeDtoSPAndBump():62)
@SP // (L15:255) (increaseSP():72)
M=M+1 // (L15:256) (increaseSP():72)
@SP // ==== sub ==== // (L16:257) (writeArithmetic(sub):408)
A=M-1 // (L16:258) (writeArithmetic(sub):408)
D=M // (L16:259) (writeArithmetic(sub):408)
A=A-1 // (L16:260) (binaryMath(sub):362)
M=D-M // (L16:261) (binaryMath(sub):362)
M=-M // (L16:262) (binaryMath(sub):367)
@SP // (L16:263) (writeArithmetic(sub):441)
M=M-1 // end sub // (L16:264) (writeArithmetic(sub):441)
@a7aac510d992984b8f917d1b5a72010a // (L17:265) (push(label, a7aac510d992984b8f917d1b5a72010a):53)
D=A // (L17:266) (push(label, a7aac510d992984b8f917d1b5a72010a):53)
@SP // (L17:267) (writeDtoSPAndBump():62)
A=M // (L17:268) (writeDtoSPAndBump():62)
M=D // (L17:269) (writeDtoSPAndBump():62)
@SP // (L17:270) (increaseSP():72)
M=M+1 // (L17:271) (increaseSP():72)
@LCL // (L17:272) (push(register, LCL, 1):42)
AD=M // (L17:273) (push(register, LCL, 1):42)
@SP // (L17:274) (writeDtoSPAndBump():62)
A=M // (L17:275) (writeDtoSPAndBump():62)
M=D // (L17:276) (writeDtoSPAndBump():62)
@SP // (L17:277) (increaseSP():72)
M=M+1 // (L17:278) (increaseSP():72)
@ARG // (L17:279) (push(register, ARG, 1):42)
AD=M // (L17:280) (push(register, ARG, 1):42)
@SP // (L17:281) (writeDtoSPAndBump():62)
A=M // (L17:282) (writeDtoSPAndBump():62)
M=D // (L17:283) (writeDtoSPAndBump():62)
@SP // (L17:284) (increaseSP():72)
M=M+1 // (L17:285) (increaseSP():72)
@THIS // (L17:286) (push(register, THIS, 1):42)
AD=M // (L17:287) (push(register, THIS, 1):42)
@SP // (L17:288) (writeDtoSPAndBump():62)
A=M // (L17:289) (writeDtoSPAndBump():62)
M=D // (L17:290) (writeDtoSPAndBump():62)
@SP // (L17:291) (increaseSP():72)
M=M+1 // (L17:292) (increaseSP():72)
@THAT // (L17:293) (push(register, THAT, 1):42)
AD=M // (L17:294) (push(register, THAT, 1):42)
@SP // (L17:295) (writeDtoSPAndBump():62)
A=M // (L17:296) (writeDtoSPAndBump():62)
M=D // (L17:297) (writeDtoSPAndBump():62)
@SP // (L17:298) (increaseSP():72)
M=M+1 // (L17:299) (increaseSP():72)
@SP // (L17:300) (copy(SP, LCL):186)
D=M // (L17:301) (copy(SP, LCL):186)
@LCL // (L17:302) (copy(SP, LCL):186)
M=D // Update LCL=SP // (L17:303) (copy(SP, LCL):186)
@SP // (L17:304) (loadOffsetToD(SP, 6, -):193)
D=M // (L17:305) (loadOffsetToD(SP, 6, -):193)
D=D-1 // should repeat 6 times // (L17:306) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L17:307) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L17:308) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L17:309) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L17:310) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L17:311) (loadOffsetToD(SP, 6, -):198)
@ARG // write SP-$offset to ARG // (L17:312) (writeCall(Main.fibonacci, 1):230)
M=D // (L17:313) (writeCall(Main.fibonacci, 1):230)
@Main.fibonacci // Jump to Main.fibonacci // (L17:314) (writeCall(Main.fibonacci, 1):230)
0;JMP // (L17:315) (writeCall(Main.fibonacci, 1):230)
(a7aac510d992984b8f917d1b5a72010a) // return back from function here (CALL ENDS) // (L17:316) (writeCall(Main.fibonacci, 1):230)
@SP // ==== add ==== // (L18:316) (writeArithmetic(add):408)
A=M-1 // (L18:317) (writeArithmetic(add):408)
D=M // (L18:318) (writeArithmetic(add):408)
A=A-1 // (L18:319) (binaryMath(add):362)
M=D+M // (L18:320) (binaryMath(add):362)
@SP // (L18:321) (writeArithmetic(add):441)
M=M-1 // end add // (L18:322) (writeArithmetic(add):441)
@LCL // save return address first // (L19:323) (writeReturn():143)
A=M-1 // (L19:324) (writeReturn():143)
A=A-1 // (L19:325) (writeReturn():143)
A=A-1 // (L19:326) (writeReturn():143)
A=A-1 // (L19:327) (writeReturn():143)
A=A-1 // (L19:328) (writeReturn():143)
D=M // D now holds the return address // (L19:329) (writeReturn():143)
@R14 // (L19:330) (writeReturn():143)
M=D // Wrote the return address to R14 // (L19:331) (writeReturn():143)
@SP // return for Main.fibonacci starts // (L19:332) (writeReturn():143)
A=M-1 // (L19:333) (writeReturn():143)
D=M // (L19:334) (writeReturn():143)
@ARG // (L19:335) (writeReturn():143)
A=M // (L19:336) (writeReturn():143)
M=D // (L19:337) (writeReturn():143)
@ARG // (L19:338) (writeReturn():143)
D=M+1 // (L19:339) (writeReturn():143)
@SP // (L19:340) (writeReturn():143)
M=D // @SP = ARG+1 // (L19:341) (writeReturn():143)
@LCL // (L19:342) (writeReturn():143)
D=M // (L19:343) (writeReturn():143)
@R13 // (L19:344) (writeReturn():143)
M=D // Save LCL to R13 = FRAME // (L19:345) (writeReturn():143)
A=D-1 // A=*LCL-1 // (L19:346) (writeReturn():143)
D=M // D=*(*LCL-1) // (L19:347) (writeReturn():143)
@THAT // A=THAT // (L19:348) (writeReturn():143)
M=D // *that = *(*lcl-1) // (L19:349) (writeReturn():143)
@R13 // (L19:350) (writeReturn():143)
A=M-1 // (L19:351) (writeReturn():143)
A=A-1 // A=*LCL-2 // (L19:352) (writeReturn():143)
D=M // D=*(*LCL-2) // (L19:353) (writeReturn():143)
@THIS // A=THIS // (L19:354) (writeReturn():143)
M=D // *THIS = *(*lcl-2) // (L19:355) (writeReturn():143)
@R13 // (L19:356) (writeReturn():143)
A=M-1 // (L19:357) (writeReturn():143)
A=A-1 // (L19:358) (writeReturn():143)
A=A-1 // A=*LCL-3 // (L19:359) (writeReturn():143)
D=M // D=*(*LCL-3) // (L19:360) (writeReturn():143)
@ARG // A=ARG // (L19:361) (writeReturn():143)
M=D // *ARG = *(*lcl-3) // (L19:362) (writeReturn():143)
@R13 // (L19:363) (writeReturn():143)
A=M-1 // (L19:364) (writeReturn():143)
A=A-1 // (L19:365) (writeReturn():143)
A=A-1 // (L19:366) (writeReturn():143)
A=A-1 // A=*LCL-4 // (L19:367) (writeReturn():143)
D=M // D=*(*LCL-4) // (L19:368) (writeReturn():143)
@LCL // A=LCL // (L19:369) (writeReturn():143)
M=D // *LCL = *(*lcl-4) // (L19:370) (writeReturn():143)
@R14 // (L19:371) (writeReturn():143)
A=M // (L19:372) (writeReturn():143)
0;JMP // HyperJump to *(LCL-5) // (L19:373) (writeReturn():143)
(Sys.init) // function Sys.init 0 // (L20:374) (writeFunction(Sys.init, 0):156)
@4 // push constant 4 // (L21:374) (writePush(constant, 4):479)
D=A // (L21:375) (writePush(constant, 4):479)
@SP // (L21:376) (writeDtoSPAndBump():62)
A=M // (L21:377) (writeDtoSPAndBump():62)
M=D // (L21:378) (writeDtoSPAndBump():62)
@SP // (L21:379) (increaseSP():72)
M=M+1 // (L21:380) (increaseSP():72)
@cec5690d4862446080b0f0423fc92b55 // (L22:381) (push(label, cec5690d4862446080b0f0423fc92b55):53)
D=A // (L22:382) (push(label, cec5690d4862446080b0f0423fc92b55):53)
@SP // (L22:383) (writeDtoSPAndBump():62)
A=M // (L22:384) (writeDtoSPAndBump():62)
M=D // (L22:385) (writeDtoSPAndBump():62)
@SP // (L22:386) (increaseSP():72)
M=M+1 // (L22:387) (increaseSP():72)
@LCL // (L22:388) (push(register, LCL, 1):42)
AD=M // (L22:389) (push(register, LCL, 1):42)
@SP // (L22:390) (writeDtoSPAndBump():62)
A=M // (L22:391) (writeDtoSPAndBump():62)
M=D // (L22:392) (writeDtoSPAndBump():62)
@SP // (L22:393) (increaseSP():72)
M=M+1 // (L22:394) (increaseSP():72)
@ARG // (L22:395) (push(register, ARG, 1):42)
AD=M // (L22:396) (push(register, ARG, 1):42)
@SP // (L22:397) (writeDtoSPAndBump():62)
A=M // (L22:398) (writeDtoSPAndBump():62)
M=D // (L22:399) (writeDtoSPAndBump():62)
@SP // (L22:400) (increaseSP():72)
M=M+1 // (L22:401) (increaseSP():72)
@THIS // (L22:402) (push(register, THIS, 1):42)
AD=M // (L22:403) (push(register, THIS, 1):42)
@SP // (L22:404) (writeDtoSPAndBump():62)
A=M // (L22:405) (writeDtoSPAndBump():62)
M=D // (L22:406) (writeDtoSPAndBump():62)
@SP // (L22:407) (increaseSP():72)
M=M+1 // (L22:408) (increaseSP():72)
@THAT // (L22:409) (push(register, THAT, 1):42)
AD=M // (L22:410) (push(register, THAT, 1):42)
@SP // (L22:411) (writeDtoSPAndBump():62)
A=M // (L22:412) (writeDtoSPAndBump():62)
M=D // (L22:413) (writeDtoSPAndBump():62)
@SP // (L22:414) (increaseSP():72)
M=M+1 // (L22:415) (increaseSP():72)
@SP // (L22:416) (copy(SP, LCL):186)
D=M // (L22:417) (copy(SP, LCL):186)
@LCL // (L22:418) (copy(SP, LCL):186)
M=D // Update LCL=SP // (L22:419) (copy(SP, LCL):186)
@SP // (L22:420) (loadOffsetToD(SP, 6, -):193)
D=M // (L22:421) (loadOffsetToD(SP, 6, -):193)
D=D-1 // should repeat 6 times // (L22:422) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L22:423) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L22:424) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L22:425) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L22:426) (loadOffsetToD(SP, 6, -):198)
D=D-1 // should repeat 6 times // (L22:427) (loadOffsetToD(SP, 6, -):198)
@ARG // write SP-$offset to ARG // (L22:428) (writeCall(Main.fibonacci, 1):230)
M=D // (L22:429) (writeCall(Main.fibonacci, 1):230)
@Main.fibonacci // Jump to Main.fibonacci // (L22:430) (writeCall(Main.fibonacci, 1):230)
0;JMP // (L22:431) (writeCall(Main.fibonacci, 1):230)
(cec5690d4862446080b0f0423fc92b55) // return back from function here (CALL ENDS) // (L22:432) (writeCall(Main.fibonacci, 1):230)
@433 // (L23:432) (close():298)
0;JMP // (L23:433) (close():298)