From d3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 20 Jan 2018 15:41:49 +0100 Subject: rearranged the dir for github - removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes --- projects/00/file.txt | 6 - projects/01/And.cmp | 5 - projects/01/And.hdl | 20 - projects/01/And.out | 5 - projects/01/And.tst | 29 - projects/01/And16.cmp | 7 - projects/01/And16.hdl | 33 - projects/01/And16.out | 7 - projects/01/And16.tst | 39 - projects/01/And1With16.hdl | 22 - projects/01/DMux.cmp | 5 - projects/01/DMux.hdl | 21 - projects/01/DMux.out | 5 - projects/01/DMux.tst | 27 - projects/01/DMux4Way.cmp | 9 - projects/01/DMux4Way.hdl | 23 - projects/01/DMux4Way.out | 9 - projects/01/DMux4Way.tst | 43 - projects/01/DMux8Way.cmp | 17 - projects/01/DMux8Way.hdl | 23 - projects/01/DMux8Way.out | 17 - projects/01/DMux8Way.tst | 75 - projects/01/Mux.cmp | 9 - projects/01/Mux.hdl | 22 - projects/01/Mux.out | 9 - projects/01/Mux.tst | 49 - projects/01/Mux16.cmp | 9 - projects/01/Mux16.hdl | 34 - projects/01/Mux16.out | 9 - projects/01/Mux16.tst | 49 - projects/01/Mux4Way16.cmp | 9 - projects/01/Mux4Way16.hdl | 23 - projects/01/Mux4Way16.out | 9 - projects/01/Mux4Way16.tst | 49 - projects/01/Mux8Way16.cmp | 17 - projects/01/Mux8Way16.hdl | 25 - projects/01/Mux8Way16.out | 17 - projects/01/Mux8Way16.tst | 89 - projects/01/Not.cmp | 3 - projects/01/Not.hdl | 18 - projects/01/Not.out | 3 - projects/01/Not.tst | 17 - projects/01/Not16.cmp | 6 - projects/01/Not16.hdl | 33 - projects/01/Not16.out | 6 - projects/01/Not16.tst | 29 - projects/01/Or.cmp | 5 - projects/01/Or.hdl | 21 - projects/01/Or.out | 5 - projects/01/Or.tst | 29 - projects/01/Or16.cmp | 7 - projects/01/Or16.hdl | 33 - projects/01/Or16.out | 7 - projects/01/Or16.tst | 39 - projects/01/Or8Way.cmp | 6 - projects/01/Or8Way.hdl | 24 - projects/01/Or8Way.out | 6 - projects/01/Or8Way.tst | 29 - projects/01/Xor.cmp | 5 - projects/01/Xor.hdl | 22 - projects/01/Xor.out | 5 - projects/01/Xor.tst | 29 - projects/02/ALU-nostat.cmp | 37 - projects/02/ALU-nostat.tst | 353 - projects/02/ALU.cmp | 37 - projects/02/ALU.hdl | 62 - projects/02/ALU.out | 37 - projects/02/ALU.tst | 377 - projects/02/Add16.cmp | 7 - projects/02/Add16.hdl | 33 - projects/02/Add16.out | 7 - projects/02/Add16.tst | 39 - projects/02/FullAdder.cmp | 9 - projects/02/FullAdder.hdl | 20 - projects/02/FullAdder.out | 9 - projects/02/FullAdder.tst | 47 - projects/02/HalfAdder.cmp | 5 - projects/02/HalfAdder.hdl | 19 - projects/02/HalfAdder.out | 5 - projects/02/HalfAdder.tst | 29 - projects/02/Inc16.cmp | 5 - projects/02/Inc16.hdl | 18 - projects/02/Inc16.out | 5 - projects/02/Inc16.tst | 25 - projects/02/Test.hdl | 8 - projects/03/a/Bit.cmp | 215 - projects/03/a/Bit.hdl | 21 - projects/03/a/Bit.out | 215 - projects/03/a/Bit.tst | 865 - projects/03/a/PC.cmp | 31 - projects/03/a/PC.hdl | 32 - projects/03/a/PC.out | 31 - projects/03/a/PC.tst | 125 - projects/03/a/RAM64.cmp | 320 - projects/03/a/RAM64.hdl | 29 - projects/03/a/RAM64.out | 320 - projects/03/a/RAM64.tst | 1026 - projects/03/a/RAM8.cmp | 173 - projects/03/a/RAM8.hdl | 29 - projects/03/a/RAM8.out | 8 - projects/03/a/RAM8.tst | 560 - projects/03/a/Register.cmp | 149 - projects/03/a/Register.hdl | 34 - projects/03/a/Register.out | 149 - projects/03/a/Register.tst | 569 - projects/03/b/RAM16K.cmp | 320 - projects/03/b/RAM16K.hdl | 25 - projects/03/b/RAM16K.out | 320 - projects/03/b/RAM16K.tst | 1026 - projects/03/b/RAM4K.cmp | 320 - projects/03/b/RAM4K.hdl | 29 - projects/03/b/RAM4K.tst | 1026 - projects/03/b/RAM512.cmp | 320 - projects/03/b/RAM512.hdl | 29 - projects/03/b/RAM512.tst | 1027 - projects/04/fill/Fill.asm | 76 - projects/04/fill/Fill.tst | 11 - projects/04/fill/FillAutomatic.cmp | 4 - projects/04/fill/FillAutomatic.out | 4 - projects/04/fill/FillAutomatic.tst | 37 - projects/04/mult/Mult.asm | 33 - projects/04/mult/Mult.cmp | 7 - projects/04/mult/Mult.out | 7 - projects/04/mult/Mult.tst | 74 - projects/05/Add.hack | 6 - projects/05/CPU-external.cmp | 93 - projects/05/CPU-external.tst | 150 - projects/05/CPU.cmp | 93 - projects/05/CPU.hdl | 82 - projects/05/CPU.out | 93 - projects/05/CPU.tst | 150 - projects/05/Computer.hdl | 26 - projects/05/ComputerAdd-external.cmp | 15 - projects/05/ComputerAdd-external.tst | 32 - projects/05/ComputerAdd.cmp | 15 - projects/05/ComputerAdd.out | 15 - projects/05/ComputerAdd.tst | 32 - projects/05/ComputerMax-external.cmp | 28 - projects/05/ComputerMax-external.tst | 38 - projects/05/ComputerMax.cmp | 28 - projects/05/ComputerMax.out | 28 - projects/05/ComputerMax.tst | 39 - projects/05/ComputerRect-external.cmp | 65 - projects/05/ComputerRect-external.tst | 26 - projects/05/ComputerRect.cmp | 65 - projects/05/ComputerRect.out | 65 - projects/05/ComputerRect.tst | 26 - projects/05/Max.hack | 16 - projects/05/Memory.cmp | 54 - projects/05/Memory.hdl | 45 - projects/05/Memory.out | 54 - projects/05/Memory.tst | 163 - projects/05/Rect.hack | 25 - projects/06/Assembler | Bin 70984 -> 0 bytes projects/06/Assembler.hi | Bin 2061 -> 0 bytes projects/06/Assembler.hs | 106 - projects/06/Assembler.o | Bin 81056 -> 0 bytes projects/06/add/Add.asm | 13 - projects/06/add/Add.hack | 6 - projects/06/max/Max.asm | 26 - projects/06/max/Max.hack | 16 - projects/06/max/MaxL.asm | 23 - projects/06/pong/Pong.asm | 28375 ------------------- projects/06/pong/Pong.hack | 27483 ------------------ projects/06/pong/PongL.asm | 27490 ------------------ projects/06/rect/Rect.asm | 35 - projects/06/rect/Rect.hack | 25 - projects/06/rect/RectL.asm | 32 - projects/07/MemoryAccess/BasicTest/BasicTest.asm | 250 - projects/07/MemoryAccess/BasicTest/BasicTest.cmp | 2 - projects/07/MemoryAccess/BasicTest/BasicTest.out | 2 - projects/07/MemoryAccess/BasicTest/BasicTest.tst | 25 - projects/07/MemoryAccess/BasicTest/BasicTest.vm | 31 - .../07/MemoryAccess/BasicTest/BasicTestVME.tst | 25 - projects/07/MemoryAccess/BasicTest/delme.asm | 26 - projects/07/MemoryAccess/BasicTest/delme.vm | 8 - .../07/MemoryAccess/PointerTest/PointerTest.asm | 138 - .../07/MemoryAccess/PointerTest/PointerTest.cmp | 2 - .../07/MemoryAccess/PointerTest/PointerTest.out | 2 - .../07/MemoryAccess/PointerTest/PointerTest.tst | 20 - .../07/MemoryAccess/PointerTest/PointerTest.vm | 22 - .../07/MemoryAccess/PointerTest/PointerTestVME.tst | 20 - projects/07/MemoryAccess/StaticTest/StaticTest.asm | 86 - projects/07/MemoryAccess/StaticTest/StaticTest.cmp | 2 - projects/07/MemoryAccess/StaticTest/StaticTest.out | 2 - projects/07/MemoryAccess/StaticTest/StaticTest.tst | 17 - projects/07/MemoryAccess/StaticTest/StaticTest.vm | 17 - .../07/MemoryAccess/StaticTest/StaticTestVME.tst | 17 - .../07/StackArithmetic/SimpleAdd/SimpleAdd.asm | 32 - .../07/StackArithmetic/SimpleAdd/SimpleAdd.cmp | 2 - .../07/StackArithmetic/SimpleAdd/SimpleAdd.out | 2 - .../07/StackArithmetic/SimpleAdd/SimpleAdd.tst | 17 - projects/07/StackArithmetic/SimpleAdd/SimpleAdd.vm | 9 - .../07/StackArithmetic/SimpleAdd/SimpleAddVME.tst | 17 - .../07/StackArithmetic/StackTest/StackTest.asm | 426 - .../07/StackArithmetic/StackTest/StackTest.cmp | 4 - .../07/StackArithmetic/StackTest/StackTest.out | 4 - .../07/StackArithmetic/StackTest/StackTest.tst | 22 - projects/07/StackArithmetic/StackTest/StackTest.vm | 45 - .../07/StackArithmetic/StackTest/StackTestVME.tst | 22 - projects/07/VMTranslator | Bin 65152 -> 0 bytes projects/07/VMTranslator.hi | Bin 1693 -> 0 bytes projects/07/VMTranslator.hs | 88 - projects/07/VMTranslator.o | Bin 77480 -> 0 bytes .../FibonacciElement/FibonacciElement.asm | 421 - .../FibonacciElement/FibonacciElement.cmp | 2 - .../FibonacciElement/FibonacciElement.out | 2 - .../FibonacciElement/FibonacciElement.tst | 18 - .../FibonacciElement/FibonacciElementVME.tst | 17 - projects/08/FunctionCalls/FibonacciElement/Main.vm | 30 - projects/08/FunctionCalls/FibonacciElement/Sys.vm | 15 - .../08/FunctionCalls/NestedCall/NestedCall.cmp | 2 - .../08/FunctionCalls/NestedCall/NestedCall.html | 196 - .../08/FunctionCalls/NestedCall/NestedCall.tst | 65 - .../FunctionCalls/NestedCall/NestedCallStack.html | 306 - .../08/FunctionCalls/NestedCall/NestedCallVME.tst | 70 - projects/08/FunctionCalls/NestedCall/Sys.vm | 63 - .../SimpleFunction/SimpleFunction.asm | 138 - .../SimpleFunction/SimpleFunction.cmp | 2 - .../SimpleFunction/SimpleFunction.out | 2 - .../SimpleFunction/SimpleFunction.tst | 29 - .../FunctionCalls/SimpleFunction/SimpleFunction.vm | 16 - .../SimpleFunction/SimpleFunction1.asm | 137 - .../SimpleFunction/SimpleFunctionVME.tst | 29 - projects/08/FunctionCalls/StaticsTest/Class1.vm | 20 - projects/08/FunctionCalls/StaticsTest/Class2.vm | 20 - .../08/FunctionCalls/StaticsTest/StaticsTest.asm | 586 - .../08/FunctionCalls/StaticsTest/StaticsTest.cmp | 2 - .../08/FunctionCalls/StaticsTest/StaticsTest.out | 2 - .../08/FunctionCalls/StaticsTest/StaticsTest.tst | 17 - .../FunctionCalls/StaticsTest/StaticsTestVME.tst | 17 - projects/08/FunctionCalls/StaticsTest/Sys.vm | 20 - projects/08/ProgramFlow/BasicLoop/BasicLoop.asm | 133 - projects/08/ProgramFlow/BasicLoop/BasicLoop.cmp | 2 - projects/08/ProgramFlow/BasicLoop/BasicLoop.out | 2 - projects/08/ProgramFlow/BasicLoop/BasicLoop.tst | 20 - projects/08/ProgramFlow/BasicLoop/BasicLoop.vm | 22 - projects/08/ProgramFlow/BasicLoop/BasicLoopVME.tst | 20 - .../FibonacciSeries/FibonacciSeries.asm | 234 - .../FibonacciSeries/FibonacciSeries.cmp | 2 - .../FibonacciSeries/FibonacciSeries.out | 2 - .../FibonacciSeries/FibonacciSeries.tst | 22 - .../ProgramFlow/FibonacciSeries/FibonacciSeries.vm | 49 - .../FibonacciSeries/FibonacciSeries1.asm | 241 - .../FibonacciSeries/FibonacciSeriesVME.tst | 22 - projects/08/VMTranslator | Bin 93880 -> 0 bytes projects/08/VMTranslator.hi | Bin 2434 -> 0 bytes projects/08/VMTranslator.hs | 139 - projects/08/VMTranslator.o | Bin 118760 -> 0 bytes projects/09/Average/Main.jack | 27 - projects/09/BitmapEditor/BitmapEditor.html | 200 - projects/09/BitmapEditor/BitmapEditor.iml | 10 - projects/09/Fraction/Fraction.jack | 65 - projects/09/Fraction/Main.jack | 16 - projects/09/HelloWorld/HelloWorld.asm | 923 - projects/09/HelloWorld/Main.jack | 14 - projects/09/HelloWorld/Main.vm | 33 - projects/09/Jack OS API.pdf | Bin 108857 -> 0 bytes projects/09/K/Board.jack | 327 - projects/09/K/Board.vm | 1465 - projects/09/K/K.txt | 25 - projects/09/K/KGame.jack | 57 - projects/09/K/KGame.vm | 169 - projects/09/K/Main.jack | 10 - projects/09/K/Main.vm | 13 - projects/09/List/List.jack | 46 - projects/09/List/Main.jack | 17 - projects/09/Square/Main.jack | 15 - projects/09/Square/Main.vm | 11 - projects/09/Square/Square.asm | 6346 ----- projects/09/Square/Square.jack | 108 - projects/09/Square/Square.vm | 304 - projects/09/Square/SquareGame.jack | 79 - projects/09/Square/SquareGame.vm | 179 - projects/10/.gitignore | 1 - projects/10/ArrayTest/Main.ast | 1 - projects/10/ArrayTest/Main.jack | 38 - projects/10/ArrayTest/Main.xml | 286 - projects/10/ArrayTest/MainT.xml | 142 - projects/10/ExpressionLessSquare/Main.ast | 1 - projects/10/ExpressionLessSquare/Main.jack | 36 - projects/10/ExpressionLessSquare/Main.xml | 205 - projects/10/ExpressionLessSquare/MainT.xml | 109 - projects/10/ExpressionLessSquare/Square.ast | 1 - projects/10/ExpressionLessSquare/Square.jack | 99 - projects/10/ExpressionLessSquare/Square.xml | 967 - projects/10/ExpressionLessSquare/SquareGame.ast | 1 - projects/10/ExpressionLessSquare/SquareGame.jack | 60 - projects/10/ExpressionLessSquare/SquareGame.xml | 544 - projects/10/ExpressionLessSquare/SquareGameT.xml | 268 - projects/10/ExpressionLessSquare/SquareT.xml | 449 - projects/10/JackParser | Bin 206568 -> 0 bytes projects/10/JackParser.hi | Bin 9897 -> 0 bytes projects/10/JackParser.hs | 312 - projects/10/JackParser.o | Bin 299112 -> 0 bytes projects/10/Square/Main.ast | 1 - projects/10/Square/Main.jack | 36 - projects/10/Square/Main.xml | 244 - projects/10/Square/MainT.xml | 126 - projects/10/Square/Square.ast | 1 - projects/10/Square/Square.jack | 110 - projects/10/Square/Square.xml | 1211 - projects/10/Square/SquareGame.ast | 1 - projects/10/Square/SquareGame.jack | 81 - projects/10/Square/SquareGame.xml | 643 - projects/10/Square/SquareGameT.xml | 315 - projects/10/Square/SquareT.xml | 561 - projects/10/jackspec.wiki | 3 - projects/10/spec1 | 0 projects/10/spec1.png | Bin 224788 -> 0 bytes projects/10/spec2.png | Bin 152598 -> 0 bytes projects/10/test/Main.ast | 1 - projects/10/test/Main.jack | 30 - projects/11/Average/Main.jack | 29 - projects/11/Average/Main.vm | 147 - projects/11/ComplexArrays/Main.jack | 70 - projects/11/ComplexArrays/Main.vm | 681 - projects/11/ConvertToBin/Main.jack | 84 - projects/11/ConvertToBin/Main.vm | 110 - projects/11/ConvertToBin/setram.tst | 3 - projects/11/JackCompiler | Bin 284520 -> 0 bytes projects/11/JackCompiler.hi | Bin 10319 -> 0 bytes projects/11/JackCompiler.hs | 538 - projects/11/JackCompiler.o | Bin 409680 -> 0 bytes projects/11/K/Board.jack | 305 - projects/11/K/Board.vm | 1183 - projects/11/K/K.txt | 25 - projects/11/K/KGame.jack | 34 - projects/11/K/KGame.vm | 74 - projects/11/K/Main.jack | 9 - projects/11/K/Main.vm | 11 - projects/11/Pong/Ball.jack | 203 - projects/11/Pong/Ball.vm | 427 - projects/11/Pong/Bat.jack | 103 - projects/11/Pong/Bat.vm | 204 - projects/11/Pong/Main.jack | 20 - projects/11/Pong/Main.vm | 13 - projects/11/Pong/PongGame.jack | 137 - projects/11/Pong/PongGame.vm | 309 - projects/11/Seven/Main.jack | 17 - projects/11/Seven/Main.vm | 10 - projects/11/Square/Main.jack | 17 - projects/11/Square/Main.vm | 11 - projects/11/Square/Square.jack | 110 - projects/11/Square/Square.vm | 298 - projects/11/Square/SquareGame.jack | 81 - projects/11/Square/SquareGame.vm | 168 - projects/11/Test.jack | 7 - projects/11/systemsub.txt | 59 - projects/11/systemsub1.txt | 42 - projects/12/Array.jack | 26 - projects/12/ArrayTest/Array.jack | 26 - projects/12/ArrayTest/Array.vm | 12 - projects/12/ArrayTest/ArrayTest.cmp | 2 - projects/12/ArrayTest/ArrayTest.out | 2 - projects/12/ArrayTest/ArrayTest.tst | 15 - projects/12/ArrayTest/Main.jack | 40 - projects/12/ArrayTest/Main.vm | 131 - projects/12/Keyboard.jack | 97 - projects/12/KeyboardTest/Keyboard.jack | 97 - projects/12/KeyboardTest/Keyboard.vm | 115 - projects/12/KeyboardTest/KeyboardTestOutput.gif | Bin 12048 -> 0 bytes projects/12/KeyboardTest/Main.jack | 93 - projects/12/KeyboardTest/Main.vm | 949 - projects/12/Math.jack | 158 - projects/12/MathTest/Main.jack | 35 - projects/12/MathTest/Main.vm | 162 - projects/12/MathTest/Math.jack | 158 - projects/12/MathTest/Math.vm | 472 - projects/12/MathTest/MathTest.cmp | 2 - projects/12/MathTest/MathTest.out | 2 - projects/12/MathTest/MathTest.tst | 15 - projects/12/Memory.jack | 72 - projects/12/MemoryTest/Main.jack | 42 - projects/12/MemoryTest/Main.vm | 126 - projects/12/MemoryTest/Memory.jack | 72 - projects/12/MemoryTest/Memory.vm | 258 - projects/12/MemoryTest/MemoryTest.cmp | 2 - projects/12/MemoryTest/MemoryTest.out | 0 projects/12/MemoryTest/MemoryTest.tst | 15 - projects/12/Output.jack | 281 - projects/12/OutputTest/Main.jack | 42 - projects/12/OutputTest/Main.vm | 254 - projects/12/OutputTest/Output.jack | 281 - projects/12/OutputTest/Output.vm | 1757 -- projects/12/OutputTest/OutputTestOutput.gif | Bin 6184 -> 0 bytes projects/12/Screen.jack | 138 - projects/12/ScreenTest/Main.jack | 36 - projects/12/ScreenTest/Main.vm | 104 - projects/12/ScreenTest/Math.jack | 158 - projects/12/ScreenTest/Math.vm | 472 - projects/12/ScreenTest/Screen.jack | 138 - projects/12/ScreenTest/Screen.vm | 407 - projects/12/ScreenTest/ScreenTestOutput.gif | Bin 4563 -> 0 bytes projects/12/String.jack | 176 - projects/12/StringTest/Main.jack | 83 - projects/12/StringTest/Main.vm | 469 - projects/12/StringTest/String.jack | 176 - projects/12/StringTest/String.vm | 917 - projects/12/StringTest/StringTestOutput.gif | Bin 8126 -> 0 bytes projects/12/Sys.jack | 51 - projects/12/SysTest/Main.jack | 31 - projects/12/SysTest/Main.vm | 281 - projects/12/SysTest/Sys.jack | 51 - projects/12/SysTest/Sys.vm | 74 - projects/13/more fun to go.txt | 9 - projects/demo/Xor.cmp | 5 - projects/demo/Xor.hdl | 25 - projects/demo/Xor.out | 0 projects/demo/Xor.tst | 29 - 410 files changed, 134329 deletions(-) delete mode 100644 projects/00/file.txt delete mode 100644 projects/01/And.cmp delete mode 100644 projects/01/And.hdl delete mode 100644 projects/01/And.out delete mode 100644 projects/01/And.tst delete mode 100644 projects/01/And16.cmp delete mode 100644 projects/01/And16.hdl delete mode 100644 projects/01/And16.out delete mode 100644 projects/01/And16.tst delete mode 100644 projects/01/And1With16.hdl delete mode 100644 projects/01/DMux.cmp delete mode 100644 projects/01/DMux.hdl delete mode 100644 projects/01/DMux.out delete mode 100644 projects/01/DMux.tst delete mode 100644 projects/01/DMux4Way.cmp delete mode 100644 projects/01/DMux4Way.hdl delete mode 100644 projects/01/DMux4Way.out delete mode 100644 projects/01/DMux4Way.tst delete mode 100644 projects/01/DMux8Way.cmp delete mode 100644 projects/01/DMux8Way.hdl delete mode 100644 projects/01/DMux8Way.out delete mode 100644 projects/01/DMux8Way.tst delete mode 100644 projects/01/Mux.cmp delete mode 100644 projects/01/Mux.hdl delete mode 100644 projects/01/Mux.out delete mode 100644 projects/01/Mux.tst delete mode 100644 projects/01/Mux16.cmp delete mode 100644 projects/01/Mux16.hdl delete mode 100644 projects/01/Mux16.out delete mode 100644 projects/01/Mux16.tst delete mode 100644 projects/01/Mux4Way16.cmp delete mode 100644 projects/01/Mux4Way16.hdl delete mode 100644 projects/01/Mux4Way16.out delete mode 100644 projects/01/Mux4Way16.tst delete mode 100644 projects/01/Mux8Way16.cmp delete mode 100644 projects/01/Mux8Way16.hdl delete mode 100644 projects/01/Mux8Way16.out delete mode 100644 projects/01/Mux8Way16.tst delete mode 100644 projects/01/Not.cmp delete mode 100644 projects/01/Not.hdl delete mode 100644 projects/01/Not.out delete mode 100644 projects/01/Not.tst delete mode 100644 projects/01/Not16.cmp delete mode 100644 projects/01/Not16.hdl delete mode 100644 projects/01/Not16.out delete mode 100644 projects/01/Not16.tst delete mode 100644 projects/01/Or.cmp delete mode 100644 projects/01/Or.hdl delete mode 100644 projects/01/Or.out delete mode 100644 projects/01/Or.tst delete mode 100644 projects/01/Or16.cmp delete mode 100644 projects/01/Or16.hdl delete mode 100644 projects/01/Or16.out delete mode 100644 projects/01/Or16.tst delete mode 100644 projects/01/Or8Way.cmp delete mode 100644 projects/01/Or8Way.hdl delete mode 100644 projects/01/Or8Way.out delete mode 100644 projects/01/Or8Way.tst delete mode 100644 projects/01/Xor.cmp delete mode 100644 projects/01/Xor.hdl delete mode 100644 projects/01/Xor.out delete mode 100644 projects/01/Xor.tst delete mode 100644 projects/02/ALU-nostat.cmp delete mode 100644 projects/02/ALU-nostat.tst delete mode 100644 projects/02/ALU.cmp delete mode 100644 projects/02/ALU.hdl delete mode 100644 projects/02/ALU.out delete mode 100644 projects/02/ALU.tst delete mode 100644 projects/02/Add16.cmp delete mode 100644 projects/02/Add16.hdl delete mode 100644 projects/02/Add16.out delete mode 100644 projects/02/Add16.tst delete mode 100644 projects/02/FullAdder.cmp delete mode 100644 projects/02/FullAdder.hdl delete mode 100644 projects/02/FullAdder.out delete mode 100644 projects/02/FullAdder.tst delete mode 100644 projects/02/HalfAdder.cmp delete mode 100644 projects/02/HalfAdder.hdl delete mode 100644 projects/02/HalfAdder.out delete mode 100644 projects/02/HalfAdder.tst delete mode 100644 projects/02/Inc16.cmp delete mode 100644 projects/02/Inc16.hdl delete mode 100644 projects/02/Inc16.out delete mode 100644 projects/02/Inc16.tst delete mode 100644 projects/02/Test.hdl delete mode 100644 projects/03/a/Bit.cmp delete mode 100644 projects/03/a/Bit.hdl delete mode 100644 projects/03/a/Bit.out delete mode 100644 projects/03/a/Bit.tst delete mode 100644 projects/03/a/PC.cmp delete mode 100644 projects/03/a/PC.hdl delete mode 100644 projects/03/a/PC.out delete mode 100644 projects/03/a/PC.tst delete mode 100644 projects/03/a/RAM64.cmp delete mode 100644 projects/03/a/RAM64.hdl delete mode 100644 projects/03/a/RAM64.out delete mode 100644 projects/03/a/RAM64.tst delete mode 100644 projects/03/a/RAM8.cmp delete mode 100644 projects/03/a/RAM8.hdl delete mode 100644 projects/03/a/RAM8.out delete mode 100644 projects/03/a/RAM8.tst delete mode 100644 projects/03/a/Register.cmp delete mode 100644 projects/03/a/Register.hdl delete mode 100644 projects/03/a/Register.out delete mode 100644 projects/03/a/Register.tst delete mode 100644 projects/03/b/RAM16K.cmp delete mode 100644 projects/03/b/RAM16K.hdl delete mode 100644 projects/03/b/RAM16K.out delete mode 100644 projects/03/b/RAM16K.tst delete mode 100644 projects/03/b/RAM4K.cmp delete mode 100644 projects/03/b/RAM4K.hdl delete mode 100644 projects/03/b/RAM4K.tst delete mode 100644 projects/03/b/RAM512.cmp delete mode 100644 projects/03/b/RAM512.hdl delete mode 100644 projects/03/b/RAM512.tst delete mode 100644 projects/04/fill/Fill.asm delete mode 100644 projects/04/fill/Fill.tst delete mode 100644 projects/04/fill/FillAutomatic.cmp delete mode 100644 projects/04/fill/FillAutomatic.out delete mode 100644 projects/04/fill/FillAutomatic.tst delete mode 100644 projects/04/mult/Mult.asm delete mode 100644 projects/04/mult/Mult.cmp delete mode 100644 projects/04/mult/Mult.out delete mode 100644 projects/04/mult/Mult.tst delete mode 100644 projects/05/Add.hack delete mode 100644 projects/05/CPU-external.cmp delete mode 100644 projects/05/CPU-external.tst delete mode 100644 projects/05/CPU.cmp delete mode 100644 projects/05/CPU.hdl delete mode 100644 projects/05/CPU.out delete mode 100644 projects/05/CPU.tst delete mode 100644 projects/05/Computer.hdl delete mode 100644 projects/05/ComputerAdd-external.cmp delete mode 100644 projects/05/ComputerAdd-external.tst delete mode 100644 projects/05/ComputerAdd.cmp delete mode 100644 projects/05/ComputerAdd.out delete mode 100644 projects/05/ComputerAdd.tst delete mode 100644 projects/05/ComputerMax-external.cmp delete mode 100644 projects/05/ComputerMax-external.tst delete mode 100644 projects/05/ComputerMax.cmp delete mode 100644 projects/05/ComputerMax.out delete mode 100644 projects/05/ComputerMax.tst delete mode 100644 projects/05/ComputerRect-external.cmp delete mode 100644 projects/05/ComputerRect-external.tst delete mode 100644 projects/05/ComputerRect.cmp delete mode 100644 projects/05/ComputerRect.out delete mode 100644 projects/05/ComputerRect.tst delete mode 100644 projects/05/Max.hack delete mode 100644 projects/05/Memory.cmp delete mode 100644 projects/05/Memory.hdl delete mode 100644 projects/05/Memory.out delete mode 100644 projects/05/Memory.tst delete mode 100644 projects/05/Rect.hack delete mode 100755 projects/06/Assembler delete mode 100644 projects/06/Assembler.hi delete mode 100644 projects/06/Assembler.hs delete mode 100644 projects/06/Assembler.o delete mode 100644 projects/06/add/Add.asm delete mode 100644 projects/06/add/Add.hack delete mode 100644 projects/06/max/Max.asm delete mode 100644 projects/06/max/Max.hack delete mode 100644 projects/06/max/MaxL.asm delete mode 100644 projects/06/pong/Pong.asm delete mode 100644 projects/06/pong/Pong.hack delete mode 100644 projects/06/pong/PongL.asm delete mode 100644 projects/06/rect/Rect.asm delete mode 100644 projects/06/rect/Rect.hack delete mode 100644 projects/06/rect/RectL.asm delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTest.asm delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTest.cmp delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTest.out delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTest.tst delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTest.vm delete mode 100644 projects/07/MemoryAccess/BasicTest/BasicTestVME.tst delete mode 100644 projects/07/MemoryAccess/BasicTest/delme.asm delete mode 100644 projects/07/MemoryAccess/BasicTest/delme.vm delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTest.asm delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTest.cmp delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTest.out delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTest.tst delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTest.vm delete mode 100644 projects/07/MemoryAccess/PointerTest/PointerTestVME.tst delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTest.asm delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTest.cmp delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTest.out delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTest.tst delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTest.vm delete mode 100644 projects/07/MemoryAccess/StaticTest/StaticTestVME.tst delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAdd.asm delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAdd.cmp delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAdd.out delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAdd.tst delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAdd.vm delete mode 100644 projects/07/StackArithmetic/SimpleAdd/SimpleAddVME.tst delete mode 100644 projects/07/StackArithmetic/StackTest/StackTest.asm delete mode 100644 projects/07/StackArithmetic/StackTest/StackTest.cmp delete mode 100644 projects/07/StackArithmetic/StackTest/StackTest.out delete mode 100644 projects/07/StackArithmetic/StackTest/StackTest.tst delete mode 100644 projects/07/StackArithmetic/StackTest/StackTest.vm delete mode 100644 projects/07/StackArithmetic/StackTest/StackTestVME.tst delete mode 100755 projects/07/VMTranslator delete mode 100644 projects/07/VMTranslator.hi delete mode 100644 projects/07/VMTranslator.hs delete mode 100644 projects/07/VMTranslator.o delete mode 100644 projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm delete mode 100644 projects/08/FunctionCalls/FibonacciElement/FibonacciElement.cmp delete mode 100644 projects/08/FunctionCalls/FibonacciElement/FibonacciElement.out delete mode 100644 projects/08/FunctionCalls/FibonacciElement/FibonacciElement.tst delete mode 100644 projects/08/FunctionCalls/FibonacciElement/FibonacciElementVME.tst delete mode 100644 projects/08/FunctionCalls/FibonacciElement/Main.vm delete mode 100644 projects/08/FunctionCalls/FibonacciElement/Sys.vm delete mode 100644 projects/08/FunctionCalls/NestedCall/NestedCall.cmp delete mode 100644 projects/08/FunctionCalls/NestedCall/NestedCall.html delete mode 100644 projects/08/FunctionCalls/NestedCall/NestedCall.tst delete mode 100644 projects/08/FunctionCalls/NestedCall/NestedCallStack.html delete mode 100644 projects/08/FunctionCalls/NestedCall/NestedCallVME.tst delete mode 100644 projects/08/FunctionCalls/NestedCall/Sys.vm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.asm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.cmp delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.out delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.tst delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction.vm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunction1.asm delete mode 100644 projects/08/FunctionCalls/SimpleFunction/SimpleFunctionVME.tst delete mode 100644 projects/08/FunctionCalls/StaticsTest/Class1.vm delete mode 100644 projects/08/FunctionCalls/StaticsTest/Class2.vm delete mode 100644 projects/08/FunctionCalls/StaticsTest/StaticsTest.asm delete mode 100644 projects/08/FunctionCalls/StaticsTest/StaticsTest.cmp delete mode 100644 projects/08/FunctionCalls/StaticsTest/StaticsTest.out delete mode 100644 projects/08/FunctionCalls/StaticsTest/StaticsTest.tst delete mode 100644 projects/08/FunctionCalls/StaticsTest/StaticsTestVME.tst delete mode 100644 projects/08/FunctionCalls/StaticsTest/Sys.vm delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoop.asm delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoop.cmp delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoop.out delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoop.tst delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoop.vm delete mode 100644 projects/08/ProgramFlow/BasicLoop/BasicLoopVME.tst delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.cmp delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.out delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.tst delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.vm delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries1.asm delete mode 100644 projects/08/ProgramFlow/FibonacciSeries/FibonacciSeriesVME.tst delete mode 100755 projects/08/VMTranslator delete mode 100644 projects/08/VMTranslator.hi delete mode 100644 projects/08/VMTranslator.hs delete mode 100644 projects/08/VMTranslator.o delete mode 100644 projects/09/Average/Main.jack delete mode 100644 projects/09/BitmapEditor/BitmapEditor.html delete mode 100644 projects/09/BitmapEditor/BitmapEditor.iml delete mode 100644 projects/09/Fraction/Fraction.jack delete mode 100644 projects/09/Fraction/Main.jack delete mode 100644 projects/09/HelloWorld/HelloWorld.asm delete mode 100644 projects/09/HelloWorld/Main.jack delete mode 100644 projects/09/HelloWorld/Main.vm delete mode 100644 projects/09/Jack OS API.pdf delete mode 100644 projects/09/K/Board.jack delete mode 100644 projects/09/K/Board.vm delete mode 100644 projects/09/K/K.txt delete mode 100644 projects/09/K/KGame.jack delete mode 100644 projects/09/K/KGame.vm delete mode 100644 projects/09/K/Main.jack delete mode 100644 projects/09/K/Main.vm delete mode 100644 projects/09/List/List.jack delete mode 100644 projects/09/List/Main.jack delete mode 100644 projects/09/Square/Main.jack delete mode 100644 projects/09/Square/Main.vm delete mode 100644 projects/09/Square/Square.asm delete mode 100644 projects/09/Square/Square.jack delete mode 100644 projects/09/Square/Square.vm delete mode 100644 projects/09/Square/SquareGame.jack delete mode 100644 projects/09/Square/SquareGame.vm delete mode 100644 projects/10/.gitignore delete mode 100644 projects/10/ArrayTest/Main.ast delete mode 100644 projects/10/ArrayTest/Main.jack delete mode 100644 projects/10/ArrayTest/Main.xml delete mode 100644 projects/10/ArrayTest/MainT.xml delete mode 100644 projects/10/ExpressionLessSquare/Main.ast delete mode 100644 projects/10/ExpressionLessSquare/Main.jack delete mode 100644 projects/10/ExpressionLessSquare/Main.xml delete mode 100644 projects/10/ExpressionLessSquare/MainT.xml delete mode 100644 projects/10/ExpressionLessSquare/Square.ast delete mode 100644 projects/10/ExpressionLessSquare/Square.jack delete mode 100644 projects/10/ExpressionLessSquare/Square.xml delete mode 100644 projects/10/ExpressionLessSquare/SquareGame.ast delete mode 100644 projects/10/ExpressionLessSquare/SquareGame.jack delete mode 100644 projects/10/ExpressionLessSquare/SquareGame.xml delete mode 100644 projects/10/ExpressionLessSquare/SquareGameT.xml delete mode 100644 projects/10/ExpressionLessSquare/SquareT.xml delete mode 100755 projects/10/JackParser delete mode 100644 projects/10/JackParser.hi delete mode 100644 projects/10/JackParser.hs delete mode 100644 projects/10/JackParser.o delete mode 100644 projects/10/Square/Main.ast delete mode 100644 projects/10/Square/Main.jack delete mode 100644 projects/10/Square/Main.xml delete mode 100644 projects/10/Square/MainT.xml delete mode 100644 projects/10/Square/Square.ast delete mode 100644 projects/10/Square/Square.jack delete mode 100644 projects/10/Square/Square.xml delete mode 100644 projects/10/Square/SquareGame.ast delete mode 100644 projects/10/Square/SquareGame.jack delete mode 100644 projects/10/Square/SquareGame.xml delete mode 100644 projects/10/Square/SquareGameT.xml delete mode 100644 projects/10/Square/SquareT.xml delete mode 100644 projects/10/jackspec.wiki delete mode 100644 projects/10/spec1 delete mode 100644 projects/10/spec1.png delete mode 100644 projects/10/spec2.png delete mode 100644 projects/10/test/Main.ast delete mode 100644 projects/10/test/Main.jack delete mode 100644 projects/11/Average/Main.jack delete mode 100644 projects/11/Average/Main.vm delete mode 100644 projects/11/ComplexArrays/Main.jack delete mode 100644 projects/11/ComplexArrays/Main.vm delete mode 100644 projects/11/ConvertToBin/Main.jack delete mode 100644 projects/11/ConvertToBin/Main.vm delete mode 100644 projects/11/ConvertToBin/setram.tst delete mode 100755 projects/11/JackCompiler delete mode 100644 projects/11/JackCompiler.hi delete mode 100644 projects/11/JackCompiler.hs delete mode 100644 projects/11/JackCompiler.o delete mode 100644 projects/11/K/Board.jack delete mode 100644 projects/11/K/Board.vm delete mode 100644 projects/11/K/K.txt delete mode 100644 projects/11/K/KGame.jack delete mode 100644 projects/11/K/KGame.vm delete mode 100644 projects/11/K/Main.jack delete mode 100644 projects/11/K/Main.vm delete mode 100644 projects/11/Pong/Ball.jack delete mode 100644 projects/11/Pong/Ball.vm delete mode 100644 projects/11/Pong/Bat.jack delete mode 100644 projects/11/Pong/Bat.vm delete mode 100644 projects/11/Pong/Main.jack delete mode 100644 projects/11/Pong/Main.vm delete mode 100644 projects/11/Pong/PongGame.jack delete mode 100644 projects/11/Pong/PongGame.vm delete mode 100644 projects/11/Seven/Main.jack delete mode 100644 projects/11/Seven/Main.vm delete mode 100644 projects/11/Square/Main.jack delete mode 100644 projects/11/Square/Main.vm delete mode 100644 projects/11/Square/Square.jack delete mode 100644 projects/11/Square/Square.vm delete mode 100644 projects/11/Square/SquareGame.jack delete mode 100644 projects/11/Square/SquareGame.vm delete mode 100644 projects/11/Test.jack delete mode 100644 projects/11/systemsub.txt delete mode 100644 projects/11/systemsub1.txt delete mode 100644 projects/12/Array.jack delete mode 100644 projects/12/ArrayTest/Array.jack delete mode 100644 projects/12/ArrayTest/Array.vm delete mode 100644 projects/12/ArrayTest/ArrayTest.cmp delete mode 100644 projects/12/ArrayTest/ArrayTest.out delete mode 100644 projects/12/ArrayTest/ArrayTest.tst delete mode 100644 projects/12/ArrayTest/Main.jack delete mode 100644 projects/12/ArrayTest/Main.vm delete mode 100644 projects/12/Keyboard.jack delete mode 100644 projects/12/KeyboardTest/Keyboard.jack delete mode 100644 projects/12/KeyboardTest/Keyboard.vm delete mode 100644 projects/12/KeyboardTest/KeyboardTestOutput.gif delete mode 100644 projects/12/KeyboardTest/Main.jack delete mode 100644 projects/12/KeyboardTest/Main.vm delete mode 100644 projects/12/Math.jack delete mode 100644 projects/12/MathTest/Main.jack delete mode 100644 projects/12/MathTest/Main.vm delete mode 100644 projects/12/MathTest/Math.jack delete mode 100644 projects/12/MathTest/Math.vm delete mode 100644 projects/12/MathTest/MathTest.cmp delete mode 100644 projects/12/MathTest/MathTest.out delete mode 100644 projects/12/MathTest/MathTest.tst delete mode 100644 projects/12/Memory.jack delete mode 100644 projects/12/MemoryTest/Main.jack delete mode 100644 projects/12/MemoryTest/Main.vm delete mode 100644 projects/12/MemoryTest/Memory.jack delete mode 100644 projects/12/MemoryTest/Memory.vm delete mode 100644 projects/12/MemoryTest/MemoryTest.cmp delete mode 100644 projects/12/MemoryTest/MemoryTest.out delete mode 100644 projects/12/MemoryTest/MemoryTest.tst delete mode 100644 projects/12/Output.jack delete mode 100644 projects/12/OutputTest/Main.jack delete mode 100644 projects/12/OutputTest/Main.vm delete mode 100644 projects/12/OutputTest/Output.jack delete mode 100644 projects/12/OutputTest/Output.vm delete mode 100644 projects/12/OutputTest/OutputTestOutput.gif delete mode 100644 projects/12/Screen.jack delete mode 100644 projects/12/ScreenTest/Main.jack delete mode 100644 projects/12/ScreenTest/Main.vm delete mode 100644 projects/12/ScreenTest/Math.jack delete mode 100644 projects/12/ScreenTest/Math.vm delete mode 100644 projects/12/ScreenTest/Screen.jack delete mode 100644 projects/12/ScreenTest/Screen.vm delete mode 100644 projects/12/ScreenTest/ScreenTestOutput.gif delete mode 100644 projects/12/String.jack delete mode 100644 projects/12/StringTest/Main.jack delete mode 100644 projects/12/StringTest/Main.vm delete mode 100644 projects/12/StringTest/String.jack delete mode 100644 projects/12/StringTest/String.vm delete mode 100644 projects/12/StringTest/StringTestOutput.gif delete mode 100644 projects/12/Sys.jack delete mode 100644 projects/12/SysTest/Main.jack delete mode 100644 projects/12/SysTest/Main.vm delete mode 100644 projects/12/SysTest/Sys.jack delete mode 100644 projects/12/SysTest/Sys.vm delete mode 100644 projects/13/more fun to go.txt delete mode 100644 projects/demo/Xor.cmp delete mode 100644 projects/demo/Xor.hdl delete mode 100644 projects/demo/Xor.out delete mode 100644 projects/demo/Xor.tst (limited to 'projects') diff --git a/projects/00/file.txt b/projects/00/file.txt deleted file mode 100644 index ff654e3..0000000 --- a/projects/00/file.txt +++ /dev/null @@ -1,6 +0,0 @@ -The only purpose of this file is to practice submitting files -in the Nand to Tetris course websites in Coursera. - -There is no need to modify the contents of this file. -All you have to do is submit it as is, following the -Project 0 guidelines in the website. \ No newline at end of file diff --git a/projects/01/And.cmp b/projects/01/And.cmp deleted file mode 100644 index 75e709a..0000000 --- a/projects/01/And.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 0 | -| 1 | 0 | 0 | -| 1 | 1 | 1 | diff --git a/projects/01/And.hdl b/projects/01/And.hdl deleted file mode 100644 index 754e54e..0000000 --- a/projects/01/And.hdl +++ /dev/null @@ -1,20 +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/01/And.hdl - -/** - * And gate: - * out = 1 if (a == 1 and b == 1) - * 0 otherwise - */ - -CHIP And { - IN a, b; - OUT out; - - PARTS: - // Put your code here: - Nand (a=a, b=b, out=nandab); - Not (in=nandab, out=out); -} diff --git a/projects/01/And.out b/projects/01/And.out deleted file mode 100644 index 8199ca5..0000000 --- a/projects/01/And.out +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 0 | -| 1 | 0 | 0 | -| 1 | 1 | 1 | diff --git a/projects/01/And.tst b/projects/01/And.tst deleted file mode 100644 index 7ace19d..0000000 --- a/projects/01/And.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/01/And.tst - -load And.hdl, -output-file And.out, -compare-to And.cmp, -output-list a%B3.1.3 b%B3.1.3 out%B3.1.3; - -set a 0, -set b 0, -eval, -output; - -set a 0, -set b 1, -eval, -output; - -set a 1, -set b 0, -eval, -output; - -set a 1, -set b 1, -eval, -output; diff --git a/projects/01/And16.cmp b/projects/01/And16.cmp deleted file mode 100644 index 32c8648..0000000 --- a/projects/01/And16.cmp +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 0000000000000000 | -| 1111111111111111 | 1111111111111111 | 1111111111111111 | -| 1010101010101010 | 0101010101010101 | 0000000000000000 | -| 0011110011000011 | 0000111111110000 | 0000110011000000 | -| 0001001000110100 | 1001100001110110 | 0001000000110100 | diff --git a/projects/01/And16.hdl b/projects/01/And16.hdl deleted file mode 100644 index 10c8603..0000000 --- a/projects/01/And16.hdl +++ /dev/null @@ -1,33 +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/01/And16.hdl - -/** - * 16-bit bitwise And: - * for i = 0..15: out[i] = (a[i] and b[i]) - */ - -CHIP And16 { - IN a[16], b[16]; - OUT out[16]; - - PARTS: - // Put your code here: - And (a=a[0], b=b[0], out=out[0]); - And (a=a[1], b=b[1], out=out[1]); - And (a=a[2], b=b[2], out=out[2]); - And (a=a[3], b=b[3], out=out[3]); - And (a=a[4], b=b[4], out=out[4]); - And (a=a[5], b=b[5], out=out[5]); - And (a=a[6], b=b[6], out=out[6]); - And (a=a[7], b=b[7], out=out[7]); - And (a=a[8], b=b[8], out=out[8]); - And (a=a[9], b=b[9], out=out[9]); - And (a=a[10], b=b[10], out=out[10]); - And (a=a[11], b=b[11], out=out[11]); - And (a=a[12], b=b[12], out=out[12]); - And (a=a[13], b=b[13], out=out[13]); - And (a=a[14], b=b[14], out=out[14]); - And (a=a[15], b=b[15], out=out[15]); -} diff --git a/projects/01/And16.out b/projects/01/And16.out deleted file mode 100644 index fb8dbfc..0000000 --- a/projects/01/And16.out +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 0000000000000000 | -| 1111111111111111 | 1111111111111111 | 1111111111111111 | -| 1010101010101010 | 0101010101010101 | 0000000000000000 | -| 0011110011000011 | 0000111111110000 | 0000110011000000 | -| 0001001000110100 | 1001100001110110 | 0001000000110100 | diff --git a/projects/01/And16.tst b/projects/01/And16.tst deleted file mode 100644 index c8921e7..0000000 --- a/projects/01/And16.tst +++ /dev/null @@ -1,39 +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/01/And16.tst - -load And16.hdl, -output-file And16.out, -compare-to And16.cmp, -output-list a%B1.16.1 b%B1.16.1 out%B1.16.1; - -set a %B0000000000000000, -set b %B0000000000000000, -eval, -output; - -set a %B0000000000000000, -set b %B1111111111111111, -eval, -output; - -set a %B1111111111111111, -set b %B1111111111111111, -eval, -output; - -set a %B1010101010101010, -set b %B0101010101010101, -eval, -output; - -set a %B0011110011000011, -set b %B0000111111110000, -eval, -output; - -set a %B0001001000110100, -set b %B1001100001110110, -eval, -output; \ No newline at end of file diff --git a/projects/01/And1With16.hdl b/projects/01/And1With16.hdl deleted file mode 100644 index c6d412c..0000000 --- a/projects/01/And1With16.hdl +++ /dev/null @@ -1,22 +0,0 @@ -CHIP And1With16 { - IN a, b[16]; - OUT out[16]; - - PARTS: - And (a=a, b=b[0], out=out[0]); - And (a=a, b=b[1], out=out[1]); - And (a=a, b=b[2], out=out[2]); - And (a=a, b=b[3], out=out[3]); - And (a=a, b=b[4], out=out[4]); - And (a=a, b=b[5], out=out[5]); - And (a=a, b=b[6], out=out[6]); - And (a=a, b=b[7], out=out[7]); - And (a=a, b=b[8], out=out[8]); - And (a=a, b=b[9], out=out[9]); - And (a=a, b=b[10], out=out[10]); - And (a=a, b=b[11], out=out[11]); - And (a=a, b=b[12], out=out[12]); - And (a=a, b=b[13], out=out[13]); - And (a=a, b=b[14], out=out[14]); - And (a=a, b=b[15], out=out[15]); -} diff --git a/projects/01/DMux.cmp b/projects/01/DMux.cmp deleted file mode 100644 index 6982094..0000000 --- a/projects/01/DMux.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| in | sel | a | b | -| 0 | 0 | 0 | 0 | -| 0 | 1 | 0 | 0 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | diff --git a/projects/01/DMux.hdl b/projects/01/DMux.hdl deleted file mode 100644 index b528313..0000000 --- a/projects/01/DMux.hdl +++ /dev/null @@ -1,21 +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/01/DMux.hdl - -/** - * Demultiplexor: - * {a, b} = {in, 0} if sel == 0 - * {0, in} if sel == 1 - */ - -CHIP DMux { - IN in, sel; - OUT a, b; - - PARTS: - // Put your code here: - Not (in=sel, out=notsel); - And (a=in, b=notsel, out=a); - And (a=in, b=sel, out=b); -} diff --git a/projects/01/DMux.out b/projects/01/DMux.out deleted file mode 100644 index 9a92ec0..0000000 --- a/projects/01/DMux.out +++ /dev/null @@ -1,5 +0,0 @@ -| in | sel | a | b | -| 0 | 0 | 0 | 0 | -| 0 | 1 | 0 | 0 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | diff --git a/projects/01/DMux.tst b/projects/01/DMux.tst deleted file mode 100644 index 4adbc43..0000000 --- a/projects/01/DMux.tst +++ /dev/null @@ -1,27 +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/01/DMux.tst - -load DMux.hdl, -output-file DMux.out, -compare-to DMux.cmp, -output-list in%B3.1.3 sel%B3.1.3 a%B3.1.3 b%B3.1.3; - -set in 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set in 1, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; diff --git a/projects/01/DMux4Way.cmp b/projects/01/DMux4Way.cmp deleted file mode 100644 index eac35c4..0000000 --- a/projects/01/DMux4Way.cmp +++ /dev/null @@ -1,9 +0,0 @@ -| in | sel | a | b | c | d | -| 0 | 00 | 0 | 0 | 0 | 0 | -| 0 | 01 | 0 | 0 | 0 | 0 | -| 0 | 10 | 0 | 0 | 0 | 0 | -| 0 | 11 | 0 | 0 | 0 | 0 | -| 1 | 00 | 1 | 0 | 0 | 0 | -| 1 | 01 | 0 | 1 | 0 | 0 | -| 1 | 10 | 0 | 0 | 1 | 0 | -| 1 | 11 | 0 | 0 | 0 | 1 | diff --git a/projects/01/DMux4Way.hdl b/projects/01/DMux4Way.hdl deleted file mode 100644 index 18b725d..0000000 --- a/projects/01/DMux4Way.hdl +++ /dev/null @@ -1,23 +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/01/DMux4Way.hdl - -/** - * 4-way demultiplexor: - * {a, b, c, d} = {in, 0, 0, 0} if sel == 00 - * {0, in, 0, 0} if sel == 01 - * {0, 0, in, 0} if sel == 10 - * {0, 0, 0, in} if sel == 11 - */ - -CHIP DMux4Way { - IN in, sel[2]; - OUT a, b, c, d; - - PARTS: - // Put your code here: - DMux (in=in, sel=sel[1], a=e, b=f); - DMux (in=e, sel=sel[0], a=a, b=b); - DMux (in=f, sel=sel[0], a=c, b=d); -} diff --git a/projects/01/DMux4Way.out b/projects/01/DMux4Way.out deleted file mode 100644 index 9dd708f..0000000 --- a/projects/01/DMux4Way.out +++ /dev/null @@ -1,9 +0,0 @@ -| in | sel | a | b | c | d | -| 0 | 00 | 0 | 0 | 0 | 0 | -| 0 | 01 | 0 | 0 | 0 | 0 | -| 0 | 10 | 0 | 0 | 0 | 0 | -| 0 | 11 | 0 | 0 | 0 | 0 | -| 1 | 00 | 1 | 0 | 0 | 0 | -| 1 | 01 | 0 | 1 | 0 | 0 | -| 1 | 10 | 0 | 0 | 1 | 0 | -| 1 | 11 | 0 | 0 | 0 | 1 | diff --git a/projects/01/DMux4Way.tst b/projects/01/DMux4Way.tst deleted file mode 100644 index 6fbbb56..0000000 --- a/projects/01/DMux4Way.tst +++ /dev/null @@ -1,43 +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/01/DMux4Way.tst - -load DMux4Way.hdl, -output-file DMux4Way.out, -compare-to DMux4Way.cmp, -output-list in%B2.1.2 sel%B2.2.2 a%B2.1.2 b%B2.1.2 c%B2.1.2 d%B2.1.2; - -set in 0, -set sel %B00, -eval, -output; - -set sel %B01, -eval, -output; - -set sel %B10, -eval, -output; - -set sel %B11, -eval, -output; - -set in 1, -set sel %B00, -eval, -output; - -set sel %B01, -eval, -output; - -set sel %B10, -eval, -output; - -set sel %B11, -eval, -output; diff --git a/projects/01/DMux8Way.cmp b/projects/01/DMux8Way.cmp deleted file mode 100644 index 375d44a..0000000 --- a/projects/01/DMux8Way.cmp +++ /dev/null @@ -1,17 +0,0 @@ -| in | sel | a | b | c | d | e | f | g | h | -| 0 | 000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 010 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 100 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 110 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 000 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 001 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 010 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | -| 1 | 011 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | -| 1 | 100 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | -| 1 | 101 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | -| 1 | 110 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | -| 1 | 111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | diff --git a/projects/01/DMux8Way.hdl b/projects/01/DMux8Way.hdl deleted file mode 100644 index 6038fa6..0000000 --- a/projects/01/DMux8Way.hdl +++ /dev/null @@ -1,23 +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/01/DMux8Way.hdl - -/** - * 8-way demultiplexor: - * {a, b, c, d, e, f, g, h} = {in, 0, 0, 0, 0, 0, 0, 0} if sel == 000 - * {0, in, 0, 0, 0, 0, 0, 0} if sel == 001 - * etc. - * {0, 0, 0, 0, 0, 0, 0, in} if sel == 111 - */ - -CHIP DMux8Way { - IN in, sel[3]; - OUT a, b, c, d, e, f, g, h; - - PARTS: - // Put your code here: - DMux (in=in, sel=sel[2], a=i, b=j); - DMux4Way (in=i, sel=sel[0..1], a=a, b=b, c=c, d=d); - DMux4Way (in=j, sel=sel[0..1], a=e, b=f, c=g, d=h); -} diff --git a/projects/01/DMux8Way.out b/projects/01/DMux8Way.out deleted file mode 100644 index ebf9304..0000000 --- a/projects/01/DMux8Way.out +++ /dev/null @@ -1,17 +0,0 @@ -| in | sel | a | b | c | d | e | f | g | h | -| 0 | 000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 010 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 100 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 110 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 0 | 111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 000 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 001 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 010 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | -| 1 | 011 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | -| 1 | 100 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | -| 1 | 101 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | -| 1 | 110 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | -| 1 | 111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | diff --git a/projects/01/DMux8Way.tst b/projects/01/DMux8Way.tst deleted file mode 100644 index 56d827e..0000000 --- a/projects/01/DMux8Way.tst +++ /dev/null @@ -1,75 +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/01/DMux8Way.tst - -load DMux8Way.hdl, -output-file DMux8Way.out, -compare-to DMux8Way.cmp, -output-list in%B2.1.2 sel%B2.3.2 a%B2.1.2 b%B2.1.2 c%B2.1.2 d%B2.1.2 e%B2.1.2 f%B2.1.2 g%B2.1.2 h%B2.1.2; - -set in 0, -set sel %B000, -eval, -output; - -set sel %B001, -eval, -output; - -set sel %B010, -eval, -output; - -set sel %B011, -eval, -output; - -set sel %B100, -eval, -output; - -set sel %B101, -eval, -output; - -set sel %B110, -eval, -output; - -set sel %B111, -eval, -output; - -set in 1, -set sel %B000, -eval, -output; - -set sel %B001, -eval, -output; - -set sel %B010, -eval, -output; - -set sel %B011, -eval, -output; - -set sel %B100, -eval, -output; - -set sel %B101, -eval, -output; - -set sel %B110, -eval, -output; - -set sel %B111, -eval, -output; diff --git a/projects/01/Mux.cmp b/projects/01/Mux.cmp deleted file mode 100644 index 7a5cc5b..0000000 --- a/projects/01/Mux.cmp +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | sel | out | -| 0 | 0 | 0 | 0 | -| 0 | 0 | 1 | 0 | -| 0 | 1 | 0 | 0 | -| 0 | 1 | 1 | 1 | -| 1 | 0 | 0 | 1 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | -| 1 | 1 | 1 | 1 | diff --git a/projects/01/Mux.hdl b/projects/01/Mux.hdl deleted file mode 100644 index aac2e36..0000000 --- a/projects/01/Mux.hdl +++ /dev/null @@ -1,22 +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/01/Mux.hdl - -/** - * Multiplexor: - * out = a if sel == 0 - * b otherwise - */ - -CHIP Mux { - IN a, b, sel; - OUT out; - - PARTS: - // Put your code here: - Not (in=sel, out=notsel); - And (a=a, b=notsel, out=aandnotsel); - And (a=sel, b=b, out=selandb); - Or (a=aandnotsel, b=selandb, out=out); -} diff --git a/projects/01/Mux.out b/projects/01/Mux.out deleted file mode 100644 index e4b51c6..0000000 --- a/projects/01/Mux.out +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | sel | out | -| 0 | 0 | 0 | 0 | -| 0 | 0 | 1 | 0 | -| 0 | 1 | 0 | 0 | -| 0 | 1 | 1 | 1 | -| 1 | 0 | 0 | 1 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | -| 1 | 1 | 1 | 1 | diff --git a/projects/01/Mux.tst b/projects/01/Mux.tst deleted file mode 100644 index 9b7afd9..0000000 --- a/projects/01/Mux.tst +++ /dev/null @@ -1,49 +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/01/Mux.tst - -load Mux.hdl, -output-file Mux.out, -compare-to Mux.cmp, -output-list a%B3.1.3 b%B3.1.3 sel%B3.1.3 out%B3.1.3; - -set a 0, -set b 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a 0, -set b 1, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a 1, -set b 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a 1, -set b 1, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; diff --git a/projects/01/Mux16.cmp b/projects/01/Mux16.cmp deleted file mode 100644 index 661ee67..0000000 --- a/projects/01/Mux16.cmp +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | sel | out | -| 0000000000000000 | 0000000000000000 | 0 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 1 | 0000000000000000 | -| 0000000000000000 | 0001001000110100 | 0 | 0000000000000000 | -| 0000000000000000 | 0001001000110100 | 1 | 0001001000110100 | -| 1001100001110110 | 0000000000000000 | 0 | 1001100001110110 | -| 1001100001110110 | 0000000000000000 | 1 | 0000000000000000 | -| 1010101010101010 | 0101010101010101 | 0 | 1010101010101010 | -| 1010101010101010 | 0101010101010101 | 1 | 0101010101010101 | diff --git a/projects/01/Mux16.hdl b/projects/01/Mux16.hdl deleted file mode 100644 index ff09c6b..0000000 --- a/projects/01/Mux16.hdl +++ /dev/null @@ -1,34 +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/01/Mux16.hdl - -/** - * 16-bit multiplexor: - * for i = 0..15 out[i] = a[i] if sel == 0 - * b[i] if sel == 1 - */ - -CHIP Mux16 { - IN a[16], b[16], sel; - OUT out[16]; - - PARTS: - // Put your code here: - Mux (a=a[0], b=b[0], sel=sel, out=out[0]); - Mux (a=a[1], b=b[1], sel=sel, out=out[1]); - Mux (a=a[2], b=b[2], sel=sel, out=out[2]); - Mux (a=a[3], b=b[3], sel=sel, out=out[3]); - Mux (a=a[4], b=b[4], sel=sel, out=out[4]); - Mux (a=a[5], b=b[5], sel=sel, out=out[5]); - Mux (a=a[6], b=b[6], sel=sel, out=out[6]); - Mux (a=a[7], b=b[7], sel=sel, out=out[7]); - Mux (a=a[8], b=b[8], sel=sel, out=out[8]); - Mux (a=a[9], b=b[9], sel=sel, out=out[9]); - Mux (a=a[10], b=b[10], sel=sel, out=out[10]); - Mux (a=a[11], b=b[11], sel=sel, out=out[11]); - Mux (a=a[12], b=b[12], sel=sel, out=out[12]); - Mux (a=a[13], b=b[13], sel=sel, out=out[13]); - Mux (a=a[14], b=b[14], sel=sel, out=out[14]); - Mux (a=a[15], b=b[15], sel=sel, out=out[15]); -} diff --git a/projects/01/Mux16.out b/projects/01/Mux16.out deleted file mode 100644 index d2e472e..0000000 --- a/projects/01/Mux16.out +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | sel | out | -| 0000000000000000 | 0000000000000000 | 0 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 1 | 0000000000000000 | -| 0000000000000000 | 0001001000110100 | 0 | 0000000000000000 | -| 0000000000000000 | 0001001000110100 | 1 | 0001001000110100 | -| 1001100001110110 | 0000000000000000 | 0 | 1001100001110110 | -| 1001100001110110 | 0000000000000000 | 1 | 0000000000000000 | -| 1010101010101010 | 0101010101010101 | 0 | 1010101010101010 | -| 1010101010101010 | 0101010101010101 | 1 | 0101010101010101 | diff --git a/projects/01/Mux16.tst b/projects/01/Mux16.tst deleted file mode 100644 index cf34155..0000000 --- a/projects/01/Mux16.tst +++ /dev/null @@ -1,49 +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/01/Mux16.tst - -load Mux16.hdl, -output-file Mux16.out, -compare-to Mux16.cmp, -output-list a%B1.16.1 b%B1.16.1 sel%D2.1.2 out%B1.16.1; - -set a 0, -set b 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a %B0000000000000000, -set b %B0001001000110100, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a %B1001100001110110, -set b %B0000000000000000, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set a %B1010101010101010, -set b %B0101010101010101, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; \ No newline at end of file diff --git a/projects/01/Mux4Way16.cmp b/projects/01/Mux4Way16.cmp deleted file mode 100644 index 8704e79..0000000 --- a/projects/01/Mux4Way16.cmp +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | c | d | sel | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 00 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 01 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 10 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 11 | 0000000000000000 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 00 | 0001001000110100 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 01 | 1001100001110110 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 10 | 1010101010101010 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 11 | 0101010101010101 | diff --git a/projects/01/Mux4Way16.hdl b/projects/01/Mux4Way16.hdl deleted file mode 100644 index a47dbae..0000000 --- a/projects/01/Mux4Way16.hdl +++ /dev/null @@ -1,23 +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/01/Mux4Way16.hdl - -/** - * 4-way 16-bit multiplexor: - * out = a if sel == 00 - * b if sel == 01 - * c if sel == 10 - * d if sel == 11 - */ - -CHIP Mux4Way16 { - IN a[16], b[16], c[16], d[16], sel[2]; - OUT out[16]; - - PARTS: - // Put your code here: - Mux16 (a=a, b=b, sel=sel[0], out=out1); - Mux16 (a=c, b=d, sel=sel[0], out=out2); - Mux16 (a=out1, b=out2, sel=sel[1], out=out); -} diff --git a/projects/01/Mux4Way16.out b/projects/01/Mux4Way16.out deleted file mode 100644 index 659176d..0000000 --- a/projects/01/Mux4Way16.out +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | c | d | sel | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 00 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 01 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 10 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 11 | 0000000000000000 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 00 | 0001001000110100 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 01 | 1001100001110110 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 10 | 1010101010101010 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | 0101010101010101 | 11 | 0101010101010101 | diff --git a/projects/01/Mux4Way16.tst b/projects/01/Mux4Way16.tst deleted file mode 100644 index 3f4efa3..0000000 --- a/projects/01/Mux4Way16.tst +++ /dev/null @@ -1,49 +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/01/Mux4Way16.tst - -load Mux4Way16.hdl, -output-file Mux4Way16.out, -compare-to Mux4Way16.cmp, -output-list a%B1.16.1 b%B1.16.1 c%B1.16.1 d%B1.16.1 sel%B2.2.2 out%B1.16.1; - -set a 0, -set b 0, -set c 0, -set d 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set sel 2, -eval, -output; - -set sel 3, -eval, -output; - -set a %B0001001000110100, -set b %B1001100001110110, -set c %B1010101010101010, -set d %B0101010101010101, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set sel 2, -eval, -output; - -set sel 3, -eval, -output; diff --git a/projects/01/Mux8Way16.cmp b/projects/01/Mux8Way16.cmp deleted file mode 100644 index 1484e0a..0000000 --- a/projects/01/Mux8Way16.cmp +++ /dev/null @@ -1,17 +0,0 @@ -| a | b | c | d | e | f | g | h | sel | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 000 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 001 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 010 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 011 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 100 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 101 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 110 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 111 | 0000000000000000 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 000 | 0001001000110100 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 001 | 0010001101000101 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 010 | 0011010001010110 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 011 | 0100010101100111 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 100 | 0101011001111000 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 101 | 0110011110001001 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 110 | 0111100010011010 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 111 | 1000100110101011 | diff --git a/projects/01/Mux8Way16.hdl b/projects/01/Mux8Way16.hdl deleted file mode 100644 index 6c88945..0000000 --- a/projects/01/Mux8Way16.hdl +++ /dev/null @@ -1,25 +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/01/Mux8Way16.hdl - -/** - * 8-way 16-bit multiplexor: - * out = a if sel == 000 - * b if sel == 001 - * etc. - * h if sel == 111 - */ - -CHIP Mux8Way16 { - IN a[16], b[16], c[16], d[16], - e[16], f[16], g[16], h[16], - sel[3]; - OUT out[16]; - - PARTS: - // Put your code here: - Mux4Way16 (a=a, b=b, c=c, d=d, sel=sel[0..1], out=out1); - Mux4Way16 (a=e, b=f, c=g, d=h, sel=sel[0..1], out=out2); - Mux16 (a=out1, b=out2, sel=sel[2], out=out); -} diff --git a/projects/01/Mux8Way16.out b/projects/01/Mux8Way16.out deleted file mode 100644 index 11ff518..0000000 --- a/projects/01/Mux8Way16.out +++ /dev/null @@ -1,17 +0,0 @@ -| a | b | c | d | e | f | g | h | sel | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 000 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 001 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 010 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 011 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 100 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 101 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 110 | 0000000000000000 | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 | 111 | 0000000000000000 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 000 | 0001001000110100 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 001 | 0010001101000101 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 010 | 0011010001010110 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 011 | 0100010101100111 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 100 | 0101011001111000 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 101 | 0110011110001001 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 110 | 0111100010011010 | -| 0001001000110100 | 0010001101000101 | 0011010001010110 | 0100010101100111 | 0101011001111000 | 0110011110001001 | 0111100010011010 | 1000100110101011 | 111 | 1000100110101011 | diff --git a/projects/01/Mux8Way16.tst b/projects/01/Mux8Way16.tst deleted file mode 100644 index 59bb41c..0000000 --- a/projects/01/Mux8Way16.tst +++ /dev/null @@ -1,89 +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/01/Mux8Way16.tst - -load Mux8Way16.hdl, -output-file Mux8Way16.out, -compare-to Mux8Way16.cmp, -output-list a%B1.16.1 b%B1.16.1 c%B1.16.1 d%B1.16.1 e%B1.16.1 f%B1.16.1 g%B1.16.1 h%B1.16.1 sel%B2.3.2 out%B1.16.1; - -set a 0, -set b 0, -set c 0, -set d 0, -set e 0, -set f 0, -set g 0, -set h 0, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set sel 2, -eval, -output; - -set sel 3, -eval, -output; - -set sel 4, -eval, -output; - -set sel 5, -eval, -output; - -set sel 6, -eval, -output; - -set sel 7, -eval, -output; - -set a %B0001001000110100, -set b %B0010001101000101, -set c %B0011010001010110, -set d %B0100010101100111, -set e %B0101011001111000, -set f %B0110011110001001, -set g %B0111100010011010, -set h %B1000100110101011, -set sel 0, -eval, -output; - -set sel 1, -eval, -output; - -set sel 2, -eval, -output; - -set sel 3, -eval, -output; - -set sel 4, -eval, -output; - -set sel 5, -eval, -output; - -set sel 6, -eval, -output; - -set sel 7, -eval, -output; diff --git a/projects/01/Not.cmp b/projects/01/Not.cmp deleted file mode 100644 index e8c1191..0000000 --- a/projects/01/Not.cmp +++ /dev/null @@ -1,3 +0,0 @@ -| in | out | -| 0 | 1 | -| 1 | 0 | diff --git a/projects/01/Not.hdl b/projects/01/Not.hdl deleted file mode 100644 index e8aac51..0000000 --- a/projects/01/Not.hdl +++ /dev/null @@ -1,18 +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/01/Not.hdl - -/** - * Not gate: - * out = not in - */ - -CHIP Not { - IN in; - OUT out; - - PARTS: - // Put your code here: - Nand (a=in, b=in, out=out); -} diff --git a/projects/01/Not.out b/projects/01/Not.out deleted file mode 100644 index 7b64092..0000000 --- a/projects/01/Not.out +++ /dev/null @@ -1,3 +0,0 @@ -| in | out | -| 0 | 1 | -| 1 | 0 | diff --git a/projects/01/Not.tst b/projects/01/Not.tst deleted file mode 100644 index 1e3bbe7..0000000 --- a/projects/01/Not.tst +++ /dev/null @@ -1,17 +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/01/Not.tst - -load Not.hdl, -output-file Not.out, -compare-to Not.cmp, -output-list in%B3.1.3 out%B3.1.3; - -set in 0, -eval, -output; - -set in 1, -eval, -output; diff --git a/projects/01/Not16.cmp b/projects/01/Not16.cmp deleted file mode 100644 index 68a5512..0000000 --- a/projects/01/Not16.cmp +++ /dev/null @@ -1,6 +0,0 @@ -| in | out | -| 0000000000000000 | 1111111111111111 | -| 1111111111111111 | 0000000000000000 | -| 1010101010101010 | 0101010101010101 | -| 0011110011000011 | 1100001100111100 | -| 0001001000110100 | 1110110111001011 | diff --git a/projects/01/Not16.hdl b/projects/01/Not16.hdl deleted file mode 100644 index f24fdb0..0000000 --- a/projects/01/Not16.hdl +++ /dev/null @@ -1,33 +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/01/Not16.hdl - -/** - * 16-bit Not: - * for i=0..15: out[i] = not in[i] - */ - -CHIP Not16 { - IN in[16]; - OUT out[16]; - - PARTS: - // Put your code here: - Not (in=in[0], out=out[0]); - Not (in=in[1], out=out[1]); - Not (in=in[2], out=out[2]); - Not (in=in[3], out=out[3]); - Not (in=in[4], out=out[4]); - Not (in=in[5], out=out[5]); - Not (in=in[6], out=out[6]); - Not (in=in[7], out=out[7]); - Not (in=in[8], out=out[8]); - Not (in=in[9], out=out[9]); - Not (in=in[10], out=out[10]); - Not (in=in[11], out=out[11]); - Not (in=in[12], out=out[12]); - Not (in=in[13], out=out[13]); - Not (in=in[14], out=out[14]); - Not (in=in[15], out=out[15]); -} diff --git a/projects/01/Not16.out b/projects/01/Not16.out deleted file mode 100644 index ae2ad1d..0000000 --- a/projects/01/Not16.out +++ /dev/null @@ -1,6 +0,0 @@ -| in | out | -| 0000000000000000 | 1111111111111111 | -| 1111111111111111 | 0000000000000000 | -| 1010101010101010 | 0101010101010101 | -| 0011110011000011 | 1100001100111100 | -| 0001001000110100 | 1110110111001011 | diff --git a/projects/01/Not16.tst b/projects/01/Not16.tst deleted file mode 100644 index e7e2c3b..0000000 --- a/projects/01/Not16.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/01/Not16.tst - -load Not16.hdl, -output-file Not16.out, -compare-to Not16.cmp, -output-list in%B1.16.1 out%B1.16.1; - -set in %B0000000000000000, -eval, -output; - -set in %B1111111111111111, -eval, -output; - -set in %B1010101010101010, -eval, -output; - -set in %B0011110011000011, -eval, -output; - -set in %B0001001000110100, -eval, -output; \ No newline at end of file diff --git a/projects/01/Or.cmp b/projects/01/Or.cmp deleted file mode 100644 index dab924c..0000000 --- a/projects/01/Or.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 1 | -| 1 | 0 | 1 | -| 1 | 1 | 1 | diff --git a/projects/01/Or.hdl b/projects/01/Or.hdl deleted file mode 100644 index f539fbf..0000000 --- a/projects/01/Or.hdl +++ /dev/null @@ -1,21 +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/01/Or.hdl - - /** - * Or gate: - * out = 1 if (a == 1 or b == 1) - * 0 otherwise - */ - -CHIP Or { - IN a, b; - OUT out; - - PARTS: - // Put your code here: - Not (in=a, out=nota); - Not (in=b, out=notb); - Nand (a=nota, b=notb, out=out); -} diff --git a/projects/01/Or.out b/projects/01/Or.out deleted file mode 100644 index 8010688..0000000 --- a/projects/01/Or.out +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 1 | -| 1 | 0 | 1 | -| 1 | 1 | 1 | diff --git a/projects/01/Or.tst b/projects/01/Or.tst deleted file mode 100644 index 948b6b3..0000000 --- a/projects/01/Or.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/01/Or.tst - -load Or.hdl, -output-file Or.out, -compare-to Or.cmp, -output-list a%B3.1.3 b%B3.1.3 out%B3.1.3; - -set a 0, -set b 0, -eval, -output; - -set a 0, -set b 1, -eval, -output; - -set a 1, -set b 0, -eval, -output; - -set a 1, -set b 1, -eval, -output; diff --git a/projects/01/Or16.cmp b/projects/01/Or16.cmp deleted file mode 100644 index e2c3a30..0000000 --- a/projects/01/Or16.cmp +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1111111111111111 | -| 1111111111111111 | 1111111111111111 | 1111111111111111 | -| 1010101010101010 | 0101010101010101 | 1111111111111111 | -| 0011110011000011 | 0000111111110000 | 0011111111110011 | -| 0001001000110100 | 1001100001110110 | 1001101001110110 | diff --git a/projects/01/Or16.hdl b/projects/01/Or16.hdl deleted file mode 100644 index 4b46ec5..0000000 --- a/projects/01/Or16.hdl +++ /dev/null @@ -1,33 +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/01/Or16.hdl - -/** - * 16-bit bitwise Or: - * for i = 0..15 out[i] = (a[i] or b[i]) - */ - -CHIP Or16 { - IN a[16], b[16]; - OUT out[16]; - - PARTS: - // Put your code here: - Or (a=a[0], b=b[0], out=out[0]); - Or (a=a[1], b=b[1], out=out[1]); - Or (a=a[2], b=b[2], out=out[2]); - Or (a=a[3], b=b[3], out=out[3]); - Or (a=a[4], b=b[4], out=out[4]); - Or (a=a[5], b=b[5], out=out[5]); - Or (a=a[6], b=b[6], out=out[6]); - Or (a=a[7], b=b[7], out=out[7]); - Or (a=a[8], b=b[8], out=out[8]); - Or (a=a[9], b=b[9], out=out[9]); - Or (a=a[10], b=b[10], out=out[10]); - Or (a=a[11], b=b[11], out=out[11]); - Or (a=a[12], b=b[12], out=out[12]); - Or (a=a[13], b=b[13], out=out[13]); - Or (a=a[14], b=b[14], out=out[14]); - Or (a=a[15], b=b[15], out=out[15]); -} diff --git a/projects/01/Or16.out b/projects/01/Or16.out deleted file mode 100644 index 8664afe..0000000 --- a/projects/01/Or16.out +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1111111111111111 | -| 1111111111111111 | 1111111111111111 | 1111111111111111 | -| 1010101010101010 | 0101010101010101 | 1111111111111111 | -| 0011110011000011 | 0000111111110000 | 0011111111110011 | -| 0001001000110100 | 1001100001110110 | 1001101001110110 | diff --git a/projects/01/Or16.tst b/projects/01/Or16.tst deleted file mode 100644 index ea7b944..0000000 --- a/projects/01/Or16.tst +++ /dev/null @@ -1,39 +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/01/Or16.tst - -load Or16.hdl, -output-file Or16.out, -compare-to Or16.cmp, -output-list a%B1.16.1 b%B1.16.1 out%B1.16.1; - -set a %B0000000000000000, -set b %B0000000000000000, -eval, -output; - -set a %B0000000000000000, -set b %B1111111111111111, -eval, -output; - -set a %B1111111111111111, -set b %B1111111111111111, -eval, -output; - -set a %B1010101010101010, -set b %B0101010101010101, -eval, -output; - -set a %B0011110011000011, -set b %B0000111111110000, -eval, -output; - -set a %B0001001000110100, -set b %B1001100001110110, -eval, -output; \ No newline at end of file diff --git a/projects/01/Or8Way.cmp b/projects/01/Or8Way.cmp deleted file mode 100644 index 3f9fd54..0000000 --- a/projects/01/Or8Way.cmp +++ /dev/null @@ -1,6 +0,0 @@ -| in | out | -| 00000000 | 0 | -| 11111111 | 1 | -| 00010000 | 1 | -| 00000001 | 1 | -| 00100110 | 1 | diff --git a/projects/01/Or8Way.hdl b/projects/01/Or8Way.hdl deleted file mode 100644 index 495972b..0000000 --- a/projects/01/Or8Way.hdl +++ /dev/null @@ -1,24 +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/01/Or8Way.hdl - -/** - * 8-way Or: - * out = (in[0] or in[1] or ... or in[7]) - */ - -CHIP Or8Way { - IN in[8]; - OUT out; - - PARTS: - // Put your code here: - Or (a=in[0], b=in[1], out=in01); - Or (a=in01, b=in[2], out=in02); - Or (a=in02, b=in[3], out=in03); - Or (a=in03, b=in[4], out=in04); - Or (a=in04, b=in[5], out=in05); - Or (a=in05, b=in[6], out=in06); - Or (a=in06, b=in[7], out=out); -} diff --git a/projects/01/Or8Way.out b/projects/01/Or8Way.out deleted file mode 100644 index b9f8d99..0000000 --- a/projects/01/Or8Way.out +++ /dev/null @@ -1,6 +0,0 @@ -| in | out | -| 00000000 | 0 | -| 11111111 | 1 | -| 00010000 | 1 | -| 00000001 | 1 | -| 00100110 | 1 | diff --git a/projects/01/Or8Way.tst b/projects/01/Or8Way.tst deleted file mode 100644 index e6fbba7..0000000 --- a/projects/01/Or8Way.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/01/Or8Way.tst - -load Or8Way.hdl, -output-file Or8Way.out, -compare-to Or8Way.cmp, -output-list in%B2.8.2 out%B2.1.2; - -set in %B00000000, -eval, -output; - -set in %B11111111, -eval, -output; - -set in %B00010000, -eval, -output; - -set in %B00000001, -eval, -output; - -set in %B00100110, -eval, -output; \ No newline at end of file diff --git a/projects/01/Xor.cmp b/projects/01/Xor.cmp deleted file mode 100644 index a1e07b2..0000000 --- a/projects/01/Xor.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 1 | -| 1 | 0 | 1 | -| 1 | 1 | 0 | diff --git a/projects/01/Xor.hdl b/projects/01/Xor.hdl deleted file mode 100644 index 5ec4579..0000000 --- a/projects/01/Xor.hdl +++ /dev/null @@ -1,22 +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/01/Xor.hdl - -/** - * Exclusive-or gate: - * out = not (a == b) - */ - -CHIP Xor { - IN a, b; - OUT out; - - PARTS: - // Put your code here: - Not (in=a, out=nota); - Not (in=b, out=notb); - And (a=a, b=notb, out=aandnotb); - And (a=nota, b=b, out=notaandb); - Or (a=aandnotb, b=notaandb, out=out); -} diff --git a/projects/01/Xor.out b/projects/01/Xor.out deleted file mode 100644 index 73a8d0c..0000000 --- a/projects/01/Xor.out +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 1 | -| 1 | 0 | 1 | -| 1 | 1 | 0 | diff --git a/projects/01/Xor.tst b/projects/01/Xor.tst deleted file mode 100644 index 658cbe5..0000000 --- a/projects/01/Xor.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/01/Xor.tst - -load Xor.hdl, -output-file Xor.out, -compare-to Xor.cmp, -output-list a%B3.1.3 b%B3.1.3 out%B3.1.3; - -set a 0, -set b 0, -eval, -output; - -set a 0, -set b 1, -eval, -output; - -set a 1, -set b 0, -eval, -output; - -set a 1, -set b 1, -eval, -output; diff --git a/projects/02/ALU-nostat.cmp b/projects/02/ALU-nostat.cmp deleted file mode 100644 index 976ab78..0000000 --- a/projects/02/ALU-nostat.cmp +++ /dev/null @@ -1,37 +0,0 @@ -| x | y |zx |nx |zy |ny | f |no | out | -| 0000000000000000 | 1111111111111111 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 0 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 0 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 1 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 1 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 1 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 1 | 1 | 1 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 0 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 0 | 1111111111111110 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 1 | 0 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 1 | 1 | 1 | 1111111111111111 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 1 | 0 | 1 | 1111111111111111 | -| 0101101110100000 | 0001111011010010 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 1 | 1 | 0 | 0 | 0101101110100000 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 0 | 0 | 0 | 0 | 0001111011010010 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 1 | 1 | 0 | 1 | 1010010001011111 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 0 | 0 | 0 | 1 | 1110000100101101 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 1 | 1 | 1 | 1 | 1010010001100000 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 0 | 0 | 1 | 1 | 1110000100101110 | -| 0101101110100000 | 0001111011010010 | 0 | 1 | 1 | 1 | 1 | 1 | 0101101110100001 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 0 | 1 | 1 | 1 | 0001111011010011 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 1 | 1 | 1 | 0 | 0101101110011111 | -| 0101101110100000 | 0001111011010010 | 1 | 1 | 0 | 0 | 1 | 0 | 0001111011010001 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 0 | 0 | 1 | 0 | 0111101001110010 | -| 0101101110100000 | 0001111011010010 | 0 | 1 | 0 | 0 | 1 | 1 | 0011110011001110 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 0 | 1 | 1 | 1 | 1100001100110010 | -| 0101101110100000 | 0001111011010010 | 0 | 0 | 0 | 0 | 0 | 0 | 0001101010000000 | -| 0101101110100000 | 0001111011010010 | 0 | 1 | 0 | 1 | 0 | 1 | 0101111111110010 | diff --git a/projects/02/ALU-nostat.tst b/projects/02/ALU-nostat.tst deleted file mode 100644 index fa3e448..0000000 --- a/projects/02/ALU-nostat.tst +++ /dev/null @@ -1,353 +0,0 @@ -// This file is part of the materials accompanying the book -// "The Elements of Computing Systems" by Nisan and Schocken, -// MIT Press. Book site: www.idc.ac.il/tecs -// File name: projects/02/ALU-nostat.tst - -// ALU-nostat.tst provides a partial test of the ALU chip. -// It IS NOT a replacement for ALU.tst. - -// ALU-nostat.tst tests only the computation part of the ALU. -// The 'zr' and 'ng' status outputs are ignored. - -// This test lets you concentrate on getting the ALU computation right without the -// additional task of handling the status outputs. - -// Once your ALU passes ALU-nostat.tst you need to test it with ALU.tst. -// This way, any comparison failures during ALU.tst will be caused by errors in -// the handling of the 'zr' and 'ng' status outputs. - -load ALU.hdl, -output-file ALU-nostat.out, -compare-to ALU-nostat.cmp, -output-list x%B1.16.1 y%B1.16.1 zx%B1.1.1 nx%B1.1.1 zy%B1.1.1 - ny%B1.1.1 f%B1.1.1 no%B1.1.1 out%B1.16.1; - -set x %B0000000000000000, -set y %B1111111111111111, - -set zx 1, -set nx 0, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -set zx 0, -set nx 1, -set zy 0, -set ny 1, -set f 0, -set no 1, -eval, -output; - -set x %B101101110100000, -set y %B001111011010010, - -set zx 1, -set nx 0, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 0, -eval, -output; - -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -set zx 0, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -set zx 0, -set nx 1, -set zy 0, -set ny 1, -set f 0, -set no 1, -eval, -output; diff --git a/projects/02/ALU.cmp b/projects/02/ALU.cmp deleted file mode 100644 index 2ec3a55..0000000 --- a/projects/02/ALU.cmp +++ /dev/null @@ -1,37 +0,0 @@ -| x | y |zx |nx |zy |ny | f |no | out |zr |ng | -| 0000000000000000 | 1111111111111111 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 1 | 1 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 0 | 1111111111111110 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 1 | 1 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 1 | 0 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 0 | 0 | 0000000000010001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 0 | 0 | 0000000000000011 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 0 | 1 | 1111111111101110 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 0 | 1 | 1111111111111100 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 1 | 1 | 1111111111101111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 1 | 1 | 1111111111111101 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 1 | 1 | 1 | 1 | 0000000000010010 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 1 | 1 | 1 | 0000000000000100 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 1 | 0 | 0000000000010000 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 1 | 0 | 0000000000000010 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 0 | 1 | 0 | 0000000000010100 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 0 | 0 | 1 | 1 | 0000000000001110 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 1 | 1 | 1 | 1111111111110010 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 0 | 0 | 0 | 0000000000000001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 0 | 1 | 0 | 1 | 0000000000010011 | 0 | 0 | diff --git a/projects/02/ALU.hdl b/projects/02/ALU.hdl deleted file mode 100644 index 47697a0..0000000 --- a/projects/02/ALU.hdl +++ /dev/null @@ -1,62 +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/02/ALU.hdl - -/** - * The ALU (Arithmetic Logic Unit). - * Computes one of the following functions: - * x+y, x-y, y-x, 0, 1, -1, x, y, -x, -y, !x, !y, - * x+1, y+1, x-1, y-1, x&y, x|y on two 16-bit inputs, - * according to 6 input bits denoted zx,nx,zy,ny,f,no. - * In addition, the ALU computes two 1-bit outputs: - * if the ALU output == 0, zr is set to 1; otherwise zr is set to 0; - * if the ALU output < 0, ng is set to 1; otherwise ng is set to 0. - */ - -// Implementation: the ALU logic manipulates the x and y inputs -// and operates on the resulting values, as follows: -// if (zx == 1) set x = 0 // 16-bit constant -// if (nx == 1) set x = !x // bitwise not -// if (zy == 1) set y = 0 // 16-bit constant -// if (ny == 1) set y = !y // bitwise not -// if (f == 1) set out = x + y // integer 2's complement addition -// if (f == 0) set out = x & y // bitwise and -// if (no == 1) set out = !out // bitwise not -// if (out == 0) set zr = 1 -// if (out < 0) set ng = 1 - -CHIP ALU { - IN - x[16], y[16], // 16-bit inputs - zx, // zero the x input? - nx, // negate the x input? - zy, // zero the y input? - ny, // negate the y input? - f, // compute out = x + y (if 1) or x & y (if 0) - no; // negate the out output? - - OUT - out[16], // 16-bit output - zr, // 1 if (out == 0), 0 otherwise - ng; // 1 if (out < 0), 0 otherwise - - PARTS: - // Put you code here: - Mux16 (a=x, b[0..15]=false, sel=zx, out=x1); - Not16 (in=x1, out=notx1); - Mux16 (a=x1, b=notx1, sel=nx, out=x2); - Mux16 (a=y, b[0..15]=false, sel=zy, out=y1); - Not16 (in=y1, out=noty1); - Mux16 (a=y1, b=noty1, sel=ny, out=y2); - Add16 (a=x2, b=y2, out=x2py2); - And16 (a=x2, b=y2, out=x2ay2); - Mux16 (a=x2ay2, b=x2py2, sel=f, out=xy); - Not16 (in=xy, out=notxy); - Mux16 (a=xy, b=notxy, sel=no, out=out, out[0..7]=out1, out[8..15]=out2, out[15]=msbout); - Or8Way (in=out1, out=z1); - Or8Way (in=out1, out=z2); //some potential pitfall w.r.t. subbusing see https://www.coursera.org/learn/build-a-computer/discussions/weeks/2/threads/9VYr3LzkEeeK2BJ0oEsgKA - Or (a=z1, b=z2, out=z); - Not (in=z, out=zr); - And (a=msbout, b=true, out=ng); -} diff --git a/projects/02/ALU.out b/projects/02/ALU.out deleted file mode 100644 index 2424a73..0000000 --- a/projects/02/ALU.out +++ /dev/null @@ -1,37 +0,0 @@ -| x | y |zx |nx |zy |ny | f |no | out |zr |ng | -| 0000000000000000 | 1111111111111111 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 0 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 0 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 1 | 1 | 1 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 1 | 1 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 1 | 1 | 0 | 0 | 1 | 0 | 1111111111111110 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 0 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 1 | 1 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000000000 | 1111111111111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000000000 | 1111111111111111 | 0 | 1 | 0 | 1 | 0 | 1 | 1111111111111111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 0 | 1 | 0 | 1 | 0 | 0000000000000000 | 1 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 1 | 0 | 1 | 0 | 1111111111111111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 0 | 0 | 0000000000010001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 0 | 0 | 0000000000000011 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 0 | 1 | 1111111111101110 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 0 | 1 | 1111111111111100 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 1 | 1 | 1111111111101111 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 1 | 1 | 1111111111111101 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 1 | 1 | 1 | 1 | 0000000000010010 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 1 | 1 | 1 | 0000000000000100 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 1 | 1 | 1 | 0 | 0000000000010000 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 1 | 1 | 0 | 0 | 1 | 0 | 0000000000000010 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 0 | 1 | 0 | 0000000000010100 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 0 | 0 | 1 | 1 | 0000000000001110 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 1 | 1 | 1 | 1111111111110010 | 0 | 1 | -| 0000000000010001 | 0000000000000011 | 0 | 0 | 0 | 0 | 0 | 0 | 0000000000000001 | 0 | 0 | -| 0000000000010001 | 0000000000000011 | 0 | 1 | 0 | 1 | 0 | 1 | 0000000000010011 | 0 | 0 | diff --git a/projects/02/ALU.tst b/projects/02/ALU.tst deleted file mode 100644 index 9e665b0..0000000 --- a/projects/02/ALU.tst +++ /dev/null @@ -1,377 +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/02/ALU.tst - -load ALU.hdl, -output-file ALU.out, -compare-to ALU.cmp, -output-list x%B1.16.1 y%B1.16.1 zx%B1.1.1 nx%B1.1.1 zy%B1.1.1 - ny%B1.1.1 f%B1.1.1 no%B1.1.1 out%B1.16.1 zr%B1.1.1 - ng%B1.1.1; - -set x %B0000000000000000, // x = 0 -set y %B1111111111111111; // y = -1 - -// Compute 0 -set zx 1, -set nx 0, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute 1 -set zx 1, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute -1 -set zx 1, -set nx 1, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 0, -eval, -output; - -// Compute y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -// Compute !x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 1, -eval, -output; - -// Compute !y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 1, -eval, -output; - -// Compute -x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute -y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -// Compute x + 1 -set zx 0, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute y + 1 -set zx 1, -set nx 1, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute x - 1 -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 0, -eval, -output; - -// Compute y - 1 -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x + y -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x - y -set zx 0, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -// Compute y - x -set zx 0, -set nx 0, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute x & y -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -// Compute x | y -set zx 0, -set nx 1, -set zy 0, -set ny 1, -set f 0, -set no 1, -eval, -output; - -set x %B000000000010001, // x = 17 -set y %B000000000000011; // y = 3 - -// Compute 0 -set zx 1, -set nx 0, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute 1 -set zx 1, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute -1 -set zx 1, -set nx 1, -set zy 1, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 0, -eval, -output; - -// Compute y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -// Compute !x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 0, -set no 1, -eval, -output; - -// Compute !y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 0, -set no 1, -eval, -output; - -// Compute -x -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute -y -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -// Compute x + 1 -set zx 0, -set nx 1, -set zy 1, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute y + 1 -set zx 1, -set nx 1, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute x - 1 -set zx 0, -set nx 0, -set zy 1, -set ny 1, -set f 1, -set no 0, -eval, -output; - -// Compute y - 1 -set zx 1, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x + y -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 1, -set no 0, -eval, -output; - -// Compute x - y -set zx 0, -set nx 1, -set zy 0, -set ny 0, -set f 1, -set no 1, -eval, -output; - -// Compute y - x -set zx 0, -set nx 0, -set zy 0, -set ny 1, -set f 1, -set no 1, -eval, -output; - -// Compute x & y -set zx 0, -set nx 0, -set zy 0, -set ny 0, -set f 0, -set no 0, -eval, -output; - -// Compute x | y -set zx 0, -set nx 1, -set zy 0, -set ny 1, -set f 0, -set no 1, -eval, -output; diff --git a/projects/02/Add16.cmp b/projects/02/Add16.cmp deleted file mode 100644 index 76d069c..0000000 --- a/projects/02/Add16.cmp +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1111111111111111 | -| 1111111111111111 | 1111111111111111 | 1111111111111110 | -| 1010101010101010 | 0101010101010101 | 1111111111111111 | -| 0011110011000011 | 0000111111110000 | 0100110010110011 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | diff --git a/projects/02/Add16.hdl b/projects/02/Add16.hdl deleted file mode 100644 index ea3cb80..0000000 --- a/projects/02/Add16.hdl +++ /dev/null @@ -1,33 +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/02/Adder16.hdl - -/** - * Adds two 16-bit values. - * The most significant carry bit is ignored. - */ - -CHIP Add16 { - IN a[16], b[16]; - OUT out[16]; - - PARTS: - // Put you code here: - HalfAdder (a=a[0], b=b[0], sum=out[0], carry=carry0); - FullAdder (a=a[1], b=b[1], c=carry0, sum=out[1], carry=carry1); - FullAdder (a=a[2], b=b[2], c=carry1, sum=out[2], carry=carry2); - FullAdder (a=a[3], b=b[3], c=carry2, sum=out[3], carry=carry3); - FullAdder (a=a[4], b=b[4], c=carry3, sum=out[4], carry=carry4); - FullAdder (a=a[5], b=b[5], c=carry4, sum=out[5], carry=carry5); - FullAdder (a=a[6], b=b[6], c=carry5, sum=out[6], carry=carry6); - FullAdder (a=a[7], b=b[7], c=carry6, sum=out[7], carry=carry7); - FullAdder (a=a[8], b=b[8], c=carry7, sum=out[8], carry=carry8); - FullAdder (a=a[9], b=b[9], c=carry8, sum=out[9], carry=carry9); - FullAdder (a=a[10], b=b[10], c=carry9, sum=out[10], carry=carry10); - FullAdder (a=a[11], b=b[11], c=carry10, sum=out[11], carry=carry11); - FullAdder (a=a[12], b=b[12], c=carry11, sum=out[12], carry=carry12); - FullAdder (a=a[13], b=b[13], c=carry12, sum=out[13], carry=carry13); - FullAdder (a=a[14], b=b[14], c=carry13, sum=out[14], carry=carry14); - FullAdder (a=a[15], b=b[15], c=carry14, sum=out[15], carry=carry15); -} diff --git a/projects/02/Add16.out b/projects/02/Add16.out deleted file mode 100644 index 20f9c65..0000000 --- a/projects/02/Add16.out +++ /dev/null @@ -1,7 +0,0 @@ -| a | b | out | -| 0000000000000000 | 0000000000000000 | 0000000000000000 | -| 0000000000000000 | 1111111111111111 | 1111111111111111 | -| 1111111111111111 | 1111111111111111 | 1111111111111110 | -| 1010101010101010 | 0101010101010101 | 1111111111111111 | -| 0011110011000011 | 0000111111110000 | 0100110010110011 | -| 0001001000110100 | 1001100001110110 | 1010101010101010 | diff --git a/projects/02/Add16.tst b/projects/02/Add16.tst deleted file mode 100644 index 85e1be1..0000000 --- a/projects/02/Add16.tst +++ /dev/null @@ -1,39 +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/02/Add16.tst - -load Add16.hdl, -output-file Add16.out, -compare-to Add16.cmp, -output-list a%B1.16.1 b%B1.16.1 out%B1.16.1; - -set a %B0000000000000000, -set b %B0000000000000000, -eval, -output; - -set a %B0000000000000000, -set b %B1111111111111111, -eval, -output; - -set a %B1111111111111111, -set b %B1111111111111111, -eval, -output; - -set a %B1010101010101010, -set b %B0101010101010101, -eval, -output; - -set a %B0011110011000011, -set b %B0000111111110000, -eval, -output; - -set a %B0001001000110100, -set b %B1001100001110110, -eval, -output; diff --git a/projects/02/FullAdder.cmp b/projects/02/FullAdder.cmp deleted file mode 100644 index 84551aa..0000000 --- a/projects/02/FullAdder.cmp +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | c | sum | carry | -| 0 | 0 | 0 | 0 | 0 | -| 0 | 0 | 1 | 1 | 0 | -| 0 | 1 | 0 | 1 | 0 | -| 0 | 1 | 1 | 0 | 1 | -| 1 | 0 | 0 | 1 | 0 | -| 1 | 0 | 1 | 0 | 1 | -| 1 | 1 | 0 | 0 | 1 | -| 1 | 1 | 1 | 1 | 1 | diff --git a/projects/02/FullAdder.hdl b/projects/02/FullAdder.hdl deleted file mode 100644 index 451499f..0000000 --- a/projects/02/FullAdder.hdl +++ /dev/null @@ -1,20 +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/02/FullAdder.hdl - -/** - * Computes the sum of three bits. - */ - -CHIP FullAdder { - IN a, b, c; // 1-bit inputs - OUT sum, // Right bit of a + b + c - carry; // Left bit of a + b + c - - PARTS: - // Put you code here: - HalfAdder (a=a, b=b, sum=sum1, carry=carry1); - HalfAdder (a=sum1, b=c, sum=sum, carry=carry2); - Or (a=carry1, b=carry2, out=carry); -} diff --git a/projects/02/FullAdder.out b/projects/02/FullAdder.out deleted file mode 100644 index 610181f..0000000 --- a/projects/02/FullAdder.out +++ /dev/null @@ -1,9 +0,0 @@ -| a | b | c | sum | carry | -| 0 | 0 | 0 | 0 | 0 | -| 0 | 0 | 1 | 1 | 0 | -| 0 | 1 | 0 | 1 | 0 | -| 0 | 1 | 1 | 0 | 1 | -| 1 | 0 | 0 | 1 | 0 | -| 1 | 0 | 1 | 0 | 1 | -| 1 | 1 | 0 | 0 | 1 | -| 1 | 1 | 1 | 1 | 1 | diff --git a/projects/02/FullAdder.tst b/projects/02/FullAdder.tst deleted file mode 100644 index 5125cee..0000000 --- a/projects/02/FullAdder.tst +++ /dev/null @@ -1,47 +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/02/FullAdder.tst - -load FullAdder.hdl, -output-file FullAdder.out, -compare-to FullAdder.cmp, -output-list a%B3.1.3 b%B3.1.3 c%B3.1.3 sum%B3.1.3 carry%B3.1.3; - -set a 0, -set b 0, -set c 0, -eval, -output; - -set c 1, -eval, -output; - -set b 1, -set c 0, -eval, -output; - -set c 1, -eval, -output; - -set a 1, -set b 0, -set c 0, -eval, -output; - -set c 1, -eval, -output; - -set b 1, -set c 0, -eval, -output; - -set c 1, -eval, -output; diff --git a/projects/02/HalfAdder.cmp b/projects/02/HalfAdder.cmp deleted file mode 100644 index 911c770..0000000 --- a/projects/02/HalfAdder.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | sum | carry | -| 0 | 0 | 0 | 0 | -| 0 | 1 | 1 | 0 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | diff --git a/projects/02/HalfAdder.hdl b/projects/02/HalfAdder.hdl deleted file mode 100644 index 0b40509..0000000 --- a/projects/02/HalfAdder.hdl +++ /dev/null @@ -1,19 +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/02/HalfAdder.hdl - -/** - * Computes the sum of two bits. - */ - -CHIP HalfAdder { - IN a, b; // 1-bit inputs - OUT sum, // Right bit of a + b - carry; // Left bit of a + b - - PARTS: - // Put you code here: - Xor (a=a, b=b, out=sum); - And (a=a, b=b, out=carry); -} diff --git a/projects/02/HalfAdder.out b/projects/02/HalfAdder.out deleted file mode 100644 index 612c8e3..0000000 --- a/projects/02/HalfAdder.out +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | sum | carry | -| 0 | 0 | 0 | 0 | -| 0 | 1 | 1 | 0 | -| 1 | 0 | 1 | 0 | -| 1 | 1 | 0 | 1 | diff --git a/projects/02/HalfAdder.tst b/projects/02/HalfAdder.tst deleted file mode 100644 index 069b8ea..0000000 --- a/projects/02/HalfAdder.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/02/HalfAdder.tst - -load HalfAdder.hdl, -output-file HalfAdder.out, -compare-to HalfAdder.cmp, -output-list a%B3.1.3 b%B3.1.3 sum%B3.1.3 carry%B3.1.3; - -set a 0, -set b 0, -eval, -output; - -set a 0, -set b 1, -eval, -output; - -set a 1, -set b 0, -eval, -output; - -set a 1, -set b 1, -eval, -output; diff --git a/projects/02/Inc16.cmp b/projects/02/Inc16.cmp deleted file mode 100644 index 451f563..0000000 --- a/projects/02/Inc16.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| in | out | -| 0000000000000000 | 0000000000000001 | -| 1111111111111111 | 0000000000000000 | -| 0000000000000101 | 0000000000000110 | -| 1111111111111011 | 1111111111111100 | diff --git a/projects/02/Inc16.hdl b/projects/02/Inc16.hdl deleted file mode 100644 index 8142695..0000000 --- a/projects/02/Inc16.hdl +++ /dev/null @@ -1,18 +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/02/Inc16.hdl - -/** - * 16-bit incrementer: - * out = in + 1 (arithmetic addition) - */ - -CHIP Inc16 { - IN in[16]; - OUT out[16]; - - PARTS: - // Put you code here: - Add16 (a=in, b[0]=true, b[1..15]=false, out=out); -} diff --git a/projects/02/Inc16.out b/projects/02/Inc16.out deleted file mode 100644 index 78de1fe..0000000 --- a/projects/02/Inc16.out +++ /dev/null @@ -1,5 +0,0 @@ -| in | out | -| 0000000000000000 | 0000000000000001 | -| 1111111111111111 | 0000000000000000 | -| 0000000000000101 | 0000000000000110 | -| 1111111111111011 | 1111111111111100 | diff --git a/projects/02/Inc16.tst b/projects/02/Inc16.tst deleted file mode 100644 index 8537d86..0000000 --- a/projects/02/Inc16.tst +++ /dev/null @@ -1,25 +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/02/Inc16.tst - -load Inc16.hdl, -output-file Inc16.out, -compare-to Inc16.cmp, -output-list in%B1.16.1 out%B1.16.1; - -set in %B0000000000000000, // in = 0 -eval, -output; - -set in %B1111111111111111, // in = -1 -eval, -output; - -set in %B0000000000000101, // in = 5 -eval, -output; - -set in %B1111111111111011, // in = -5 -eval, -output; diff --git a/projects/02/Test.hdl b/projects/02/Test.hdl deleted file mode 100644 index 4b12157..0000000 --- a/projects/02/Test.hdl +++ /dev/null @@ -1,8 +0,0 @@ -CHIP Test{ - IN - x[16], y; - OUT - out[16]; - PARTS: - Mux (a=x, b=true, out=out); -} diff --git a/projects/03/a/Bit.cmp b/projects/03/a/Bit.cmp deleted file mode 100644 index e900ec7..0000000 --- a/projects/03/a/Bit.cmp +++ /dev/null @@ -1,215 +0,0 @@ -| time | in |load | out | -| 0+ | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | -| 2 | 0 | 1 | 0 | -| 2+ | 1 | 0 | 0 | -| 3 | 1 | 0 | 0 | -| 3+ | 1 | 1 | 0 | -| 4 | 1 | 1 | 1 | -| 4+ | 0 | 0 | 1 | -| 5 | 0 | 0 | 1 | -| 5+ | 1 | 0 | 1 | -| 6 | 1 | 0 | 1 | -| 6+ | 0 | 1 | 1 | -| 7 | 0 | 1 | 0 | -| 7+ | 1 | 1 | 0 | -| 8 | 1 | 1 | 1 | -| 8+ | 0 | 0 | 1 | -| 9 | 0 | 0 | 1 | -| 9+ | 0 | 0 | 1 | -| 10 | 0 | 0 | 1 | -| 10+ | 0 | 0 | 1 | -| 11 | 0 | 0 | 1 | -| 11+ | 0 | 0 | 1 | -| 12 | 0 | 0 | 1 | -| 12+ | 0 | 0 | 1 | -| 13 | 0 | 0 | 1 | -| 13+ | 0 | 0 | 1 | -| 14 | 0 | 0 | 1 | -| 14+ | 0 | 0 | 1 | -| 15 | 0 | 0 | 1 | -| 15+ | 0 | 0 | 1 | -| 16 | 0 | 0 | 1 | -| 16+ | 0 | 0 | 1 | -| 17 | 0 | 0 | 1 | -| 17+ | 0 | 0 | 1 | -| 18 | 0 | 0 | 1 | -| 18+ | 0 | 0 | 1 | -| 19 | 0 | 0 | 1 | -| 19+ | 0 | 0 | 1 | -| 20 | 0 | 0 | 1 | -| 20+ | 0 | 0 | 1 | -| 21 | 0 | 0 | 1 | -| 21+ | 0 | 0 | 1 | -| 22 | 0 | 0 | 1 | -| 22+ | 0 | 0 | 1 | -| 23 | 0 | 0 | 1 | -| 23+ | 0 | 0 | 1 | -| 24 | 0 | 0 | 1 | -| 24+ | 0 | 0 | 1 | -| 25 | 0 | 0 | 1 | -| 25+ | 0 | 0 | 1 | -| 26 | 0 | 0 | 1 | -| 26+ | 0 | 0 | 1 | -| 27 | 0 | 0 | 1 | -| 27+ | 0 | 0 | 1 | -| 28 | 0 | 0 | 1 | -| 28+ | 0 | 0 | 1 | -| 29 | 0 | 0 | 1 | -| 29+ | 0 | 0 | 1 | -| 30 | 0 | 0 | 1 | -| 30+ | 0 | 0 | 1 | -| 31 | 0 | 0 | 1 | -| 31+ | 0 | 0 | 1 | -| 32 | 0 | 0 | 1 | -| 32+ | 0 | 0 | 1 | -| 33 | 0 | 0 | 1 | -| 33+ | 0 | 0 | 1 | -| 34 | 0 | 0 | 1 | -| 34+ | 0 | 0 | 1 | -| 35 | 0 | 0 | 1 | -| 35+ | 0 | 0 | 1 | -| 36 | 0 | 0 | 1 | -| 36+ | 0 | 0 | 1 | -| 37 | 0 | 0 | 1 | -| 37+ | 0 | 0 | 1 | -| 38 | 0 | 0 | 1 | -| 38+ | 0 | 0 | 1 | -| 39 | 0 | 0 | 1 | -| 39+ | 0 | 0 | 1 | -| 40 | 0 | 0 | 1 | -| 40+ | 0 | 0 | 1 | -| 41 | 0 | 0 | 1 | -| 41+ | 0 | 0 | 1 | -| 42 | 0 | 0 | 1 | -| 42+ | 0 | 0 | 1 | -| 43 | 0 | 0 | 1 | -| 43+ | 0 | 0 | 1 | -| 44 | 0 | 0 | 1 | -| 44+ | 0 | 0 | 1 | -| 45 | 0 | 0 | 1 | -| 45+ | 0 | 0 | 1 | -| 46 | 0 | 0 | 1 | -| 46+ | 0 | 0 | 1 | -| 47 | 0 | 0 | 1 | -| 47+ | 0 | 0 | 1 | -| 48 | 0 | 0 | 1 | -| 48+ | 0 | 0 | 1 | -| 49 | 0 | 0 | 1 | -| 49+ | 0 | 0 | 1 | -| 50 | 0 | 0 | 1 | -| 50+ | 0 | 0 | 1 | -| 51 | 0 | 0 | 1 | -| 51+ | 0 | 0 | 1 | -| 52 | 0 | 0 | 1 | -| 52+ | 0 | 0 | 1 | -| 53 | 0 | 0 | 1 | -| 53+ | 0 | 0 | 1 | -| 54 | 0 | 0 | 1 | -| 54+ | 0 | 0 | 1 | -| 55 | 0 | 0 | 1 | -| 55+ | 0 | 0 | 1 | -| 56 | 0 | 0 | 1 | -| 56+ | 0 | 0 | 1 | -| 57 | 0 | 0 | 1 | -| 57+ | 0 | 1 | 1 | -| 58 | 0 | 1 | 0 | -| 58+ | 1 | 0 | 0 | -| 59 | 1 | 0 | 0 | -| 59+ | 1 | 0 | 0 | -| 60 | 1 | 0 | 0 | -| 60+ | 1 | 0 | 0 | -| 61 | 1 | 0 | 0 | -| 61+ | 1 | 0 | 0 | -| 62 | 1 | 0 | 0 | -| 62+ | 1 | 0 | 0 | -| 63 | 1 | 0 | 0 | -| 63+ | 1 | 0 | 0 | -| 64 | 1 | 0 | 0 | -| 64+ | 1 | 0 | 0 | -| 65 | 1 | 0 | 0 | -| 65+ | 1 | 0 | 0 | -| 66 | 1 | 0 | 0 | -| 66+ | 1 | 0 | 0 | -| 67 | 1 | 0 | 0 | -| 67+ | 1 | 0 | 0 | -| 68 | 1 | 0 | 0 | -| 68+ | 1 | 0 | 0 | -| 69 | 1 | 0 | 0 | -| 69+ | 1 | 0 | 0 | -| 70 | 1 | 0 | 0 | -| 70+ | 1 | 0 | 0 | -| 71 | 1 | 0 | 0 | -| 71+ | 1 | 0 | 0 | -| 72 | 1 | 0 | 0 | -| 72+ | 1 | 0 | 0 | -| 73 | 1 | 0 | 0 | -| 73+ | 1 | 0 | 0 | -| 74 | 1 | 0 | 0 | -| 74+ | 1 | 0 | 0 | -| 75 | 1 | 0 | 0 | -| 75+ | 1 | 0 | 0 | -| 76 | 1 | 0 | 0 | -| 76+ | 1 | 0 | 0 | -| 77 | 1 | 0 | 0 | -| 77+ | 1 | 0 | 0 | -| 78 | 1 | 0 | 0 | -| 78+ | 1 | 0 | 0 | -| 79 | 1 | 0 | 0 | -| 79+ | 1 | 0 | 0 | -| 80 | 1 | 0 | 0 | -| 80+ | 1 | 0 | 0 | -| 81 | 1 | 0 | 0 | -| 81+ | 1 | 0 | 0 | -| 82 | 1 | 0 | 0 | -| 82+ | 1 | 0 | 0 | -| 83 | 1 | 0 | 0 | -| 83+ | 1 | 0 | 0 | -| 84 | 1 | 0 | 0 | -| 84+ | 1 | 0 | 0 | -| 85 | 1 | 0 | 0 | -| 85+ | 1 | 0 | 0 | -| 86 | 1 | 0 | 0 | -| 86+ | 1 | 0 | 0 | -| 87 | 1 | 0 | 0 | -| 87+ | 1 | 0 | 0 | -| 88 | 1 | 0 | 0 | -| 88+ | 1 | 0 | 0 | -| 89 | 1 | 0 | 0 | -| 89+ | 1 | 0 | 0 | -| 90 | 1 | 0 | 0 | -| 90+ | 1 | 0 | 0 | -| 91 | 1 | 0 | 0 | -| 91+ | 1 | 0 | 0 | -| 92 | 1 | 0 | 0 | -| 92+ | 1 | 0 | 0 | -| 93 | 1 | 0 | 0 | -| 93+ | 1 | 0 | 0 | -| 94 | 1 | 0 | 0 | -| 94+ | 1 | 0 | 0 | -| 95 | 1 | 0 | 0 | -| 95+ | 1 | 0 | 0 | -| 96 | 1 | 0 | 0 | -| 96+ | 1 | 0 | 0 | -| 97 | 1 | 0 | 0 | -| 97+ | 1 | 0 | 0 | -| 98 | 1 | 0 | 0 | -| 98+ | 1 | 0 | 0 | -| 99 | 1 | 0 | 0 | -| 99+ | 1 | 0 | 0 | -| 100 | 1 | 0 | 0 | -| 100+ | 1 | 0 | 0 | -| 101 | 1 | 0 | 0 | -| 101+ | 1 | 0 | 0 | -| 102 | 1 | 0 | 0 | -| 102+ | 1 | 0 | 0 | -| 103 | 1 | 0 | 0 | -| 103+ | 1 | 0 | 0 | -| 104 | 1 | 0 | 0 | -| 104+ | 1 | 0 | 0 | -| 105 | 1 | 0 | 0 | -| 105+ | 1 | 0 | 0 | -| 106 | 1 | 0 | 0 | -| 106+ | 1 | 0 | 0 | -| 107 | 1 | 0 | 0 | diff --git a/projects/03/a/Bit.hdl b/projects/03/a/Bit.hdl deleted file mode 100644 index 52e0539..0000000 --- a/projects/03/a/Bit.hdl +++ /dev/null @@ -1,21 +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/03/a/Bit.hdl - -/** - * 1-bit register: - * If load[t] == 1 then out[t+1] = in[t] - * else out does not change (out[t+1] = out[t]) - */ - -CHIP Bit { - IN in, load; - OUT out; - - PARTS: - // Put your code here: - Mux (a=dffout, b=in, sel=load, out=muxout); - DFF (in=muxout, out=dffout); - Or (a=dffout, b=dffout, out=out); -} diff --git a/projects/03/a/Bit.out b/projects/03/a/Bit.out deleted file mode 100644 index 165c66d..0000000 --- a/projects/03/a/Bit.out +++ /dev/null @@ -1,215 +0,0 @@ -| time | in |load | out | -| 0+ | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | -| 2 | 0 | 1 | 0 | -| 2+ | 1 | 0 | 0 | -| 3 | 1 | 0 | 0 | -| 3+ | 1 | 1 | 0 | -| 4 | 1 | 1 | 1 | -| 4+ | 0 | 0 | 1 | -| 5 | 0 | 0 | 1 | -| 5+ | 1 | 0 | 1 | -| 6 | 1 | 0 | 1 | -| 6+ | 0 | 1 | 1 | -| 7 | 0 | 1 | 0 | -| 7+ | 1 | 1 | 0 | -| 8 | 1 | 1 | 1 | -| 8+ | 0 | 0 | 1 | -| 9 | 0 | 0 | 1 | -| 9+ | 0 | 0 | 1 | -| 10 | 0 | 0 | 1 | -| 10+ | 0 | 0 | 1 | -| 11 | 0 | 0 | 1 | -| 11+ | 0 | 0 | 1 | -| 12 | 0 | 0 | 1 | -| 12+ | 0 | 0 | 1 | -| 13 | 0 | 0 | 1 | -| 13+ | 0 | 0 | 1 | -| 14 | 0 | 0 | 1 | -| 14+ | 0 | 0 | 1 | -| 15 | 0 | 0 | 1 | -| 15+ | 0 | 0 | 1 | -| 16 | 0 | 0 | 1 | -| 16+ | 0 | 0 | 1 | -| 17 | 0 | 0 | 1 | -| 17+ | 0 | 0 | 1 | -| 18 | 0 | 0 | 1 | -| 18+ | 0 | 0 | 1 | -| 19 | 0 | 0 | 1 | -| 19+ | 0 | 0 | 1 | -| 20 | 0 | 0 | 1 | -| 20+ | 0 | 0 | 1 | -| 21 | 0 | 0 | 1 | -| 21+ | 0 | 0 | 1 | -| 22 | 0 | 0 | 1 | -| 22+ | 0 | 0 | 1 | -| 23 | 0 | 0 | 1 | -| 23+ | 0 | 0 | 1 | -| 24 | 0 | 0 | 1 | -| 24+ | 0 | 0 | 1 | -| 25 | 0 | 0 | 1 | -| 25+ | 0 | 0 | 1 | -| 26 | 0 | 0 | 1 | -| 26+ | 0 | 0 | 1 | -| 27 | 0 | 0 | 1 | -| 27+ | 0 | 0 | 1 | -| 28 | 0 | 0 | 1 | -| 28+ | 0 | 0 | 1 | -| 29 | 0 | 0 | 1 | -| 29+ | 0 | 0 | 1 | -| 30 | 0 | 0 | 1 | -| 30+ | 0 | 0 | 1 | -| 31 | 0 | 0 | 1 | -| 31+ | 0 | 0 | 1 | -| 32 | 0 | 0 | 1 | -| 32+ | 0 | 0 | 1 | -| 33 | 0 | 0 | 1 | -| 33+ | 0 | 0 | 1 | -| 34 | 0 | 0 | 1 | -| 34+ | 0 | 0 | 1 | -| 35 | 0 | 0 | 1 | -| 35+ | 0 | 0 | 1 | -| 36 | 0 | 0 | 1 | -| 36+ | 0 | 0 | 1 | -| 37 | 0 | 0 | 1 | -| 37+ | 0 | 0 | 1 | -| 38 | 0 | 0 | 1 | -| 38+ | 0 | 0 | 1 | -| 39 | 0 | 0 | 1 | -| 39+ | 0 | 0 | 1 | -| 40 | 0 | 0 | 1 | -| 40+ | 0 | 0 | 1 | -| 41 | 0 | 0 | 1 | -| 41+ | 0 | 0 | 1 | -| 42 | 0 | 0 | 1 | -| 42+ | 0 | 0 | 1 | -| 43 | 0 | 0 | 1 | -| 43+ | 0 | 0 | 1 | -| 44 | 0 | 0 | 1 | -| 44+ | 0 | 0 | 1 | -| 45 | 0 | 0 | 1 | -| 45+ | 0 | 0 | 1 | -| 46 | 0 | 0 | 1 | -| 46+ | 0 | 0 | 1 | -| 47 | 0 | 0 | 1 | -| 47+ | 0 | 0 | 1 | -| 48 | 0 | 0 | 1 | -| 48+ | 0 | 0 | 1 | -| 49 | 0 | 0 | 1 | -| 49+ | 0 | 0 | 1 | -| 50 | 0 | 0 | 1 | -| 50+ | 0 | 0 | 1 | -| 51 | 0 | 0 | 1 | -| 51+ | 0 | 0 | 1 | -| 52 | 0 | 0 | 1 | -| 52+ | 0 | 0 | 1 | -| 53 | 0 | 0 | 1 | -| 53+ | 0 | 0 | 1 | -| 54 | 0 | 0 | 1 | -| 54+ | 0 | 0 | 1 | -| 55 | 0 | 0 | 1 | -| 55+ | 0 | 0 | 1 | -| 56 | 0 | 0 | 1 | -| 56+ | 0 | 0 | 1 | -| 57 | 0 | 0 | 1 | -| 57+ | 0 | 1 | 1 | -| 58 | 0 | 1 | 0 | -| 58+ | 1 | 0 | 0 | -| 59 | 1 | 0 | 0 | -| 59+ | 1 | 0 | 0 | -| 60 | 1 | 0 | 0 | -| 60+ | 1 | 0 | 0 | -| 61 | 1 | 0 | 0 | -| 61+ | 1 | 0 | 0 | -| 62 | 1 | 0 | 0 | -| 62+ | 1 | 0 | 0 | -| 63 | 1 | 0 | 0 | -| 63+ | 1 | 0 | 0 | -| 64 | 1 | 0 | 0 | -| 64+ | 1 | 0 | 0 | -| 65 | 1 | 0 | 0 | -| 65+ | 1 | 0 | 0 | -| 66 | 1 | 0 | 0 | -| 66+ | 1 | 0 | 0 | -| 67 | 1 | 0 | 0 | -| 67+ | 1 | 0 | 0 | -| 68 | 1 | 0 | 0 | -| 68+ | 1 | 0 | 0 | -| 69 | 1 | 0 | 0 | -| 69+ | 1 | 0 | 0 | -| 70 | 1 | 0 | 0 | -| 70+ | 1 | 0 | 0 | -| 71 | 1 | 0 | 0 | -| 71+ | 1 | 0 | 0 | -| 72 | 1 | 0 | 0 | -| 72+ | 1 | 0 | 0 | -| 73 | 1 | 0 | 0 | -| 73+ | 1 | 0 | 0 | -| 74 | 1 | 0 | 0 | -| 74+ | 1 | 0 | 0 | -| 75 | 1 | 0 | 0 | -| 75+ | 1 | 0 | 0 | -| 76 | 1 | 0 | 0 | -| 76+ | 1 | 0 | 0 | -| 77 | 1 | 0 | 0 | -| 77+ | 1 | 0 | 0 | -| 78 | 1 | 0 | 0 | -| 78+ | 1 | 0 | 0 | -| 79 | 1 | 0 | 0 | -| 79+ | 1 | 0 | 0 | -| 80 | 1 | 0 | 0 | -| 80+ | 1 | 0 | 0 | -| 81 | 1 | 0 | 0 | -| 81+ | 1 | 0 | 0 | -| 82 | 1 | 0 | 0 | -| 82+ | 1 | 0 | 0 | -| 83 | 1 | 0 | 0 | -| 83+ | 1 | 0 | 0 | -| 84 | 1 | 0 | 0 | -| 84+ | 1 | 0 | 0 | -| 85 | 1 | 0 | 0 | -| 85+ | 1 | 0 | 0 | -| 86 | 1 | 0 | 0 | -| 86+ | 1 | 0 | 0 | -| 87 | 1 | 0 | 0 | -| 87+ | 1 | 0 | 0 | -| 88 | 1 | 0 | 0 | -| 88+ | 1 | 0 | 0 | -| 89 | 1 | 0 | 0 | -| 89+ | 1 | 0 | 0 | -| 90 | 1 | 0 | 0 | -| 90+ | 1 | 0 | 0 | -| 91 | 1 | 0 | 0 | -| 91+ | 1 | 0 | 0 | -| 92 | 1 | 0 | 0 | -| 92+ | 1 | 0 | 0 | -| 93 | 1 | 0 | 0 | -| 93+ | 1 | 0 | 0 | -| 94 | 1 | 0 | 0 | -| 94+ | 1 | 0 | 0 | -| 95 | 1 | 0 | 0 | -| 95+ | 1 | 0 | 0 | -| 96 | 1 | 0 | 0 | -| 96+ | 1 | 0 | 0 | -| 97 | 1 | 0 | 0 | -| 97+ | 1 | 0 | 0 | -| 98 | 1 | 0 | 0 | -| 98+ | 1 | 0 | 0 | -| 99 | 1 | 0 | 0 | -| 99+ | 1 | 0 | 0 | -| 100 | 1 | 0 | 0 | -| 100+ | 1 | 0 | 0 | -| 101 | 1 | 0 | 0 | -| 101+ | 1 | 0 | 0 | -| 102 | 1 | 0 | 0 | -| 102+ | 1 | 0 | 0 | -| 103 | 1 | 0 | 0 | -| 103+ | 1 | 0 | 0 | -| 104 | 1 | 0 | 0 | -| 104+ | 1 | 0 | 0 | -| 105 | 1 | 0 | 0 | -| 105+ | 1 | 0 | 0 | -| 106 | 1 | 0 | 0 | -| 106+ | 1 | 0 | 0 | -| 107 | 1 | 0 | 0 | diff --git a/projects/03/a/Bit.tst b/projects/03/a/Bit.tst deleted file mode 100644 index c6bf523..0000000 --- a/projects/03/a/Bit.tst +++ /dev/null @@ -1,865 +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/03/a/Bit.tst - -load Bit.hdl, -output-file Bit.out, -compare-to Bit.cmp, -output-list time%S1.4.1 in%B2.1.2 load%B2.1.2 out%B2.1.2; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 1, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 1, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 1, -tick, -output; - -tock, -output; - -set in 1, -set load 1, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 1, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; - -set in 1, -set load 0, -tick, -output; - -tock, -output; diff --git a/projects/03/a/PC.cmp b/projects/03/a/PC.cmp deleted file mode 100644 index 6a050d9..0000000 --- a/projects/03/a/PC.cmp +++ /dev/null @@ -1,31 +0,0 @@ -| time | in |reset|load | inc | out | -| 0+ | 0 | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 0 | 0 | 1 | 0 | -| 2 | 0 | 0 | 0 | 1 | 1 | -| 2+ | -32123 | 0 | 0 | 1 | 1 | -| 3 | -32123 | 0 | 0 | 1 | 2 | -| 3+ | -32123 | 0 | 1 | 1 | 2 | -| 4 | -32123 | 0 | 1 | 1 | -32123 | -| 4+ | -32123 | 0 | 0 | 1 | -32123 | -| 5 | -32123 | 0 | 0 | 1 | -32122 | -| 5+ | -32123 | 0 | 0 | 1 | -32122 | -| 6 | -32123 | 0 | 0 | 1 | -32121 | -| 6+ | 12345 | 0 | 1 | 0 | -32121 | -| 7 | 12345 | 0 | 1 | 0 | 12345 | -| 7+ | 12345 | 1 | 1 | 0 | 12345 | -| 8 | 12345 | 1 | 1 | 0 | 0 | -| 8+ | 12345 | 0 | 1 | 1 | 0 | -| 9 | 12345 | 0 | 1 | 1 | 12345 | -| 9+ | 12345 | 1 | 1 | 1 | 12345 | -| 10 | 12345 | 1 | 1 | 1 | 0 | -| 10+ | 12345 | 0 | 0 | 1 | 0 | -| 11 | 12345 | 0 | 0 | 1 | 1 | -| 11+ | 12345 | 1 | 0 | 1 | 1 | -| 12 | 12345 | 1 | 0 | 1 | 0 | -| 12+ | 0 | 0 | 1 | 1 | 0 | -| 13 | 0 | 0 | 1 | 1 | 0 | -| 13+ | 0 | 0 | 0 | 1 | 0 | -| 14 | 0 | 0 | 0 | 1 | 1 | -| 14+ | 22222 | 1 | 0 | 0 | 1 | -| 15 | 22222 | 1 | 0 | 0 | 0 | diff --git a/projects/03/a/PC.hdl b/projects/03/a/PC.hdl deleted file mode 100644 index aba68d1..0000000 --- a/projects/03/a/PC.hdl +++ /dev/null @@ -1,32 +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/03/a/PC.hdl - -/** - * A 16-bit counter with load and reset control bits. - * if (reset[t] == 1) out[t+1] = 0 - * else if (load[t] == 1) out[t+1] = in[t] - * else if (inc[t] == 1) out[t+1] = out[t] + 1 (integer addition) - * else out[t+1] = out[t] - */ - -CHIP PC { - IN in[16],load,inc,reset; - OUT out[16]; - - PARTS: - // Put your code here: - Mux16 (a=out5, b=in, sel=load, out=out0); - Inc16 (in=out0, out=out1); - Mux16 (a=out1, b=out0, sel=load, out=out2); - Mux16 (a=out0, b=out2, sel=inc, out=out3); - Mux16 (a=out3, b=false, sel=reset, out=out4); - Register (in=out4, load=true, out=out5, out=out); - - //Inc16 (in=out4, out=out0); - //Mux16 (a=out4, b=out0, sel=inc, out=out1); - //Mux16 (a=out1, b=in, sel=load, out=out2); - //Mux16 (a=out2, b=false, sel=reset, out=out3); - //Register (in=out3, load=true, out=out4, out=out); -} diff --git a/projects/03/a/PC.out b/projects/03/a/PC.out deleted file mode 100644 index 5eca76b..0000000 --- a/projects/03/a/PC.out +++ /dev/null @@ -1,31 +0,0 @@ -| time | in |reset|load | inc | out | -| 0+ | 0 | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 0 | 0 | 1 | 0 | -| 2 | 0 | 0 | 0 | 1 | 1 | -| 2+ | -32123 | 0 | 0 | 1 | 1 | -| 3 | -32123 | 0 | 0 | 1 | 2 | -| 3+ | -32123 | 0 | 1 | 1 | 2 | -| 4 | -32123 | 0 | 1 | 1 | -32123 | -| 4+ | -32123 | 0 | 0 | 1 | -32123 | -| 5 | -32123 | 0 | 0 | 1 | -32122 | -| 5+ | -32123 | 0 | 0 | 1 | -32122 | -| 6 | -32123 | 0 | 0 | 1 | -32121 | -| 6+ | 12345 | 0 | 1 | 0 | -32121 | -| 7 | 12345 | 0 | 1 | 0 | 12345 | -| 7+ | 12345 | 1 | 1 | 0 | 12345 | -| 8 | 12345 | 1 | 1 | 0 | 0 | -| 8+ | 12345 | 0 | 1 | 1 | 0 | -| 9 | 12345 | 0 | 1 | 1 | 12345 | -| 9+ | 12345 | 1 | 1 | 1 | 12345 | -| 10 | 12345 | 1 | 1 | 1 | 0 | -| 10+ | 12345 | 0 | 0 | 1 | 0 | -| 11 | 12345 | 0 | 0 | 1 | 1 | -| 11+ | 12345 | 1 | 0 | 1 | 1 | -| 12 | 12345 | 1 | 0 | 1 | 0 | -| 12+ | 0 | 0 | 1 | 1 | 0 | -| 13 | 0 | 0 | 1 | 1 | 0 | -| 13+ | 0 | 0 | 0 | 1 | 0 | -| 14 | 0 | 0 | 0 | 1 | 1 | -| 14+ | 22222 | 1 | 0 | 0 | 1 | -| 15 | 22222 | 1 | 0 | 0 | 0 | diff --git a/projects/03/a/PC.tst b/projects/03/a/PC.tst deleted file mode 100644 index 7f4f3cd..0000000 --- a/projects/03/a/PC.tst +++ /dev/null @@ -1,125 +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/03/a/PC.tst - -load PC.hdl, -output-file PC.out, -compare-to PC.cmp, -output-list time%S1.4.1 in%D1.6.1 reset%B2.1.2 load%B2.1.2 inc%B2.1.2 out%D1.6.1; - -set in 0, -set reset 0, -set load 0, -set inc 0, -tick, -output; - -tock, -output; - -set inc 1, -tick, -output; - -tock, -output; - -set in -32123, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set load 0, -tick, -output; - -tock, -output; - -tick, -output; - -tock, -output; - -set in 12345, -set load 1, -set inc 0, -tick, -output; - -tock, -output; - -set reset 1, -tick, -output; - -tock, -output; - -set reset 0, -set inc 1, -tick, -output; - -tock, -output; - -set reset 1, -tick, -output; - -tock, -output; - -set reset 0, -set load 0, -tick, -output; - -tock, -output; - -set reset 1, -tick, -output; - -tock, -output; - -set in 0, -set reset 0, -set load 1, -tick, -output; - -tock, -output; - -set load 0, -set inc 1, -tick, -output; - -tock, -output; - -set in 22222, -set reset 1, -set inc 0, -tick, -output; - -tock, -output; diff --git a/projects/03/a/RAM64.cmp b/projects/03/a/RAM64.cmp deleted file mode 100644 index fdb7745..0000000 --- a/projects/03/a/RAM64.cmp +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load |address| out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 1313 | 0 | 0 | 0 | -| 3 | 1313 | 0 | 0 | 0 | -| 3+ | 1313 | 1 | 13 | 0 | -| 4 | 1313 | 1 | 13 | 1313 | -| 4+ | 1313 | 0 | 0 | 0 | -| 5 | 1313 | 0 | 0 | 0 | -| 5+ | 4747 | 0 | 47 | 0 | -| 6 | 4747 | 0 | 47 | 0 | -| 6+ | 4747 | 1 | 47 | 0 | -| 7 | 4747 | 1 | 47 | 4747 | -| 7+ | 4747 | 0 | 47 | 4747 | -| 8 | 4747 | 0 | 47 | 4747 | -| 8 | 4747 | 0 | 13 | 1313 | -| 8+ | 6363 | 0 | 13 | 1313 | -| 9 | 6363 | 0 | 13 | 1313 | -| 9+ | 6363 | 1 | 63 | 0 | -| 10 | 6363 | 1 | 63 | 6363 | -| 10+ | 6363 | 0 | 63 | 6363 | -| 11 | 6363 | 0 | 63 | 6363 | -| 11 | 6363 | 0 | 47 | 4747 | -| 11 | 6363 | 0 | 63 | 6363 | -| 11+ | 6363 | 0 | 40 | 0 | -| 12 | 6363 | 0 | 40 | 0 | -| 12 | 6363 | 0 | 41 | 0 | -| 12 | 6363 | 0 | 42 | 0 | -| 12 | 6363 | 0 | 43 | 0 | -| 12 | 6363 | 0 | 44 | 0 | -| 12 | 6363 | 0 | 45 | 0 | -| 12 | 6363 | 0 | 46 | 0 | -| 12 | 6363 | 0 | 47 | 4747 | -| 12+ | 21845 | 1 | 40 | 0 | -| 13 | 21845 | 1 | 40 | 21845 | -| 13+ | 21845 | 1 | 41 | 0 | -| 14 | 21845 | 1 | 41 | 21845 | -| 14+ | 21845 | 1 | 42 | 0 | -| 15 | 21845 | 1 | 42 | 21845 | -| 15+ | 21845 | 1 | 43 | 0 | -| 16 | 21845 | 1 | 43 | 21845 | -| 16+ | 21845 | 1 | 44 | 0 | -| 17 | 21845 | 1 | 44 | 21845 | -| 17+ | 21845 | 1 | 45 | 0 | -| 18 | 21845 | 1 | 45 | 21845 | -| 18+ | 21845 | 1 | 46 | 0 | -| 19 | 21845 | 1 | 46 | 21845 | -| 19+ | 21845 | 1 | 47 | 4747 | -| 20 | 21845 | 1 | 47 | 21845 | -| 20+ | 21845 | 0 | 40 | 21845 | -| 21 | 21845 | 0 | 40 | 21845 | -| 21 | 21845 | 0 | 41 | 21845 | -| 21 | 21845 | 0 | 42 | 21845 | -| 21 | 21845 | 0 | 43 | 21845 | -| 21 | 21845 | 0 | 44 | 21845 | -| 21 | 21845 | 0 | 45 | 21845 | -| 21 | 21845 | 0 | 46 | 21845 | -| 21 | 21845 | 0 | 47 | 21845 | -| 21+ | -21846 | 1 | 40 | 21845 | -| 22 | -21846 | 1 | 40 | -21846 | -| 22+ | -21846 | 0 | 40 | -21846 | -| 23 | -21846 | 0 | 40 | -21846 | -| 23 | -21846 | 0 | 41 | 21845 | -| 23 | -21846 | 0 | 42 | 21845 | -| 23 | -21846 | 0 | 43 | 21845 | -| 23 | -21846 | 0 | 44 | 21845 | -| 23 | -21846 | 0 | 45 | 21845 | -| 23 | -21846 | 0 | 46 | 21845 | -| 23 | -21846 | 0 | 47 | 21845 | -| 23+ | 21845 | 1 | 40 | -21846 | -| 24 | 21845 | 1 | 40 | 21845 | -| 24+ | -21846 | 1 | 41 | 21845 | -| 25 | -21846 | 1 | 41 | -21846 | -| 25+ | -21846 | 0 | 40 | 21845 | -| 26 | -21846 | 0 | 40 | 21845 | -| 26 | -21846 | 0 | 41 | -21846 | -| 26 | -21846 | 0 | 42 | 21845 | -| 26 | -21846 | 0 | 43 | 21845 | -| 26 | -21846 | 0 | 44 | 21845 | -| 26 | -21846 | 0 | 45 | 21845 | -| 26 | -21846 | 0 | 46 | 21845 | -| 26 | -21846 | 0 | 47 | 21845 | -| 26+ | 21845 | 1 | 41 | -21846 | -| 27 | 21845 | 1 | 41 | 21845 | -| 27+ | -21846 | 1 | 42 | 21845 | -| 28 | -21846 | 1 | 42 | -21846 | -| 28+ | -21846 | 0 | 40 | 21845 | -| 29 | -21846 | 0 | 40 | 21845 | -| 29 | -21846 | 0 | 41 | 21845 | -| 29 | -21846 | 0 | 42 | -21846 | -| 29 | -21846 | 0 | 43 | 21845 | -| 29 | -21846 | 0 | 44 | 21845 | -| 29 | -21846 | 0 | 45 | 21845 | -| 29 | -21846 | 0 | 46 | 21845 | -| 29 | -21846 | 0 | 47 | 21845 | -| 29+ | 21845 | 1 | 42 | -21846 | -| 30 | 21845 | 1 | 42 | 21845 | -| 30+ | -21846 | 1 | 43 | 21845 | -| 31 | -21846 | 1 | 43 | -21846 | -| 31+ | -21846 | 0 | 40 | 21845 | -| 32 | -21846 | 0 | 40 | 21845 | -| 32 | -21846 | 0 | 41 | 21845 | -| 32 | -21846 | 0 | 42 | 21845 | -| 32 | -21846 | 0 | 43 | -21846 | -| 32 | -21846 | 0 | 44 | 21845 | -| 32 | -21846 | 0 | 45 | 21845 | -| 32 | -21846 | 0 | 46 | 21845 | -| 32 | -21846 | 0 | 47 | 21845 | -| 32+ | 21845 | 1 | 43 | -21846 | -| 33 | 21845 | 1 | 43 | 21845 | -| 33+ | -21846 | 1 | 44 | 21845 | -| 34 | -21846 | 1 | 44 | -21846 | -| 34+ | -21846 | 0 | 40 | 21845 | -| 35 | -21846 | 0 | 40 | 21845 | -| 35 | -21846 | 0 | 41 | 21845 | -| 35 | -21846 | 0 | 42 | 21845 | -| 35 | -21846 | 0 | 43 | 21845 | -| 35 | -21846 | 0 | 44 | -21846 | -| 35 | -21846 | 0 | 45 | 21845 | -| 35 | -21846 | 0 | 46 | 21845 | -| 35 | -21846 | 0 | 47 | 21845 | -| 35+ | 21845 | 1 | 44 | -21846 | -| 36 | 21845 | 1 | 44 | 21845 | -| 36+ | -21846 | 1 | 45 | 21845 | -| 37 | -21846 | 1 | 45 | -21846 | -| 37+ | -21846 | 0 | 40 | 21845 | -| 38 | -21846 | 0 | 40 | 21845 | -| 38 | -21846 | 0 | 41 | 21845 | -| 38 | -21846 | 0 | 42 | 21845 | -| 38 | -21846 | 0 | 43 | 21845 | -| 38 | -21846 | 0 | 44 | 21845 | -| 38 | -21846 | 0 | 45 | -21846 | -| 38 | -21846 | 0 | 46 | 21845 | -| 38 | -21846 | 0 | 47 | 21845 | -| 38+ | 21845 | 1 | 45 | -21846 | -| 39 | 21845 | 1 | 45 | 21845 | -| 39+ | -21846 | 1 | 46 | 21845 | -| 40 | -21846 | 1 | 46 | -21846 | -| 40+ | -21846 | 0 | 40 | 21845 | -| 41 | -21846 | 0 | 40 | 21845 | -| 41 | -21846 | 0 | 41 | 21845 | -| 41 | -21846 | 0 | 42 | 21845 | -| 41 | -21846 | 0 | 43 | 21845 | -| 41 | -21846 | 0 | 44 | 21845 | -| 41 | -21846 | 0 | 45 | 21845 | -| 41 | -21846 | 0 | 46 | -21846 | -| 41 | -21846 | 0 | 47 | 21845 | -| 41+ | 21845 | 1 | 46 | -21846 | -| 42 | 21845 | 1 | 46 | 21845 | -| 42+ | -21846 | 1 | 47 | 21845 | -| 43 | -21846 | 1 | 47 | -21846 | -| 43+ | -21846 | 0 | 40 | 21845 | -| 44 | -21846 | 0 | 40 | 21845 | -| 44 | -21846 | 0 | 41 | 21845 | -| 44 | -21846 | 0 | 42 | 21845 | -| 44 | -21846 | 0 | 43 | 21845 | -| 44 | -21846 | 0 | 44 | 21845 | -| 44 | -21846 | 0 | 45 | 21845 | -| 44 | -21846 | 0 | 46 | 21845 | -| 44 | -21846 | 0 | 47 | -21846 | -| 44+ | 21845 | 1 | 47 | -21846 | -| 45 | 21845 | 1 | 47 | 21845 | -| 45+ | 21845 | 0 | 40 | 21845 | -| 46 | 21845 | 0 | 40 | 21845 | -| 46 | 21845 | 0 | 41 | 21845 | -| 46 | 21845 | 0 | 42 | 21845 | -| 46 | 21845 | 0 | 43 | 21845 | -| 46 | 21845 | 0 | 44 | 21845 | -| 46 | 21845 | 0 | 45 | 21845 | -| 46 | 21845 | 0 | 46 | 21845 | -| 46 | 21845 | 0 | 47 | 21845 | -| 46+ | 21845 | 0 | 5 | 0 | -| 47 | 21845 | 0 | 5 | 0 | -| 47 | 21845 | 0 | 13 | 1313 | -| 47 | 21845 | 0 | 21 | 0 | -| 47 | 21845 | 0 | 29 | 0 | -| 47 | 21845 | 0 | 37 | 0 | -| 47 | 21845 | 0 | 45 | 21845 | -| 47 | 21845 | 0 | 53 | 0 | -| 47 | 21845 | 0 | 61 | 0 | -| 47+ | 21845 | 1 | 5 | 0 | -| 48 | 21845 | 1 | 5 | 21845 | -| 48+ | 21845 | 1 | 13 | 1313 | -| 49 | 21845 | 1 | 13 | 21845 | -| 49+ | 21845 | 1 | 21 | 0 | -| 50 | 21845 | 1 | 21 | 21845 | -| 50+ | 21845 | 1 | 29 | 0 | -| 51 | 21845 | 1 | 29 | 21845 | -| 51+ | 21845 | 1 | 37 | 0 | -| 52 | 21845 | 1 | 37 | 21845 | -| 52+ | 21845 | 1 | 45 | 21845 | -| 53 | 21845 | 1 | 45 | 21845 | -| 53+ | 21845 | 1 | 53 | 0 | -| 54 | 21845 | 1 | 53 | 21845 | -| 54+ | 21845 | 1 | 61 | 0 | -| 55 | 21845 | 1 | 61 | 21845 | -| 55+ | 21845 | 0 | 5 | 21845 | -| 56 | 21845 | 0 | 5 | 21845 | -| 56 | 21845 | 0 | 13 | 21845 | -| 56 | 21845 | 0 | 21 | 21845 | -| 56 | 21845 | 0 | 29 | 21845 | -| 56 | 21845 | 0 | 37 | 21845 | -| 56 | 21845 | 0 | 45 | 21845 | -| 56 | 21845 | 0 | 53 | 21845 | -| 56 | 21845 | 0 | 61 | 21845 | -| 56+ | -21846 | 1 | 5 | 21845 | -| 57 | -21846 | 1 | 5 | -21846 | -| 57+ | -21846 | 0 | 5 | -21846 | -| 58 | -21846 | 0 | 5 | -21846 | -| 58 | -21846 | 0 | 13 | 21845 | -| 58 | -21846 | 0 | 21 | 21845 | -| 58 | -21846 | 0 | 29 | 21845 | -| 58 | -21846 | 0 | 37 | 21845 | -| 58 | -21846 | 0 | 45 | 21845 | -| 58 | -21846 | 0 | 53 | 21845 | -| 58 | -21846 | 0 | 61 | 21845 | -| 58+ | 21845 | 1 | 5 | -21846 | -| 59 | 21845 | 1 | 5 | 21845 | -| 59+ | -21846 | 1 | 13 | 21845 | -| 60 | -21846 | 1 | 13 | -21846 | -| 60+ | -21846 | 0 | 5 | 21845 | -| 61 | -21846 | 0 | 5 | 21845 | -| 61 | -21846 | 0 | 13 | -21846 | -| 61 | -21846 | 0 | 21 | 21845 | -| 61 | -21846 | 0 | 29 | 21845 | -| 61 | -21846 | 0 | 37 | 21845 | -| 61 | -21846 | 0 | 45 | 21845 | -| 61 | -21846 | 0 | 53 | 21845 | -| 61 | -21846 | 0 | 61 | 21845 | -| 61+ | 21845 | 1 | 13 | -21846 | -| 62 | 21845 | 1 | 13 | 21845 | -| 62+ | -21846 | 1 | 21 | 21845 | -| 63 | -21846 | 1 | 21 | -21846 | -| 63+ | -21846 | 0 | 5 | 21845 | -| 64 | -21846 | 0 | 5 | 21845 | -| 64 | -21846 | 0 | 13 | 21845 | -| 64 | -21846 | 0 | 21 | -21846 | -| 64 | -21846 | 0 | 29 | 21845 | -| 64 | -21846 | 0 | 37 | 21845 | -| 64 | -21846 | 0 | 45 | 21845 | -| 64 | -21846 | 0 | 53 | 21845 | -| 64 | -21846 | 0 | 61 | 21845 | -| 64+ | 21845 | 1 | 21 | -21846 | -| 65 | 21845 | 1 | 21 | 21845 | -| 65+ | -21846 | 1 | 29 | 21845 | -| 66 | -21846 | 1 | 29 | -21846 | -| 66+ | -21846 | 0 | 5 | 21845 | -| 67 | -21846 | 0 | 5 | 21845 | -| 67 | -21846 | 0 | 13 | 21845 | -| 67 | -21846 | 0 | 21 | 21845 | -| 67 | -21846 | 0 | 29 | -21846 | -| 67 | -21846 | 0 | 37 | 21845 | -| 67 | -21846 | 0 | 45 | 21845 | -| 67 | -21846 | 0 | 53 | 21845 | -| 67 | -21846 | 0 | 61 | 21845 | -| 67+ | 21845 | 1 | 29 | -21846 | -| 68 | 21845 | 1 | 29 | 21845 | -| 68+ | -21846 | 1 | 37 | 21845 | -| 69 | -21846 | 1 | 37 | -21846 | -| 69+ | -21846 | 0 | 5 | 21845 | -| 70 | -21846 | 0 | 5 | 21845 | -| 70 | -21846 | 0 | 13 | 21845 | -| 70 | -21846 | 0 | 21 | 21845 | -| 70 | -21846 | 0 | 29 | 21845 | -| 70 | -21846 | 0 | 37 | -21846 | -| 70 | -21846 | 0 | 45 | 21845 | -| 70 | -21846 | 0 | 53 | 21845 | -| 70 | -21846 | 0 | 61 | 21845 | -| 70+ | 21845 | 1 | 37 | -21846 | -| 71 | 21845 | 1 | 37 | 21845 | -| 71+ | -21846 | 1 | 45 | 21845 | -| 72 | -21846 | 1 | 45 | -21846 | -| 72+ | -21846 | 0 | 5 | 21845 | -| 73 | -21846 | 0 | 5 | 21845 | -| 73 | -21846 | 0 | 13 | 21845 | -| 73 | -21846 | 0 | 21 | 21845 | -| 73 | -21846 | 0 | 29 | 21845 | -| 73 | -21846 | 0 | 37 | 21845 | -| 73 | -21846 | 0 | 45 | -21846 | -| 73 | -21846 | 0 | 53 | 21845 | -| 73 | -21846 | 0 | 61 | 21845 | -| 73+ | 21845 | 1 | 45 | -21846 | -| 74 | 21845 | 1 | 45 | 21845 | -| 74+ | -21846 | 1 | 53 | 21845 | -| 75 | -21846 | 1 | 53 | -21846 | -| 75+ | -21846 | 0 | 5 | 21845 | -| 76 | -21846 | 0 | 5 | 21845 | -| 76 | -21846 | 0 | 13 | 21845 | -| 76 | -21846 | 0 | 21 | 21845 | -| 76 | -21846 | 0 | 29 | 21845 | -| 76 | -21846 | 0 | 37 | 21845 | -| 76 | -21846 | 0 | 45 | 21845 | -| 76 | -21846 | 0 | 53 | -21846 | -| 76 | -21846 | 0 | 61 | 21845 | -| 76+ | 21845 | 1 | 53 | -21846 | -| 77 | 21845 | 1 | 53 | 21845 | -| 77+ | -21846 | 1 | 61 | 21845 | -| 78 | -21846 | 1 | 61 | -21846 | -| 78+ | -21846 | 0 | 5 | 21845 | -| 79 | -21846 | 0 | 5 | 21845 | -| 79 | -21846 | 0 | 13 | 21845 | -| 79 | -21846 | 0 | 21 | 21845 | -| 79 | -21846 | 0 | 29 | 21845 | -| 79 | -21846 | 0 | 37 | 21845 | -| 79 | -21846 | 0 | 45 | 21845 | -| 79 | -21846 | 0 | 53 | 21845 | -| 79 | -21846 | 0 | 61 | -21846 | -| 79+ | 21845 | 1 | 61 | -21846 | -| 80 | 21845 | 1 | 61 | 21845 | -| 80+ | 21845 | 0 | 5 | 21845 | -| 81 | 21845 | 0 | 5 | 21845 | -| 81 | 21845 | 0 | 13 | 21845 | -| 81 | 21845 | 0 | 21 | 21845 | -| 81 | 21845 | 0 | 29 | 21845 | -| 81 | 21845 | 0 | 37 | 21845 | -| 81 | 21845 | 0 | 45 | 21845 | -| 81 | 21845 | 0 | 53 | 21845 | -| 81 | 21845 | 0 | 61 | 21845 | diff --git a/projects/03/a/RAM64.hdl b/projects/03/a/RAM64.hdl deleted file mode 100644 index 269adb1..0000000 --- a/projects/03/a/RAM64.hdl +++ /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/03/a/RAM64.hdl - -/** - * Memory of 64 registers, each 16 bit-wide. Out holds the value - * stored at the memory location specified by address. If load==1, then - * the in value is loaded into the memory location specified by address - * (the loaded value will be emitted to out from the next time step onward). - */ - -CHIP RAM64 { - IN in[16], load, address[6]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux8Way (in=load, sel=address[0..2], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); - RAM8 (in=in, load=load0, address=address[3..5], out=out0); - RAM8 (in=in, load=load1, address=address[3..5], out=out1); - RAM8 (in=in, load=load2, address=address[3..5], out=out2); - RAM8 (in=in, load=load3, address=address[3..5], out=out3); - RAM8 (in=in, load=load4, address=address[3..5], out=out4); - RAM8 (in=in, load=load5, address=address[3..5], out=out5); - RAM8 (in=in, load=load6, address=address[3..5], out=out6); - RAM8 (in=in, load=load7, address=address[3..5], out=out7); - Mux8Way16 (a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[0..2], out=out); -} diff --git a/projects/03/a/RAM64.out b/projects/03/a/RAM64.out deleted file mode 100644 index 554ce39..0000000 --- a/projects/03/a/RAM64.out +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load |address| out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 1313 | 0 | 0 | 0 | -| 3 | 1313 | 0 | 0 | 0 | -| 3+ | 1313 | 1 | 13 | 0 | -| 4 | 1313 | 1 | 13 | 1313 | -| 4+ | 1313 | 0 | 0 | 0 | -| 5 | 1313 | 0 | 0 | 0 | -| 5+ | 4747 | 0 | 47 | 0 | -| 6 | 4747 | 0 | 47 | 0 | -| 6+ | 4747 | 1 | 47 | 0 | -| 7 | 4747 | 1 | 47 | 4747 | -| 7+ | 4747 | 0 | 47 | 4747 | -| 8 | 4747 | 0 | 47 | 4747 | -| 8 | 4747 | 0 | 13 | 1313 | -| 8+ | 6363 | 0 | 13 | 1313 | -| 9 | 6363 | 0 | 13 | 1313 | -| 9+ | 6363 | 1 | 63 | 0 | -| 10 | 6363 | 1 | 63 | 6363 | -| 10+ | 6363 | 0 | 63 | 6363 | -| 11 | 6363 | 0 | 63 | 6363 | -| 11 | 6363 | 0 | 47 | 4747 | -| 11 | 6363 | 0 | 63 | 6363 | -| 11+ | 6363 | 0 | 40 | 0 | -| 12 | 6363 | 0 | 40 | 0 | -| 12 | 6363 | 0 | 41 | 0 | -| 12 | 6363 | 0 | 42 | 0 | -| 12 | 6363 | 0 | 43 | 0 | -| 12 | 6363 | 0 | 44 | 0 | -| 12 | 6363 | 0 | 45 | 0 | -| 12 | 6363 | 0 | 46 | 0 | -| 12 | 6363 | 0 | 47 | 4747 | -| 12+ | 21845 | 1 | 40 | 0 | -| 13 | 21845 | 1 | 40 | 21845 | -| 13+ | 21845 | 1 | 41 | 0 | -| 14 | 21845 | 1 | 41 | 21845 | -| 14+ | 21845 | 1 | 42 | 0 | -| 15 | 21845 | 1 | 42 | 21845 | -| 15+ | 21845 | 1 | 43 | 0 | -| 16 | 21845 | 1 | 43 | 21845 | -| 16+ | 21845 | 1 | 44 | 0 | -| 17 | 21845 | 1 | 44 | 21845 | -| 17+ | 21845 | 1 | 45 | 0 | -| 18 | 21845 | 1 | 45 | 21845 | -| 18+ | 21845 | 1 | 46 | 0 | -| 19 | 21845 | 1 | 46 | 21845 | -| 19+ | 21845 | 1 | 47 | 4747 | -| 20 | 21845 | 1 | 47 | 21845 | -| 20+ | 21845 | 0 | 40 | 21845 | -| 21 | 21845 | 0 | 40 | 21845 | -| 21 | 21845 | 0 | 41 | 21845 | -| 21 | 21845 | 0 | 42 | 21845 | -| 21 | 21845 | 0 | 43 | 21845 | -| 21 | 21845 | 0 | 44 | 21845 | -| 21 | 21845 | 0 | 45 | 21845 | -| 21 | 21845 | 0 | 46 | 21845 | -| 21 | 21845 | 0 | 47 | 21845 | -| 21+ | -21846 | 1 | 40 | 21845 | -| 22 | -21846 | 1 | 40 | -21846 | -| 22+ | -21846 | 0 | 40 | -21846 | -| 23 | -21846 | 0 | 40 | -21846 | -| 23 | -21846 | 0 | 41 | 21845 | -| 23 | -21846 | 0 | 42 | 21845 | -| 23 | -21846 | 0 | 43 | 21845 | -| 23 | -21846 | 0 | 44 | 21845 | -| 23 | -21846 | 0 | 45 | 21845 | -| 23 | -21846 | 0 | 46 | 21845 | -| 23 | -21846 | 0 | 47 | 21845 | -| 23+ | 21845 | 1 | 40 | -21846 | -| 24 | 21845 | 1 | 40 | 21845 | -| 24+ | -21846 | 1 | 41 | 21845 | -| 25 | -21846 | 1 | 41 | -21846 | -| 25+ | -21846 | 0 | 40 | 21845 | -| 26 | -21846 | 0 | 40 | 21845 | -| 26 | -21846 | 0 | 41 | -21846 | -| 26 | -21846 | 0 | 42 | 21845 | -| 26 | -21846 | 0 | 43 | 21845 | -| 26 | -21846 | 0 | 44 | 21845 | -| 26 | -21846 | 0 | 45 | 21845 | -| 26 | -21846 | 0 | 46 | 21845 | -| 26 | -21846 | 0 | 47 | 21845 | -| 26+ | 21845 | 1 | 41 | -21846 | -| 27 | 21845 | 1 | 41 | 21845 | -| 27+ | -21846 | 1 | 42 | 21845 | -| 28 | -21846 | 1 | 42 | -21846 | -| 28+ | -21846 | 0 | 40 | 21845 | -| 29 | -21846 | 0 | 40 | 21845 | -| 29 | -21846 | 0 | 41 | 21845 | -| 29 | -21846 | 0 | 42 | -21846 | -| 29 | -21846 | 0 | 43 | 21845 | -| 29 | -21846 | 0 | 44 | 21845 | -| 29 | -21846 | 0 | 45 | 21845 | -| 29 | -21846 | 0 | 46 | 21845 | -| 29 | -21846 | 0 | 47 | 21845 | -| 29+ | 21845 | 1 | 42 | -21846 | -| 30 | 21845 | 1 | 42 | 21845 | -| 30+ | -21846 | 1 | 43 | 21845 | -| 31 | -21846 | 1 | 43 | -21846 | -| 31+ | -21846 | 0 | 40 | 21845 | -| 32 | -21846 | 0 | 40 | 21845 | -| 32 | -21846 | 0 | 41 | 21845 | -| 32 | -21846 | 0 | 42 | 21845 | -| 32 | -21846 | 0 | 43 | -21846 | -| 32 | -21846 | 0 | 44 | 21845 | -| 32 | -21846 | 0 | 45 | 21845 | -| 32 | -21846 | 0 | 46 | 21845 | -| 32 | -21846 | 0 | 47 | 21845 | -| 32+ | 21845 | 1 | 43 | -21846 | -| 33 | 21845 | 1 | 43 | 21845 | -| 33+ | -21846 | 1 | 44 | 21845 | -| 34 | -21846 | 1 | 44 | -21846 | -| 34+ | -21846 | 0 | 40 | 21845 | -| 35 | -21846 | 0 | 40 | 21845 | -| 35 | -21846 | 0 | 41 | 21845 | -| 35 | -21846 | 0 | 42 | 21845 | -| 35 | -21846 | 0 | 43 | 21845 | -| 35 | -21846 | 0 | 44 | -21846 | -| 35 | -21846 | 0 | 45 | 21845 | -| 35 | -21846 | 0 | 46 | 21845 | -| 35 | -21846 | 0 | 47 | 21845 | -| 35+ | 21845 | 1 | 44 | -21846 | -| 36 | 21845 | 1 | 44 | 21845 | -| 36+ | -21846 | 1 | 45 | 21845 | -| 37 | -21846 | 1 | 45 | -21846 | -| 37+ | -21846 | 0 | 40 | 21845 | -| 38 | -21846 | 0 | 40 | 21845 | -| 38 | -21846 | 0 | 41 | 21845 | -| 38 | -21846 | 0 | 42 | 21845 | -| 38 | -21846 | 0 | 43 | 21845 | -| 38 | -21846 | 0 | 44 | 21845 | -| 38 | -21846 | 0 | 45 | -21846 | -| 38 | -21846 | 0 | 46 | 21845 | -| 38 | -21846 | 0 | 47 | 21845 | -| 38+ | 21845 | 1 | 45 | -21846 | -| 39 | 21845 | 1 | 45 | 21845 | -| 39+ | -21846 | 1 | 46 | 21845 | -| 40 | -21846 | 1 | 46 | -21846 | -| 40+ | -21846 | 0 | 40 | 21845 | -| 41 | -21846 | 0 | 40 | 21845 | -| 41 | -21846 | 0 | 41 | 21845 | -| 41 | -21846 | 0 | 42 | 21845 | -| 41 | -21846 | 0 | 43 | 21845 | -| 41 | -21846 | 0 | 44 | 21845 | -| 41 | -21846 | 0 | 45 | 21845 | -| 41 | -21846 | 0 | 46 | -21846 | -| 41 | -21846 | 0 | 47 | 21845 | -| 41+ | 21845 | 1 | 46 | -21846 | -| 42 | 21845 | 1 | 46 | 21845 | -| 42+ | -21846 | 1 | 47 | 21845 | -| 43 | -21846 | 1 | 47 | -21846 | -| 43+ | -21846 | 0 | 40 | 21845 | -| 44 | -21846 | 0 | 40 | 21845 | -| 44 | -21846 | 0 | 41 | 21845 | -| 44 | -21846 | 0 | 42 | 21845 | -| 44 | -21846 | 0 | 43 | 21845 | -| 44 | -21846 | 0 | 44 | 21845 | -| 44 | -21846 | 0 | 45 | 21845 | -| 44 | -21846 | 0 | 46 | 21845 | -| 44 | -21846 | 0 | 47 | -21846 | -| 44+ | 21845 | 1 | 47 | -21846 | -| 45 | 21845 | 1 | 47 | 21845 | -| 45+ | 21845 | 0 | 40 | 21845 | -| 46 | 21845 | 0 | 40 | 21845 | -| 46 | 21845 | 0 | 41 | 21845 | -| 46 | 21845 | 0 | 42 | 21845 | -| 46 | 21845 | 0 | 43 | 21845 | -| 46 | 21845 | 0 | 44 | 21845 | -| 46 | 21845 | 0 | 45 | 21845 | -| 46 | 21845 | 0 | 46 | 21845 | -| 46 | 21845 | 0 | 47 | 21845 | -| 46+ | 21845 | 0 | 5 | 0 | -| 47 | 21845 | 0 | 5 | 0 | -| 47 | 21845 | 0 | 13 | 1313 | -| 47 | 21845 | 0 | 21 | 0 | -| 47 | 21845 | 0 | 29 | 0 | -| 47 | 21845 | 0 | 37 | 0 | -| 47 | 21845 | 0 | 45 | 21845 | -| 47 | 21845 | 0 | 53 | 0 | -| 47 | 21845 | 0 | 61 | 0 | -| 47+ | 21845 | 1 | 5 | 0 | -| 48 | 21845 | 1 | 5 | 21845 | -| 48+ | 21845 | 1 | 13 | 1313 | -| 49 | 21845 | 1 | 13 | 21845 | -| 49+ | 21845 | 1 | 21 | 0 | -| 50 | 21845 | 1 | 21 | 21845 | -| 50+ | 21845 | 1 | 29 | 0 | -| 51 | 21845 | 1 | 29 | 21845 | -| 51+ | 21845 | 1 | 37 | 0 | -| 52 | 21845 | 1 | 37 | 21845 | -| 52+ | 21845 | 1 | 45 | 21845 | -| 53 | 21845 | 1 | 45 | 21845 | -| 53+ | 21845 | 1 | 53 | 0 | -| 54 | 21845 | 1 | 53 | 21845 | -| 54+ | 21845 | 1 | 61 | 0 | -| 55 | 21845 | 1 | 61 | 21845 | -| 55+ | 21845 | 0 | 5 | 21845 | -| 56 | 21845 | 0 | 5 | 21845 | -| 56 | 21845 | 0 | 13 | 21845 | -| 56 | 21845 | 0 | 21 | 21845 | -| 56 | 21845 | 0 | 29 | 21845 | -| 56 | 21845 | 0 | 37 | 21845 | -| 56 | 21845 | 0 | 45 | 21845 | -| 56 | 21845 | 0 | 53 | 21845 | -| 56 | 21845 | 0 | 61 | 21845 | -| 56+ | -21846 | 1 | 5 | 21845 | -| 57 | -21846 | 1 | 5 | -21846 | -| 57+ | -21846 | 0 | 5 | -21846 | -| 58 | -21846 | 0 | 5 | -21846 | -| 58 | -21846 | 0 | 13 | 21845 | -| 58 | -21846 | 0 | 21 | 21845 | -| 58 | -21846 | 0 | 29 | 21845 | -| 58 | -21846 | 0 | 37 | 21845 | -| 58 | -21846 | 0 | 45 | 21845 | -| 58 | -21846 | 0 | 53 | 21845 | -| 58 | -21846 | 0 | 61 | 21845 | -| 58+ | 21845 | 1 | 5 | -21846 | -| 59 | 21845 | 1 | 5 | 21845 | -| 59+ | -21846 | 1 | 13 | 21845 | -| 60 | -21846 | 1 | 13 | -21846 | -| 60+ | -21846 | 0 | 5 | 21845 | -| 61 | -21846 | 0 | 5 | 21845 | -| 61 | -21846 | 0 | 13 | -21846 | -| 61 | -21846 | 0 | 21 | 21845 | -| 61 | -21846 | 0 | 29 | 21845 | -| 61 | -21846 | 0 | 37 | 21845 | -| 61 | -21846 | 0 | 45 | 21845 | -| 61 | -21846 | 0 | 53 | 21845 | -| 61 | -21846 | 0 | 61 | 21845 | -| 61+ | 21845 | 1 | 13 | -21846 | -| 62 | 21845 | 1 | 13 | 21845 | -| 62+ | -21846 | 1 | 21 | 21845 | -| 63 | -21846 | 1 | 21 | -21846 | -| 63+ | -21846 | 0 | 5 | 21845 | -| 64 | -21846 | 0 | 5 | 21845 | -| 64 | -21846 | 0 | 13 | 21845 | -| 64 | -21846 | 0 | 21 | -21846 | -| 64 | -21846 | 0 | 29 | 21845 | -| 64 | -21846 | 0 | 37 | 21845 | -| 64 | -21846 | 0 | 45 | 21845 | -| 64 | -21846 | 0 | 53 | 21845 | -| 64 | -21846 | 0 | 61 | 21845 | -| 64+ | 21845 | 1 | 21 | -21846 | -| 65 | 21845 | 1 | 21 | 21845 | -| 65+ | -21846 | 1 | 29 | 21845 | -| 66 | -21846 | 1 | 29 | -21846 | -| 66+ | -21846 | 0 | 5 | 21845 | -| 67 | -21846 | 0 | 5 | 21845 | -| 67 | -21846 | 0 | 13 | 21845 | -| 67 | -21846 | 0 | 21 | 21845 | -| 67 | -21846 | 0 | 29 | -21846 | -| 67 | -21846 | 0 | 37 | 21845 | -| 67 | -21846 | 0 | 45 | 21845 | -| 67 | -21846 | 0 | 53 | 21845 | -| 67 | -21846 | 0 | 61 | 21845 | -| 67+ | 21845 | 1 | 29 | -21846 | -| 68 | 21845 | 1 | 29 | 21845 | -| 68+ | -21846 | 1 | 37 | 21845 | -| 69 | -21846 | 1 | 37 | -21846 | -| 69+ | -21846 | 0 | 5 | 21845 | -| 70 | -21846 | 0 | 5 | 21845 | -| 70 | -21846 | 0 | 13 | 21845 | -| 70 | -21846 | 0 | 21 | 21845 | -| 70 | -21846 | 0 | 29 | 21845 | -| 70 | -21846 | 0 | 37 | -21846 | -| 70 | -21846 | 0 | 45 | 21845 | -| 70 | -21846 | 0 | 53 | 21845 | -| 70 | -21846 | 0 | 61 | 21845 | -| 70+ | 21845 | 1 | 37 | -21846 | -| 71 | 21845 | 1 | 37 | 21845 | -| 71+ | -21846 | 1 | 45 | 21845 | -| 72 | -21846 | 1 | 45 | -21846 | -| 72+ | -21846 | 0 | 5 | 21845 | -| 73 | -21846 | 0 | 5 | 21845 | -| 73 | -21846 | 0 | 13 | 21845 | -| 73 | -21846 | 0 | 21 | 21845 | -| 73 | -21846 | 0 | 29 | 21845 | -| 73 | -21846 | 0 | 37 | 21845 | -| 73 | -21846 | 0 | 45 | -21846 | -| 73 | -21846 | 0 | 53 | 21845 | -| 73 | -21846 | 0 | 61 | 21845 | -| 73+ | 21845 | 1 | 45 | -21846 | -| 74 | 21845 | 1 | 45 | 21845 | -| 74+ | -21846 | 1 | 53 | 21845 | -| 75 | -21846 | 1 | 53 | -21846 | -| 75+ | -21846 | 0 | 5 | 21845 | -| 76 | -21846 | 0 | 5 | 21845 | -| 76 | -21846 | 0 | 13 | 21845 | -| 76 | -21846 | 0 | 21 | 21845 | -| 76 | -21846 | 0 | 29 | 21845 | -| 76 | -21846 | 0 | 37 | 21845 | -| 76 | -21846 | 0 | 45 | 21845 | -| 76 | -21846 | 0 | 53 | -21846 | -| 76 | -21846 | 0 | 61 | 21845 | -| 76+ | 21845 | 1 | 53 | -21846 | -| 77 | 21845 | 1 | 53 | 21845 | -| 77+ | -21846 | 1 | 61 | 21845 | -| 78 | -21846 | 1 | 61 | -21846 | -| 78+ | -21846 | 0 | 5 | 21845 | -| 79 | -21846 | 0 | 5 | 21845 | -| 79 | -21846 | 0 | 13 | 21845 | -| 79 | -21846 | 0 | 21 | 21845 | -| 79 | -21846 | 0 | 29 | 21845 | -| 79 | -21846 | 0 | 37 | 21845 | -| 79 | -21846 | 0 | 45 | 21845 | -| 79 | -21846 | 0 | 53 | 21845 | -| 79 | -21846 | 0 | 61 | -21846 | -| 79+ | 21845 | 1 | 61 | -21846 | -| 80 | 21845 | 1 | 61 | 21845 | -| 80+ | 21845 | 0 | 5 | 21845 | -| 81 | 21845 | 0 | 5 | 21845 | -| 81 | 21845 | 0 | 13 | 21845 | -| 81 | 21845 | 0 | 21 | 21845 | -| 81 | 21845 | 0 | 29 | 21845 | -| 81 | 21845 | 0 | 37 | 21845 | -| 81 | 21845 | 0 | 45 | 21845 | -| 81 | 21845 | 0 | 53 | 21845 | -| 81 | 21845 | 0 | 61 | 21845 | diff --git a/projects/03/a/RAM64.tst b/projects/03/a/RAM64.tst deleted file mode 100644 index e1a1409..0000000 --- a/projects/03/a/RAM64.tst +++ /dev/null @@ -1,1026 +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/03/a/RAM64.tst - -load RAM64.hdl, -output-file RAM64.out, -compare-to RAM64.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.3.2 out%D1.6.1; - -set in 0, -set load 0, -set address 0, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set in 1313, -set load 0, -tick, -output; -tock, -output; - -set load 1, -set address 13, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; - -set in 4747, -set address 47, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 13, -eval, -output; - -set in 6363, -tick, -output; -tock, -output; - -set load 1, -set address 63, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 47, -eval, -output; - -set address 63, -eval, -output; - - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -tick, -output, -tock, -output; -set address %B101010, -tick, -output, -tock, -output; -set address %B101011, -tick, -output, -tock, -output; -set address %B101100, -tick, -output, -tock, -output; -set address %B101101, -tick, -output, -tock, -output; -set address %B101110, -tick, -output, -tock, -output; -set address %B101111, -tick, -output, -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101000, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101000, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101001, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101001, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101011, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101011, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101100, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101100, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101110, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101110, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101111, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - -set load 1, -set address %B101111, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B101000, -tick, -output; -tock, -output; -set address %B101001, -eval, -output; -set address %B101010, -eval, -output; -set address %B101011, -eval, -output; -set address %B101100, -eval, -output; -set address %B101101, -eval, -output; -set address %B101110, -eval, -output; -set address %B101111, -eval, -output; - - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -tick, -output, -tock, -output; -set address %B010101, -tick, -output, -tock, -output; -set address %B011101, -tick, -output, -tock, -output; -set address %B100101, -tick, -output, -tock, -output; -set address %B101101, -tick, -output, -tock, -output; -set address %B110101, -tick, -output, -tock, -output; -set address %B111101, -tick, -output, -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B000101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B000101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B001101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B001101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B011101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B011101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B100101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B100101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B101101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B110101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B110101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B111101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; - -set load 1, -set address %B111101, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B000101, -tick, -output; -tock, -output; -set address %B001101, -eval, -output; -set address %B010101, -eval, -output; -set address %B011101, -eval, -output; -set address %B100101, -eval, -output; -set address %B101101, -eval, -output; -set address %B110101, -eval, -output; -set address %B111101, -eval, -output; diff --git a/projects/03/a/RAM8.cmp b/projects/03/a/RAM8.cmp deleted file mode 100644 index 536c6ef..0000000 --- a/projects/03/a/RAM8.cmp +++ /dev/null @@ -1,173 +0,0 @@ -| time | in |load |address| out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 11111 | 0 | 0 | 0 | -| 3 | 11111 | 0 | 0 | 0 | -| 3+ | 11111 | 1 | 1 | 0 | -| 4 | 11111 | 1 | 1 | 11111 | -| 4+ | 11111 | 0 | 0 | 0 | -| 5 | 11111 | 0 | 0 | 0 | -| 5+ | 3333 | 0 | 3 | 0 | -| 6 | 3333 | 0 | 3 | 0 | -| 6+ | 3333 | 1 | 3 | 0 | -| 7 | 3333 | 1 | 3 | 3333 | -| 7+ | 3333 | 0 | 3 | 3333 | -| 8 | 3333 | 0 | 3 | 3333 | -| 8 | 3333 | 0 | 1 | 11111 | -| 8+ | 7777 | 0 | 1 | 11111 | -| 9 | 7777 | 0 | 1 | 11111 | -| 9+ | 7777 | 1 | 7 | 0 | -| 10 | 7777 | 1 | 7 | 7777 | -| 10+ | 7777 | 0 | 7 | 7777 | -| 11 | 7777 | 0 | 7 | 7777 | -| 11 | 7777 | 0 | 3 | 3333 | -| 11 | 7777 | 0 | 7 | 7777 | -| 11+ | 7777 | 0 | 0 | 0 | -| 12 | 7777 | 0 | 0 | 0 | -| 12 | 7777 | 0 | 1 | 11111 | -| 12 | 7777 | 0 | 2 | 0 | -| 12 | 7777 | 0 | 3 | 3333 | -| 12 | 7777 | 0 | 4 | 0 | -| 12 | 7777 | 0 | 5 | 0 | -| 12 | 7777 | 0 | 6 | 0 | -| 12 | 7777 | 0 | 7 | 7777 | -| 12+ | 21845 | 1 | 0 | 0 | -| 13 | 21845 | 1 | 0 | 21845 | -| 13+ | 21845 | 1 | 1 | 11111 | -| 14 | 21845 | 1 | 1 | 21845 | -| 14+ | 21845 | 1 | 2 | 0 | -| 15 | 21845 | 1 | 2 | 21845 | -| 15+ | 21845 | 1 | 3 | 3333 | -| 16 | 21845 | 1 | 3 | 21845 | -| 16+ | 21845 | 1 | 4 | 0 | -| 17 | 21845 | 1 | 4 | 21845 | -| 17+ | 21845 | 1 | 5 | 0 | -| 18 | 21845 | 1 | 5 | 21845 | -| 18+ | 21845 | 1 | 6 | 0 | -| 19 | 21845 | 1 | 6 | 21845 | -| 19+ | 21845 | 1 | 7 | 7777 | -| 20 | 21845 | 1 | 7 | 21845 | -| 20+ | 21845 | 0 | 0 | 21845 | -| 21 | 21845 | 0 | 0 | 21845 | -| 21 | 21845 | 0 | 1 | 21845 | -| 21 | 21845 | 0 | 2 | 21845 | -| 21 | 21845 | 0 | 3 | 21845 | -| 21 | 21845 | 0 | 4 | 21845 | -| 21 | 21845 | 0 | 5 | 21845 | -| 21 | 21845 | 0 | 6 | 21845 | -| 21 | 21845 | 0 | 7 | 21845 | -| 21+ | -21846 | 1 | 0 | 21845 | -| 22 | -21846 | 1 | 0 | -21846 | -| 22+ | -21846 | 0 | 0 | -21846 | -| 23 | -21846 | 0 | 0 | -21846 | -| 23 | -21846 | 0 | 1 | 21845 | -| 23 | -21846 | 0 | 2 | 21845 | -| 23 | -21846 | 0 | 3 | 21845 | -| 23 | -21846 | 0 | 4 | 21845 | -| 23 | -21846 | 0 | 5 | 21845 | -| 23 | -21846 | 0 | 6 | 21845 | -| 23 | -21846 | 0 | 7 | 21845 | -| 23+ | 21845 | 1 | 0 | -21846 | -| 24 | 21845 | 1 | 0 | 21845 | -| 24+ | -21846 | 1 | 1 | 21845 | -| 25 | -21846 | 1 | 1 | -21846 | -| 25+ | -21846 | 0 | 0 | 21845 | -| 26 | -21846 | 0 | 0 | 21845 | -| 26 | -21846 | 0 | 1 | -21846 | -| 26 | -21846 | 0 | 2 | 21845 | -| 26 | -21846 | 0 | 3 | 21845 | -| 26 | -21846 | 0 | 4 | 21845 | -| 26 | -21846 | 0 | 5 | 21845 | -| 26 | -21846 | 0 | 6 | 21845 | -| 26 | -21846 | 0 | 7 | 21845 | -| 26+ | 21845 | 1 | 1 | -21846 | -| 27 | 21845 | 1 | 1 | 21845 | -| 27+ | -21846 | 1 | 2 | 21845 | -| 28 | -21846 | 1 | 2 | -21846 | -| 28+ | -21846 | 0 | 0 | 21845 | -| 29 | -21846 | 0 | 0 | 21845 | -| 29 | -21846 | 0 | 1 | 21845 | -| 29 | -21846 | 0 | 2 | -21846 | -| 29 | -21846 | 0 | 3 | 21845 | -| 29 | -21846 | 0 | 4 | 21845 | -| 29 | -21846 | 0 | 5 | 21845 | -| 29 | -21846 | 0 | 6 | 21845 | -| 29 | -21846 | 0 | 7 | 21845 | -| 29+ | 21845 | 1 | 2 | -21846 | -| 30 | 21845 | 1 | 2 | 21845 | -| 30+ | -21846 | 1 | 3 | 21845 | -| 31 | -21846 | 1 | 3 | -21846 | -| 31+ | -21846 | 0 | 0 | 21845 | -| 32 | -21846 | 0 | 0 | 21845 | -| 32 | -21846 | 0 | 1 | 21845 | -| 32 | -21846 | 0 | 2 | 21845 | -| 32 | -21846 | 0 | 3 | -21846 | -| 32 | -21846 | 0 | 4 | 21845 | -| 32 | -21846 | 0 | 5 | 21845 | -| 32 | -21846 | 0 | 6 | 21845 | -| 32 | -21846 | 0 | 7 | 21845 | -| 32+ | 21845 | 1 | 3 | -21846 | -| 33 | 21845 | 1 | 3 | 21845 | -| 33+ | -21846 | 1 | 4 | 21845 | -| 34 | -21846 | 1 | 4 | -21846 | -| 34+ | -21846 | 0 | 0 | 21845 | -| 35 | -21846 | 0 | 0 | 21845 | -| 35 | -21846 | 0 | 1 | 21845 | -| 35 | -21846 | 0 | 2 | 21845 | -| 35 | -21846 | 0 | 3 | 21845 | -| 35 | -21846 | 0 | 4 | -21846 | -| 35 | -21846 | 0 | 5 | 21845 | -| 35 | -21846 | 0 | 6 | 21845 | -| 35 | -21846 | 0 | 7 | 21845 | -| 35+ | 21845 | 1 | 4 | -21846 | -| 36 | 21845 | 1 | 4 | 21845 | -| 36+ | -21846 | 1 | 5 | 21845 | -| 37 | -21846 | 1 | 5 | -21846 | -| 37+ | -21846 | 0 | 0 | 21845 | -| 38 | -21846 | 0 | 0 | 21845 | -| 38 | -21846 | 0 | 1 | 21845 | -| 38 | -21846 | 0 | 2 | 21845 | -| 38 | -21846 | 0 | 3 | 21845 | -| 38 | -21846 | 0 | 4 | 21845 | -| 38 | -21846 | 0 | 5 | -21846 | -| 38 | -21846 | 0 | 6 | 21845 | -| 38 | -21846 | 0 | 7 | 21845 | -| 38+ | 21845 | 1 | 5 | -21846 | -| 39 | 21845 | 1 | 5 | 21845 | -| 39+ | -21846 | 1 | 6 | 21845 | -| 40 | -21846 | 1 | 6 | -21846 | -| 40+ | -21846 | 0 | 0 | 21845 | -| 41 | -21846 | 0 | 0 | 21845 | -| 41 | -21846 | 0 | 1 | 21845 | -| 41 | -21846 | 0 | 2 | 21845 | -| 41 | -21846 | 0 | 3 | 21845 | -| 41 | -21846 | 0 | 4 | 21845 | -| 41 | -21846 | 0 | 5 | 21845 | -| 41 | -21846 | 0 | 6 | -21846 | -| 41 | -21846 | 0 | 7 | 21845 | -| 41+ | 21845 | 1 | 6 | -21846 | -| 42 | 21845 | 1 | 6 | 21845 | -| 42+ | -21846 | 1 | 7 | 21845 | -| 43 | -21846 | 1 | 7 | -21846 | -| 43+ | -21846 | 0 | 0 | 21845 | -| 44 | -21846 | 0 | 0 | 21845 | -| 44 | -21846 | 0 | 1 | 21845 | -| 44 | -21846 | 0 | 2 | 21845 | -| 44 | -21846 | 0 | 3 | 21845 | -| 44 | -21846 | 0 | 4 | 21845 | -| 44 | -21846 | 0 | 5 | 21845 | -| 44 | -21846 | 0 | 6 | 21845 | -| 44 | -21846 | 0 | 7 | -21846 | -| 44+ | 21845 | 1 | 7 | -21846 | -| 45 | 21845 | 1 | 7 | 21845 | -| 45+ | 21845 | 0 | 0 | 21845 | -| 46 | 21845 | 0 | 0 | 21845 | -| 46 | 21845 | 0 | 1 | 21845 | -| 46 | 21845 | 0 | 2 | 21845 | -| 46 | 21845 | 0 | 3 | 21845 | -| 46 | 21845 | 0 | 4 | 21845 | -| 46 | 21845 | 0 | 5 | 21845 | -| 46 | 21845 | 0 | 6 | 21845 | -| 46 | 21845 | 0 | 7 | 21845 | diff --git a/projects/03/a/RAM8.hdl b/projects/03/a/RAM8.hdl deleted file mode 100644 index 2ea13a1..0000000 --- a/projects/03/a/RAM8.hdl +++ /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/03/a/RAM8.hdl - -/** - * Memory of 8 registers, each 16 bit-wide. Out holds the value - * stored at the memory location specified by address. If load==1, then - * the in value is loaded into the memory location specified by address - * (the loaded value will be emitted to out from the next time step onward). - */ - -CHIP RAM8 { - IN in[16], load, address[3]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux8Way (in=load, sel=address, a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); - Register (in=in, load=load0, out=out0); - Register (in=in, load=load1, out=out1); - Register (in=in, load=load2, out=out2); - Register (in=in, load=load3, out=out3); - Register (in=in, load=load4, out=out4); - Register (in=in, load=load5, out=out5); - Register (in=in, load=load6, out=out6); - Register (in=in, load=load7, out=out7); - Mux8Way16 (a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address, out=out); -} diff --git a/projects/03/a/RAM8.out b/projects/03/a/RAM8.out deleted file mode 100644 index 9499c03..0000000 --- a/projects/03/a/RAM8.out +++ /dev/null @@ -1,8 +0,0 @@ -| time | in |load |address| out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 11111 | 0 | 0 | 0 | -| 3 | 11111 | 0 | 0 | 0 | -| 3+ | 11111 | 1 | 1 | 0 | diff --git a/projects/03/a/RAM8.tst b/projects/03/a/RAM8.tst deleted file mode 100644 index 9b6069c..0000000 --- a/projects/03/a/RAM8.tst +++ /dev/null @@ -1,560 +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/03/a/RAM8.tst - -load RAM8.hdl, -output-file RAM8.out, -compare-to RAM8.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D3.1.3 out%D1.6.1; - -set in 0, -set load 0, -set address 0, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set in 11111, -set load 0, -tick, -output; -tock, -output; - -set load 1, -set address 1, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; - -set in 3333, -set address 3, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 1, -eval, -output; - -set in 7777, -tick, -output; -tock, -output; - -set load 1, -set address 7, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 3, -eval, -output; - -set address 7, -eval, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address 0, -tick, -output; -tock, -output; -set address 1, -tick, -output, -tock, -output; -set address 2, -tick, -output, -tock, -output; -set address 3, -tick, -output, -tock, -output; -set address 4, -tick, -output, -tock, -output; -set address 5, -tick, -output, -tock, -output; -set address 6, -tick, -output, -tock, -output; -set address 7, -tick, -output, -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 0, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 0, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 1, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 1, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 2, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 2, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 3, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 3, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 4, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 4, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 5, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 5, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 6, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 6, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address 7, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - -set load 1, -set address 7, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; -set address 1, -eval, -output; -set address 2, -eval, -output; -set address 3, -eval, -output; -set address 4, -eval, -output; -set address 5, -eval, -output; -set address 6, -eval, -output; -set address 7, -eval, -output; - diff --git a/projects/03/a/Register.cmp b/projects/03/a/Register.cmp deleted file mode 100644 index a899f27..0000000 --- a/projects/03/a/Register.cmp +++ /dev/null @@ -1,149 +0,0 @@ -| time | in |load | out | -| 0+ | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | -| 2 | 0 | 1 | 0 | -| 2+ | -32123 | 0 | 0 | -| 3 | -32123 | 0 | 0 | -| 3+ | 11111 | 0 | 0 | -| 4 | 11111 | 0 | 0 | -| 4+ | -32123 | 1 | 0 | -| 5 | -32123 | 1 | -32123 | -| 5+ | -32123 | 1 | -32123 | -| 6 | -32123 | 1 | -32123 | -| 6+ | -32123 | 0 | -32123 | -| 7 | -32123 | 0 | -32123 | -| 7+ | 12345 | 1 | -32123 | -| 8 | 12345 | 1 | 12345 | -| 8+ | 0 | 0 | 12345 | -| 9 | 0 | 0 | 12345 | -| 9+ | 0 | 1 | 12345 | -| 10 | 0 | 1 | 0 | -| 10+ | 1 | 0 | 0 | -| 11 | 1 | 0 | 0 | -| 11+ | 1 | 1 | 0 | -| 12 | 1 | 1 | 1 | -| 12+ | 2 | 0 | 1 | -| 13 | 2 | 0 | 1 | -| 13+ | 2 | 1 | 1 | -| 14 | 2 | 1 | 2 | -| 14+ | 4 | 0 | 2 | -| 15 | 4 | 0 | 2 | -| 15+ | 4 | 1 | 2 | -| 16 | 4 | 1 | 4 | -| 16+ | 8 | 0 | 4 | -| 17 | 8 | 0 | 4 | -| 17+ | 8 | 1 | 4 | -| 18 | 8 | 1 | 8 | -| 18+ | 16 | 0 | 8 | -| 19 | 16 | 0 | 8 | -| 19+ | 16 | 1 | 8 | -| 20 | 16 | 1 | 16 | -| 20+ | 32 | 0 | 16 | -| 21 | 32 | 0 | 16 | -| 21+ | 32 | 1 | 16 | -| 22 | 32 | 1 | 32 | -| 22+ | 64 | 0 | 32 | -| 23 | 64 | 0 | 32 | -| 23+ | 64 | 1 | 32 | -| 24 | 64 | 1 | 64 | -| 24+ | 128 | 0 | 64 | -| 25 | 128 | 0 | 64 | -| 25+ | 128 | 1 | 64 | -| 26 | 128 | 1 | 128 | -| 26+ | 256 | 0 | 128 | -| 27 | 256 | 0 | 128 | -| 27+ | 256 | 1 | 128 | -| 28 | 256 | 1 | 256 | -| 28+ | 512 | 0 | 256 | -| 29 | 512 | 0 | 256 | -| 29+ | 512 | 1 | 256 | -| 30 | 512 | 1 | 512 | -| 30+ | 1024 | 0 | 512 | -| 31 | 1024 | 0 | 512 | -| 31+ | 1024 | 1 | 512 | -| 32 | 1024 | 1 | 1024 | -| 32+ | 2048 | 0 | 1024 | -| 33 | 2048 | 0 | 1024 | -| 33+ | 2048 | 1 | 1024 | -| 34 | 2048 | 1 | 2048 | -| 34+ | 4096 | 0 | 2048 | -| 35 | 4096 | 0 | 2048 | -| 35+ | 4096 | 1 | 2048 | -| 36 | 4096 | 1 | 4096 | -| 36+ | 8192 | 0 | 4096 | -| 37 | 8192 | 0 | 4096 | -| 37+ | 8192 | 1 | 4096 | -| 38 | 8192 | 1 | 8192 | -| 38+ | 16384 | 0 | 8192 | -| 39 | 16384 | 0 | 8192 | -| 39+ | 16384 | 1 | 8192 | -| 40 | 16384 | 1 | 16384 | -| 40+ | -32768 | 0 | 16384 | -| 41 | -32768 | 0 | 16384 | -| 41+ | -32768 | 1 | 16384 | -| 42 | -32768 | 1 | -32768 | -| 42+ | -2 | 0 | -32768 | -| 43 | -2 | 0 | -32768 | -| 43+ | -2 | 1 | -32768 | -| 44 | -2 | 1 | -2 | -| 44+ | -3 | 0 | -2 | -| 45 | -3 | 0 | -2 | -| 45+ | -3 | 1 | -2 | -| 46 | -3 | 1 | -3 | -| 46+ | -5 | 0 | -3 | -| 47 | -5 | 0 | -3 | -| 47+ | -5 | 1 | -3 | -| 48 | -5 | 1 | -5 | -| 48+ | -9 | 0 | -5 | -| 49 | -9 | 0 | -5 | -| 49+ | -9 | 1 | -5 | -| 50 | -9 | 1 | -9 | -| 50+ | -17 | 0 | -9 | -| 51 | -17 | 0 | -9 | -| 51+ | -17 | 1 | -9 | -| 52 | -17 | 1 | -17 | -| 52+ | -33 | 0 | -17 | -| 53 | -33 | 0 | -17 | -| 53+ | -33 | 1 | -17 | -| 54 | -33 | 1 | -33 | -| 54+ | -65 | 0 | -33 | -| 55 | -65 | 0 | -33 | -| 55+ | -65 | 1 | -33 | -| 56 | -65 | 1 | -65 | -| 56+ | -129 | 0 | -65 | -| 57 | -129 | 0 | -65 | -| 57+ | -129 | 1 | -65 | -| 58 | -129 | 1 | -129 | -| 58+ | -257 | 0 | -129 | -| 59 | -257 | 0 | -129 | -| 59+ | -257 | 1 | -129 | -| 60 | -257 | 1 | -257 | -| 60+ | -513 | 0 | -257 | -| 61 | -513 | 0 | -257 | -| 61+ | -513 | 1 | -257 | -| 62 | -513 | 1 | -513 | -| 62+ | -1025 | 0 | -513 | -| 63 | -1025 | 0 | -513 | -| 63+ | -1025 | 1 | -513 | -| 64 | -1025 | 1 | -1025 | -| 64+ | -2049 | 0 | -1025 | -| 65 | -2049 | 0 | -1025 | -| 65+ | -2049 | 1 | -1025 | -| 66 | -2049 | 1 | -2049 | -| 66+ | -4097 | 0 | -2049 | -| 67 | -4097 | 0 | -2049 | -| 67+ | -4097 | 1 | -2049 | -| 68 | -4097 | 1 | -4097 | -| 68+ | -8193 | 0 | -4097 | -| 69 | -8193 | 0 | -4097 | -| 69+ | -8193 | 1 | -4097 | -| 70 | -8193 | 1 | -8193 | -| 70+ | -16385 | 0 | -8193 | -| 71 | -16385 | 0 | -8193 | -| 71+ | -16385 | 1 | -8193 | -| 72 | -16385 | 1 | -16385 | -| 72+ | 32767 | 0 | -16385 | -| 73 | 32767 | 0 | -16385 | -| 73+ | 32767 | 1 | -16385 | -| 74 | 32767 | 1 | 32767 | diff --git a/projects/03/a/Register.hdl b/projects/03/a/Register.hdl deleted file mode 100644 index f4ec7ee..0000000 --- a/projects/03/a/Register.hdl +++ /dev/null @@ -1,34 +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/03/a/Register.hdl - -/** - * 16-bit register: - * If load[t] == 1 then out[t+1] = in[t] - * else out does not change - */ - -CHIP Register { - IN in[16], load; - OUT out[16]; - - PARTS: - // Put your code here: - Bit (in=in[0], load=load, out=out[0]); - Bit (in=in[1], load=load, out=out[1]); - Bit (in=in[2], load=load, out=out[2]); - Bit (in=in[3], load=load, out=out[3]); - Bit (in=in[4], load=load, out=out[4]); - Bit (in=in[5], load=load, out=out[5]); - Bit (in=in[6], load=load, out=out[6]); - Bit (in=in[7], load=load, out=out[7]); - Bit (in=in[8], load=load, out=out[8]); - Bit (in=in[9], load=load, out=out[9]); - Bit (in=in[10], load=load, out=out[10]); - Bit (in=in[11], load=load, out=out[11]); - Bit (in=in[12], load=load, out=out[12]); - Bit (in=in[13], load=load, out=out[13]); - Bit (in=in[14], load=load, out=out[14]); - Bit (in=in[15], load=load, out=out[15]); -} diff --git a/projects/03/a/Register.out b/projects/03/a/Register.out deleted file mode 100644 index 2719604..0000000 --- a/projects/03/a/Register.out +++ /dev/null @@ -1,149 +0,0 @@ -| time | in |load | out | -| 0+ | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | -| 2 | 0 | 1 | 0 | -| 2+ | -32123 | 0 | 0 | -| 3 | -32123 | 0 | 0 | -| 3+ | 11111 | 0 | 0 | -| 4 | 11111 | 0 | 0 | -| 4+ | -32123 | 1 | 0 | -| 5 | -32123 | 1 | -32123 | -| 5+ | -32123 | 1 | -32123 | -| 6 | -32123 | 1 | -32123 | -| 6+ | -32123 | 0 | -32123 | -| 7 | -32123 | 0 | -32123 | -| 7+ | 12345 | 1 | -32123 | -| 8 | 12345 | 1 | 12345 | -| 8+ | 0 | 0 | 12345 | -| 9 | 0 | 0 | 12345 | -| 9+ | 0 | 1 | 12345 | -| 10 | 0 | 1 | 0 | -| 10+ | 1 | 0 | 0 | -| 11 | 1 | 0 | 0 | -| 11+ | 1 | 1 | 0 | -| 12 | 1 | 1 | 1 | -| 12+ | 2 | 0 | 1 | -| 13 | 2 | 0 | 1 | -| 13+ | 2 | 1 | 1 | -| 14 | 2 | 1 | 2 | -| 14+ | 4 | 0 | 2 | -| 15 | 4 | 0 | 2 | -| 15+ | 4 | 1 | 2 | -| 16 | 4 | 1 | 4 | -| 16+ | 8 | 0 | 4 | -| 17 | 8 | 0 | 4 | -| 17+ | 8 | 1 | 4 | -| 18 | 8 | 1 | 8 | -| 18+ | 16 | 0 | 8 | -| 19 | 16 | 0 | 8 | -| 19+ | 16 | 1 | 8 | -| 20 | 16 | 1 | 16 | -| 20+ | 32 | 0 | 16 | -| 21 | 32 | 0 | 16 | -| 21+ | 32 | 1 | 16 | -| 22 | 32 | 1 | 32 | -| 22+ | 64 | 0 | 32 | -| 23 | 64 | 0 | 32 | -| 23+ | 64 | 1 | 32 | -| 24 | 64 | 1 | 64 | -| 24+ | 128 | 0 | 64 | -| 25 | 128 | 0 | 64 | -| 25+ | 128 | 1 | 64 | -| 26 | 128 | 1 | 128 | -| 26+ | 256 | 0 | 128 | -| 27 | 256 | 0 | 128 | -| 27+ | 256 | 1 | 128 | -| 28 | 256 | 1 | 256 | -| 28+ | 512 | 0 | 256 | -| 29 | 512 | 0 | 256 | -| 29+ | 512 | 1 | 256 | -| 30 | 512 | 1 | 512 | -| 30+ | 1024 | 0 | 512 | -| 31 | 1024 | 0 | 512 | -| 31+ | 1024 | 1 | 512 | -| 32 | 1024 | 1 | 1024 | -| 32+ | 2048 | 0 | 1024 | -| 33 | 2048 | 0 | 1024 | -| 33+ | 2048 | 1 | 1024 | -| 34 | 2048 | 1 | 2048 | -| 34+ | 4096 | 0 | 2048 | -| 35 | 4096 | 0 | 2048 | -| 35+ | 4096 | 1 | 2048 | -| 36 | 4096 | 1 | 4096 | -| 36+ | 8192 | 0 | 4096 | -| 37 | 8192 | 0 | 4096 | -| 37+ | 8192 | 1 | 4096 | -| 38 | 8192 | 1 | 8192 | -| 38+ | 16384 | 0 | 8192 | -| 39 | 16384 | 0 | 8192 | -| 39+ | 16384 | 1 | 8192 | -| 40 | 16384 | 1 | 16384 | -| 40+ | -32768 | 0 | 16384 | -| 41 | -32768 | 0 | 16384 | -| 41+ | -32768 | 1 | 16384 | -| 42 | -32768 | 1 | -32768 | -| 42+ | -2 | 0 | -32768 | -| 43 | -2 | 0 | -32768 | -| 43+ | -2 | 1 | -32768 | -| 44 | -2 | 1 | -2 | -| 44+ | -3 | 0 | -2 | -| 45 | -3 | 0 | -2 | -| 45+ | -3 | 1 | -2 | -| 46 | -3 | 1 | -3 | -| 46+ | -5 | 0 | -3 | -| 47 | -5 | 0 | -3 | -| 47+ | -5 | 1 | -3 | -| 48 | -5 | 1 | -5 | -| 48+ | -9 | 0 | -5 | -| 49 | -9 | 0 | -5 | -| 49+ | -9 | 1 | -5 | -| 50 | -9 | 1 | -9 | -| 50+ | -17 | 0 | -9 | -| 51 | -17 | 0 | -9 | -| 51+ | -17 | 1 | -9 | -| 52 | -17 | 1 | -17 | -| 52+ | -33 | 0 | -17 | -| 53 | -33 | 0 | -17 | -| 53+ | -33 | 1 | -17 | -| 54 | -33 | 1 | -33 | -| 54+ | -65 | 0 | -33 | -| 55 | -65 | 0 | -33 | -| 55+ | -65 | 1 | -33 | -| 56 | -65 | 1 | -65 | -| 56+ | -129 | 0 | -65 | -| 57 | -129 | 0 | -65 | -| 57+ | -129 | 1 | -65 | -| 58 | -129 | 1 | -129 | -| 58+ | -257 | 0 | -129 | -| 59 | -257 | 0 | -129 | -| 59+ | -257 | 1 | -129 | -| 60 | -257 | 1 | -257 | -| 60+ | -513 | 0 | -257 | -| 61 | -513 | 0 | -257 | -| 61+ | -513 | 1 | -257 | -| 62 | -513 | 1 | -513 | -| 62+ | -1025 | 0 | -513 | -| 63 | -1025 | 0 | -513 | -| 63+ | -1025 | 1 | -513 | -| 64 | -1025 | 1 | -1025 | -| 64+ | -2049 | 0 | -1025 | -| 65 | -2049 | 0 | -1025 | -| 65+ | -2049 | 1 | -1025 | -| 66 | -2049 | 1 | -2049 | -| 66+ | -4097 | 0 | -2049 | -| 67 | -4097 | 0 | -2049 | -| 67+ | -4097 | 1 | -2049 | -| 68 | -4097 | 1 | -4097 | -| 68+ | -8193 | 0 | -4097 | -| 69 | -8193 | 0 | -4097 | -| 69+ | -8193 | 1 | -4097 | -| 70 | -8193 | 1 | -8193 | -| 70+ | -16385 | 0 | -8193 | -| 71 | -16385 | 0 | -8193 | -| 71+ | -16385 | 1 | -8193 | -| 72 | -16385 | 1 | -16385 | -| 72+ | 32767 | 0 | -16385 | -| 73 | 32767 | 0 | -16385 | -| 73+ | 32767 | 1 | -16385 | -| 74 | 32767 | 1 | 32767 | diff --git a/projects/03/a/Register.tst b/projects/03/a/Register.tst deleted file mode 100644 index aeec166..0000000 --- a/projects/03/a/Register.tst +++ /dev/null @@ -1,569 +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/03/a/Register.tst - -load Register.hdl, -output-file Register.out, -compare-to Register.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 out%D1.6.1; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 1, -tick, -output; - -tock, -output; - -set in -32123, -set load 0, -tick, -output; - -tock, -output; - -set in 11111, -set load 0, -tick, -output; - -tock, -output; - -set in -32123, -set load 1, -tick, -output; - -tock, -output; - -set in -32123, -set load 1, -tick, -output; - -tock, -output; - -set in -32123, -set load 0, -tick, -output; - -tock, -output; - -set in 12345, -set load 1, -tick, -output; - -tock, -output; - -set in 0, -set load 0, -tick, -output; - -tock, -output; - -set in 0, -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000000001, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000000010, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000000100, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000001000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000010000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000000100000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000001000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000010000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000000100000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000001000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000010000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0000100000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0001000000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0010000000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0100000000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1000000000000000, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111111110, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111111101, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111111011, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111110111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111101111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111111011111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111110111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111101111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111111011111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111110111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111101111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1111011111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1110111111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1101111111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B1011111111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; - -set in %B0111111111111111, -set load 0, -tick, -output; - -tock, -output; - -set load 1, -tick, -output; - -tock, -output; diff --git a/projects/03/b/RAM16K.cmp b/projects/03/b/RAM16K.cmp deleted file mode 100644 index a1ad9db..0000000 --- a/projects/03/b/RAM16K.cmp +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load | address | out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 4321 | 0 | 0 | 0 | -| 3 | 4321 | 0 | 0 | 0 | -| 3+ | 4321 | 1 | 4321 | 0 | -| 4 | 4321 | 1 | 4321 | 4321 | -| 4+ | 4321 | 0 | 0 | 0 | -| 5 | 4321 | 0 | 0 | 0 | -| 5+ | 12345 | 0 | 12345 | 0 | -| 6 | 12345 | 0 | 12345 | 0 | -| 6+ | 12345 | 1 | 12345 | 0 | -| 7 | 12345 | 1 | 12345 | 12345 | -| 7+ | 12345 | 0 | 12345 | 12345 | -| 8 | 12345 | 0 | 12345 | 12345 | -| 8 | 12345 | 0 | 4321 | 4321 | -| 8+ | 16383 | 0 | 4321 | 4321 | -| 9 | 16383 | 0 | 4321 | 4321 | -| 9+ | 16383 | 1 | 16383 | 0 | -| 10 | 16383 | 1 | 16383 | 16383 | -| 10+ | 16383 | 0 | 16383 | 16383 | -| 11 | 16383 | 0 | 16383 | 16383 | -| 11 | 16383 | 0 | 12345 | 12345 | -| 11 | 16383 | 0 | 16383 | 16383 | -| 11+ | 16383 | 0 | 10920 | 0 | -| 12 | 16383 | 0 | 10920 | 0 | -| 12 | 16383 | 0 | 10921 | 0 | -| 12 | 16383 | 0 | 10922 | 0 | -| 12 | 16383 | 0 | 10923 | 0 | -| 12 | 16383 | 0 | 10924 | 0 | -| 12 | 16383 | 0 | 10925 | 0 | -| 12 | 16383 | 0 | 10926 | 0 | -| 12 | 16383 | 0 | 10927 | 0 | -| 12+ | 21845 | 1 | 10920 | 0 | -| 13 | 21845 | 1 | 10920 | 21845 | -| 13+ | 21845 | 1 | 10921 | 0 | -| 14 | 21845 | 1 | 10921 | 21845 | -| 14+ | 21845 | 1 | 10922 | 0 | -| 15 | 21845 | 1 | 10922 | 21845 | -| 15+ | 21845 | 1 | 10923 | 0 | -| 16 | 21845 | 1 | 10923 | 21845 | -| 16+ | 21845 | 1 | 10924 | 0 | -| 17 | 21845 | 1 | 10924 | 21845 | -| 17+ | 21845 | 1 | 10925 | 0 | -| 18 | 21845 | 1 | 10925 | 21845 | -| 18+ | 21845 | 1 | 10926 | 0 | -| 19 | 21845 | 1 | 10926 | 21845 | -| 19+ | 21845 | 1 | 10927 | 0 | -| 20 | 21845 | 1 | 10927 | 21845 | -| 20+ | 21845 | 0 | 10920 | 21845 | -| 21 | 21845 | 0 | 10920 | 21845 | -| 21 | 21845 | 0 | 10921 | 21845 | -| 21 | 21845 | 0 | 10922 | 21845 | -| 21 | 21845 | 0 | 10923 | 21845 | -| 21 | 21845 | 0 | 10924 | 21845 | -| 21 | 21845 | 0 | 10925 | 21845 | -| 21 | 21845 | 0 | 10926 | 21845 | -| 21 | 21845 | 0 | 10927 | 21845 | -| 21+ | -21846 | 1 | 10920 | 21845 | -| 22 | -21846 | 1 | 10920 | -21846 | -| 22+ | -21846 | 0 | 10920 | -21846 | -| 23 | -21846 | 0 | 10920 | -21846 | -| 23 | -21846 | 0 | 10921 | 21845 | -| 23 | -21846 | 0 | 10922 | 21845 | -| 23 | -21846 | 0 | 10923 | 21845 | -| 23 | -21846 | 0 | 10924 | 21845 | -| 23 | -21846 | 0 | 10925 | 21845 | -| 23 | -21846 | 0 | 10926 | 21845 | -| 23 | -21846 | 0 | 10927 | 21845 | -| 23+ | 21845 | 1 | 10920 | -21846 | -| 24 | 21845 | 1 | 10920 | 21845 | -| 24+ | -21846 | 1 | 10921 | 21845 | -| 25 | -21846 | 1 | 10921 | -21846 | -| 25+ | -21846 | 0 | 10920 | 21845 | -| 26 | -21846 | 0 | 10920 | 21845 | -| 26 | -21846 | 0 | 10921 | -21846 | -| 26 | -21846 | 0 | 10922 | 21845 | -| 26 | -21846 | 0 | 10923 | 21845 | -| 26 | -21846 | 0 | 10924 | 21845 | -| 26 | -21846 | 0 | 10925 | 21845 | -| 26 | -21846 | 0 | 10926 | 21845 | -| 26 | -21846 | 0 | 10927 | 21845 | -| 26+ | 21845 | 1 | 10921 | -21846 | -| 27 | 21845 | 1 | 10921 | 21845 | -| 27+ | -21846 | 1 | 10922 | 21845 | -| 28 | -21846 | 1 | 10922 | -21846 | -| 28+ | -21846 | 0 | 10920 | 21845 | -| 29 | -21846 | 0 | 10920 | 21845 | -| 29 | -21846 | 0 | 10921 | 21845 | -| 29 | -21846 | 0 | 10922 | -21846 | -| 29 | -21846 | 0 | 10923 | 21845 | -| 29 | -21846 | 0 | 10924 | 21845 | -| 29 | -21846 | 0 | 10925 | 21845 | -| 29 | -21846 | 0 | 10926 | 21845 | -| 29 | -21846 | 0 | 10927 | 21845 | -| 29+ | 21845 | 1 | 10922 | -21846 | -| 30 | 21845 | 1 | 10922 | 21845 | -| 30+ | -21846 | 1 | 10923 | 21845 | -| 31 | -21846 | 1 | 10923 | -21846 | -| 31+ | -21846 | 0 | 10920 | 21845 | -| 32 | -21846 | 0 | 10920 | 21845 | -| 32 | -21846 | 0 | 10921 | 21845 | -| 32 | -21846 | 0 | 10922 | 21845 | -| 32 | -21846 | 0 | 10923 | -21846 | -| 32 | -21846 | 0 | 10924 | 21845 | -| 32 | -21846 | 0 | 10925 | 21845 | -| 32 | -21846 | 0 | 10926 | 21845 | -| 32 | -21846 | 0 | 10927 | 21845 | -| 32+ | 21845 | 1 | 10923 | -21846 | -| 33 | 21845 | 1 | 10923 | 21845 | -| 33+ | -21846 | 1 | 10924 | 21845 | -| 34 | -21846 | 1 | 10924 | -21846 | -| 34+ | -21846 | 0 | 10920 | 21845 | -| 35 | -21846 | 0 | 10920 | 21845 | -| 35 | -21846 | 0 | 10921 | 21845 | -| 35 | -21846 | 0 | 10922 | 21845 | -| 35 | -21846 | 0 | 10923 | 21845 | -| 35 | -21846 | 0 | 10924 | -21846 | -| 35 | -21846 | 0 | 10925 | 21845 | -| 35 | -21846 | 0 | 10926 | 21845 | -| 35 | -21846 | 0 | 10927 | 21845 | -| 35+ | 21845 | 1 | 10924 | -21846 | -| 36 | 21845 | 1 | 10924 | 21845 | -| 36+ | -21846 | 1 | 10925 | 21845 | -| 37 | -21846 | 1 | 10925 | -21846 | -| 37+ | -21846 | 0 | 10920 | 21845 | -| 38 | -21846 | 0 | 10920 | 21845 | -| 38 | -21846 | 0 | 10921 | 21845 | -| 38 | -21846 | 0 | 10922 | 21845 | -| 38 | -21846 | 0 | 10923 | 21845 | -| 38 | -21846 | 0 | 10924 | 21845 | -| 38 | -21846 | 0 | 10925 | -21846 | -| 38 | -21846 | 0 | 10926 | 21845 | -| 38 | -21846 | 0 | 10927 | 21845 | -| 38+ | 21845 | 1 | 10925 | -21846 | -| 39 | 21845 | 1 | 10925 | 21845 | -| 39+ | -21846 | 1 | 10926 | 21845 | -| 40 | -21846 | 1 | 10926 | -21846 | -| 40+ | -21846 | 0 | 10920 | 21845 | -| 41 | -21846 | 0 | 10920 | 21845 | -| 41 | -21846 | 0 | 10921 | 21845 | -| 41 | -21846 | 0 | 10922 | 21845 | -| 41 | -21846 | 0 | 10923 | 21845 | -| 41 | -21846 | 0 | 10924 | 21845 | -| 41 | -21846 | 0 | 10925 | 21845 | -| 41 | -21846 | 0 | 10926 | -21846 | -| 41 | -21846 | 0 | 10927 | 21845 | -| 41+ | 21845 | 1 | 10926 | -21846 | -| 42 | 21845 | 1 | 10926 | 21845 | -| 42+ | -21846 | 1 | 10927 | 21845 | -| 43 | -21846 | 1 | 10927 | -21846 | -| 43+ | -21846 | 0 | 10920 | 21845 | -| 44 | -21846 | 0 | 10920 | 21845 | -| 44 | -21846 | 0 | 10921 | 21845 | -| 44 | -21846 | 0 | 10922 | 21845 | -| 44 | -21846 | 0 | 10923 | 21845 | -| 44 | -21846 | 0 | 10924 | 21845 | -| 44 | -21846 | 0 | 10925 | 21845 | -| 44 | -21846 | 0 | 10926 | 21845 | -| 44 | -21846 | 0 | 10927 | -21846 | -| 44+ | 21845 | 1 | 10927 | -21846 | -| 45 | 21845 | 1 | 10927 | 21845 | -| 45+ | 21845 | 0 | 10920 | 21845 | -| 46 | 21845 | 0 | 10920 | 21845 | -| 46 | 21845 | 0 | 10921 | 21845 | -| 46 | 21845 | 0 | 10922 | 21845 | -| 46 | 21845 | 0 | 10923 | 21845 | -| 46 | 21845 | 0 | 10924 | 21845 | -| 46 | 21845 | 0 | 10925 | 21845 | -| 46 | 21845 | 0 | 10926 | 21845 | -| 46 | 21845 | 0 | 10927 | 21845 | -| 46+ | 21845 | 0 | 1365 | 0 | -| 47 | 21845 | 0 | 1365 | 0 | -| 47 | 21845 | 0 | 3413 | 0 | -| 47 | 21845 | 0 | 5461 | 0 | -| 47 | 21845 | 0 | 7509 | 0 | -| 47 | 21845 | 0 | 9557 | 0 | -| 47 | 21845 | 0 | 11605 | 0 | -| 47 | 21845 | 0 | 13653 | 0 | -| 47 | 21845 | 0 | 15701 | 0 | -| 47+ | 21845 | 1 | 1365 | 0 | -| 48 | 21845 | 1 | 1365 | 21845 | -| 48+ | 21845 | 1 | 3413 | 0 | -| 49 | 21845 | 1 | 3413 | 21845 | -| 49+ | 21845 | 1 | 5461 | 0 | -| 50 | 21845 | 1 | 5461 | 21845 | -| 50+ | 21845 | 1 | 7509 | 0 | -| 51 | 21845 | 1 | 7509 | 21845 | -| 51+ | 21845 | 1 | 9557 | 0 | -| 52 | 21845 | 1 | 9557 | 21845 | -| 52+ | 21845 | 1 | 11605 | 0 | -| 53 | 21845 | 1 | 11605 | 21845 | -| 53+ | 21845 | 1 | 13653 | 0 | -| 54 | 21845 | 1 | 13653 | 21845 | -| 54+ | 21845 | 1 | 15701 | 0 | -| 55 | 21845 | 1 | 15701 | 21845 | -| 55+ | 21845 | 0 | 1365 | 21845 | -| 56 | 21845 | 0 | 1365 | 21845 | -| 56 | 21845 | 0 | 3413 | 21845 | -| 56 | 21845 | 0 | 5461 | 21845 | -| 56 | 21845 | 0 | 7509 | 21845 | -| 56 | 21845 | 0 | 9557 | 21845 | -| 56 | 21845 | 0 | 11605 | 21845 | -| 56 | 21845 | 0 | 13653 | 21845 | -| 56 | 21845 | 0 | 15701 | 21845 | -| 56+ | -21846 | 1 | 1365 | 21845 | -| 57 | -21846 | 1 | 1365 | -21846 | -| 57+ | -21846 | 0 | 1365 | -21846 | -| 58 | -21846 | 0 | 1365 | -21846 | -| 58 | -21846 | 0 | 3413 | 21845 | -| 58 | -21846 | 0 | 5461 | 21845 | -| 58 | -21846 | 0 | 7509 | 21845 | -| 58 | -21846 | 0 | 9557 | 21845 | -| 58 | -21846 | 0 | 11605 | 21845 | -| 58 | -21846 | 0 | 13653 | 21845 | -| 58 | -21846 | 0 | 15701 | 21845 | -| 58+ | 21845 | 1 | 1365 | -21846 | -| 59 | 21845 | 1 | 1365 | 21845 | -| 59+ | -21846 | 1 | 3413 | 21845 | -| 60 | -21846 | 1 | 3413 | -21846 | -| 60+ | -21846 | 0 | 1365 | 21845 | -| 61 | -21846 | 0 | 1365 | 21845 | -| 61 | -21846 | 0 | 3413 | -21846 | -| 61 | -21846 | 0 | 5461 | 21845 | -| 61 | -21846 | 0 | 7509 | 21845 | -| 61 | -21846 | 0 | 9557 | 21845 | -| 61 | -21846 | 0 | 11605 | 21845 | -| 61 | -21846 | 0 | 13653 | 21845 | -| 61 | -21846 | 0 | 15701 | 21845 | -| 61+ | 21845 | 1 | 3413 | -21846 | -| 62 | 21845 | 1 | 3413 | 21845 | -| 62+ | -21846 | 1 | 5461 | 21845 | -| 63 | -21846 | 1 | 5461 | -21846 | -| 63+ | -21846 | 0 | 1365 | 21845 | -| 64 | -21846 | 0 | 1365 | 21845 | -| 64 | -21846 | 0 | 3413 | 21845 | -| 64 | -21846 | 0 | 5461 | -21846 | -| 64 | -21846 | 0 | 7509 | 21845 | -| 64 | -21846 | 0 | 9557 | 21845 | -| 64 | -21846 | 0 | 11605 | 21845 | -| 64 | -21846 | 0 | 13653 | 21845 | -| 64 | -21846 | 0 | 15701 | 21845 | -| 64+ | 21845 | 1 | 5461 | -21846 | -| 65 | 21845 | 1 | 5461 | 21845 | -| 65+ | -21846 | 1 | 7509 | 21845 | -| 66 | -21846 | 1 | 7509 | -21846 | -| 66+ | -21846 | 0 | 1365 | 21845 | -| 67 | -21846 | 0 | 1365 | 21845 | -| 67 | -21846 | 0 | 3413 | 21845 | -| 67 | -21846 | 0 | 5461 | 21845 | -| 67 | -21846 | 0 | 7509 | -21846 | -| 67 | -21846 | 0 | 9557 | 21845 | -| 67 | -21846 | 0 | 11605 | 21845 | -| 67 | -21846 | 0 | 13653 | 21845 | -| 67 | -21846 | 0 | 15701 | 21845 | -| 67+ | 21845 | 1 | 7509 | -21846 | -| 68 | 21845 | 1 | 7509 | 21845 | -| 68+ | -21846 | 1 | 9557 | 21845 | -| 69 | -21846 | 1 | 9557 | -21846 | -| 69+ | -21846 | 0 | 1365 | 21845 | -| 70 | -21846 | 0 | 1365 | 21845 | -| 70 | -21846 | 0 | 3413 | 21845 | -| 70 | -21846 | 0 | 5461 | 21845 | -| 70 | -21846 | 0 | 7509 | 21845 | -| 70 | -21846 | 0 | 9557 | -21846 | -| 70 | -21846 | 0 | 11605 | 21845 | -| 70 | -21846 | 0 | 13653 | 21845 | -| 70 | -21846 | 0 | 15701 | 21845 | -| 70+ | 21845 | 1 | 9557 | -21846 | -| 71 | 21845 | 1 | 9557 | 21845 | -| 71+ | -21846 | 1 | 11605 | 21845 | -| 72 | -21846 | 1 | 11605 | -21846 | -| 72+ | -21846 | 0 | 1365 | 21845 | -| 73 | -21846 | 0 | 1365 | 21845 | -| 73 | -21846 | 0 | 3413 | 21845 | -| 73 | -21846 | 0 | 5461 | 21845 | -| 73 | -21846 | 0 | 7509 | 21845 | -| 73 | -21846 | 0 | 9557 | 21845 | -| 73 | -21846 | 0 | 11605 | -21846 | -| 73 | -21846 | 0 | 13653 | 21845 | -| 73 | -21846 | 0 | 15701 | 21845 | -| 73+ | 21845 | 1 | 11605 | -21846 | -| 74 | 21845 | 1 | 11605 | 21845 | -| 74+ | -21846 | 1 | 13653 | 21845 | -| 75 | -21846 | 1 | 13653 | -21846 | -| 75+ | -21846 | 0 | 1365 | 21845 | -| 76 | -21846 | 0 | 1365 | 21845 | -| 76 | -21846 | 0 | 3413 | 21845 | -| 76 | -21846 | 0 | 5461 | 21845 | -| 76 | -21846 | 0 | 7509 | 21845 | -| 76 | -21846 | 0 | 9557 | 21845 | -| 76 | -21846 | 0 | 11605 | 21845 | -| 76 | -21846 | 0 | 13653 | -21846 | -| 76 | -21846 | 0 | 15701 | 21845 | -| 76+ | 21845 | 1 | 13653 | -21846 | -| 77 | 21845 | 1 | 13653 | 21845 | -| 77+ | -21846 | 1 | 15701 | 21845 | -| 78 | -21846 | 1 | 15701 | -21846 | -| 78+ | -21846 | 0 | 1365 | 21845 | -| 79 | -21846 | 0 | 1365 | 21845 | -| 79 | -21846 | 0 | 3413 | 21845 | -| 79 | -21846 | 0 | 5461 | 21845 | -| 79 | -21846 | 0 | 7509 | 21845 | -| 79 | -21846 | 0 | 9557 | 21845 | -| 79 | -21846 | 0 | 11605 | 21845 | -| 79 | -21846 | 0 | 13653 | 21845 | -| 79 | -21846 | 0 | 15701 | -21846 | -| 79+ | 21845 | 1 | 15701 | -21846 | -| 80 | 21845 | 1 | 15701 | 21845 | -| 80+ | 21845 | 0 | 1365 | 21845 | -| 81 | 21845 | 0 | 1365 | 21845 | -| 81 | 21845 | 0 | 3413 | 21845 | -| 81 | 21845 | 0 | 5461 | 21845 | -| 81 | 21845 | 0 | 7509 | 21845 | -| 81 | 21845 | 0 | 9557 | 21845 | -| 81 | 21845 | 0 | 11605 | 21845 | -| 81 | 21845 | 0 | 13653 | 21845 | -| 81 | 21845 | 0 | 15701 | 21845 | diff --git a/projects/03/b/RAM16K.hdl b/projects/03/b/RAM16K.hdl deleted file mode 100644 index 9c6e89f..0000000 --- a/projects/03/b/RAM16K.hdl +++ /dev/null @@ -1,25 +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/03/b/RAM16K.hdl - -/** - * Memory of 16K registers, each 16 bit-wide. Out holds the value - * stored at the memory location specified by address. If load==1, then - * the in value is loaded into the memory location specified by address - * (the loaded value will be emitted to out from the next time step onward). - */ - -CHIP RAM16K { - IN in[16], load, address[14]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux4Way (in=load, sel=address[0..1], a=load0, b=load1, c=load2, d=load3); - RAM4K (in=in, load=load0, address=address[2..13], out=out0); - RAM4K (in=in, load=load1, address=address[2..13], out=out1); - RAM4K (in=in, load=load2, address=address[2..13], out=out2); - RAM4K (in=in, load=load3, address=address[2..13], out=out3); - Mux4Way16 (a=out0, b=out1, c=out2, d=out3, sel=address[0..1], out=out); -} diff --git a/projects/03/b/RAM16K.out b/projects/03/b/RAM16K.out deleted file mode 100644 index 2caabe9..0000000 --- a/projects/03/b/RAM16K.out +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load | address | out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 4321 | 0 | 0 | 0 | -| 3 | 4321 | 0 | 0 | 0 | -| 3+ | 4321 | 1 | 4321 | 0 | -| 4 | 4321 | 1 | 4321 | 4321 | -| 4+ | 4321 | 0 | 0 | 0 | -| 5 | 4321 | 0 | 0 | 0 | -| 5+ | 12345 | 0 | 12345 | 0 | -| 6 | 12345 | 0 | 12345 | 0 | -| 6+ | 12345 | 1 | 12345 | 0 | -| 7 | 12345 | 1 | 12345 | 12345 | -| 7+ | 12345 | 0 | 12345 | 12345 | -| 8 | 12345 | 0 | 12345 | 12345 | -| 8 | 12345 | 0 | 4321 | 4321 | -| 8+ | 16383 | 0 | 4321 | 4321 | -| 9 | 16383 | 0 | 4321 | 4321 | -| 9+ | 16383 | 1 | 16383 | 0 | -| 10 | 16383 | 1 | 16383 | 16383 | -| 10+ | 16383 | 0 | 16383 | 16383 | -| 11 | 16383 | 0 | 16383 | 16383 | -| 11 | 16383 | 0 | 12345 | 12345 | -| 11 | 16383 | 0 | 16383 | 16383 | -| 11+ | 16383 | 0 | 10920 | 0 | -| 12 | 16383 | 0 | 10920 | 0 | -| 12 | 16383 | 0 | 10921 | 0 | -| 12 | 16383 | 0 | 10922 | 0 | -| 12 | 16383 | 0 | 10923 | 0 | -| 12 | 16383 | 0 | 10924 | 0 | -| 12 | 16383 | 0 | 10925 | 0 | -| 12 | 16383 | 0 | 10926 | 0 | -| 12 | 16383 | 0 | 10927 | 0 | -| 12+ | 21845 | 1 | 10920 | 0 | -| 13 | 21845 | 1 | 10920 | 21845 | -| 13+ | 21845 | 1 | 10921 | 0 | -| 14 | 21845 | 1 | 10921 | 21845 | -| 14+ | 21845 | 1 | 10922 | 0 | -| 15 | 21845 | 1 | 10922 | 21845 | -| 15+ | 21845 | 1 | 10923 | 0 | -| 16 | 21845 | 1 | 10923 | 21845 | -| 16+ | 21845 | 1 | 10924 | 0 | -| 17 | 21845 | 1 | 10924 | 21845 | -| 17+ | 21845 | 1 | 10925 | 0 | -| 18 | 21845 | 1 | 10925 | 21845 | -| 18+ | 21845 | 1 | 10926 | 0 | -| 19 | 21845 | 1 | 10926 | 21845 | -| 19+ | 21845 | 1 | 10927 | 0 | -| 20 | 21845 | 1 | 10927 | 21845 | -| 20+ | 21845 | 0 | 10920 | 21845 | -| 21 | 21845 | 0 | 10920 | 21845 | -| 21 | 21845 | 0 | 10921 | 21845 | -| 21 | 21845 | 0 | 10922 | 21845 | -| 21 | 21845 | 0 | 10923 | 21845 | -| 21 | 21845 | 0 | 10924 | 21845 | -| 21 | 21845 | 0 | 10925 | 21845 | -| 21 | 21845 | 0 | 10926 | 21845 | -| 21 | 21845 | 0 | 10927 | 21845 | -| 21+ | -21846 | 1 | 10920 | 21845 | -| 22 | -21846 | 1 | 10920 | -21846 | -| 22+ | -21846 | 0 | 10920 | -21846 | -| 23 | -21846 | 0 | 10920 | -21846 | -| 23 | -21846 | 0 | 10921 | 21845 | -| 23 | -21846 | 0 | 10922 | 21845 | -| 23 | -21846 | 0 | 10923 | 21845 | -| 23 | -21846 | 0 | 10924 | 21845 | -| 23 | -21846 | 0 | 10925 | 21845 | -| 23 | -21846 | 0 | 10926 | 21845 | -| 23 | -21846 | 0 | 10927 | 21845 | -| 23+ | 21845 | 1 | 10920 | -21846 | -| 24 | 21845 | 1 | 10920 | 21845 | -| 24+ | -21846 | 1 | 10921 | 21845 | -| 25 | -21846 | 1 | 10921 | -21846 | -| 25+ | -21846 | 0 | 10920 | 21845 | -| 26 | -21846 | 0 | 10920 | 21845 | -| 26 | -21846 | 0 | 10921 | -21846 | -| 26 | -21846 | 0 | 10922 | 21845 | -| 26 | -21846 | 0 | 10923 | 21845 | -| 26 | -21846 | 0 | 10924 | 21845 | -| 26 | -21846 | 0 | 10925 | 21845 | -| 26 | -21846 | 0 | 10926 | 21845 | -| 26 | -21846 | 0 | 10927 | 21845 | -| 26+ | 21845 | 1 | 10921 | -21846 | -| 27 | 21845 | 1 | 10921 | 21845 | -| 27+ | -21846 | 1 | 10922 | 21845 | -| 28 | -21846 | 1 | 10922 | -21846 | -| 28+ | -21846 | 0 | 10920 | 21845 | -| 29 | -21846 | 0 | 10920 | 21845 | -| 29 | -21846 | 0 | 10921 | 21845 | -| 29 | -21846 | 0 | 10922 | -21846 | -| 29 | -21846 | 0 | 10923 | 21845 | -| 29 | -21846 | 0 | 10924 | 21845 | -| 29 | -21846 | 0 | 10925 | 21845 | -| 29 | -21846 | 0 | 10926 | 21845 | -| 29 | -21846 | 0 | 10927 | 21845 | -| 29+ | 21845 | 1 | 10922 | -21846 | -| 30 | 21845 | 1 | 10922 | 21845 | -| 30+ | -21846 | 1 | 10923 | 21845 | -| 31 | -21846 | 1 | 10923 | -21846 | -| 31+ | -21846 | 0 | 10920 | 21845 | -| 32 | -21846 | 0 | 10920 | 21845 | -| 32 | -21846 | 0 | 10921 | 21845 | -| 32 | -21846 | 0 | 10922 | 21845 | -| 32 | -21846 | 0 | 10923 | -21846 | -| 32 | -21846 | 0 | 10924 | 21845 | -| 32 | -21846 | 0 | 10925 | 21845 | -| 32 | -21846 | 0 | 10926 | 21845 | -| 32 | -21846 | 0 | 10927 | 21845 | -| 32+ | 21845 | 1 | 10923 | -21846 | -| 33 | 21845 | 1 | 10923 | 21845 | -| 33+ | -21846 | 1 | 10924 | 21845 | -| 34 | -21846 | 1 | 10924 | -21846 | -| 34+ | -21846 | 0 | 10920 | 21845 | -| 35 | -21846 | 0 | 10920 | 21845 | -| 35 | -21846 | 0 | 10921 | 21845 | -| 35 | -21846 | 0 | 10922 | 21845 | -| 35 | -21846 | 0 | 10923 | 21845 | -| 35 | -21846 | 0 | 10924 | -21846 | -| 35 | -21846 | 0 | 10925 | 21845 | -| 35 | -21846 | 0 | 10926 | 21845 | -| 35 | -21846 | 0 | 10927 | 21845 | -| 35+ | 21845 | 1 | 10924 | -21846 | -| 36 | 21845 | 1 | 10924 | 21845 | -| 36+ | -21846 | 1 | 10925 | 21845 | -| 37 | -21846 | 1 | 10925 | -21846 | -| 37+ | -21846 | 0 | 10920 | 21845 | -| 38 | -21846 | 0 | 10920 | 21845 | -| 38 | -21846 | 0 | 10921 | 21845 | -| 38 | -21846 | 0 | 10922 | 21845 | -| 38 | -21846 | 0 | 10923 | 21845 | -| 38 | -21846 | 0 | 10924 | 21845 | -| 38 | -21846 | 0 | 10925 | -21846 | -| 38 | -21846 | 0 | 10926 | 21845 | -| 38 | -21846 | 0 | 10927 | 21845 | -| 38+ | 21845 | 1 | 10925 | -21846 | -| 39 | 21845 | 1 | 10925 | 21845 | -| 39+ | -21846 | 1 | 10926 | 21845 | -| 40 | -21846 | 1 | 10926 | -21846 | -| 40+ | -21846 | 0 | 10920 | 21845 | -| 41 | -21846 | 0 | 10920 | 21845 | -| 41 | -21846 | 0 | 10921 | 21845 | -| 41 | -21846 | 0 | 10922 | 21845 | -| 41 | -21846 | 0 | 10923 | 21845 | -| 41 | -21846 | 0 | 10924 | 21845 | -| 41 | -21846 | 0 | 10925 | 21845 | -| 41 | -21846 | 0 | 10926 | -21846 | -| 41 | -21846 | 0 | 10927 | 21845 | -| 41+ | 21845 | 1 | 10926 | -21846 | -| 42 | 21845 | 1 | 10926 | 21845 | -| 42+ | -21846 | 1 | 10927 | 21845 | -| 43 | -21846 | 1 | 10927 | -21846 | -| 43+ | -21846 | 0 | 10920 | 21845 | -| 44 | -21846 | 0 | 10920 | 21845 | -| 44 | -21846 | 0 | 10921 | 21845 | -| 44 | -21846 | 0 | 10922 | 21845 | -| 44 | -21846 | 0 | 10923 | 21845 | -| 44 | -21846 | 0 | 10924 | 21845 | -| 44 | -21846 | 0 | 10925 | 21845 | -| 44 | -21846 | 0 | 10926 | 21845 | -| 44 | -21846 | 0 | 10927 | -21846 | -| 44+ | 21845 | 1 | 10927 | -21846 | -| 45 | 21845 | 1 | 10927 | 21845 | -| 45+ | 21845 | 0 | 10920 | 21845 | -| 46 | 21845 | 0 | 10920 | 21845 | -| 46 | 21845 | 0 | 10921 | 21845 | -| 46 | 21845 | 0 | 10922 | 21845 | -| 46 | 21845 | 0 | 10923 | 21845 | -| 46 | 21845 | 0 | 10924 | 21845 | -| 46 | 21845 | 0 | 10925 | 21845 | -| 46 | 21845 | 0 | 10926 | 21845 | -| 46 | 21845 | 0 | 10927 | 21845 | -| 46+ | 21845 | 0 | 1365 | 0 | -| 47 | 21845 | 0 | 1365 | 0 | -| 47 | 21845 | 0 | 3413 | 0 | -| 47 | 21845 | 0 | 5461 | 0 | -| 47 | 21845 | 0 | 7509 | 0 | -| 47 | 21845 | 0 | 9557 | 0 | -| 47 | 21845 | 0 | 11605 | 0 | -| 47 | 21845 | 0 | 13653 | 0 | -| 47 | 21845 | 0 | 15701 | 0 | -| 47+ | 21845 | 1 | 1365 | 0 | -| 48 | 21845 | 1 | 1365 | 21845 | -| 48+ | 21845 | 1 | 3413 | 0 | -| 49 | 21845 | 1 | 3413 | 21845 | -| 49+ | 21845 | 1 | 5461 | 0 | -| 50 | 21845 | 1 | 5461 | 21845 | -| 50+ | 21845 | 1 | 7509 | 0 | -| 51 | 21845 | 1 | 7509 | 21845 | -| 51+ | 21845 | 1 | 9557 | 0 | -| 52 | 21845 | 1 | 9557 | 21845 | -| 52+ | 21845 | 1 | 11605 | 0 | -| 53 | 21845 | 1 | 11605 | 21845 | -| 53+ | 21845 | 1 | 13653 | 0 | -| 54 | 21845 | 1 | 13653 | 21845 | -| 54+ | 21845 | 1 | 15701 | 0 | -| 55 | 21845 | 1 | 15701 | 21845 | -| 55+ | 21845 | 0 | 1365 | 21845 | -| 56 | 21845 | 0 | 1365 | 21845 | -| 56 | 21845 | 0 | 3413 | 21845 | -| 56 | 21845 | 0 | 5461 | 21845 | -| 56 | 21845 | 0 | 7509 | 21845 | -| 56 | 21845 | 0 | 9557 | 21845 | -| 56 | 21845 | 0 | 11605 | 21845 | -| 56 | 21845 | 0 | 13653 | 21845 | -| 56 | 21845 | 0 | 15701 | 21845 | -| 56+ | -21846 | 1 | 1365 | 21845 | -| 57 | -21846 | 1 | 1365 | -21846 | -| 57+ | -21846 | 0 | 1365 | -21846 | -| 58 | -21846 | 0 | 1365 | -21846 | -| 58 | -21846 | 0 | 3413 | 21845 | -| 58 | -21846 | 0 | 5461 | 21845 | -| 58 | -21846 | 0 | 7509 | 21845 | -| 58 | -21846 | 0 | 9557 | 21845 | -| 58 | -21846 | 0 | 11605 | 21845 | -| 58 | -21846 | 0 | 13653 | 21845 | -| 58 | -21846 | 0 | 15701 | 21845 | -| 58+ | 21845 | 1 | 1365 | -21846 | -| 59 | 21845 | 1 | 1365 | 21845 | -| 59+ | -21846 | 1 | 3413 | 21845 | -| 60 | -21846 | 1 | 3413 | -21846 | -| 60+ | -21846 | 0 | 1365 | 21845 | -| 61 | -21846 | 0 | 1365 | 21845 | -| 61 | -21846 | 0 | 3413 | -21846 | -| 61 | -21846 | 0 | 5461 | 21845 | -| 61 | -21846 | 0 | 7509 | 21845 | -| 61 | -21846 | 0 | 9557 | 21845 | -| 61 | -21846 | 0 | 11605 | 21845 | -| 61 | -21846 | 0 | 13653 | 21845 | -| 61 | -21846 | 0 | 15701 | 21845 | -| 61+ | 21845 | 1 | 3413 | -21846 | -| 62 | 21845 | 1 | 3413 | 21845 | -| 62+ | -21846 | 1 | 5461 | 21845 | -| 63 | -21846 | 1 | 5461 | -21846 | -| 63+ | -21846 | 0 | 1365 | 21845 | -| 64 | -21846 | 0 | 1365 | 21845 | -| 64 | -21846 | 0 | 3413 | 21845 | -| 64 | -21846 | 0 | 5461 | -21846 | -| 64 | -21846 | 0 | 7509 | 21845 | -| 64 | -21846 | 0 | 9557 | 21845 | -| 64 | -21846 | 0 | 11605 | 21845 | -| 64 | -21846 | 0 | 13653 | 21845 | -| 64 | -21846 | 0 | 15701 | 21845 | -| 64+ | 21845 | 1 | 5461 | -21846 | -| 65 | 21845 | 1 | 5461 | 21845 | -| 65+ | -21846 | 1 | 7509 | 21845 | -| 66 | -21846 | 1 | 7509 | -21846 | -| 66+ | -21846 | 0 | 1365 | 21845 | -| 67 | -21846 | 0 | 1365 | 21845 | -| 67 | -21846 | 0 | 3413 | 21845 | -| 67 | -21846 | 0 | 5461 | 21845 | -| 67 | -21846 | 0 | 7509 | -21846 | -| 67 | -21846 | 0 | 9557 | 21845 | -| 67 | -21846 | 0 | 11605 | 21845 | -| 67 | -21846 | 0 | 13653 | 21845 | -| 67 | -21846 | 0 | 15701 | 21845 | -| 67+ | 21845 | 1 | 7509 | -21846 | -| 68 | 21845 | 1 | 7509 | 21845 | -| 68+ | -21846 | 1 | 9557 | 21845 | -| 69 | -21846 | 1 | 9557 | -21846 | -| 69+ | -21846 | 0 | 1365 | 21845 | -| 70 | -21846 | 0 | 1365 | 21845 | -| 70 | -21846 | 0 | 3413 | 21845 | -| 70 | -21846 | 0 | 5461 | 21845 | -| 70 | -21846 | 0 | 7509 | 21845 | -| 70 | -21846 | 0 | 9557 | -21846 | -| 70 | -21846 | 0 | 11605 | 21845 | -| 70 | -21846 | 0 | 13653 | 21845 | -| 70 | -21846 | 0 | 15701 | 21845 | -| 70+ | 21845 | 1 | 9557 | -21846 | -| 71 | 21845 | 1 | 9557 | 21845 | -| 71+ | -21846 | 1 | 11605 | 21845 | -| 72 | -21846 | 1 | 11605 | -21846 | -| 72+ | -21846 | 0 | 1365 | 21845 | -| 73 | -21846 | 0 | 1365 | 21845 | -| 73 | -21846 | 0 | 3413 | 21845 | -| 73 | -21846 | 0 | 5461 | 21845 | -| 73 | -21846 | 0 | 7509 | 21845 | -| 73 | -21846 | 0 | 9557 | 21845 | -| 73 | -21846 | 0 | 11605 | -21846 | -| 73 | -21846 | 0 | 13653 | 21845 | -| 73 | -21846 | 0 | 15701 | 21845 | -| 73+ | 21845 | 1 | 11605 | -21846 | -| 74 | 21845 | 1 | 11605 | 21845 | -| 74+ | -21846 | 1 | 13653 | 21845 | -| 75 | -21846 | 1 | 13653 | -21846 | -| 75+ | -21846 | 0 | 1365 | 21845 | -| 76 | -21846 | 0 | 1365 | 21845 | -| 76 | -21846 | 0 | 3413 | 21845 | -| 76 | -21846 | 0 | 5461 | 21845 | -| 76 | -21846 | 0 | 7509 | 21845 | -| 76 | -21846 | 0 | 9557 | 21845 | -| 76 | -21846 | 0 | 11605 | 21845 | -| 76 | -21846 | 0 | 13653 | -21846 | -| 76 | -21846 | 0 | 15701 | 21845 | -| 76+ | 21845 | 1 | 13653 | -21846 | -| 77 | 21845 | 1 | 13653 | 21845 | -| 77+ | -21846 | 1 | 15701 | 21845 | -| 78 | -21846 | 1 | 15701 | -21846 | -| 78+ | -21846 | 0 | 1365 | 21845 | -| 79 | -21846 | 0 | 1365 | 21845 | -| 79 | -21846 | 0 | 3413 | 21845 | -| 79 | -21846 | 0 | 5461 | 21845 | -| 79 | -21846 | 0 | 7509 | 21845 | -| 79 | -21846 | 0 | 9557 | 21845 | -| 79 | -21846 | 0 | 11605 | 21845 | -| 79 | -21846 | 0 | 13653 | 21845 | -| 79 | -21846 | 0 | 15701 | -21846 | -| 79+ | 21845 | 1 | 15701 | -21846 | -| 80 | 21845 | 1 | 15701 | 21845 | -| 80+ | 21845 | 0 | 1365 | 21845 | -| 81 | 21845 | 0 | 1365 | 21845 | -| 81 | 21845 | 0 | 3413 | 21845 | -| 81 | 21845 | 0 | 5461 | 21845 | -| 81 | 21845 | 0 | 7509 | 21845 | -| 81 | 21845 | 0 | 9557 | 21845 | -| 81 | 21845 | 0 | 11605 | 21845 | -| 81 | 21845 | 0 | 13653 | 21845 | -| 81 | 21845 | 0 | 15701 | 21845 | diff --git a/projects/03/b/RAM16K.tst b/projects/03/b/RAM16K.tst deleted file mode 100644 index e556ad4..0000000 --- a/projects/03/b/RAM16K.tst +++ /dev/null @@ -1,1026 +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/03/b/RAM16K.tst - -load RAM16K.hdl, -output-file RAM16K.out, -compare-to RAM16K.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.5.2 out%D1.6.1; - -set in 0, -set load 0, -set address 0, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set in 4321, -set load 0, -tick, -output; -tock, -output; - -set load 1, -set address 4321, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; - -set in 12345, -set address 12345, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 4321, -eval, -output; - -set in 16383, -tick, -output; -tock, -output; - -set load 1, -set address 16383, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 12345, -eval, -output; - -set address 16383, -eval, -output; - - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -tick, -output, -tock, -output; -set address %B10101010101010, -tick, -output, -tock, -output; -set address %B10101010101011, -tick, -output, -tock, -output; -set address %B10101010101100, -tick, -output, -tock, -output; -set address %B10101010101101, -tick, -output, -tock, -output; -set address %B10101010101110, -tick, -output, -tock, -output; -set address %B10101010101111, -tick, -output, -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101000, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101000, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101001, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101001, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101011, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101011, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101100, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101100, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101110, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101110, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10101010101111, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - -set load 1, -set address %B10101010101111, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B10101010101000, -tick, -output; -tock, -output; -set address %B10101010101001, -eval, -output; -set address %B10101010101010, -eval, -output; -set address %B10101010101011, -eval, -output; -set address %B10101010101100, -eval, -output; -set address %B10101010101101, -eval, -output; -set address %B10101010101110, -eval, -output; -set address %B10101010101111, -eval, -output; - - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -tick, -output, -tock, -output; -set address %B01010101010101, -tick, -output, -tock, -output; -set address %B01110101010101, -tick, -output, -tock, -output; -set address %B10010101010101, -tick, -output, -tock, -output; -set address %B10110101010101, -tick, -output, -tock, -output; -set address %B11010101010101, -tick, -output, -tock, -output; -set address %B11110101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B00010101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B00010101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B00110101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B00110101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B01010101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B01010101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B01110101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B01110101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10010101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B10010101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B10110101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B10110101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B11010101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B11010101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B11110101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; - -set load 1, -set address %B11110101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B00010101010101, -tick, -output; -tock, -output; -set address %B00110101010101, -eval, -output; -set address %B01010101010101, -eval, -output; -set address %B01110101010101, -eval, -output; -set address %B10010101010101, -eval, -output; -set address %B10110101010101, -eval, -output; -set address %B11010101010101, -eval, -output; -set address %B11110101010101, -eval, -output; diff --git a/projects/03/b/RAM4K.cmp b/projects/03/b/RAM4K.cmp deleted file mode 100644 index a614796..0000000 --- a/projects/03/b/RAM4K.cmp +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load |address | out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 1111 | 0 | 0 | 0 | -| 3 | 1111 | 0 | 0 | 0 | -| 3+ | 1111 | 1 | 1111 | 0 | -| 4 | 1111 | 1 | 1111 | 1111 | -| 4+ | 1111 | 0 | 0 | 0 | -| 5 | 1111 | 0 | 0 | 0 | -| 5+ | 3513 | 0 | 3513 | 0 | -| 6 | 3513 | 0 | 3513 | 0 | -| 6+ | 3513 | 1 | 3513 | 0 | -| 7 | 3513 | 1 | 3513 | 3513 | -| 7+ | 3513 | 0 | 3513 | 3513 | -| 8 | 3513 | 0 | 3513 | 3513 | -| 8 | 3513 | 0 | 1111 | 1111 | -| 8+ | 4095 | 0 | 1111 | 1111 | -| 9 | 4095 | 0 | 1111 | 1111 | -| 9+ | 4095 | 1 | 4095 | 0 | -| 10 | 4095 | 1 | 4095 | 4095 | -| 10+ | 4095 | 0 | 4095 | 4095 | -| 11 | 4095 | 0 | 4095 | 4095 | -| 11 | 4095 | 0 | 3513 | 3513 | -| 11 | 4095 | 0 | 4095 | 4095 | -| 11+ | 4095 | 0 | 2728 | 0 | -| 12 | 4095 | 0 | 2728 | 0 | -| 12 | 4095 | 0 | 2729 | 0 | -| 12 | 4095 | 0 | 2730 | 0 | -| 12 | 4095 | 0 | 2731 | 0 | -| 12 | 4095 | 0 | 2732 | 0 | -| 12 | 4095 | 0 | 2733 | 0 | -| 12 | 4095 | 0 | 2734 | 0 | -| 12 | 4095 | 0 | 2735 | 0 | -| 12+ | 21845 | 1 | 2728 | 0 | -| 13 | 21845 | 1 | 2728 | 21845 | -| 13+ | 21845 | 1 | 2729 | 0 | -| 14 | 21845 | 1 | 2729 | 21845 | -| 14+ | 21845 | 1 | 2730 | 0 | -| 15 | 21845 | 1 | 2730 | 21845 | -| 15+ | 21845 | 1 | 2731 | 0 | -| 16 | 21845 | 1 | 2731 | 21845 | -| 16+ | 21845 | 1 | 2732 | 0 | -| 17 | 21845 | 1 | 2732 | 21845 | -| 17+ | 21845 | 1 | 2733 | 0 | -| 18 | 21845 | 1 | 2733 | 21845 | -| 18+ | 21845 | 1 | 2734 | 0 | -| 19 | 21845 | 1 | 2734 | 21845 | -| 19+ | 21845 | 1 | 2735 | 0 | -| 20 | 21845 | 1 | 2735 | 21845 | -| 20+ | 21845 | 0 | 2728 | 21845 | -| 21 | 21845 | 0 | 2728 | 21845 | -| 21 | 21845 | 0 | 2729 | 21845 | -| 21 | 21845 | 0 | 2730 | 21845 | -| 21 | 21845 | 0 | 2731 | 21845 | -| 21 | 21845 | 0 | 2732 | 21845 | -| 21 | 21845 | 0 | 2733 | 21845 | -| 21 | 21845 | 0 | 2734 | 21845 | -| 21 | 21845 | 0 | 2735 | 21845 | -| 21+ | -21846 | 1 | 2728 | 21845 | -| 22 | -21846 | 1 | 2728 | -21846 | -| 22+ | -21846 | 0 | 2728 | -21846 | -| 23 | -21846 | 0 | 2728 | -21846 | -| 23 | -21846 | 0 | 2729 | 21845 | -| 23 | -21846 | 0 | 2730 | 21845 | -| 23 | -21846 | 0 | 2731 | 21845 | -| 23 | -21846 | 0 | 2732 | 21845 | -| 23 | -21846 | 0 | 2733 | 21845 | -| 23 | -21846 | 0 | 2734 | 21845 | -| 23 | -21846 | 0 | 2735 | 21845 | -| 23+ | 21845 | 1 | 2728 | -21846 | -| 24 | 21845 | 1 | 2728 | 21845 | -| 24+ | -21846 | 1 | 2729 | 21845 | -| 25 | -21846 | 1 | 2729 | -21846 | -| 25+ | -21846 | 0 | 2728 | 21845 | -| 26 | -21846 | 0 | 2728 | 21845 | -| 26 | -21846 | 0 | 2729 | -21846 | -| 26 | -21846 | 0 | 2730 | 21845 | -| 26 | -21846 | 0 | 2731 | 21845 | -| 26 | -21846 | 0 | 2732 | 21845 | -| 26 | -21846 | 0 | 2733 | 21845 | -| 26 | -21846 | 0 | 2734 | 21845 | -| 26 | -21846 | 0 | 2735 | 21845 | -| 26+ | 21845 | 1 | 2729 | -21846 | -| 27 | 21845 | 1 | 2729 | 21845 | -| 27+ | -21846 | 1 | 2730 | 21845 | -| 28 | -21846 | 1 | 2730 | -21846 | -| 28+ | -21846 | 0 | 2728 | 21845 | -| 29 | -21846 | 0 | 2728 | 21845 | -| 29 | -21846 | 0 | 2729 | 21845 | -| 29 | -21846 | 0 | 2730 | -21846 | -| 29 | -21846 | 0 | 2731 | 21845 | -| 29 | -21846 | 0 | 2732 | 21845 | -| 29 | -21846 | 0 | 2733 | 21845 | -| 29 | -21846 | 0 | 2734 | 21845 | -| 29 | -21846 | 0 | 2735 | 21845 | -| 29+ | 21845 | 1 | 2730 | -21846 | -| 30 | 21845 | 1 | 2730 | 21845 | -| 30+ | -21846 | 1 | 2731 | 21845 | -| 31 | -21846 | 1 | 2731 | -21846 | -| 31+ | -21846 | 0 | 2728 | 21845 | -| 32 | -21846 | 0 | 2728 | 21845 | -| 32 | -21846 | 0 | 2729 | 21845 | -| 32 | -21846 | 0 | 2730 | 21845 | -| 32 | -21846 | 0 | 2731 | -21846 | -| 32 | -21846 | 0 | 2732 | 21845 | -| 32 | -21846 | 0 | 2733 | 21845 | -| 32 | -21846 | 0 | 2734 | 21845 | -| 32 | -21846 | 0 | 2735 | 21845 | -| 32+ | 21845 | 1 | 2731 | -21846 | -| 33 | 21845 | 1 | 2731 | 21845 | -| 33+ | -21846 | 1 | 2732 | 21845 | -| 34 | -21846 | 1 | 2732 | -21846 | -| 34+ | -21846 | 0 | 2728 | 21845 | -| 35 | -21846 | 0 | 2728 | 21845 | -| 35 | -21846 | 0 | 2729 | 21845 | -| 35 | -21846 | 0 | 2730 | 21845 | -| 35 | -21846 | 0 | 2731 | 21845 | -| 35 | -21846 | 0 | 2732 | -21846 | -| 35 | -21846 | 0 | 2733 | 21845 | -| 35 | -21846 | 0 | 2734 | 21845 | -| 35 | -21846 | 0 | 2735 | 21845 | -| 35+ | 21845 | 1 | 2732 | -21846 | -| 36 | 21845 | 1 | 2732 | 21845 | -| 36+ | -21846 | 1 | 2733 | 21845 | -| 37 | -21846 | 1 | 2733 | -21846 | -| 37+ | -21846 | 0 | 2728 | 21845 | -| 38 | -21846 | 0 | 2728 | 21845 | -| 38 | -21846 | 0 | 2729 | 21845 | -| 38 | -21846 | 0 | 2730 | 21845 | -| 38 | -21846 | 0 | 2731 | 21845 | -| 38 | -21846 | 0 | 2732 | 21845 | -| 38 | -21846 | 0 | 2733 | -21846 | -| 38 | -21846 | 0 | 2734 | 21845 | -| 38 | -21846 | 0 | 2735 | 21845 | -| 38+ | 21845 | 1 | 2733 | -21846 | -| 39 | 21845 | 1 | 2733 | 21845 | -| 39+ | -21846 | 1 | 2734 | 21845 | -| 40 | -21846 | 1 | 2734 | -21846 | -| 40+ | -21846 | 0 | 2728 | 21845 | -| 41 | -21846 | 0 | 2728 | 21845 | -| 41 | -21846 | 0 | 2729 | 21845 | -| 41 | -21846 | 0 | 2730 | 21845 | -| 41 | -21846 | 0 | 2731 | 21845 | -| 41 | -21846 | 0 | 2732 | 21845 | -| 41 | -21846 | 0 | 2733 | 21845 | -| 41 | -21846 | 0 | 2734 | -21846 | -| 41 | -21846 | 0 | 2735 | 21845 | -| 41+ | 21845 | 1 | 2734 | -21846 | -| 42 | 21845 | 1 | 2734 | 21845 | -| 42+ | -21846 | 1 | 2735 | 21845 | -| 43 | -21846 | 1 | 2735 | -21846 | -| 43+ | -21846 | 0 | 2728 | 21845 | -| 44 | -21846 | 0 | 2728 | 21845 | -| 44 | -21846 | 0 | 2729 | 21845 | -| 44 | -21846 | 0 | 2730 | 21845 | -| 44 | -21846 | 0 | 2731 | 21845 | -| 44 | -21846 | 0 | 2732 | 21845 | -| 44 | -21846 | 0 | 2733 | 21845 | -| 44 | -21846 | 0 | 2734 | 21845 | -| 44 | -21846 | 0 | 2735 | -21846 | -| 44+ | 21845 | 1 | 2735 | -21846 | -| 45 | 21845 | 1 | 2735 | 21845 | -| 45+ | 21845 | 0 | 2728 | 21845 | -| 46 | 21845 | 0 | 2728 | 21845 | -| 46 | 21845 | 0 | 2729 | 21845 | -| 46 | 21845 | 0 | 2730 | 21845 | -| 46 | 21845 | 0 | 2731 | 21845 | -| 46 | 21845 | 0 | 2732 | 21845 | -| 46 | 21845 | 0 | 2733 | 21845 | -| 46 | 21845 | 0 | 2734 | 21845 | -| 46 | 21845 | 0 | 2735 | 21845 | -| 46+ | 21845 | 0 | 341 | 0 | -| 47 | 21845 | 0 | 341 | 0 | -| 47 | 21845 | 0 | 853 | 0 | -| 47 | 21845 | 0 | 1365 | 0 | -| 47 | 21845 | 0 | 1877 | 0 | -| 47 | 21845 | 0 | 2389 | 0 | -| 47 | 21845 | 0 | 2901 | 0 | -| 47 | 21845 | 0 | 3413 | 0 | -| 47 | 21845 | 0 | 3925 | 0 | -| 47+ | 21845 | 1 | 341 | 0 | -| 48 | 21845 | 1 | 341 | 21845 | -| 48+ | 21845 | 1 | 853 | 0 | -| 49 | 21845 | 1 | 853 | 21845 | -| 49+ | 21845 | 1 | 1365 | 0 | -| 50 | 21845 | 1 | 1365 | 21845 | -| 50+ | 21845 | 1 | 1877 | 0 | -| 51 | 21845 | 1 | 1877 | 21845 | -| 51+ | 21845 | 1 | 2389 | 0 | -| 52 | 21845 | 1 | 2389 | 21845 | -| 52+ | 21845 | 1 | 2901 | 0 | -| 53 | 21845 | 1 | 2901 | 21845 | -| 53+ | 21845 | 1 | 3413 | 0 | -| 54 | 21845 | 1 | 3413 | 21845 | -| 54+ | 21845 | 1 | 3925 | 0 | -| 55 | 21845 | 1 | 3925 | 21845 | -| 55+ | 21845 | 0 | 341 | 21845 | -| 56 | 21845 | 0 | 341 | 21845 | -| 56 | 21845 | 0 | 853 | 21845 | -| 56 | 21845 | 0 | 1365 | 21845 | -| 56 | 21845 | 0 | 1877 | 21845 | -| 56 | 21845 | 0 | 2389 | 21845 | -| 56 | 21845 | 0 | 2901 | 21845 | -| 56 | 21845 | 0 | 3413 | 21845 | -| 56 | 21845 | 0 | 3925 | 21845 | -| 56+ | -21846 | 1 | 341 | 21845 | -| 57 | -21846 | 1 | 341 | -21846 | -| 57+ | -21846 | 0 | 341 | -21846 | -| 58 | -21846 | 0 | 341 | -21846 | -| 58 | -21846 | 0 | 853 | 21845 | -| 58 | -21846 | 0 | 1365 | 21845 | -| 58 | -21846 | 0 | 1877 | 21845 | -| 58 | -21846 | 0 | 2389 | 21845 | -| 58 | -21846 | 0 | 2901 | 21845 | -| 58 | -21846 | 0 | 3413 | 21845 | -| 58 | -21846 | 0 | 3925 | 21845 | -| 58+ | 21845 | 1 | 341 | -21846 | -| 59 | 21845 | 1 | 341 | 21845 | -| 59+ | -21846 | 1 | 853 | 21845 | -| 60 | -21846 | 1 | 853 | -21846 | -| 60+ | -21846 | 0 | 341 | 21845 | -| 61 | -21846 | 0 | 341 | 21845 | -| 61 | -21846 | 0 | 853 | -21846 | -| 61 | -21846 | 0 | 1365 | 21845 | -| 61 | -21846 | 0 | 1877 | 21845 | -| 61 | -21846 | 0 | 2389 | 21845 | -| 61 | -21846 | 0 | 2901 | 21845 | -| 61 | -21846 | 0 | 3413 | 21845 | -| 61 | -21846 | 0 | 3925 | 21845 | -| 61+ | 21845 | 1 | 853 | -21846 | -| 62 | 21845 | 1 | 853 | 21845 | -| 62+ | -21846 | 1 | 1365 | 21845 | -| 63 | -21846 | 1 | 1365 | -21846 | -| 63+ | -21846 | 0 | 341 | 21845 | -| 64 | -21846 | 0 | 341 | 21845 | -| 64 | -21846 | 0 | 853 | 21845 | -| 64 | -21846 | 0 | 1365 | -21846 | -| 64 | -21846 | 0 | 1877 | 21845 | -| 64 | -21846 | 0 | 2389 | 21845 | -| 64 | -21846 | 0 | 2901 | 21845 | -| 64 | -21846 | 0 | 3413 | 21845 | -| 64 | -21846 | 0 | 3925 | 21845 | -| 64+ | 21845 | 1 | 1365 | -21846 | -| 65 | 21845 | 1 | 1365 | 21845 | -| 65+ | -21846 | 1 | 1877 | 21845 | -| 66 | -21846 | 1 | 1877 | -21846 | -| 66+ | -21846 | 0 | 341 | 21845 | -| 67 | -21846 | 0 | 341 | 21845 | -| 67 | -21846 | 0 | 853 | 21845 | -| 67 | -21846 | 0 | 1365 | 21845 | -| 67 | -21846 | 0 | 1877 | -21846 | -| 67 | -21846 | 0 | 2389 | 21845 | -| 67 | -21846 | 0 | 2901 | 21845 | -| 67 | -21846 | 0 | 3413 | 21845 | -| 67 | -21846 | 0 | 3925 | 21845 | -| 67+ | 21845 | 1 | 1877 | -21846 | -| 68 | 21845 | 1 | 1877 | 21845 | -| 68+ | -21846 | 1 | 2389 | 21845 | -| 69 | -21846 | 1 | 2389 | -21846 | -| 69+ | -21846 | 0 | 341 | 21845 | -| 70 | -21846 | 0 | 341 | 21845 | -| 70 | -21846 | 0 | 853 | 21845 | -| 70 | -21846 | 0 | 1365 | 21845 | -| 70 | -21846 | 0 | 1877 | 21845 | -| 70 | -21846 | 0 | 2389 | -21846 | -| 70 | -21846 | 0 | 2901 | 21845 | -| 70 | -21846 | 0 | 3413 | 21845 | -| 70 | -21846 | 0 | 3925 | 21845 | -| 70+ | 21845 | 1 | 2389 | -21846 | -| 71 | 21845 | 1 | 2389 | 21845 | -| 71+ | -21846 | 1 | 2901 | 21845 | -| 72 | -21846 | 1 | 2901 | -21846 | -| 72+ | -21846 | 0 | 341 | 21845 | -| 73 | -21846 | 0 | 341 | 21845 | -| 73 | -21846 | 0 | 853 | 21845 | -| 73 | -21846 | 0 | 1365 | 21845 | -| 73 | -21846 | 0 | 1877 | 21845 | -| 73 | -21846 | 0 | 2389 | 21845 | -| 73 | -21846 | 0 | 2901 | -21846 | -| 73 | -21846 | 0 | 3413 | 21845 | -| 73 | -21846 | 0 | 3925 | 21845 | -| 73+ | 21845 | 1 | 2901 | -21846 | -| 74 | 21845 | 1 | 2901 | 21845 | -| 74+ | -21846 | 1 | 3413 | 21845 | -| 75 | -21846 | 1 | 3413 | -21846 | -| 75+ | -21846 | 0 | 341 | 21845 | -| 76 | -21846 | 0 | 341 | 21845 | -| 76 | -21846 | 0 | 853 | 21845 | -| 76 | -21846 | 0 | 1365 | 21845 | -| 76 | -21846 | 0 | 1877 | 21845 | -| 76 | -21846 | 0 | 2389 | 21845 | -| 76 | -21846 | 0 | 2901 | 21845 | -| 76 | -21846 | 0 | 3413 | -21846 | -| 76 | -21846 | 0 | 3925 | 21845 | -| 76+ | 21845 | 1 | 3413 | -21846 | -| 77 | 21845 | 1 | 3413 | 21845 | -| 77+ | -21846 | 1 | 3925 | 21845 | -| 78 | -21846 | 1 | 3925 | -21846 | -| 78+ | -21846 | 0 | 341 | 21845 | -| 79 | -21846 | 0 | 341 | 21845 | -| 79 | -21846 | 0 | 853 | 21845 | -| 79 | -21846 | 0 | 1365 | 21845 | -| 79 | -21846 | 0 | 1877 | 21845 | -| 79 | -21846 | 0 | 2389 | 21845 | -| 79 | -21846 | 0 | 2901 | 21845 | -| 79 | -21846 | 0 | 3413 | 21845 | -| 79 | -21846 | 0 | 3925 | -21846 | -| 79+ | 21845 | 1 | 3925 | -21846 | -| 80 | 21845 | 1 | 3925 | 21845 | -| 80+ | 21845 | 0 | 341 | 21845 | -| 81 | 21845 | 0 | 341 | 21845 | -| 81 | 21845 | 0 | 853 | 21845 | -| 81 | 21845 | 0 | 1365 | 21845 | -| 81 | 21845 | 0 | 1877 | 21845 | -| 81 | 21845 | 0 | 2389 | 21845 | -| 81 | 21845 | 0 | 2901 | 21845 | -| 81 | 21845 | 0 | 3413 | 21845 | -| 81 | 21845 | 0 | 3925 | 21845 | diff --git a/projects/03/b/RAM4K.hdl b/projects/03/b/RAM4K.hdl deleted file mode 100644 index cfc2e4f..0000000 --- a/projects/03/b/RAM4K.hdl +++ /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/03/b/RAM4K.hdl - -/** - * Memory of 4K registers, each 16 bit-wide. Out holds the value - * stored at the memory location specified by address. If load==1, then - * the in value is loaded into the memory location specified by address - * (the loaded value will be emitted to out from the next time step onward). - */ - -CHIP RAM4K { - IN in[16], load, address[12]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux8Way (in=load, sel=address[0..2], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); - RAM512 (in=in, load=load0, address=address[3..11], out=out0); - RAM512 (in=in, load=load1, address=address[3..11], out=out1); - RAM512 (in=in, load=load2, address=address[3..11], out=out2); - RAM512 (in=in, load=load3, address=address[3..11], out=out3); - RAM512 (in=in, load=load4, address=address[3..11], out=out4); - RAM512 (in=in, load=load5, address=address[3..11], out=out5); - RAM512 (in=in, load=load6, address=address[3..11], out=out6); - RAM512 (in=in, load=load7, address=address[3..11], out=out7); - Mux8Way16 (a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[0..2], out=out); -} diff --git a/projects/03/b/RAM4K.tst b/projects/03/b/RAM4K.tst deleted file mode 100644 index 7a5aa12..0000000 --- a/projects/03/b/RAM4K.tst +++ /dev/null @@ -1,1026 +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/03/b/RAM4K.tst - -load RAM4K.hdl, -output-file RAM4K.out, -compare-to RAM4K.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.4.2 out%D1.6.1; - -set in 0, -set load 0, -set address 0, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set in 1111, -set load 0, -tick, -output; -tock, -output; - -set load 1, -set address 1111, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; - -set in 3513, -set address 3513, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 1111, -eval, -output; - -set in 4095, -tick, -output; -tock, -output; - -set load 1, -set address 4095, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 3513, -eval, -output; - -set address 4095, -eval, -output; - - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -tick, -output, -tock, -output; -set address %B101010101010, -tick, -output, -tock, -output; -set address %B101010101011, -tick, -output, -tock, -output; -set address %B101010101100, -tick, -output, -tock, -output; -set address %B101010101101, -tick, -output, -tock, -output; -set address %B101010101110, -tick, -output, -tock, -output; -set address %B101010101111, -tick, -output, -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101000, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101000, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101001, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101001, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101011, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101011, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101100, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101100, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101110, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101110, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101010101111, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - -set load 1, -set address %B101010101111, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B101010101000, -tick, -output; -tock, -output; -set address %B101010101001, -eval, -output; -set address %B101010101010, -eval, -output; -set address %B101010101011, -eval, -output; -set address %B101010101100, -eval, -output; -set address %B101010101101, -eval, -output; -set address %B101010101110, -eval, -output; -set address %B101010101111, -eval, -output; - - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -tick, -output, -tock, -output; -set address %B010101010101, -tick, -output, -tock, -output; -set address %B011101010101, -tick, -output, -tock, -output; -set address %B100101010101, -tick, -output, -tock, -output; -set address %B101101010101, -tick, -output, -tock, -output; -set address %B110101010101, -tick, -output, -tock, -output; -set address %B111101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B000101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B000101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B001101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B001101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B010101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B011101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B011101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B100101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B100101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B101101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B110101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B110101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B111101010101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; - -set load 1, -set address %B111101010101, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B000101010101, -tick, -output; -tock, -output; -set address %B001101010101, -eval, -output; -set address %B010101010101, -eval, -output; -set address %B011101010101, -eval, -output; -set address %B100101010101, -eval, -output; -set address %B101101010101, -eval, -output; -set address %B110101010101, -eval, -output; -set address %B111101010101, -eval, -output; diff --git a/projects/03/b/RAM512.cmp b/projects/03/b/RAM512.cmp deleted file mode 100644 index 6f756ca..0000000 --- a/projects/03/b/RAM512.cmp +++ /dev/null @@ -1,320 +0,0 @@ -| time | in |load |address| out | -| 0+ | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 1+ | 0 | 1 | 0 | 0 | -| 2 | 0 | 1 | 0 | 0 | -| 2+ | 13099 | 0 | 0 | 0 | -| 3 | 13099 | 0 | 0 | 0 | -| 3+ | 13099 | 1 | 130 | 0 | -| 4 | 13099 | 1 | 130 | 13099 | -| 4+ | 13099 | 0 | 0 | 0 | -| 5 | 13099 | 0 | 0 | 0 | -| 5+ | 4729 | 0 | 472 | 0 | -| 6 | 4729 | 0 | 472 | 0 | -| 6+ | 4729 | 1 | 472 | 0 | -| 7 | 4729 | 1 | 472 | 4729 | -| 7+ | 4729 | 0 | 472 | 4729 | -| 8 | 4729 | 0 | 472 | 4729 | -| 8 | 4729 | 0 | 130 | 13099 | -| 8+ | 5119 | 0 | 130 | 13099 | -| 9 | 5119 | 0 | 130 | 13099 | -| 9+ | 5119 | 1 | 511 | 0 | -| 10 | 5119 | 1 | 511 | 5119 | -| 10+ | 5119 | 0 | 511 | 5119 | -| 11 | 5119 | 0 | 511 | 5119 | -| 11 | 5119 | 0 | 472 | 4729 | -| 11 | 5119 | 0 | 511 | 5119 | -| 11+ | 5119 | 0 | 168 | 0 | -| 12 | 5119 | 0 | 168 | 0 | -| 12 | 5119 | 0 | 169 | 0 | -| 12 | 5119 | 0 | 170 | 0 | -| 12 | 5119 | 0 | 171 | 0 | -| 12 | 5119 | 0 | 172 | 0 | -| 12 | 5119 | 0 | 173 | 0 | -| 12 | 5119 | 0 | 174 | 0 | -| 12 | 5119 | 0 | 175 | 0 | -| 12+ | 21845 | 1 | 168 | 0 | -| 13 | 21845 | 1 | 168 | 21845 | -| 13+ | 21845 | 1 | 169 | 0 | -| 14 | 21845 | 1 | 169 | 21845 | -| 14+ | 21845 | 1 | 170 | 0 | -| 15 | 21845 | 1 | 170 | 21845 | -| 15+ | 21845 | 1 | 171 | 0 | -| 16 | 21845 | 1 | 171 | 21845 | -| 16+ | 21845 | 1 | 172 | 0 | -| 17 | 21845 | 1 | 172 | 21845 | -| 17+ | 21845 | 1 | 173 | 0 | -| 18 | 21845 | 1 | 173 | 21845 | -| 18+ | 21845 | 1 | 174 | 0 | -| 19 | 21845 | 1 | 174 | 21845 | -| 19+ | 21845 | 1 | 175 | 0 | -| 20 | 21845 | 1 | 175 | 21845 | -| 20+ | 21845 | 0 | 168 | 21845 | -| 21 | 21845 | 0 | 168 | 21845 | -| 21 | 21845 | 0 | 169 | 21845 | -| 21 | 21845 | 0 | 170 | 21845 | -| 21 | 21845 | 0 | 171 | 21845 | -| 21 | 21845 | 0 | 172 | 21845 | -| 21 | 21845 | 0 | 173 | 21845 | -| 21 | 21845 | 0 | 174 | 21845 | -| 21 | 21845 | 0 | 175 | 21845 | -| 21+ | -21846 | 1 | 168 | 21845 | -| 22 | -21846 | 1 | 168 | -21846 | -| 22+ | -21846 | 0 | 168 | -21846 | -| 23 | -21846 | 0 | 168 | -21846 | -| 23 | -21846 | 0 | 169 | 21845 | -| 23 | -21846 | 0 | 170 | 21845 | -| 23 | -21846 | 0 | 171 | 21845 | -| 23 | -21846 | 0 | 172 | 21845 | -| 23 | -21846 | 0 | 173 | 21845 | -| 23 | -21846 | 0 | 174 | 21845 | -| 23 | -21846 | 0 | 175 | 21845 | -| 23+ | 21845 | 1 | 168 | -21846 | -| 24 | 21845 | 1 | 168 | 21845 | -| 24+ | -21846 | 1 | 169 | 21845 | -| 25 | -21846 | 1 | 169 | -21846 | -| 25+ | -21846 | 0 | 168 | 21845 | -| 26 | -21846 | 0 | 168 | 21845 | -| 26 | -21846 | 0 | 169 | -21846 | -| 26 | -21846 | 0 | 170 | 21845 | -| 26 | -21846 | 0 | 171 | 21845 | -| 26 | -21846 | 0 | 172 | 21845 | -| 26 | -21846 | 0 | 173 | 21845 | -| 26 | -21846 | 0 | 174 | 21845 | -| 26 | -21846 | 0 | 175 | 21845 | -| 26+ | 21845 | 1 | 169 | -21846 | -| 27 | 21845 | 1 | 169 | 21845 | -| 27+ | -21846 | 1 | 170 | 21845 | -| 28 | -21846 | 1 | 170 | -21846 | -| 28+ | -21846 | 0 | 168 | 21845 | -| 29 | -21846 | 0 | 168 | 21845 | -| 29 | -21846 | 0 | 169 | 21845 | -| 29 | -21846 | 0 | 170 | -21846 | -| 29 | -21846 | 0 | 171 | 21845 | -| 29 | -21846 | 0 | 172 | 21845 | -| 29 | -21846 | 0 | 173 | 21845 | -| 29 | -21846 | 0 | 174 | 21845 | -| 29 | -21846 | 0 | 175 | 21845 | -| 29+ | 21845 | 1 | 170 | -21846 | -| 30 | 21845 | 1 | 170 | 21845 | -| 30+ | -21846 | 1 | 171 | 21845 | -| 31 | -21846 | 1 | 171 | -21846 | -| 31+ | -21846 | 0 | 168 | 21845 | -| 32 | -21846 | 0 | 168 | 21845 | -| 32 | -21846 | 0 | 169 | 21845 | -| 32 | -21846 | 0 | 170 | 21845 | -| 32 | -21846 | 0 | 171 | -21846 | -| 32 | -21846 | 0 | 172 | 21845 | -| 32 | -21846 | 0 | 173 | 21845 | -| 32 | -21846 | 0 | 174 | 21845 | -| 32 | -21846 | 0 | 175 | 21845 | -| 32+ | 21845 | 1 | 171 | -21846 | -| 33 | 21845 | 1 | 171 | 21845 | -| 33+ | -21846 | 1 | 172 | 21845 | -| 34 | -21846 | 1 | 172 | -21846 | -| 34+ | -21846 | 0 | 168 | 21845 | -| 35 | -21846 | 0 | 168 | 21845 | -| 35 | -21846 | 0 | 169 | 21845 | -| 35 | -21846 | 0 | 170 | 21845 | -| 35 | -21846 | 0 | 171 | 21845 | -| 35 | -21846 | 0 | 172 | -21846 | -| 35 | -21846 | 0 | 173 | 21845 | -| 35 | -21846 | 0 | 174 | 21845 | -| 35 | -21846 | 0 | 175 | 21845 | -| 35+ | 21845 | 1 | 172 | -21846 | -| 36 | 21845 | 1 | 172 | 21845 | -| 36+ | -21846 | 1 | 173 | 21845 | -| 37 | -21846 | 1 | 173 | -21846 | -| 37+ | -21846 | 0 | 168 | 21845 | -| 38 | -21846 | 0 | 168 | 21845 | -| 38 | -21846 | 0 | 169 | 21845 | -| 38 | -21846 | 0 | 170 | 21845 | -| 38 | -21846 | 0 | 171 | 21845 | -| 38 | -21846 | 0 | 172 | 21845 | -| 38 | -21846 | 0 | 173 | -21846 | -| 38 | -21846 | 0 | 174 | 21845 | -| 38 | -21846 | 0 | 175 | 21845 | -| 38+ | 21845 | 1 | 173 | -21846 | -| 39 | 21845 | 1 | 173 | 21845 | -| 39+ | -21846 | 1 | 174 | 21845 | -| 40 | -21846 | 1 | 174 | -21846 | -| 40+ | -21846 | 0 | 168 | 21845 | -| 41 | -21846 | 0 | 168 | 21845 | -| 41 | -21846 | 0 | 169 | 21845 | -| 41 | -21846 | 0 | 170 | 21845 | -| 41 | -21846 | 0 | 171 | 21845 | -| 41 | -21846 | 0 | 172 | 21845 | -| 41 | -21846 | 0 | 173 | 21845 | -| 41 | -21846 | 0 | 174 | -21846 | -| 41 | -21846 | 0 | 175 | 21845 | -| 41+ | 21845 | 1 | 174 | -21846 | -| 42 | 21845 | 1 | 174 | 21845 | -| 42+ | -21846 | 1 | 175 | 21845 | -| 43 | -21846 | 1 | 175 | -21846 | -| 43+ | -21846 | 0 | 168 | 21845 | -| 44 | -21846 | 0 | 168 | 21845 | -| 44 | -21846 | 0 | 169 | 21845 | -| 44 | -21846 | 0 | 170 | 21845 | -| 44 | -21846 | 0 | 171 | 21845 | -| 44 | -21846 | 0 | 172 | 21845 | -| 44 | -21846 | 0 | 173 | 21845 | -| 44 | -21846 | 0 | 174 | 21845 | -| 44 | -21846 | 0 | 175 | -21846 | -| 44+ | 21845 | 1 | 175 | -21846 | -| 45 | 21845 | 1 | 175 | 21845 | -| 45+ | 21845 | 0 | 168 | 21845 | -| 46 | 21845 | 0 | 168 | 21845 | -| 46 | 21845 | 0 | 169 | 21845 | -| 46 | 21845 | 0 | 170 | 21845 | -| 46 | 21845 | 0 | 171 | 21845 | -| 46 | 21845 | 0 | 172 | 21845 | -| 46 | 21845 | 0 | 173 | 21845 | -| 46 | 21845 | 0 | 174 | 21845 | -| 46 | 21845 | 0 | 175 | 21845 | -| 46+ | 21845 | 0 | 42 | 0 | -| 47 | 21845 | 0 | 42 | 0 | -| 47 | 21845 | 0 | 106 | 0 | -| 47 | 21845 | 0 | 170 | 21845 | -| 47 | 21845 | 0 | 234 | 0 | -| 47 | 21845 | 0 | 298 | 0 | -| 47 | 21845 | 0 | 362 | 0 | -| 47 | 21845 | 0 | 426 | 0 | -| 47 | 21845 | 0 | 490 | 0 | -| 47+ | 21845 | 1 | 42 | 0 | -| 48 | 21845 | 1 | 42 | 21845 | -| 48+ | 21845 | 1 | 106 | 0 | -| 49 | 21845 | 1 | 106 | 21845 | -| 49+ | 21845 | 1 | 170 | 21845 | -| 50 | 21845 | 1 | 170 | 21845 | -| 50+ | 21845 | 1 | 234 | 0 | -| 51 | 21845 | 1 | 234 | 21845 | -| 51+ | 21845 | 1 | 298 | 0 | -| 52 | 21845 | 1 | 298 | 21845 | -| 52+ | 21845 | 1 | 362 | 0 | -| 53 | 21845 | 1 | 362 | 21845 | -| 53+ | 21845 | 1 | 426 | 0 | -| 54 | 21845 | 1 | 426 | 21845 | -| 54+ | 21845 | 1 | 490 | 0 | -| 55 | 21845 | 1 | 490 | 21845 | -| 55+ | 21845 | 0 | 42 | 21845 | -| 56 | 21845 | 0 | 42 | 21845 | -| 56 | 21845 | 0 | 106 | 21845 | -| 56 | 21845 | 0 | 170 | 21845 | -| 56 | 21845 | 0 | 234 | 21845 | -| 56 | 21845 | 0 | 298 | 21845 | -| 56 | 21845 | 0 | 362 | 21845 | -| 56 | 21845 | 0 | 426 | 21845 | -| 56 | 21845 | 0 | 490 | 21845 | -| 56+ | -21846 | 1 | 42 | 21845 | -| 57 | -21846 | 1 | 42 | -21846 | -| 57+ | -21846 | 0 | 42 | -21846 | -| 58 | -21846 | 0 | 42 | -21846 | -| 58 | -21846 | 0 | 106 | 21845 | -| 58 | -21846 | 0 | 170 | 21845 | -| 58 | -21846 | 0 | 234 | 21845 | -| 58 | -21846 | 0 | 298 | 21845 | -| 58 | -21846 | 0 | 362 | 21845 | -| 58 | -21846 | 0 | 426 | 21845 | -| 58 | -21846 | 0 | 490 | 21845 | -| 58+ | 21845 | 1 | 42 | -21846 | -| 59 | 21845 | 1 | 42 | 21845 | -| 59+ | -21846 | 1 | 106 | 21845 | -| 60 | -21846 | 1 | 106 | -21846 | -| 60+ | -21846 | 0 | 42 | 21845 | -| 61 | -21846 | 0 | 42 | 21845 | -| 61 | -21846 | 0 | 106 | -21846 | -| 61 | -21846 | 0 | 170 | 21845 | -| 61 | -21846 | 0 | 234 | 21845 | -| 61 | -21846 | 0 | 298 | 21845 | -| 61 | -21846 | 0 | 362 | 21845 | -| 61 | -21846 | 0 | 426 | 21845 | -| 61 | -21846 | 0 | 490 | 21845 | -| 61+ | 21845 | 1 | 106 | -21846 | -| 62 | 21845 | 1 | 106 | 21845 | -| 62+ | -21846 | 1 | 170 | 21845 | -| 63 | -21846 | 1 | 170 | -21846 | -| 63+ | -21846 | 0 | 42 | 21845 | -| 64 | -21846 | 0 | 42 | 21845 | -| 64 | -21846 | 0 | 106 | 21845 | -| 64 | -21846 | 0 | 170 | -21846 | -| 64 | -21846 | 0 | 234 | 21845 | -| 64 | -21846 | 0 | 298 | 21845 | -| 64 | -21846 | 0 | 362 | 21845 | -| 64 | -21846 | 0 | 426 | 21845 | -| 64 | -21846 | 0 | 490 | 21845 | -| 64+ | 21845 | 1 | 170 | -21846 | -| 65 | 21845 | 1 | 170 | 21845 | -| 65+ | -21846 | 1 | 234 | 21845 | -| 66 | -21846 | 1 | 234 | -21846 | -| 66+ | -21846 | 0 | 42 | 21845 | -| 67 | -21846 | 0 | 42 | 21845 | -| 67 | -21846 | 0 | 106 | 21845 | -| 67 | -21846 | 0 | 170 | 21845 | -| 67 | -21846 | 0 | 234 | -21846 | -| 67 | -21846 | 0 | 298 | 21845 | -| 67 | -21846 | 0 | 362 | 21845 | -| 67 | -21846 | 0 | 426 | 21845 | -| 67 | -21846 | 0 | 490 | 21845 | -| 67+ | 21845 | 1 | 234 | -21846 | -| 68 | 21845 | 1 | 234 | 21845 | -| 68+ | -21846 | 1 | 298 | 21845 | -| 69 | -21846 | 1 | 298 | -21846 | -| 69+ | -21846 | 0 | 42 | 21845 | -| 70 | -21846 | 0 | 42 | 21845 | -| 70 | -21846 | 0 | 106 | 21845 | -| 70 | -21846 | 0 | 170 | 21845 | -| 70 | -21846 | 0 | 234 | 21845 | -| 70 | -21846 | 0 | 298 | -21846 | -| 70 | -21846 | 0 | 362 | 21845 | -| 70 | -21846 | 0 | 426 | 21845 | -| 70 | -21846 | 0 | 490 | 21845 | -| 70+ | 21845 | 1 | 298 | -21846 | -| 71 | 21845 | 1 | 298 | 21845 | -| 71+ | -21846 | 1 | 362 | 21845 | -| 72 | -21846 | 1 | 362 | -21846 | -| 72+ | -21846 | 0 | 42 | 21845 | -| 73 | -21846 | 0 | 42 | 21845 | -| 73 | -21846 | 0 | 106 | 21845 | -| 73 | -21846 | 0 | 170 | 21845 | -| 73 | -21846 | 0 | 234 | 21845 | -| 73 | -21846 | 0 | 298 | 21845 | -| 73 | -21846 | 0 | 362 | -21846 | -| 73 | -21846 | 0 | 426 | 21845 | -| 73 | -21846 | 0 | 490 | 21845 | -| 73+ | 21845 | 1 | 362 | -21846 | -| 74 | 21845 | 1 | 362 | 21845 | -| 74+ | -21846 | 1 | 426 | 21845 | -| 75 | -21846 | 1 | 426 | -21846 | -| 75+ | -21846 | 0 | 42 | 21845 | -| 76 | -21846 | 0 | 42 | 21845 | -| 76 | -21846 | 0 | 106 | 21845 | -| 76 | -21846 | 0 | 170 | 21845 | -| 76 | -21846 | 0 | 234 | 21845 | -| 76 | -21846 | 0 | 298 | 21845 | -| 76 | -21846 | 0 | 362 | 21845 | -| 76 | -21846 | 0 | 426 | -21846 | -| 76 | -21846 | 0 | 490 | 21845 | -| 76+ | 21845 | 1 | 426 | -21846 | -| 77 | 21845 | 1 | 426 | 21845 | -| 77+ | -21846 | 1 | 490 | 21845 | -| 78 | -21846 | 1 | 490 | -21846 | -| 78+ | -21846 | 0 | 42 | 21845 | -| 79 | -21846 | 0 | 42 | 21845 | -| 79 | -21846 | 0 | 106 | 21845 | -| 79 | -21846 | 0 | 170 | 21845 | -| 79 | -21846 | 0 | 234 | 21845 | -| 79 | -21846 | 0 | 298 | 21845 | -| 79 | -21846 | 0 | 362 | 21845 | -| 79 | -21846 | 0 | 426 | 21845 | -| 79 | -21846 | 0 | 490 | -21846 | -| 79+ | 21845 | 1 | 490 | -21846 | -| 80 | 21845 | 1 | 490 | 21845 | -| 80+ | 21845 | 0 | 42 | 21845 | -| 81 | 21845 | 0 | 42 | 21845 | -| 81 | 21845 | 0 | 106 | 21845 | -| 81 | 21845 | 0 | 170 | 21845 | -| 81 | 21845 | 0 | 234 | 21845 | -| 81 | 21845 | 0 | 298 | 21845 | -| 81 | 21845 | 0 | 362 | 21845 | -| 81 | 21845 | 0 | 426 | 21845 | -| 81 | 21845 | 0 | 490 | 21845 | diff --git a/projects/03/b/RAM512.hdl b/projects/03/b/RAM512.hdl deleted file mode 100644 index 55f6ea0..0000000 --- a/projects/03/b/RAM512.hdl +++ /dev/null @@ -1,29 +0,0 @@ -// This file is part of the materials accompanying the book -// "The Elements of Computing Systems" by Nisan and Schocken, -// MIT Press. Book site: www.idc.ac.il/tecs -// File name: projects/03/b/RAM512.hdl - -/** - * Memory of 512 registers, each 16 bit-wide. Out holds the value - * stored at the memory location specified by address. If load==1, then - * the in value is loaded into the memory location specified by address - * (the loaded value will be emitted to out from the next time step onward). - */ - -CHIP RAM512 { - IN in[16], load, address[9]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux8Way (in=load, sel=address[0..2], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); - RAM64 (in=in, load=load0, address=address[3..8], out=out0); - RAM64 (in=in, load=load1, address=address[3..8], out=out1); - RAM64 (in=in, load=load2, address=address[3..8], out=out2); - RAM64 (in=in, load=load3, address=address[3..8], out=out3); - RAM64 (in=in, load=load4, address=address[3..8], out=out4); - RAM64 (in=in, load=load5, address=address[3..8], out=out5); - RAM64 (in=in, load=load6, address=address[3..8], out=out6); - RAM64 (in=in, load=load7, address=address[3..8], out=out7); - Mux8Way16 (a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[0..2], out=out); -} diff --git a/projects/03/b/RAM512.tst b/projects/03/b/RAM512.tst deleted file mode 100644 index 4ec6fc2..0000000 --- a/projects/03/b/RAM512.tst +++ /dev/null @@ -1,1027 +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/03/b/RAM512.tst - -load RAM512.hdl, -output-file RAM512.out, -compare-to RAM512.cmp, -output-list time%S1.4.1 in%D1.6.1 load%B2.1.2 address%D2.3.2 out%D1.6.1; - -set in 0, -set load 0, -set address 0, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set in 13099, -set load 0, -tick, -output; -tock, -output; - -set load 1, -set address 130, -tick, -output; -tock, -output; - -set load 0, -set address 0, -tick, -output; -tock, -output; - -set in 4729, -set address 472, -tick, -output; -tock, -output; - -set load 1, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 130, -eval, -output; - -set in 5119, -tick, -output; -tock, -output; - -set load 1, -set address 511, -tick, -output; -tock, -output; - -set load 0, -tick, -output; -tock, -output; - -set address 472, -eval, -output; - -set address 511, -eval, -output; - - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -tick, -output, -tock, -output; -set address %B010101010, -tick, -output, -tock, -output; -set address %B010101011, -tick, -output, -tock, -output; -set address %B010101100, -tick, -output, -tock, -output; -set address %B010101101, -tick, -output, -tock, -output; -set address %B010101110, -tick, -output, -tock, -output; -set address %B010101111, -tick, -output, -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101000, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101000, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101001, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101001, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101011, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101011, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101100, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101100, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101101, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101101, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101110, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101110, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101111, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - -set load 1, -set address %B010101111, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B010101000, -tick, -output; -tock, -output; -set address %B010101001, -eval, -output; -set address %B010101010, -eval, -output; -set address %B010101011, -eval, -output; -set address %B010101100, -eval, -output; -set address %B010101101, -eval, -output; -set address %B010101110, -eval, -output; -set address %B010101111, -eval, -output; - - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set in %B0101010101010101, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -tick, -output, -tock, -output; -set address %B010101010, -tick, -output, -tock, -output; -set address %B011101010, -tick, -output, -tock, -output; -set address %B100101010, -tick, -output, -tock, -output; -set address %B101101010, -tick, -output, -tock, -output; -set address %B110101010, -tick, -output, -tock, -output; -set address %B111101010, -tick, -output, -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B000101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B000101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B001101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B001101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B010101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B010101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B011101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B011101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B100101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B100101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B101101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B101101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B110101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B110101010, -set in %B0101010101010101, -tick, -output, -tock, -output; -set address %B111101010, -set in %B1010101010101010, -tick, -output; -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - -set load 1, -set address %B111101010, -set in %B0101010101010101, -tick, -output, -tock, -output; - -set load 0, -set address %B000101010, -tick, -output; -tock, -output; -set address %B001101010, -eval, -output; -set address %B010101010, -eval, -output; -set address %B011101010, -eval, -output; -set address %B100101010, -eval, -output; -set address %B101101010, -eval, -output; -set address %B110101010, -eval, -output; -set address %B111101010, -eval, -output; - diff --git a/projects/04/fill/Fill.asm b/projects/04/fill/Fill.asm deleted file mode 100644 index 16d63e2..0000000 --- a/projects/04/fill/Fill.asm +++ /dev/null @@ -1,76 +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/04/Fill.asm - -// Runs an infinite loop that listens to the keyboard input. -// When a key is pressed (any key), the program blackens the screen, -// i.e. writes "black" in every pixel; -// the screen should remain fully black as long as the key is pressed. -// When no key is pressed, the program clears the screen, i.e. writes -// "white" in every pixel; -// the screen should remain fully clear as long as no key is pressed. - -// Put your code here. - -(BEGIN) -@KBD -D=M - -@BLACK -D;JNE - -@WHITE -0;JMP - -(BLACK) -@8191 -D=A -@i -M=D - -(LOOPB) -@i -D=M -@j -M=D -@SCREEN -D=A -@j -M=M+D -A=M -M=-1 -@i -M=M-1 -D=M -@LOOPB -D+1;JGT - -@BEGIN -0;JMP - -(WHITE) -@8191 -D=A -@i -M=D - -(LOOPW) -@i -D=M -@j -M=D -@SCREEN -D=A -@j -M=M+D -A=M -M=0 -@i -M=M-1 -D=M -@LOOPW -D+1;JGT - -@BEGIN -0;JMP diff --git a/projects/04/fill/Fill.tst b/projects/04/fill/Fill.tst deleted file mode 100644 index e8bb385..0000000 --- a/projects/04/fill/Fill.tst +++ /dev/null @@ -1,11 +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/04/fill/Fill.tst - -load Fill.asm; -echo "Make sure that 'No Animation' is selected. Then, select the keyboard, press any key for some time, and inspect the screen."; - -repeat { - ticktock; -} diff --git a/projects/04/fill/FillAutomatic.cmp b/projects/04/fill/FillAutomatic.cmp deleted file mode 100644 index a71db27..0000000 --- a/projects/04/fill/FillAutomatic.cmp +++ /dev/null @@ -1,4 +0,0 @@ -|RAM[16384]|RAM[17648]|RAM[18349]|RAM[19444]|RAM[20771]|RAM[21031]|RAM[22596]|RAM[23754]|RAM[24575]| -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| -1 | -1 | -1 | -1 | -1 | -1 | -1 | -1 | -1 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | diff --git a/projects/04/fill/FillAutomatic.out b/projects/04/fill/FillAutomatic.out deleted file mode 100644 index a71db27..0000000 --- a/projects/04/fill/FillAutomatic.out +++ /dev/null @@ -1,4 +0,0 @@ -|RAM[16384]|RAM[17648]|RAM[18349]|RAM[19444]|RAM[20771]|RAM[21031]|RAM[22596]|RAM[23754]|RAM[24575]| -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| -1 | -1 | -1 | -1 | -1 | -1 | -1 | -1 | -1 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | diff --git a/projects/04/fill/FillAutomatic.tst b/projects/04/fill/FillAutomatic.tst deleted file mode 100644 index fbc29a0..0000000 --- a/projects/04/fill/FillAutomatic.tst +++ /dev/null @@ -1,37 +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/04/fill/FillAutomatic - -// This script can be used to test the Fill program automatically, -// rather than interactively. Specifically, the script sets the keyboard -// memory map (RAM[24576]) to 0, 1, and then again to 0. This simulates the -// acts of leaving the keyboard untouched, pressing some key, and then releasing -// the key. After each on of these simulated events, the script outputs the values -// of some selected registers from the screen memory map (RAM[16384]-RAM[24576]). -// This is done in order to test that these registers are set to 000...0 or 111....1, -// as mandated by how the Fill program should react to the keyboard events. - -load Fill.asm, -output-file FillAutomatic.out, -compare-to FillAutomatic.cmp, -output-list RAM[16384]%D2.6.2 RAM[17648]%D2.6.2 RAM[18349]%D2.6.2 RAM[19444]%D2.6.2 RAM[20771]%D2.6.2 RAM[21031]%D2.6.2 RAM[22596]%D2.6.2 RAM[23754]%D2.6.2 RAM[24575]%D2.6.2; - -set RAM[24576] 0, // the keyboard is untouched -repeat 1000000 { - ticktock; -} -output; // test that the screen is white - -set RAM[24576] 1, // a keyboard key is pressed -repeat 1000000 { - ticktock; -} -output; // test that the screen is black - -set RAM[24576] 0, // they keyboard in untouched -repeat 1000000 { - ticktock; -} -output; // test that the screen is white - diff --git a/projects/04/mult/Mult.asm b/projects/04/mult/Mult.asm deleted file mode 100644 index 50bbba0..0000000 --- a/projects/04/mult/Mult.asm +++ /dev/null @@ -1,33 +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/04/Mult.asm - -// Multiplies R0 and R1 and stores the result in R2. -// (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.) - -// Put your code here. - -@i -M=0 -@R2 -M=0 - -(LOOP) -@i -M=M+1 -D=M -@R0 -D=D-M -@END -D;JGT -@R1 -D=M -@R2 -M=M+D -@LOOP -0;JMP - -(END) -@END -0;JMP diff --git a/projects/04/mult/Mult.cmp b/projects/04/mult/Mult.cmp deleted file mode 100644 index 296b5fb..0000000 --- a/projects/04/mult/Mult.cmp +++ /dev/null @@ -1,7 +0,0 @@ -| RAM[0] | RAM[1] | RAM[2] | -| 0 | 0 | 0 | -| 1 | 0 | 0 | -| 0 | 2 | 0 | -| 3 | 1 | 3 | -| 2 | 4 | 8 | -| 6 | 7 | 42 | \ No newline at end of file diff --git a/projects/04/mult/Mult.out b/projects/04/mult/Mult.out deleted file mode 100644 index e31b5df..0000000 --- a/projects/04/mult/Mult.out +++ /dev/null @@ -1,7 +0,0 @@ -| RAM[0] | RAM[1] | RAM[2] | -| 0 | 0 | 0 | -| 1 | 0 | 0 | -| 0 | 2 | 0 | -| 3 | 1 | 3 | -| 2 | 4 | 8 | -| 6 | 7 | 42 | diff --git a/projects/04/mult/Mult.tst b/projects/04/mult/Mult.tst deleted file mode 100644 index 9bf4fa8..0000000 --- a/projects/04/mult/Mult.tst +++ /dev/null @@ -1,74 +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/04/mult/Mult.tst - -load Mult.asm, -output-file Mult.out, -compare-to Mult.cmp, -output-list RAM[0]%D2.6.2 RAM[1]%D2.6.2 RAM[2]%D2.6.2; - -set RAM[0] 0, // Set test arguments -set RAM[1] 0, -set RAM[2] -1; // Test that program initialized product to 0 -repeat 20 { - ticktock; -} -set RAM[0] 0, // Restore arguments in case program used them as loop counter -set RAM[1] 0, -output; - -set PC 0, -set RAM[0] 1, // Set test arguments -set RAM[1] 0, -set RAM[2] -1; // Ensure that program initialized product to 0 -repeat 50 { - ticktock; -} -set RAM[0] 1, // Restore arguments in case program used them as loop counter -set RAM[1] 0, -output; - -set PC 0, -set RAM[0] 0, // Set test arguments -set RAM[1] 2, -set RAM[2] -1; // Ensure that program initialized product to 0 -repeat 80 { - ticktock; -} -set RAM[0] 0, // Restore arguments in case program used them as loop counter -set RAM[1] 2, -output; - -set PC 0, -set RAM[0] 3, // Set test arguments -set RAM[1] 1, -set RAM[2] -1; // Ensure that program initialized product to 0 -repeat 120 { - ticktock; -} -set RAM[0] 3, // Restore arguments in case program used them as loop counter -set RAM[1] 1, -output; - -set PC 0, -set RAM[0] 2, // Set test arguments -set RAM[1] 4, -set RAM[2] -1; // Ensure that program initialized product to 0 -repeat 150 { - ticktock; -} -set RAM[0] 2, // Restore arguments in case program used them as loop counter -set RAM[1] 4, -output; - -set PC 0, -set RAM[0] 6, // Set test arguments -set RAM[1] 7, -set RAM[2] -1; // Ensure that program initialized product to 0 -repeat 210 { - ticktock; -} -set RAM[0] 6, // Restore arguments in case program used them as loop counter -set RAM[1] 7, -output; diff --git a/projects/05/Add.hack b/projects/05/Add.hack deleted file mode 100644 index fe5969d..0000000 --- a/projects/05/Add.hack +++ /dev/null @@ -1,6 +0,0 @@ -0000000000000010 -1110110000010000 -0000000000000011 -1110000010010000 -0000000000000000 -1110001100001000 diff --git a/projects/05/CPU-external.cmp b/projects/05/CPU-external.cmp deleted file mode 100644 index 58f43bd..0000000 --- a/projects/05/CPU-external.cmp +++ /dev/null @@ -1,93 +0,0 @@ -|time| inM | instruction |reset| outM |writeM |addre| pc | -|0+ | 0|0011000000111001| 0 |*******| 0 | 0| 0| -|1 | 0|0011000000111001| 0 |*******| 0 |12345| 1| -|1+ | 0|1110110000010000| 0 |*******| 0 |12345| 1| -|2 | 0|1110110000010000| 0 |*******| 0 |12345| 2| -|2+ | 0|0101101110100000| 0 |*******| 0 |12345| 2| -|3 | 0|0101101110100000| 0 |*******| 0 |23456| 3| -|3+ | 0|1110000111010000| 0 |*******| 0 |23456| 3| -|4 | 0|1110000111010000| 0 |*******| 0 |23456| 4| -|4+ | 0|0000001111101000| 0 |*******| 0 |23456| 4| -|5 | 0|0000001111101000| 0 |*******| 0 | 1000| 5| -|5+ | 0|1110001100001000| 0 | 11111| 1 | 1000| 5| -|6 | 0|1110001100001000| 0 | 11111| 1 | 1000| 6| -|6+ | 0|0000001111101001| 0 |*******| 0 | 1000| 6| -|7 | 0|0000001111101001| 0 |*******| 0 | 1001| 7| -|7+ | 0|1110001110011000| 0 | 11110| 1 | 1001| 7| -|8 | 0|1110001110011000| 0 | 11109| 1 | 1001| 8| -|8+ | 0|0000001111101000| 0 |*******| 0 | 1001| 8| -|9 | 0|0000001111101000| 0 |*******| 0 | 1000| 9| -|9+ | 11111|1111010011010000| 0 |*******| 0 | 1000| 9| -|10 | 11111|1111010011010000| 0 |*******| 0 | 1000| 10| -|10+ | 11111|0000000000001110| 0 |*******| 0 | 1000| 10| -|11 | 11111|0000000000001110| 0 |*******| 0 | 14| 11| -|11+ | 11111|1110001100000100| 0 |*******| 0 | 14| 11| -|12 | 11111|1110001100000100| 0 |*******| 0 | 14| 14| -|12+ | 11111|0000001111100111| 0 |*******| 0 | 14| 14| -|13 | 11111|0000001111100111| 0 |*******| 0 | 999| 15| -|13+ | 11111|1110110111100000| 0 |*******| 0 | 999| 15| -|14 | 11111|1110110111100000| 0 |*******| 0 | 1000| 16| -|14+ | 11111|1110001100001000| 0 | -1| 1 | 1000| 16| -|15 | 11111|1110001100001000| 0 | -1| 1 | 1000| 17| -|15+ | 11111|0000000000010101| 0 |*******| 0 | 1000| 17| -|16 | 11111|0000000000010101| 0 |*******| 0 | 21| 18| -|16+ | 11111|1110011111000010| 0 |*******| 0 | 21| 18| -|17 | 11111|1110011111000010| 0 |*******| 0 | 21| 21| -|17+ | 11111|0000000000000010| 0 |*******| 0 | 21| 21| -|18 | 11111|0000000000000010| 0 |*******| 0 | 2| 22| -|18+ | 11111|1110000010010000| 0 |*******| 0 | 2| 22| -|19 | 11111|1110000010010000| 0 |*******| 0 | 2| 23| -|19+ | 11111|0000001111101000| 0 |*******| 0 | 2| 23| -|20 | 11111|0000001111101000| 0 |*******| 0 | 1000| 24| -|20+ | 11111|1110111010010000| 0 |*******| 0 | 1000| 24| -|21 | 11111|1110111010010000| 0 |*******| 0 | 1000| 25| -|21+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 25| -|22 | 11111|1110001100000001| 0 |*******| 0 | 1000| 26| -|22+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 26| -|23 | 11111|1110001100000010| 0 |*******| 0 | 1000| 27| -|23+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 27| -|24 | 11111|1110001100000011| 0 |*******| 0 | 1000| 28| -|24+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 28| -|25 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| -|25+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| -|26 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| -|26+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -|27 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -|27+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -|28 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -|28+ | 11111|1110101010010000| 0 |*******| 0 | 1000| 1000| -|29 | 11111|1110101010010000| 0 |*******| 0 | 1000| 1001| -|29+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 1001| -|30 | 11111|1110001100000001| 0 |*******| 0 | 1000| 1002| -|30+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 1002| -|31 | 11111|1110001100000010| 0 |*******| 0 | 1000| 1000| -|31+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| -|32 | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| -|32+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| -|33 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1001| -|33+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1001| -|34 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1002| -|34+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1002| -|35 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -|35+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -|36 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -|36+ | 11111|1110111111010000| 0 |*******| 0 | 1000| 1000| -|37 | 11111|1110111111010000| 0 |*******| 0 | 1000| 1001| -|37+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 1001| -|38 | 11111|1110001100000001| 0 |*******| 0 | 1000| 1000| -|38+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 1000| -|39 | 11111|1110001100000010| 0 |*******| 0 | 1000| 1001| -|39+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 1001| -|40 | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| -|40+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| -|41 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1001| -|41+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1001| -|42 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| -|42+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -|43 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1001| -|43+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1001| -|44 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -|44+ | 11111|1110001100000111| 1 |*******| 0 | 1000| 1000| -|45 | 11111|1110001100000111| 1 |*******| 0 | 1000| 0| -|45+ | 11111|0111111111111111| 0 |*******| 0 | 1000| 0| -|46 | 11111|0111111111111111| 0 |*******| 0 |32767| 1| diff --git a/projects/05/CPU-external.tst b/projects/05/CPU-external.tst deleted file mode 100644 index 5aa0295..0000000 --- a/projects/05/CPU-external.tst +++ /dev/null @@ -1,150 +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/05/CPU-external.tst - -load CPU.hdl, -output-file CPU-external.out, -compare-to CPU-external.cmp, -output-list time%S0.4.0 inM%D0.6.0 instruction%B0.16.0 reset%B2.1.2 outM%D1.6.0 writeM%B3.1.3 addressM%D0.5.0 pc%D0.5.0; - - -set instruction %B0011000000111001, // @12345 -tick, output, tock, output; - -set instruction %B1110110000010000, // D=A -tick, output, tock, output; - -set instruction %B0101101110100000, // @23456 -tick, output, tock, output; - -set instruction %B1110000111010000, // D=A-D -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1110001100001000, // M=D -tick, output, tock, output; - -set instruction %B0000001111101001, // @1001 -tick, output, tock, output; - -set instruction %B1110001110011000, // MD=D-1 -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1111010011010000, // D=D-M -set inM 11111, -tick, output, tock, output; - -set instruction %B0000000000001110, // @14 -tick, output, tock, output; - -set instruction %B1110001100000100, // D;jlt -tick, output, tock, output; - -set instruction %B0000001111100111, // @999 -tick, output, tock, output; - -set instruction %B1110110111100000, // A=A+1 -tick, output, tock, output; - -set instruction %B1110001100001000, // M=D -tick, output, tock, output; - -set instruction %B0000000000010101, // @21 -tick, output, tock, output; - -set instruction %B1110011111000010, // D+1;jeq -tick, output, tock, output; - -set instruction %B0000000000000010, // @2 -tick, output, tock, output; - -set instruction %B1110000010010000, // D=D+A -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1110111010010000, // D=-1 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set instruction %B1110101010010000, // D=0 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set instruction %B1110111111010000, // D=1 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set reset 1; -tick, output, tock, output; - -set instruction %B0111111111111111, // @32767 -set reset 0; -tick, output, tock, output; diff --git a/projects/05/CPU.cmp b/projects/05/CPU.cmp deleted file mode 100644 index 345674c..0000000 --- a/projects/05/CPU.cmp +++ /dev/null @@ -1,93 +0,0 @@ -|time| inM | instruction |reset| outM |writeM |addre| pc |DRegiste| -|0+ | 0|0011000000111001| 0 |*******| 0 | 0| 0| 0 | -|1 | 0|0011000000111001| 0 |*******| 0 |12345| 1| 0 | -|1+ | 0|1110110000010000| 0 |*******| 0 |12345| 1| 12345 | -|2 | 0|1110110000010000| 0 |*******| 0 |12345| 2| 12345 | -|2+ | 0|0101101110100000| 0 |*******| 0 |12345| 2| 12345 | -|3 | 0|0101101110100000| 0 |*******| 0 |23456| 3| 12345 | -|3+ | 0|1110000111010000| 0 |*******| 0 |23456| 3| 11111 | -|4 | 0|1110000111010000| 0 |*******| 0 |23456| 4| 11111 | -|4+ | 0|0000001111101000| 0 |*******| 0 |23456| 4| 11111 | -|5 | 0|0000001111101000| 0 |*******| 0 | 1000| 5| 11111 | -|5+ | 0|1110001100001000| 0 | 11111| 1 | 1000| 5| 11111 | -|6 | 0|1110001100001000| 0 | 11111| 1 | 1000| 6| 11111 | -|6+ | 0|0000001111101001| 0 |*******| 0 | 1000| 6| 11111 | -|7 | 0|0000001111101001| 0 |*******| 0 | 1001| 7| 11111 | -|7+ | 0|1110001110011000| 0 | 11110| 1 | 1001| 7| 11110 | -|8 | 0|1110001110011000| 0 | 11109| 1 | 1001| 8| 11110 | -|8+ | 0|0000001111101000| 0 |*******| 0 | 1001| 8| 11110 | -|9 | 0|0000001111101000| 0 |*******| 0 | 1000| 9| 11110 | -|9+ | 11111|1111010011010000| 0 |*******| 0 | 1000| 9| -1 | -|10 | 11111|1111010011010000| 0 |*******| 0 | 1000| 10| -1 | -|10+ | 11111|0000000000001110| 0 |*******| 0 | 1000| 10| -1 | -|11 | 11111|0000000000001110| 0 |*******| 0 | 14| 11| -1 | -|11+ | 11111|1110001100000100| 0 |*******| 0 | 14| 11| -1 | -|12 | 11111|1110001100000100| 0 |*******| 0 | 14| 14| -1 | -|12+ | 11111|0000001111100111| 0 |*******| 0 | 14| 14| -1 | -|13 | 11111|0000001111100111| 0 |*******| 0 | 999| 15| -1 | -|13+ | 11111|1110110111100000| 0 |*******| 0 | 999| 15| -1 | -|14 | 11111|1110110111100000| 0 |*******| 0 | 1000| 16| -1 | -|14+ | 11111|1110001100001000| 0 | -1| 1 | 1000| 16| -1 | -|15 | 11111|1110001100001000| 0 | -1| 1 | 1000| 17| -1 | -|15+ | 11111|0000000000010101| 0 |*******| 0 | 1000| 17| -1 | -|16 | 11111|0000000000010101| 0 |*******| 0 | 21| 18| -1 | -|16+ | 11111|1110011111000010| 0 |*******| 0 | 21| 18| -1 | -|17 | 11111|1110011111000010| 0 |*******| 0 | 21| 21| -1 | -|17+ | 11111|0000000000000010| 0 |*******| 0 | 21| 21| -1 | -|18 | 11111|0000000000000010| 0 |*******| 0 | 2| 22| -1 | -|18+ | 11111|1110000010010000| 0 |*******| 0 | 2| 22| 1 | -|19 | 11111|1110000010010000| 0 |*******| 0 | 2| 23| 1 | -|19+ | 11111|0000001111101000| 0 |*******| 0 | 2| 23| 1 | -|20 | 11111|0000001111101000| 0 |*******| 0 | 1000| 24| 1 | -|20+ | 11111|1110111010010000| 0 |*******| 0 | 1000| 24| -1 | -|21 | 11111|1110111010010000| 0 |*******| 0 | 1000| 25| -1 | -|21+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 25| -1 | -|22 | 11111|1110001100000001| 0 |*******| 0 | 1000| 26| -1 | -|22+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 26| -1 | -|23 | 11111|1110001100000010| 0 |*******| 0 | 1000| 27| -1 | -|23+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 27| -1 | -|24 | 11111|1110001100000011| 0 |*******| 0 | 1000| 28| -1 | -|24+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 28| -1 | -|25 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| -1 | -|25+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| -1 | -|26 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| -1 | -|26+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -1 | -|27 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| -1 | -|27+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -1 | -|28 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| -1 | -|28+ | 11111|1110101010010000| 0 |*******| 0 | 1000| 1000| 0 | -|29 | 11111|1110101010010000| 0 |*******| 0 | 1000| 1001| 0 | -|29+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 1001| 0 | -|30 | 11111|1110001100000001| 0 |*******| 0 | 1000| 1002| 0 | -|30+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 1002| 0 | -|31 | 11111|1110001100000010| 0 |*******| 0 | 1000| 1000| 0 | -|31+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| 0 | -|32 | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| 0 | -|32+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| 0 | -|33 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1001| 0 | -|33+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1001| 0 | -|34 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1002| 0 | -|34+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1002| 0 | -|35 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| 0 | -|35+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| 0 | -|36 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| 0 | -|36+ | 11111|1110111111010000| 0 |*******| 0 | 1000| 1000| 1 | -|37 | 11111|1110111111010000| 0 |*******| 0 | 1000| 1001| 1 | -|37+ | 11111|1110001100000001| 0 |*******| 0 | 1000| 1001| 1 | -|38 | 11111|1110001100000001| 0 |*******| 0 | 1000| 1000| 1 | -|38+ | 11111|1110001100000010| 0 |*******| 0 | 1000| 1000| 1 | -|39 | 11111|1110001100000010| 0 |*******| 0 | 1000| 1001| 1 | -|39+ | 11111|1110001100000011| 0 |*******| 0 | 1000| 1001| 1 | -|40 | 11111|1110001100000011| 0 |*******| 0 | 1000| 1000| 1 | -|40+ | 11111|1110001100000100| 0 |*******| 0 | 1000| 1000| 1 | -|41 | 11111|1110001100000100| 0 |*******| 0 | 1000| 1001| 1 | -|41+ | 11111|1110001100000101| 0 |*******| 0 | 1000| 1001| 1 | -|42 | 11111|1110001100000101| 0 |*******| 0 | 1000| 1000| 1 | -|42+ | 11111|1110001100000110| 0 |*******| 0 | 1000| 1000| 1 | -|43 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1001| 1 | -|43+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1001| 1 | -|44 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| 1 | -|44+ | 11111|1110001100000111| 1 |*******| 0 | 1000| 1000| 1 | -|45 | 11111|1110001100000111| 1 |*******| 0 | 1000| 0| 1 | -|45+ | 11111|0111111111111111| 0 |*******| 0 | 1000| 0| 1 | -|46 | 11111|0111111111111111| 0 |*******| 0 |32767| 1| 1 | diff --git a/projects/05/CPU.hdl b/projects/05/CPU.hdl deleted file mode 100644 index aeeac04..0000000 --- a/projects/05/CPU.hdl +++ /dev/null @@ -1,82 +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/05/CPU.hdl - -/** - * The Hack CPU (Central Processing unit), consisting of an ALU, - * two registers named A and D, and a program counter named PC. - * The CPU is designed to fetch and execute instructions written in - * the Hack machine language. In particular, functions as follows: - * Executes the inputted instruction according to the Hack machine - * language specification. The D and A in the language specification - * refer to CPU-resident registers, while M refers to the external - * memory location addressed by A, i.e. to Memory[A]. The inM input - * holds the value of this location. If the current instruction needs - * to write a value to M, the value is placed in outM, the address - * of the target location is placed in the addressM output, and the - * writeM control bit is asserted. (When writeM==0, any value may - * appear in outM). The outM and writeM outputs are combinational: - * they are affected instantaneously by the execution of the current - * instruction. The addressM and pc outputs are clocked: although they - * are affected by the execution of the current instruction, they commit - * to their new values only in the next time step. If reset==1 then the - * CPU jumps to address 0 (i.e. pc is set to 0 in next time step) rather - * than to the address resulting from executing the current instruction. - */ - -CHIP CPU { - - IN inM[16], // M value input (M = contents of RAM[A]) - instruction[16], // Instruction for execution - reset; // Signals whether to re-start the current - // program (reset==1) or continue executing - // the current program (reset==0). - - OUT outM[16], // M value output - writeM, // Write to M? - addressM[15], // Address in data memory (of M) - pc[15]; // address of next instruction - - PARTS: - // Put your code here: - - Nand(a=instruction[15], b=instruction[5], out=c7); - Mux16(a=aluout, b=instruction, sel=c7, out=out1); - - Not(in=instruction[15], out=notd1); - Or(a=instruction[5], b=notd1, out=c8); - ARegister(in=out1, load=c8, out=out2, out[0..14]=addressM); - - And(a=instruction[15], b=instruction[12], out=c9); - Mux16(a=out2, b=inM, sel=c9, out=y); - - And(a=instruction[15], b=instruction[4], out=c10); - DRegister(in=aluout, load=c10, out=x); - - ALU(x=x, y=y, zx=instruction[11], nx=instruction[10], zy=instruction[9], ny=instruction[8], f=instruction[7], no=instruction[6], out=aluout, out=outM, ng=ng, zr=zr); - Not(in=ng, out=ps); - Not(in=zr, out=nz); - - And(a=ps, b=nz, out=out3); - And(a=out3, b=instruction[0], out=isjump1); - - And(a=ps, b=zr, out=out4); - And(a=out4, b=instruction[1], out=isjump2); - - And(a=ng, b=nz, out=out5); - And(a=out5, b=instruction[2], out=isjump3); - - Or(a=isjump1, b=isjump2, out=isjump4); - Or(a=isjump3, b=isjump4, out=isjump5); - And(a=instruction[15], b=isjump5, out=isjump); - - Not(in=isjump, out=isnotjump); - - PC(in=out2, load=isjump, inc=isnotjump, reset=reset, out[0..14]=pc); - - And(a=instruction[15], b=instruction[3], out=writeM); - //And(a=instruction[15], b=instruction[3], out=out6); - //DFF(in=out6, out=writeM); - -} diff --git a/projects/05/CPU.out b/projects/05/CPU.out deleted file mode 100644 index 95f17b5..0000000 --- a/projects/05/CPU.out +++ /dev/null @@ -1,93 +0,0 @@ -|time| inM | instruction |reset| outM |writeM |addre| pc |DRegiste| -|0+ | 0|0011000000111001| 0 | 0| 0 | 0| 0| 0 | -|1 | 0|0011000000111001| 0 | 0| 0 |12345| 1| 0 | -|1+ | 0|1110110000010000| 0 | 12345| 0 |12345| 1| 12345 | -|2 | 0|1110110000010000| 0 | 12345| 0 |12345| 2| 12345 | -|2+ | 0|0101101110100000| 0 | -1| 0 |12345| 2| 12345 | -|3 | 0|0101101110100000| 0 | -1| 0 |23456| 3| 12345 | -|3+ | 0|1110000111010000| 0 | 11111| 0 |23456| 3| 11111 | -|4 | 0|1110000111010000| 0 | 12345| 0 |23456| 4| 11111 | -|4+ | 0|0000001111101000| 0 | -11111| 0 |23456| 4| 11111 | -|5 | 0|0000001111101000| 0 | -11111| 0 | 1000| 5| 11111 | -|5+ | 0|1110001100001000| 0 | 11111| 1 | 1000| 5| 11111 | -|6 | 0|1110001100001000| 0 | 11111| 1 | 1000| 6| 11111 | -|6+ | 0|0000001111101001| 0 | -11111| 0 | 1000| 6| 11111 | -|7 | 0|0000001111101001| 0 | -11111| 0 | 1001| 7| 11111 | -|7+ | 0|1110001110011000| 0 | 11110| 1 | 1001| 7| 11110 | -|8 | 0|1110001110011000| 0 | 11109| 1 | 1001| 8| 11110 | -|8+ | 0|0000001111101000| 0 | -11110| 0 | 1001| 8| 11110 | -|9 | 0|0000001111101000| 0 | -11110| 0 | 1000| 9| 11110 | -|9+ | 11111|1111010011010000| 0 | -1| 0 | 1000| 9| -1 | -|10 | 11111|1111010011010000| 0 | -11112| 0 | 1000| 10| -1 | -|10+ | 11111|0000000000001110| 0 | 1000| 0 | 1000| 10| -1 | -|11 | 11111|0000000000001110| 0 | 14| 0 | 14| 11| -1 | -|11+ | 11111|1110001100000100| 0 | -1| 0 | 14| 11| -1 | -|12 | 11111|1110001100000100| 0 | -1| 0 | 14| 14| -1 | -|12+ | 11111|0000001111100111| 0 | 1| 0 | 14| 14| -1 | -|13 | 11111|0000001111100111| 0 | 1| 0 | 999| 15| -1 | -|13+ | 11111|1110110111100000| 0 | 1000| 0 | 999| 15| -1 | -|14 | 11111|1110110111100000| 0 | 1001| 0 | 1000| 16| -1 | -|14+ | 11111|1110001100001000| 0 | -1| 1 | 1000| 16| -1 | -|15 | 11111|1110001100001000| 0 | -1| 1 | 1000| 17| -1 | -|15+ | 11111|0000000000010101| 0 | 1000| 0 | 1000| 17| -1 | -|16 | 11111|0000000000010101| 0 | 21| 0 | 21| 18| -1 | -|16+ | 11111|1110011111000010| 0 | 0| 0 | 21| 18| -1 | -|17 | 11111|1110011111000010| 0 | 0| 0 | 21| 21| -1 | -|17+ | 11111|0000000000000010| 0 | 21| 0 | 21| 21| -1 | -|18 | 11111|0000000000000010| 0 | 2| 0 | 2| 22| -1 | -|18+ | 11111|1110000010010000| 0 | 1| 0 | 2| 22| 1 | -|19 | 11111|1110000010010000| 0 | 3| 0 | 2| 23| 1 | -|19+ | 11111|0000001111101000| 0 | -1| 0 | 2| 23| 1 | -|20 | 11111|0000001111101000| 0 | -1| 0 | 1000| 24| 1 | -|20+ | 11111|1110111010010000| 0 | -1| 0 | 1000| 24| -1 | -|21 | 11111|1110111010010000| 0 | -1| 0 | 1000| 25| -1 | -|21+ | 11111|1110001100000001| 0 | -1| 0 | 1000| 25| -1 | -|22 | 11111|1110001100000001| 0 | -1| 0 | 1000| 26| -1 | -|22+ | 11111|1110001100000010| 0 | -1| 0 | 1000| 26| -1 | -|23 | 11111|1110001100000010| 0 | -1| 0 | 1000| 27| -1 | -|23+ | 11111|1110001100000011| 0 | -1| 0 | 1000| 27| -1 | -|24 | 11111|1110001100000011| 0 | -1| 0 | 1000| 28| -1 | -|24+ | 11111|1110001100000100| 0 | -1| 0 | 1000| 28| -1 | -|25 | 11111|1110001100000100| 0 | -1| 0 | 1000| 1000| -1 | -|25+ | 11111|1110001100000101| 0 | -1| 0 | 1000| 1000| -1 | -|26 | 11111|1110001100000101| 0 | -1| 0 | 1000| 1000| -1 | -|26+ | 11111|1110001100000110| 0 | -1| 0 | 1000| 1000| -1 | -|27 | 11111|1110001100000110| 0 | -1| 0 | 1000| 1000| -1 | -|27+ | 11111|1110001100000111| 0 | -1| 0 | 1000| 1000| -1 | -|28 | 11111|1110001100000111| 0 | -1| 0 | 1000| 1000| -1 | -|28+ | 11111|1110101010010000| 0 | 0| 0 | 1000| 1000| 0 | -|29 | 11111|1110101010010000| 0 | 0| 0 | 1000| 1001| 0 | -|29+ | 11111|1110001100000001| 0 | 0| 0 | 1000| 1001| 0 | -|30 | 11111|1110001100000001| 0 | 0| 0 | 1000| 1002| 0 | -|30+ | 11111|1110001100000010| 0 | 0| 0 | 1000| 1002| 0 | -|31 | 11111|1110001100000010| 0 | 0| 0 | 1000| 1000| 0 | -|31+ | 11111|1110001100000011| 0 | 0| 0 | 1000| 1000| 0 | -|32 | 11111|1110001100000011| 0 | 0| 0 | 1000| 1000| 0 | -|32+ | 11111|1110001100000100| 0 | 0| 0 | 1000| 1000| 0 | -|33 | 11111|1110001100000100| 0 | 0| 0 | 1000| 1001| 0 | -|33+ | 11111|1110001100000101| 0 | 0| 0 | 1000| 1001| 0 | -|34 | 11111|1110001100000101| 0 | 0| 0 | 1000| 1002| 0 | -|34+ | 11111|1110001100000110| 0 | 0| 0 | 1000| 1002| 0 | -|35 | 11111|1110001100000110| 0 | 0| 0 | 1000| 1000| 0 | -|35+ | 11111|1110001100000111| 0 | 0| 0 | 1000| 1000| 0 | -|36 | 11111|1110001100000111| 0 | 0| 0 | 1000| 1000| 0 | -|36+ | 11111|1110111111010000| 0 | 1| 0 | 1000| 1000| 1 | -|37 | 11111|1110111111010000| 0 | 1| 0 | 1000| 1001| 1 | -|37+ | 11111|1110001100000001| 0 | 1| 0 | 1000| 1001| 1 | -|38 | 11111|1110001100000001| 0 | 1| 0 | 1000| 1000| 1 | -|38+ | 11111|1110001100000010| 0 | 1| 0 | 1000| 1000| 1 | -|39 | 11111|1110001100000010| 0 | 1| 0 | 1000| 1001| 1 | -|39+ | 11111|1110001100000011| 0 | 1| 0 | 1000| 1001| 1 | -|40 | 11111|1110001100000011| 0 | 1| 0 | 1000| 1000| 1 | -|40+ | 11111|1110001100000100| 0 | 1| 0 | 1000| 1000| 1 | -|41 | 11111|1110001100000100| 0 | 1| 0 | 1000| 1001| 1 | -|41+ | 11111|1110001100000101| 0 | 1| 0 | 1000| 1001| 1 | -|42 | 11111|1110001100000101| 0 | 1| 0 | 1000| 1000| 1 | -|42+ | 11111|1110001100000110| 0 | 1| 0 | 1000| 1000| 1 | -|43 | 11111|1110001100000110| 0 | 1| 0 | 1000| 1001| 1 | -|43+ | 11111|1110001100000111| 0 | 1| 0 | 1000| 1001| 1 | -|44 | 11111|1110001100000111| 0 | 1| 0 | 1000| 1000| 1 | -|44+ | 11111|1110001100000111| 1 | 1| 0 | 1000| 1000| 1 | -|45 | 11111|1110001100000111| 1 | 1| 0 | 1000| 0| 1 | -|45+ | 11111|0111111111111111| 0 | 1| 0 | 1000| 0| 1 | -|46 | 11111|0111111111111111| 0 | 1| 0 |32767| 1| 1 | diff --git a/projects/05/CPU.tst b/projects/05/CPU.tst deleted file mode 100644 index 98eee1c..0000000 --- a/projects/05/CPU.tst +++ /dev/null @@ -1,150 +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/05/CPU.tst - -load CPU.hdl, -output-file CPU.out, -compare-to CPU.cmp, -output-list time%S0.4.0 inM%D0.6.0 instruction%B0.16.0 reset%B2.1.2 outM%D1.6.0 writeM%B3.1.3 addressM%D0.5.0 pc%D0.5.0 DRegister[]%D1.6.1; - - -set instruction %B0011000000111001, // @12345 -tick, output, tock, output; - -set instruction %B1110110000010000, // D=A -tick, output, tock, output; - -set instruction %B0101101110100000, // @23456 -tick, output, tock, output; - -set instruction %B1110000111010000, // D=A-D -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1110001100001000, // M=D -tick, output, tock, output; - -set instruction %B0000001111101001, // @1001 -tick, output, tock, output; - -set instruction %B1110001110011000, // MD=D-1 -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1111010011010000, // D=D-M -set inM 11111, -tick, output, tock, output; - -set instruction %B0000000000001110, // @14 -tick, output, tock, output; - -set instruction %B1110001100000100, // D;jlt -tick, output, tock, output; - -set instruction %B0000001111100111, // @999 -tick, output, tock, output; - -set instruction %B1110110111100000, // A=A+1 -tick, output, tock, output; - -set instruction %B1110001100001000, // M=D -tick, output, tock, output; - -set instruction %B0000000000010101, // @21 -tick, output, tock, output; - -set instruction %B1110011111000010, // D+1;jeq -tick, output, tock, output; - -set instruction %B0000000000000010, // @2 -tick, output, tock, output; - -set instruction %B1110000010010000, // D=D+A -tick, output, tock, output; - -set instruction %B0000001111101000, // @1000 -tick, output, tock, output; - -set instruction %B1110111010010000, // D=-1 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set instruction %B1110101010010000, // D=0 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set instruction %B1110111111010000, // D=1 -tick, output, tock, output; - -set instruction %B1110001100000001, // D;JGT -tick, output, tock, output; - -set instruction %B1110001100000010, // D;JEQ -tick, output, tock, output; - -set instruction %B1110001100000011, // D;JGE -tick, output, tock, output; - -set instruction %B1110001100000100, // D;JLT -tick, output, tock, output; - -set instruction %B1110001100000101, // D;JNE -tick, output, tock, output; - -set instruction %B1110001100000110, // D;JLE -tick, output, tock, output; - -set instruction %B1110001100000111, // D;JMP -tick, output, tock, output; - -set reset 1; -tick, output, tock, output; - -set instruction %B0111111111111111, // @32767 -set reset 0; -tick, output, tock, output; diff --git a/projects/05/Computer.hdl b/projects/05/Computer.hdl deleted file mode 100644 index fdda8e3..0000000 --- a/projects/05/Computer.hdl +++ /dev/null @@ -1,26 +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/05/Computer.hdl - -/** - * The HACK computer, including CPU, ROM and RAM. - * When reset is 0, the program stored in the computer's ROM executes. - * When reset is 1, the execution of the program restarts. - * Thus, to start a program's execution, reset must be pushed "up" (1) - * and "down" (0). From this point onward the user is at the mercy of - * the software. In particular, depending on the program's code, the - * screen may show some output and the user may be able to interact - * with the computer via the keyboard. - */ - -CHIP Computer { - - IN reset; - - PARTS: - // Put your code here: - CPU(reset=reset, instruction=instruction, inM=inM, writeM=writeM, outM=outM, addressM=addressM, pc=pc); - Memory(in=outM, address=addressM, load=writeM, out=inM); - ROM32K(address=pc, out=instruction); -} diff --git a/projects/05/ComputerAdd-external.cmp b/projects/05/ComputerAdd-external.cmp deleted file mode 100644 index a3a8eaf..0000000 --- a/projects/05/ComputerAdd-external.cmp +++ /dev/null @@ -1,15 +0,0 @@ -| time |reset|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0 | 0 | -| 1 | 0 | 0 | 0 | 0 | -| 2 | 0 | 0 | 0 | 0 | -| 3 | 0 | 0 | 0 | 0 | -| 4 | 0 | 0 | 0 | 0 | -| 5 | 0 | 0 | 0 | 0 | -| 6 | 0 | 5 | 0 | 0 | -| 7 | 1 | 0 | 0 | 0 | -| 8 | 0 | 0 | 0 | 0 | -| 9 | 0 | 0 | 0 | 0 | -| 10 | 0 | 0 | 0 | 0 | -| 11 | 0 | 0 | 0 | 0 | -| 12 | 0 | 0 | 0 | 0 | -| 13 | 0 | 5 | 0 | 0 | diff --git a/projects/05/ComputerAdd-external.tst b/projects/05/ComputerAdd-external.tst deleted file mode 100644 index 09cc1a7..0000000 --- a/projects/05/ComputerAdd-external.tst +++ /dev/null @@ -1,32 +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/05/ComputerAdd-external.tst - -load Computer.hdl, -output-file ComputerAdd-external.out, -compare-to ComputerAdd-external.cmp, -output-list time%S1.4.1 reset%B2.1.2 RAM16K[0]%D1.7.1 RAM16K[1]%D1.7.1 RAM16K[2]%D1.7.1; - -// Load a program written in the Hack machine language. -// The program adds the two constants 2 and 3 and writes the result in RAM[0]. -ROM32K load Add.hack, -output; - -// First run (at the beginning PC=0) -repeat 6 { - tick, tock, output; -} - -// Reset the PC -set reset 1, -set RAM16K[0] 0, -tick, tock, output; - - -// Second run, to check that the PC was reset correctly. -set reset 0, - -repeat 6 { - tick, tock, output; -} diff --git a/projects/05/ComputerAdd.cmp b/projects/05/ComputerAdd.cmp deleted file mode 100644 index f295464..0000000 --- a/projects/05/ComputerAdd.cmp +++ /dev/null @@ -1,15 +0,0 @@ -| time |reset|ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0 | 0| 0 | 0 | 0 | -| 1 | 0 | 2 | 0 | 1| 0 | 0 | 0 | -| 2 | 0 | 2 | 2 | 2| 0 | 0 | 0 | -| 3 | 0 | 3 | 2 | 3| 0 | 0 | 0 | -| 4 | 0 | 3 | 5 | 4| 0 | 0 | 0 | -| 5 | 0 | 0 | 5 | 5| 0 | 0 | 0 | -| 6 | 0 | 0 | 5 | 6| 5 | 0 | 0 | -| 7 | 1 | 0 | 5 | 0| 0 | 0 | 0 | -| 8 | 0 | 2 | 5 | 1| 0 | 0 | 0 | -| 9 | 0 | 2 | 2 | 2| 0 | 0 | 0 | -| 10 | 0 | 3 | 2 | 3| 0 | 0 | 0 | -| 11 | 0 | 3 | 5 | 4| 0 | 0 | 0 | -| 12 | 0 | 0 | 5 | 5| 0 | 0 | 0 | -| 13 | 0 | 0 | 5 | 6| 5 | 0 | 0 | diff --git a/projects/05/ComputerAdd.out b/projects/05/ComputerAdd.out deleted file mode 100644 index 5748770..0000000 --- a/projects/05/ComputerAdd.out +++ /dev/null @@ -1,15 +0,0 @@ -| time |reset|ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0 | 0| 0 | 0 | 0 | -| 1 | 0 | 2 | 0 | 1| 0 | 0 | 0 | -| 2 | 0 | 2 | 2 | 2| 0 | 0 | 0 | -| 3 | 0 | 3 | 2 | 3| 0 | 0 | 0 | -| 4 | 0 | 3 | 5 | 4| 0 | 0 | 0 | -| 5 | 0 | 0 | 5 | 5| 0 | 0 | 0 | -| 6 | 0 | 0 | 5 | 6| 5 | 0 | 0 | -| 7 | 1 | 0 | 5 | 0| 0 | 0 | 0 | -| 8 | 0 | 2 | 5 | 1| 0 | 0 | 0 | -| 9 | 0 | 2 | 2 | 2| 0 | 0 | 0 | -| 10 | 0 | 3 | 2 | 3| 0 | 0 | 0 | -| 11 | 0 | 3 | 5 | 4| 0 | 0 | 0 | -| 12 | 0 | 0 | 5 | 5| 0 | 0 | 0 | -| 13 | 0 | 0 | 5 | 6| 5 | 0 | 0 | diff --git a/projects/05/ComputerAdd.tst b/projects/05/ComputerAdd.tst deleted file mode 100644 index 27f4411..0000000 --- a/projects/05/ComputerAdd.tst +++ /dev/null @@ -1,32 +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/05/ComputerAdd.tst - -load Computer.hdl, -output-file ComputerAdd.out, -compare-to ComputerAdd.cmp, -output-list time%S1.4.1 reset%B2.1.2 ARegister[0]%D1.7.1 DRegister[0]%D1.7.1 PC[]%D0.4.0 RAM16K[0]%D1.7.1 RAM16K[1]%D1.7.1 RAM16K[2]%D1.7.1; - -// Load a program written in the Hack machine language. -// The program adds the two constants 2 and 3 and writes the result in RAM[0]. -ROM32K load Add.hack, -output; - -// First run (at the beginning PC=0) -repeat 6 { - tick, tock, output; -} - -// Reset the PC -set reset 1, -set RAM16K[0] 0, -tick, tock, output; - - -// Second run, to check that the PC was reset correctly. -set reset 0, - -repeat 6 { - tick, tock, output; -} diff --git a/projects/05/ComputerMax-external.cmp b/projects/05/ComputerMax-external.cmp deleted file mode 100644 index f864733..0000000 --- a/projects/05/ComputerMax-external.cmp +++ /dev/null @@ -1,28 +0,0 @@ -| time |reset|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 3 | 5 | 0 | -| 1 | 0 | 3 | 5 | 0 | -| 2 | 0 | 3 | 5 | 0 | -| 3 | 0 | 3 | 5 | 0 | -| 4 | 0 | 3 | 5 | 0 | -| 5 | 0 | 3 | 5 | 0 | -| 6 | 0 | 3 | 5 | 0 | -| 7 | 0 | 3 | 5 | 0 | -| 8 | 0 | 3 | 5 | 0 | -| 9 | 0 | 3 | 5 | 0 | -| 10 | 0 | 3 | 5 | 0 | -| 11 | 0 | 3 | 5 | 0 | -| 12 | 0 | 3 | 5 | 5 | -| 13 | 0 | 3 | 5 | 5 | -| 14 | 0 | 3 | 5 | 5 | -| 15 | 1 | 3 | 5 | 5 | -| 15 | 0 | 23456 | 12345 | 5 | -| 16 | 0 | 23456 | 12345 | 5 | -| 17 | 0 | 23456 | 12345 | 5 | -| 18 | 0 | 23456 | 12345 | 5 | -| 19 | 0 | 23456 | 12345 | 5 | -| 20 | 0 | 23456 | 12345 | 5 | -| 21 | 0 | 23456 | 12345 | 5 | -| 22 | 0 | 23456 | 12345 | 5 | -| 23 | 0 | 23456 | 12345 | 5 | -| 24 | 0 | 23456 | 12345 | 5 | -| 25 | 0 | 23456 | 12345 | 23456 | diff --git a/projects/05/ComputerMax-external.tst b/projects/05/ComputerMax-external.tst deleted file mode 100644 index 52b6bef..0000000 --- a/projects/05/ComputerMax-external.tst +++ /dev/null @@ -1,38 +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/05/ComputerMax-external.tst - -load Computer.hdl, -output-file ComputerMax-external.out, -compare-to ComputerMax-external.cmp, -output-list time%S1.4.1 reset%B2.1.2 RAM16K[0]%D1.7.1 RAM16K[1]%D1.7.1 RAM16K[2]%D1.7.1; - -// Load a program written in the Hack machine language. -// The program computes the maximum of RAM[0] and RAM[1] -// and writes the result in RAM[2]. -ROM32K load Max.hack, - -// first run: compute max(3,5) -set RAM16K[0] 3, -set RAM16K[1] 5, -output; - -repeat 14 { - tick, tock, output; -} - -// reset the PC -set reset 1, -tick, tock, output; - -// second run: compute max(23456,12345) -set reset 0, -set RAM16K[0] 23456, -set RAM16K[1] 12345, -output; - -// The run on these inputs needs less cycles (different branching) -repeat 10 { - tick, tock, output; -} diff --git a/projects/05/ComputerMax.cmp b/projects/05/ComputerMax.cmp deleted file mode 100644 index 42276cd..0000000 --- a/projects/05/ComputerMax.cmp +++ /dev/null @@ -1,28 +0,0 @@ -| time |reset|ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0 | 0| 3 | 5 | 0 | -| 1 | 0 | 0 | 0 | 1| 3 | 5 | 0 | -| 2 | 0 | 0 | 3 | 2| 3 | 5 | 0 | -| 3 | 0 | 1 | 3 | 3| 3 | 5 | 0 | -| 4 | 0 | 1 | -2 | 4| 3 | 5 | 0 | -| 5 | 0 | 10 | -2 | 5| 3 | 5 | 0 | -| 6 | 0 | 10 | -2 | 6| 3 | 5 | 0 | -| 7 | 0 | 1 | -2 | 7| 3 | 5 | 0 | -| 8 | 0 | 1 | 5 | 8| 3 | 5 | 0 | -| 9 | 0 | 12 | 5 | 9| 3 | 5 | 0 | -| 10 | 0 | 12 | 5 | 12| 3 | 5 | 0 | -| 11 | 0 | 2 | 5 | 13| 3 | 5 | 0 | -| 12 | 0 | 2 | 5 | 14| 3 | 5 | 5 | -| 13 | 0 | 14 | 5 | 15| 3 | 5 | 5 | -| 14 | 0 | 14 | 5 | 14| 3 | 5 | 5 | -| 15 | 1 | 14 | 5 | 0| 3 | 5 | 5 | -| 15 | 0 | 14 | 5 | 0| 23456 | 12345 | 5 | -| 16 | 0 | 0 | 5 | 1| 23456 | 12345 | 5 | -| 17 | 0 | 0 | 23456 | 2| 23456 | 12345 | 5 | -| 18 | 0 | 1 | 23456 | 3| 23456 | 12345 | 5 | -| 19 | 0 | 1 | 11111 | 4| 23456 | 12345 | 5 | -| 20 | 0 | 10 | 11111 | 5| 23456 | 12345 | 5 | -| 21 | 0 | 10 | 11111 | 10| 23456 | 12345 | 5 | -| 22 | 0 | 0 | 11111 | 11| 23456 | 12345 | 5 | -| 23 | 0 | 0 | 23456 | 12| 23456 | 12345 | 5 | -| 24 | 0 | 2 | 23456 | 13| 23456 | 12345 | 5 | -| 25 | 0 | 2 | 23456 | 14| 23456 | 12345 | 23456 | diff --git a/projects/05/ComputerMax.out b/projects/05/ComputerMax.out deleted file mode 100644 index 698d5a1..0000000 --- a/projects/05/ComputerMax.out +++ /dev/null @@ -1,28 +0,0 @@ -| time |reset|ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0 | 0| 3 | 5 | 0 | -| 1 | 0 | 0 | 0 | 1| 3 | 5 | 0 | -| 2 | 0 | 0 | 3 | 2| 3 | 5 | 0 | -| 3 | 0 | 1 | 3 | 3| 3 | 5 | 0 | -| 4 | 0 | 1 | -2 | 4| 3 | 5 | 0 | -| 5 | 0 | 10 | -2 | 5| 3 | 5 | 0 | -| 6 | 0 | 10 | -2 | 6| 3 | 5 | 0 | -| 7 | 0 | 1 | -2 | 7| 3 | 5 | 0 | -| 8 | 0 | 1 | 5 | 8| 3 | 5 | 0 | -| 9 | 0 | 12 | 5 | 9| 3 | 5 | 0 | -| 10 | 0 | 12 | 5 | 12| 3 | 5 | 0 | -| 11 | 0 | 2 | 5 | 13| 3 | 5 | 0 | -| 12 | 0 | 2 | 5 | 14| 3 | 5 | 5 | -| 13 | 0 | 14 | 5 | 15| 3 | 5 | 5 | -| 14 | 0 | 14 | 5 | 14| 3 | 5 | 5 | -| 15 | 1 | 14 | 5 | 0| 3 | 5 | 5 | -| 15 | 0 | 14 | 5 | 0| 23456 | 12345 | 5 | -| 16 | 0 | 0 | 5 | 1| 23456 | 12345 | 5 | -| 17 | 0 | 0 | 23456 | 2| 23456 | 12345 | 5 | -| 18 | 0 | 1 | 23456 | 3| 23456 | 12345 | 5 | -| 19 | 0 | 1 | 11111 | 4| 23456 | 12345 | 5 | -| 20 | 0 | 10 | 11111 | 5| 23456 | 12345 | 5 | -| 21 | 0 | 10 | 11111 | 10| 23456 | 12345 | 5 | -| 22 | 0 | 0 | 11111 | 11| 23456 | 12345 | 5 | -| 23 | 0 | 0 | 23456 | 12| 23456 | 12345 | 5 | -| 24 | 0 | 2 | 23456 | 13| 23456 | 12345 | 5 | -| 25 | 0 | 2 | 23456 | 14| 23456 | 12345 | 23456 | diff --git a/projects/05/ComputerMax.tst b/projects/05/ComputerMax.tst deleted file mode 100644 index e090754..0000000 --- a/projects/05/ComputerMax.tst +++ /dev/null @@ -1,39 +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/05/ComputerMax.tst - -load Computer.hdl, -output-file ComputerMax.out, -compare-to ComputerMax.cmp, -output-list time%S1.4.1 reset%B2.1.2 ARegister[]%D1.7.1 DRegister[]%D1.7.1 PC[]%D0.4.0 RAM16K[0]%D1.7.1 RAM16K[1]%D1.7.1 RAM16K[2]%D1.7.1; - -// Load a program written in the Hack machine language. -// The program computes the maximum of RAM[0] and RAM[1] -// and writes the result in RAM[2]. - -ROM32K load Max.hack, - -// first run: compute max(3,5) -set RAM16K[0] 3, -set RAM16K[1] 5, -output; - -repeat 14 { - tick, tock, output; -} - -// reset the PC -set reset 1, -tick, tock, output; - -// second run: compute max(23456,12345) -set reset 0, -set RAM16K[0] 23456, -set RAM16K[1] 12345, -output; - -// The run on these inputs needs less cycles (different branching) -repeat 10 { - tick, tock, output; -} diff --git a/projects/05/ComputerRect-external.cmp b/projects/05/ComputerRect-external.cmp deleted file mode 100644 index f276922..0000000 --- a/projects/05/ComputerRect-external.cmp +++ /dev/null @@ -1,65 +0,0 @@ -| time | -| 0 | -| 1 | -| 2 | -| 3 | -| 4 | -| 5 | -| 6 | -| 7 | -| 8 | -| 9 | -| 10 | -| 11 | -| 12 | -| 13 | -| 14 | -| 15 | -| 16 | -| 17 | -| 18 | -| 19 | -| 20 | -| 21 | -| 22 | -| 23 | -| 24 | -| 25 | -| 26 | -| 27 | -| 28 | -| 29 | -| 30 | -| 31 | -| 32 | -| 33 | -| 34 | -| 35 | -| 36 | -| 37 | -| 38 | -| 39 | -| 40 | -| 41 | -| 42 | -| 43 | -| 44 | -| 45 | -| 46 | -| 47 | -| 48 | -| 49 | -| 50 | -| 51 | -| 52 | -| 53 | -| 54 | -| 55 | -| 56 | -| 57 | -| 58 | -| 59 | -| 60 | -| 61 | -| 62 | -| 63 | diff --git a/projects/05/ComputerRect-external.tst b/projects/05/ComputerRect-external.tst deleted file mode 100644 index f9102f7..0000000 --- a/projects/05/ComputerRect-external.tst +++ /dev/null @@ -1,26 +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/05/ComputerRect-external.tst - -load Computer.hdl, -output-file ComputerRect-external.out, -compare-to ComputerRect-external.cmp, -output-list time%S1.4.1; - -// Load a program written in the Hack machine language. -// The program draws a rectangle of width 16 pixels and -// length RAM[0] at the top left of the screen. -ROM32K load Rect.hack, - -echo "Before you run this script, select the 'Screen' option from the 'View' menu"; - -echo "A small rectangle should be drawn at the top left of the screen (the 'Screen' option of the 'View' menu should be selected.)"; - -// draw a rectangle 16 pixels wide and 4 pixels long -set RAM16K[0] 4, -output; - -repeat 63 { - tick, tock, output; -} diff --git a/projects/05/ComputerRect.cmp b/projects/05/ComputerRect.cmp deleted file mode 100644 index a6b5cc9..0000000 --- a/projects/05/ComputerRect.cmp +++ /dev/null @@ -1,65 +0,0 @@ -| time |ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0| 4 | 0 | 0 | -| 1 | 0 | 0 | 1| 4 | 0 | 0 | -| 2 | 0 | 4 | 2| 4 | 0 | 0 | -| 3 | 23 | 4 | 3| 4 | 0 | 0 | -| 4 | 23 | 4 | 4| 4 | 0 | 0 | -| 5 | 16 | 4 | 5| 4 | 0 | 0 | -| 6 | 16 | 4 | 6| 4 | 0 | 0 | -| 7 | 16384 | 4 | 7| 4 | 0 | 0 | -| 8 | 16384 | 16384 | 8| 4 | 0 | 0 | -| 9 | 17 | 16384 | 9| 4 | 0 | 0 | -| 10 | 17 | 16384 | 10| 4 | 0 | 0 | -| 11 | 17 | 16384 | 11| 4 | 0 | 0 | -| 12 | 16384 | 16384 | 12| 4 | 0 | 0 | -| 13 | 16384 | 16384 | 13| 4 | 0 | 0 | -| 14 | 17 | 16384 | 14| 4 | 0 | 0 | -| 15 | 17 | 16384 | 15| 4 | 0 | 0 | -| 16 | 32 | 16384 | 16| 4 | 0 | 0 | -| 17 | 32 | 16416 | 17| 4 | 0 | 0 | -| 18 | 17 | 16416 | 18| 4 | 0 | 0 | -| 19 | 17 | 16416 | 19| 4 | 0 | 0 | -| 20 | 16 | 16416 | 20| 4 | 0 | 0 | -| 21 | 16 | 3 | 21| 4 | 0 | 0 | -| 22 | 10 | 3 | 22| 4 | 0 | 0 | -| 23 | 10 | 3 | 10| 4 | 0 | 0 | -| 24 | 17 | 3 | 11| 4 | 0 | 0 | -| 25 | 16416 | 3 | 12| 4 | 0 | 0 | -| 26 | 16416 | 3 | 13| 4 | 0 | 0 | -| 27 | 17 | 3 | 14| 4 | 0 | 0 | -| 28 | 17 | 16416 | 15| 4 | 0 | 0 | -| 29 | 32 | 16416 | 16| 4 | 0 | 0 | -| 30 | 32 | 16448 | 17| 4 | 0 | 0 | -| 31 | 17 | 16448 | 18| 4 | 0 | 0 | -| 32 | 17 | 16448 | 19| 4 | 0 | 0 | -| 33 | 16 | 16448 | 20| 4 | 0 | 0 | -| 34 | 16 | 2 | 21| 4 | 0 | 0 | -| 35 | 10 | 2 | 22| 4 | 0 | 0 | -| 36 | 10 | 2 | 10| 4 | 0 | 0 | -| 37 | 17 | 2 | 11| 4 | 0 | 0 | -| 38 | 16448 | 2 | 12| 4 | 0 | 0 | -| 39 | 16448 | 2 | 13| 4 | 0 | 0 | -| 40 | 17 | 2 | 14| 4 | 0 | 0 | -| 41 | 17 | 16448 | 15| 4 | 0 | 0 | -| 42 | 32 | 16448 | 16| 4 | 0 | 0 | -| 43 | 32 | 16480 | 17| 4 | 0 | 0 | -| 44 | 17 | 16480 | 18| 4 | 0 | 0 | -| 45 | 17 | 16480 | 19| 4 | 0 | 0 | -| 46 | 16 | 16480 | 20| 4 | 0 | 0 | -| 47 | 16 | 1 | 21| 4 | 0 | 0 | -| 48 | 10 | 1 | 22| 4 | 0 | 0 | -| 49 | 10 | 1 | 10| 4 | 0 | 0 | -| 50 | 17 | 1 | 11| 4 | 0 | 0 | -| 51 | 16480 | 1 | 12| 4 | 0 | 0 | -| 52 | 16480 | 1 | 13| 4 | 0 | 0 | -| 53 | 17 | 1 | 14| 4 | 0 | 0 | -| 54 | 17 | 16480 | 15| 4 | 0 | 0 | -| 55 | 32 | 16480 | 16| 4 | 0 | 0 | -| 56 | 32 | 16512 | 17| 4 | 0 | 0 | -| 57 | 17 | 16512 | 18| 4 | 0 | 0 | -| 58 | 17 | 16512 | 19| 4 | 0 | 0 | -| 59 | 16 | 16512 | 20| 4 | 0 | 0 | -| 60 | 16 | 0 | 21| 4 | 0 | 0 | -| 61 | 10 | 0 | 22| 4 | 0 | 0 | -| 62 | 10 | 0 | 23| 4 | 0 | 0 | -| 63 | 23 | 0 | 24| 4 | 0 | 0 | diff --git a/projects/05/ComputerRect.out b/projects/05/ComputerRect.out deleted file mode 100644 index a6b3965..0000000 --- a/projects/05/ComputerRect.out +++ /dev/null @@ -1,65 +0,0 @@ -| time |ARegister|DRegister|PC[]|RAM16K[0]|RAM16K[1]|RAM16K[2]| -| 0 | 0 | 0 | 0| 4 | 0 | 0 | -| 1 | 0 | 0 | 1| 4 | 0 | 0 | -| 2 | 0 | 4 | 2| 4 | 0 | 0 | -| 3 | 23 | 4 | 3| 4 | 0 | 0 | -| 4 | 23 | 4 | 4| 4 | 0 | 0 | -| 5 | 16 | 4 | 5| 4 | 0 | 0 | -| 6 | 16 | 4 | 6| 4 | 0 | 0 | -| 7 | 16384 | 4 | 7| 4 | 0 | 0 | -| 8 | 16384 | 16384 | 8| 4 | 0 | 0 | -| 9 | 17 | 16384 | 9| 4 | 0 | 0 | -| 10 | 17 | 16384 | 10| 4 | 0 | 0 | -| 11 | 17 | 16384 | 11| 4 | 0 | 0 | -| 12 | 16384 | 16384 | 12| 4 | 0 | 0 | -| 13 | 16384 | 16384 | 13| 4 | 0 | 0 | -| 14 | 17 | 16384 | 14| 4 | 0 | 0 | -| 15 | 17 | 16384 | 15| 4 | 0 | 0 | -| 16 | 32 | 16384 | 16| 4 | 0 | 0 | -| 17 | 32 | 16416 | 17| 4 | 0 | 0 | -| 18 | 17 | 16416 | 18| 4 | 0 | 0 | -| 19 | 17 | 16416 | 19| 4 | 0 | 0 | -| 20 | 16 | 16416 | 20| 4 | 0 | 0 | -| 21 | 16 | 3 | 21| 4 | 0 | 0 | -| 22 | 10 | 3 | 22| 4 | 0 | 0 | -| 23 | 10 | 3 | 10| 4 | 0 | 0 | -| 24 | 17 | 3 | 11| 4 | 0 | 0 | -| 25 | 16416 | 3 | 12| 4 | 0 | 0 | -| 26 | 16416 | 3 | 13| 4 | 0 | 0 | -| 27 | 17 | 3 | 14| 4 | 0 | 0 | -| 28 | 17 | 16416 | 15| 4 | 0 | 0 | -| 29 | 32 | 16416 | 16| 4 | 0 | 0 | -| 30 | 32 | 16448 | 17| 4 | 0 | 0 | -| 31 | 17 | 16448 | 18| 4 | 0 | 0 | -| 32 | 17 | 16448 | 19| 4 | 0 | 0 | -| 33 | 16 | 16448 | 20| 4 | 0 | 0 | -| 34 | 16 | 2 | 21| 4 | 0 | 0 | -| 35 | 10 | 2 | 22| 4 | 0 | 0 | -| 36 | 10 | 2 | 10| 4 | 0 | 0 | -| 37 | 17 | 2 | 11| 4 | 0 | 0 | -| 38 | 16448 | 2 | 12| 4 | 0 | 0 | -| 39 | 16448 | 2 | 13| 4 | 0 | 0 | -| 40 | 17 | 2 | 14| 4 | 0 | 0 | -| 41 | 17 | 16448 | 15| 4 | 0 | 0 | -| 42 | 32 | 16448 | 16| 4 | 0 | 0 | -| 43 | 32 | 16480 | 17| 4 | 0 | 0 | -| 44 | 17 | 16480 | 18| 4 | 0 | 0 | -| 45 | 17 | 16480 | 19| 4 | 0 | 0 | -| 46 | 16 | 16480 | 20| 4 | 0 | 0 | -| 47 | 16 | 1 | 21| 4 | 0 | 0 | -| 48 | 10 | 1 | 22| 4 | 0 | 0 | -| 49 | 10 | 1 | 10| 4 | 0 | 0 | -| 50 | 17 | 1 | 11| 4 | 0 | 0 | -| 51 | 16480 | 1 | 12| 4 | 0 | 0 | -| 52 | 16480 | 1 | 13| 4 | 0 | 0 | -| 53 | 17 | 1 | 14| 4 | 0 | 0 | -| 54 | 17 | 16480 | 15| 4 | 0 | 0 | -| 55 | 32 | 16480 | 16| 4 | 0 | 0 | -| 56 | 32 | 16512 | 17| 4 | 0 | 0 | -| 57 | 17 | 16512 | 18| 4 | 0 | 0 | -| 58 | 17 | 16512 | 19| 4 | 0 | 0 | -| 59 | 16 | 16512 | 20| 4 | 0 | 0 | -| 60 | 16 | 0 | 21| 4 | 0 | 0 | -| 61 | 10 | 0 | 22| 4 | 0 | 0 | -| 62 | 10 | 0 | 23| 4 | 0 | 0 | -| 63 | 23 | 0 | 24| 4 | 0 | 0 | diff --git a/projects/05/ComputerRect.tst b/projects/05/ComputerRect.tst deleted file mode 100644 index b1e2126..0000000 --- a/projects/05/ComputerRect.tst +++ /dev/null @@ -1,26 +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/05/ComputerRect.tst - -load Computer.hdl, -output-file ComputerRect.out, -compare-to ComputerRect.cmp, -output-list time%S1.4.1 ARegister[]%D1.7.1 DRegister[]%D1.7.1 PC[]%D0.4.0 RAM16K[0]%D1.7.1 RAM16K[1]%D1.7.1 RAM16K[2]%D1.7.1; - -// Load a program written in the Hack machine language. -// The program draws a rectangle of width 16 pixels and -// length RAM[0] at the top left of the screen. -ROM32K load Rect.hack, - -echo "Before you run this script, select the 'Screen' option from the 'View' menu"; - -echo "A small rectangle should be drawn at the top left of the screen (the 'Screen' option of the 'View' menu should be selected.)"; - -// Draws a rectangle 16 pixels wide and 4 pixels long -set RAM16K[0] 4, -output; - -repeat 63 { - tick, tock, output; -} diff --git a/projects/05/Max.hack b/projects/05/Max.hack deleted file mode 100644 index 2e04a8d..0000000 --- a/projects/05/Max.hack +++ /dev/null @@ -1,16 +0,0 @@ -0000000000000000 -1111110000010000 -0000000000000001 -1111010011010000 -0000000000001010 -1110001100000001 -0000000000000001 -1111110000010000 -0000000000001100 -1110101010000111 -0000000000000000 -1111110000010000 -0000000000000010 -1110001100001000 -0000000000001110 -1110101010000111 diff --git a/projects/05/Memory.cmp b/projects/05/Memory.cmp deleted file mode 100644 index 613d171..0000000 --- a/projects/05/Memory.cmp +++ /dev/null @@ -1,54 +0,0 @@ -| in |load | address | out | -| -1 | 1 | 000000000000000 | 0 | -| -1 | 1 | 000000000000000 | -1 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 010000000000000 | 0 | -| 9999 | 0 | 100000000000000 | 0 | -| 2222 | 1 | 010000000000000 | 0 | -| 2222 | 1 | 010000000000000 | 2222 | -| 9999 | 0 | 010000000000000 | 2222 | -| 9999 | 0 | 010000000000000 | 2222 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 100000000000000 | 0 | -| 9999 | 0 | 000000000000001 | 0 | -| 9999 | 0 | 000000000000010 | 0 | -| 9999 | 0 | 000000000000100 | 0 | -| 9999 | 0 | 000000000001000 | 0 | -| 9999 | 0 | 000000000010000 | 0 | -| 9999 | 0 | 000000000100000 | 0 | -| 9999 | 0 | 000000001000000 | 0 | -| 9999 | 0 | 000000010000000 | 0 | -| 9999 | 0 | 000000100000000 | 0 | -| 9999 | 0 | 000001000000000 | 0 | -| 9999 | 0 | 000010000000000 | 0 | -| 9999 | 0 | 000100000000000 | 0 | -| 9999 | 0 | 001000000000000 | 0 | -| 9999 | 0 | 010000000000000 | 2222 | -| 1234 | 1 | 001001000110100 | 0 | -| 1234 | 1 | 001001000110100 | 1234 | -| 1234 | 0 | 010001000110100 | 0 | -| 1234 | 0 | 110001000110100 | 0 | -| 2345 | 1 | 010001101000101 | 0 | -| 2345 | 1 | 010001101000101 | 2345 | -| 2345 | 0 | 000001101000101 | 0 | -| 2345 | 0 | 100001101000101 | 0 | -| 2345 | 0 | 110000000000000 | 75 | -| -1 | 1 | 100111111001111 | -1 | -| -1 | 1 | 101000001001111 | -1 | -| -1 | 1 | 000111111001111 | 0 | -| -1 | 1 | 010111111001111 | 0 | -| -1 | 0 | 100111111001110 | 0 | -| -1 | 0 | 100111111001101 | 0 | -| -1 | 0 | 100111111001011 | 0 | -| -1 | 0 | 100111111000111 | 0 | -| -1 | 0 | 100111111011111 | 0 | -| -1 | 0 | 100111111101111 | 0 | -| -1 | 0 | 100111110001111 | 0 | -| -1 | 0 | 100111101001111 | 0 | -| -1 | 0 | 100111011001111 | 0 | -| -1 | 0 | 100110111001111 | 0 | -| -1 | 0 | 100101111001111 | 0 | -| -1 | 0 | 100011111001111 | 0 | -| -1 | 0 | 101111111001111 | 0 | -| -1 | 0 | 110000000000000 | 89 | diff --git a/projects/05/Memory.hdl b/projects/05/Memory.hdl deleted file mode 100644 index 6aeb8a0..0000000 --- a/projects/05/Memory.hdl +++ /dev/null @@ -1,45 +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/05/Memory.hdl - -/** - * The complete address space of the Hack computer's memory, - * including RAM and memory-mapped I/O. - * The chip facilitates read and write operations, as follows: - * Read: out(t) = Memory[address(t)](t) - * Write: if load(t-1) then Memory[address(t-1)](t) = in(t-1) - * In words: the chip always outputs the value stored at the memory - * location specified by address. If load==1, the in value is loaded - * into the memory location specified by address. This value becomes - * available through the out output from the next time step onward. - * Address space rules: - * Only the upper 16K+8K+1 words of the Memory chip are used. - * Access to address>0x6000 is invalid. Access to any address in - * the range 0x4000-0x5FFF results in accessing the screen memory - * map. Access to address 0x6000 results in accessing the keyboard - * memory map. The behavior in these addresses is described in the - * Screen and Keyboard chip specifications given in the book. - */ - -CHIP Memory { - IN in[16], load, address[15]; - OUT out[16]; - - PARTS: - // Put your code here: - DMux(in=load, sel=address[14], a=mload, b=load1); - DMux(in=load1, sel=address[13], a=sload, b=kload); - RAM16K(in=in, load=mload, address=address[0..13], out=mout); - Screen(in=in, load=sload, address=address[0..12], out=sout); - - Or8Way(in=address[0..7], out=or1); - Or8Way(in=address[5..12], out=or2); - Or(a=or1, b=or2, out=ksel); - - Keyboard(out=kout); - - Mux16(a=kout, b=false, sel=ksel, out=fout1); - Mux16(a=sout, b=fout1, sel=address[13], out=fout2); - Mux16(a=mout, b=fout2, sel=address[14], out=out); -} diff --git a/projects/05/Memory.out b/projects/05/Memory.out deleted file mode 100644 index 1dbf7ed..0000000 --- a/projects/05/Memory.out +++ /dev/null @@ -1,54 +0,0 @@ -| in |load | address | out | -| -1 | 1 | 000000000000000 | 0 | -| -1 | 1 | 000000000000000 | -1 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 010000000000000 | 0 | -| 9999 | 0 | 100000000000000 | 0 | -| 2222 | 1 | 010000000000000 | 0 | -| 2222 | 1 | 010000000000000 | 2222 | -| 9999 | 0 | 010000000000000 | 2222 | -| 9999 | 0 | 010000000000000 | 2222 | -| 9999 | 0 | 000000000000000 | -1 | -| 9999 | 0 | 100000000000000 | 0 | -| 9999 | 0 | 000000000000001 | 0 | -| 9999 | 0 | 000000000000010 | 0 | -| 9999 | 0 | 000000000000100 | 0 | -| 9999 | 0 | 000000000001000 | 0 | -| 9999 | 0 | 000000000010000 | 0 | -| 9999 | 0 | 000000000100000 | 0 | -| 9999 | 0 | 000000001000000 | 0 | -| 9999 | 0 | 000000010000000 | 0 | -| 9999 | 0 | 000000100000000 | 0 | -| 9999 | 0 | 000001000000000 | 0 | -| 9999 | 0 | 000010000000000 | 0 | -| 9999 | 0 | 000100000000000 | 0 | -| 9999 | 0 | 001000000000000 | 0 | -| 9999 | 0 | 010000000000000 | 2222 | -| 1234 | 1 | 001001000110100 | 0 | -| 1234 | 1 | 001001000110100 | 1234 | -| 1234 | 0 | 010001000110100 | 0 | -| 1234 | 0 | 110001000110100 | 0 | -| 2345 | 1 | 010001101000101 | 0 | -| 2345 | 1 | 010001101000101 | 2345 | -| 2345 | 0 | 000001101000101 | 0 | -| 2345 | 0 | 100001101000101 | 0 | -| 2345 | 0 | 110000000000000 | 75 | -| -1 | 1 | 100111111001111 | -1 | -| -1 | 1 | 101000001001111 | -1 | -| -1 | 1 | 000111111001111 | 0 | -| -1 | 1 | 010111111001111 | 0 | -| -1 | 0 | 100111111001110 | 0 | -| -1 | 0 | 100111111001101 | 0 | -| -1 | 0 | 100111111001011 | 0 | -| -1 | 0 | 100111111000111 | 0 | -| -1 | 0 | 100111111011111 | 0 | -| -1 | 0 | 100111111101111 | 0 | -| -1 | 0 | 100111110001111 | 0 | -| -1 | 0 | 100111101001111 | 0 | -| -1 | 0 | 100111011001111 | 0 | -| -1 | 0 | 100110111001111 | 0 | -| -1 | 0 | 100101111001111 | 0 | -| -1 | 0 | 100011111001111 | 0 | -| -1 | 0 | 101111111001111 | 0 | -| -1 | 0 | 110000000000000 | 89 | diff --git a/projects/05/Memory.tst b/projects/05/Memory.tst deleted file mode 100644 index f712a48..0000000 --- a/projects/05/Memory.tst +++ /dev/null @@ -1,163 +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/05/Memory.tst - -load Memory.hdl, -output-file Memory.out, -compare-to Memory.cmp, -output-list in%D1.6.1 load%B2.1.2 address%B1.15.1 out%D1.6.1; - -echo "Before you run this script, select the 'Screen' option from the 'View' menu"; - -set in -1, // Set RAM[0] = -1 -set load 1, -set address 0, -tick, -output; -tock, -output; - -set in 9999, // RAM[0] holds value -set load 0, -tick, -output; -tock, -output; - -set address %X2000, // Did not also write to upper RAM or Screen -eval, -output; -set address %X4000, -eval, -output; - -set in 2222, // Set RAM[2000] = 2222 -set load 1, -set address %X2000, -tick, -output; -tock, -output; - -set in 9999, // RAM[2000] holds value -set load 0, -tick, -output; -tock, -output; - -set address 0, // Did not also write to lower RAM or Screen -eval, -output; -set address %X4000, -eval, -output; - -set load 0, // Low order address bits connected -set address %X0001, eval, output; -set address %X0002, eval, output; -set address %X0004, eval, output; -set address %X0008, eval, output; -set address %X0010, eval, output; -set address %X0020, eval, output; -set address %X0040, eval, output; -set address %X0080, eval, output; -set address %X0100, eval, output; -set address %X0200, eval, output; -set address %X0400, eval, output; -set address %X0800, eval, output; -set address %X1000, eval, output; -set address %X2000, eval, output; - -set address %X1234, // RAM[1234] = 1234 -set in 1234, -set load 1, -tick, -output; -tock, -output; - -set load 0, -set address %X2234, // Did not also write to upper RAM or Screen -eval, output; -set address %X6234, -eval, output; - -set address %X2345, // RAM[2345] = 2345 -set in 2345, -set load 1, -tick, -output; -tock, -output; - -set load 0, -set address %X0345, // Did not also write to lower RAM or Screen -eval, output; -set address %X4345, -eval, output; - -// Keyboard test - -set address 24576, -echo "Click the Keyboard icon and hold down the 'K' key (uppercase) until you see the next message (it should appear shortly after that) ...", -// It's important to keep holding the key down since if the system is busy, -// the memory will zero itself before being outputted. - -while out <> 75 { - eval, -} - -clear-echo, -output; - -// Screen test - -set load 1, -set in -1, -set address %X4FCF, -tick, -tock, -output, - -set address %X504F, -tick, -tock, -output; - -set address %X0FCF, // Did not also write to lower or upper RAM -eval, -output; -set address %X2FCF, -eval, -output; - -set load 0, // Low order address bits connected -set address %X4FCE, eval, output; -set address %X4FCD, eval, output; -set address %X4FCB, eval, output; -set address %X4FC7, eval, output; -set address %X4FDF, eval, output; -set address %X4FEF, eval, output; -set address %X4F8F, eval, output; -set address %X4F4F, eval, output; -set address %X4ECF, eval, output; -set address %X4DCF, eval, output; -set address %X4BCF, eval, output; -set address %X47CF, eval, output; -set address %X5FCF, eval, output; - - -set load 0, -set address 24576, -echo "Make sure you see ONLY two horizontal lines in the middle of the screen. Hold down 'Y' (uppercase) until you see the next message ...", -// It's important to keep holding the key down since if the system is busy, -// the memory will zero itself before being outputted. - -while out <> 89 { - eval, -} - -clear-echo, -output; diff --git a/projects/05/Rect.hack b/projects/05/Rect.hack deleted file mode 100644 index ee017ab..0000000 --- a/projects/05/Rect.hack +++ /dev/null @@ -1,25 +0,0 @@ -0000000000000000 -1111110000010000 -0000000000010111 -1110001100000110 -0000000000010000 -1110001100001000 -0100000000000000 -1110110000010000 -0000000000010001 -1110001100001000 -0000000000010001 -1111110000100000 -1110111010001000 -0000000000010001 -1111110000010000 -0000000000100000 -1110000010010000 -0000000000010001 -1110001100001000 -0000000000010000 -1111110010011000 -0000000000001010 -1110001100000001 -0000000000010111 -1110101010000111 diff --git a/projects/06/Assembler b/projects/06/Assembler deleted file mode 100755 index d58b556..0000000 Binary files a/projects/06/Assembler and /dev/null differ diff --git a/projects/06/Assembler.hi b/projects/06/Assembler.hi deleted file mode 100644 index f6ecd68..0000000 Binary files a/projects/06/Assembler.hi and /dev/null differ diff --git a/projects/06/Assembler.hs b/projects/06/Assembler.hs deleted file mode 100644 index fb69f07..0000000 --- a/projects/06/Assembler.hs +++ /dev/null @@ -1,106 +0,0 @@ -import Numeric (showIntAtBase) -import Data.Char (intToDigit) -import Data.Map (Map) -import qualified Data.Map as Map -import Data.List.Split (splitOn, splitOneOf) -import System.Environment (getArgs) - -parseLine :: Map [Char] [Char] -> [Char] -> [Char] -parseLine table (x:xs) - | x == '@' && (head xs `elem` ['0'..'9']) = (int2Bin16 $ read xs) - | x == '@' = table Map.! xs - | '=' `elem` (x:xs) && ';' `elem` (x:xs) = let [dest, comp, jump] = splitOneOf "=;" (x:xs) in "111" ++ (parseComp comp) ++ (parseDest dest) ++ (parseJump jump) - | '=' `elem` (x:xs) = let [dest, comp] = splitOn "=" (x:xs) in "111" ++ (parseComp comp) ++ (parseDest dest) ++ "000" - | ';' `elem` (x:xs) = let [comp, jump] = splitOn ";" (x:xs) in "111" ++ (parseComp comp) ++ "000" ++ (parseJump jump) - -parseComp xs = case xs of - "0" -> "0101010" - "1" -> "0111111" - "-1" -> "0111010" - "D" -> "0001100" - "A" -> "0110000" - "!D" -> "0001101" - "!A" -> "0110001" - "-D" -> "0001111" - "-A" -> "0110011" - "D+1" -> "0011111" - "A+1" -> "0110111" - "D-1" -> "0001110" - "A-1" -> "0110010" - "D+A" -> "0000010" - "A+D" -> "0000010" - "D-A" -> "0010011" - "A-D" -> "0000111" - "D&A" -> "0000000" - "A&D" -> "0000000" - "D|A" -> "0010101" - "A|D" -> "0010101" - "M" -> "1110000" - "!M" -> "1110001" - "-M" -> "1110011" - "M+1" -> "1110111" - "M-1" -> "1110010" - "D+M" -> "1000010" - "M+D" -> "1000010" - "D-M" -> "1010011" - "M-D" -> "1000111" - "D&M" -> "1000000" - "M&D" -> "1000000" - "D|M" -> "1010101" - "M|D" -> "1010101" - -parseDest xs = (f 'A'):(f 'D'):(f 'M'):[] - where f x = if x `elem` xs then '1' else '0' - -parseJump xs = case xs of - "" -> "000" - "JGT" -> "001" - "JEQ" -> "010" - "JGE" -> "011" - "JLT" -> "100" - "JNE" -> "101" - "JLE" -> "110" - "JMP" -> "111" - -int2Bin x = showIntAtBase 2 intToDigit x "" - -int2Bin16 :: Int -> [Char] -int2Bin16 x = let xs = int2Bin x in replicate (16 - length xs) '0' ++ xs - -initTable :: Map [Char] [Char] -initTable = Map.fromList $ (\(x, y) -> (x, int2Bin16 y)) <$> ("SP", 0):("LCL", 1):("ARG", 2):("THIS", 3):("THAT", 4):("SCREEN", 16384):("KBD", 24576):rs - where rs = zipWith (,) ((\x -> 'R':(show x)) <$> [0..15]) [0..15] - -stripJunk :: [Char] -> [[Char]] -stripJunk xs = filter (not . null) $ (filter (not . (flip elem " \t")) . head . (splitOn "//")) <$> lines (replCrWithNl xs) - -stripLabels :: [[Char]] -> [[Char]] -stripLabels = filter (not . (elem '(')) - -addLabels :: [[Char]] -> Int -> Map [Char] [Char] -> Map [Char] [Char] -addLabels [] _ table = table -addLabels ((hd:tl):rest) addr table - | hd == '(' = addLabels rest addr (Map.insert (init tl) (int2Bin16 addr) table) - | otherwise = addLabels rest (addr + 1) table - -addSyms :: [[Char]] -> Int -> Int -> Map [Char] [Char] -> Map [Char] [Char] -addSyms [] _ _ table = table -addSyms ((hd:tl):rest) addr vaddr table - | hd == '(' = addSyms rest addr vaddr (Map.insert (init tl) (int2Bin16 addr) table) - | hd == '@' && head tl `notElem` ['0'..'9'] && tl `Map.notMember` table = addSyms rest (addr + 1) (vaddr + 1) (Map.insert tl (int2Bin16 vaddr) table) - | otherwise = addSyms rest (addr + 1) vaddr table - -parseCode :: [Char] -> [Char] -parseCode code = unlines $ parseLine (addSyms codeWithoutLabels 0 16 (addLabels codeWithoutJunk 0 initTable)) <$> codeWithoutLabels - where codeWithoutJunk = stripJunk code - codeWithoutLabels = stripLabels codeWithoutJunk - -replCrWithNl = fmap cr2nl - where cr2nl '\r' = '\n' - cr2nl c = c - -main = do - args <- getArgs - let filename = head args - code <- readFile $ filename - writeFile (head (splitOn "." filename) ++ ".hack") (parseCode code) diff --git a/projects/06/Assembler.o b/projects/06/Assembler.o deleted file mode 100644 index a46b314..0000000 Binary files a/projects/06/Assembler.o and /dev/null differ diff --git a/projects/06/add/Add.asm b/projects/06/add/Add.asm deleted file mode 100644 index 3d4ec46..0000000 --- a/projects/06/add/Add.asm +++ /dev/null @@ -1,13 +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/06/add/Add.asm - -// Computes R0 = 2 + 3 (R0 refers to RAM[0]) - -@2 -D=A -@3 -D=D+A -@0 -M=D diff --git a/projects/06/add/Add.hack b/projects/06/add/Add.hack deleted file mode 100644 index 8297cbb..0000000 --- a/projects/06/add/Add.hack +++ /dev/null @@ -1,6 +0,0 @@ -0000000000000010 -1110110000010000 -0000000000000011 -1110000010010000 -0000000000000000 -1110001100001000 diff --git a/projects/06/max/Max.asm b/projects/06/max/Max.asm deleted file mode 100644 index b62c138..0000000 --- a/projects/06/max/Max.asm +++ /dev/null @@ -1,26 +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/06/max/Max.asm - -// Computes R2 = max(R0, R1) (R0,R1,R2 refer to RAM[0],RAM[1],RAM[2]) - - @R0 - D=M // D = first number - @R1 - D=D-M // D = first number - second number - @OUTPUT_FIRST - D;JGT // if D>0 (first is greater) goto output_first - @R1 - D=M // D = second number - @OUTPUT_D - 0;JMP // goto output_d -(OUTPUT_FIRST) - @R0 - D=M // D = first number -(OUTPUT_D) - @R2 - M=D // M[2] = D (greatest number) -(INFINITE_LOOP) - @INFINITE_LOOP - 0;JMP // infinite loop diff --git a/projects/06/max/Max.hack b/projects/06/max/Max.hack deleted file mode 100644 index ab8a440..0000000 --- a/projects/06/max/Max.hack +++ /dev/null @@ -1,16 +0,0 @@ -0000000000000000 -1111110000010000 -0000000000000001 -1111010011010000 -0000000000001010 -1110001100000001 -0000000000000001 -1111110000010000 -0000000000001100 -1110101010000111 -0000000000000000 -1111110000010000 -0000000000000010 -1110001100001000 -0000000000001110 -1110101010000111 diff --git a/projects/06/max/MaxL.asm b/projects/06/max/MaxL.asm deleted file mode 100644 index fc3ccbf..0000000 --- a/projects/06/max/MaxL.asm +++ /dev/null @@ -1,23 +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/06/max/MaxL.asm - -// Symbol-less version of the Max.asm program. - -@0 -D=M -@1 -D=D-M -@10 -D;JGT -@1 -D=M -@12 -0;JMP -@0 -D=M -@2 -M=D -@14 -0;JMP diff --git a/projects/06/pong/Pong.asm b/projects/06/pong/Pong.asm deleted file mode 100644 index 79691f0..0000000 --- a/projects/06/pong/Pong.asm +++ /dev/null @@ -1,28375 +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/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 -@R14 -AM=M-1 -D=M -@LCL -M=D -@R13 -A=M -0;JMP -@SP -A=M -M=D -@LCL -D=M -@SP -AM=M+1 -M=D -@ARG -D=M -@SP -AM=M+1 -M=D -@THIS -D=M -@SP -AM=M+1 -M=D -@THAT -D=M -@SP -AM=M+1 -M=D -@4 -D=A -@R13 -D=D+M -@SP -D=M-D -@ARG -M=D -@SP -MD=M+1 -@LCL -M=D -@R14 -A=M -0;JMP -@0 -D=A -@R13 -M=D -@sys.init -D=A -@R14 -M=D -@RET_ADDRESS_CALL0 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL0) -(ball.new) -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@memory.alloc -D=A -@R14 -M=D -@RET_ADDRESS_CALL1 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL1) -@SP -AM=M-1 -D=M -@THIS -M=D -@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 -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@10 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@THIS -D=M -@11 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@12 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@5 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@THIS -D=M -@13 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@SP -M=M+1 -A=M-1 -M=0 -@THIS -D=M -@14 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ball.show -D=A -@R14 -M=D -@RET_ADDRESS_CALL2 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL2) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(ball.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_CALL3 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL3) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ball.show) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -A=M-1 -M=!M -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL4 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL4) -@SP -AM=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 -@ball.draw -D=A -@R14 -M=D -@RET_ADDRESS_CALL5 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL5) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ball.hide) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -@SP -M=M+1 -A=M-1 -M=0 -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL6 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL6) -@SP -AM=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 -@ball.draw -D=A -@R14 -M=D -@RET_ADDRESS_CALL7 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL7) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ball.draw) -@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 -@THIS -A=M+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 -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL8 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL8) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ball.getleft) -@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 -@54 -0;JMP -(ball.getright) -@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 -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@54 -0;JMP -(ball.setdestination) -@3 -D=A -(LOOP_ball.setdestination) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_ball.setdestination -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 -@ARG -A=M+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 -@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 -@ARG -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=M-D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -M=D -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL9 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL9) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL10 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL10) -@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 -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT0 -D=A -@38 -0;JMP -(RET_ADDRESS_LT0) -@THIS -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@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.setdestination$if_true0 -D;JNE -@ball.setdestination$if_false0 -0;JMP -(ball.setdestination$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 -A=A+1 -M=D -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT1 -D=A -@38 -0;JMP -(RET_ADDRESS_LT1) -@THIS -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -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_LT2 -D=A -@38 -0;JMP -(RET_ADDRESS_LT2) -@THIS -D=M -@9 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ball.setdestination$if_end0 -0;JMP -(ball.setdestination$if_false0) -@THIS -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_LT3 -D=A -@38 -0;JMP -(RET_ADDRESS_LT3) -@THIS -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT4 -D=A -@38 -0;JMP -(RET_ADDRESS_LT4) -@THIS -D=M -@9 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(ball.setdestination$if_end0) -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL11 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL11) -@LCL -A=M -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 -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL12 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL12) -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@SP -AM=M+1 -A=A-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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL13 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL13) -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ball.move) -@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 -@ball.hide -D=A -@R14 -M=D -@RET_ADDRESS_CALL14 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL14) -@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 -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT5 -D=A -@38 -0;JMP -(RET_ADDRESS_LT5) -@SP -AM=M-1 -D=M -@ball.move$if_true0 -D;JNE -@ball.move$if_false0 -0;JMP -(ball.move$if_true0) -@THIS -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@5 -A=D+A -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 -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ball.move$if_end0 -0;JMP -(ball.move$if_false0) -@THIS -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@6 -A=D+A -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 -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@THIS -D=M -@9 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=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 -M=D -@THIS -D=M -@10 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT0 -D=A -@22 -0;JMP -(RET_ADDRESS_GT0) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ball.move$if_true7 -D;JNE -@ball.move$if_false7 -0;JMP -(ball.move$if_true7) -@SP -M=M+1 -A=M-1 -M=1 -@THIS -D=M -@14 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -D=M -@10 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M -M=D -(ball.move$if_false7) -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@11 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT6 -D=A -@38 -0;JMP -(RET_ADDRESS_LT6) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ball.move$if_true8 -D;JNE -@ball.move$if_false8 -0;JMP -(ball.move$if_true8) -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@14 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -D=M -@11 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M -M=D -(ball.move$if_false8) -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@12 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT1 -D=A -@22 -0;JMP -(RET_ADDRESS_GT1) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ball.move$if_true9 -D;JNE -@ball.move$if_false9 -0;JMP -(ball.move$if_true9) -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@14 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -D=M -@12 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -M=D -(ball.move$if_false9) -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@13 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT7 -D=A -@38 -0;JMP -(RET_ADDRESS_LT7) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ball.move$if_true10 -D;JNE -@ball.move$if_false10 -0;JMP -(ball.move$if_true10) -@4 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@14 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THIS -D=M -@13 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -M=D -(ball.move$if_false10) -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ball.show -D=A -@R14 -M=D -@RET_ADDRESS_CALL15 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL15) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -D=M -@14 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(ball.bounce) -@5 -D=A -(LOOP_ball.bounce) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_ball.bounce -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 -@10 -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_CALL16 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL16) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@THIS -D=M -@3 -A=D+A -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.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL17 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL17) -@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 -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_EQ0 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ0) -@SP -AM=M-1 -D=M -@ball.bounce$if_true0 -D;JNE -@ball.bounce$if_false0 -0;JMP -(ball.bounce$if_true0) -@10 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ball.bounce$if_end0 -0;JMP -(ball.bounce$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=0 -@RET_ADDRESS_LT8 -D=A -@38 -0;JMP -(RET_ADDRESS_LT8) -@SP -A=M-1 -M=!M -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@RET_ADDRESS_EQ1 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ1) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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_LT9 -D=A -@38 -0;JMP -(RET_ADDRESS_LT9) -@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 -@SP -M=M+1 -A=M-1 -M=1 -@SP -A=M-1 -D=!M -M=D+1 -@RET_ADDRESS_EQ2 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ2) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -AM=M-1 -D=M -@ball.bounce$if_true1 -D;JNE -@ball.bounce$if_false1 -0;JMP -(ball.bounce$if_true1) -@20 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ball.bounce$if_end1 -0;JMP -(ball.bounce$if_false1) -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -(ball.bounce$if_end1) -(ball.bounce$if_end0) -@THIS -D=M -@14 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@RET_ADDRESS_EQ3 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ3) -@SP -AM=M-1 -D=M -@ball.bounce$if_true2 -D;JNE -@ball.bounce$if_false2 -0;JMP -(ball.bounce$if_true2) -@506 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@50 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -A=M-1 -D=!M -M=D+1 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL18 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL18) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL19 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL19) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@THIS -A=M+1 -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 -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL20 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL20) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@ball.bounce$if_end2 -0;JMP -(ball.bounce$if_false2) -@THIS -D=M -@14 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ4 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ4) -@SP -AM=M-1 -D=M -@ball.bounce$if_true3 -D;JNE -@ball.bounce$if_false3 -0;JMP -(ball.bounce$if_true3) -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@50 -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_CALL21 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL21) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL22 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL22) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@THIS -A=M+1 -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 -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL23 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL23) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@ball.bounce$if_end3 -0;JMP -(ball.bounce$if_false3) -@THIS -D=M -@14 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ5 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ5) -@SP -AM=M-1 -D=M -@ball.bounce$if_true4 -D;JNE -@ball.bounce$if_false4 -0;JMP -(ball.bounce$if_true4) -@250 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@25 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -A=M-1 -D=!M -M=D+1 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL24 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL24) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL25 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL25) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -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 -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL26 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL26) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@ball.bounce$if_end4 -0;JMP -(ball.bounce$if_false4) -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@25 -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_CALL27 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL27) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL28 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL28) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -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 -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL29 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL29) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(ball.bounce$if_end4) -(ball.bounce$if_end3) -(ball.bounce$if_end2) -@THIS -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 -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@R13 -M=D -@ball.setdestination -D=A -@R14 -M=D -@RET_ADDRESS_CALL30 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL30) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.new) -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@memory.alloc -D=A -@R14 -M=D -@RET_ADDRESS_CALL31 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL31) -@SP -AM=M-1 -D=M -@THIS -M=D -@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 -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@bat.show -D=A -@R14 -M=D -@RET_ADDRESS_CALL32 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL32) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(bat.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_CALL33 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL33) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.show) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -A=M-1 -M=!M -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL34 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL34) -@SP -AM=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 -@bat.draw -D=A -@R14 -M=D -@RET_ADDRESS_CALL35 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL35) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.hide) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -@SP -M=M+1 -A=M-1 -M=0 -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL36 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL36) -@SP -AM=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 -@bat.draw -D=A -@R14 -M=D -@RET_ADDRESS_CALL37 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL37) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.draw) -@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 -@THIS -A=M+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 -@THIS -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 -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL38 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL38) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.setdirection) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.getleft) -@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 -@54 -0;JMP -(bat.getright) -@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 -@THIS -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 -@54 -0;JMP -(bat.setwidth) -@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 -@bat.hide -D=A -@R14 -M=D -@RET_ADDRESS_CALL39 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL39) -@SP -AM=M-1 -D=M -@R5 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@1 -D=A -@R13 -M=D -@bat.show -D=A -@R14 -M=D -@RET_ADDRESS_CALL40 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL40) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(bat.move) -@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 -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@RET_ADDRESS_EQ6 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ6) -@SP -AM=M-1 -D=M -@bat.move$if_true0 -D;JNE -@bat.move$if_false0 -0;JMP -(bat.move$if_true0) -@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 -@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_LT10 -D=A -@38 -0;JMP -(RET_ADDRESS_LT10) -@SP -AM=M-1 -D=M -@bat.move$if_true1 -D;JNE -@bat.move$if_false1 -0;JMP -(bat.move$if_true1) -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@THIS -A=M -M=D -(bat.move$if_false1) -@SP -M=M+1 -A=M-1 -M=0 -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL41 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL41) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -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 -M=M+1 -A=M-1 -M=1 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@THIS -A=M+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 -@THIS -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 -@4 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL42 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL42) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -A=M-1 -M=!M -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL43 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL43) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -A=M -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 -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL44 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL44) -@SP -AM=M-1 -D=M -@R5 -M=D -@bat.move$if_end0 -0;JMP -(bat.move$if_false0) -@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 -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -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 -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT2 -D=A -@22 -0;JMP -(RET_ADDRESS_GT2) -@SP -AM=M-1 -D=M -@bat.move$if_true2 -D;JNE -@bat.move$if_false2 -0;JMP -(bat.move$if_true2) -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@THIS -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=M-D -@SP -AM=M-1 -D=M -@THIS -A=M -M=D -(bat.move$if_false2) -@SP -M=M+1 -A=M-1 -M=0 -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL45 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL45) -@SP -AM=M-1 -D=M -@R5 -M=D -@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 -@THIS -A=M+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 -@SP -M=M+1 -A=M-1 -M=1 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL46 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL46) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -A=M-1 -M=!M -@1 -D=A -@R13 -M=D -@screen.setcolor -D=A -@R14 -M=D -@RET_ADDRESS_CALL47 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL47) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -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 -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@THIS -A=M+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 -@THIS -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 -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL48 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL48) -@SP -AM=M-1 -D=M -@R5 -M=D -(bat.move$if_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(main.main) -@SP -AM=M+1 -A=A-1 -M=0 -@0 -D=A -@R13 -M=D -@ponggame.newinstance -D=A -@R14 -M=D -@RET_ADDRESS_CALL49 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL49) -@SP -AM=M-1 -D=M -@R5 -M=D -@0 -D=A -@R13 -M=D -@ponggame.getinstance -D=A -@R14 -M=D -@RET_ADDRESS_CALL50 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL50) -@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 -@ponggame.run -D=A -@R14 -M=D -@RET_ADDRESS_CALL51 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL51) -@SP -AM=M-1 -D=M -@R5 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ponggame.dispose -D=A -@R14 -M=D -@RET_ADDRESS_CALL52 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL52) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ponggame.new) -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@memory.alloc -D=A -@R14 -M=D -@RET_ADDRESS_CALL53 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL53) -@SP -AM=M-1 -D=M -@THIS -M=D -@0 -D=A -@R13 -M=D -@screen.clearscreen -D=A -@R14 -M=D -@RET_ADDRESS_CALL54 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL54) -@SP -AM=M-1 -D=M -@R5 -M=D -@50 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@230 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@229 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@4 -D=A -@R13 -M=D -@bat.new -D=A -@R14 -M=D -@RET_ADDRESS_CALL55 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL55) -@SP -AM=M-1 -D=M -@THIS -A=M -M=D -@253 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@222 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@229 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@R13 -M=D -@ball.new -D=A -@R14 -M=D -@RET_ADDRESS_CALL56 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL56) -@SP -AM=M-1 -D=M -@THIS -A=M+1 -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@400 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@3 -D=A -@R13 -M=D -@ball.setdestination -D=A -@R14 -M=D -@RET_ADDRESS_CALL57 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL57) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@238 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@240 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@4 -D=A -@R13 -M=D -@screen.drawrectangle -D=A -@R14 -M=D -@RET_ADDRESS_CALL58 -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 -@output.printstring -D=A -@R14 -M=D -@RET_ADDRESS_CALL69 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL69) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -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 -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(ponggame.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 -@1 -D=A -@R13 -M=D -@bat.dispose -D=A -@R14 -M=D -@RET_ADDRESS_CALL70 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL70) -@SP -AM=M-1 -D=M -@R5 -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ball.dispose -D=A -@R14 -M=D -@RET_ADDRESS_CALL71 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL71) -@SP -AM=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 -@memory.dealloc -D=A -@R14 -M=D -@RET_ADDRESS_CALL72 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL72) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ponggame.newinstance) -@0 -D=A -@R13 -M=D -@ponggame.new -D=A -@R14 -M=D -@RET_ADDRESS_CALL73 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL73) -@SP -AM=M-1 -D=M -@ponggame.0 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(ponggame.getinstance) -@ponggame.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(ponggame.run) -@SP -AM=M+1 -A=A-1 -M=0 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -M=D -(ponggame.run$while_exp0) -@THIS -D=M -@3 -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 -@ponggame.run$while_end0 -D;JNE -(ponggame.run$while_exp1) -@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_EQ7 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ7) -@THIS -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 -A=A-1 -M=D&M -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ponggame.run$while_end1 -D;JNE -@0 -D=A -@R13 -M=D -@keyboard.keypressed -D=A -@R14 -M=D -@RET_ADDRESS_CALL74 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL74) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@bat.move -D=A -@R14 -M=D -@RET_ADDRESS_CALL75 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL75) -@SP -AM=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 -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_EQ11 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ11) -@SP -A=M-1 -M=!M -@THIS -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 -A=A-1 -M=D&M -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@ponggame.run$while_end2 -D;JNE -@0 -D=A -@R13 -M=D -@keyboard.keypressed -D=A -@R14 -M=D -@RET_ADDRESS_CALL79 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL79) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@bat.move -D=A -@R14 -M=D -@RET_ADDRESS_CALL80 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL80) -@SP -AM=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_CALL81 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL81) -@SP -AM=M-1 -D=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 -(RET_ADDRESS_CALL94) -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -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_GT3 -D=A -@22 -0;JMP -(RET_ADDRESS_GT3) -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@5 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ12 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ12) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -AM=M-1 -D=M -@ponggame.moveball$if_true0 -D;JNE -@ponggame.moveball$if_false0 -0;JMP -(ponggame.moveball$if_true0) -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@bat.getleft -D=A -@R14 -M=D -@RET_ADDRESS_CALL95 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL95) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@bat.getright -D=A -@R14 -M=D -@RET_ADDRESS_CALL96 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL96) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ball.getleft -D=A -@R14 -M=D -@RET_ADDRESS_CALL97 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL97) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -@THIS -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@ball.getright -D=A -@R14 -M=D -@RET_ADDRESS_CALL98 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL98) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@4 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ13 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ13) -@SP -AM=M-1 -D=M -@ponggame.moveball$if_true1 -D;JNE -@ponggame.moveball$if_false1 -0;JMP -(ponggame.moveball$if_true1) -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT4 -D=A -@22 -0;JMP -(RET_ADDRESS_GT4) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT11 -D=A -@38 -0;JMP -(RET_ADDRESS_LT11) -@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 -A=A+1 -M=D -@THIS -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 -@ponggame.moveball$if_true2 -D;JNE -@ponggame.moveball$if_false2 -0;JMP -(ponggame.moveball$if_true2) -@LCL -D=M -@4 -A=D+A -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 -@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 -@LCL -A=M -M=D -(ponggame.moveball$if_false4) -(ponggame.moveball$if_end3) -@THIS -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -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 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@THIS -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@bat.setwidth -D=A -@R14 -M=D -@RET_ADDRESS_CALL99 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL99) -@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 -@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 -A=A+1 -A=A+1 -M=D -@22 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@7 -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_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;JMP -(math.init) -@SP -AM=M+1 -A=A-1 -M=0 -@16 -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_CALL122 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL122) -@SP -AM=M-1 -D=M -@math.1 -M=D -@16 -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_CALL123 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL123) -@SP -AM=M-1 -D=M -@math.0 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@math.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@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 -(math.init$while_exp0) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT13 -D=A -@38 -0;JMP -(RET_ADDRESS_LT13) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.init$while_end0 -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 -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@math.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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=M-D -@math.0 -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 -@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=M-D -@math.0 -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 -A=A-1 -M=D+M -@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 -@math.init$while_exp0 -0;JMP -(math.init$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(math.abs) -@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_LT14 -D=A -@38 -0;JMP -(RET_ADDRESS_LT14) -@SP -AM=M-1 -D=M -@math.abs$if_true0 -D;JNE -@math.abs$if_false0 -0;JMP -(math.abs$if_true0) -@ARG -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 -@ARG -A=M -M=D -(math.abs$if_false0) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(math.multiply) -@5 -D=A -(LOOP_math.multiply) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_math.multiply -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_LT15 -D=A -@38 -0;JMP -(RET_ADDRESS_LT15) -@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_GT9 -D=A -@22 -0;JMP -(RET_ADDRESS_GT9) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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_GT10 -D=A -@22 -0;JMP -(RET_ADDRESS_GT10) -@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_LT16 -D=A -@38 -0;JMP -(RET_ADDRESS_LT16) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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 -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 -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL124 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL124) -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL125 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL125) -@SP -AM=M-1 -D=M -@ARG -A=M+1 -M=D -@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_LT17 -D=A -@38 -0;JMP -(RET_ADDRESS_LT17) -@SP -AM=M-1 -D=M -@math.multiply$if_true0 -D;JNE -@math.multiply$if_false0 -0;JMP -(math.multiply$if_true0) -@ARG -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 -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M+1 -M=D -(math.multiply$if_false0) -(math.multiply$while_exp0) -@LCL -A=M+1 -A=A+1 -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_LT18 -D=A -@38 -0;JMP -(RET_ADDRESS_LT18) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.multiply$while_end0 -D;JNE -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@math.0 -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+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 -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_GT11 -D=A -@22 -0;JMP -(RET_ADDRESS_GT11) -@SP -AM=M-1 -D=M -@math.multiply$if_true1 -D;JNE -@math.multiply$if_false1 -0;JMP -(math.multiply$if_true1) -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@math.0 -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 -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -(math.multiply$if_false1) -@ARG -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@LCL -D=M -@3 -A=D+A -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 -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 -@R14 -M=D -@RET_ADDRESS_CALL126 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL126) -@SP -AM=M-1 -D=M -@R5 -M=D -(math.divide$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_LT19 -D=A -@38 -0;JMP -(RET_ADDRESS_LT19) -@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_GT12 -D=A -@22 -0;JMP -(RET_ADDRESS_GT12) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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_GT13 -D=A -@22 -0;JMP -(RET_ADDRESS_GT13) -@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_LT20 -D=A -@38 -0;JMP -(RET_ADDRESS_LT20) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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 -@SP -M=M+1 -A=M-1 -M=0 -@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 -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL127 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL127) -@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 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL128 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL128) -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -(math.divide$while_exp0) -@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 -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.divide$while_end0 -D;JNE -@32767 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@RET_ADDRESS_LT21 -D=A -@38 -0;JMP -(RET_ADDRESS_LT21) -@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_true1 -D;JNE -@math.divide$if_false1 -0;JMP -(math.divide$if_true1) -@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 -@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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@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 -@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 -D=!M -M=D+1 -@RET_ADDRESS_GT15 -D=A -@22 -0;JMP -(RET_ADDRESS_GT15) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.divide$while_end1 -D;JNE -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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_GT16 -D=A -@22 -0;JMP -(RET_ADDRESS_GT16) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.divide$if_true3 -D;JNE -@math.divide$if_false3 -0;JMP -(math.divide$if_true3) -@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 -@math.0 -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 -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@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 -@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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -(math.divide$if_false3) -@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=M-D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@math.divide$while_exp1 -0;JMP -(math.divide$while_end1) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@math.divide$if_true4 -D;JNE -@math.divide$if_false4 -0;JMP -(math.divide$if_true4) -@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 -(math.divide$if_false4) -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(math.sqrt) -@4 -D=A -(LOOP_math.sqrt) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_math.sqrt -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_LT22 -D=A -@38 -0;JMP -(RET_ADDRESS_LT22) -@SP -AM=M-1 -D=M -@math.sqrt$if_true0 -D;JNE -@math.sqrt$if_false0 -0;JMP -(math.sqrt$if_true0) -@4 -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_CALL129 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL129) -@SP -AM=M-1 -D=M -@R5 -M=D -(math.sqrt$if_false0) -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(math.sqrt$while_exp0) -@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 -@RET_ADDRESS_GT17 -D=A -@22 -0;JMP -(RET_ADDRESS_GT17) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@math.sqrt$while_end0 -D;JNE -@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 -@math.0 -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 -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+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL130 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL130) -@SP -AM=M-1 -D=M -@LCL -A=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 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT18 -D=A -@22 -0;JMP -(RET_ADDRESS_GT18) -@SP -A=M-1 -M=!M -@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_LT23 -D=A -@38 -0;JMP -(RET_ADDRESS_LT23) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -AM=M-1 -D=M -@math.sqrt$if_true1 -D;JNE -@math.sqrt$if_false1 -0;JMP -(math.sqrt$if_true1) -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -(math.sqrt$if_false1) -@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=M-D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@math.sqrt$while_exp0 -0;JMP -(math.sqrt$while_end0) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(math.max) -@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_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 -AM=M-1 -D=M -@memory.0 -M=D -@2048 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@memory.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@14334 -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 -@2049 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@memory.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@2050 -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=0 -@54 -0;JMP -(memory.peek) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@memory.0 -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 -@54 -0;JMP -(memory.poke) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@memory.0 -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 -@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=0 -@54 -0;JMP -(memory.alloc) -@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=1 -@RET_ADDRESS_LT25 -D=A -@38 -0;JMP -(RET_ADDRESS_LT25) -@SP -AM=M-1 -D=M -@memory.alloc$if_true0 -D;JNE -@memory.alloc$if_false0 -0;JMP -(memory.alloc$if_true0) -@5 -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_CALL131 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL131) -@SP -AM=M-1 -D=M -@R5 -M=D -(memory.alloc$if_false0) -@2048 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(memory.alloc$while_exp0) -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -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_LT26 -D=A -@38 -0;JMP -(RET_ADDRESS_LT26) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@memory.alloc$while_end0 -D;JNE -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -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 -@memory.alloc$while_exp0 -0;JMP -(memory.alloc$while_end0) -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@16379 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT20 -D=A -@22 -0;JMP -(RET_ADDRESS_GT20) -@SP -AM=M-1 -D=M -@memory.alloc$if_true1 -D;JNE -@memory.alloc$if_false1 -0;JMP -(memory.alloc$if_true1) -@6 -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_CALL132 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL132) -@SP -AM=M-1 -D=M -@R5 -M=D -(memory.alloc$if_false1) -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -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 -@2 -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_GT21 -D=A -@22 -0;JMP -(RET_ADDRESS_GT21) -@SP -AM=M-1 -D=M -@memory.alloc$if_true2 -D;JNE -@memory.alloc$if_false2 -0;JMP -(memory.alloc$if_true2) -@ARG -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -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 -@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 -@LCL -A=M -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 -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@RET_ADDRESS_EQ18 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ18) -@SP -AM=M-1 -D=M -@memory.alloc$if_true3 -D;JNE -@memory.alloc$if_false3 -0;JMP -(memory.alloc$if_true3) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@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 -@memory.alloc$if_end3 -0;JMP -(memory.alloc$if_false3) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -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 -@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 -(memory.alloc$if_end3) -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -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 -@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 -(memory.alloc$if_false2) -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=0 -@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 -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@54 -0;JMP -(memory.dealloc) -@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 -@2 -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 -@LCL -A=M -M=D -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -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+1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@LCL -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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_EQ19 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ19) -@SP -AM=M-1 -D=M -@memory.dealloc$if_true0 -D;JNE -@memory.dealloc$if_false0 -0;JMP -(memory.dealloc$if_true0) -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -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 -@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 -@memory.dealloc$if_end0 -0;JMP -(memory.dealloc$if_false0) -@SP -M=M+1 -A=M-1 -M=0 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -M=M+1 -A=M-1 -M=0 -@LCL -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 -@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 -A=A-1 -M=D+M -@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 -@LCL -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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -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 -@2 -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_EQ20 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ20) -@SP -AM=M-1 -D=M -@memory.dealloc$if_true1 -D;JNE -@memory.dealloc$if_false1 -0;JMP -(memory.dealloc$if_true1) -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@memory.dealloc$if_end1 -0;JMP -(memory.dealloc$if_false1) -@SP -M=M+1 -A=M-1 -M=1 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@LCL -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 -@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 -@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 -(memory.dealloc$if_end1) -(memory.dealloc$if_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(output.init) -@16384 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@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 -@1 -D=A -@R13 -M=D -@array.new -D=A -@R14 -M=D -@RET_ADDRESS_CALL136 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL136) -@SP -AM=M-1 -D=M -@output.5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL137 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL137) -@SP -AM=M-1 -D=M -@R5 -M=D -@32 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL138 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL138) -@SP -AM=M-1 -D=M -@R5 -M=D -@33 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL139 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL139) -@SP -AM=M-1 -D=M -@R5 -M=D -@34 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@20 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL140 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL140) -@SP -AM=M-1 -D=M -@R5 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL141 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL141) -@SP -AM=M-1 -D=M -@R5 -M=D -@36 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL142 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL142) -@SP -AM=M-1 -D=M -@R5 -M=D -@37 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@49 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL143 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL143) -@SP -AM=M-1 -D=M -@R5 -M=D -@38 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL144 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL144) -@SP -AM=M-1 -D=M -@R5 -M=D -@39 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL145 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL145) -@SP -AM=M-1 -D=M -@R5 -M=D -@40 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL146 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL146) -@SP -AM=M-1 -D=M -@R5 -M=D -@41 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL147 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL147) -@SP -AM=M-1 -D=M -@R5 -M=D -@42 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL148 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL148) -@SP -AM=M-1 -D=M -@R5 -M=D -@43 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL149 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL149) -@SP -AM=M-1 -D=M -@R5 -M=D -@44 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL150 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL150) -@SP -AM=M-1 -D=M -@R5 -M=D -@45 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL151 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL151) -@SP -AM=M-1 -D=M -@R5 -M=D -@46 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL152 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL152) -@SP -AM=M-1 -D=M -@R5 -M=D -@47 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@32 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL153 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL153) -@SP -AM=M-1 -D=M -@R5 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL154 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL154) -@SP -AM=M-1 -D=M -@R5 -M=D -@49 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL155 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL155) -@SP -AM=M-1 -D=M -@R5 -M=D -@50 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL156 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL156) -@SP -AM=M-1 -D=M -@R5 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL157 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL157) -@SP -AM=M-1 -D=M -@R5 -M=D -@52 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@16 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@26 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@25 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@60 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL158 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL158) -@SP -AM=M-1 -D=M -@R5 -M=D -@53 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL159 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL159) -@SP -AM=M-1 -D=M -@R5 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL160 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL160) -@SP -AM=M-1 -D=M -@R5 -M=D -@55 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@49 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL161 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL161) -@SP -AM=M-1 -D=M -@R5 -M=D -@56 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL162 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL162) -@SP -AM=M-1 -D=M -@R5 -M=D -@57 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@62 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL163 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL163) -@SP -AM=M-1 -D=M -@R5 -M=D -@58 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL164 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL164) -@SP -AM=M-1 -D=M -@R5 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL165 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL165) -@SP -AM=M-1 -D=M -@R5 -M=D -@60 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL166 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL166) -@SP -AM=M-1 -D=M -@R5 -M=D -@61 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL167 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL167) -@SP -AM=M-1 -D=M -@R5 -M=D -@62 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL168 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL168) -@SP -AM=M-1 -D=M -@R5 -M=D -@64 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL169 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL169) -@SP -AM=M-1 -D=M -@R5 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL170 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL170) -@SP -AM=M-1 -D=M -@R5 -M=D -@65 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL171 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL171) -@SP -AM=M-1 -D=M -@R5 -M=D -@66 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL172 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL172) -@SP -AM=M-1 -D=M -@R5 -M=D -@67 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL173 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL173) -@SP -AM=M-1 -D=M -@R5 -M=D -@68 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL174 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL174) -@SP -AM=M-1 -D=M -@R5 -M=D -@69 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL175 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL175) -@SP -AM=M-1 -D=M -@R5 -M=D -@70 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL176 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL176) -@SP -AM=M-1 -D=M -@R5 -M=D -@71 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@44 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL177 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL177) -@SP -AM=M-1 -D=M -@R5 -M=D -@72 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL178 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL178) -@SP -AM=M-1 -D=M -@R5 -M=D -@73 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL179 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL179) -@SP -AM=M-1 -D=M -@R5 -M=D -@74 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@60 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL180 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL180) -@SP -AM=M-1 -D=M -@R5 -M=D -@75 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL181 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL181) -@SP -AM=M-1 -D=M -@R5 -M=D -@76 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL182 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL182) -@SP -AM=M-1 -D=M -@R5 -M=D -@77 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@33 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL183 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL183) -@SP -AM=M-1 -D=M -@R5 -M=D -@78 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@55 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@55 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL184 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL184) -@SP -AM=M-1 -D=M -@R5 -M=D -@79 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL185 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL185) -@SP -AM=M-1 -D=M -@R5 -M=D -@80 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL186 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL186) -@SP -AM=M-1 -D=M -@R5 -M=D -@81 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@59 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL187 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL187) -@SP -AM=M-1 -D=M -@R5 -M=D -@82 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL188 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL188) -@SP -AM=M-1 -D=M -@R5 -M=D -@83 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL189 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL189) -@SP -AM=M-1 -D=M -@R5 -M=D -@84 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@45 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL190 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL190) -@SP -AM=M-1 -D=M -@R5 -M=D -@85 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL191 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL191) -@SP -AM=M-1 -D=M -@R5 -M=D -@86 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL192 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL192) -@SP -AM=M-1 -D=M -@R5 -M=D -@87 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL193 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL193) -@SP -AM=M-1 -D=M -@R5 -M=D -@88 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL194 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL194) -@SP -AM=M-1 -D=M -@R5 -M=D -@89 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL195 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL195) -@SP -AM=M-1 -D=M -@R5 -M=D -@90 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@49 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@35 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL196 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL196) -@SP -AM=M-1 -D=M -@R5 -M=D -@91 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL197 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL197) -@SP -AM=M-1 -D=M -@R5 -M=D -@92 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=1 -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@32 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL198 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL198) -@SP -AM=M-1 -D=M -@R5 -M=D -@93 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL199 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL199) -@SP -AM=M-1 -D=M -@R5 -M=D -@94 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@8 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL200 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL200) -@SP -AM=M-1 -D=M -@R5 -M=D -@95 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL201 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL201) -@SP -AM=M-1 -D=M -@R5 -M=D -@96 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL202 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL202) -@SP -AM=M-1 -D=M -@R5 -M=D -@97 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL203 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL203) -@SP -AM=M-1 -D=M -@R5 -M=D -@98 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL204 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL204) -@SP -AM=M-1 -D=M -@R5 -M=D -@99 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL205 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL205) -@SP -AM=M-1 -D=M -@R5 -M=D -@100 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@60 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL206 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL206) -@SP -AM=M-1 -D=M -@R5 -M=D -@101 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL207 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL207) -@SP -AM=M-1 -D=M -@R5 -M=D -@102 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@38 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL208 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL208) -@SP -AM=M-1 -D=M -@R5 -M=D -@103 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@62 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL209 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL209) -@SP -AM=M-1 -D=M -@R5 -M=D -@104 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@55 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL210 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL210) -@SP -AM=M-1 -D=M -@R5 -M=D -@105 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL211 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL211) -@SP -AM=M-1 -D=M -@R5 -M=D -@106 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@56 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL212 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL212) -@SP -AM=M-1 -D=M -@R5 -M=D -@107 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL213 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL213) -@SP -AM=M-1 -D=M -@R5 -M=D -@108 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@14 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL214 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL214) -@SP -AM=M-1 -D=M -@R5 -M=D -@109 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@29 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@43 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@43 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@43 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@43 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL215 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL215) -@SP -AM=M-1 -D=M -@R5 -M=D -@110 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@29 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL216 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL216) -@SP -AM=M-1 -D=M -@R5 -M=D -@111 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL217 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL217) -@SP -AM=M-1 -D=M -@R5 -M=D -@112 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@31 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL218 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL218) -@SP -AM=M-1 -D=M -@R5 -M=D -@113 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@62 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL219 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL219) -@SP -AM=M-1 -D=M -@R5 -M=D -@114 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@29 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@55 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL220 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL220) -@SP -AM=M-1 -D=M -@R5 -M=D -@115 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL221 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL221) -@SP -AM=M-1 -D=M -@R5 -M=D -@116 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@4 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@28 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL222 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL222) -@SP -AM=M-1 -D=M -@R5 -M=D -@117 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@54 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL223 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL223) -@SP -AM=M-1 -D=M -@R5 -M=D -@118 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL224 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL224) -@SP -AM=M-1 -D=M -@R5 -M=D -@119 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@18 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL225 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL225) -@SP -AM=M-1 -D=M -@R5 -M=D -@120 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@30 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL226 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL226) -@SP -AM=M-1 -D=M -@R5 -M=D -@121 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@62 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@24 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@15 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL227 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL227) -@SP -AM=M-1 -D=M -@R5 -M=D -@122 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@27 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@51 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@63 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL228 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL228) -@SP -AM=M-1 -D=M -@R5 -M=D -@123 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@56 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@56 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL229 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL229) -@SP -AM=M-1 -D=M -@R5 -M=D -@124 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL230 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL230) -@SP -AM=M-1 -D=M -@R5 -M=D -@125 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@56 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@12 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL231 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL231) -@SP -AM=M-1 -D=M -@R5 -M=D -@126 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@38 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@45 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@25 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@SP -M=M+1 -A=M-1 -M=0 -@12 -D=A -@R13 -M=D -@output.create -D=A -@R14 -M=D -@RET_ADDRESS_CALL232 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL232) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(output.create) -@SP -AM=M+1 -A=A-1 -M=0 -@11 -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_CALL233 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL233) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@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 -@LCL -A=M -D=M -@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=0 -@LCL -A=M -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 -@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 -@LCL -A=M -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 -A=A+1 -D=M -@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 -@2 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@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 -@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 -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@4 -A=D+A -D=M -@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 -@4 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@5 -A=D+A -D=M -@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 -@5 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@6 -A=D+A -D=M -@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 -@6 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@7 -A=D+A -D=M -@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 -@7 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@8 -A=D+A -D=M -@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 -@8 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@9 -A=D+A -D=M -@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 -@9 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@10 -A=D+A -D=M -@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 -@10 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@ARG -D=M -@11 -A=D+A -D=M -@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=0 -@54 -0;JMP -(output.createshiftedmap) -@4 -D=A -(LOOP_output.createshiftedmap) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_output.createshiftedmap -D;JGT -@127 -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_CALL234 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL234) -@SP -AM=M-1 -D=M -@output.6 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -(output.createshiftedmap$while_exp0) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@127 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT27 -D=A -@38 -0;JMP -(RET_ADDRESS_LT27) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@output.createshiftedmap$while_end0 -D;JNE -@LCL -A=M+1 -A=A+1 -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 -@11 -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_CALL235 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL235) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@output.6 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@LCL -A=M+1 -D=M -@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=0 -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -(output.createshiftedmap$while_exp1) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT28 -D=A -@38 -0;JMP -(RET_ADDRESS_LT28) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@output.createshiftedmap$while_end1 -D;JNE -@LCL -D=M -@3 -A=D+A -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@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 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL236 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL236) -@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 -@LCL -D=M -@3 -A=D+A -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 -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 -0;JMP -(output.getmap$if_false1) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@output.6 -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) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(output.drawchar) -@4 -D=A -(LOOP_output.drawchar) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_output.drawchar -D;JGT -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@output.getmap -D=A -@R14 -M=D -@RET_ADDRESS_CALL237 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL237) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@output.1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(output.drawchar$while_exp0) -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@11 -D=A -@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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@255 -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 -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -(output.drawchar$if_end0) -@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 -@LCL -A=M+1 -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 -@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 -@LCL -D=M -@3 -A=D+A -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 -@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 -@LCL -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@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 -@output.drawchar$while_exp0 -0;JMP -(output.drawchar$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(output.movecursor) -@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_LT31 -D=A -@38 -0;JMP -(RET_ADDRESS_LT31) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@22 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT23 -D=A -@22 -0;JMP -(RET_ADDRESS_GT23) -@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 -@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 -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@352 -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_CALL240 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL240) -@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=D+M -@SP -AM=M-1 -D=M -@output.1 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@output.0 -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.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL241 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL241) -@RET_ADDRESS_EQ22 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ22) -@SP -AM=M-1 -D=M -@output.2 -M=D -@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_CALL242 -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 -@screen.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@SP -M=M+1 -A=M-1 -M=1 -@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 -(screen.init$while_exp0) -@LCL -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 -@RET_ADDRESS_LT34 -D=A -@38 -0;JMP -(RET_ADDRESS_LT34) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.init$while_end0 -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 -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@screen.0 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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=M-D -@screen.0 -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 -@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=M-D -@screen.0 -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 -A=A-1 -M=D+M -@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 -@screen.init$while_exp0 -0;JMP -(screen.init$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.clearscreen) -@SP -AM=M+1 -A=A-1 -M=0 -(screen.clearscreen$while_exp0) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@8192 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT35 -D=A -@38 -0;JMP -(RET_ADDRESS_LT35) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.clearscreen$while_end0 -D;JNE -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.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 -M=M+1 -A=M-1 -M=0 -@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 -@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.clearscreen$while_exp0 -0;JMP -(screen.clearscreen$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.updatelocation) -@screen.2 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@screen.updatelocation$if_true0 -D;JNE -@screen.updatelocation$if_false0 -0;JMP -(screen.updatelocation$if_true0) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.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 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.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+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 -@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 -@screen.updatelocation$if_end0 -0;JMP -(screen.updatelocation$if_false0) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.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 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.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+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@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 -(screen.updatelocation$if_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.setcolor) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@screen.2 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.drawpixel) -@3 -D=A -(LOOP_screen.drawpixel) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_screen.drawpixel -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_LT36 -D=A -@38 -0;JMP -(RET_ADDRESS_LT36) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT26 -D=A -@22 -0;JMP -(RET_ADDRESS_GT26) -@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 -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT37 -D=A -@38 -0;JMP -(RET_ADDRESS_LT37) -@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 -@255 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT27 -D=A -@22 -0;JMP -(RET_ADDRESS_GT27) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@screen.drawpixel$if_true0 -D;JNE -@screen.drawpixel$if_false0 -0;JMP -(screen.drawpixel$if_true0) -@7 -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_CALL256 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL256) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawpixel$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_CALL257 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL257) -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@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 -@16 -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_CALL258 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL258) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@32 -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_CALL259 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL259) -@LCL -A=M -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 -A=A+1 -M=D -@LCL -A=M+1 -A=A+1 -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 -@screen.0 -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 -@2 -D=A -@R13 -M=D -@screen.updatelocation -D=A -@R14 -M=D -@RET_ADDRESS_CALL260 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL260) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.drawconditional) -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@screen.drawconditional$if_true0 -D;JNE -@screen.drawconditional$if_false0 -0;JMP -(screen.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) -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT28 -D=A -@22 -0;JMP -(RET_ADDRESS_GT28) -@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 -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT39 -D=A -@38 -0;JMP -(RET_ADDRESS_LT39) -@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_GT29 -D=A -@22 -0;JMP -(RET_ADDRESS_GT29) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@screen.drawline$if_true0 -D;JNE -@screen.drawline$if_false0 -0;JMP -(screen.drawline$if_true0) -@8 -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_CALL263 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL263) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawline$if_false0) -@ARG -A=M+1 -A=A+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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL264 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL264) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -@ARG -D=M -@3 -A=D+A -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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=A -@R13 -M=D -@math.abs -D=A -@R14 -M=D -@RET_ADDRESS_CALL265 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL265) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@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 -@RET_ADDRESS_LT40 -D=A -@38 -0;JMP -(RET_ADDRESS_LT40) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@LCL -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -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_LT41 -D=A -@38 -0;JMP -(RET_ADDRESS_LT41) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@LCL -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -A=M-1 -M=!M -@ARG -A=M+1 -A=A+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 -@RET_ADDRESS_LT42 -D=A -@38 -0;JMP -(RET_ADDRESS_LT42) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@screen.drawline$if_true1 -D;JNE -@screen.drawline$if_false1 -0;JMP -(screen.drawline$if_true1) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M+1 -A=A+1 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M+1 -M=D -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M+1 -A=A+1 -A=A+1 -M=D -(screen.drawline$if_false1) -@LCL -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@screen.drawline$if_true2 -D;JNE -@screen.drawline$if_false2 -0;JMP -(screen.drawline$if_true2) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+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 -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 -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT30 -D=A -@22 -0;JMP -(RET_ADDRESS_GT30) -@LCL -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@screen.drawline$if_end2 -0;JMP -(screen.drawline$if_false2) -@ARG -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 -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT31 -D=A -@22 -0;JMP -(RET_ADDRESS_GT31) -@LCL -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(screen.drawline$if_end2) -@2 -D=A -@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 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL266 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL266) -@LCL -D=M -@3 -A=D+A -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 -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@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 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL267 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL267) -@LCL -D=M -@9 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@2 -D=A -@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 -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL268 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL268) -@LCL -D=M -@10 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -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_CALL269 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL269) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawline$while_exp0) -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@8 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT43 -D=A -@38 -0;JMP -(RET_ADDRESS_LT43) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.drawline$while_end0 -D;JNE -@LCL -D=M -@5 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT44 -D=A -@38 -0;JMP -(RET_ADDRESS_LT44) -@SP -AM=M-1 -D=M -@screen.drawline$if_true3 -D;JNE -@screen.drawline$if_false3 -0;JMP -(screen.drawline$if_true3) -@LCL -D=M -@5 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@9 -A=D+A -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 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@screen.drawline$if_end3 -0;JMP -(screen.drawline$if_false3) -@LCL -D=M -@5 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@10 -A=D+A -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 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@LCL -D=M -@7 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@screen.drawline$if_true4 -D;JNE -@screen.drawline$if_false4 -0;JMP -(screen.drawline$if_true4) -@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=M-D -@SP -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 -D=A -(LOOP_screen.drawrectangle) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_screen.drawrectangle -D;JGT -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT32 -D=A -@22 -0;JMP -(RET_ADDRESS_GT32) -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT33 -D=A -@22 -0;JMP -(RET_ADDRESS_GT33) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@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_LT45 -D=A -@38 -0;JMP -(RET_ADDRESS_LT45) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT34 -D=A -@22 -0;JMP -(RET_ADDRESS_GT34) -@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 -@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_ADDRESS_CALL272) -@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 -@LCL -D=M -@3 -A=D+A -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.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL273 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL273) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@LCL -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -A=M+1 -A=A+1 -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_CALL274 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL274) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@4 -A=D+A -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.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL275 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL275) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@LCL -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@7 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.0 -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 -M=M+1 -A=M-1 -M=1 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@LCL -D=M -@8 -A=D+A -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 -@screen.0 -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 -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 -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@32 -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_CALL276 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL276) -@LCL -D=M -@3 -A=D+A -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 -M=D -@LCL -D=M -@4 -A=D+A -D=M -@SP -AM=M+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 -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -(screen.drawrectangle$while_exp0) -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT36 -D=A -@22 -0;JMP -(RET_ADDRESS_GT36) -@SP -A=M-1 -M=!M -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.drawrectangle$while_end0 -D;JNE -@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 -@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 -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_EQ28 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ28) -@SP -AM=M-1 -D=M -@screen.drawrectangle$if_true1 -D;JNE -@screen.drawrectangle$if_false1 -0;JMP -(screen.drawrectangle$if_true1) -@LCL -A=M -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 -@LCL -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -D=A -@R13 -M=D -@screen.updatelocation -D=A -@R14 -M=D -@RET_ADDRESS_CALL277 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL277) -@SP -AM=M-1 -D=M -@R5 -M=D -@screen.drawrectangle$if_end1 -0;JMP -(screen.drawrectangle$if_false1) -@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 -@2 -D=A -@R13 -M=D -@screen.updatelocation -D=A -@R14 -M=D -@RET_ADDRESS_CALL278 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL278) -@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) -@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_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 -AM=M-1 -D=M -@R5 -M=D -(screen.drawrectangle$if_end1) -@ARG -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 -@ARG -A=M+1 -M=D -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@32 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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=M-D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@screen.drawrectangle$while_exp0 -0;JMP -(screen.drawrectangle$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.drawhorizontal) -@11 -D=A -(LOOP_screen.drawhorizontal) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_screen.drawhorizontal -D;JGT -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.min -D=A -@R14 -M=D -@RET_ADDRESS_CALL281 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL281) -@LCL -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.max -D=A -@R14 -M=D -@RET_ADDRESS_CALL282 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL282) -@LCL -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -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 -@RET_ADDRESS_GT37 -D=A -@22 -0;JMP -(RET_ADDRESS_GT37) -@ARG -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 -@RET_ADDRESS_LT48 -D=A -@38 -0;JMP -(RET_ADDRESS_LT48) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@LCL -D=M -@7 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@512 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT49 -D=A -@38 -0;JMP -(RET_ADDRESS_LT49) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@LCL -D=M -@8 -A=D+A -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 -@RET_ADDRESS_GT38 -D=A -@22 -0;JMP -(RET_ADDRESS_GT38) -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -AM=M-1 -D=M -@screen.drawhorizontal$if_true0 -D;JNE -@screen.drawhorizontal$if_false0 -0;JMP -(screen.drawhorizontal$if_true0) -@LCL -D=M -@7 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@2 -D=A -@R13 -M=D -@math.max -D=A -@R14 -M=D -@RET_ADDRESS_CALL283 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL283) -@LCL -D=M -@7 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@8 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@R13 -M=D -@math.min -D=A -@R14 -M=D -@RET_ADDRESS_CALL284 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL284) -@LCL -D=M -@8 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@7 -A=D+A -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_CALL285 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL285) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@LCL -D=M -@7 -A=D+A -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 -@16 -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_CALL286 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL286) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@LCL -D=M -@9 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@8 -A=D+A -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_CALL287 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL287) -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@LCL -D=M -@8 -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 -@16 -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_CALL288 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL288) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@LCL -D=M -@10 -D=D+A -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@9 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@screen.0 -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 -M=M+1 -A=M-1 -M=1 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@LCL -D=M -@10 -A=D+A -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 -@screen.0 -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 -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 -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@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 -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL289 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL289) -@LCL -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 -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@LCL -A=M+1 -A=A+1 -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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+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 -@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 -@LCL -D=M -@6 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_EQ29 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ29) -@SP -AM=M-1 -D=M -@screen.drawhorizontal$if_true1 -D;JNE -@screen.drawhorizontal$if_false1 -0;JMP -(screen.drawhorizontal$if_true1) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@4 -A=D+A -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 -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -D=A -@R13 -M=D -@screen.updatelocation -D=A -@R14 -M=D -@RET_ADDRESS_CALL290 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL290) -@SP -AM=M-1 -D=M -@R5 -M=D -@screen.drawhorizontal$if_end1 -0;JMP -(screen.drawhorizontal$if_false1) -@LCL -A=M -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_CALL291 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL291) -@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.drawhorizontal$while_exp0) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT50 -D=A -@38 -0;JMP -(RET_ADDRESS_LT50) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.drawhorizontal$while_end0 -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_CALL292 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL292) -@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.drawhorizontal$while_exp0 -0;JMP -(screen.drawhorizontal$while_end0) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@LCL -D=M -@4 -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_CALL293 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL293) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawhorizontal$if_end1) -(screen.drawhorizontal$if_false0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.drawsymetric) -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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=M-D -@3 -D=A -@R13 -M=D -@screen.drawhorizontal -D=A -@R14 -M=D -@RET_ADDRESS_CALL294 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL294) -@SP -AM=M-1 -D=M -@R5 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -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 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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=M-D -@3 -D=A -@R13 -M=D -@screen.drawhorizontal -D=A -@R14 -M=D -@RET_ADDRESS_CALL295 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL295) -@SP -AM=M-1 -D=M -@R5 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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=M-D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@R13 -M=D -@screen.drawhorizontal -D=A -@R14 -M=D -@RET_ADDRESS_CALL296 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL296) -@SP -AM=M-1 -D=M -@R5 -M=D -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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 -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@R13 -M=D -@screen.drawhorizontal -D=A -@R14 -M=D -@RET_ADDRESS_CALL297 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL297) -@SP -AM=M-1 -D=M -@R5 -M=D -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(screen.drawcircle) -@3 -D=A -(LOOP_screen.drawcircle) -D=D-1 -@SP -AM=M+1 -A=A-1 -M=0 -@LOOP_screen.drawcircle -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_LT51 -D=A -@38 -0;JMP -(RET_ADDRESS_LT51) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT39 -D=A -@22 -0;JMP -(RET_ADDRESS_GT39) -@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 -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT52 -D=A -@38 -0;JMP -(RET_ADDRESS_LT52) -@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 -@255 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT40 -D=A -@22 -0;JMP -(RET_ADDRESS_GT40) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@screen.drawcircle$if_true0 -D;JNE -@screen.drawcircle$if_false0 -0;JMP -(screen.drawcircle$if_true0) -@12 -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_CALL298 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL298) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawcircle$if_false0) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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=M-D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT53 -D=A -@38 -0;JMP -(RET_ADDRESS_LT53) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@ARG -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 -@511 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT41 -D=A -@22 -0;JMP -(RET_ADDRESS_GT41) -@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 -@ARG -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=M-D -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT54 -D=A -@38 -0;JMP -(RET_ADDRESS_LT54) -@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 -@ARG -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 -@255 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT42 -D=A -@22 -0;JMP -(RET_ADDRESS_GT42) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@screen.drawcircle$if_true1 -D;JNE -@screen.drawcircle$if_false1 -0;JMP -(screen.drawcircle$if_true1) -@13 -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_CALL299 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL299) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawcircle$if_false1) -@ARG -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@ARG -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=M-D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -M=D -@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 -@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 -@4 -D=A -@R13 -M=D -@screen.drawsymetric -D=A -@R14 -M=D -@RET_ADDRESS_CALL300 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL300) -@SP -AM=M-1 -D=M -@R5 -M=D -(screen.drawcircle$while_exp0) -@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 -@RET_ADDRESS_GT43 -D=A -@22 -0;JMP -(RET_ADDRESS_GT43) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@screen.drawcircle$while_end0 -D;JNE -@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_LT55 -D=A -@38 -0;JMP -(RET_ADDRESS_LT55) -@SP -AM=M-1 -D=M -@screen.drawcircle$if_true2 -D;JNE -@screen.drawcircle$if_false2 -0;JMP -(screen.drawcircle$if_true2) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@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 -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL301 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL301) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -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 -@LCL -A=M+1 -A=A+1 -M=D -@screen.drawcircle$if_end2 -0;JMP -(screen.drawcircle$if_false2) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@2 -D=A -@SP -AM=M+1 -A=A-1 -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 -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@R13 -M=D -@math.multiply -D=A -@R14 -M=D -@RET_ADDRESS_CALL302 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL302) -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@5 -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 -@LCL -A=M+1 -A=A+1 -M=D -@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=M-D -@SP -AM=M-1 -D=M -@LCL -A=M+1 -M=D -(screen.drawcircle$if_end2) -@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 -@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 -@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 -@4 -D=A -@R13 -M=D -@screen.drawsymetric -D=A -@R14 -M=D -@RET_ADDRESS_CALL303 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL303) -@SP -AM=M-1 -D=M -@R5 -M=D -@screen.drawcircle$while_exp0 -0;JMP -(screen.drawcircle$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(string.new) -@3 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@1 -D=A -@R13 -M=D -@memory.alloc -D=A -@R14 -M=D -@RET_ADDRESS_CALL304 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL304) -@SP -AM=M-1 -D=M -@THIS -M=D -@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_LT56 -D=A -@38 -0;JMP -(RET_ADDRESS_LT56) -@SP -AM=M-1 -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=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 -@54 -0;JMP -(string.charat) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -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_LT57 -D=A -@38 -0;JMP -(RET_ADDRESS_LT57) -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT46 -D=A -@22 -0;JMP -(RET_ADDRESS_GT46) -@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 -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ30 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ30) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@string.charat$if_true0 -D;JNE -@string.charat$if_false0 -0;JMP -(string.charat$if_true0) -@15 -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_CALL309 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL309) -@SP -AM=M-1 -D=M -@R5 -M=D -(string.charat$if_false0) -@ARG -A=M+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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(string.setcharat) -@ARG -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@THIS -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_LT58 -D=A -@38 -0;JMP -(RET_ADDRESS_LT58) -@ARG -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT47 -D=A -@22 -0;JMP -(RET_ADDRESS_GT47) -@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 -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ31 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ31) -@SP -AM=M-1 -D=M -A=A-1 -M=D|M -@SP -AM=M-1 -D=M -@string.setcharat$if_true0 -D;JNE -@string.setcharat$if_false0 -0;JMP -(string.setcharat$if_true0) -@16 -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_CALL310 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL310) -@SP -AM=M-1 -D=M -@R5 -M=D -(string.setcharat$if_false0) -@ARG -A=M+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 -A=A+1 -D=M -@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=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 -@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 -@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 -@THIS -D=M -@SP -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -(string.eraselastchar) -@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_EQ33 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ33) -@SP -AM=M-1 -D=M -@string.eraselastchar$if_true0 -D;JNE -@string.eraselastchar$if_false0 -0;JMP -(string.eraselastchar$if_true0) -@18 -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_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 -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@LCL -A=M+1 -A=A+1 -A=A+1 -M=D -@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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@45 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_EQ35 -D=A -@6 -0;JMP -(RET_ADDRESS_EQ35) -@SP -AM=M-1 -D=M -@string.intvalue$if_true1 -D;JNE -@string.intvalue$if_false1 -0;JMP -(string.intvalue$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 -A=A+1 -M=D -@SP -M=M+1 -A=M-1 -M=1 -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(string.intvalue$if_false1) -(string.intvalue$while_exp0) -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@THIS -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT59 -D=A -@38 -0;JMP -(RET_ADDRESS_LT59) -@LCL -D=M -@3 -A=D+A -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -A=A-1 -M=D&M -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@string.intvalue$while_end0 -D;JNE -@LCL -A=M -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 -@SP -AM=M-1 -D=M -@THAT -M=D -@THAT -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@48 -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 -@LCL -A=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 -@SP -M=M+1 -A=M-1 -M=0 -@RET_ADDRESS_LT60 -D=A -@38 -0;JMP -(RET_ADDRESS_LT60) -@LCL -A=M+1 -A=A+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@9 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_GT48 -D=A -@22 -0;JMP -(RET_ADDRESS_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 -@LCL -A=M+1 -M=D -(string.setint$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_GT49 -D=A -@22 -0;JMP -(RET_ADDRESS_GT49) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@string.setint$while_end0 -D;JNE -@ARG -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.divide -D=A -@R14 -M=D -@RET_ADDRESS_CALL316 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL316) -@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 -@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 -@48 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@ARG -A=M+1 -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 -@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_CALL317 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL317) -@SP -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@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 -@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 -@LCL -A=M+1 -D=M -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@ARG -A=M+1 -M=D -@string.setint$while_exp0 -0;JMP -(string.setint$while_end0) -@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.setint$if_true2 -D;JNE -@string.setint$if_false2 -0;JMP -(string.setint$if_true2) -@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 -@SP -AM=M-1 -D=M -A=A-1 -M=D+M -@45 -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 -@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.setint$if_false2) -@THIS -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 -@RET_ADDRESS_LT62 -D=A -@38 -0;JMP -(RET_ADDRESS_LT62) -@SP -AM=M-1 -D=M -@string.setint$if_true3 -D;JNE -@string.setint$if_false3 -0;JMP -(string.setint$if_true3) -@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_CALL318 -D=A -@95 -0;JMP -(RET_ADDRESS_CALL318) -@SP -AM=M-1 -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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -M=D -@RET_ADDRESS_LT63 -D=A -@38 -0;JMP -(RET_ADDRESS_LT63) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@string.setint$while_end1 -D;JNE -@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 -@LCL -A=M -D=M -@SP -AM=M+1 -A=A-1 -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 -A=A-1 -M=M-D -@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 -@THAT -M=D -@THAT -A=M -D=M -@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 -@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=M-1 -D=M -@sys.wait$while_end0 -D;JNE -@50 -D=A -@SP -AM=M+1 -A=A-1 -M=D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -(sys.wait$while_exp1) -@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_GT51 -D=A -@22 -0;JMP -(RET_ADDRESS_GT51) -@SP -A=M-1 -M=!M -@SP -AM=M-1 -D=M -@sys.wait$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 -AM=M-1 -D=M -A=A-1 -M=M-D -@SP -AM=M-1 -D=M -@LCL -A=M -M=D -@sys.wait$while_exp1 -0;JMP -(sys.wait$while_end1) -@ARG -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=M-D -@SP -AM=M-1 -D=M -@ARG -A=M -M=D -@sys.wait$while_exp0 -0;JMP -(sys.wait$while_end0) -@SP -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -(sys.error) -@3 -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_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 diff --git a/projects/06/pong/Pong.hack b/projects/06/pong/Pong.hack deleted file mode 100644 index 9eb4a3d..0000000 --- a/projects/06/pong/Pong.hack +++ /dev/null @@ -1,27483 +0,0 @@ -0000000100000000 -1110110000010000 -0000000000000000 -1110001100001000 -0000000010000101 -1110101010000111 -0000000000001111 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111010000 -1110101010001000 -0000000000010011 -1110001100000101 -0000000000000000 -1111110010100000 -1110111010001000 -0000000000001111 -1111110000100000 -1110101010000111 -0000000000001111 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111010000 -1110101010001000 -0000000000100011 -1110001100000110 -0000000000000000 -1111110010100000 -1110111010001000 -0000000000001111 -1111110000100000 -1110101010000111 -0000000000001111 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111010000 -1110101010001000 -0000000000110011 -1110001100000011 -0000000000000000 -1111110010100000 -1110111010001000 -0000000000001111 -1111110000100000 -1110101010000111 -0000000000000101 -1110110000010000 -0000000000000001 -1111000111100000 -1111110000010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -1110110000010000 -0000000000000000 -1110011111001000 -0000000000000001 -1111110000010000 -0000000000001110 -1110001110101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000001110 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000001110 -1111110010101000 -1111110000010000 -0000000000000010 -1110001100001000 -0000000000001110 -1111110010101000 -1111110000010000 -0000000000000001 -1110001100001000 -0000000000001101 -1111110000100000 -1110101010000111 -0000000000000000 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000000 -1111110111101000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000000 -1111110111101000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110001100001000 -0000000000000100 -1111110000010000 -0000000000000000 -1111110111101000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000001101 -1111000010010000 -0000000000000000 -1111000111010000 -0000000000000010 -1110001100001000 -0000000000000000 -1111110111011000 -0000000000000001 -1110001100001000 -0000000000001110 -1111110000100000 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110110010 -1110110000010000 -0000000000001110 -1110001100001000 -0000000010010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000111000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000000010100011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001010 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1111110000010000 -0000000000001011 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001100 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1111110000010000 -0000000000001101 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000000110000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000000101001101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010010010001101 -1110110000010000 -0000000000001110 -1110001100001000 -0000000101111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000000110100010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000001000000010 -1110110000010000 -0000000000001110 -1110001100001000 -0000000110111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000000111100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000001000000010 -1110110000010000 -0000000000001110 -1110001100001000 -0000000111110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000001001001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000110110 -1110101010000111 -0000000000000011 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000001010001110 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0000001011101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0000001100000110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001100011110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000001100111010 -1110001100000101 -0000001110100010 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001101110110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001110010100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001001 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000001111011111 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001110110100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001111010011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001001 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000001111111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000010000100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000010001010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000000111000100 -1110110000010000 -0000000000001110 -1110001100001000 -0000010010000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000010010011010 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000010010100001 -1110001100000101 -0000010011000011 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000010101111001 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001001 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010011110011 -1110001100000101 -0000010100110111 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010100000011 -1110001100000101 -0000010100011101 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000010100110101 -1110101010000111 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000010101111001 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010101000111 -1110001100000101 -0000010101100001 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000010101111001 -1110101010000111 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010110001001 -1110001100000101 -0000010111001101 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010110011001 -1110001100000101 -0000010110110011 -1110101010000111 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000010111001011 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000011000001111 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000010111011101 -1110001100000101 -0000010111110111 -1110101010000111 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000011000001111 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001010 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000011000100011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000011000101101 -1110001100000101 -0000011001001100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001010 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000011001100000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000011001101010 -1110001100000101 -0000011010001011 -1110101010000111 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000011010011111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000011010101001 -1110001100000101 -0000011011001010 -1110101010000111 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000011011011110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000011011101000 -1110001100000101 -0000011100001001 -1110101010000111 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000000110000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000011100011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000011100101101 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000011101011010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000011101111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000011110010011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000011110011010 -1110001100000101 -0000011110101011 -1110101010000111 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000100000100110 -1110101010000111 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000011110111011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000011111001101 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000011111100010 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000011111111010 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000100000000110 -1110001100000101 -0000100000010111 -1110101010000111 -0000000000010100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000100000100110 -1110101010000111 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000100000110111 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000100000111110 -1110001100000101 -0000100010110011 -1110101010000111 -0000000111111010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100001101001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000100001111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100010100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000101000111000 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000100011000110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000100011001101 -1110001100000101 -0000100100111100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100011110010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000100100000110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100100101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000101000111000 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000001110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000100101001111 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000100101010110 -1110001100000101 -0000100111001011 -1110101010000111 -0000000011111010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100110000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000100110010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100110111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000101000111000 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000100111101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0000101000000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0000101000101101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0000001010001100 -1110110000010000 -0000000000001110 -1110001100001000 -0000101001011000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000111000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000101001110101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101100001011 -1110110000010000 -0000000000001110 -1110001100001000 -0000101011010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010010010001101 -1110110000010000 -0000000000001110 -1110001100001000 -0000101100000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000101100101010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0000101101000001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000101101101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0000101101111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000101111011001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101101001100 -1110110000010000 -0000000000001110 -1110001100001000 -0000110001011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101100001011 -1110110000010000 -0000000000001110 -1110001100001000 -0000110010000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000110010101000 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000110010101111 -1110001100000101 -0000110111000101 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000110011010110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000110011011101 -1110001100000101 -0000110011100111 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000110011110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000110101100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000110101111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000110110111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000111011110111 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000110111111011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000111000000010 -1110001100000101 -0000111000011011 -1110101010000111 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000111000101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000111001111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110011001 -1110110000010000 -0000000000001110 -1110001100001000 -0000111010010010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0000111011110010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001000110011100 -1110110000010000 -0000000000001110 -1110001100001000 -0000111100001101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001000110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0000111100011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001000110111011 -1110110000010000 -0000000000001110 -1110001100001000 -0000111100110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001000101000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000111101001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000111000011 -1110110000010000 -0000000000001110 -1110001100001000 -0000111101101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0101000001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0000111101111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000011100110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0000101001100011 -1110110000010000 -0000000000001110 -1110001100001000 -0000111110111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000011111101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000011100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000001101 -1110001100001000 -0000000010010001 -1110110000010000 -0000000000001110 -1110001100001000 -0000111111101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000110010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0000001010001100 -1110110000010000 -0000000000001110 -1110001100001000 -0001000000001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000011101110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101011101010010 -1110110000010000 -0000000000001110 -1110001100001000 -0001000000110110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000010110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0100101110010110 -1110110000010000 -0000000000001110 -1110001100001000 -0001000001010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000001000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001000010001 -1110110000010000 -0000000000001110 -1110001100001000 -0001000001101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001010011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000001111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000010001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001101111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000010011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000010110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000011000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000111010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000011010100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000011100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001000011111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0001000100000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000101011100010 -1110110000010000 -0000000000001110 -1110001100001000 -0001000101100010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000000101011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001000101111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010010010001101 -1110110000010000 -0000000000001110 -1110001100001000 -0001000110010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0000111101011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001000110101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000010000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001001101001111 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001000111101110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001001001001010 -1110001100000101 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001011100100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001001000010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000110010001011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001000101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001010001000111 -1110110000010000 -0000000000001110 -1110001100001000 -0001001001000011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0001000111011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000010000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001001001011011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001001001100010 -1110001100000101 -0001001010000000 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0000101111100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001001001111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0001001011011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000010000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001001010010001 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001001010011000 -1110001100000101 -0001001010111000 -1110101010000111 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0000101111100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001001010110001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0001001011011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000010001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001001011001001 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001001011010000 -1110001100000101 -0001001011011111 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001001011101110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001001101001101 -1110001100000101 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001011100100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001001100010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000110010001011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001100101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001010001000111 -1110110000010000 -0000000000001110 -1110001100001000 -0001001101000110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0001001011011111 -1110101010000111 -0001000111001011 -1110101010000111 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001001101011111 -1110001100000101 -0001010001000001 -1110101010000111 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0100101110010110 -1110110000010000 -0000000000001110 -1110001100001000 -0001001101110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000001001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001000010001 -1110110000010000 -0000000000001110 -1110001100001000 -0001001110001110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001110100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001100001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001110110010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001111000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001111010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001111101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001001111111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001010000001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001010000011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001010000110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0001010000111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0001010001001001 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000010001100110 -1110110000010000 -0000000000001110 -1110001100001000 -0001010001101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001010010000110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001010010011011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001010010101010 -1110001100000101 -0001011010101010 -1110101010000111 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000110000000110 -1110110000010000 -0000000000001110 -1110001100001000 -0001010011011001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000110000011011 -1110110000010000 -0000000000001110 -1110001100001000 -0001010011110010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000001001010111 -1110110000010000 -0000000000001110 -1110001100001000 -0001010100001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0000001001101100 -1110110000010000 -0000000000001110 -1110001100001000 -0001010100100111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001010101000010 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001010101001001 -1110001100000101 -0001011010001011 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001010101011101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001010101110010 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001010110010010 -1110001100000101 -0001011010001011 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0001010110110001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001010110111000 -1110001100000101 -0001010111001000 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0001010111111001 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0001010111101000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001010111101111 -1110001100000101 -0001010111111001 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0000110000111101 -1110110000010000 -0000000000001110 -1110001100001000 -0001011000110100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000010110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0100101110010110 -1110110000010000 -0000000000001110 -1110001100001000 -0001011001101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100111000001101 -1110110000010000 -0000000000001110 -1110001100001000 -0001011010000110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0000011100101011 -1110110000010000 -0000000000001110 -1110001100001000 -0001011010100101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001011010111111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001011011001001 -1110001100000101 -0001011011100000 -1110101010000111 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0001011011011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000111000011 -1110110000010000 -0000000000001110 -1110001100001000 -0001011011110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010010010001101 -1110110000010000 -0000000000001110 -1110001100001000 -0001011100010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0110000000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000101101110 -1110110000010000 -0000000000001110 -1110001100001000 -0001011100110110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000110110 -1110101010000111 -0000000000000000 -1111110000100000 -1110101010001000 -1110110111110000 -1110101010001000 -0000000000000000 -1110011111001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110010011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001011101001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001011101100011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001011101110010 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001011110110110 -1110001100000101 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001011100100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001011110001011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001011110100000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001011110100111 -1110001100000101 -0001011110110100 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0001011101010100 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110100010 -1110110000010000 -0000000000001110 -1110001100001000 -0001011111000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110010011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001011111001110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110010011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001011111100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0001011111110110 -1110001100000001 -0000000001010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001000010001 -1110110000010000 -0000000000001110 -1110001100001000 -0001100000001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0001100000101010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110011010 -1110110000010000 -0000000000001110 -1110001100001000 -0001100000111011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110100010 -1110110000010000 -0000000000001110 -1110001100001000 -0001100001001101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001100100000100 -1110001100000101 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001011100111000 -1110110000010000 -0000000000001110 -1110001100001000 -0001100001110100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001100010001100 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001100010101000 -1110001100000101 -0001100100000010 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001100010111011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001100011000010 -1110001100000101 -0001100011011110 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110010011001001 -1110110000010000 -0000000000001110 -1110001100001000 -0001100011010111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0001100100000010 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0001100011111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0001100001010100 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110000100000 -1110101010001000 -1110110111110000 -1110101010001000 -0000000000000000 -1110011111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011111110100 -1110110000010000 -0000000000001110 -1110001100001000 -0001100100101001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110010100100001 -1110110000010000 -0000000000001110 -1110001100001000 -0001100101000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001010100100 -1110110000010000 -0000000000001110 -1110001100001000 -0001100101011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0001100101111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010001 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0001100110010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010010 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001100111010101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001101001110000 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0001100111000100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101010000101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001101010001100 -1110001100000101 -0001101010011101 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0001101010101000 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101010111110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101011001101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101011100001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101011110000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0001101100010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0001101100101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001101101000111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001101101001110 -1110001100000101 -0001101101110101 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001101110001000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001110001001101 -1110001100000101 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001101111000100 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001101111001011 -1110001100000101 -0001110000011000 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0001101101110101 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001110001011101 -1110001100000101 -0001110001101110 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000100 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0001110001111001 -1110001100000001 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001110010001111 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001110010010110 -1110001100000101 -0001110010101101 -1110101010000111 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0001110010101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001110010111100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001110011001011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001110011011111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001110011101110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0001110100100001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0001110101001010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001111010100001 -1110001100000101 -0111111111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001110110101111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001110111001010 -1110001100000101 -0001111010011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001111001101110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001111010001001 -1110001100000101 -0001111010011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0001110101010000 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0001111010110100 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001111101100111 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001111011100101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001111011101111 -1110001100000101 -0001111101001111 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0001111010100001 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0001111101110110 -1110001100000101 -0001111110000111 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000100 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0001111110010010 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0001111110101000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0001111110101111 -1110001100000101 -0001111111000110 -1110101010000111 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0001111111000001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0001111111100101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0010000010011100 -1110001100000101 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0010000000111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010000001010011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0010000001100110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0010000001110101 -1110001100000101 -0010000010000100 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0001111111010010 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010000010111001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010000011000000 -1110001100000101 -0010000011001101 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010000011101000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010000011101111 -1110001100000101 -0010000011111100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010011 -1110001100001000 -0000100000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0011011111111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000100000000001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000100000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0010000111010110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010000111011101 -1110001100000101 -0010000111110100 -1110101010000111 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0010000111101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000100000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010001000100111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0010001001010011 -1110001100000101 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0010001000000000 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0011111111111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010001001110000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010001001110111 -1110001100000101 -0010001010001110 -1110101010000111 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0010001010001001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0010001011000000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010001011000111 -1110001100000101 -0010010001001111 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0010001101100000 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010001101100111 -1110001100000101 -0010001110111011 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0010010000001011 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110000100000 -1110101010001000 -1110110111110000 -1110101010001000 -0000000000000000 -1110011111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0010010011110010 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010010011111001 -1110001100000101 -0010010101010100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0010011001111000 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0010010111110101 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0010010111111100 -1110001100000101 -0010011000110110 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0010011001111000 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0100000000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010100 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001000010001 -1110110000010000 -0000000000001110 -1110001100001000 -0010011010111011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011000 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0010011011101000 -1110110000010000 -0000000000001110 -1110001100001000 -0010011011001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0100100000011000 -1110110000010000 -0000000000001110 -1110001100001000 -0010011011011101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000001111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0010011011111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011001 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010011101001101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010011110010000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010011111100011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100000101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100001111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100011010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100100100111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100101111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000100111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010100111000101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101000011010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101001101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101010111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101100001001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101101010010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101110010111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010101111011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000101111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110000101101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110010000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110011010111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110100101100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110110000001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010110111010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111000101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111010000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111011010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111100101010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111101111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0010111111001010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000000010111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000001101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000010101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000100000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000101010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000110101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011000111111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001001010010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001010100111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001011111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001101010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001110100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011001111111011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010001010000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010010100101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010011111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010101001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010110100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011010111111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011001001110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011010100011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011011111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011101001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011110100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011011111111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100001001110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100010100011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100011111000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001010111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100101001101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100110100010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011100111110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101001001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101010100001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101011110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101101000101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101110001110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011101111010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110000011100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110001101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110011000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110100001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110101100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011110110110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111000001000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001100111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111001011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111010110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111100000011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111101011000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0011111110101101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000000000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000001010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000010100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001101111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000011101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000101000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000110010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100000111100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001000101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001010000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001011010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001100100010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001110111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001101110001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100001111000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010000010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010001100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010010110101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010100001010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010101011111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000001111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000001100 -1110110000010000 -0000000000001101 -1110001100001000 -0100010110110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100010110101000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0100010111001001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000001000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000001001 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000001001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000001010 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000010000 -0000000000001011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000100 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0100100000011010 -1110001100000001 -0000000001111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0100100000110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011010 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000001111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100100001010101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100100110101011 -1110001100000101 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0100100010010100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100100011101001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100100101101011 -1110001100000101 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000100000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0100100100111001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0100100011010110 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0100100101111011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100100110000010 -1110001100000101 -0100100110010001 -1110101010000111 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0100100110101001 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0100100001000011 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100100111000110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000001111110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100100111010111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100100111100011 -1110001100000101 -0100100111101101 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000010101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100100111111010 -1110001100000101 -0100101000100000 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011001 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0100101001000100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011010 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000100 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0100101001001111 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100100110110001 -1110110000010000 -0000000000001110 -1110001100001000 -0100101001101001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100101010001101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100101110010000 -1110001100000101 -0000000000010101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100101010100010 -1110001100000101 -0100101011011001 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010100 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000100000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0100101100001010 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010100 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010100 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0100101001111100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0100101110100101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100101110110110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0100101111001010 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100101111100000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100101111101100 -1110001100000101 -0100110000000011 -1110101010000111 -0000000000010100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0100101111111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0100110000011100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000101100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0100110001000000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0100110001110100 -1110110000010000 -0000000001011111 -1110101010000111 -0100110001111000 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100101001001101 -1110110000010000 -0000000000001110 -1110001100001000 -0100110010001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110011010 -1110110000010000 -0000000000001110 -1110001100001000 -0100110010101101 -1110110000010000 -0000000001011111 -1110101010000111 -0100110010110001 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100110010111000 -1110001100000101 -0100110011001011 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0100111001001000 -1110110000010000 -0000000000001110 -1110001100001000 -0100110011000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0100110110000100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110100110100010 -1110110000010000 -0000000000001110 -1110001100001000 -0100110011011110 -1110110000010000 -0000000001011111 -1110101010000111 -0100110011100010 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100110011101001 -1110001100000101 -0100110011111100 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0100111010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0100110011110101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0100110110000100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100101001001101 -1110110000010000 -0000000000001110 -1110001100001000 -0100110100001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000010101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100110100100100 -1110001100000101 -0100110101001100 -1110101010000111 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100110101011100 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100110101100011 -1110001100000101 -0100110101110110 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0100111001001000 -1110110000010000 -0000000000001110 -1110001100001000 -0100110101101111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0100110110000100 -1110101010000111 -0000000000010101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110000100000 -1110101010001000 -1110110111110000 -1110101010001000 -0000000000000000 -1110011111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001011111011 -1110110000010000 -0000000000001110 -1110001100001000 -0100110110100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100110110111100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100111000000111 -1110001100000101 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110001100010001 -1110110000010000 -0000000000001110 -1110001100001000 -0100110111011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110010011010 -1110110000010000 -0000000000001110 -1110001100001000 -0100110111101010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0100110110101010 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000011000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110011010110011 -1110110000010000 -0000000000001110 -1110001100001000 -0100111000100110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000011000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0100111000111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000101100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0001111111000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100111010001110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100111010010101 -1110001100000101 -0100111010100000 -1110101010000111 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000010101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0100111010110011 -1110001100000101 -0100111101000000 -1110101010000111 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0100111011000001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100111011001000 -1110001100000101 -0100111011110010 -1110101010000111 -0000000000010111 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0100111100110101 -1110101010000111 -0000000000011111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010111 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100111100001101 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0100111100010100 -1110001100000101 -0100111100011111 -1110101010000111 -0001111111000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000010110 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000101000001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010110 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0100111101001100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000010101 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100101001001101 -1110110000010000 -0000000000001110 -1110001100001000 -0100111101011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0100000000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011011 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011100 -1110001100001000 -0000000000010001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0100111110010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0100111111010101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101000001110000 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0100111111000100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0010000000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101000010001011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101000011010111 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0101000001111010 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000011100 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101000011101010 -1110001100000101 -0101000100111110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0101000110010011 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000011100 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000011 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0101000110101101 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101000111000011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101000111010100 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101000111101000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101000111111110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101001000001010 -1110001100000101 -0101001000100001 -1110101010000111 -0000000000000111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0101001000011100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0101001000111010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101001001100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101001010000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101001011001001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101001011100011 -1110001100000101 -0101001100000100 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110101011 -1110110000010000 -0000000000001110 -1110001100001000 -0101001011111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0101001100100011 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000110101011 -1110110000010000 -0000000000001110 -1110001100001000 -0101001100011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000001011 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0101001100101011 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101001101000001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101001101010011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101001101100111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101001101111111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101001110001011 -1110001100000101 -0101001110100010 -1110101010000111 -0000000000001000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0101001110011101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0101001111000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001101001110110 -1110110000010000 -0000000000001110 -1110001100001000 -0101001111101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101010000000111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101010000101111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101010001010011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101010001100100 -1110001100000101 -0101010011000010 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101010011010010 -1110001100000101 -0101010101010100 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101010101000110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0101010110100010 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101010110010110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101010110111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101010111101110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000001001 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101011000100010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000001010 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101001011010100 -1110110000010000 -0000000000001110 -1110001100001000 -0101011001010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101011001101010 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101011101001100 -1110001100000101 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101011010000011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0101011010001010 -1110001100000101 -0101011010101101 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001001 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0101011100001100 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001010 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101011011011110 -1110001100000101 -0101011011110110 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0101011100001100 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101001011010100 -1110110000010000 -0000000000001110 -1110001100001000 -0101011101000101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0101011001010110 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000001001 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0101011101010100 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101011101101110 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101011110000010 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101011110010110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101011110101101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101011111000001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101011111011001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101011111100101 -1110001100000101 -0101011111111100 -1110101010000111 -0000000000001001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0101011111110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0101100000010101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101100000111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0101100001101010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101100010010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101100100110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101100101111001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101101011001101 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101100110101110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0101100110110101 -1110001100000101 -0101100111100110 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101100111011111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0101101010010000 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101101000000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101101000101111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101101001101111 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101101001010010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0101101000011101 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101101010001011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0101100101100101 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000001011 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0101101011010101 -1110001100000001 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0010000011010110 -1110110000010000 -0000000000001110 -1110001100001000 -0101101011110111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0010000010100111 -1110110000010000 -0000000000001110 -1110001100001000 -0101101100011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0101101100111101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000100000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101101101001110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000001000000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101101101100110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0101101110000000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101101110001100 -1110001100000101 -0101111001010001 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0010000010100111 -1110110000010000 -0000000000001110 -1110001100001000 -0101101110100101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0010000011010110 -1110110000010000 -0000000000001110 -1110001100001000 -0101101111001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0101101111110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000111 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101110000011011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110000010000 -0000000000001001 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0101110001000111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001000 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101110001110001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110000010000 -0000000000001010 -1110000010010000 -0000000000001101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000001101 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001001 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000001010 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000011101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000100000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0101110100001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000110 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101110101101011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0101110101110010 -1110001100000101 -0101110110100011 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101110110011100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0101111001010001 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000101 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101110110111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101110111101110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101111000101110 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101111000010001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0101110111011010 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0101000011011101 -1110110000010000 -0000000000001110 -1110001100001000 -0101111001001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101101011010011 -1110110000010000 -0000000000001110 -1110001100001000 -0101111010100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101101011010011 -1110110000010000 -0000000000001110 -1110001100001000 -0101111011101110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101101011010011 -1110110000010000 -0000000000001110 -1110001100001000 -0101111100111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1110110000010000 -0000000000001101 -1110001100001000 -0101101011010011 -1110110000010000 -0000000000001110 -1110001100001000 -0101111110001100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000011 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0101111110011001 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101111110101111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101111111000000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0101111111010100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0101111111101010 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0101111111110110 -1110001100000101 -0110000000001101 -1110101010000111 -0000000000001100 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110000000001000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110000000101001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000111111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110000001000111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110000001101000 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000011111111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110000010001011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110000010010111 -1110001100000101 -0110000010101110 -1110101010000111 -0000000000001101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110000010101001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101111001010111 -1110110000010000 -0000000000001110 -1110001100001000 -0110000011111100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110000100010011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110001000001011 -1110001100000101 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110000100101011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110000100110010 -1110001100000101 -0110000101101100 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0110000101010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0110000111000110 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0110000110011001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000100 -1110110000010000 -0000000000001101 -1110001100001000 -0101111001010111 -1110110000010000 -0000000000001110 -1110001100001000 -0110001000000100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0110000100000001 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010000111000011 -1110110000010000 -0000000000001110 -1110001100001000 -0110001000100011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110001000110111 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110001000111110 -1110001100000101 -0110001001010101 -1110101010000111 -0000000000001110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110001001010000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110001001100100 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110001001101011 -1110001100000101 -0110001010000100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0110001001111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110001010111111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110001011000110 -1110001100000101 -0110001011011110 -1110101010000111 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011011110101 -1110110000010000 -0000000000001110 -1110001100001000 -0110001011011001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0010010010001101 -1110110000010000 -0000000000001110 -1110001100001000 -0110001011110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110001100101100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110001100111111 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110001101010111 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110001101100011 -1110001100000101 -0110001101111010 -1110101010000111 -0000000000001111 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110001101110101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110001110110110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110001111001001 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110001111100001 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110001111101101 -1110001100000101 -0110010000000100 -1110101010000111 -0000000000010000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110001111111111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110010001011010 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110010001100001 -1110001100000101 -0110010001111000 -1110101010000111 -0000000000010001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110010001110011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110010011100101 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110010011101100 -1110001100000101 -0110010100000011 -1110101010000111 -0000000000010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110010011111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000101 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0110010100100011 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110010101000110 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110010101001101 -1110001100000101 -0110010101010011 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110010110001000 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110010110001111 -1110001100000101 -0110010110101001 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110010110111100 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000000001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110011010001001 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110011000010011 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110011000100101 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111010101001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110011001000101 -1110001100000101 -0110011010000111 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0110011001011110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0110010110101001 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000100 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110011010011001 -1110001100000101 -0110011010101010 -1110101010000111 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000100 -1110110000010000 -1110001110010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0110011010110101 -1110001100000001 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110011011010111 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110011011011110 -1110001100000101 -0110011011110101 -1110101010000111 -0000000000010011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110011011110000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000110 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011010110000 -1110110000010000 -0000000000001110 -1110001100001000 -0110011100000111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110011100011101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110011100100100 -1110001100000101 -0110011101000100 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110110111100000 -1110110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010100000 -1111110001010000 -1110011111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110011101100000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110100000000110 -1110001100000101 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001110001110111 -1110110000010000 -0000000000001110 -1110001100001000 -0110011110000001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110111100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000001010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0001101010100110 -1110110000010000 -0000000000001110 -1110001100001000 -0110011111000001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110111100000 -1110001100001000 -0110011101010001 -1110101010000111 -0000000000000001 -1111110000010000 -0000000000000011 -1110000010100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110100000010110 -1110001100000101 -0110100001011100 -1110101010000111 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000101101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000011 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110100001101110 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110100001110101 -1110001100000101 -0110100010001100 -1110101010000111 -0000000000010011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110100010000111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110100010011011 -1110110000010000 -0000000000000110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110100010100010 -1110001100000101 -0110100011011011 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000110000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0110100101111011 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0110100011111001 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110100101111011 -1110001100000101 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000100 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1110001100001000 -0000000000000101 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000100 -1111110000100000 -1110001100001000 -0000000000000011 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000010001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000011 -1111110111100000 -1110110111100000 -1110001100001000 -0110100011100110 -1110101010000111 -0000000000000001 -1111110111100000 -1110110111100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0001011011110101 -1110110000010000 -0000000000001110 -1110001100001000 -0110100110001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000010000000 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000010000001 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000100010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000110110 -1110101010000111 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0010000100000101 -1110110000010000 -0000000000001110 -1110001100001000 -0110100110111110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001100101101001 -1110110000010000 -0000000000001110 -1110001100001000 -0110100111001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0100111101101001 -1110110000010000 -0000000000001110 -1110001100001000 -0110100111100000 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0010011001111110 -1110110000010000 -0000000000001110 -1110001100001000 -0110100111110001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0001011100011110 -1110110000010000 -0000000000001110 -1110001100001000 -0110101000000010 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0000111011111101 -1110110000010000 -0000000000001110 -1110001100001000 -0110101000010011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110101000101001 -1110110000010000 -0000000000001110 -1110001100001000 -0110101000100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110101000111010 -1110001100000101 -0110101000101001 -1110101010000111 -0000000000000000 -1111110111101000 -1110110010100000 -1110101010001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110101001001101 -1110110000010000 -0000000000100110 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0110101001010100 -1110001100000101 -0110101001101001 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110101011011001 -1110110000010000 -0000000000001110 -1110001100001000 -0110101001100100 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110101001111000 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110101011010011 -1110001100000101 -0000000000110010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0110101010011011 -1110110000010000 -0000000000010110 -1110101010000111 -0000000000000000 -1111110010100000 -1111110001001000 -0000000000000000 -1111110010101000 -1111110000010000 -0110101010111011 -1110001100000101 -0000000000000001 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000001 -1111110000100000 -1110001100001000 -0110101010001100 -1110101010000111 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000000 -1111110111001000 -1111110010100000 -1110111111001000 -0000000000000000 -1111110010101000 -1111110000010000 -1110110010100000 -1111000111001000 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000010 -1111110000100000 -1110001100001000 -0110101001101001 -1110101010000111 -0000000000000000 -1111110111001000 -1111110010100000 -1110101010001000 -0000000000110110 -1110101010000111 -0000000000000011 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0110001000010001 -1110110000010000 -0000000000001110 -1110001100001000 -0110101011101011 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001000101 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0110101011111101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0110101100001111 -1110110000010000 -0000000001011111 -1110101010000111 -0000000001010010 -1110110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000010 -1110110000010000 -0000000000001101 -1110001100001000 -0110010000111011 -1110110000010000 -0000000000001110 -1110001100001000 -0110101100100001 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100110110001010 -1110110000010000 -0000000000001110 -1110001100001000 -0110101100101101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000010 -1111110000100000 -1111110000010000 -0000000000000000 -1111110111101000 -1110110010100000 -1110001100001000 -0000000000000001 -1110110000010000 -0000000000001101 -1110001100001000 -0100111000001101 -1110110000010000 -0000000000001110 -1110001100001000 -0110101101000101 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 -0000000000000000 -1110110000010000 -0000000000001101 -1110001100001000 -0110101000101001 -1110110000010000 -0000000000001110 -1110001100001000 -0110101101010110 -1110110000010000 -0000000001011111 -1110101010000111 -0000000000000000 -1111110010101000 -1111110000010000 -0000000000000101 -1110001100001000 diff --git a/projects/06/pong/PongL.asm b/projects/06/pong/PongL.asm deleted file mode 100644 index 17c1044..0000000 --- a/projects/06/pong/PongL.asm +++ /dev/null @@ -1,27490 +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/06/pong/PongL.asm - -// Symbol-less version of the Pong.asm program. - -@256 -D=A -@0 -M=D -@133 -0;JMP -@15 -M=D -@0 -AM=M-1 -D=M -A=A-1 -D=M-D -M=0 -@19 -D;JNE -@0 -A=M-1 -M=-1 -@15 -A=M -0;JMP -@15 -M=D -@0 -AM=M-1 -D=M -A=A-1 -D=M-D -M=0 -@35 -D;JLE -@0 -A=M-1 -M=-1 -@15 -A=M -0;JMP -@15 -M=D -@0 -AM=M-1 -D=M -A=A-1 -D=M-D -M=0 -@51 -D;JGE -@0 -A=M-1 -M=-1 -@15 -A=M -0;JMP -@5 -D=A -@1 -A=M-D -D=M -@13 -M=D -@0 -AM=M-1 -D=M -@2 -A=M -M=D -D=A -@0 -M=D+1 -@1 -D=M -@14 -AM=D-1 -D=M -@4 -M=D -@14 -AM=M-1 -D=M -@3 -M=D -@14 -AM=M-1 -D=M -@2 -M=D -@14 -AM=M-1 -D=M -@1 -M=D -@13 -A=M -0;JMP -@0 -A=M -M=D -@1 -D=M -@0 -AM=M+1 -M=D -@2 -D=M -@0 -AM=M+1 -M=D -@3 -D=M -@0 -AM=M+1 -M=D -@4 -D=M -@0 -AM=M+1 -M=D -@4 -D=A -@13 -D=D+M -@0 -D=M-D -@2 -M=D -@0 -MD=M+1 -@1 -M=D -@14 -A=M -0;JMP -@0 -D=A -@13 -M=D -@27058 -D=A -@14 -M=D -@145 -D=A -@95 -0;JMP -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8643 -D=A -@14 -M=D -@163 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@10 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -D=M -@11 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@12 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -D=M -@13 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@3 -D=M -@14 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@387 -D=A -@14 -M=D -@333 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@9357 -D=A -@14 -M=D -@376 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@418 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@514 -D=A -@14 -M=D -@441 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@480 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@514 -D=A -@14 -M=D -@503 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@588 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@54 -0;JMP -@3 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@654 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@747 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@774 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@798 -D=A -@38 -0;JMP -@3 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@826 -D;JNE -@930 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@886 -D=A -@38 -0;JMP -@3 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@916 -D=A -@38 -0;JMP -@3 -D=M -@9 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@991 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@948 -D=A -@38 -0;JMP -@3 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@979 -D=A -@38 -0;JMP -@3 -D=M -@9 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@1016 -D=A -@95 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@1062 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@1109 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@452 -D=A -@14 -M=D -@1156 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1178 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@1185 -D;JNE -@1219 -0;JMP -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1401 -0;JMP -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -D=M -@9 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1267 -D;JNE -@1335 -0;JMP -@3 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1283 -D;JNE -@1309 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@1333 -0;JMP -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@1401 -0;JMP -@3 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1351 -D;JNE -@1377 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@1401 -0;JMP -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@3 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1417 -D;JNE -@1485 -0;JMP -@3 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1433 -D;JNE -@1459 -0;JMP -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@1483 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@1551 -0;JMP -@3 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1501 -D;JNE -@1527 -0;JMP -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@1551 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@10 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1571 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1581 -D;JNE -@1612 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@3 -D=M -@14 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@10 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@11 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1632 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1642 -D;JNE -@1675 -0;JMP -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@14 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@11 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@12 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1695 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1705 -D;JNE -@1738 -0;JMP -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@14 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@12 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@13 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1758 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1768 -D;JNE -@1801 -0;JMP -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@14 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@3 -D=M -@13 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@387 -D=A -@14 -M=D -@1819 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@14 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@5 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@1837 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@1882 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@1916 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1939 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@1946 -D;JNE -@1963 -0;JMP -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2086 -0;JMP -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1979 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1997 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@2018 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@2042 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@2054 -D;JNE -@2071 -0;JMP -@20 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2086 -0;JMP -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -D=M -@14 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@2103 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@2110 -D;JNE -@2227 -0;JMP -@506 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@50 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2153 -D=A -@95 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@2173 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2214 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2616 -0;JMP -@3 -D=M -@14 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2246 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@2253 -D;JNE -@2364 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@50 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2290 -D=A -@95 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@2310 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2351 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2616 -0;JMP -@3 -D=M -@14 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2383 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@2390 -D;JNE -@2507 -0;JMP -@250 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2432 -D=A -@95 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@2453 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2494 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2616 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2543 -D=A -@95 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@2564 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@2605 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@13 -M=D -@652 -D=A -@14 -M=D -@2648 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8643 -D=A -@14 -M=D -@2677 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2827 -D=A -@14 -M=D -@2773 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@9357 -D=A -@14 -M=D -@2816 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@2858 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2954 -D=A -@14 -M=D -@2881 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@2920 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2954 -D=A -@14 -M=D -@2943 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@3033 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2892 -D=A -@14 -M=D -@3163 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2827 -D=A -@14 -M=D -@3200 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@3240 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@3247 -D;JNE -@3525 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@3286 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@3293 -D;JNE -@3303 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@3319 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@3424 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@3448 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@3518 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3831 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3579 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@3586 -D;JNE -@3611 -0;JMP -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@3627 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@3706 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@1 -D=A -@13 -M=D -@20889 -D=A -@14 -M=D -@3730 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@3826 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@0 -D=A -@13 -M=D -@4508 -D=A -@14 -M=D -@3853 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@4531 -D=A -@14 -M=D -@3870 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@4539 -D=A -@14 -M=D -@3895 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@4419 -D=A -@14 -M=D -@3919 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8643 -D=A -@14 -M=D -@3948 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -M=D -@0 -D=A -@13 -M=D -@20598 -D=A -@14 -M=D -@3965 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@50 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@230 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@229 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@13 -M=D -@2659 -D=A -@14 -M=D -@4026 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@253 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@222 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@229 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@13 -M=D -@145 -D=A -@14 -M=D -@4076 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@400 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@3 -D=A -@13 -M=D -@652 -D=A -@14 -M=D -@4111 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@238 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@240 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@13 -M=D -@22354 -D=A -@14 -M=D -@4150 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@22 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@2 -D=A -@13 -M=D -@19350 -D=A -@14 -M=D -@4177 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@8 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25105 -D=A -@14 -M=D -@4200 -D=A -@95 -0;JMP -@83 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4218 -D=A -@95 -0;JMP -@99 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4236 -D=A -@95 -0;JMP -@111 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4254 -D=A -@95 -0;JMP -@114 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4272 -D=A -@95 -0;JMP -@101 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4290 -D=A -@95 -0;JMP -@58 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4308 -D=A -@95 -0;JMP -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4326 -D=A -@95 -0;JMP -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@4344 -D=A -@95 -0;JMP -@1 -D=A -@13 -M=D -@19850 -D=A -@14 -M=D -@4356 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@2786 -D=A -@14 -M=D -@4450 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@346 -D=A -@14 -M=D -@4474 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@9357 -D=A -@14 -M=D -@4497 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -D=A -@13 -M=D -@3930 -D=A -@14 -M=D -@4520 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@16 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@16 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@4943 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@4590 -D=A -@6 -0;JMP -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@4682 -D;JNE -@0 -D=A -@13 -M=D -@5924 -D=A -@14 -M=D -@4627 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@3211 -D=A -@14 -M=D -@4652 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5191 -D=A -@14 -M=D -@4675 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@4575 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@130 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4699 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@4706 -D;JNE -@4736 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@2 -D=A -@13 -M=D -@3044 -D=A -@14 -M=D -@4729 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@4831 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@132 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4753 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@4760 -D;JNE -@4792 -0;JMP -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@3044 -D=A -@14 -M=D -@4785 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@4831 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@140 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4809 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@4816 -D;JNE -@4831 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@4846 -D=A -@6 -0;JMP -@0 -A=M-1 -M=!M -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@4941 -D;JNE -@0 -D=A -@13 -M=D -@5924 -D=A -@14 -M=D -@4886 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@3211 -D=A -@14 -M=D -@4911 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5191 -D=A -@14 -M=D -@4934 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@4831 -0;JMP -@4555 -0;JMP -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4959 -D;JNE -@5185 -0;JMP -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@19350 -D=A -@14 -M=D -@4983 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@9 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25105 -D=A -@14 -M=D -@5006 -D=A -@95 -0;JMP -@71 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5024 -D=A -@95 -0;JMP -@97 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5042 -D=A -@95 -0;JMP -@109 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5060 -D=A -@95 -0;JMP -@101 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5078 -D=A -@95 -0;JMP -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5096 -D=A -@95 -0;JMP -@79 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5114 -D=A -@95 -0;JMP -@118 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5132 -D=A -@95 -0;JMP -@101 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5150 -D=A -@95 -0;JMP -@114 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@5168 -D=A -@95 -0;JMP -@1 -D=A -@13 -M=D -@19850 -D=A -@14 -M=D -@5180 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@5 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@5193 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@1126 -D=A -@14 -M=D -@5231 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@5254 -D=A -@22 -0;JMP -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5275 -D=A -@6 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@5290 -D;JNE -@5802 -0;JMP -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@3078 -D=A -@14 -M=D -@5337 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@3099 -D=A -@14 -M=D -@5362 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@599 -D=A -@14 -M=D -@5388 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@620 -D=A -@14 -M=D -@5415 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@5442 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@5449 -D;JNE -@5771 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5469 -D=A -@22 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@5490 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -M=D -@3 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@5522 -D;JNE -@5771 -0;JMP -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@5553 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@5560 -D;JNE -@5576 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@5625 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@5608 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@5615 -D;JNE -@5625 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@3133 -D=A -@14 -M=D -@5684 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@22 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@19350 -D=A -@14 -M=D -@5740 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19981 -D=A -@14 -M=D -@5766 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@1835 -D=A -@14 -M=D -@5797 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@5823 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@5833 -D;JNE -@5856 -0;JMP -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@5851 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8643 -D=A -@14 -M=D -@5875 -D=A -@95 -0;JMP -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@9357 -D=A -@14 -M=D -@5907 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@24576 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8558 -D=A -@14 -M=D -@5942 -D=A -@95 -0;JMP -@54 -0;JMP -@0 -A=M -M=0 -AD=A+1 -M=0 -@0 -M=D+1 -@0 -M=M+1 -A=M-1 -M=0 -@1 -D=A -@13 -M=D -@19610 -D=A -@14 -M=D -@5967 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@5987 -D=A -@6 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6002 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@6070 -D;JNE -@0 -D=A -@13 -M=D -@5924 -D=A -@14 -M=D -@6027 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6048 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@6055 -D;JNE -@6068 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@5972 -0;JMP -@0 -D=A -@13 -M=D -@27042 -D=A -@14 -M=D -@6082 -D=A -@95 -0;JMP -@1 -D=A -@13 -M=D -@19610 -D=A -@14 -M=D -@6094 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19610 -D=A -@14 -M=D -@6118 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@5 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@6134 -D;JGT -@80 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25105 -D=A -@14 -M=D -@6159 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19850 -D=A -@14 -M=D -@6186 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@27034 -D=A -@14 -M=D -@6203 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@0 -D=A -@13 -M=D -@27042 -D=A -@14 -M=D -@6221 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@6404 -D;JNE -@0 -D=A -@13 -M=D -@5944 -D=A -@14 -M=D -@6260 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@6284 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@6312 -D;JNE -@6402 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@6331 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@6338 -D;JNE -@6366 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25801 -D=A -@14 -M=D -@6359 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@6402 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@6394 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@6228 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@0 -A=M -M=0 -AD=A+1 -M=0 -@0 -M=D+1 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6132 -D=A -@14 -M=D -@6441 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25889 -D=A -@14 -M=D -@6466 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25252 -D=A -@14 -M=D -@6491 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@6527 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@17 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@6550 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@18 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6613 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@6768 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@6596 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6789 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@6796 -D;JNE -@6813 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@5 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@6824 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6846 -D=A -@38 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6861 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6881 -D=A -@22 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@6896 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@6934 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@6959 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@6983 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@6990 -D;JNE -@7029 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@7048 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@7245 -D;JNE -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -M=M+1 -A=M-1 -M=0 -@7108 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@7115 -D;JNE -@7192 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@7029 -0;JMP -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@7261 -D;JNE -@7278 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@4 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@7289 -D;JGT -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@7311 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@7318 -D;JNE -@7341 -0;JMP -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@7336 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@7356 -D=A -@38 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@7371 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@7391 -D=A -@22 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@7406 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@7457 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@7498 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@7841 -D;JNE -@32767 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@7599 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@7626 -D;JNE -@7839 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@7790 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@7817 -D;JNE -@7839 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@7504 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@7860 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@8039 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@7909 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@7919 -D;JNE -@8015 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@17 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@7841 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@8054 -D;JNE -@8071 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@4 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@8082 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@8104 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@8111 -D;JNE -@8134 -0;JMP -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@8129 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@8165 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@8348 -D;JNE -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@8249 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8275 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@8294 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@8309 -D;JNE -@8324 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@8146 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8377 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@8384 -D;JNE -@8397 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8424 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@8431 -D;JNE -@8444 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@19 -M=D -@2048 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@14334 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@2049 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2050 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@19 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@19 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@8662 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@8669 -D;JNE -@8692 -0;JMP -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@8687 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2048 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8743 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@8787 -D;JNE -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@8704 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@16379 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@8816 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@8823 -D;JNE -@8846 -0;JMP -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@8841 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@8896 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@8903 -D;JNE -@9295 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@9056 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@9063 -D;JNE -@9147 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@9227 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@54 -0;JMP -@0 -A=M -M=0 -AD=A+1 -M=0 -@0 -M=D+1 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@9458 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@9465 -D;JNE -@9556 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@9848 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@9717 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@9724 -D;JNE -@9782 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@9848 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@16384 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@20 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@21 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@22 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@23 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25105 -D=A -@14 -M=D -@9915 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@24 -M=D -@0 -D=A -@13 -M=D -@9960 -D=A -@14 -M=D -@9932 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@18456 -D=A -@14 -M=D -@9949 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@127 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@9978 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@25 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10061 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10128 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@33 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10211 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@34 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10284 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10367 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@36 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10454 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@37 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@49 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10535 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@38 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10620 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@39 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10693 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@40 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10778 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@41 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10863 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@42 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@10940 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@43 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11017 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@44 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11090 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@45 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11159 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@46 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11230 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@47 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11309 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11394 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@49 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11479 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@50 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11564 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11649 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@52 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@26 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@60 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11734 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@53 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11819 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11904 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@55 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@49 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@11989 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@56 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12074 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@57 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@62 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12159 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@58 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12234 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12311 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@60 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12392 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@61 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12463 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@62 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12544 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@64 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12629 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12712 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@65 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12797 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@66 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12882 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@67 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@12967 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@68 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13052 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@69 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13137 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@70 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13222 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@71 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@44 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13307 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@72 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13392 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@73 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13477 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@74 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@60 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13562 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@75 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13647 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@76 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13732 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@77 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@33 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13817 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@78 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@55 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@55 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13902 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@79 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@13987 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@80 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14072 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@81 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@59 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14159 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@82 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14244 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@83 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14329 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@84 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@45 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14414 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@85 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14499 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@86 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14584 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@87 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14669 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@88 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14754 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@89 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14839 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@90 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@49 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@35 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@14924 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@91 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15009 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@92 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=1 -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15088 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@93 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15173 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@94 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@8 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15246 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@95 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15315 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@96 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15388 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@97 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15467 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@98 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15552 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@99 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15631 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@100 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@60 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15716 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@101 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15795 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@102 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@38 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15880 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@103 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@62 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@15963 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@104 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@55 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16048 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@105 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16131 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@106 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@56 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16216 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@107 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16301 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@108 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16386 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@109 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@29 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@43 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@43 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@43 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@43 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16465 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@110 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@29 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16544 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@111 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16623 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@112 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16704 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@113 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@62 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16785 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@114 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@29 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@55 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16864 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@115 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@16943 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@116 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@28 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17028 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@117 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17107 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@118 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17186 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@119 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17265 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@120 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@30 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17344 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@121 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@62 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17425 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@122 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@51 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17504 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@123 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@56 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@56 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17589 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@124 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17674 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@125 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@56 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17759 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@126 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@38 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@45 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@0 -M=M+1 -A=M-1 -M=0 -@12 -D=A -@13 -M=D -@17843 -D=A -@14 -M=D -@17832 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@17865 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@4 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@8 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@9 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@9 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@10 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -D=M -@11 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@4 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@18458 -D;JGT -@127 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@18483 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@26 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@127 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18517 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@18859 -D;JNE -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@18580 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@26 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18665 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@18795 -D;JNE -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@256 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@18745 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@18646 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@18811 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@18818 -D;JNE -@18833 -0;JMP -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@18857 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@18499 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18886 -D=A -@38 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@126 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@18903 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@18915 -D;JNE -@18925 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@21 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@18938 -D;JNE -@18976 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@19012 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@26 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@4 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@19023 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@18865 -D=A -@14 -M=D -@19049 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@11 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19085 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@19344 -D;JNE -@21 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@19106 -D;JNE -@19161 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@20 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@256 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@19210 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@20 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@20 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@19068 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@19365 -D=A -@38 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@22 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19382 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@19402 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@63 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19424 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@19436 -D;JNE -@19459 -0;JMP -@20 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@19454 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@19484 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@23 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@352 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@19520 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@22 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@19572 -D=A -@95 -0;JMP -@19576 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@21 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19021 -D=A -@14 -M=D -@19599 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -D=A -@13 -M=D -@27034 -D=A -@14 -M=D -@19629 -D=A -@95 -0;JMP -@19633 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@19640 -D;JNE -@19659 -0;JMP -@0 -D=A -@13 -M=D -@20040 -D=A -@14 -M=D -@19652 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@19844 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -D=A -@13 -M=D -@27042 -D=A -@14 -M=D -@19678 -D=A -@95 -0;JMP -@19682 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@19689 -D;JNE -@19708 -0;JMP -@0 -D=A -@13 -M=D -@20134 -D=A -@14 -M=D -@19701 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@19844 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19021 -D=A -@14 -M=D -@19727 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@21 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@19748 -D;JNE -@19788 -0;JMP -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@23 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@22 -M=D -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@19804 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@19811 -D;JNE -@19830 -0;JMP -@0 -D=A -@13 -M=D -@20040 -D=A -@14 -M=D -@19823 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@19844 -0;JMP -@21 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@21 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -A=M -M=0 -AD=A+1 -M=0 -@0 -M=D+1 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25339 -D=A -@14 -M=D -@19876 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@19900 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@19975 -D;JNE -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25361 -D=A -@14 -M=D -@19934 -D=A -@95 -0;JMP -@1 -D=A -@13 -M=D -@19610 -D=A -@14 -M=D -@19946 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@19882 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@24 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@26291 -D=A -@14 -M=D -@20006 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@24 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19850 -D=A -@14 -M=D -@20029 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@352 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@22 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@23 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@21 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8128 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20110 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@20117 -D;JNE -@20128 -0;JMP -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@22 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@21 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@20147 -D;JNE -@20288 -0;JMP -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@20161 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@20168 -D;JNE -@20210 -0;JMP -@23 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@23 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@22 -M=D -@20277 -0;JMP -@31 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@23 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20237 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@20244 -D;JNE -@20255 -0;JMP -@8128 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@22 -M=D -@22 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@321 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@22 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@21 -M=D -@20300 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@21 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19021 -D=A -@14 -M=D -@20318 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@16384 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@27 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@28 -M=D -@17 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@20374 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@29 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20437 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@20592 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@20420 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@8192 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20619 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@20695 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@20602 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@28 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@20714 -D;JNE -@20798 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@20883 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@27 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@28 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@3 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@20909 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@20931 -D=A -@38 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20948 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@20968 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@20990 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@21002 -D;JNE -@21025 -0;JMP -@7 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@21020 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@21050 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@21088 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@21124 -D=A -@95 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@21193 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@21219 -D;JNE -@21252 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20907 -D=A -@14 -M=D -@21245 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@21283 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20907 -D=A -@14 -M=D -@21278 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@11 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@21291 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@21313 -D=A -@38 -0;JMP -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@21331 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@21351 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@21375 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@21387 -D;JNE -@21410 -0;JMP -@8 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@21405 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@21442 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=A -@13 -M=D -@6774 -D=A -@14 -M=D -@21483 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@21511 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@21551 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -M=!M -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@21587 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@21604 -D;JNE -@21698 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@21714 -D;JNE -@21844 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@21830 -D=A -@22 -0;JMP -@1 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@21922 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@21910 -D=A -@22 -0;JMP -@1 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@21948 -D=A -@95 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@21998 -D=A -@95 -0;JMP -@1 -D=M -@9 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@22050 -D=A -@95 -0;JMP -@1 -D=M -@10 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@13 -M=D -@21204 -D=A -@14 -M=D -@22097 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@22122 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@22348 -D;JNE -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@22147 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@22154 -D;JNE -@22189 -0;JMP -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@9 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@22284 -0;JMP -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@10 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@22238 -D;JNE -@22262 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@22284 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -D=A -@13 -M=D -@21204 -D=A -@14 -M=D -@22341 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@22102 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@9 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@22356 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@22382 -D=A -@22 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@22402 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@22422 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@22445 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@22465 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@22489 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@22501 -D;JNE -@22524 -0;JMP -@9 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@22519 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@22549 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@22591 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@22634 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@22678 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@22835 -D=A -@95 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@22905 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@23245 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@22958 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@22965 -D;JNE -@23014 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23007 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@23184 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23042 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@23087 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@23151 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23122 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@23069 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23179 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@22885 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@11 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@23253 -D;JGT -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@8406 -D=A -@14 -M=D -@23287 -D=A -@95 -0;JMP -@1 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@8359 -D=A -@14 -M=D -@23326 -D=A -@95 -0;JMP -@1 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@23357 -D=A -@22 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@256 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@23374 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@512 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@23398 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@23424 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -AM=M-1 -D=M -@23436 -D;JNE -@24145 -0;JMP -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@2 -D=A -@13 -M=D -@8359 -D=A -@14 -M=D -@23461 -D=A -@95 -0;JMP -@1 -D=M -@7 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@8406 -D=A -@14 -M=D -@23500 -D=A -@95 -0;JMP -@1 -D=M -@8 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@23539 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -D=M -@7 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@23579 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=M -@9 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@23623 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -D=M -@8 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@23665 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -D=M -@10 -D=D+A -@13 -M=D -@0 -AM=M-1 -D=M -@13 -A=M -M=D -@1 -D=M -@9 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@10 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@29 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@32 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@23820 -D=A -@95 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@6 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@23915 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@23922 -D;JNE -@23971 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23964 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@24145 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@5 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@23999 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@24046 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@24110 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -A=M-1 -D=!M -M=D+1 -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@24081 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@24026 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@20701 -D=A -@14 -M=D -@24140 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -D=A -@13 -M=D -@23251 -D=A -@14 -M=D -@24224 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@3 -D=A -@13 -M=D -@23251 -D=A -@14 -M=D -@24302 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@13 -M=D -@23251 -D=A -@14 -M=D -@24381 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@13 -M=D -@23251 -D=A -@14 -M=D -@24460 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@3 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@24473 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@24495 -D=A -@38 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24512 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@24532 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24554 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@24566 -D;JNE -@24589 -0;JMP -@12 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@24584 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -M=M+1 -A=M-1 -M=0 -@24617 -D=A -@38 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@511 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24647 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -M=M+1 -A=M-1 -M=0 -@24680 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@255 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@24715 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@24727 -D;JNE -@24750 -0;JMP -@13 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@24745 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@13 -M=D -@24151 -D=A -@14 -M=D -@24828 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@24851 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@25099 -D;JNE -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@24875 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@24882 -D;JNE -@24940 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@24915 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@25030 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@24985 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@5 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@4 -D=A -@13 -M=D -@24151 -D=A -@14 -M=D -@25092 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@24833 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@8643 -D=A -@14 -M=D -@25123 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25143 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@25150 -D;JNE -@25173 -0;JMP -@14 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@25168 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25188 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@25195 -D;JNE -@25220 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@25214 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@3 -A=M+1 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25279 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -@25286 -D;JNE -@25310 -0;JMP -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5877 -D=A -@14 -M=D -@25305 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@9357 -D=A -@14 -M=D -@25328 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25388 -D=A -@38 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25407 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25431 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@25443 -D;JNE -@25466 -0;JMP -@15 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@25461 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25526 -D=A -@38 -0;JMP -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25545 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25569 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -AM=M-1 -D=M -@25581 -D;JNE -@25604 -0;JMP -@16 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@25599 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@25690 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@25697 -D;JNE -@25720 -0;JMP -@17 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@25715 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@3 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25829 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@25836 -D;JNE -@25859 -0;JMP -@18 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@25854 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@5 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@25891 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@25926 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@25933 -D;JNE -@25939 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@45 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@25992 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@25999 -D;JNE -@26025 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -A=A+1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@26044 -D=A -@38 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D&M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@26249 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@26131 -D=A -@38 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@9 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@26149 -D=A -@22 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=D|M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@26181 -D;JNE -@26247 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@26206 -D=A -@95 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@26025 -0;JMP -@1 -D=M -@4 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@26265 -D;JNE -@26282 -0;JMP -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@4 -D=A -D=D-1 -@0 -AM=M+1 -A=A-1 -M=0 -@26293 -D;JGT -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@3 -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@26327 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@26334 -D;JNE -@26357 -0;JMP -@19 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@26352 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@6 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5808 -D=A -@14 -M=D -@26375 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@26397 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@26404 -D;JNE -@26436 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@1 -A=M+1 -A=A+1 -A=A+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -A=M-1 -D=!M -M=D+1 -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@26464 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@26630 -D;JNE -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@7287 -D=A -@14 -M=D -@26497 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@1 -A=M+1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@10 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@6822 -D=A -@14 -M=D -@26561 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@2 -A=M+1 -M=D -@26449 -0;JMP -@1 -D=M -@3 -A=D+A -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@26646 -D;JNE -@26716 -0;JMP -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@45 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@3 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@26734 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@26741 -D;JNE -@26764 -0;JMP -@19 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@26759 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@26779 -D=A -@6 -0;JMP -@0 -AM=M-1 -D=M -@26786 -D;JNE -@26843 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@48 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@27003 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@26873 -D=A -@38 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@27003 -D;JNE -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@4 -M=D -@4 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@5 -M=D -@0 -AM=M-1 -D=M -@4 -M=D -@5 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@4 -A=M -M=D -@3 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=D+M -@0 -AM=M-1 -D=M -@3 -A=M+1 -A=A+1 -M=D -@26854 -0;JMP -@1 -A=M+1 -A=A+1 -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@5877 -D=A -@14 -M=D -@27023 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@128 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@129 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@34 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@54 -0;JMP -@0 -D=A -@13 -M=D -@8453 -D=A -@14 -M=D -@27070 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@6505 -D=A -@14 -M=D -@27087 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@20329 -D=A -@14 -M=D -@27104 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@9854 -D=A -@14 -M=D -@27121 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@5918 -D=A -@14 -M=D -@27138 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@3837 -D=A -@14 -M=D -@27155 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@27177 -D=A -@14 -M=D -@27172 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@0 -A=M-1 -M=!M -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@27194 -D;JNE -@27177 -0;JMP -@0 -AM=M+1 -A=A-1 -M=0 -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@27213 -D=A -@38 -0;JMP -@0 -AM=M-1 -D=M -@27220 -D;JNE -@27241 -0;JMP -@0 -M=M+1 -A=M-1 -M=1 -@1 -D=A -@13 -M=D -@27353 -D=A -@14 -M=D -@27236 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@27256 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@27347 -D;JNE -@50 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=0 -@27291 -D=A -@22 -0;JMP -@0 -A=M-1 -M=!M -@0 -AM=M-1 -D=M -@27323 -D;JNE -@1 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@1 -A=M -M=D -@27276 -0;JMP -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@0 -M=M+1 -A=M-1 -M=1 -@0 -AM=M-1 -D=M -A=A-1 -M=M-D -@0 -AM=M-1 -D=M -@2 -A=M -M=D -@27241 -0;JMP -@0 -M=M+1 -A=M-1 -M=0 -@54 -0;JMP -@3 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@25105 -D=A -@14 -M=D -@27371 -D=A -@95 -0;JMP -@69 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@27389 -D=A -@95 -0;JMP -@82 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@27407 -D=A -@95 -0;JMP -@82 -D=A -@0 -AM=M+1 -A=A-1 -M=D -@2 -D=A -@13 -M=D -@25659 -D=A -@14 -M=D -@27425 -D=A -@95 -0;JMP -@1 -D=A -@13 -M=D -@19850 -D=A -@14 -M=D -@27437 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@2 -A=M -D=M -@0 -AM=M+1 -A=A-1 -M=D -@1 -D=A -@13 -M=D -@19981 -D=A -@14 -M=D -@27461 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@13 -M=D -@27177 -D=A -@14 -M=D -@27478 -D=A -@95 -0;JMP -@0 -AM=M-1 -D=M -@5 -M=D diff --git a/projects/06/rect/Rect.asm b/projects/06/rect/Rect.asm deleted file mode 100644 index 6cbbaeb..0000000 --- a/projects/06/rect/Rect.asm +++ /dev/null @@ -1,35 +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/06/rect/Rect.asm - -// Draws a rectangle at the top-left corner of the screen. -// The rectangle is 16 pixels wide and R0 pixels high. - - @0 - D=M - @INFINITE_LOOP - D;JLE - @counter - M=D - @SCREEN - D=A - @address - M=D -(LOOP) - @address - A=M - M=-1 - @address - D=M - @32 - D=D+A - @address - M=D - @counter - MD=M-1 - @LOOP - D;JGT -(INFINITE_LOOP) - @INFINITE_LOOP - 0;JMP diff --git a/projects/06/rect/Rect.hack b/projects/06/rect/Rect.hack deleted file mode 100644 index f33a9d1..0000000 --- a/projects/06/rect/Rect.hack +++ /dev/null @@ -1,25 +0,0 @@ -0000000000000000 -1111110000010000 -0000000000010111 -1110001100000110 -0000000000010000 -1110001100001000 -0100000000000000 -1110110000010000 -0000000000010001 -1110001100001000 -0000000000010001 -1111110000100000 -1110111010001000 -0000000000010001 -1111110000010000 -0000000000100000 -1110000010010000 -0000000000010001 -1110001100001000 -0000000000010000 -1111110010011000 -0000000000001010 -1110001100000001 -0000000000010111 -1110101010000111 diff --git a/projects/06/rect/RectL.asm b/projects/06/rect/RectL.asm deleted file mode 100644 index e97c09b..0000000 --- a/projects/06/rect/RectL.asm +++ /dev/null @@ -1,32 +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/06/rect/RectL.asm - -// Symbol-less version of the Rect.asm program. - -@0 -D=M -@23 -D;JLE -@16 -M=D -@16384 -D=A -@17 -M=D -@17 -A=M -M=-1 -@17 -D=M -@32 -D=D+A -@17 -M=D -@16 -MD=M-1 -@10 -D;JGT -@23 -0;JMP diff --git a/projects/07/MemoryAccess/BasicTest/BasicTest.asm b/projects/07/MemoryAccess/BasicTest/BasicTest.asm deleted file mode 100644 index d978f07..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTest.asm +++ /dev/null @@ -1,250 +0,0 @@ -@256 -D=A -@SP -M=D -@10 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@21 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@22 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@36 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@6 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@42 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@45 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@5 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@THAT -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@510 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@11 -M=D -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@5 -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 -@THIS -D=M -@6 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@6 -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 -AM=M-1 -D=M-D -@SP -A=M -M=D -@SP -M=M+1 -@11 -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 -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/MemoryAccess/BasicTest/BasicTest.cmp b/projects/07/MemoryAccess/BasicTest/BasicTest.cmp deleted file mode 100644 index 538454b..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]|RAM[300]|RAM[401]|RAM[402]|RAM[3006|RAM[3012|RAM[3015|RAM[11] | -| 472 | 10 | 21 | 22 | 36 | 42 | 45 | 510 | diff --git a/projects/07/MemoryAccess/BasicTest/BasicTest.out b/projects/07/MemoryAccess/BasicTest/BasicTest.out deleted file mode 100644 index 85c19a7..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTest.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]|RAM[300]|RAM[401]|RAM[402]|RAM[3006|RAM[3012|RAM[3015|RAM[11] | -| 472 | 10 | 21 | 22 | 36 | 42 | 45 | 510 | diff --git a/projects/07/MemoryAccess/BasicTest/BasicTest.tst b/projects/07/MemoryAccess/BasicTest/BasicTest.tst deleted file mode 100644 index fa6d9a6..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTest.tst +++ /dev/null @@ -1,25 +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/07/MemoryAccess/BasicTest/BasicTest.tst - -load BasicTest.asm, -output-file BasicTest.out, -compare-to BasicTest.cmp, -output-list RAM[256]%D1.6.1 RAM[300]%D1.6.1 RAM[401]%D1.6.1 - RAM[402]%D1.6.1 RAM[3006]%D1.6.1 RAM[3012]%D1.6.1 - RAM[3015]%D1.6.1 RAM[11]%D1.6.1; - -set RAM[0] 256, // stack pointer -set RAM[1] 300, // base address of the local segment -set RAM[2] 400, // base address of the argument segment -set RAM[3] 3000, // base address of the this segment -set RAM[4] 3010, // base address of the that segment - -repeat 600 { // enough cycles to complete the execution - ticktock; -} - -// Outputs the stack base and some values -// from the tested memory segments -output; diff --git a/projects/07/MemoryAccess/BasicTest/BasicTest.vm b/projects/07/MemoryAccess/BasicTest/BasicTest.vm deleted file mode 100644 index b2f9343..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTest.vm +++ /dev/null @@ -1,31 +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/07/MemoryAccess/BasicTest/BasicTest.vm - -// Executes pop and push commands using the virtual memory segments. -push constant 10 -pop local 0 -push constant 21 -push constant 22 -pop argument 2 -pop argument 1 -push constant 36 -pop this 6 -push constant 42 -push constant 45 -pop that 5 -pop that 2 -push constant 510 -pop temp 6 -push local 0 -push that 5 -add -push argument 1 -sub -push this 6 -push this 6 -add -sub -push temp 6 -add diff --git a/projects/07/MemoryAccess/BasicTest/BasicTestVME.tst b/projects/07/MemoryAccess/BasicTest/BasicTestVME.tst deleted file mode 100644 index 24e9090..0000000 --- a/projects/07/MemoryAccess/BasicTest/BasicTestVME.tst +++ /dev/null @@ -1,25 +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/07/MemoryAccess/BasicTest/BasicTestVME.tst - -load BasicTest.vm, -output-file BasicTest.out, -compare-to BasicTest.cmp, -output-list RAM[256]%D1.6.1 RAM[300]%D1.6.1 RAM[401]%D1.6.1 - RAM[402]%D1.6.1 RAM[3006]%D1.6.1 RAM[3012]%D1.6.1 - RAM[3015]%D1.6.1 RAM[11]%D1.6.1; - -set sp 256, // stack pointer -set local 300, // base address of the local segment -set argument 400, // base address of the argument segment -set this 3000, // base address of the this segment -set that 3010, // base address of the that segment - -repeat 25 { // BasicTest.vm has 25 instructions - vmstep; -} - -// Outputs the stack base and some values -// from the tested memory segments -output; diff --git a/projects/07/MemoryAccess/BasicTest/delme.asm b/projects/07/MemoryAccess/BasicTest/delme.asm deleted file mode 100644 index 6392181..0000000 --- a/projects/07/MemoryAccess/BasicTest/delme.asm +++ /dev/null @@ -1,26 +0,0 @@ -@256 -D=A -@SP -M=D -@10 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/MemoryAccess/BasicTest/delme.vm b/projects/07/MemoryAccess/BasicTest/delme.vm deleted file mode 100644 index d1ae195..0000000 --- a/projects/07/MemoryAccess/BasicTest/delme.vm +++ /dev/null @@ -1,8 +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/07/MemoryAccess/BasicTest/BasicTest.vm - -// Executes pop and push commands using the virtual memory segments. -push constant 10 -pop local 0 diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.asm b/projects/07/MemoryAccess/PointerTest/PointerTest.asm deleted file mode 100644 index 67125df..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTest.asm +++ /dev/null @@ -1,138 +0,0 @@ -@256 -D=A -@SP -M=D -@3030 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@3 -M=D -@3040 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@4 -M=D -@32 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@46 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@6 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@4 -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 -@THIS -D=M -@2 -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 -@THAT -D=M -@6 -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 -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.cmp b/projects/07/MemoryAccess/PointerTest/PointerTest.cmp deleted file mode 100644 index b59fa97..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]| RAM[3] | RAM[4] |RAM[3032|RAM[3046| -| 6084 | 3030 | 3040 | 32 | 46 | diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.out b/projects/07/MemoryAccess/PointerTest/PointerTest.out deleted file mode 100644 index 5d62de8..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTest.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]| RAM[3] | RAM[4] |RAM[3032|RAM[3046| -| 6084 | 3030 | 3040 | 32 | 46 | diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.tst b/projects/07/MemoryAccess/PointerTest/PointerTest.tst deleted file mode 100644 index cd5515d..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTest.tst +++ /dev/null @@ -1,20 +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/07/MemoryAccess/PointerTest/PointerTest.tst - -load PointerTest.asm, -output-file PointerTest.out, -compare-to PointerTest.cmp, -output-list RAM[256]%D1.6.1 RAM[3]%D1.6.1 - RAM[4]%D1.6.1 RAM[3032]%D1.6.1 RAM[3046]%D1.6.1; - -set RAM[0] 256, // initializes the stack pointer - -repeat 450 { // enough cycles to complete the execution - ticktock; -} - -// outputs the stack base, this, that, and -// some values from the the this and that segments -output; diff --git a/projects/07/MemoryAccess/PointerTest/PointerTest.vm b/projects/07/MemoryAccess/PointerTest/PointerTest.vm deleted file mode 100644 index 5b0a109..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTest.vm +++ /dev/null @@ -1,22 +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/07/MemoryAccess/PointerTest/PointerTest.vm - -// Executes pop and push commands using the -// pointer, this, and that segments. -push constant 3030 -pop pointer 0 -push constant 3040 -pop pointer 1 -push constant 32 -pop this 2 -push constant 46 -pop that 6 -push pointer 0 -push pointer 1 -add -push this 2 -sub -push that 6 -add diff --git a/projects/07/MemoryAccess/PointerTest/PointerTestVME.tst b/projects/07/MemoryAccess/PointerTest/PointerTestVME.tst deleted file mode 100644 index 1b395c2..0000000 --- a/projects/07/MemoryAccess/PointerTest/PointerTestVME.tst +++ /dev/null @@ -1,20 +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/07/MemoryAccess/PointerTest/PointerTestVME.tst - -load PointerTest.vm, -output-file PointerTest.out, -compare-to PointerTest.cmp, -output-list RAM[256]%D1.6.1 RAM[3]%D1.6.1 RAM[4]%D1.6.1 - RAM[3032]%D1.6.1 RAM[3046]%D1.6.1; - -set RAM[0] 256, // initializes the stack pointer - -repeat 15 { // PointerTest.vm has 15 instructions - vmstep; -} - -// outputs the stack base, this, that, and -// some values from the the this and that segments -output; diff --git a/projects/07/MemoryAccess/StaticTest/StaticTest.asm b/projects/07/MemoryAccess/StaticTest/StaticTest.asm deleted file mode 100644 index 8cd989d..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTest.asm +++ /dev/null @@ -1,86 +0,0 @@ -@256 -D=A -@SP -M=D -@111 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@333 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@888 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@StaticTest.8 -M=D -@SP -AM=M-1 -D=M -@StaticTest.3 -M=D -@SP -AM=M-1 -D=M -@StaticTest.1 -M=D -@StaticTest.3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@StaticTest.1 -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 -@StaticTest.8 -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 -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/MemoryAccess/StaticTest/StaticTest.cmp b/projects/07/MemoryAccess/StaticTest/StaticTest.cmp deleted file mode 100644 index 29f4bf0..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]| -| 1110 | diff --git a/projects/07/MemoryAccess/StaticTest/StaticTest.out b/projects/07/MemoryAccess/StaticTest/StaticTest.out deleted file mode 100644 index 2bc908b..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTest.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[256]| -| 1110 | diff --git a/projects/07/MemoryAccess/StaticTest/StaticTest.tst b/projects/07/MemoryAccess/StaticTest/StaticTest.tst deleted file mode 100644 index 1f23d66..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTest.tst +++ /dev/null @@ -1,17 +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/07/MemoryAccess/StaticTest/StaticTest.tst - -load StaticTest.asm, -output-file StaticTest.out, -compare-to StaticTest.cmp, -output-list RAM[256]%D1.6.1; - -set RAM[0] 256, // initializes the stack pointer - -repeat 200 { // enough cycles to complete the execution - ticktock; -} - -output; // the stack base diff --git a/projects/07/MemoryAccess/StaticTest/StaticTest.vm b/projects/07/MemoryAccess/StaticTest/StaticTest.vm deleted file mode 100644 index 65b4f6f..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTest.vm +++ /dev/null @@ -1,17 +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/07/MemoryAccess/StaticTest/StaticTest.vm - -// Executes pop and push commands using the static segment. -push constant 111 -push constant 333 -push constant 888 -pop static 8 -pop static 3 -pop static 1 -push static 3 -push static 1 -sub -push static 8 -add diff --git a/projects/07/MemoryAccess/StaticTest/StaticTestVME.tst b/projects/07/MemoryAccess/StaticTest/StaticTestVME.tst deleted file mode 100644 index 52882a4..0000000 --- a/projects/07/MemoryAccess/StaticTest/StaticTestVME.tst +++ /dev/null @@ -1,17 +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/07/MemoryAccess/StaticTest/StaticTestVME.tst - -load StaticTest.vm, -output-file StaticTest.out, -compare-to StaticTest.cmp, -output-list RAM[256]%D1.6.1; - -set sp 256, // initializes the stack pointer - -repeat 11 { // StaticTest.vm has 11 instructions - vmstep; -} - -output; // the stack base diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.asm b/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.asm deleted file mode 100644 index faa8af7..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.asm +++ /dev/null @@ -1,32 +0,0 @@ -@256 -D=A -@SP -M=D -@7 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@8 -D=A -@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 -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.cmp b/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.cmp deleted file mode 100644 index 7a3585b..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] | RAM[256] | -| 257 | 15 | diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.out b/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.out deleted file mode 100644 index 6b3b20e..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.out +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] | RAM[256] | -| 257 | 15 | diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.tst b/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.tst deleted file mode 100644 index 02dece3..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.tst +++ /dev/null @@ -1,17 +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/07/StackArithmetic/SimpleAdd/SimpleAdd.tst - -load SimpleAdd.asm, -output-file SimpleAdd.out, -compare-to SimpleAdd.cmp, -output-list RAM[0]%D2.6.2 RAM[256]%D2.6.2; - -set RAM[0] 256, // initializes the stack pointer - -repeat 60 { // enough cycles to complete the execution - ticktock; -} - -output; // the stack pointer and the stack base diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.vm b/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.vm deleted file mode 100644 index cfd4ee9..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAdd.vm +++ /dev/null @@ -1,9 +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/07/StackArithmetic/SimpleAdd/SimpleAdd.vm - -// Pushes and adds two constants. -push constant 7 -push constant 8 -add diff --git a/projects/07/StackArithmetic/SimpleAdd/SimpleAddVME.tst b/projects/07/StackArithmetic/SimpleAdd/SimpleAddVME.tst deleted file mode 100644 index 5010f4f..0000000 --- a/projects/07/StackArithmetic/SimpleAdd/SimpleAddVME.tst +++ /dev/null @@ -1,17 +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/07/StackArithmetic/SimpleAdd/SimpleAddVME.tst - -load SimpleAdd.vm, -output-file SimpleAdd.out, -compare-to SimpleAdd.cmp, -output-list RAM[0]%D2.6.2 RAM[256]%D2.6.2; - -set RAM[0] 256, // initializes the stack pointer - -repeat 3 { // SimpleAdd.vm has 3 instructions - vmstep; -} - -output; // the stack pointer and the stack base diff --git a/projects/07/StackArithmetic/StackTest/StackTest.asm b/projects/07/StackArithmetic/StackTest/StackTest.asm deleted file mode 100644 index 560ec6c..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTest.asm +++ /dev/null @@ -1,426 +0,0 @@ -@256 -D=A -@SP -M=D -@17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@EQ2 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFEQ2 -0;JMP -(EQ2) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFEQ2) -@17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@16 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@EQ5 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFEQ5 -0;JMP -(EQ5) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFEQ5) -@16 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@EQ8 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFEQ8 -0;JMP -(EQ8) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFEQ8) -@892 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@891 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@LT11 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFLT11 -0;JMP -(LT11) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFLT11) -@891 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@892 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@LT14 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFLT14 -0;JMP -(LT14) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFLT14) -@891 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@891 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@LT17 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFLT17 -0;JMP -(LT17) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFLT17) -@32767 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@32766 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@GT20 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFGT20 -0;JMP -(GT20) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFGT20) -@32766 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@32767 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@GT23 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFGT23 -0;JMP -(GT23) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFGT23) -@32766 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@32766 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@GT26 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFGT26 -0;JMP -(GT26) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFGT26) -@57 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@31 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@53 -D=A -@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 -@112 -D=A -@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 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M&D -@SP -A=M -M=D -@SP -M=M+1 -@82 -D=A -@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 -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/07/StackArithmetic/StackTest/StackTest.cmp b/projects/07/StackArithmetic/StackTest/StackTest.cmp deleted file mode 100644 index f90fa1b..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTest.cmp +++ /dev/null @@ -1,4 +0,0 @@ -| RAM[0] | RAM[256] | RAM[257] | RAM[258] | RAM[259] | RAM[260] | -| 266 | -1 | 0 | 0 | 0 | -1 | -| RAM[261] | RAM[262] | RAM[263] | RAM[264] | RAM[265] | -| 0 | -1 | 0 | 0 | -91 | diff --git a/projects/07/StackArithmetic/StackTest/StackTest.out b/projects/07/StackArithmetic/StackTest/StackTest.out deleted file mode 100644 index cb182ec..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTest.out +++ /dev/null @@ -1,4 +0,0 @@ -| RAM[0] | RAM[256] | RAM[257] | RAM[258] | RAM[259] | RAM[260] | -| 266 | -1 | 0 | 0 | 0 | -1 | -| RAM[261] | RAM[262] | RAM[263] | RAM[264] | RAM[265] | -| 0 | -1 | 0 | 0 | -91 | diff --git a/projects/07/StackArithmetic/StackTest/StackTest.tst b/projects/07/StackArithmetic/StackTest/StackTest.tst deleted file mode 100644 index f9c5396..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTest.tst +++ /dev/null @@ -1,22 +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/07/StackArithmetic/StackTest/StackTest.tst - -load StackTest.asm, -output-file StackTest.out, -compare-to StackTest.cmp, -output-list RAM[0]%D2.6.2 - RAM[256]%D2.6.2 RAM[257]%D2.6.2 RAM[258]%D2.6.2 RAM[259]%D2.6.2 RAM[260]%D2.6.2; - -set RAM[0] 256, // initializes the stack pointer - -repeat 1000 { // enough cycles to complete the execution - ticktock; -} - -// outputs the stack pointer (RAM[0]) and -// the stack contents: RAM[256]-RAM[265] -output; -output-list RAM[261]%D2.6.2 RAM[262]%D2.6.2 RAM[263]%D2.6.2 RAM[264]%D2.6.2 RAM[265]%D2.6.2; -output; diff --git a/projects/07/StackArithmetic/StackTest/StackTest.vm b/projects/07/StackArithmetic/StackTest/StackTest.vm deleted file mode 100644 index bfe78e0..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTest.vm +++ /dev/null @@ -1,45 +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/07/StackArithmetic/StackTest/StackTest.vm - -// Executes a sequence of arithmetic and logical operations -// on the stack. -push constant 17 -push constant 17 -eq -push constant 17 -push constant 16 -eq -push constant 16 -push constant 17 -eq -push constant 892 -push constant 891 -lt -push constant 891 -push constant 892 -lt -push constant 891 -push constant 891 -lt -push constant 32767 -push constant 32766 -gt -push constant 32766 -push constant 32767 -gt -push constant 32766 -push constant 32766 -gt -push constant 57 -push constant 31 -push constant 53 -add -push constant 112 -sub -neg -and -push constant 82 -or -not diff --git a/projects/07/StackArithmetic/StackTest/StackTestVME.tst b/projects/07/StackArithmetic/StackTest/StackTestVME.tst deleted file mode 100644 index b66bd05..0000000 --- a/projects/07/StackArithmetic/StackTest/StackTestVME.tst +++ /dev/null @@ -1,22 +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/07/StackArithmetic/StackTest/StackTestVME.tst - -load StackTest.vm, -output-file StackTest.out, -compare-to StackTest.cmp, -output-list RAM[0]%D2.6.2 - RAM[256]%D2.6.2 RAM[257]%D2.6.2 RAM[258]%D2.6.2 RAM[259]%D2.6.2 RAM[260]%D2.6.2; - -set RAM[0] 256, // initializes the stack pointer - -repeat 38 { // StackTest.vm consists of 38 instructions - vmstep; -} - -// outputs the stack pointer (RAM[0]) and -// the stack contents: RAM[256]-RAM[265] -output; -output-list RAM[261]%D2.6.2 RAM[262]%D2.6.2 RAM[263]%D2.6.2 RAM[264]%D2.6.2 RAM[265]%D2.6.2; -output; diff --git a/projects/07/VMTranslator b/projects/07/VMTranslator deleted file mode 100755 index 65a46dc..0000000 Binary files a/projects/07/VMTranslator and /dev/null differ diff --git a/projects/07/VMTranslator.hi b/projects/07/VMTranslator.hi deleted file mode 100644 index 078767f..0000000 Binary files a/projects/07/VMTranslator.hi and /dev/null differ diff --git a/projects/07/VMTranslator.hs b/projects/07/VMTranslator.hs deleted file mode 100644 index ce8447d..0000000 --- a/projects/07/VMTranslator.hs +++ /dev/null @@ -1,88 +0,0 @@ -import Data.Char (toUpper) -import Data.List.Split (splitOn) -import System.Environment (getArgs) -import Data.Maybe (fromJust) -import Data.List (elemIndex) - -preamble = "@256\nD=A\n@SP\nM=D\n" - -epilogue = "(END)\n@END\n0;JMP" - -parse' :: [Char] -> [[Char]] -> Int -> [Char] -> [Char] -parse' op [] n _ - | op `elem` ["add", "sub", "and", "or"] = pop "M" ++ pop ('M':(f op):"D") ++ push "D" - | op `elem` ["eq", "gt", "lt"] = pop "M" ++ pop "M-D" ++ ifThenElse op n - | otherwise = pop "M" ++ push (f op:"D") - where f "add" = '+'; f "sub" = '-'; f "and" = '&'; - f "or" = '|'; f "neg" = '-'; f "not" = '!' - -parse' "push" ["constant", x] _ _ = "@" ++ x ++ "\nD=A\n" ++ push "D" - -parse' cmd [seg, x] _ _ | seg `elem` ["local", "argument", "this", "that"] = - case cmd of - "push" -> getAddr seg x ++ "A=D\nD=M\n" ++ push "D" - "pop" -> getAddr seg x ++ "@R13\nM=D\n" ++ pop "M" ++ "@R13\nA=M\nM=D\n" - -parse' cmd [seg, x] _ _ | seg `elem` ["pointer", "temp"] = - case cmd of - "push" -> getAddr' seg x ++ "D=M\n" ++ push "D" - "pop" -> pop "M" ++ getAddr' seg x ++ "M=D\n" - -parse' cmd ["static", x] _ filename = - case cmd of - "push" -> getAddr'' x filename ++ "D=M\n" ++ push "D" - "pop" -> pop "M" ++ getAddr'' x filename ++ "M=D\n" - -getAddr seg x = "@" ++ seg2Lab seg ++ "\nD=M\n@" ++ x ++ "\nD=A+D\n" - -getAddr' seg x = "@" ++ show (read x + (if seg == "pointer" then 3 else 5)) ++ "\n" - -getAddr'' x filename = "@" ++ filename ++ "." ++ x ++ "\n" - -seg2Lab seg = case seg of - "local" -> "LCL" - "argument" -> "ARG" - "this" -> "THIS" - "that" -> "THAT" - -push :: [Char] -> [Char] -push xs = "@SP\nA=M\nM=" ++ xs ++ "\n@SP\nM=M+1\n" - -ifThenElse :: [Char] -> Int -> [Char] -ifThenElse cond n = "@" ++ cond' ++ show n ++ "\nD;J" ++ cond' ++ "\n" ++ push "0" - ++ "@ENDIF" ++ cond' ++ show n ++ "\n0;JMP\n(" ++ cond' ++ show n ++ ")\n" - ++ push "-1" ++ "(ENDIF" ++ cond' ++ show n ++ ")\n" - where cond' = toUpper <$> cond - -pop :: [Char] -> [Char] -pop xs = "@SP\nAM=M-1\nD=" ++ xs ++ "\n" - -parseline :: [[Char]] -> Int -> [Char] -> [Char] -> [Char] -parseline [] _ acc _ = acc -parseline (line:lines) n acc filename = parseline lines (n + 1) (acc ++ parse' cmd target n filename) filename - where cmd:target = words line - -stripJunk :: [Char] -> [[Char]] -stripJunk = filter (not . isEmptyLine) . fmap (head . splitOn "//") . lines . replCrWithNl - -isEmptyLine :: [Char] -> Bool -isEmptyLine = null . filter (not . flip elem " \t") - -parseCode :: [Char] -> [Char] -> [Char] -parseCode xs filename = preamble ++ (parseline (stripJunk xs) 0 "" filename) ++ epilogue - -replCrWithNl :: [Char] -> [Char] -replCrWithNl = fmap cr2nl - where cr2nl '\r' = '\n' - cr2nl c = c - -lastSplit c xs = (take (prefix - 1) xs, drop prefix xs) - where prefix = length xs - (fromJust . elemIndex c . reverse) xs - -main = do - args <- getArgs - let path = head args - let pathWithoutExt = fst $ lastSplit '.' path - let filename = snd $ lastSplit '/' pathWithoutExt - code <- readFile path - writeFile (pathWithoutExt ++ ".asm") (parseCode code filename) diff --git a/projects/07/VMTranslator.o b/projects/07/VMTranslator.o deleted file mode 100644 index f8e3523..0000000 Binary files a/projects/07/VMTranslator.o and /dev/null differ diff --git a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm b/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm deleted file mode 100644 index a2ca368..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm +++ /dev/null @@ -1,421 +0,0 @@ -@256 -D=A -@SP -M=D -@RET0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Sys.init -0;JMP -(RET0) -(Main.fibonacci) -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFMain3 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFMain3 -0;JMP -(IFMain3) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFMain3) -@SP -AM=M-1 -D=M -@Main.fibonacci$IF_TRUE -D;JNE -@Main.fibonacci$IF_FALSE -0;JMP -(Main.fibonacci$IF_TRUE) -@ARG -D=M -@0 -D=A+D -A=D -D=M -@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 -(Main.fibonacci$IF_FALSE) -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@RET13 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Main.fibonacci -0;JMP -(RET13) -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@RET17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Main.fibonacci -0;JMP -(RET17) -@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 -(Sys.init) -@4 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Main.fibonacci -0;JMP -(RET2) -(Sys.init$WHILE) -@Sys.init$WHILE -0;JMP diff --git a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.cmp b/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.cmp deleted file mode 100644 index d667834..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[261]| -| 262 | 3 | diff --git a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.out b/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.out deleted file mode 100644 index fdf5e2d..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.out +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[261]| -| 262 | 3 | diff --git a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.tst b/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.tst deleted file mode 100644 index 1f907b1..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/FibonacciElement.tst +++ /dev/null @@ -1,18 +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/FibonacciElement/FibonacciElement.tst - -// FibonacciElement.asm results from translating both Main.vm and Sys.vm into -// a single assembly program, stored in the file FibonacciElement.asm. - -load FibonacciElement.asm, -output-file FibonacciElement.out, -compare-to FibonacciElement.cmp, -output-list RAM[0]%D1.6.1 RAM[261]%D1.6.1; - -repeat 6000 { - ticktock; -} - -output; diff --git a/projects/08/FunctionCalls/FibonacciElement/FibonacciElementVME.tst b/projects/08/FunctionCalls/FibonacciElement/FibonacciElementVME.tst deleted file mode 100644 index 87c0920..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/FibonacciElementVME.tst +++ /dev/null @@ -1,17 +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/FibonacciElement/FibonacciElementVME.tst - -load, // Load all the VM files from the current directory -output-file FibonacciElement.out, -compare-to FibonacciElement.cmp, -output-list RAM[0]%D1.6.1 RAM[261]%D1.6.1; - -set sp 261, - -repeat 110 { - vmstep; -} - -output; diff --git a/projects/08/FunctionCalls/FibonacciElement/Main.vm b/projects/08/FunctionCalls/FibonacciElement/Main.vm deleted file mode 100644 index 55e5ad2..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/Main.vm +++ /dev/null @@ -1,30 +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/FibonacciElement/Main.vm - -// Computes the n'th element of the Fibonacci series, recursively. -// n is given in argument[0]. Called by the Sys.init function -// (part of the Sys.vm file), which also pushes the argument[0] -// parameter before this code starts running. - -function Main.fibonacci 0 -push argument 0 -push constant 2 -lt // checks if n<2 -if-goto IF_TRUE -goto IF_FALSE -label IF_TRUE // if n<2, return n -push argument 0 -return -label IF_FALSE // if n>=2, returns fib(n-2)+fib(n-1) -push argument 0 -push constant 2 -sub -call Main.fibonacci 1 // computes fib(n-2) -push argument 0 -push constant 1 -sub -call Main.fibonacci 1 // computes fib(n-1) -add // returns fib(n-1) + fib(n-2) -return diff --git a/projects/08/FunctionCalls/FibonacciElement/Sys.vm b/projects/08/FunctionCalls/FibonacciElement/Sys.vm deleted file mode 100644 index f3965c9..0000000 --- a/projects/08/FunctionCalls/FibonacciElement/Sys.vm +++ /dev/null @@ -1,15 +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/FibonacciElement/Sys.vm - -// Pushes a constant, say n, onto the stack, and calls the Main.fibonacii -// function, which computes the n'th element of the Fibonacci series. -// Note that by convention, the Sys.init function is called "automatically" -// by the bootstrap code. - -function Sys.init 0 -push constant 4 -call Main.fibonacci 1 // computes the 4'th fibonacci element -label WHILE -goto WHILE // loops infinitely diff --git a/projects/08/FunctionCalls/NestedCall/NestedCall.cmp b/projects/08/FunctionCalls/NestedCall/NestedCall.cmp deleted file mode 100644 index 9200202..0000000 --- a/projects/08/FunctionCalls/NestedCall/NestedCall.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] | RAM[5] | RAM[6] | -| 261 | 261 | 256 | 4000 | 5000 | 135 | 246 | diff --git a/projects/08/FunctionCalls/NestedCall/NestedCall.html b/projects/08/FunctionCalls/NestedCall/NestedCall.html deleted file mode 100644 index 0821f9c..0000000 --- a/projects/08/FunctionCalls/NestedCall/NestedCall.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - NestedCall.tst — Nand2Tetris Calling Convention Test - - - - -

Synopsis

-NestedCall.tst is an intermediate test (in terms of complexity) intended to be used between the SimpleFunction and -FibonacciElement tests. It may be useful when SimpleFunction passes but FibonacciElement fails or crashes. NestedCall also -tests several requirements of the Function Calling Protocol that are not verified by the other -supplied tests. NestedCall can be used with or without the VM bootstrap code. -

-NestedCallVME.tst runs the same test on the VM Emulator. -

-The NestedCall tests and supporting documentation were written by Mark Armbrust. - - -

Test Structure

-

Startup

-NestedCall is implemented entirely within the Sys.vm file. The first function in Sys.vm is -Sys.init(). This allows it to be used before the bootstrap code has been added to the VM Translator -since there will be no file processing order issues. -

-NestedCall loads Sys.asm, sets up the stack to simulate the bootstrap's call to Sys.init(), then -begins execution at the beginning of Sys.asm. If the bootstrap is not present, the program begins -running with Sys.init() since it is the first function in Sys.vm. -

-If Sys.asm includes the bootstrap, the bootstrap will (re)initialize the stack and call Sys.init(), -so the test should see the same environment either way it gets to Sys.init(). -

-The test setup also initializes the - -

Sys.init()

- -THIS and THAT are set to known values so that context save and restore can be tested. -

-Sys.init() calls Sys.main() and stores the return value in temp 1. This tests call to and -return from a function with no arguments. - -

Sys.main()

-Sys.init() allocates 5 local variables. It sets local 1, local 2 and -local 3. local 0 and local 4 are intentionally not set. -

-THIS and THAT are changed so that context save and restore can be tested. -

-Sys.main() calls Sys.add12(123) and stores the return value in temp 0. This tests call to and -return from a function with arguments. -

-After Sys.add12() returns, Sys.main() sums local 0 through local 4 and returns the -result. This tests that the local segment was properly allocated on the stack and that the local -variables were not overwritten by the call to Sys.main(). It also tests that local 0 and -local 4 were properly initialized to 0. - -

Sys.add12()

- -THIS and THAT are set to known values so that context save and restore can be tested. -

-Returns argument 0 plus 12. - - -

Test Coverage

- -

-Functions with no arguments return to correct RIP (Return Instruction Point) with correct return value on stack.
-This can fail if the RIP is not correctly pushed on the stack by the calling code, or if the returning -code does not store the RIP in a temporary register before overwriting it with the return value. - -

-Functions with arguments return to correct RIP with correct return value on stack.
-This can fail if it is assumed that ARG points to the RIP. - -

-Functions with local variables allocate space on the stack for the local variables.
-This can fail if the function prologue is not written or if the SP is not updated after zeroing -the local variables. - -

-All local variables are initialized to 0.
-Common errors are to forget this completely, or for the zeroing loop to be off by one. - -

-THIS and THAT are correctly retained across function calls. Looking ahead, in Project 9 you will be asked to write a simple computer game in the high-level Jack language. You can run your game (following compilation) on the supplied VM Emulator. But, if you choose to translate the VM code that the compiler generates using your VM Translator, then code like -"push THIS, push THAT ... pop THIS, pop THAT" can cause some interesting failures! - - -

Debugging

-These comments assume that your VM translator has passed the SimpleFunction test. -

-If RAM[0] is incorrect, you have a stack skew. More data was pushed onto the stack by -call than was popped by return, or vice versa. See debugging with -breakpoints later in this section. -

-If one or more of RAM[1] through RAM[4] is incorrect, the LCL, -ARG, THIS and THAT pointers are not being correctly saved or restored. -Most likely problem is when they are being saved; the SimpleFunction test verified that -return restored them correctly. -

-If RAM[5] is incorrect there may be a problem with setting up the ARG pointer. -

-If RAM[4] is incorrect and RAM[5] is correct, there may be a problem with -allocation or initialization of local variables. - -

Debugging with breakpoints

- -To find tough bugs you can use the "breakpoint" facility in the CPU Emulator (red flag button). -You can use breakpoints to have you program stop when it gets to a particular RAM address. For -example:
- • load the NestedCall.tst file,
- • set a PC breakpoint at the ROM address for (Sys.main),
- • hit the run button.
-When the CPU Emulator stops at the breakpoint you can inspect the RAM to check the stack and pointers values. -(If the breakpoint isn't hit, you will need to to single-step debug through -your calling code to see why it didn't get there.) -

-Other useful places to set breakpoints are the entry points to the other functions and at the -first and final instructions generated for return commands. -

-NestedCallStack.html shows the expected stack values at various points -during the test. - -

Finding ROM address in your ASM code

-It is not easy to find the ROM locations where you want to set breakpoints, because there is no -one-to-one correspondence between the ASM file line numbers and the ROM addresses. This is made even more -difficult because the supplied CPU Emulator does not display the (LABELS) in its ROM panel. -

-There are two things that you can do to make this easier. -

-

Modify your assembler to generate a listing file.
-A listing file shows all the ASM source lines, including comments, as well as the ROM addresses and -the values of the labels and the instructions. For example, here is a snippet of a listing file generated by an assembler written by Mark Armbrust: -
-   20    16      @i      // i -= 1
-   21  FC88      M=M-1
-             
-   22  FC10      D=M     // if i > 0
-   23     6      @LOOP
-   24  E301      D;JGT   //      goto LOOP
-             
-   25        (STOP)
-   25    25      @STOP
-   26  EA87      0;JMP
-
-Data Symbols
-
-   16 D  i
-
-Code Symbols
-
-    6 C  LOOP
-   17 C  SKIP
-   25 C  STOP
-
-For the Nand2Tetris environment, it is most useful to list the ROM addresses and A-instruction -values in decimal. In the above snippet, the C-instruction values are -listed in hexadecimal. -

-The list file is generated during pass 2 of the Assembler, parallel to generating the .hack file. To -make it easier to handle blank and comment only lines, Mark has Parser.commandType() return -NO_COMMAND for source lines with no command. Mark also added Parser.sourceLine() that returns the -unmodified source line. -

-

Have your VM Translator write the VM source lines as comments in the ASM output.
-For example: -
-    // label LOOP
-(Sys.init$LOOP)
-    // goto LOOP
-@Sys.init$LOOP
-0;JMP
-    //
-    // // Sys.main()
-    // 
-    // // Sets locals 1, 2 and 3, leaving locals 0 and 4 unchanged to test
-    // // default local initialization to 0.  (RAM set to -1 by test setup.)
-    // // Calls Sys.add12(123) and stores return value (135) in temp 0.
-    // // Returns local 0 + local 1 + local 2 + local 3 + local 4 (456) to confirm
-    // // that locals were not mangled by function call.
-    // 
-    // function Sys.main 5
-(Sys.main)
-@5
-D=-A
-($3)
-@SP
-
-Note that comments in the VM source become double comments. Looking ahead, in Project 11 you will be asked to write a compiler for the Jack language. If your compiler will write the Jack source lines as comments in the -generated VM files, this convention will be quite useful. - - - \ No newline at end of file diff --git a/projects/08/FunctionCalls/NestedCall/NestedCall.tst b/projects/08/FunctionCalls/NestedCall/NestedCall.tst deleted file mode 100644 index 70e5523..0000000 --- a/projects/08/FunctionCalls/NestedCall/NestedCall.tst +++ /dev/null @@ -1,65 +0,0 @@ -// Test file for NestedCall test. - -load NestedCall.asm, -output-file NestedCall.out, -compare-to NestedCall.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[5]%D1.6.1 RAM[6]%D1.6.1; - -set RAM[0] 261, -set RAM[1] 261, -set RAM[2] 256, -set RAM[3] -3, -set RAM[4] -4, -set RAM[5] -1, // test results -set RAM[6] -1, -set RAM[256] 1234, // fake stack frame from call Sys.init -set RAM[257] -1, -set RAM[258] -2, -set RAM[259] -3, -set RAM[260] -4, - -set RAM[261] -1, // Initialize stack to check for local segment -set RAM[262] -1, // being cleared to zero. -set RAM[263] -1, -set RAM[264] -1, -set RAM[265] -1, -set RAM[266] -1, -set RAM[267] -1, -set RAM[268] -1, -set RAM[269] -1, -set RAM[270] -1, -set RAM[271] -1, -set RAM[272] -1, -set RAM[273] -1, -set RAM[274] -1, -set RAM[275] -1, -set RAM[276] -1, -set RAM[277] -1, -set RAM[278] -1, -set RAM[279] -1, -set RAM[280] -1, -set RAM[281] -1, -set RAM[282] -1, -set RAM[283] -1, -set RAM[284] -1, -set RAM[285] -1, -set RAM[286] -1, -set RAM[287] -1, -set RAM[288] -1, -set RAM[289] -1, -set RAM[290] -1, -set RAM[291] -1, -set RAM[292] -1, -set RAM[293] -1, -set RAM[294] -1, -set RAM[295] -1, -set RAM[296] -1, -set RAM[297] -1, -set RAM[298] -1, -set RAM[299] -1, - -repeat 4000 { - ticktock; -} - -output; diff --git a/projects/08/FunctionCalls/NestedCall/NestedCallStack.html b/projects/08/FunctionCalls/NestedCall/NestedCallStack.html deleted file mode 100644 index 70582b6..0000000 --- a/projects/08/FunctionCalls/NestedCall/NestedCallStack.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - NestedCall.tst — Stack Frames - - - - - - - -
- - - - - - - - - - - -
Bootstrap init
Pointers
0256SP
1-1LCL
2-2ARG
3-3THIS
4-4THAT
Stack
256???←SP

- This is how my boot­strap code initial­izes the pointers before calling Sys.init(). -

- Setting the LCL, ARG, THIS and THAT point­ers to known illegal values helps identify - when a pointer is used before it is initial­ized. -

- (If you are running the NestedCall test with­out boot­strap code, you will not see this state.)

-
- - - - - - - - - - - - - - - - -
Entry to Sys.init()
Pointers
0261SP
1261LCL
2256ARG
3-3THIS
4-4THAT
Stack
256*Return IP←ARG
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261???←LCL, SP

- This is how NestedCall.tst initial­izes the pointers and stack. This is what RAM looks - like after my boot­strap calls Sys.init(). -

- (If your VM trans­lation includes the boot­strap, the -1 through -4 values may be - different if your boot­strap initial­izes them.)

-
- - - - - - - - - - - - - - - - - - - - -
Entry to Sys.main()
Pointers
0266SP
1266LCL
2261ARG
34000THIS
45000THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP←ARG
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
266???←LCL, SP
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
After Sys.main() prologue
Pointers
0271SP
1266LCL
2261ARG
34000THIS
45000THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP←ARG
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
2660local 0←LCL
2670local 1
2680local 2
2690local 3
2700local 4
271???←SP

- The function prologue is the assembly language code generated for the - "function" VM command. -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Entry to Sys.add12(123)
Pointers
0277SP
1277LCL
2271ARG
34001THIS
45001THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
2660local 0
267200local 1
26840local 2
2696local 3
2700local 4
271123argument 0←ARG
272*Return IP
273266Saved LCLSys.add12
274261Saved ARG frame
2754001Saved THIS
2765001Saved THAT
277???←LCL, SP
-
- -

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Before Sys.add12() return
Pointers
0278SP
1277LCL
2271ARG
34002THIS
45002THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
2660local 0
267200local 1
26840local 2
2696local 3
2700local 4
271123argument 0←ARG
272*Return IP
273266Saved LCLSys.add12
274261Saved ARG frame
2754001Saved THIS
2765001Saved THAT
277135Return value←LCL
278???←SP
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
After Sys.add12() return
Pointers
0272SP
1266LCL
2261ARG
34001THIS
45001THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP←ARG
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
2660local 0←LCL
267200local 1
26840local 2
2696local 3
2700local 4
271135Return value
272???←SP
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Before Sys.main() return
Pointers
0272SP
1266LCL
2261ARG
34001THIS
45001THAT
Stack
256*Return IP
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261*Return IP←ARG
262261Saved LCL
263256Saved ARGSys.main
2644000Saved THIS frame
2655000Saved THAT
2660local 0←LCL
267200local 1
26840local 2
2696local 3
2700local 4
271246Return value
272???←SP
-
- - - - - - - - - - - - - - - - -
After Sys.main() return
Pointers
0262SP
1261LCL
2256ARG
34000THIS
45000THAT
Stack
256*Return IP←ARG
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261246Return value←LCL
262???←SP
-
- - - - - - - - - - - - - - - -
In Sys.init() halt loop
Pointers
0261SP
1261LCL
2256ARG
34000THIS
45000THAT
Stack
256*Return IP←ARG
257-1Saved LCL
258-2Saved ARGSys.init
259-3Saved THIS frame
260-4Saved THAT
261???←LCL, SP
-
- - - \ No newline at end of file diff --git a/projects/08/FunctionCalls/NestedCall/NestedCallVME.tst b/projects/08/FunctionCalls/NestedCall/NestedCallVME.tst deleted file mode 100644 index 2c689b8..0000000 --- a/projects/08/FunctionCalls/NestedCall/NestedCallVME.tst +++ /dev/null @@ -1,70 +0,0 @@ -// Test file for NestedCall test. - -load Sys.vm, -output-file NestedCall.out, -compare-to NestedCall.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[5]%D1.6.1 RAM[6]%D1.6.1; - -set RAM[0] 261, -set RAM[1] 261, -set RAM[2] 256, -set RAM[3] -3, -set RAM[4] -4, -set RAM[5] -1, // test results -set RAM[6] -1, -set RAM[256] 1234, // fake stack frame from call Sys.init -set RAM[257] -1, -set RAM[258] -2, -set RAM[259] -3, -set RAM[260] -4, - -set RAM[261] -1, // Initialize stack to check for local segment -set RAM[262] -1, // being cleared to zero. -set RAM[263] -1, -set RAM[264] -1, -set RAM[265] -1, -set RAM[266] -1, -set RAM[267] -1, -set RAM[268] -1, -set RAM[269] -1, -set RAM[270] -1, -set RAM[271] -1, -set RAM[272] -1, -set RAM[273] -1, -set RAM[274] -1, -set RAM[275] -1, -set RAM[276] -1, -set RAM[277] -1, -set RAM[278] -1, -set RAM[279] -1, -set RAM[280] -1, -set RAM[281] -1, -set RAM[282] -1, -set RAM[283] -1, -set RAM[284] -1, -set RAM[285] -1, -set RAM[286] -1, -set RAM[287] -1, -set RAM[288] -1, -set RAM[289] -1, -set RAM[290] -1, -set RAM[291] -1, -set RAM[292] -1, -set RAM[293] -1, -set RAM[294] -1, -set RAM[295] -1, -set RAM[296] -1, -set RAM[297] -1, -set RAM[298] -1, -set RAM[299] -1, - -set sp 261, -set local 261, -set argument 256, -set this 3000, -set that 4000; - -repeat 50 { - vmstep; -} -output; diff --git a/projects/08/FunctionCalls/NestedCall/Sys.vm b/projects/08/FunctionCalls/NestedCall/Sys.vm deleted file mode 100644 index 8b0b003..0000000 --- a/projects/08/FunctionCalls/NestedCall/Sys.vm +++ /dev/null @@ -1,63 +0,0 @@ -// Sys.vm for NestedCall test. - -// Sys.init() -// -// Calls Sys.main() and stores return value in temp 1. -// Does not return. (Enters infinite loop.) - -function Sys.init 0 -push constant 4000 // test THIS and THAT context save -pop pointer 0 -push constant 5000 -pop pointer 1 -call Sys.main 0 -pop temp 1 -label LOOP -goto LOOP - -// Sys.main() -// -// Sets locals 1, 2 and 3, leaving locals 0 and 4 unchanged to test -// default local initialization to 0. (RAM set to -1 by test setup.) -// Calls Sys.add12(123) and stores return value (135) in temp 0. -// Returns local 0 + local 1 + local 2 + local 3 + local 4 (456) to confirm -// that locals were not mangled by function call. - -function Sys.main 5 -push constant 4001 -pop pointer 0 -push constant 5001 -pop pointer 1 -push constant 200 -pop local 1 -push constant 40 -pop local 2 -push constant 6 -pop local 3 -push constant 123 -call Sys.add12 1 -pop temp 0 -push local 0 -push local 1 -push local 2 -push local 3 -push local 4 -add -add -add -add -return - -// Sys.add12(int n) -// -// Returns n+12. - -function Sys.add12 0 -push constant 4002 -pop pointer 0 -push constant 5002 -pop pointer 1 -push argument 0 -push constant 12 -add -return 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; diff --git a/projects/08/FunctionCalls/StaticsTest/Class1.vm b/projects/08/FunctionCalls/StaticsTest/Class1.vm deleted file mode 100644 index c463537..0000000 --- a/projects/08/FunctionCalls/StaticsTest/Class1.vm +++ /dev/null @@ -1,20 +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/StaticsTest/Class1.vm - -// Stores two supplied arguments in static[0] and static[1]. -function Class1.set 0 -push argument 0 -pop static 0 -push argument 1 -pop static 1 -push constant 0 -return - -// Returns static[0] - static[1]. -function Class1.get 0 -push static 0 -push static 1 -sub -return diff --git a/projects/08/FunctionCalls/StaticsTest/Class2.vm b/projects/08/FunctionCalls/StaticsTest/Class2.vm deleted file mode 100644 index 94f2946..0000000 --- a/projects/08/FunctionCalls/StaticsTest/Class2.vm +++ /dev/null @@ -1,20 +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/StaticsTest/Class2.vm - -// Stores two supplied arguments in static[0] and static[1]. -function Class2.set 0 -push argument 0 -pop static 0 -push argument 1 -pop static 1 -push constant 0 -return - -// Returns static[0] - static[1]. -function Class2.get 0 -push static 0 -push static 1 -sub -return diff --git a/projects/08/FunctionCalls/StaticsTest/StaticsTest.asm b/projects/08/FunctionCalls/StaticsTest/StaticsTest.asm deleted file mode 100644 index 2d6f2aa..0000000 --- a/projects/08/FunctionCalls/StaticsTest/StaticsTest.asm +++ /dev/null @@ -1,586 +0,0 @@ -@256 -D=A -@SP -M=D -@RET0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Sys.init -0;JMP -(RET0) -(Class2.set) -@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 -@Class2.0 -M=D -@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 -@Class2.1 -M=D -@0 -D=A -@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 -(Class2.get) -@Class2.0 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@Class2.1 -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 -(Sys.init) -@6 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@8 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET3 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@Class1.set -0;JMP -(RET3) -@SP -AM=M-1 -D=M -@5 -M=D -@23 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@15 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET7 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@Class2.set -0;JMP -(RET7) -@SP -AM=M-1 -D=M -@5 -M=D -@RET9 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Class1.get -0;JMP -(RET9) -@RET10 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Class2.get -0;JMP -(RET10) -(Sys.init$WHILE) -@Sys.init$WHILE -0;JMP -(Class1.set) -@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 -@Class1.0 -M=D -@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 -@Class1.1 -M=D -@0 -D=A -@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 -(Class1.get) -@Class1.0 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@Class1.1 -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/StaticsTest/StaticsTest.cmp b/projects/08/FunctionCalls/StaticsTest/StaticsTest.cmp deleted file mode 100644 index 5589f1e..0000000 --- a/projects/08/FunctionCalls/StaticsTest/StaticsTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[261]|RAM[262]| -| 263 | -2 | 8 | diff --git a/projects/08/FunctionCalls/StaticsTest/StaticsTest.out b/projects/08/FunctionCalls/StaticsTest/StaticsTest.out deleted file mode 100644 index 309f058..0000000 --- a/projects/08/FunctionCalls/StaticsTest/StaticsTest.out +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[261]|RAM[262]| -| 263 | -2 | 8 | diff --git a/projects/08/FunctionCalls/StaticsTest/StaticsTest.tst b/projects/08/FunctionCalls/StaticsTest/StaticsTest.tst deleted file mode 100644 index 1b9194e..0000000 --- a/projects/08/FunctionCalls/StaticsTest/StaticsTest.tst +++ /dev/null @@ -1,17 +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/StaticsTest/StaticsTest.tst - -load StaticsTest.asm, -output-file StaticsTest.out, -compare-to StaticsTest.cmp, -output-list RAM[0]%D1.6.1 RAM[261]%D1.6.1 RAM[262]%D1.6.1; - -set RAM[0] 256, - -repeat 2500 { - ticktock; -} - -output; diff --git a/projects/08/FunctionCalls/StaticsTest/StaticsTestVME.tst b/projects/08/FunctionCalls/StaticsTest/StaticsTestVME.tst deleted file mode 100644 index 130ba66..0000000 --- a/projects/08/FunctionCalls/StaticsTest/StaticsTestVME.tst +++ /dev/null @@ -1,17 +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/StaticsTest/StaticsTestVME.tst - -load, // loads all the VM files from the current directory. -output-file StaticsTest.out, -compare-to StaticsTest.cmp, -output-list RAM[0]%D1.6.1 RAM[261]%D1.6.1 RAM[262]%D1.6.1; - -set sp 261, - -repeat 36 { - vmstep; -} - -output; diff --git a/projects/08/FunctionCalls/StaticsTest/Sys.vm b/projects/08/FunctionCalls/StaticsTest/Sys.vm deleted file mode 100644 index 3708322..0000000 --- a/projects/08/FunctionCalls/StaticsTest/Sys.vm +++ /dev/null @@ -1,20 +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/StaticsTest/Sys.vm - -// Tests that different functions, stored in two different -// class files, manipulate the static segment correctly. -function Sys.init 0 -push constant 6 -push constant 8 -call Class1.set 2 -pop temp 0 // Dumps the return value -push constant 23 -push constant 15 -call Class2.set 2 -pop temp 0 // Dumps the return value -call Class1.get 0 -call Class2.get 0 -label WHILE -goto WHILE diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm b/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm deleted file mode 100644 index b2e42a7..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.asm +++ /dev/null @@ -1,133 +0,0 @@ -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -($LOOP_START) -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@LCL -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 -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@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 -@$LOOP_START -D;JNE -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.cmp b/projects/08/ProgramFlow/BasicLoop/BasicLoop.cmp deleted file mode 100644 index 00d35d2..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.cmp +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[256]| -| 257 | 6 | diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.out b/projects/08/ProgramFlow/BasicLoop/BasicLoop.out deleted file mode 100644 index 1786c7c..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.out +++ /dev/null @@ -1,2 +0,0 @@ -| RAM[0] |RAM[256]| -| 257 | 6 | diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.tst b/projects/08/ProgramFlow/BasicLoop/BasicLoop.tst deleted file mode 100644 index 50ca118..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.tst +++ /dev/null @@ -1,20 +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/ProgramFlow/BasicLoop/BasicLoop.tst - -load BasicLoop.asm, -output-file BasicLoop.out, -compare-to BasicLoop.cmp, -output-list RAM[0]%D1.6.1 RAM[256]%D1.6.1; - -set RAM[0] 256, -set RAM[1] 300, -set RAM[2] 400, -set RAM[400] 3, - -repeat 600 { - ticktock; -} - -output; diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoop.vm b/projects/08/ProgramFlow/BasicLoop/BasicLoop.vm deleted file mode 100644 index 2d63f13..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoop.vm +++ /dev/null @@ -1,22 +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/ProgramFlow/BasicLoop/BasicLoop.vm - -// Computes the sum 1 + 2 + ... + argument[0] and pushes the -// result onto the stack. Argument[0] is initialized by the test -// script before this code starts running. -push constant 0 -pop local 0 // initializes sum = 0 -label LOOP_START -push argument 0 -push local 0 -add -pop local 0 // sum = sum + counter -push argument 0 -push constant 1 -sub -pop argument 0 // counter-- -push argument 0 -if-goto LOOP_START // If counter > 0, goto LOOP_START -push local 0 diff --git a/projects/08/ProgramFlow/BasicLoop/BasicLoopVME.tst b/projects/08/ProgramFlow/BasicLoop/BasicLoopVME.tst deleted file mode 100644 index 237fdff..0000000 --- a/projects/08/ProgramFlow/BasicLoop/BasicLoopVME.tst +++ /dev/null @@ -1,20 +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/ProgramFlow/BasicLoop/BasicLoopVME.tst - -load BasicLoop.vm, -output-file BasicLoop.out, -compare-to BasicLoop.cmp, -output-list RAM[0]%D1.6.1 RAM[256]%D1.6.1; - -set sp 256, -set local 300, -set argument 400, -set argument[0] 3, - -repeat 33 { - vmstep; -} - -output; diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm deleted file mode 100644 index 3436cef..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm +++ /dev/null @@ -1,234 +0,0 @@ -@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 -@4 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -($MAIN_LOOP_START) -@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 -@$COMPUTE_ELEMENT -D;JNE -@$END_PROGRAM -0;JMP -($COMPUTE_ELEMENT) -@THAT -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THAT -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 -@THAT -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@4 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@4 -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@$MAIN_LOOP_START -0;JMP -($END_PROGRAM) diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.cmp b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.cmp deleted file mode 100644 index c262a4b..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[3000]|RAM[3001]|RAM[3002]|RAM[3003]|RAM[3004]|RAM[3005]| -| 0 | 1 | 1 | 2 | 3 | 5 | diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.out b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.out deleted file mode 100644 index 304e7c1..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[3000]|RAM[3001]|RAM[3002]|RAM[3003]|RAM[3004]|RAM[3005]| -| 0 | 1 | 1 | 2 | 3 | 5 | diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.tst b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.tst deleted file mode 100644 index 07df2b9..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.tst +++ /dev/null @@ -1,22 +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/ProgramFlow/FibonacciSeries/FibonacciSeries.tst - -load FibonacciSeries.asm, -output-file FibonacciSeries.out, -compare-to FibonacciSeries.cmp, -output-list RAM[3000]%D1.6.2 RAM[3001]%D1.6.2 RAM[3002]%D1.6.2 - RAM[3003]%D1.6.2 RAM[3004]%D1.6.2 RAM[3005]%D1.6.2; - -set RAM[0] 256, -set RAM[1] 300, -set RAM[2] 400, -set RAM[400] 6, -set RAM[401] 3000, - -repeat 1100 { - ticktock; -} - -output; diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.vm b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.vm deleted file mode 100644 index 6a643b6..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.vm +++ /dev/null @@ -1,49 +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/ProgramFlow/FibonacciSeries/FibonacciSeries.vm - -// Puts the first argument[0] elements of the Fibonacci series -// in the memory, starting in the address given in argument[1]. -// Argument[0] and argument[1] are initialized by the test script -// before this code starts running. - -push argument 1 -pop pointer 1 // that = argument[1] - -push constant 0 -pop that 0 // first element in the series = 0 -push constant 1 -pop that 1 // second element in the series = 1 - -push argument 0 -push constant 2 -sub -pop argument 0 // num_of_elements -= 2 (first 2 elements are set) - -label MAIN_LOOP_START - -push argument 0 -if-goto COMPUTE_ELEMENT // if num_of_elements > 0, goto COMPUTE_ELEMENT -goto END_PROGRAM // otherwise, goto END_PROGRAM - -label COMPUTE_ELEMENT - -push that 0 -push that 1 -add -pop that 2 // that[2] = that[0] + that[1] - -push pointer 1 -push constant 1 -add -pop pointer 1 // that += 1 - -push argument 0 -push constant 1 -sub -pop argument 0 // num_of_elements-- - -goto MAIN_LOOP_START - -label END_PROGRAM diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries1.asm b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries1.asm deleted file mode 100644 index 68a4c8e..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries1.asm +++ /dev/null @@ -1,241 +0,0 @@ -@256 -D=A -@SP -M=D -@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 -@4 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THAT -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(MAIN_LOOP_START) -@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 -@COMPUTE_ELEMENT -D;JNE -@END_PROGRAM -0;JMP -(COMPUTE_ELEMENT) -@THAT -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THAT -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 -@THAT -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@4 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@4 -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@MAIN_LOOP_START -0;JMP -(END_PROGRAM) -(END) -@END -0;JMP \ No newline at end of file diff --git a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeriesVME.tst b/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeriesVME.tst deleted file mode 100644 index 243f31b..0000000 --- a/projects/08/ProgramFlow/FibonacciSeries/FibonacciSeriesVME.tst +++ /dev/null @@ -1,22 +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/ProgramFlow/FibonacciSeries/FibonacciSeriesVME.tst - -load FibonacciSeries.vm, -output-file FibonacciSeries.out, -compare-to FibonacciSeries.cmp, -output-list RAM[3000]%D1.6.2 RAM[3001]%D1.6.2 RAM[3002]%D1.6.2 - RAM[3003]%D1.6.2 RAM[3004]%D1.6.2 RAM[3005]%D1.6.2; - -set sp 256, -set local 300, -set argument 400, -set argument[0] 6, -set argument[1] 3000, - -repeat 73 { - vmstep; -} - -output; diff --git a/projects/08/VMTranslator b/projects/08/VMTranslator deleted file mode 100755 index 2b04f49..0000000 Binary files a/projects/08/VMTranslator and /dev/null differ diff --git a/projects/08/VMTranslator.hi b/projects/08/VMTranslator.hi deleted file mode 100644 index 66e0a40..0000000 Binary files a/projects/08/VMTranslator.hi and /dev/null differ diff --git a/projects/08/VMTranslator.hs b/projects/08/VMTranslator.hs deleted file mode 100644 index d5a7075..0000000 --- a/projects/08/VMTranslator.hs +++ /dev/null @@ -1,139 +0,0 @@ ---usage: ./VMTranslator path/to/dir/ ---will produce path/to/dir/dir.asm from path/to/dir/*.vm -import Data.Char (toUpper) -import Data.List.Split (splitOn) -import System.Environment (getArgs) -import Data.Maybe (fromJust) -import Data.List (elemIndex) -import System.Directory (listDirectory) - ---preamble = "@256\nD=A\n@SP\nM=D\n" ---For ProgramFlow and SimpleFunction preamble should be set as "" ---preamble = "" ---For StaticsTest and FibonacciElement, preamble should be setSP ++ callInit -preamble = setSP ++ callInit - where setSP = "@256\nD=A\n@SP\nM=D\n" - callInit = parse' "call" ["Sys.init", "0"] 0 "" "" - ---epilogue = "(END)\n@END\n0;JMP" -epilogue = "" - --- parse' command restOfCommand vmLineNumber fileName functionName = asm code -parse' :: [Char] -> [[Char]] -> Int -> [Char] -> [Char] -> [Char] - -parse' "return" [] _ _ _ = backupLCL ++ backupRet ++ popToARG ++ moveSP ++ restore "THAT" - ++ restore "THIS" ++ restore "ARG" ++ restore "LCL" - ++ gotoRet - where backupLCL = "@LCL\nD=M\n@R13\nM=D\n" - backupRet = "@5\nA=D-A\nD=M\n@R14\nM=D\n" - popToARG = pop "M" ++ "@ARG\nA=M\nM=D\n" - moveSP = "@ARG\nD=M+1\n@SP\nM=D\n" - restore name = "@R13\nAM=M-1\nD=M\n@" ++ name ++ "\nM=D\n" - gotoRet = "@R14\nA=M\n0;JMP\n" - -parse' op [] n fileName _ - | op `elem` ["add", "sub", "and", "or"] = pop "M" ++ pop ('M':(f op):"D") ++ push "D" - | op `elem` ["eq", "gt", "lt"] = pop "M" ++ pop "M-D" ++ ifThenElse op n fileName - | otherwise = pop "M" ++ push (f op:"D") - where f "add" = '+'; f "sub" = '-'; f "and" = '&'; - f "or" = '|'; f "neg" = '-'; f "not" = '!' - -parse' "push" ["constant", x] _ _ _ = "@" ++ x ++ "\nD=A\n" ++ push "D" - -parse' cmd [seg, x] _ _ _ | seg `elem` ["local", "argument", "this", "that"] = - case cmd of - "push" -> getAddr seg x ++ "A=D\nD=M\n" ++ push "D" - "pop" -> getAddr seg x ++ "@R13\nM=D\n" ++ pop "M" ++ "@R13\nA=M\nM=D\n" - -parse' cmd [seg, x] _ _ _ | seg `elem` ["pointer", "temp"] = - case cmd of - "push" -> getAddr' seg x ++ "D=M\n" ++ push "D" - "pop" -> pop "M" ++ getAddr' seg x ++ "M=D\n" - -parse' cmd ["static", x] _ filename _ = - case cmd of - "push" -> getAddr'' x filename ++ "D=M\n" ++ push "D" - "pop" -> pop "M" ++ getAddr'' x filename ++ "M=D\n" - -parse' "label" [x] _ _ fName = "(" ++ fName ++ "$" ++ x ++ ")\n" - -parse' "goto" [x] _ _ fName = "@" ++ fName ++ "$" ++ x ++ "\n0;JMP\n" - -parse' "if-goto" [x] _ _ fName = pop "M" ++ "@" ++ fName ++ "$" ++ x ++ "\nD;JNE\n" - -parse' "function" [f, n] _ _ _ = "(" ++ f ++ ")\n" ++ (mconcat $ replicate (read n) $ push "0") - -parse' "call" [f, m] n _ _ = pushRet ++ save "LCL" ++ save "ARG" ++ save "THIS" - ++ save "THAT" ++ setLCL ++ setARG ++ gotoF ++ placeRet - where pushRet = "@RET" ++ show n ++ "\nD=A\n" ++ push "D" - save x = "@" ++ x ++ "\nD=M\n" ++ push "D" - setLCL = "@SP\nD=M\n@LCL\nM=D\n" - setARG = "@5\nD=D-A\n@" ++ m ++ "\nD=D-A\n@ARG\nM=D\n" - placeRet = "(RET" ++ show n ++ ")\n" - gotoF = "@" ++ f ++ "\n0;JMP\n" ---To do the return-addr: generate label RET582 if say n==582, place the label after the goto f jump - -getAddr seg x = "@" ++ seg2Lab seg ++ "\nD=M\n@" ++ x ++ "\nD=A+D\n" - -getAddr' seg x = "@" ++ show (read x + (if seg == "pointer" then 3 else 5)) ++ "\n" - -getAddr'' x filename = "@" ++ filename ++ "." ++ x ++ "\n" - -seg2Lab seg = case seg of - "local" -> "LCL" - "argument" -> "ARG" - "this" -> "THIS" - "that" -> "THAT" - -push :: [Char] -> [Char] -push xs = "@SP\nA=M\nM=" ++ xs ++ "\n@SP\nM=M+1\n" - --- should change @label to @IFlabel -ifThenElse :: [Char] -> Int -> [Char] -> [Char] -ifThenElse cond n fileName = "@IF" ++ label ++ "\nD;J" ++ cond' ++ "\n" ++ push "0" - ++ "@ENDIF" ++ label ++ "\n0;JMP\n(IF" ++ label ++ ")\n" - ++ push "-1" ++ "(ENDIF" ++ label ++ ")\n" - where label = fileName ++ show n - cond' = toUpper <$> cond - -pop :: [Char] -> [Char] -pop xs = "@SP\nAM=M-1\nD=" ++ xs ++ "\n" - -parseline :: [[Char]] -> Int -> [Char] -> [Char] -> [Char] -> [Char] -parseline [] _ acc _ _ = acc -parseline (line:lines) n acc filename funName = parseline lines (n + 1) (acc ++ parse' cmd target n filename funName') filename funName' - where cmd:target = words line - funName' = if cmd == "function" then head target else funName - -stripJunk :: [Char] -> [[Char]] -stripJunk = filter (not . isEmptyLine) . fmap (head . splitOn "//") . lines . replCrWithNl - -isEmptyLine :: [Char] -> Bool -isEmptyLine = null . filter (not . flip elem " \t") - -parseCode :: [Char] -> [Char] -> [Char] -parseCode xs filename = (parseline (stripJunk xs) 0 "" filename "") - -parseCodes :: [[Char]] -> [[Char]] -> [Char] -parseCodes codes filenames = preamble ++ (mconcat $ zipWith parseCode codes filenames) ++ epilogue - -replCrWithNl :: [Char] -> [Char] -replCrWithNl = fmap cr2nl - where cr2nl '\r' = '\n' - cr2nl c = c - -lastSplit c xs = (take (prefix - 1) xs, drop prefix xs) - where prefix = length xs - (fromJust . elemIndex c . reverse) xs - - --- assuming the input is a dir with a trailing '/' -main = do - dir <- head <$> getArgs - filesWODir <- filter isVMfile <$> listDirectory dir - let vmFiles = (dir++) <$> filesWODir - let ofPath = dir ++ (snd $ lastSplit '/' $ init dir) ++ ".asm" - let filenames = removeExt <$> filesWODir - codes <- sequence $ readFile <$> vmFiles - writeFile ofPath $ parseCodes codes filenames - where isVMfile xs = drop (length xs - 3) xs == ".vm" - removeExt xs = take (length xs - 3) xs diff --git a/projects/08/VMTranslator.o b/projects/08/VMTranslator.o deleted file mode 100644 index 1d984cf..0000000 Binary files a/projects/08/VMTranslator.o and /dev/null differ diff --git a/projects/09/Average/Main.jack b/projects/09/Average/Main.jack deleted file mode 100644 index a359602..0000000 --- a/projects/09/Average/Main.jack +++ /dev/null @@ -1,27 +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/09/Average/Main.jack - -// Inputs some numbers and computes their average -class Main { - function void main() { - var Array a; - var int length; - var int i, sum; - - let length = Keyboard.readInt("How many numbers? "); - let a = Array.new(length); // constructs the array - - let i = 0; - while (i < length) { - let a[i] = Keyboard.readInt("Enter a number: "); - let sum = sum + a[i]; - let i = i + 1; - } - - do Output.printString("The average is "); - do Output.printInt(sum / length); - return; - } -} diff --git a/projects/09/BitmapEditor/BitmapEditor.html b/projects/09/BitmapEditor/BitmapEditor.html deleted file mode 100644 index fdb9e0b..0000000 --- a/projects/09/BitmapEditor/BitmapEditor.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - Sokoban Bitmap Editor - - - -

IDC Herzliya / Efi Arazi School of Computer Science / Digital Systems Construction, Spring 2011 / Project 09 / Golan Parashi

-

Sokoban Bitmap Editor

-

This javascript applicaiton is used to generate highly optimized jack code for drawing a 16x16 bitmap to the screen.

-

Using the mouse, click the desired cell to mark/unmark it. You may use 90 degrees rotation and vertical mirroring by
- clicking the appropriate buttons.

-

When you are finished drawing, you may select function type and enter function's name.

-

- - - - - - - - - - - - - - -
BitmapGenerated Jack Code
-
- - - - - - - -
Function Type:
- -
Function Name:
-
-
- - - - -
- - - - \ No newline at end of file diff --git a/projects/09/BitmapEditor/BitmapEditor.iml b/projects/09/BitmapEditor/BitmapEditor.iml deleted file mode 100644 index ef582b1..0000000 --- a/projects/09/BitmapEditor/BitmapEditor.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/projects/09/Fraction/Fraction.jack b/projects/09/Fraction/Fraction.jack deleted file mode 100644 index c86f0a5..0000000 --- a/projects/09/Fraction/Fraction.jack +++ /dev/null @@ -1,65 +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/09/Fraction/Fraction.jack - -/** Represents the Fraction type and related operations. */ -class Fraction { - field int numerator, denominator; // field = property = member variable. - - /** Constructs a (reduced) fraction from the given numerator and denominator. */ - constructor Fraction new(int x, int y) { - let numerator = x; - let denominator = y; - do reduce(); // reduces the fraction - return this; // a constructor is expected to return a reference to the new object - } - - // Reduces this fraction. - method void reduce() { - var int g; - let g = Fraction.gcd(numerator, denominator); - if (g > 1) { - let numerator = numerator / g; - let denominator = denominator / g; - } - return; - } - - /** Accessors. */ - method int getNumerator() { return numerator; } - method int getDenominator() { return denominator; } - - /** Returns the sum of this fraction and the other one. */ - method Fraction plus(Fraction other) { - var int sum; - let sum = (numerator * other.getDenominator()) + (other.getNumerator() * denominator); - return Fraction.new(sum, denominator * other.getDenominator()); - } - - // More fraction-related methods (minus, times, div, etc.) can be added here. - - /** Disposes this fraction. */ - method void dispose() { - do Memory.deAlloc(this); // uses an OS routine to recycle the memory held by the object - return; - } - - /** Prints this fraction in the format x/y. */ - method void print() { - do Output.printInt(numerator); - do Output.printString("/"); - do Output.printInt(denominator); - return; - } - - // Computes the greatest common divisor of the given integers. - function int gcd(int a, int b) { - var int r; - while (~(b = 0)) { // applies Euclid's algorithm - let r = a - (b * (a / b)); // r = remainder of the integer division a/b - let a = b; let b = r; - } - return a; - } -} diff --git a/projects/09/Fraction/Main.jack b/projects/09/Fraction/Main.jack deleted file mode 100644 index 43ddece..0000000 --- a/projects/09/Fraction/Main.jack +++ /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/09/Fraction/Main.jack - -// Computes the sum of 2/3 and 1/5. -class Main { - function void main() { - var Fraction a, b, c; - let a = Fraction.new(2,3); - let b = Fraction.new(1,5); - let c = a.plus(b); // Computes c = a + b - do c.print(); // Prints "13/15" - return; - } -} diff --git a/projects/09/HelloWorld/HelloWorld.asm b/projects/09/HelloWorld/HelloWorld.asm deleted file mode 100644 index 550a010..0000000 --- a/projects/09/HelloWorld/HelloWorld.asm +++ /dev/null @@ -1,923 +0,0 @@ -@256 -D=A -@SP -M=D -@RET0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Sys.init -0;JMP -(RET0) -(Main.main) -@12 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@String.new -0;JMP -(RET2) -@72 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET4 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET4) -@101 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET6 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET6) -@108 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET8 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET8) -@108 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET10 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET10) -@111 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET12 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET12) -@32 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET14 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET14) -@119 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET16 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET16) -@111 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET18 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET18) -@114 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET20 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET20) -@108 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET22 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET22) -@100 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET24 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET24) -@33 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET26 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@2 -D=D-A -@ARG -M=D -@String.appendChar -0;JMP -(RET26) -@RET27 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Output.printString -0;JMP -(RET27) -@SP -AM=M-1 -D=M -@5 -M=D -@RET29 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Output.println -0;JMP -(RET29) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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/09/HelloWorld/Main.jack b/projects/09/HelloWorld/Main.jack deleted file mode 100644 index 446b21b..0000000 --- a/projects/09/HelloWorld/Main.jack +++ /dev/null @@ -1,14 +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/09/HelloWorld/Main.jack - -/** Hello World program. */ -class Main { - function void main() { - /* Prints some text using the standard library. */ - do Output.printString("Hello world!"); - do Output.println(); // New line - return; - } -} diff --git a/projects/09/HelloWorld/Main.vm b/projects/09/HelloWorld/Main.vm deleted file mode 100644 index 32eb03f..0000000 --- a/projects/09/HelloWorld/Main.vm +++ /dev/null @@ -1,33 +0,0 @@ -function Main.main 0 -push constant 12 -call String.new 1 -push constant 72 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -return diff --git a/projects/09/Jack OS API.pdf b/projects/09/Jack OS API.pdf deleted file mode 100644 index e653e86..0000000 Binary files a/projects/09/Jack OS API.pdf and /dev/null differ diff --git a/projects/09/K/Board.jack b/projects/09/K/Board.jack deleted file mode 100644 index 91a8d98..0000000 --- a/projects/09/K/Board.jack +++ /dev/null @@ -1,327 +0,0 @@ -class Board { - field Array grid; - field int nTurn, seed, status; // status: 0: begin game; 1: in game; 2: lose; 3: win; - static String boardBar, strLost, strCont, strGameOver, strWon, strTurn; - - constructor Board new() { - var int i; - let grid = Array.new(4); - let i = 0; - while (i < 4) { - let grid[i] = Array.new(4); - let i = i + 1; - } - do initBoard(); - let seed = 0; - return this; - } - - function void init() { - let boardBar = "+----+"; - let strLost = "You lost!"; - let strWon = "You won!"; - let strCont = "Press any key to continue"; - let strGameOver = "Game over!"; - let strTurn = "Turn: "; - return; - } - - method void initBoard() { - var int i, j; - var Array t; - let i = 0; - while (i < 4) { - let j = 0; - let t = grid[i]; - while (j < 4) { - let t[j] = 32; - let j = j + 1; - } - let i = i + 1; - } - let t = grid[0]; - let t[0] = 65; - let nTurn = 0; - let status = 0; - return; - } - - - method void transpose() { - do exch(0, 1); - do exch(0, 2); - do exch(0, 3); - do exch(1, 2); - do exch(1, 3); - do exch(2, 3); - return; - } - - method void exch(int i, int j){ - var int t; - var Array s1, s2; - let s1 = grid[i]; - let s2 = grid[j]; - let t = s1[j]; - let s1[j] = s2[i]; - let s2[i] = t; - return; - } - - method void align(Array xs, boolean left){ - var int i, j; - let i = 0; - let j = 0; - if (left) { - while (i < 4) { - if (xs[i] > 64) { - let xs[j] = xs[i]; - let j = j + 1; - } - let i = i + 1; - } - while (j < 4) { - let xs[j] = 32; - let j = j + 1; - } - } else { - while (i < 4) { - if (xs[3 - i] > 64) { - let xs[3 - j] = xs[3 - i]; - let j = j + 1; - } - let i = i + 1; - } - while (j < 4) { - let xs[3 - j] = 32; - let j = j + 1; - } - } - return; - } - - method void reduce(Array xs, boolean left){ - if ((xs[0] = xs[1]) & (xs[2] = xs[3]) & (xs[0] > 64) & (xs[2] > 64)) { - if (left) { - let xs[0] = xs[0] + 1; - let xs[1] = xs[2] + 1; - let xs[2] = 32; - let xs[3] = 32; - } else { - let xs[3] = xs[3] + 1; - let xs[2] = xs[1] + 1; - let xs[1] = 32; - let xs[0] = 32; - } - return; - } - if ((xs[0] = xs[1]) & (xs[0] > 64)) { - if (left) { - let xs[0] = xs[0] + 1; - let xs[1] = xs[2]; - let xs[2] = xs[3]; - let xs[3] = 32; - } else { - let xs[1] = xs[1] + 1; - let xs[0] = 32; - } - return; - } - if ((xs[2] = xs[3]) & (xs[2] > 64)) { - if (left) { - let xs[2] = xs[2] + 1; - let xs[3] = 32; - } else { - let xs[3] = xs[3] + 1; - let xs[2] = xs[1]; - let xs[1] = xs[0]; - let xs[0] = 32; - } - return; - } - if ((xs[1] = xs[2]) & (xs[1] > 64)) { - if (left) { - let xs[1] = xs[1] + 1; - let xs[2] = xs[3]; - let xs[3] = 32; - } else { - let xs[2] = xs[2] + 1; - let xs[1] = xs[0]; - let xs[0] = 32; - } - return; - } - return; - } - - method void addTile(){ - var Array t; - var int r, c, parity, newTile; - /* - let t = grid[1]; - if (t[1] = 32) { - let t[1] = 65; - } - */ - - if (~(status = 1)) { - return; - } - - let seed = seed * 25173 + 13849; - if (seed < 0) { - let seed = - seed; - } - - if (seed - (seed / 2 * 2) = 0) { - let parity = 1; - } else { - let parity = -1; - } - - let seed = seed - (seed / 16 * 16); - let r = seed / 4; - let c = seed - (4 * r); - let t = grid[r]; - let newTile = 65; - - while (t[c] > 64){ - let seed = seed + parity; - if (seed < 0) { - let seed = 15; - } - let seed = seed - (seed / 16 * 16); - let r = seed / 4; - let c = seed - (4 * r); - let t = grid[r]; - let newTile = 131 - newTile; - } - let t[c] = newTile; - return; - } - - method void transform(char dir){ - var boolean isVertical, left; - var int i; - if ((dir = 0) | (dir = 1)) { - let left = true; - } else { - let left = false; - } - if ((dir = 0) | (dir = 2)) { - let isVertical = false; - } else { - let isVertical = true; - } - if (isVertical) { - do transpose(); - } - let i = 0; - while (i < 4) { - do align(grid[i], left); - do reduce(grid[i], left); - let i = i + 1; - } - if (isVertical) { - do transpose(); - } - return; - } - - method void next(int dir){ - let nTurn = nTurn + 1; - do transform(dir); - do updateStatus(); - return; - } - - method int getStatus(){ - return status; - } - - method void setStatus(int x){ - let status = x; - return; - } - - method void updateStatus(){ - var int i, j; - var Array r; - let i = 0; - while (i < 4) { - let r = grid[i]; - let j = 0; - while (j < 4) { - if (r[j] = 75) { - let status = 3; - return; - } - if (r[j] = 32) { - let status = 1; - return; - } - let j = j + 1; - } - let i = i + 1; - } - let status = 2; - return; - } - - method void draw(){ - var int r, c, i, j; - var Array t; - let r = 9; - let c = 30; - - if (status = 0) { - do Output.moveCursor(r - 1, c - 1); - do Output.printChar(75); - do Output.moveCursor(r + 1, c - 1); - do Output.printString(strCont); - } else { if (status = 2) { - do Output.moveCursor(r - 1, c - 1); - do Output.printString(strGameOver); - do Output.moveCursor(r + 1, c - 1); - do Output.printString(strLost); - do Output.moveCursor(r + 3, c - 1); - do Output.printString(strCont); - } else { if (status = 3) { - do Output.moveCursor(r - 1, c - 1); - do Output.printString(strGameOver); - do Output.moveCursor(r + 1, c - 1); - do Output.printString(strWon); - do Output.moveCursor(r + 3, c - 1); - do Output.printString(strCont); - } else { - do Output.moveCursor(r - 1, c - 1); - do Output.printString(boardBar); - do Output.moveCursor(r + 4, c - 1); - do Output.printString(boardBar); - - let i = 0; - while (i < 4) { - let j = 0; - do Output.moveCursor(r + i, c - 1); - do Output.printChar(124); // 124 is | - let t = grid[i]; - while (j < 4) { - do Output.printChar(t[j]); - let j = j + 1; - } - do Output.printChar(124); - let i = i + 1; - } - - do Output.moveCursor(r + 6, c - 2); - do Output.printString(strTurn); - do Output.printInt(nTurn); - }}} - return; - } - - method void dispose() { - do Memory.deAlloc(this); - return; - } -} diff --git a/projects/09/K/Board.vm b/projects/09/K/Board.vm deleted file mode 100644 index 985e813..0000000 --- a/projects/09/K/Board.vm +++ /dev/null @@ -1,1465 +0,0 @@ -function Board.new 1 -push constant 4 -call Memory.alloc 1 -pop pointer 0 -push constant 4 -call Array.new 1 -pop this 0 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push constant 4 -lt -not -if-goto WHILE_END0 -push local 0 -push this 0 -add -push constant 4 -call Array.new 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push pointer 0 -call Board.initBoard 1 -pop temp 0 -push constant 0 -pop this 2 -push pointer 0 -return -function Board.init 0 -push constant 6 -call String.new 1 -push constant 43 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 43 -call String.appendChar 2 -pop static 0 -push constant 9 -call String.new 1 -push constant 89 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -pop static 1 -push constant 8 -call String.new 1 -push constant 89 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -pop static 4 -push constant 25 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -pop static 2 -push constant 10 -call String.new 1 -push constant 71 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -pop static 3 -push constant 6 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -pop static 5 -push constant 0 -return -function Board.initBoard 3 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push constant 4 -lt -not -if-goto WHILE_END0 -push constant 0 -pop local 1 -push local 0 -push this 0 -add -pop pointer 1 -push that 0 -pop local 2 -label WHILE_EXP1 -push local 1 -push constant 4 -lt -not -if-goto WHILE_END1 -push local 1 -push local 2 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -push this 0 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 0 -push local 2 -add -push constant 65 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -pop this 1 -push constant 0 -pop this 3 -push constant 0 -return -function Board.transpose 0 -push argument 0 -pop pointer 0 -push pointer 0 -push constant 0 -push constant 1 -call Board.exch 3 -pop temp 0 -push pointer 0 -push constant 0 -push constant 2 -call Board.exch 3 -pop temp 0 -push pointer 0 -push constant 0 -push constant 3 -call Board.exch 3 -pop temp 0 -push pointer 0 -push constant 1 -push constant 2 -call Board.exch 3 -pop temp 0 -push pointer 0 -push constant 1 -push constant 3 -call Board.exch 3 -pop temp 0 -push pointer 0 -push constant 2 -push constant 3 -call Board.exch 3 -pop temp 0 -push constant 0 -return -function Board.exch 3 -push argument 0 -pop pointer 0 -push argument 1 -push this 0 -add -pop pointer 1 -push that 0 -pop local 1 -push argument 2 -push this 0 -add -pop pointer 1 -push that 0 -pop local 2 -push argument 2 -push local 1 -add -pop pointer 1 -push that 0 -pop local 0 -push argument 2 -push local 1 -add -push argument 1 -push local 2 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push argument 1 -push local 2 -add -push local 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return -function Board.align 2 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -push constant 0 -pop local 1 -push argument 2 -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -label WHILE_EXP0 -push local 0 -push constant 4 -lt -not -if-goto WHILE_END0 -push local 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 1 -push argument 1 -add -push local 0 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -label IF_FALSE1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -label WHILE_EXP1 -push local 1 -push constant 4 -lt -not -if-goto WHILE_END1 -push local 1 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -goto IF_END0 -label IF_FALSE0 -label WHILE_EXP2 -push local 0 -push constant 4 -lt -not -if-goto WHILE_END2 -push constant 3 -push local 0 -sub -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 3 -push local 1 -sub -push argument 1 -add -push constant 3 -push local 0 -sub -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -label IF_FALSE2 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP2 -label WHILE_END2 -label WHILE_EXP3 -push local 1 -push constant 4 -lt -not -if-goto WHILE_END3 -push constant 3 -push local 1 -sub -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP3 -label WHILE_END3 -label IF_END0 -push constant 0 -return -function Board.reduce 0 -push argument 0 -pop pointer 0 -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -eq -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -eq -and -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 2 -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 0 -push argument 1 -add -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push argument 1 -add -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -goto IF_END1 -label IF_FALSE1 -push constant 3 -push argument 1 -add -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push argument 1 -add -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -label IF_END1 -push constant 0 -return -label IF_FALSE0 -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -eq -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push argument 2 -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push constant 0 -push argument 1 -add -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push argument 1 -add -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push argument 1 -add -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -goto IF_END3 -label IF_FALSE3 -push constant 1 -push argument 1 -add -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -label IF_END3 -push constant 0 -return -label IF_FALSE2 -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -eq -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -push argument 2 -if-goto IF_TRUE5 -goto IF_FALSE5 -label IF_TRUE5 -push constant 2 -push argument 1 -add -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -goto IF_END5 -label IF_FALSE5 -push constant 3 -push argument 1 -add -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push argument 1 -add -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push argument 1 -add -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -label IF_END5 -push constant 0 -return -label IF_FALSE4 -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -eq -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -if-goto IF_TRUE6 -goto IF_FALSE6 -label IF_TRUE6 -push argument 2 -if-goto IF_TRUE7 -goto IF_FALSE7 -label IF_TRUE7 -push constant 1 -push argument 1 -add -push constant 1 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push argument 1 -add -push constant 3 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -goto IF_END7 -label IF_FALSE7 -push constant 2 -push argument 1 -add -push constant 2 -push argument 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push argument 1 -add -push constant 0 -push argument 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push argument 1 -add -push constant 32 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -label IF_END7 -push constant 0 -return -label IF_FALSE6 -push constant 0 -return -function Board.addTile 5 -push argument 0 -pop pointer 0 -push this 3 -push constant 1 -eq -not -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -return -label IF_FALSE0 -push this 2 -push constant 25173 -call Math.multiply 2 -push constant 13849 -add -pop this 2 -push this 2 -push constant 0 -lt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push this 2 -neg -pop this 2 -label IF_FALSE1 -push this 2 -push this 2 -push constant 2 -call Math.divide 2 -push constant 2 -call Math.multiply 2 -sub -push constant 0 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 1 -pop local 3 -goto IF_END2 -label IF_FALSE2 -push constant 1 -neg -pop local 3 -label IF_END2 -push this 2 -push this 2 -push constant 16 -call Math.divide 2 -push constant 16 -call Math.multiply 2 -sub -pop this 2 -push this 2 -push constant 4 -call Math.divide 2 -pop local 1 -push this 2 -push constant 4 -push local 1 -call Math.multiply 2 -sub -pop local 2 -push local 1 -push this 0 -add -pop pointer 1 -push that 0 -pop local 0 -push constant 65 -pop local 4 -label WHILE_EXP0 -push local 2 -push local 0 -add -pop pointer 1 -push that 0 -push constant 64 -gt -not -if-goto WHILE_END0 -push this 2 -push local 3 -add -pop this 2 -push this 2 -push constant 0 -lt -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push constant 15 -pop this 2 -label IF_FALSE3 -push this 2 -push this 2 -push constant 16 -call Math.divide 2 -push constant 16 -call Math.multiply 2 -sub -pop this 2 -push this 2 -push constant 4 -call Math.divide 2 -pop local 1 -push this 2 -push constant 4 -push local 1 -call Math.multiply 2 -sub -pop local 2 -push local 1 -push this 0 -add -pop pointer 1 -push that 0 -pop local 0 -push constant 131 -push local 4 -sub -pop local 4 -goto WHILE_EXP0 -label WHILE_END0 -push local 2 -push local 0 -add -push local 4 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return -function Board.transform 3 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -eq -push argument 1 -push constant 1 -eq -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -not -pop local 1 -goto IF_END0 -label IF_FALSE0 -push constant 0 -pop local 1 -label IF_END0 -push argument 1 -push constant 0 -eq -push argument 1 -push constant 2 -eq -or -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 0 -pop local 0 -goto IF_END1 -label IF_FALSE1 -push constant 0 -not -pop local 0 -label IF_END1 -push local 0 -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push pointer 0 -call Board.transpose 1 -pop temp 0 -label IF_FALSE2 -push constant 0 -pop local 2 -label WHILE_EXP0 -push local 2 -push constant 4 -lt -not -if-goto WHILE_END0 -push pointer 0 -push local 2 -push this 0 -add -pop pointer 1 -push that 0 -push local 1 -call Board.align 3 -pop temp 0 -push pointer 0 -push local 2 -push this 0 -add -pop pointer 1 -push that 0 -push local 1 -call Board.reduce 3 -pop temp 0 -push local 2 -push constant 1 -add -pop local 2 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push pointer 0 -call Board.transpose 1 -pop temp 0 -label IF_FALSE3 -push constant 0 -return -function Board.next 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -add -pop this 1 -push pointer 0 -push argument 1 -call Board.transform 2 -pop temp 0 -push pointer 0 -call Board.updateStatus 1 -pop temp 0 -push constant 0 -return -function Board.getStatus 0 -push argument 0 -pop pointer 0 -push this 3 -return -function Board.setStatus 0 -push argument 0 -pop pointer 0 -push argument 1 -pop this 3 -push constant 0 -return -function Board.updateStatus 3 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push constant 4 -lt -not -if-goto WHILE_END0 -push local 0 -push this 0 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 0 -pop local 1 -label WHILE_EXP1 -push local 1 -push constant 4 -lt -not -if-goto WHILE_END1 -push local 1 -push local 2 -add -pop pointer 1 -push that 0 -push constant 75 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 3 -pop this 3 -push constant 0 -return -label IF_FALSE0 -push local 1 -push local 2 -add -pop pointer 1 -push that 0 -push constant 32 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 1 -pop this 3 -push constant 0 -return -label IF_FALSE1 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 2 -pop this 3 -push constant 0 -return -function Board.draw 5 -push argument 0 -pop pointer 0 -push constant 9 -pop local 0 -push constant 30 -pop local 1 -push this 3 -push constant 0 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push local 0 -push constant 1 -sub -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 75 -call Output.printChar 1 -pop temp 0 -push local 0 -push constant 1 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 2 -call Output.printString 1 -pop temp 0 -goto IF_END0 -label IF_FALSE0 -push this 3 -push constant 2 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 0 -push constant 1 -sub -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 3 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 1 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 1 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 3 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 2 -call Output.printString 1 -pop temp 0 -goto IF_END1 -label IF_FALSE1 -push this 3 -push constant 3 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push local 0 -push constant 1 -sub -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 3 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 1 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 4 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 3 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 2 -call Output.printString 1 -pop temp 0 -goto IF_END2 -label IF_FALSE2 -push local 0 -push constant 1 -sub -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 0 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 4 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push static 0 -call Output.printString 1 -pop temp 0 -push constant 0 -pop local 2 -label WHILE_EXP0 -push local 2 -push constant 4 -lt -not -if-goto WHILE_END0 -push constant 0 -pop local 3 -push local 0 -push local 2 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 124 -call Output.printChar 1 -pop temp 0 -push local 2 -push this 0 -add -pop pointer 1 -push that 0 -pop local 4 -label WHILE_EXP1 -push local 3 -push constant 4 -lt -not -if-goto WHILE_END1 -push local 3 -push local 4 -add -pop pointer 1 -push that 0 -call Output.printChar 1 -pop temp 0 -push local 3 -push constant 1 -add -pop local 3 -goto WHILE_EXP1 -label WHILE_END1 -push constant 124 -call Output.printChar 1 -pop temp 0 -push local 2 -push constant 1 -add -pop local 2 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -push constant 6 -add -push local 1 -push constant 2 -sub -call Output.moveCursor 2 -pop temp 0 -push static 5 -call Output.printString 1 -pop temp 0 -push this 1 -call Output.printInt 1 -pop temp 0 -label IF_END2 -label IF_END1 -label IF_END0 -push constant 0 -return -function Board.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return diff --git a/projects/09/K/K.txt b/projects/09/K/K.txt deleted file mode 100644 index dc75c82..0000000 --- a/projects/09/K/K.txt +++ /dev/null @@ -1,25 +0,0 @@ -from a to k - -- a title frame showing game name and instructions. space to continue. -- a main frame showing the game running -- a endofgame frame showing game results: win or lose - -- a Board class with cell being a 4 by 4 two-d array. -- arrange strings according to an orientation: arrange(4 strings, dir)=cells - - dir: 0: align to left, 1: align to right, 2: align to top, 3:align to bottom - - e.g.: arrange({"abc", "bc", "dc", "efeh", 0}) gives the following board: - abc_ - bc__ - dc__ - efeh - - arrange({"abc", "bc", "dc", "efeh", 0}, 3) gives the following - ___e - a__f - bbde - ccch -- a new tile of 'a' or 'b' appears each turn somewhere, using some quasirandomisation e.g. (23 * n^2 + 79) mod 16. - - addtile(char, x, y) -- the board transformation: board.trans(dir) = arrange(dir) . (fmap reduce) . getstring(dir). calls getstrings, then reduce on each row / column -- board.getstrings(dir)= the strings according to direction dir. Inverse of arrange. -- reduce(string)=string: reduce("baac")=="bbc"; reduce("aabb")=="bc"; and reduce("cbb")== "cc" instead of "d". -- when one of the hjkl keys is pressed get the direction dir. diff --git a/projects/09/K/KGame.jack b/projects/09/K/KGame.jack deleted file mode 100644 index 017b4e8..0000000 --- a/projects/09/K/KGame.jack +++ /dev/null @@ -1,57 +0,0 @@ -class KGame{ - field Board board; - - constructor KGame new() { - let board = Board.new(); - do board.draw(); - return this; - } - - method void dispose() { - do board.dispose(); - do Memory.deAlloc(this); - return; - } - - method void run() { - var int key, key1, st; - var boolean exit; - let exit = false; - while (~exit) { - let st = board.getStatus(); - let key = 0; - while (key = 0) { - let key = Keyboard.keyPressed(); - } - let key1 = key; - while (~(key1 = 0)) { - let key1 = Keyboard.keyPressed(); - } - if (key = 81) { - let exit = true; - } else { if ((st = 0)) { - do Screen.clearScreen(); - do board.setStatus(1); - do board.draw(); - } else { if ((st = 2) | (st = 3)) { - do Screen.clearScreen(); - do board.setStatus(0); - do board.draw(); - do board.initBoard(); - } else { if (key = 82) { // r for restart - do Screen.clearScreen(); - do board.initBoard(); - do board.draw(); - } else { if ((key > 129) & (key < 134)) { - do Screen.clearScreen(); - do board.next(key - 130); - do board.draw(); - do Sys.wait(300); - do Screen.clearScreen(); - do board.addTile(); - do board.draw(); - }}}}} - } - return; - } -} diff --git a/projects/09/K/KGame.vm b/projects/09/K/KGame.vm deleted file mode 100644 index df3a069..0000000 --- a/projects/09/K/KGame.vm +++ /dev/null @@ -1,169 +0,0 @@ -function KGame.new 0 -push constant 1 -call Memory.alloc 1 -pop pointer 0 -call Board.new 0 -pop this 0 -push this 0 -call Board.draw 1 -pop temp 0 -push pointer 0 -return -function KGame.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -call Board.dispose 1 -pop temp 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function KGame.run 4 -push argument 0 -pop pointer 0 -push constant 0 -pop local 3 -label WHILE_EXP0 -push local 3 -not -not -if-goto WHILE_END0 -push this 0 -call Board.getStatus 1 -pop local 2 -push constant 0 -pop local 0 -label WHILE_EXP1 -push local 0 -push constant 0 -eq -not -if-goto WHILE_END1 -call Keyboard.keyPressed 0 -pop local 0 -goto WHILE_EXP1 -label WHILE_END1 -push local 0 -pop local 1 -label WHILE_EXP2 -push local 1 -push constant 0 -eq -not -not -if-goto WHILE_END2 -call Keyboard.keyPressed 0 -pop local 1 -goto WHILE_EXP2 -label WHILE_END2 -push local 0 -push constant 81 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -not -pop local 3 -goto IF_END0 -label IF_FALSE0 -push local 2 -push constant 0 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -call Screen.clearScreen 0 -pop temp 0 -push this 0 -push constant 1 -call Board.setStatus 2 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -goto IF_END1 -label IF_FALSE1 -push local 2 -push constant 2 -eq -push local 2 -push constant 3 -eq -or -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -call Screen.clearScreen 0 -pop temp 0 -push this 0 -push constant 0 -call Board.setStatus 2 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -push this 0 -call Board.initBoard 1 -pop temp 0 -goto IF_END2 -label IF_FALSE2 -push local 0 -push constant 82 -eq -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -call Screen.clearScreen 0 -pop temp 0 -push this 0 -call Board.initBoard 1 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -goto IF_END3 -label IF_FALSE3 -push local 0 -push constant 129 -gt -push local 0 -push constant 134 -lt -and -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -call Screen.clearScreen 0 -pop temp 0 -push this 0 -push local 0 -push constant 130 -sub -call Board.next 2 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -push constant 300 -call Sys.wait 1 -pop temp 0 -call Screen.clearScreen 0 -pop temp 0 -push this 0 -call Board.addTile 1 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -label IF_FALSE4 -label IF_END3 -label IF_END2 -label IF_END1 -label IF_END0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return diff --git a/projects/09/K/Main.jack b/projects/09/K/Main.jack deleted file mode 100644 index 7f86973..0000000 --- a/projects/09/K/Main.jack +++ /dev/null @@ -1,10 +0,0 @@ -class Main { - function void main() { - var KGame game; - do Board.init(); - let game = KGame.new(); - do game.run(); - do game.dispose(); - return; - } -} diff --git a/projects/09/K/Main.vm b/projects/09/K/Main.vm deleted file mode 100644 index 0441c7a..0000000 --- a/projects/09/K/Main.vm +++ /dev/null @@ -1,13 +0,0 @@ -function Main.main 1 -call Board.init 0 -pop temp 0 -call KGame.new 0 -pop local 0 -push local 0 -call KGame.run 1 -pop temp 0 -push local 0 -call KGame.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/09/List/List.jack b/projects/09/List/List.jack deleted file mode 100644 index c62fe28..0000000 --- a/projects/09/List/List.jack +++ /dev/null @@ -1,46 +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/09/List/List.jack - -/** Represents a linked list of integers. */ -class List { - field int data; // a list consists of a data field, - field List next; // followed by a list - - /* Creates a List. */ - constructor List new(int car, List cdr) { - let data = car; // the identifiers car and cdr are used in - let next = cdr; // memory of the Lisp programming language - return this; - } - - /** Accessors. */ - method int getData() { return data; } - method int getNext() { return next; } - - /** Prints this list. */ - method void print() { - var List current; // initializes current to the first item - let current = this; // of this list - while (~(current = null)) { - do Output.printInt(current.getData()); - do Output.printChar(32); // prints a space - let current = current.getNext(); - } - return; - } - - /** Disposes this List by recursively disposing its tail. */ - method void dispose() { - if (~(next = null)) { - do next.dispose(); - } - // Uses an OS routine to recycle this object. - do Memory.deAlloc(this); - return; - } - - // More list processing methods can come here. - -} diff --git a/projects/09/List/Main.jack b/projects/09/List/Main.jack deleted file mode 100644 index 824eb6f..0000000 --- a/projects/09/List/Main.jack +++ /dev/null @@ -1,17 +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/09/List/Main.jack - -/** Demonstrates the use of the List abstraction. */ -class Main { - function void main() { - // Creates and uses the list (2,3,5). - var List v; - let v = List.new(5,null); - let v = List.new(2,List.new(3,v)); - do v.print(); // prints 2 3 5 - do v.dispose(); // disposes the list - return; - } -} diff --git a/projects/09/Square/Main.jack b/projects/09/Square/Main.jack deleted file mode 100644 index 8311cc2..0000000 --- a/projects/09/Square/Main.jack +++ /dev/null @@ -1,15 +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/09/Square/Main.jack - -/** Initializes a new Square Dance game and starts running it. */ -class Main { - function void main() { - var SquareGame game; - let game = SquareGame.new(); - do game.run(); - do game.dispose(); - return; - } -} diff --git a/projects/09/Square/Main.vm b/projects/09/Square/Main.vm deleted file mode 100644 index a3b355b..0000000 --- a/projects/09/Square/Main.vm +++ /dev/null @@ -1,11 +0,0 @@ -function Main.main 1 -call SquareGame.new 0 -pop local 0 -push local 0 -call SquareGame.run 1 -pop temp 0 -push local 0 -call SquareGame.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/09/Square/Square.asm b/projects/09/Square/Square.asm deleted file mode 100644 index 8ad70dd..0000000 --- a/projects/09/Square/Square.asm +++ /dev/null @@ -1,6346 +0,0 @@ -@256 -D=A -@SP -M=D -@RET0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Sys.init -0;JMP -(RET0) -(Main.main) -@SP -A=M -M=0 -@SP -M=M+1 -@RET1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@SquareGame.new -0;JMP -(RET1) -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET4 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@SquareGame.run -0;JMP -(RET4) -@SP -AM=M-1 -D=M -@5 -M=D -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET7 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@SquareGame.dispose -0;JMP -(RET7) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(SquareGame.new) -@2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Memory.alloc -0;JMP -(RET2) -@SP -AM=M-1 -D=M -@3 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@30 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET7 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@3 -D=D-A -@ARG -M=D -@Square.new -0;JMP -(RET7) -@THIS -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@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 -(SquareGame.dispose) -@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 -@3 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET17 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.dispose -0;JMP -(RET17) -@SP -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET20 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Memory.deAlloc -0;JMP -(RET20) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(SquareGame.moveSquare) -@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 -@3 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame29 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame29 -0;JMP -(IFSquareGame29) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame29) -@SP -AM=M-1 -D=M -@SquareGame.moveSquare$IF_TRUE0 -D;JNE -@SquareGame.moveSquare$IF_FALSE0 -0;JMP -(SquareGame.moveSquare$IF_TRUE0) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET34 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.moveUp -0;JMP -(RET34) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.moveSquare$IF_FALSE0) -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame39 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame39 -0;JMP -(IFSquareGame39) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame39) -@SP -AM=M-1 -D=M -@SquareGame.moveSquare$IF_TRUE1 -D;JNE -@SquareGame.moveSquare$IF_FALSE1 -0;JMP -(SquareGame.moveSquare$IF_TRUE1) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET44 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.moveDown -0;JMP -(RET44) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.moveSquare$IF_FALSE1) -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@3 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame49 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame49 -0;JMP -(IFSquareGame49) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame49) -@SP -AM=M-1 -D=M -@SquareGame.moveSquare$IF_TRUE2 -D;JNE -@SquareGame.moveSquare$IF_FALSE2 -0;JMP -(SquareGame.moveSquare$IF_TRUE2) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET54 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.moveLeft -0;JMP -(RET54) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.moveSquare$IF_FALSE2) -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@4 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame59 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame59 -0;JMP -(IFSquareGame59) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame59) -@SP -AM=M-1 -D=M -@SquareGame.moveSquare$IF_TRUE3 -D;JNE -@SquareGame.moveSquare$IF_FALSE3 -0;JMP -(SquareGame.moveSquare$IF_TRUE3) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET64 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.moveRight -0;JMP -(RET64) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.moveSquare$IF_FALSE3) -@5 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET68 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Sys.wait -0;JMP -(RET68) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(SquareGame.run) -@SP -A=M -M=0 -@SP -M=M+1 -@SP -A=M -M=0 -@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 -@3 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$WHILE_EXP0) -@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 -A=M -M=!D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SquareGame.run$WHILE_END0 -D;JNE -(SquareGame.run$WHILE_EXP1) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame85 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame85 -0;JMP -(IFSquareGame85) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame85) -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SquareGame.run$WHILE_END1 -D;JNE -@RET88 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Keyboard.keyPressed -0;JMP -(RET88) -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET91 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@SquareGame.moveSquare -0;JMP -(RET91) -@SP -AM=M-1 -D=M -@5 -M=D -@SquareGame.run$WHILE_EXP1 -0;JMP -(SquareGame.run$WHILE_END1) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@81 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame97 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame97 -0;JMP -(IFSquareGame97) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame97) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE0 -D;JNE -@SquareGame.run$IF_FALSE0 -0;JMP -(SquareGame.run$IF_TRUE0) -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@LCL -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$IF_FALSE0) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@90 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame107 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame107 -0;JMP -(IFSquareGame107) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame107) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE1 -D;JNE -@SquareGame.run$IF_FALSE1 -0;JMP -(SquareGame.run$IF_TRUE1) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET112 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.decSize -0;JMP -(RET112) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.run$IF_FALSE1) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@88 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame117 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame117 -0;JMP -(IFSquareGame117) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame117) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE2 -D;JNE -@SquareGame.run$IF_FALSE2 -0;JMP -(SquareGame.run$IF_TRUE2) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET122 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.incSize -0;JMP -(RET122) -@SP -AM=M-1 -D=M -@5 -M=D -(SquareGame.run$IF_FALSE2) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@131 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame127 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame127 -0;JMP -(IFSquareGame127) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame127) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE3 -D;JNE -@SquareGame.run$IF_FALSE3 -0;JMP -(SquareGame.run$IF_TRUE3) -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$IF_FALSE3) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@133 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame136 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame136 -0;JMP -(IFSquareGame136) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame136) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE4 -D;JNE -@SquareGame.run$IF_FALSE4 -0;JMP -(SquareGame.run$IF_TRUE4) -@2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$IF_FALSE4) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@130 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame145 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame145 -0;JMP -(IFSquareGame145) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame145) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE5 -D;JNE -@SquareGame.run$IF_FALSE5 -0;JMP -(SquareGame.run$IF_TRUE5) -@3 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$IF_FALSE5) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@132 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame154 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame154 -0;JMP -(IFSquareGame154) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame154) -@SP -AM=M-1 -D=M -@SquareGame.run$IF_TRUE6 -D;JNE -@SquareGame.run$IF_FALSE6 -0;JMP -(SquareGame.run$IF_TRUE6) -@4 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -(SquareGame.run$IF_FALSE6) -(SquareGame.run$WHILE_EXP2) -@LCL -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquareGame164 -D;JEQ -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquareGame164 -0;JMP -(IFSquareGame164) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquareGame164) -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SquareGame.run$WHILE_END2 -D;JNE -@RET168 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@0 -D=D-A -@ARG -M=D -@Keyboard.keyPressed -0;JMP -(RET168) -@LCL -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET171 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@SquareGame.moveSquare -0;JMP -(RET171) -@SP -AM=M-1 -D=M -@5 -M=D -@SquareGame.run$WHILE_EXP2 -0;JMP -(SquareGame.run$WHILE_END2) -@SquareGame.run$WHILE_EXP0 -0;JMP -(SquareGame.run$WHILE_END0) -@0 -D=A -@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 -(Square.new) -@3 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Memory.alloc -0;JMP -(RET2) -@SP -AM=M-1 -D=M -@3 -M=D -@ARG -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@ARG -D=M -@2 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET11 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.draw -0;JMP -(RET11) -@SP -AM=M-1 -D=M -@5 -M=D -@3 -D=M -@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 -(Square.dispose) -@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 -@3 -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET19 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Memory.deAlloc -0;JMP -(RET19) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(Square.draw) -@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 -@3 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@RET28 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET28) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET38 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET38) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(Square.erase) -@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 -@3 -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET46 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET46) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET56 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET56) -@SP -AM=M-1 -D=M -@5 -M=D -@0 -D=A -@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 -(Square.incSize) -@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 -@3 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@254 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare67 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare67 -0;JMP -(IFSquare67) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare67) -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@510 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare72 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare72 -0;JMP -(IFSquare72) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare72) -@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 -@Square.incSize$IF_TRUE0 -D;JNE -@Square.incSize$IF_FALSE0 -0;JMP -(Square.incSize$IF_TRUE0) -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET78 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.erase -0;JMP -(RET78) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@2 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET85 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.draw -0;JMP -(RET85) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.incSize$IF_FALSE0) -@0 -D=A -@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 -(Square.decSize) -@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 -@3 -M=D -@THIS -D=M -@2 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare95 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare95 -0;JMP -(IFSquare95) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare95) -@SP -AM=M-1 -D=M -@Square.decSize$IF_TRUE0 -D;JNE -@Square.decSize$IF_FALSE0 -0;JMP -(Square.decSize$IF_TRUE0) -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET100 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.erase -0;JMP -(RET100) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@2 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@2 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@3 -D=M -@SP -A=M -M=D -@SP -M=M+1 -@RET107 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Square.draw -0;JMP -(RET107) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.decSize$IF_FALSE0) -@0 -D=A -@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 -(Square.moveUp) -@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 -@3 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare117 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare117 -0;JMP -(IFSquare117) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare117) -@SP -AM=M-1 -D=M -@Square.moveUp$IF_TRUE0 -D;JNE -@Square.moveUp$IF_FALSE0 -0;JMP -(Square.moveUp$IF_TRUE0) -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET122 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET122) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@1 -D=A -@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 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET136 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET136) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@RET144 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET144) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@RET154 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET154) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.moveUp$IF_FALSE0) -@0 -D=A -@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 -(Square.moveDown) -@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 -@3 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@254 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare166 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare166 -0;JMP -(IFSquare166) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare166) -@SP -AM=M-1 -D=M -@Square.moveDown$IF_TRUE0 -D;JNE -@Square.moveDown$IF_FALSE0 -0;JMP -(Square.moveDown$IF_TRUE0) -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET171 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET171) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@RET181 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET181) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@1 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@RET189 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET189) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@1 -D=A -@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 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET203 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET203) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.moveDown$IF_FALSE0) -@0 -D=A -@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 -(Square.moveLeft) -@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 -@3 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare213 -D;JGT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare213 -0;JMP -(IFSquare213) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare213) -@SP -AM=M-1 -D=M -@Square.moveLeft$IF_TRUE0 -D;JNE -@Square.moveLeft$IF_FALSE0 -0;JMP -(Square.moveLeft$IF_TRUE0) -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET218 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET218) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@1 -D=A -@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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET232 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET232) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@RET240 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET240) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET250 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET250) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.moveLeft$IF_FALSE0) -@0 -D=A -@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 -(Square.moveRight) -@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 -@3 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@510 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -AM=M-1 -D=M-D -@IFSquare262 -D;JLT -@SP -A=M -M=0 -@SP -M=M+1 -@ENDIFSquare262 -0;JMP -(IFSquare262) -@SP -A=M -M=-1 -@SP -M=M+1 -(ENDIFSquare262) -@SP -AM=M-1 -D=M -@Square.moveRight$IF_TRUE0 -D;JNE -@Square.moveRight$IF_FALSE0 -0;JMP -(Square.moveRight$IF_TRUE0) -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@RET267 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET267) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@1 -D=A -@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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET277 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET277) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@2 -D=A -@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 -@THIS -D=M -@0 -D=A+D -@R13 -M=D -@SP -AM=M-1 -D=M -@R13 -A=M -M=D -@0 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@SP -AM=M-1 -D=M -@SP -A=M -M=!D -@SP -M=M+1 -@RET285 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@1 -D=D-A -@ARG -M=D -@Screen.setColor -0;JMP -(RET285) -@SP -AM=M-1 -D=M -@5 -M=D -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@1 -D=A -@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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@0 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@THIS -D=M -@1 -D=A+D -A=D -D=M -@SP -A=M -M=D -@SP -M=M+1 -@THIS -D=M -@2 -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 -@RET299 -D=A -@SP -A=M -M=D -@SP -M=M+1 -@LCL -D=M -@SP -A=M -M=D -@SP -M=M+1 -@ARG -D=M -@SP -A=M -M=D -@SP -M=M+1 -@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 -D=M -@LCL -M=D -@5 -D=D-A -@4 -D=D-A -@ARG -M=D -@Screen.drawRectangle -0;JMP -(RET299) -@SP -AM=M-1 -D=M -@5 -M=D -(Square.moveRight$IF_FALSE0) -@0 -D=A -@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/09/Square/Square.jack b/projects/09/Square/Square.jack deleted file mode 100644 index 38066e5..0000000 --- a/projects/09/Square/Square.jack +++ /dev/null @@ -1,108 +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/09/Square/Square.jack - -/** Implements a graphical square. */ -class Square { - - field int x, y; // screen location of the square's top-left corner - field int size; // length of this square, in pixels - - /** Constructs a new square with a given location and size. */ - constructor Square new(int Ax, int Ay, int Asize) { - let x = Ax; - let y = Ay; - let size = Asize; - do draw(); - return this; - } - - /** Disposes this square. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } - - /** Draws the square on the screen. */ - method void draw() { - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Erases the square from the screen. */ - method void erase() { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Increments the square size by 2 pixels. */ - method void incSize() { - if (((y + size) < 254) & ((x + size) < 510)) { - do erase(); - let size = size + 2; - do draw(); - } - return; - } - - /** Decrements the square size by 2 pixels. */ - method void decSize() { - if (size > 2) { - do erase(); - let size = size - 2; - do draw(); - } - return; - } - - /** Moves the square up by 2 pixels. */ - method void moveUp() { - if (y > 1) { - do Screen.setColor(false); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - let y = y - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + 1); - } - return; - } - - /** Moves the square down by 2 pixels. */ - method void moveDown() { - if ((y + size) < 254) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + 1); - let y = y + 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - } - return; - } - - /** Moves the square left by 2 pixels. */ - method void moveLeft() { - if (x > 1) { - do Screen.setColor(false); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - let x = x - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 1, y + size); - } - return; - } - - /** Moves the square right by 2 pixels. */ - method void moveRight() { - if ((x + size) < 510) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + 1, y + size); - let x = x + 2; - do Screen.setColor(true); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - } - return; - } -} diff --git a/projects/09/Square/Square.vm b/projects/09/Square/Square.vm deleted file mode 100644 index e3932bc..0000000 --- a/projects/09/Square/Square.vm +++ /dev/null @@ -1,304 +0,0 @@ -function Square.new 0 -push constant 3 -call Memory.alloc 1 -pop pointer 0 -push argument 0 -pop this 0 -push argument 1 -pop this 1 -push argument 2 -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -push pointer 0 -return -function Square.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function Square.draw 0 -push argument 0 -pop pointer 0 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Square.erase 0 -push argument 0 -pop pointer 0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Square.incSize 0 -push argument 0 -pop pointer 0 -push this 1 -push this 2 -add -push constant 254 -lt -push this 0 -push this 2 -add -push constant 510 -lt -and -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push pointer 0 -call Square.erase 1 -pop temp 0 -push this 2 -push constant 2 -add -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Square.decSize 0 -push argument 0 -pop pointer 0 -push this 2 -push constant 2 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push pointer 0 -call Square.erase 1 -pop temp 0 -push this 2 -push constant 2 -sub -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Square.moveUp 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 2 -add -push constant 1 -sub -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 1 -push constant 2 -sub -pop this 1 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push constant 1 -add -call Screen.drawRectangle 4 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Square.moveDown 0 -push argument 0 -pop pointer 0 -push this 1 -push this 2 -add -push constant 254 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push constant 1 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 1 -push constant 2 -add -pop this 1 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 2 -add -push constant 1 -sub -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Square.moveLeft 0 -push argument 0 -pop pointer 0 -push this 0 -push constant 1 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 1 -sub -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 0 -push constant 2 -sub -pop this 0 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push constant 1 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Square.moveRight 0 -push argument 0 -pop pointer 0 -push this 0 -push this 2 -add -push constant 510 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push constant 1 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 0 -push constant 2 -add -pop this 0 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 1 -sub -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label IF_FALSE0 -push constant 0 -return diff --git a/projects/09/Square/SquareGame.jack b/projects/09/Square/SquareGame.jack deleted file mode 100644 index 02393e2..0000000 --- a/projects/09/Square/SquareGame.jack +++ /dev/null @@ -1,79 +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/09/Square/SquareGame.jack - -/** - * Implements the Square Dance game. - * This simple game allows the user to move a black square around - * the screen, and change the square's size during the movement. - * When the game starts, a square of 30 by 30 pixels is shown at the - * top-left corner of the screen. The user controls the square as follows. - * The 4 arrow keys are used to move the square up, down, left, and right. - * The 'z' and 'x' keys are used, respectively, to decrement and increment - * the square's size. The 'q' key is used to quit the game. - */ - -class SquareGame { - field Square square; // the square of this game - field int direction; // the square's current direction: - // 0=none, 1=up, 2=down, 3=left, 4=right - - /** Constructs a new Square Game. */ - constructor SquareGame new() { - // Creates a 30 by 30 pixels square and positions it at the top-left - // of the screen. - let square = Square.new(0, 0, 30); - let direction = 0; // initial state is no movement - return this; - } - - /** Disposes this game. */ - method void dispose() { - do square.dispose(); - do Memory.deAlloc(this); - return; - } - - /** Moves the square in the current direction. */ - method void moveSquare() { - if (direction = 1) { do square.moveUp(); } - if (direction = 2) { do square.moveDown(); } - if (direction = 3) { do square.moveLeft(); } - if (direction = 4) { do square.moveRight(); } - do Sys.wait(5); // delays the next movement - return; - } - - /** Runs the game: handles the user's inputs and moves the square accordingly */ - method void run() { - var char key; // the key currently pressed by the user - var boolean exit; - let exit = false; - - while (~exit) { - // waits for a key to be pressed - while (key = 0) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - if (key = 81) { let exit = true; } // q key - if (key = 90) { do square.decSize(); } // z key - if (key = 88) { do square.incSize(); } // x key - if (key = 131) { let direction = 1; } // up arrow - if (key = 133) { let direction = 2; } // down arrow - if (key = 130) { let direction = 3; } // left arrow - if (key = 132) { let direction = 4; } // right arrow - - // waits for the key to be released - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - } // while - return; - } -} - - - diff --git a/projects/09/Square/SquareGame.vm b/projects/09/Square/SquareGame.vm deleted file mode 100644 index 8444dbc..0000000 --- a/projects/09/Square/SquareGame.vm +++ /dev/null @@ -1,179 +0,0 @@ -function SquareGame.new 0 -push constant 2 -call Memory.alloc 1 -pop pointer 0 -push constant 0 -push constant 0 -push constant 30 -call Square.new 3 -pop this 0 -push constant 0 -pop this 1 -push pointer 0 -return -function SquareGame.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -call Square.dispose 1 -pop temp 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function SquareGame.moveSquare 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push this 0 -call Square.moveUp 1 -pop temp 0 -label IF_FALSE0 -push this 1 -push constant 2 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push this 0 -call Square.moveDown 1 -pop temp 0 -label IF_FALSE1 -push this 1 -push constant 3 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push this 0 -call Square.moveLeft 1 -pop temp 0 -label IF_FALSE2 -push this 1 -push constant 4 -eq -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push this 0 -call Square.moveRight 1 -pop temp 0 -label IF_FALSE3 -push constant 5 -call Sys.wait 1 -pop temp 0 -push constant 0 -return -function SquareGame.run 2 -push argument 0 -pop pointer 0 -push constant 0 -pop local 1 -label WHILE_EXP0 -push local 1 -not -not -if-goto WHILE_END0 -label WHILE_EXP1 -push local 0 -push constant 0 -eq -not -if-goto WHILE_END1 -call Keyboard.keyPressed 0 -pop local 0 -push pointer 0 -call SquareGame.moveSquare 1 -pop temp 0 -goto WHILE_EXP1 -label WHILE_END1 -push local 0 -push constant 81 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -not -pop local 1 -label IF_FALSE0 -push local 0 -push constant 90 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push this 0 -call Square.decSize 1 -pop temp 0 -label IF_FALSE1 -push local 0 -push constant 88 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push this 0 -call Square.incSize 1 -pop temp 0 -label IF_FALSE2 -push local 0 -push constant 131 -eq -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push constant 1 -pop this 1 -label IF_FALSE3 -push local 0 -push constant 133 -eq -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -push constant 2 -pop this 1 -label IF_FALSE4 -push local 0 -push constant 130 -eq -if-goto IF_TRUE5 -goto IF_FALSE5 -label IF_TRUE5 -push constant 3 -pop this 1 -label IF_FALSE5 -push local 0 -push constant 132 -eq -if-goto IF_TRUE6 -goto IF_FALSE6 -label IF_TRUE6 -push constant 4 -pop this 1 -label IF_FALSE6 -label WHILE_EXP2 -push local 0 -push constant 0 -eq -not -not -if-goto WHILE_END2 -call Keyboard.keyPressed 0 -pop local 0 -push pointer 0 -call SquareGame.moveSquare 1 -pop temp 0 -goto WHILE_EXP2 -label WHILE_END2 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return diff --git a/projects/10/.gitignore b/projects/10/.gitignore deleted file mode 100644 index 1377554..0000000 --- a/projects/10/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.swp diff --git a/projects/10/ArrayTest/Main.ast b/projects/10/ArrayTest/Main.ast deleted file mode 100644 index f8194cb..0000000 --- a/projects/10/ArrayTest/Main.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Main" [] [JSubroutineDec (JSubroutineHeader "function" ("void","main") []) (JSubroutineBody [("Array","a"),("int","length"),("int","i"),("int","sum")] [JLetStatment (JVarId "length" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "readInt") [JStrConst "HOW MANY NUMBERS? "])),JLetStatment (JVarId "a" Nothing) (JExpCall (JSubroutineCall "Array" (Just "new") [JExpVar (JVarId "length" Nothing)])),JLetStatment (JVarId "i" Nothing) (JIntConst 0),JWhileStatment (JExpBin (JExpVar (JVarId "i" Nothing)) [('<',JExpVar (JVarId "length" Nothing))]) [JLetStatment (JVarId "a" (Just (JExpVar (JVarId "i" Nothing)))) (JExpCall (JSubroutineCall "Keyboard" (Just "readInt") [JStrConst "ENTER THE NEXT NUMBER: "])),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('+',JIntConst 1)])],JLetStatment (JVarId "i" Nothing) (JIntConst 0),JLetStatment (JVarId "sum" Nothing) (JIntConst 0),JWhileStatment (JExpBin (JExpVar (JVarId "i" Nothing)) [('<',JExpVar (JVarId "length" Nothing))]) [JLetStatment (JVarId "sum" Nothing) (JExpBin (JExpVar (JVarId "sum" Nothing)) [('+',JExpVar (JVarId "a" (Just (JExpVar (JVarId "i" Nothing)))))]),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('+',JIntConst 1)])],JDoStatement (JSubroutineCall "Output" (Just "printString") [JStrConst "THE AVERAGE IS: "]),JDoStatement (JSubroutineCall "Output" (Just "printInt") [JExpBin (JExpVar (JVarId "sum" Nothing)) [('/',JExpVar (JVarId "length" Nothing))]]),JDoStatement (JSubroutineCall "Output" (Just "println") []),JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/ArrayTest/Main.jack b/projects/10/ArrayTest/Main.jack deleted file mode 100644 index aa237b1..0000000 --- a/projects/10/ArrayTest/Main.jack +++ /dev/null @@ -1,38 +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/10/ArrayTest/Main.jack - -// (identical to projects/09/Average/Main.jack) - -/** Computes the average of a sequence of integers. */ -class Main { - function void main() { - var Array a; - var int length; - var int i, sum; - - let length = Keyboard.readInt("HOW MANY NUMBERS? "); - let a = Array.new(length); - let i = 0; - - while (i < length) { - let a[i] = Keyboard.readInt("ENTER THE NEXT NUMBER: "); - let i = i + 1; - } - - let i = 0; - let sum = 0; - - while (i < length) { - let sum = sum + a[i]; - let i = i + 1; - } - - do Output.printString("THE AVERAGE IS: "); - do Output.printInt(sum / length); - do Output.println(); - - return; - } -} diff --git a/projects/10/ArrayTest/Main.xml b/projects/10/ArrayTest/Main.xml deleted file mode 100644 index 0ea96df..0000000 --- a/projects/10/ArrayTest/Main.xml +++ /dev/null @@ -1,286 +0,0 @@ - - class - Main - { - - function - void - main - ( - - - ) - - { - - var - Array - a - ; - - - var - int - length - ; - - - var - int - i - , - sum - ; - - - - let - length - = - - - Keyboard - . - readInt - ( - - - - HOW MANY NUMBERS? - - - - ) - - - ; - - - let - a - = - - - Array - . - new - ( - - - - length - - - - ) - - - ; - - - let - i - = - - - 0 - - - ; - - - while - ( - - - i - - < - - length - - - ) - { - - - let - a - [ - - - i - - - ] - = - - - Keyboard - . - readInt - ( - - - - ENTER THE NEXT NUMBER: - - - - ) - - - ; - - - let - i - = - - - i - - + - - 1 - - - ; - - - } - - - let - i - = - - - 0 - - - ; - - - let - sum - = - - - 0 - - - ; - - - while - ( - - - i - - < - - length - - - ) - { - - - let - sum - = - - - sum - - + - - a - [ - - - i - - - ] - - - ; - - - let - i - = - - - i - - + - - 1 - - - ; - - - } - - - do - Output - . - printString - ( - - - - THE AVERAGE IS: - - - - ) - ; - - - do - Output - . - printInt - ( - - - - sum - - / - - length - - - - ) - ; - - - do - Output - . - println - ( - - - ) - ; - - - return - ; - - - } - - - } - diff --git a/projects/10/ArrayTest/MainT.xml b/projects/10/ArrayTest/MainT.xml deleted file mode 100644 index 68721ec..0000000 --- a/projects/10/ArrayTest/MainT.xml +++ /dev/null @@ -1,142 +0,0 @@ - - class - Main - { - function - void - main - ( - ) - { - var - Array - a - ; - var - int - length - ; - var - int - i - , - sum - ; - let - length - = - Keyboard - . - readInt - ( - HOW MANY NUMBERS? - ) - ; - let - a - = - Array - . - new - ( - length - ) - ; - let - i - = - 0 - ; - while - ( - i - < - length - ) - { - let - a - [ - i - ] - = - Keyboard - . - readInt - ( - ENTER THE NEXT NUMBER: - ) - ; - let - i - = - i - + - 1 - ; - } - let - i - = - 0 - ; - let - sum - = - 0 - ; - while - ( - i - < - length - ) - { - let - sum - = - sum - + - a - [ - i - ] - ; - let - i - = - i - + - 1 - ; - } - do - Output - . - printString - ( - THE AVERAGE IS: - ) - ; - do - Output - . - printInt - ( - sum - / - length - ) - ; - do - Output - . - println - ( - ) - ; - return - ; - } - } - diff --git a/projects/10/ExpressionLessSquare/Main.ast b/projects/10/ExpressionLessSquare/Main.ast deleted file mode 100644 index 57a44eb..0000000 --- a/projects/10/ExpressionLessSquare/Main.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Main" [JClassVarDec "static" ("boolean","test")] [JSubroutineDec (JSubroutineHeader "function" ("void","main") []) (JSubroutineBody [("SquareGame","game")] [JLetStatment (JVarId "game" Nothing) (JExpVar (JVarId "game" Nothing)),JDoStatement (JSubroutineCall "game" (Just "run") []),JDoStatement (JSubroutineCall "game" (Just "dispose") []),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "function" ("void","test") []) (JSubroutineBody [("int","i"),("int","j"),("String","s"),("Array","a")] [JIfStatement (JExpVar (JVarId "i" Nothing)) [JLetStatment (JVarId "s" Nothing) (JExpVar (JVarId "i" Nothing)),JLetStatment (JVarId "s" Nothing) (JExpVar (JVarId "j" Nothing)),JLetStatment (JVarId "a" (Just (JExpVar (JVarId "i" Nothing)))) (JExpVar (JVarId "j" Nothing))] (Just [JLetStatment (JVarId "i" Nothing) (JExpVar (JVarId "i" Nothing)),JLetStatment (JVarId "j" Nothing) (JExpVar (JVarId "j" Nothing)),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('|',JExpVar (JVarId "j" Nothing))])]),JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/ExpressionLessSquare/Main.jack b/projects/10/ExpressionLessSquare/Main.jack deleted file mode 100644 index d2c5561..0000000 --- a/projects/10/ExpressionLessSquare/Main.jack +++ /dev/null @@ -1,36 +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/10/ExpressionLessSquare/Main.jack - -/** Expressionless version of projects/10/Square/Main.jack. */ - -class Main { - static boolean test; // Added for testing -- there is no static keyword - // in the Square files. - - function void main() { - var SquareGame game; - let game = game; - do game.run(); - do game.dispose(); - return; - } - - function void test() { // Added to test Jack syntax that is not use in - var int i, j; // the Square files. - var String s; - var Array a; - if (i) { - let s = i; - let s = j; - let a[i] = j; - } - else { // There is no else keyword in the Square files. - let i = i; - let j = j; - let i = i | j; - } - return; - } -} diff --git a/projects/10/ExpressionLessSquare/Main.xml b/projects/10/ExpressionLessSquare/Main.xml deleted file mode 100644 index 6beb694..0000000 --- a/projects/10/ExpressionLessSquare/Main.xml +++ /dev/null @@ -1,205 +0,0 @@ - - class - Main - { - - static - boolean - test - ; - - - function - void - main - ( - - - ) - - { - - var - SquareGame - game - ; - - - - let - game - = - - - game - - - ; - - - do - game - . - run - ( - - - ) - ; - - - do - game - . - dispose - ( - - - ) - ; - - - return - ; - - - } - - - - function - void - test - ( - - - ) - - { - - var - int - i - , - j - ; - - - var - String - s - ; - - - var - Array - a - ; - - - - if - ( - - - i - - - ) - { - - - let - s - = - - - i - - - ; - - - let - s - = - - - j - - - ; - - - let - a - [ - - - i - - - ] - = - - - j - - - ; - - - } - else - { - - - let - i - = - - - i - - - ; - - - let - j - = - - - j - - - ; - - - let - i - = - - - i - - | - - j - - - ; - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/ExpressionLessSquare/MainT.xml b/projects/10/ExpressionLessSquare/MainT.xml deleted file mode 100644 index f074ba4..0000000 --- a/projects/10/ExpressionLessSquare/MainT.xml +++ /dev/null @@ -1,109 +0,0 @@ - - class - Main - { - static - boolean - test - ; - function - void - main - ( - ) - { - var - SquareGame - game - ; - let - game - = - game - ; - do - game - . - run - ( - ) - ; - do - game - . - dispose - ( - ) - ; - return - ; - } - function - void - test - ( - ) - { - var - int - i - , - j - ; - var - String - s - ; - var - Array - a - ; - if - ( - i - ) - { - let - s - = - i - ; - let - s - = - j - ; - let - a - [ - i - ] - = - j - ; - } - else - { - let - i - = - i - ; - let - j - = - j - ; - let - i - = - i - | - j - ; - } - return - ; - } - } - diff --git a/projects/10/ExpressionLessSquare/Square.ast b/projects/10/ExpressionLessSquare/Square.ast deleted file mode 100644 index 884c695..0000000 --- a/projects/10/ExpressionLessSquare/Square.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Square" [JClassVarDec "field" ("int","x"),JClassVarDec "field" ("int","y"),JClassVarDec "field" ("int","size")] [JSubroutineDec (JSubroutineHeader "constructor" ("Square","new") [("int","Ax"),("int","Ay"),("int","Asize")]) (JSubroutineBody [] [JLetStatment (JVarId "x" Nothing) (JExpVar (JVarId "Ax" Nothing)),JLetStatment (JVarId "y" Nothing) (JExpVar (JVarId "Ay" Nothing)),JLetStatment (JVarId "size" Nothing) (JExpVar (JVarId "Asize" Nothing)),JDoStatement (JSubroutineCall "draw" Nothing []),JReturnStatement (Just (JExpVar (JVarId "x" Nothing)))]),JSubroutineDec (JSubroutineHeader "method" ("void","dispose") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Memory" (Just "deAlloc") [JKeywordConst "this"]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","draw") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","erase") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","incSize") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "x" Nothing)) [JDoStatement (JSubroutineCall "erase" Nothing []),JLetStatment (JVarId "size" Nothing) (JExpVar (JVarId "size" Nothing)),JDoStatement (JSubroutineCall "draw" Nothing [])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","decSize") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "size" Nothing)) [JDoStatement (JSubroutineCall "erase" Nothing []),JLetStatment (JVarId "size" Nothing) (JExpVar (JVarId "size" Nothing)),JDoStatement (JSubroutineCall "draw" Nothing [])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveUp") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "y" Nothing)) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JLetStatment (JVarId "y" Nothing) (JExpVar (JVarId "y" Nothing)),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveDown") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "y" Nothing)) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JLetStatment (JVarId "y" Nothing) (JExpVar (JVarId "y" Nothing)),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveLeft") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "x" Nothing)) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JLetStatment (JVarId "x" Nothing) (JExpVar (JVarId "x" Nothing)),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveRight") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "x" Nothing)) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)]),JLetStatment (JVarId "x" Nothing) (JExpVar (JVarId "x" Nothing)),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JExpVar (JVarId "x" Nothing)]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing)])] Nothing,JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/ExpressionLessSquare/Square.jack b/projects/10/ExpressionLessSquare/Square.jack deleted file mode 100644 index 33a54ad..0000000 --- a/projects/10/ExpressionLessSquare/Square.jack +++ /dev/null @@ -1,99 +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/10/ExpressionLessSquare/Square.jack - -/** Expressionless version of projects/10/Square/Square.jack. */ - -class Square { - - field int x, y; - field int size; - - constructor Square new(int Ax, int Ay, int Asize) { - let x = Ax; - let y = Ay; - let size = Asize; - do draw(); - return x; - } - - method void dispose() { - do Memory.deAlloc(this); - return; - } - - method void draw() { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - return; - } - - method void erase() { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - return; - } - - method void incSize() { - if (x) { - do erase(); - let size = size; - do draw(); - } - return; - } - - method void decSize() { - if (size) { - do erase(); - let size = size; - do draw(); - } - return; - } - - method void moveUp() { - if (y) { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - let y = y; - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - } - return; - } - - method void moveDown() { - if (y) { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - let y = y; - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - } - return; - } - - method void moveLeft() { - if (x) { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - let x = x; - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - } - return; - } - - method void moveRight() { - if (x) { - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - let x = x; - do Screen.setColor(x); - do Screen.drawRectangle(x, y, x, y); - } - return; - } -} diff --git a/projects/10/ExpressionLessSquare/Square.xml b/projects/10/ExpressionLessSquare/Square.xml deleted file mode 100644 index ed0e6ec..0000000 --- a/projects/10/ExpressionLessSquare/Square.xml +++ /dev/null @@ -1,967 +0,0 @@ - - class - Square - { - - field - int - x - , - y - ; - - - field - int - size - ; - - - constructor - Square - new - ( - - int - Ax - , - int - Ay - , - int - Asize - - ) - - { - - - let - x - = - - - Ax - - - ; - - - let - y - = - - - Ay - - - ; - - - let - size - = - - - Asize - - - ; - - - do - draw - ( - - - ) - ; - - - return - - - x - - - ; - - - } - - - - method - void - dispose - ( - - - ) - - { - - - do - Memory - . - deAlloc - ( - - - - this - - - - ) - ; - - - return - ; - - - } - - - - method - void - draw - ( - - - ) - - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - return - ; - - - } - - - - method - void - erase - ( - - - ) - - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - return - ; - - - } - - - - method - void - incSize - ( - - - ) - - { - - - if - ( - - - x - - - ) - { - - - do - erase - ( - - - ) - ; - - - let - size - = - - - size - - - ; - - - do - draw - ( - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - decSize - ( - - - ) - - { - - - if - ( - - - size - - - ) - { - - - do - erase - ( - - - ) - ; - - - let - size - = - - - size - - - ; - - - do - draw - ( - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveUp - ( - - - ) - - { - - - if - ( - - - y - - - ) - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - let - y - = - - - y - - - ; - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveDown - ( - - - ) - - { - - - if - ( - - - y - - - ) - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - let - y - = - - - y - - - ; - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveLeft - ( - - - ) - - { - - - if - ( - - - x - - - ) - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - let - x - = - - - x - - - ; - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveRight - ( - - - ) - - { - - - if - ( - - - x - - - ) - { - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - let - x - = - - - x - - - ; - - - do - Screen - . - setColor - ( - - - - x - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - - , - - - y - - - - ) - ; - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/ExpressionLessSquare/SquareGame.ast b/projects/10/ExpressionLessSquare/SquareGame.ast deleted file mode 100644 index 0abe80b..0000000 --- a/projects/10/ExpressionLessSquare/SquareGame.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "SquareGame" [JClassVarDec "field" ("Square","square"),JClassVarDec "field" ("int","direction")] [JSubroutineDec (JSubroutineHeader "constructor" ("SquareGame","new") []) (JSubroutineBody [] [JLetStatment (JVarId "square" Nothing) (JExpVar (JVarId "square" Nothing)),JLetStatment (JVarId "direction" Nothing) (JExpVar (JVarId "direction" Nothing)),JReturnStatement (Just (JExpVar (JVarId "square" Nothing)))]),JSubroutineDec (JSubroutineHeader "method" ("void","dispose") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "square" (Just "dispose") []),JDoStatement (JSubroutineCall "Memory" (Just "deAlloc") [JExpVar (JVarId "square" Nothing)]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveSquare") []) (JSubroutineBody [] [JIfStatement (JExpVar (JVarId "direction" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "moveUp") [])] Nothing,JIfStatement (JExpVar (JVarId "direction" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "moveDown") [])] Nothing,JIfStatement (JExpVar (JVarId "direction" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "moveLeft") [])] Nothing,JIfStatement (JExpVar (JVarId "direction" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "moveRight") [])] Nothing,JDoStatement (JSubroutineCall "Sys" (Just "wait") [JExpVar (JVarId "direction" Nothing)]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","run") []) (JSubroutineBody [("char","key"),("boolean","exit")] [JLetStatment (JVarId "exit" Nothing) (JExpVar (JVarId "key" Nothing)),JWhileStatment (JExpVar (JVarId "exit" Nothing)) [JWhileStatment (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "key" Nothing) (JExpVar (JVarId "key" Nothing)),JDoStatement (JSubroutineCall "moveSquare" Nothing [])],JIfStatement (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "exit" Nothing) (JExpVar (JVarId "exit" Nothing))] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "decSize") [])] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JDoStatement (JSubroutineCall "square" (Just "incSize") [])] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "direction" Nothing) (JExpVar (JVarId "exit" Nothing))] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "direction" Nothing) (JExpVar (JVarId "key" Nothing))] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "direction" Nothing) (JExpVar (JVarId "square" Nothing))] Nothing,JIfStatement (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "direction" Nothing) (JExpVar (JVarId "direction" Nothing))] Nothing,JWhileStatment (JExpVar (JVarId "key" Nothing)) [JLetStatment (JVarId "key" Nothing) (JExpVar (JVarId "key" Nothing)),JDoStatement (JSubroutineCall "moveSquare" Nothing [])]],JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/ExpressionLessSquare/SquareGame.jack b/projects/10/ExpressionLessSquare/SquareGame.jack deleted file mode 100644 index 2866f0d..0000000 --- a/projects/10/ExpressionLessSquare/SquareGame.jack +++ /dev/null @@ -1,60 +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/10/ExpressionLessSquare/SquareGame.jack - -/** Expressionless version of projects/10/Square/SquareGame.jack. */ - -class SquareGame { - field Square square; - field int direction; - - constructor SquareGame new() { - let square = square; - let direction = direction; - return square; - } - - method void dispose() { - do square.dispose(); - do Memory.deAlloc(square); - return; - } - - method void moveSquare() { - if (direction) { do square.moveUp(); } - if (direction) { do square.moveDown(); } - if (direction) { do square.moveLeft(); } - if (direction) { do square.moveRight(); } - do Sys.wait(direction); - return; - } - - method void run() { - var char key; - var boolean exit; - - let exit = key; - while (exit) { - while (key) { - let key = key; - do moveSquare(); - } - - if (key) { let exit = exit; } - if (key) { do square.decSize(); } - if (key) { do square.incSize(); } - if (key) { let direction = exit; } - if (key) { let direction = key; } - if (key) { let direction = square; } - if (key) { let direction = direction; } - - while (key) { - let key = key; - do moveSquare(); - } - } - return; - } -} - diff --git a/projects/10/ExpressionLessSquare/SquareGame.xml b/projects/10/ExpressionLessSquare/SquareGame.xml deleted file mode 100644 index 288c6cd..0000000 --- a/projects/10/ExpressionLessSquare/SquareGame.xml +++ /dev/null @@ -1,544 +0,0 @@ - - class - SquareGame - { - - field - Square - square - ; - - - field - int - direction - ; - - - constructor - SquareGame - new - ( - - - ) - - { - - - let - square - = - - - square - - - ; - - - let - direction - = - - - direction - - - ; - - - return - - - square - - - ; - - - } - - - - method - void - dispose - ( - - - ) - - { - - - do - square - . - dispose - ( - - - ) - ; - - - do - Memory - . - deAlloc - ( - - - - square - - - - ) - ; - - - return - ; - - - } - - - - method - void - moveSquare - ( - - - ) - - { - - - if - ( - - - direction - - - ) - { - - - do - square - . - moveUp - ( - - - ) - ; - - - } - - - if - ( - - - direction - - - ) - { - - - do - square - . - moveDown - ( - - - ) - ; - - - } - - - if - ( - - - direction - - - ) - { - - - do - square - . - moveLeft - ( - - - ) - ; - - - } - - - if - ( - - - direction - - - ) - { - - - do - square - . - moveRight - ( - - - ) - ; - - - } - - - do - Sys - . - wait - ( - - - - direction - - - - ) - ; - - - return - ; - - - } - - - - method - void - run - ( - - - ) - - { - - var - char - key - ; - - - var - boolean - exit - ; - - - - let - exit - = - - - key - - - ; - - - while - ( - - - exit - - - ) - { - - - while - ( - - - key - - - ) - { - - - let - key - = - - - key - - - ; - - - do - moveSquare - ( - - - ) - ; - - - } - - - if - ( - - - key - - - ) - { - - - let - exit - = - - - exit - - - ; - - - } - - - if - ( - - - key - - - ) - { - - - do - square - . - decSize - ( - - - ) - ; - - - } - - - if - ( - - - key - - - ) - { - - - do - square - . - incSize - ( - - - ) - ; - - - } - - - if - ( - - - key - - - ) - { - - - let - direction - = - - - exit - - - ; - - - } - - - if - ( - - - key - - - ) - { - - - let - direction - = - - - key - - - ; - - - } - - - if - ( - - - key - - - ) - { - - - let - direction - = - - - square - - - ; - - - } - - - if - ( - - - key - - - ) - { - - - let - direction - = - - - direction - - - ; - - - } - - - while - ( - - - key - - - ) - { - - - let - key - = - - - key - - - ; - - - do - moveSquare - ( - - - ) - ; - - - } - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/ExpressionLessSquare/SquareGameT.xml b/projects/10/ExpressionLessSquare/SquareGameT.xml deleted file mode 100644 index 278a8a9..0000000 --- a/projects/10/ExpressionLessSquare/SquareGameT.xml +++ /dev/null @@ -1,268 +0,0 @@ - - class - SquareGame - { - field - Square - square - ; - field - int - direction - ; - constructor - SquareGame - new - ( - ) - { - let - square - = - square - ; - let - direction - = - direction - ; - return - square - ; - } - method - void - dispose - ( - ) - { - do - square - . - dispose - ( - ) - ; - do - Memory - . - deAlloc - ( - square - ) - ; - return - ; - } - method - void - moveSquare - ( - ) - { - if - ( - direction - ) - { - do - square - . - moveUp - ( - ) - ; - } - if - ( - direction - ) - { - do - square - . - moveDown - ( - ) - ; - } - if - ( - direction - ) - { - do - square - . - moveLeft - ( - ) - ; - } - if - ( - direction - ) - { - do - square - . - moveRight - ( - ) - ; - } - do - Sys - . - wait - ( - direction - ) - ; - return - ; - } - method - void - run - ( - ) - { - var - char - key - ; - var - boolean - exit - ; - let - exit - = - key - ; - while - ( - exit - ) - { - while - ( - key - ) - { - let - key - = - key - ; - do - moveSquare - ( - ) - ; - } - if - ( - key - ) - { - let - exit - = - exit - ; - } - if - ( - key - ) - { - do - square - . - decSize - ( - ) - ; - } - if - ( - key - ) - { - do - square - . - incSize - ( - ) - ; - } - if - ( - key - ) - { - let - direction - = - exit - ; - } - if - ( - key - ) - { - let - direction - = - key - ; - } - if - ( - key - ) - { - let - direction - = - square - ; - } - if - ( - key - ) - { - let - direction - = - direction - ; - } - while - ( - key - ) - { - let - key - = - key - ; - do - moveSquare - ( - ) - ; - } - } - return - ; - } - } - diff --git a/projects/10/ExpressionLessSquare/SquareT.xml b/projects/10/ExpressionLessSquare/SquareT.xml deleted file mode 100644 index cd03a1e..0000000 --- a/projects/10/ExpressionLessSquare/SquareT.xml +++ /dev/null @@ -1,449 +0,0 @@ - - class - Square - { - field - int - x - , - y - ; - field - int - size - ; - constructor - Square - new - ( - int - Ax - , - int - Ay - , - int - Asize - ) - { - let - x - = - Ax - ; - let - y - = - Ay - ; - let - size - = - Asize - ; - do - draw - ( - ) - ; - return - x - ; - } - method - void - dispose - ( - ) - { - do - Memory - . - deAlloc - ( - this - ) - ; - return - ; - } - method - void - draw - ( - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - return - ; - } - method - void - erase - ( - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - return - ; - } - method - void - incSize - ( - ) - { - if - ( - x - ) - { - do - erase - ( - ) - ; - let - size - = - size - ; - do - draw - ( - ) - ; - } - return - ; - } - method - void - decSize - ( - ) - { - if - ( - size - ) - { - do - erase - ( - ) - ; - let - size - = - size - ; - do - draw - ( - ) - ; - } - return - ; - } - method - void - moveUp - ( - ) - { - if - ( - y - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - let - y - = - y - ; - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - } - return - ; - } - method - void - moveDown - ( - ) - { - if - ( - y - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - let - y - = - y - ; - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - } - return - ; - } - method - void - moveLeft - ( - ) - { - if - ( - x - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - let - x - = - x - ; - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - } - return - ; - } - method - void - moveRight - ( - ) - { - if - ( - x - ) - { - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - let - x - = - x - ; - do - Screen - . - setColor - ( - x - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - , - y - ) - ; - } - return - ; - } - } - diff --git a/projects/10/JackParser b/projects/10/JackParser deleted file mode 100755 index 7d36891..0000000 Binary files a/projects/10/JackParser and /dev/null differ diff --git a/projects/10/JackParser.hi b/projects/10/JackParser.hi deleted file mode 100644 index a0ca33e..0000000 Binary files a/projects/10/JackParser.hi and /dev/null differ diff --git a/projects/10/JackParser.hs b/projects/10/JackParser.hs deleted file mode 100644 index 6f83070..0000000 --- a/projects/10/JackParser.hs +++ /dev/null @@ -1,312 +0,0 @@ --- Jack Parser, as the coursework of Project 10 of Nand2Tetris course. --- Author: Yuchen Pei (me@ypei.me) --- Date: 2018-01-11 -{-# LANGUAGE FlexibleContexts #-} -import Text.Parsec.Prim -import Text.Parsec.Char -import Text.Parsec.Combinator -import Data.Functor.Identity -import Data.Either -import Data.Maybe -import Data.List -import System.Environment -import System.Directory -import Control.Monad - -data JClass = JClass JIdentifier [JClassVarDec] [JSubroutineDec] deriving (Show, Eq) -data JClassVarDec = JClassVarDec JClassVarScope JTypeAndId deriving (Show, Eq) -data JSubroutineDec = JSubroutineDec JSubroutineHeader JSubroutineBody deriving (Show, Eq) -data JSubroutineHeader = JSubroutineHeader JSubroutineType JTypeAndId [JTypeAndId] deriving (Show, Eq) -data JSubroutineBody = JSubroutineBody [JTypeAndId] [JStatement] deriving (Show, Eq) -data JStatement = JLetStatment JVarId JExpression - | JIfStatement JExpression [JStatement] (Maybe [JStatement]) - | JWhileStatment JExpression [JStatement] - | JDoStatement JSubroutineCall - | JReturnStatement (Maybe JExpression) - deriving (Show, Eq) -data JExpression = JIntConst Int - | JStrConst [Char] - | JKeywordConst [Char] -- can only be true, false, null or this - | JExpVar JVarId - | JExpCall JSubroutineCall - | JExpUna JUOp JExpression -- JOp can only be - or ~ here - | JExpBin JExpression [(JBOp, JExpression)] - deriving (Show, Eq) -data JVarId = JVarId JIdentifier (Maybe JExpression) deriving (Show, Eq) -data JSubroutineCall = JSubroutineCall JIdentifier (Maybe JIdentifier) [JExpression] deriving (Show, Eq) -type JBOp = Char -type JUOp = Char -type JIdentifier = [Char] -type JTypeAndId = (JType, JIdentifier) -type JClassVarScope = [Char] -type JType = [Char] -type JSubroutineType = [Char] -type JackParser = Parsec [Char] () - - -binaryOpChars = "+-*/&|<>=" -unaryOpChars = "-~" -keywordConstStrs = ["true", "false", "null", "this"] -primTypeStrs = ["int", "char", "boolean"] -primTypeStrs' = primTypeStrs ++ ["void"] -classVarScopeStrs = ["static", "field"] -subroutineTypeStrs = ["constructor", "function", "method"] -alphaUnderscore = ['a' .. 'z'] ++ ['A' .. 'Z'] ++ ['_'] -alphaNumUnderscore = alphaUnderscore ++ ['0'..'9'] - -parse' parser = parse parser "" - ---jack xs = parse' (many jSpace >> jClass) (replCrWithNl xs) -jack = parse' (many jSpace >> jClass) - -jClass :: JackParser JClass -jClass = do - string "class" >> many1 jSpace - id <- jIdentifier - many jSpace >> char '{' - classVarDecs <- many $ try (many jSpace >> jClassVarDecs) - subroutineDecs <- many $ try (many jSpace >> jSubroutineDec) - many jSpace >> char '}' - return $ JClass id (mconcat classVarDecs) subroutineDecs - -jClassType :: JackParser [Char] -jClassType = do - x <- oneOf ['A' .. 'Z'] - xs <- many $ oneOf alphaNumUnderscore - return $ x:xs - -jBOp :: JackParser JBOp -jBOp = oneOf binaryOpChars - -jUOp :: JackParser JUOp -jUOp = oneOf unaryOpChars - -jComment :: JackParser () -jComment = jInlineComment <|> jBlockComment - -jInlineComment :: JackParser () -jInlineComment = return () <* - try (string "//" >> manyTill (noneOf "\n\r") endOfLine) - --try (string "//" >> manyTill (noneOf "\n") newline) - -jSpace :: JackParser () -jSpace = (return () <* space) <|> jComment - -jBlockComment :: JackParser () -jBlockComment = return () <* - try (string "/*" >> manyTill anyChar (try $ string "*/")) - -jPrimType :: JackParser JType -jPrimType = choice $ string <$> primTypeStrs - -jType :: JackParser JType -jType = choice [jPrimType, jClassType] - -jPrimType' :: JackParser JType -jPrimType' = choice $ string <$> primTypeStrs' - -jType' :: JackParser JType -jType' = choice [jPrimType', jClassType] - -jClassVarScope :: JackParser JClassVarScope -jClassVarScope = choice $ string <$> classVarScopeStrs - -jSubroutineType :: JackParser JSubroutineType -jSubroutineType = choice $ string <$> subroutineTypeStrs - -jIdentifier :: JackParser [Char] -jIdentifier = do - x <- oneOf alphaUnderscore - xs <- many $ oneOf alphaNumUnderscore - return $ x:xs - -jClassVarDecs :: JackParser [JClassVarDec] -jClassVarDecs = do - scope <- jClassVarScope - many1 jSpace - typeAndIds <- jTypeAndIds - many jSpace >> char ';' - return $ JClassVarDec scope <$> typeAndIds - -jVarDecs :: JackParser [JTypeAndId] -jVarDecs = - (string "var" >> many1 jSpace) >> jTypeAndIds <* (many jSpace >> char ';') - -jTypeAndId :: JackParser JType -> JackParser JTypeAndId -jTypeAndId p = do - type_ <- p - many1 jSpace - id <- jIdentifier - return (type_, id) - -jTypeAndIds :: JackParser [JTypeAndId] -jTypeAndIds = do - type_ <- jType - many1 jSpace - ids <- sepBy jIdentifier (try $ many jSpace >> char ',' >> many jSpace) - return $ (\x -> (type_, x)) <$> ids - -jParameters :: JackParser [JTypeAndId] -jParameters = do - char '(' >> many jSpace - params <- sepBy (jTypeAndId jType) (try $ many jSpace >> char ',' >> many jSpace) - many jSpace >> char ')' - return params - -jSubroutineHeader :: JackParser JSubroutineHeader -jSubroutineHeader = do - subtype <- jSubroutineType - many1 jSpace - typeAndId <- jTypeAndId jType' - params <- jParameters - return $ JSubroutineHeader subtype typeAndId params - -jExpression :: JackParser JExpression -jExpression = jExpBin <|> jTerm - -jTerm :: JackParser JExpression -jTerm = choice [jIntConst, jStrConst, jKeywordConst, jExpCall, jExpVar, jExpUna, jExpInBraces] - -jIntConst :: JackParser JExpression -jIntConst = JIntConst <$> (read <$> many1 digit) - -jStrConst :: JackParser JExpression -jStrConst = JStrConst <$> between (char '"') (char '"') (many $ noneOf "\"") - -jKeywordConst :: JackParser JExpression -jKeywordConst = JKeywordConst <$> (choice $ try <$> string <$> keywordConstStrs) - -jExpVar :: JackParser JExpression -jExpVar = JExpVar <$> jVarId - -jVarId :: JackParser JVarId -jVarId = do - id <- jIdentifier - maybeArray <- optionMaybe $ try (char '[' >> jExpression <* char ']') - return $ JVarId id maybeArray - -jExpCall :: JackParser JExpression -jExpCall = JExpCall <$> jSubroutineCall - -jExpUna :: JackParser JExpression -jExpUna = do - op <- oneOf unaryOpChars - many jSpace - x <- jTerm - return $ JExpUna op x - -jExpInBraces :: JackParser JExpression -jExpInBraces = between (char '(') (char ')') jExpression -- expressions like a + () is not allowed - -jExpBin :: JackParser JExpression -jExpBin = try $ do - x <- jTerm - xs <- many1 jOpAndTerm - return $ JExpBin x xs - -jOpAndTerm :: JackParser (JBOp, JExpression) -jOpAndTerm = do - op <- many jSpace >> jBOp - x <- many jSpace >> jTerm - return (op, x) - -jSubroutineDec :: JackParser JSubroutineDec -jSubroutineDec = do - header <- jSubroutineHeader - many jSpace - body <- jSubroutineBody - return $ JSubroutineDec header body - -jSubroutineBody :: JackParser JSubroutineBody -jSubroutineBody = do - char '{' - varDecs <- many $ try (many jSpace >> jVarDecs) - stmts <- many $ try (many jSpace >> jStatement) - many jSpace >> char '}' - return $ JSubroutineBody (mconcat varDecs) stmts - -jStatement :: JackParser JStatement -jStatement = choice [jLetStatement, jIfStatement, jWhileStatement, jDoStatement, jReturnStatement] - -jLetStatement :: JackParser JStatement -jLetStatement = do - string "let" >> many1 jSpace - leftVarId <- jVarId - many jSpace >> char '=' >> many jSpace - exp <- jExpression - many jSpace >> char ';' - return $ JLetStatment leftVarId exp - -jIfStatement = do - string "if" >> many jSpace >> char '(' >> many jSpace - exp <- jExpression - many jSpace >> char ')' >> many jSpace >> char '{' >> many jSpace - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - stmts' <- optionMaybe $ try jElseBlock - return $ JIfStatement exp stmts stmts' - -jElseBlock :: JackParser [JStatement] -jElseBlock = do - many jSpace >> string "else" >> many jSpace >> char '{' >> many jSpace - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - return stmts - -jWhileStatement :: JackParser JStatement -jWhileStatement = do - string "while" >> many jSpace >> char '(' >> many jSpace - exp <- jExpression - many jSpace >> char ')' >> many jSpace >> char '{' - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - return $ JWhileStatment exp stmts - -jDoStatement :: JackParser JStatement -jDoStatement = do - jCall <- string "do" >> many jSpace >> jSubroutineCall - many jSpace >> char ';' - return $ JDoStatement jCall - -jReturnStatement :: JackParser JStatement -jReturnStatement = do - string "return" >> many jSpace - res <- optionMaybe $ try jExpression - many jSpace >> char ';' - return $ JReturnStatement res - -jSubroutineCall :: JackParser JSubroutineCall -jSubroutineCall = try $ do - callee <- jIdentifier - method <- optionMaybe $ try (char '.' >> jIdentifier) - args <- emptyArgs <|> someArgs - return $ JSubroutineCall callee method args - -emptyArgs :: JackParser [JExpression] -emptyArgs = return [] <* (try $ char '(' >> many jSpace >> char ')') - -someArgs :: JackParser [JExpression] -someArgs = do - char '(' >> many jSpace - exps <- sepBy jExpression (many jSpace >> char ',' >> many jSpace) - many jSpace >> char ')' - return exps - -{-- -replCrWithNl :: [Char] -> [Char] -replCrWithNl = fmap cr2nl - where cr2nl '\r' = '\n' - cr2nl c = c - --} - --- IO - -main = do - dir <- head <$> getArgs - filesWODir <- filter isJackFile <$> listDirectory dir - let jackFiles = (dir++) <$> filesWODir - codes <- sequence $ readFile <$> jackFiles - zipWithM writeFile (chExt <$> jackFiles) (show . jack <$> codes) - where isJackFile xs = drop (length xs - 5) xs == ".jack" - chExt xs = take (length xs - 4) xs ++ "ast" - --} diff --git a/projects/10/JackParser.o b/projects/10/JackParser.o deleted file mode 100644 index d33b200..0000000 Binary files a/projects/10/JackParser.o and /dev/null differ diff --git a/projects/10/Square/Main.ast b/projects/10/Square/Main.ast deleted file mode 100644 index d314f03..0000000 --- a/projects/10/Square/Main.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Main" [JClassVarDec "static" ("boolean","test")] [JSubroutineDec (JSubroutineHeader "function" ("void","main") []) (JSubroutineBody [("SquareGame","game")] [JLetStatment (JVarId "game" Nothing) (JExpCall (JSubroutineCall "SquareGame" (Just "new") [])),JDoStatement (JSubroutineCall "game" (Just "run") []),JDoStatement (JSubroutineCall "game" (Just "dispose") []),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "function" ("void","test") []) (JSubroutineBody [("int","i"),("int","j"),("String","s"),("Array","a")] [JIfStatement (JKeywordConst "false") [JLetStatment (JVarId "s" Nothing) (JStrConst "string constant"),JLetStatment (JVarId "s" Nothing) (JKeywordConst "null"),JLetStatment (JVarId "a" (Just (JIntConst 1))) (JExpVar (JVarId "a" (Just (JIntConst 2))))] (Just [JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('*',JExpUna '-' (JExpVar (JVarId "j" Nothing)))]),JLetStatment (JVarId "j" Nothing) (JExpBin (JExpVar (JVarId "j" Nothing)) [('/',JExpUna '-' (JIntConst 2))]),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('|',JExpVar (JVarId "j" Nothing))])]),JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/Square/Main.jack b/projects/10/Square/Main.jack deleted file mode 100644 index 0b9e4cb..0000000 --- a/projects/10/Square/Main.jack +++ /dev/null @@ -1,36 +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/10/Square/Main.jack - -// (derived from projects/09/Square/Main.jack, with testing additions) - -/** Initializes a new Square Dance game and starts running it. */ -class Main { - static boolean test; // Added for testing -- there is no static keyword - // in the Square files. - function void main() { - var SquareGame game; - let game = SquareGame.new(); - do game.run(); - do game.dispose(); - return; - } - - function void test() { // Added to test Jack syntax that is not use in - var int i, j; // the Square files. - var String s; - var Array a; - if (false) { - let s = "string constant"; - let s = null; - let a[1] = a[2]; - } - else { // There is no else keyword in the Square files. - let i = i * (-j); - let j = j / (-2); // note: unary negate constant 2 - let i = i | j; - } - return; - } -} diff --git a/projects/10/Square/Main.xml b/projects/10/Square/Main.xml deleted file mode 100644 index f6863c6..0000000 --- a/projects/10/Square/Main.xml +++ /dev/null @@ -1,244 +0,0 @@ - - class - Main - { - - static - boolean - test - ; - - - function - void - main - ( - - - ) - - { - - var - SquareGame - game - ; - - - - let - game - = - - - SquareGame - . - new - ( - - - ) - - - ; - - - do - game - . - run - ( - - - ) - ; - - - do - game - . - dispose - ( - - - ) - ; - - - return - ; - - - } - - - - function - void - test - ( - - - ) - - { - - var - int - i - , - j - ; - - - var - String - s - ; - - - var - Array - a - ; - - - - if - ( - - - false - - - ) - { - - - let - s - = - - - string constant - - - ; - - - let - s - = - - - null - - - ; - - - let - a - [ - - - 1 - - - ] - = - - - a - [ - - - 2 - - - ] - - - ; - - - } - else - { - - - let - i - = - - - i - - * - - ( - - - - - - j - - - - ) - - - ; - - - let - j - = - - - j - - / - - ( - - - - - - 2 - - - - ) - - - ; - - - let - i - = - - - i - - | - - j - - - ; - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/Square/MainT.xml b/projects/10/Square/MainT.xml deleted file mode 100644 index 950c050..0000000 --- a/projects/10/Square/MainT.xml +++ /dev/null @@ -1,126 +0,0 @@ - - class - Main - { - static - boolean - test - ; - function - void - main - ( - ) - { - var - SquareGame - game - ; - let - game - = - SquareGame - . - new - ( - ) - ; - do - game - . - run - ( - ) - ; - do - game - . - dispose - ( - ) - ; - return - ; - } - function - void - test - ( - ) - { - var - int - i - , - j - ; - var - String - s - ; - var - Array - a - ; - if - ( - false - ) - { - let - s - = - string constant - ; - let - s - = - null - ; - let - a - [ - 1 - ] - = - a - [ - 2 - ] - ; - } - else - { - let - i - = - i - * - ( - - - j - ) - ; - let - j - = - j - / - ( - - - 2 - ) - ; - let - i - = - i - | - j - ; - } - return - ; - } - } - diff --git a/projects/10/Square/Square.ast b/projects/10/Square/Square.ast deleted file mode 100644 index d360f5f..0000000 --- a/projects/10/Square/Square.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Square" [JClassVarDec "field" ("int","x"),JClassVarDec "field" ("int","y"),JClassVarDec "field" ("int","size")] [JSubroutineDec (JSubroutineHeader "constructor" ("Square","new") [("int","Ax"),("int","Ay"),("int","Asize")]) (JSubroutineBody [] [JLetStatment (JVarId "x" Nothing) (JExpVar (JVarId "Ax" Nothing)),JLetStatment (JVarId "y" Nothing) (JExpVar (JVarId "Ay" Nothing)),JLetStatment (JVarId "size" Nothing) (JExpVar (JVarId "Asize" Nothing)),JDoStatement (JSubroutineCall "draw" Nothing []),JReturnStatement (Just (JKeywordConst "this"))]),JSubroutineDec (JSubroutineHeader "method" ("void","dispose") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Memory" (Just "deAlloc") [JKeywordConst "this"]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","draw") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "true"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","erase") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "false"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","incSize") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpBin (JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('<',JIntConst 254)]) [('&',JExpBin (JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('<',JIntConst 510)])]) [JDoStatement (JSubroutineCall "erase" Nothing []),JLetStatment (JVarId "size" Nothing) (JExpBin (JExpVar (JVarId "size" Nothing)) [('+',JIntConst 2)]),JDoStatement (JSubroutineCall "draw" Nothing [])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","decSize") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpVar (JVarId "size" Nothing)) [('>',JIntConst 2)]) [JDoStatement (JSubroutineCall "erase" Nothing []),JLetStatment (JVarId "size" Nothing) (JExpBin (JExpVar (JVarId "size" Nothing)) [('-',JIntConst 2)]),JDoStatement (JSubroutineCall "draw" Nothing [])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveUp") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpVar (JVarId "y" Nothing)) [('>',JIntConst 1)]) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "false"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpBin (JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('-',JIntConst 1)],JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]]),JLetStatment (JVarId "y" Nothing) (JExpBin (JExpVar (JVarId "y" Nothing)) [('-',JIntConst 2)]),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "true"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JIntConst 1)]])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveDown") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('<',JIntConst 254)]) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "false"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JIntConst 1)]]),JLetStatment (JVarId "y" Nothing) (JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JIntConst 2)]),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "true"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpBin (JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('-',JIntConst 1)],JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveLeft") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpVar (JVarId "x" Nothing)) [('>',JIntConst 1)]) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "false"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpBin (JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('-',JIntConst 1)],JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]]),JLetStatment (JVarId "x" Nothing) (JExpBin (JExpVar (JVarId "x" Nothing)) [('-',JIntConst 2)]),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "true"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JIntConst 1)],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]])] Nothing,JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveRight") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('<',JIntConst 510)]) [JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "false"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpVar (JVarId "x" Nothing),JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JIntConst 1)],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]]),JLetStatment (JVarId "x" Nothing) (JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JIntConst 2)]),JDoStatement (JSubroutineCall "Screen" (Just "setColor") [JKeywordConst "true"]),JDoStatement (JSubroutineCall "Screen" (Just "drawRectangle") [JExpBin (JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]) [('-',JIntConst 1)],JExpVar (JVarId "y" Nothing),JExpBin (JExpVar (JVarId "x" Nothing)) [('+',JExpVar (JVarId "size" Nothing))],JExpBin (JExpVar (JVarId "y" Nothing)) [('+',JExpVar (JVarId "size" Nothing))]])] Nothing,JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/Square/Square.jack b/projects/10/Square/Square.jack deleted file mode 100644 index 3faf24f..0000000 --- a/projects/10/Square/Square.jack +++ /dev/null @@ -1,110 +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/10/Square/Square.jack - -// (same as projects/09/Square/Square.jack) - -/** Implements a graphical square. */ -class Square { - - field int x, y; // screen location of the square's top-left corner - field int size; // length of this square, in pixels - - /** Constructs a new square with a given location and size. */ - constructor Square new(int Ax, int Ay, int Asize) { - let x = Ax; - let y = Ay; - let size = Asize; - do draw(); - return this; - } - - /** Disposes this square. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } - - /** Draws the square on the screen. */ - method void draw() { - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Erases the square from the screen. */ - method void erase() { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Increments the square size by 2 pixels. */ - method void incSize() { - if (((y + size) < 254) & ((x + size) < 510)) { - do erase(); - let size = size + 2; - do draw(); - } - return; - } - - /** Decrements the square size by 2 pixels. */ - method void decSize() { - if (size > 2) { - do erase(); - let size = size - 2; - do draw(); - } - return; - } - - /** Moves the square up by 2 pixels. */ - method void moveUp() { - if (y > 1) { - do Screen.setColor(false); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - let y = y - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + 1); - } - return; - } - - /** Moves the square down by 2 pixels. */ - method void moveDown() { - if ((y + size) < 254) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + 1); - let y = y + 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - } - return; - } - - /** Moves the square left by 2 pixels. */ - method void moveLeft() { - if (x > 1) { - do Screen.setColor(false); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - let x = x - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 1, y + size); - } - return; - } - - /** Moves the square right by 2 pixels. */ - method void moveRight() { - if ((x + size) < 510) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + 1, y + size); - let x = x + 2; - do Screen.setColor(true); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - } - return; - } -} diff --git a/projects/10/Square/Square.xml b/projects/10/Square/Square.xml deleted file mode 100644 index ff5f235..0000000 --- a/projects/10/Square/Square.xml +++ /dev/null @@ -1,1211 +0,0 @@ - - class - Square - { - - field - int - x - , - y - ; - - - field - int - size - ; - - - constructor - Square - new - ( - - int - Ax - , - int - Ay - , - int - Asize - - ) - - { - - - let - x - = - - - Ax - - - ; - - - let - y - = - - - Ay - - - ; - - - let - size - = - - - Asize - - - ; - - - do - draw - ( - - - ) - ; - - - return - - - this - - - ; - - - } - - - - method - void - dispose - ( - - - ) - - { - - - do - Memory - . - deAlloc - ( - - - - this - - - - ) - ; - - - return - ; - - - } - - - - method - void - draw - ( - - - ) - - { - - - do - Screen - . - setColor - ( - - - - true - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - return - ; - - - } - - - - method - void - erase - ( - - - ) - - { - - - do - Screen - . - setColor - ( - - - - false - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - return - ; - - - } - - - - method - void - incSize - ( - - - ) - - { - - - if - ( - - - ( - - - ( - - - y - - + - - size - - - ) - - < - - 254 - - - ) - - & - - ( - - - ( - - - x - - + - - size - - - ) - - < - - 510 - - - ) - - - ) - { - - - do - erase - ( - - - ) - ; - - - let - size - = - - - size - - + - - 2 - - - ; - - - do - draw - ( - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - decSize - ( - - - ) - - { - - - if - ( - - - size - - > - - 2 - - - ) - { - - - do - erase - ( - - - ) - ; - - - let - size - = - - - size - - - - - 2 - - - ; - - - do - draw - ( - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveUp - ( - - - ) - - { - - - if - ( - - - y - - > - - 1 - - - ) - { - - - do - Screen - . - setColor - ( - - - - false - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - ( - - - y - - + - - size - - - ) - - - - - 1 - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - let - y - = - - - y - - - - - 2 - - - ; - - - do - Screen - . - setColor - ( - - - - true - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - 1 - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveDown - ( - - - ) - - { - - - if - ( - - - ( - - - y - - + - - size - - - ) - - < - - 254 - - - ) - { - - - do - Screen - . - setColor - ( - - - - false - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - 1 - - - - ) - ; - - - let - y - = - - - y - - + - - 2 - - - ; - - - do - Screen - . - setColor - ( - - - - true - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - ( - - - y - - + - - size - - - ) - - - - - 1 - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveLeft - ( - - - ) - - { - - - if - ( - - - x - - > - - 1 - - - ) - { - - - do - Screen - . - setColor - ( - - - - false - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - ( - - - x - - + - - size - - - ) - - - - - 1 - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - let - x - = - - - x - - - - - 2 - - - ; - - - do - Screen - . - setColor - ( - - - - true - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - 1 - - - , - - - y - - + - - size - - - - ) - ; - - - } - - - return - ; - - - } - - - - method - void - moveRight - ( - - - ) - - { - - - if - ( - - - ( - - - x - - + - - size - - - ) - - < - - 510 - - - ) - { - - - do - Screen - . - setColor - ( - - - - false - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - x - - - , - - - y - - - , - - - x - - + - - 1 - - - , - - - y - - + - - size - - - - ) - ; - - - let - x - = - - - x - - + - - 2 - - - ; - - - do - Screen - . - setColor - ( - - - - true - - - - ) - ; - - - do - Screen - . - drawRectangle - ( - - - - ( - - - x - - + - - size - - - ) - - - - - 1 - - - , - - - y - - - , - - - x - - + - - size - - - , - - - y - - + - - size - - - - ) - ; - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/Square/SquareGame.ast b/projects/10/Square/SquareGame.ast deleted file mode 100644 index 55a9ff0..0000000 --- a/projects/10/Square/SquareGame.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "SquareGame" [JClassVarDec "field" ("Square","square"),JClassVarDec "field" ("int","direction")] [JSubroutineDec (JSubroutineHeader "constructor" ("SquareGame","new") []) (JSubroutineBody [] [JLetStatment (JVarId "square" Nothing) (JExpCall (JSubroutineCall "Square" (Just "new") [JIntConst 0,JIntConst 0,JIntConst 30])),JLetStatment (JVarId "direction" Nothing) (JIntConst 0),JReturnStatement (Just (JKeywordConst "this"))]),JSubroutineDec (JSubroutineHeader "method" ("void","dispose") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "square" (Just "dispose") []),JDoStatement (JSubroutineCall "Memory" (Just "deAlloc") [JKeywordConst "this"]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveSquare") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 1)]) [JDoStatement (JSubroutineCall "square" (Just "moveUp") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 2)]) [JDoStatement (JSubroutineCall "square" (Just "moveDown") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 3)]) [JDoStatement (JSubroutineCall "square" (Just "moveLeft") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 4)]) [JDoStatement (JSubroutineCall "square" (Just "moveRight") [])] Nothing,JDoStatement (JSubroutineCall "Sys" (Just "wait") [JIntConst 5]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","run") []) (JSubroutineBody [("char","key"),("boolean","exit")] [JLetStatment (JVarId "exit" Nothing) (JKeywordConst "false"),JWhileStatment (JExpUna '~' (JExpVar (JVarId "exit" Nothing))) [JWhileStatment (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 0)]) [JLetStatment (JVarId "key" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "keyPressed") [])),JDoStatement (JSubroutineCall "moveSquare" Nothing [])],JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 81)]) [JLetStatment (JVarId "exit" Nothing) (JKeywordConst "true")] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 90)]) [JDoStatement (JSubroutineCall "square" (Just "decSize") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 88)]) [JDoStatement (JSubroutineCall "square" (Just "incSize") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 131)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 1)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 133)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 2)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 130)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 3)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 132)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 4)] Nothing,JWhileStatment (JExpUna '~' (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 0)])) [JLetStatment (JVarId "key" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "keyPressed") [])),JDoStatement (JSubroutineCall "moveSquare" Nothing [])]],JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/Square/SquareGame.jack b/projects/10/Square/SquareGame.jack deleted file mode 100644 index 4f71b16..0000000 --- a/projects/10/Square/SquareGame.jack +++ /dev/null @@ -1,81 +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/10/Square/SquareGame.jack - -// (same as projects/09/Square/SquareGame.jack) - -/** - * Implements the Square Dance game. - * This simple game allows the user to move a black square around - * the screen, and change the square's size during the movement. - * When the game starts, a square of 30 by 30 pixels is shown at the - * top-left corner of the screen. The user controls the square as follows. - * The 4 arrow keys are used to move the square up, down, left, and right. - * The 'z' and 'x' keys are used, respectively, to decrement and increment - * the square's size. The 'q' key is used to quit the game. - */ - -class SquareGame { - field Square square; // the square of this game - field int direction; // the square's current direction: - // 0=none, 1=up, 2=down, 3=left, 4=right - - /** Constructs a new Square Game. */ - constructor SquareGame new() { - // Creates a 30 by 30 pixels square and positions it at the top-left - // of the screen. - let square = Square.new(0, 0, 30); - let direction = 0; // initial state is no movement - return this; - } - - /** Disposes this game. */ - method void dispose() { - do square.dispose(); - do Memory.deAlloc(this); - return; - } - - /** Moves the square in the current direction. */ - method void moveSquare() { - if (direction = 1) { do square.moveUp(); } - if (direction = 2) { do square.moveDown(); } - if (direction = 3) { do square.moveLeft(); } - if (direction = 4) { do square.moveRight(); } - do Sys.wait(5); // delays the next movement - return; - } - - /** Runs the game: handles the user's inputs and moves the square accordingly */ - method void run() { - var char key; // the key currently pressed by the user - var boolean exit; - let exit = false; - - while (~exit) { - // waits for a key to be pressed - while (key = 0) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - if (key = 81) { let exit = true; } // q key - if (key = 90) { do square.decSize(); } // z key - if (key = 88) { do square.incSize(); } // x key - if (key = 131) { let direction = 1; } // up arrow - if (key = 133) { let direction = 2; } // down arrow - if (key = 130) { let direction = 3; } // left arrow - if (key = 132) { let direction = 4; } // right arrow - - // waits for the key to be released - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - } // while - return; - } -} - - - diff --git a/projects/10/Square/SquareGame.xml b/projects/10/Square/SquareGame.xml deleted file mode 100644 index ed3ab6e..0000000 --- a/projects/10/Square/SquareGame.xml +++ /dev/null @@ -1,643 +0,0 @@ - - class - SquareGame - { - - field - Square - square - ; - - - field - int - direction - ; - - - constructor - SquareGame - new - ( - - - ) - - { - - - let - square - = - - - Square - . - new - ( - - - - 0 - - - , - - - 0 - - - , - - - 30 - - - - ) - - - ; - - - let - direction - = - - - 0 - - - ; - - - return - - - this - - - ; - - - } - - - - method - void - dispose - ( - - - ) - - { - - - do - square - . - dispose - ( - - - ) - ; - - - do - Memory - . - deAlloc - ( - - - - this - - - - ) - ; - - - return - ; - - - } - - - - method - void - moveSquare - ( - - - ) - - { - - - if - ( - - - direction - - = - - 1 - - - ) - { - - - do - square - . - moveUp - ( - - - ) - ; - - - } - - - if - ( - - - direction - - = - - 2 - - - ) - { - - - do - square - . - moveDown - ( - - - ) - ; - - - } - - - if - ( - - - direction - - = - - 3 - - - ) - { - - - do - square - . - moveLeft - ( - - - ) - ; - - - } - - - if - ( - - - direction - - = - - 4 - - - ) - { - - - do - square - . - moveRight - ( - - - ) - ; - - - } - - - do - Sys - . - wait - ( - - - - 5 - - - - ) - ; - - - return - ; - - - } - - - - method - void - run - ( - - - ) - - { - - var - char - key - ; - - - var - boolean - exit - ; - - - - let - exit - = - - - false - - - ; - - - while - ( - - - ~ - - exit - - - - ) - { - - - while - ( - - - key - - = - - 0 - - - ) - { - - - let - key - = - - - Keyboard - . - keyPressed - ( - - - ) - - - ; - - - do - moveSquare - ( - - - ) - ; - - - } - - - if - ( - - - key - - = - - 81 - - - ) - { - - - let - exit - = - - - true - - - ; - - - } - - - if - ( - - - key - - = - - 90 - - - ) - { - - - do - square - . - decSize - ( - - - ) - ; - - - } - - - if - ( - - - key - - = - - 88 - - - ) - { - - - do - square - . - incSize - ( - - - ) - ; - - - } - - - if - ( - - - key - - = - - 131 - - - ) - { - - - let - direction - = - - - 1 - - - ; - - - } - - - if - ( - - - key - - = - - 133 - - - ) - { - - - let - direction - = - - - 2 - - - ; - - - } - - - if - ( - - - key - - = - - 130 - - - ) - { - - - let - direction - = - - - 3 - - - ; - - - } - - - if - ( - - - key - - = - - 132 - - - ) - { - - - let - direction - = - - - 4 - - - ; - - - } - - - while - ( - - - ~ - - ( - - - key - - = - - 0 - - - ) - - - - ) - { - - - let - key - = - - - Keyboard - . - keyPressed - ( - - - ) - - - ; - - - do - moveSquare - ( - - - ) - ; - - - } - - - } - - - return - ; - - - } - - - } - diff --git a/projects/10/Square/SquareGameT.xml b/projects/10/Square/SquareGameT.xml deleted file mode 100644 index 3136af2..0000000 --- a/projects/10/Square/SquareGameT.xml +++ /dev/null @@ -1,315 +0,0 @@ - - class - SquareGame - { - field - Square - square - ; - field - int - direction - ; - constructor - SquareGame - new - ( - ) - { - let - square - = - Square - . - new - ( - 0 - , - 0 - , - 30 - ) - ; - let - direction - = - 0 - ; - return - this - ; - } - method - void - dispose - ( - ) - { - do - square - . - dispose - ( - ) - ; - do - Memory - . - deAlloc - ( - this - ) - ; - return - ; - } - method - void - moveSquare - ( - ) - { - if - ( - direction - = - 1 - ) - { - do - square - . - moveUp - ( - ) - ; - } - if - ( - direction - = - 2 - ) - { - do - square - . - moveDown - ( - ) - ; - } - if - ( - direction - = - 3 - ) - { - do - square - . - moveLeft - ( - ) - ; - } - if - ( - direction - = - 4 - ) - { - do - square - . - moveRight - ( - ) - ; - } - do - Sys - . - wait - ( - 5 - ) - ; - return - ; - } - method - void - run - ( - ) - { - var - char - key - ; - var - boolean - exit - ; - let - exit - = - false - ; - while - ( - ~ - exit - ) - { - while - ( - key - = - 0 - ) - { - let - key - = - Keyboard - . - keyPressed - ( - ) - ; - do - moveSquare - ( - ) - ; - } - if - ( - key - = - 81 - ) - { - let - exit - = - true - ; - } - if - ( - key - = - 90 - ) - { - do - square - . - decSize - ( - ) - ; - } - if - ( - key - = - 88 - ) - { - do - square - . - incSize - ( - ) - ; - } - if - ( - key - = - 131 - ) - { - let - direction - = - 1 - ; - } - if - ( - key - = - 133 - ) - { - let - direction - = - 2 - ; - } - if - ( - key - = - 130 - ) - { - let - direction - = - 3 - ; - } - if - ( - key - = - 132 - ) - { - let - direction - = - 4 - ; - } - while - ( - ~ - ( - key - = - 0 - ) - ) - { - let - key - = - Keyboard - . - keyPressed - ( - ) - ; - do - moveSquare - ( - ) - ; - } - } - return - ; - } - } - diff --git a/projects/10/Square/SquareT.xml b/projects/10/Square/SquareT.xml deleted file mode 100644 index 69a8ca0..0000000 --- a/projects/10/Square/SquareT.xml +++ /dev/null @@ -1,561 +0,0 @@ - - class - Square - { - field - int - x - , - y - ; - field - int - size - ; - constructor - Square - new - ( - int - Ax - , - int - Ay - , - int - Asize - ) - { - let - x - = - Ax - ; - let - y - = - Ay - ; - let - size - = - Asize - ; - do - draw - ( - ) - ; - return - this - ; - } - method - void - dispose - ( - ) - { - do - Memory - . - deAlloc - ( - this - ) - ; - return - ; - } - method - void - draw - ( - ) - { - do - Screen - . - setColor - ( - true - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - size - , - y - + - size - ) - ; - return - ; - } - method - void - erase - ( - ) - { - do - Screen - . - setColor - ( - false - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - size - , - y - + - size - ) - ; - return - ; - } - method - void - incSize - ( - ) - { - if - ( - ( - ( - y - + - size - ) - < - 254 - ) - & - ( - ( - x - + - size - ) - < - 510 - ) - ) - { - do - erase - ( - ) - ; - let - size - = - size - + - 2 - ; - do - draw - ( - ) - ; - } - return - ; - } - method - void - decSize - ( - ) - { - if - ( - size - > - 2 - ) - { - do - erase - ( - ) - ; - let - size - = - size - - - 2 - ; - do - draw - ( - ) - ; - } - return - ; - } - method - void - moveUp - ( - ) - { - if - ( - y - > - 1 - ) - { - do - Screen - . - setColor - ( - false - ) - ; - do - Screen - . - drawRectangle - ( - x - , - ( - y - + - size - ) - - - 1 - , - x - + - size - , - y - + - size - ) - ; - let - y - = - y - - - 2 - ; - do - Screen - . - setColor - ( - true - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - size - , - y - + - 1 - ) - ; - } - return - ; - } - method - void - moveDown - ( - ) - { - if - ( - ( - y - + - size - ) - < - 254 - ) - { - do - Screen - . - setColor - ( - false - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - size - , - y - + - 1 - ) - ; - let - y - = - y - + - 2 - ; - do - Screen - . - setColor - ( - true - ) - ; - do - Screen - . - drawRectangle - ( - x - , - ( - y - + - size - ) - - - 1 - , - x - + - size - , - y - + - size - ) - ; - } - return - ; - } - method - void - moveLeft - ( - ) - { - if - ( - x - > - 1 - ) - { - do - Screen - . - setColor - ( - false - ) - ; - do - Screen - . - drawRectangle - ( - ( - x - + - size - ) - - - 1 - , - y - , - x - + - size - , - y - + - size - ) - ; - let - x - = - x - - - 2 - ; - do - Screen - . - setColor - ( - true - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - 1 - , - y - + - size - ) - ; - } - return - ; - } - method - void - moveRight - ( - ) - { - if - ( - ( - x - + - size - ) - < - 510 - ) - { - do - Screen - . - setColor - ( - false - ) - ; - do - Screen - . - drawRectangle - ( - x - , - y - , - x - + - 1 - , - y - + - size - ) - ; - let - x - = - x - + - 2 - ; - do - Screen - . - setColor - ( - true - ) - ; - do - Screen - . - drawRectangle - ( - ( - x - + - size - ) - - - 1 - , - y - , - x - + - size - , - y - + - size - ) - ; - } - return - ; - } - } - diff --git a/projects/10/jackspec.wiki b/projects/10/jackspec.wiki deleted file mode 100644 index e746941..0000000 --- a/projects/10/jackspec.wiki +++ /dev/null @@ -1,3 +0,0 @@ -Class = Name ClassVarDec* SubroutineDec* -ClassVarDec = ClassVarScope Type Identifier* -Type = JInt diff --git a/projects/10/spec1 b/projects/10/spec1 deleted file mode 100644 index e69de29..0000000 diff --git a/projects/10/spec1.png b/projects/10/spec1.png deleted file mode 100644 index d1a128e..0000000 Binary files a/projects/10/spec1.png and /dev/null differ diff --git a/projects/10/spec2.png b/projects/10/spec2.png deleted file mode 100644 index 8cd374b..0000000 Binary files a/projects/10/spec2.png and /dev/null differ diff --git a/projects/10/test/Main.ast b/projects/10/test/Main.ast deleted file mode 100644 index f8194cb..0000000 --- a/projects/10/test/Main.ast +++ /dev/null @@ -1 +0,0 @@ -Right (JClass "Main" [] [JSubroutineDec (JSubroutineHeader "function" ("void","main") []) (JSubroutineBody [("Array","a"),("int","length"),("int","i"),("int","sum")] [JLetStatment (JVarId "length" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "readInt") [JStrConst "HOW MANY NUMBERS? "])),JLetStatment (JVarId "a" Nothing) (JExpCall (JSubroutineCall "Array" (Just "new") [JExpVar (JVarId "length" Nothing)])),JLetStatment (JVarId "i" Nothing) (JIntConst 0),JWhileStatment (JExpBin (JExpVar (JVarId "i" Nothing)) [('<',JExpVar (JVarId "length" Nothing))]) [JLetStatment (JVarId "a" (Just (JExpVar (JVarId "i" Nothing)))) (JExpCall (JSubroutineCall "Keyboard" (Just "readInt") [JStrConst "ENTER THE NEXT NUMBER: "])),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('+',JIntConst 1)])],JLetStatment (JVarId "i" Nothing) (JIntConst 0),JLetStatment (JVarId "sum" Nothing) (JIntConst 0),JWhileStatment (JExpBin (JExpVar (JVarId "i" Nothing)) [('<',JExpVar (JVarId "length" Nothing))]) [JLetStatment (JVarId "sum" Nothing) (JExpBin (JExpVar (JVarId "sum" Nothing)) [('+',JExpVar (JVarId "a" (Just (JExpVar (JVarId "i" Nothing)))))]),JLetStatment (JVarId "i" Nothing) (JExpBin (JExpVar (JVarId "i" Nothing)) [('+',JIntConst 1)])],JDoStatement (JSubroutineCall "Output" (Just "printString") [JStrConst "THE AVERAGE IS: "]),JDoStatement (JSubroutineCall "Output" (Just "printInt") [JExpBin (JExpVar (JVarId "sum" Nothing)) [('/',JExpVar (JVarId "length" Nothing))]]),JDoStatement (JSubroutineCall "Output" (Just "println") []),JReturnStatement Nothing])]) \ No newline at end of file diff --git a/projects/10/test/Main.jack b/projects/10/test/Main.jack deleted file mode 100644 index cd80644..0000000 --- a/projects/10/test/Main.jack +++ /dev/null @@ -1,30 +0,0 @@ -class Main { - function void main() { - var Array a; - var int length; - var int i, sum; - - let length = Keyboard.readInt("HOW MANY NUMBERS? "); - let a = Array.new(length); - let i = 0; - - while (i < length) { - let a[i] = Keyboard.readInt("ENTER THE NEXT NUMBER: "); - let i = i + 1; - } - - let i = 0; - let sum = 0; - - while (i < length) { - let sum = sum + a[i]; - let i = i + 1; - } - - do Output.printString("THE AVERAGE IS: "); - do Output.printInt(sum / length); - do Output.println(); - - return; - } -} diff --git a/projects/11/Average/Main.jack b/projects/11/Average/Main.jack deleted file mode 100644 index d560bf1..0000000 --- a/projects/11/Average/Main.jack +++ /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/11/Average/Main.jack - -// (Same as projects/09/Average/Main.jack) - -// Inputs some numbers and computes their average -class Main { - function void main() { - var Array a; - var int length; - var int i, sum; - - let length = Keyboard.readInt("How many numbers? "); - let a = Array.new(length); // constructs the array - - let i = 0; - while (i < length) { - let a[i] = Keyboard.readInt("Enter a number: "); - let sum = sum + a[i]; - let i = i + 1; - } - - do Output.printString("The average is "); - do Output.printInt(sum / length); - return; - } -} diff --git a/projects/11/Average/Main.vm b/projects/11/Average/Main.vm deleted file mode 100644 index 91772b9..0000000 --- a/projects/11/Average/Main.vm +++ /dev/null @@ -1,147 +0,0 @@ -function Main.main 4 -push constant 18 -call String.new 1 -push constant 72 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 63 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Keyboard.readInt 1 -pop local 1 -push local 1 -call Array.new 1 -pop local 0 -push constant 0 -pop local 2 -label main.While0 -push local 2 -push local 1 -lt -not -if-goto main.EndWhile0 -push constant 16 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Keyboard.readInt 1 -push local 0 -push local 2 -add -pop pointer 1 -pop that 0 -push local 3 -push local 0 -push local 2 -add -pop pointer 1 -push that 0 -add -pop local 3 -push local 2 -push constant 1 -add -pop local 2 -goto main.While0 -label main.EndWhile0 -push constant 15 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 3 -push local 1 -call Math.divide 2 -call Output.printInt 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/ComplexArrays/Main.jack b/projects/11/ComplexArrays/Main.jack deleted file mode 100644 index fe51c20..0000000 --- a/projects/11/ComplexArrays/Main.jack +++ /dev/null @@ -1,70 +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/11/ComplexArrays/Main.jack - -/** - * Performs several complex array processing tests. - * For each test, the expected result is printed, along with the - * actual result. In each test, the two results should be equal. - */ -class Main { - - function void main() { - var Array a, b, c; - - let a = Array.new(10); - let b = Array.new(5); - let c = Array.new(1); - - let a[3] = 2; - let a[4] = 8; - let a[5] = 4; - let b[a[3]] = a[3] + 3; // b[2] = 5 - let a[b[a[3]]] = a[a[5]] * b[((7 - a[3]) - Main.double(2)) + 1]; // a[5] = 8 * 5 = 40 - let c[0] = null; - let c = c[0]; - - do Output.printString("Test 1: expected result: 5; actual result: "); - do Output.printInt(b[2]); - do Output.println(); - do Output.printString("Test 2: expected result: 40; actual result: "); - do Output.printInt(a[5]); - do Output.println(); - do Output.printString("Test 3: expected result: 0; actual result: "); - do Output.printInt(c); - do Output.println(); - - let c = null; - - if (c = null) { - do Main.fill(a, 10); - let c = a[3]; - let c[1] = 33; - let c = a[7]; - let c[1] = 77; - let b = a[3]; - let b[1] = b[1] + c[1]; // b[1] = 33 + 77 = 110; - } - - do Output.printString("Test 4: expected result: 77; actual result: "); - do Output.printInt(c[1]); - do Output.println(); - do Output.printString("Test 5: expected result: 110; actual result: "); - do Output.printInt(b[1]); - do Output.println(); - return; - } - - function int double(int a) { - return a * 2; - } - - function void fill(Array a, int size) { - while (size > 0) { - let size = size - 1; - let a[size] = Array.new(3); - } - return; - } -} diff --git a/projects/11/ComplexArrays/Main.vm b/projects/11/ComplexArrays/Main.vm deleted file mode 100644 index dc83733..0000000 --- a/projects/11/ComplexArrays/Main.vm +++ /dev/null @@ -1,681 +0,0 @@ -function Main.main 3 -push constant 10 -call Array.new 1 -pop local 0 -push constant 5 -call Array.new 1 -pop local 1 -push constant 1 -call Array.new 1 -pop local 2 -push constant 2 -push local 0 -push constant 3 -add -pop pointer 1 -pop that 0 -push constant 8 -push local 0 -push constant 4 -add -pop pointer 1 -pop that 0 -push constant 4 -push local 0 -push constant 5 -add -pop pointer 1 -pop that 0 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -push constant 3 -add -push local 1 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -add -pop pointer 1 -pop that 0 -push local 0 -push local 0 -push constant 5 -add -pop pointer 1 -push that 0 -add -pop pointer 1 -push that 0 -push local 1 -push constant 7 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -sub -push constant 2 -call Main.double 1 -sub -push constant 1 -add -add -pop pointer 1 -push that 0 -call Math.multiply 2 -push local 0 -push local 1 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -add -pop pointer 1 -push that 0 -add -pop pointer 1 -pop that 0 -push constant 0 -push local 2 -push constant 0 -add -pop pointer 1 -pop that 0 -push local 2 -push constant 0 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 43 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 53 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 1 -push constant 2 -add -pop pointer 1 -push that 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 44 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 52 -call String.appendChar 2 -push constant 48 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 5 -add -pop pointer 1 -push that 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 43 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 48 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 2 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -pop local 2 -push local 2 -push constant 0 -eq -not -if-goto main.Else0 -push local 0 -push constant 10 -call Main.fill 2 -pop temp 0 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 33 -push local 2 -push constant 1 -add -pop pointer 1 -pop that 0 -push local 0 -push constant 7 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 77 -push local 2 -push constant 1 -add -pop pointer 1 -pop that 0 -push local 0 -push constant 3 -add -pop pointer 1 -push that 0 -pop local 1 -push local 1 -push constant 1 -add -pop pointer 1 -push that 0 -push local 2 -push constant 1 -add -pop pointer 1 -push that 0 -add -push local 1 -push constant 1 -add -pop pointer 1 -pop that 0 -label main.Else0 -push constant 44 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 52 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 55 -call String.appendChar 2 -push constant 55 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 2 -push constant 1 -add -pop pointer 1 -push that 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 45 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 53 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 48 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 1 -push constant 1 -add -pop pointer 1 -push that 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -return -function Main.double 0 -push argument 0 -push constant 2 -call Math.multiply 2 -return -function Main.fill 0 -label fill.While0 -push argument 1 -push constant 0 -gt -not -if-goto fill.EndWhile0 -push argument 1 -push constant 1 -sub -pop argument 1 -push constant 3 -call Array.new 1 -push argument 0 -push argument 1 -add -pop pointer 1 -pop that 0 -goto fill.While0 -label fill.EndWhile0 -push constant 0 -return diff --git a/projects/11/ConvertToBin/Main.jack b/projects/11/ConvertToBin/Main.jack deleted file mode 100644 index e1ab941..0000000 --- a/projects/11/ConvertToBin/Main.jack +++ /dev/null @@ -1,84 +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/11/ConvertToBin/Main.jack - -/** - * Unpacks a 16-bit number into its binary representation: - * Takes the 16-bit number stored in RAM[8000] and stores its individual - * bits in RAM[8001..8016] (each location will contain 0 or 1). - * Before the conversion, RAM[8001]..RAM[8016] are initialized to -1. - * - * The program should be tested as follows: - * 1) Load the program into the supplied VM emulator - * 2) Put some value in RAM[8000] - * 3) Switch to "no animation" - * 4) Run the program (give it enough time to run) - * 5) Stop the program - * 6) Check that RAM[8001]..RAM[8016] contains the correct binary result, and - * that none of these memory locations contains -1. - */ -class Main { - - /** - * Initializes RAM[8001]..RAM[8016] to -1, - * and converts the value in RAM[8000] to binary. - */ - function void main() { - var int value; - do Memory.poke(8000, 3827); - //do Memory.poke(8000, -7); - do Main.fillMemory(8001, 16, -1); // sets RAM[8001]..RAM[8016] to -1 - let value = Memory.peek(8000); // reads a value from RAM[8000] - do Main.convert(value); // performs the conversion - return; - } - - /** Converts the given decimal value to binary, and puts - * the resulting bits in RAM[8001]..RAM[8016]. */ - function void convert(int value) { - var int mask, position; - var boolean loop; - - let loop = true; - while (loop) { - let position = position + 1; - let mask = Main.nextMask(mask); - - if (~(position > 16)) { - - if (~((value & mask) = 0)) { - do Memory.poke(8000 + position, 1); - } - else { - do Memory.poke(8000 + position, 0); - } - } - else { - let loop = false; - } - } - return; - } - - /** Returns the next mask (the mask that should follow the given mask). */ - function int nextMask(int mask) { - if (mask = 0) { - return 1; - } - else { - return mask * 2; - } - } - - /** Fills 'length' consecutive memory locations with 'value', - * starting at 'startAddress'. */ - function void fillMemory(int startAddress, int length, int value) { - while (length > 0) { - do Memory.poke(startAddress, value); - let length = length - 1; - let startAddress = startAddress + 1; - } - return; - } -} diff --git a/projects/11/ConvertToBin/Main.vm b/projects/11/ConvertToBin/Main.vm deleted file mode 100644 index 15d63c0..0000000 --- a/projects/11/ConvertToBin/Main.vm +++ /dev/null @@ -1,110 +0,0 @@ -function Main.main 1 -push constant 8000 -push constant 3827 -call Memory.poke 2 -pop temp 0 -push constant 8001 -push constant 16 -push constant 1 -neg -call Main.fillMemory 3 -pop temp 0 -push constant 8000 -call Memory.peek 1 -pop local 0 -push local 0 -call Main.convert 1 -pop temp 0 -push constant 0 -return -function Main.convert 3 -push constant 1 -neg -pop local 2 -label convert.While0 -push local 2 -not -if-goto convert.EndWhile0 -push local 1 -push constant 1 -add -pop local 1 -push local 0 -call Main.nextMask 1 -pop local 0 -push local 1 -push constant 16 -gt -not -not -if-goto convert.While0.Else0 -push argument 0 -push local 0 -and -push constant 0 -eq -not -not -if-goto convert.While0.Else0.Else0 -push constant 8000 -push local 1 -add -push constant 1 -call Memory.poke 2 -pop temp 0 -goto convert.While0.Else0.Endif0 -label convert.While0.Else0.Else0 -push constant 8000 -push local 1 -add -push constant 0 -call Memory.poke 2 -pop temp 0 -label convert.While0.Else0.Endif0 -goto convert.While0.Endif0 -label convert.While0.Else0 -push constant 0 -pop local 2 -label convert.While0.Endif0 -goto convert.While0 -label convert.EndWhile0 -push constant 0 -return -function Main.nextMask 0 -push argument 0 -push constant 0 -eq -not -if-goto nextMask.Else0 -push constant 1 -return -goto nextMask.Endif0 -label nextMask.Else0 -push argument 0 -push constant 2 -call Math.multiply 2 -return -label nextMask.Endif0 -function Main.fillMemory 0 -label fillMemory.While0 -push argument 1 -push constant 0 -gt -not -if-goto fillMemory.EndWhile0 -push argument 0 -push argument 2 -call Memory.poke 2 -pop temp 0 -push argument 1 -push constant 1 -sub -pop argument 1 -push argument 0 -push constant 1 -add -pop argument 0 -goto fillMemory.While0 -label fillMemory.EndWhile0 -push constant 0 -return diff --git a/projects/11/ConvertToBin/setram.tst b/projects/11/ConvertToBin/setram.tst deleted file mode 100644 index a33eece..0000000 --- a/projects/11/ConvertToBin/setram.tst +++ /dev/null @@ -1,3 +0,0 @@ -load Main.vm -set RAM[8000] 1023; -vmstep; diff --git a/projects/11/JackCompiler b/projects/11/JackCompiler deleted file mode 100755 index 2dc9b98..0000000 Binary files a/projects/11/JackCompiler and /dev/null differ diff --git a/projects/11/JackCompiler.hi b/projects/11/JackCompiler.hi deleted file mode 100644 index 50c8c9c..0000000 Binary files a/projects/11/JackCompiler.hi and /dev/null differ diff --git a/projects/11/JackCompiler.hs b/projects/11/JackCompiler.hs deleted file mode 100644 index bf3acfe..0000000 --- a/projects/11/JackCompiler.hs +++ /dev/null @@ -1,538 +0,0 @@ --- Jack Compiler, as the coursework of Project 11 of Nand2Tetris course. --- Author: Yuchen Pei (me@ypei.me) --- Date: 2018-01-15 -{-# LANGUAGE FlexibleContexts #-} -import Text.Parsec.Prim -import Text.Parsec.Char -import Text.Parsec.Combinator -import Data.Functor.Identity -import Data.Either -import Data.Maybe -import Data.List -import System.Environment -import System.Directory -import Control.Monad -import Data.Char -import Data.Map (Map) -import qualified Data.Map as Map -import Debug.Trace - -data JClass = JClass JIdentifier [JClassVarDec] [JSubroutineDec] deriving (Show, Eq) -data JClassVarDec = JClassVarDec JClassVarScope JTypeAndId deriving (Show, Eq) -data JSubroutineDec = JSubroutineDec JSubroutineHeader JSubroutineBody deriving (Show, Eq) -data JSubroutineHeader = JSubroutineHeader JSubroutineType JTypeAndId [JTypeAndId] deriving (Show, Eq) -data JSubroutineBody = JSubroutineBody [JTypeAndId] [JStatement] deriving (Show, Eq) -data JStatement = JLetStatment JVarId JExpression - | JIfStatement JExpression [JStatement] (Maybe [JStatement]) - | JWhileStatment JExpression [JStatement] - | JDoStatement JSubroutineCall - | JReturnStatement (Maybe JExpression) - deriving (Show, Eq) -data JExpression = JIntConst Int - | JStrConst [Char] - | JKeywordConst [Char] -- can only be true, false, null or this - | JExpVar JVarId - | JExpCall JSubroutineCall - | JExpUna JUOp JExpression -- JOp can only be - or ~ here - | JExpBin JExpression [(JBOp, JExpression)] - deriving (Show, Eq) -data JVarId = JVarId JIdentifier (Maybe JExpression) deriving (Show, Eq) -data JSubroutineCall = JSubroutineCall JIdentifier (Maybe JIdentifier) [JExpression] deriving (Show, Eq) - ---data ClassTable = C [Char] Table Int deriving (Show, Eq) -type JBOp = Char -type JUOp = Char -type JIdentifier = [Char] -type JTypeAndId = (JType, JIdentifier) -type JClassVarScope = [Char] -type JType = [Char] -type JSubroutineType = [Char] -type JackParser = Parsec [Char] () --- For variable tables: map name (type, (seg, n)) --- For the subroutine table: map name (kind, (type, nArgs)) -type Table = Map [Char] ([Char], ([Char], Int)) - - -binaryOpChars = "+-*/&|<>=" -unaryOpChars = "-~" -keywordConstStrs = ["true", "false", "null", "this"] -primTypeStrs = ["int", "char", "boolean"] -primTypeStrs' = primTypeStrs ++ ["void"] -classVarScopeStrs = ["static", "field"] -subroutineTypeStrs = ["constructor", "function", "method"] -alphaUnderscore = ['a' .. 'z'] ++ ['A' .. 'Z'] ++ ['_'] -alphaNumUnderscore = alphaUnderscore ++ ['0'..'9'] -alphaNumUnderscoredot = '.':alphaNumUnderscore - -parse' parser = parse parser "" - -jackReader = parse' (many jSpace >> jClass) - -jClass :: JackParser JClass -jClass = do - string "class" >> many1 jSpace - id <- jIdentifier - many jSpace >> char '{' - classVarDecs <- many $ try (many jSpace >> jClassVarDecs) - subroutineDecs <- many $ try (many jSpace >> jSubroutineDec) - many jSpace >> char '}' - return $ JClass id (mconcat classVarDecs) subroutineDecs - -jClassType :: JackParser [Char] -jClassType = do - x <- oneOf ['A' .. 'Z'] - xs <- many $ oneOf alphaNumUnderscore - return $ x:xs - -jBOp :: JackParser JBOp -jBOp = oneOf binaryOpChars - -jUOp :: JackParser JUOp -jUOp = oneOf unaryOpChars - -jComment :: JackParser () -jComment = jInlineComment <|> jBlockComment - -jInlineComment :: JackParser () -jInlineComment = return () <* - try (string "//" >> manyTill (noneOf "\n\r") endOfLine) - --try (string "//" >> manyTill (noneOf "\n") newline) - -jSpace :: JackParser () -jSpace = (return () <* space) <|> jComment - -jBlockComment :: JackParser () -jBlockComment = return () <* - try (string "/*" >> manyTill anyChar (try $ string "*/")) - -jPrimType :: JackParser JType -jPrimType = choice $ string <$> primTypeStrs - -jType :: JackParser JType -jType = choice [jPrimType, jClassType] - -jPrimType' :: JackParser JType -jPrimType' = choice $ string <$> primTypeStrs' - -jType' :: JackParser JType -jType' = choice [jPrimType', jClassType] - -jClassVarScope :: JackParser JClassVarScope -jClassVarScope = choice $ string <$> classVarScopeStrs - -jSubroutineType :: JackParser JSubroutineType -jSubroutineType = choice $ string <$> subroutineTypeStrs - -jIdentifier :: JackParser [Char] -jIdentifier = do - x <- oneOf alphaUnderscore - xs <- many $ oneOf alphaNumUnderscore - return $ x:xs - -jClassVarDecs :: JackParser [JClassVarDec] -jClassVarDecs = do - scope <- jClassVarScope - many1 jSpace - typeAndIds <- jTypeAndIds - many jSpace >> char ';' - return $ JClassVarDec scope <$> typeAndIds - -jVarDecs :: JackParser [JTypeAndId] -jVarDecs = - (string "var" >> many1 jSpace) >> jTypeAndIds <* (many jSpace >> char ';') - -jTypeAndId :: JackParser JType -> JackParser JTypeAndId -jTypeAndId p = do - type_ <- p - many1 jSpace - id <- jIdentifier - return (type_, id) - -jTypeAndIds :: JackParser [JTypeAndId] -jTypeAndIds = do - type_ <- jType - many1 jSpace - ids <- sepBy jIdentifier (try $ many jSpace >> char ',' >> many jSpace) - return $ (\x -> (type_, x)) <$> ids - -jParameters :: JackParser [JTypeAndId] -jParameters = do - char '(' >> many jSpace - params <- sepBy (jTypeAndId jType) (try $ many jSpace >> char ',' >> many jSpace) - many jSpace >> char ')' - return params - -jSubroutineHeader :: JackParser JSubroutineHeader -jSubroutineHeader = do - subtype <- jSubroutineType - many1 jSpace - typeAndId <- jTypeAndId jType' - params <- jParameters - return $ JSubroutineHeader subtype typeAndId params - -jExpression :: JackParser JExpression -jExpression = jExpBin <|> jTerm - -jTerm :: JackParser JExpression -jTerm = choice [jIntConst, jStrConst, jKeywordConst, jExpCall, jExpVar, jExpUna, jExpInBraces] - -jIntConst :: JackParser JExpression -jIntConst = JIntConst <$> (read <$> many1 digit) - -jStrConst :: JackParser JExpression -jStrConst = JStrConst <$> between (char '"') (char '"') (many $ noneOf "\"") - -jKeywordConst :: JackParser JExpression -jKeywordConst = JKeywordConst <$> (choice $ try <$> string <$> keywordConstStrs) - -jExpVar :: JackParser JExpression -jExpVar = JExpVar <$> jVarId - -jVarId :: JackParser JVarId -jVarId = do - id <- jIdentifier - maybeArray <- optionMaybe $ try (char '[' >> jExpression <* char ']') - return $ JVarId id maybeArray - -jExpCall :: JackParser JExpression -jExpCall = JExpCall <$> jSubroutineCall - -jExpUna :: JackParser JExpression -jExpUna = do - op <- oneOf unaryOpChars - many jSpace - x <- jTerm - return $ JExpUna op x - -jExpInBraces :: JackParser JExpression -jExpInBraces = between (char '(') (char ')') jExpression -- expressions like a + () is not allowed - -jExpBin :: JackParser JExpression -jExpBin = try $ do - x <- jTerm - xs <- many1 jOpAndTerm - return $ JExpBin x xs - -jOpAndTerm :: JackParser (JBOp, JExpression) -jOpAndTerm = do - op <- many jSpace >> jBOp - x <- many jSpace >> jTerm - return (op, x) - -jSubroutineDec :: JackParser JSubroutineDec -jSubroutineDec = do - header <- jSubroutineHeader - many jSpace - body <- jSubroutineBody - return $ JSubroutineDec header body - -jSubroutineBody :: JackParser JSubroutineBody -jSubroutineBody = do - char '{' - varDecs <- many $ try (many jSpace >> jVarDecs) - stmts <- many $ try (many jSpace >> jStatement) - many jSpace >> char '}' - return $ JSubroutineBody (mconcat varDecs) stmts - -jStatement :: JackParser JStatement -jStatement = choice [jLetStatement, jIfStatement, jWhileStatement, jDoStatement, jReturnStatement] - -jLetStatement :: JackParser JStatement -jLetStatement = do - string "let" >> many1 jSpace - leftVarId <- jVarId - many jSpace >> char '=' >> many jSpace - exp <- jExpression - many jSpace >> char ';' - return $ JLetStatment leftVarId exp - -jIfStatement = do - string "if" >> many jSpace >> char '(' >> many jSpace - exp <- jExpression - many jSpace >> char ')' >> many jSpace >> char '{' >> many jSpace - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - stmts' <- optionMaybe $ try jElseBlock - return $ JIfStatement exp stmts stmts' - -jElseBlock :: JackParser [JStatement] -jElseBlock = do - many jSpace >> string "else" >> many jSpace >> char '{' >> many jSpace - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - return stmts - -jWhileStatement :: JackParser JStatement -jWhileStatement = do - string "while" >> many jSpace >> char '(' >> many jSpace - exp <- jExpression - many jSpace >> char ')' >> many jSpace >> char '{' - stmts <- many (try $ many jSpace >> jStatement) - many jSpace >> char '}' - return $ JWhileStatment exp stmts - -jDoStatement :: JackParser JStatement -jDoStatement = do - jCall <- string "do" >> many jSpace >> jSubroutineCall - many jSpace >> char ';' - return $ JDoStatement jCall - -jReturnStatement :: JackParser JStatement -jReturnStatement = do - string "return" >> many jSpace - res <- optionMaybe $ try jExpression - many jSpace >> char ';' - return $ JReturnStatement res - -jSubroutineCall :: JackParser JSubroutineCall -jSubroutineCall = try $ do - callee <- jIdentifier - method <- optionMaybe $ try (char '.' >> jIdentifier) - args <- emptyArgs <|> someArgs - return $ JSubroutineCall callee method args - -emptyArgs :: JackParser [JExpression] -emptyArgs = return [] <* (try $ char '(' >> many jSpace >> char ')') - -someArgs :: JackParser [JExpression] -someArgs = do - char '(' >> many jSpace - exps <- sepBy jExpression (many jSpace >> char ',' >> many jSpace) - many jSpace >> char ')' - return exps - - --- vm writer starts from here - -buildCTable :: [JClassVarDec] -> (Table, Int) -buildCTable xs = go 0 0 Map.empty xs - where go n _ t [] = (t, n) - go nField nStatic t ((JClassVarDec "field" (ty, jId)):ys) = - go (nField + 1) nStatic (Map.insert jId (ty, ("this", nField)) t) ys - go nField nStatic t ((JClassVarDec "static" (ty, jId)):ys) = - go nField (nStatic + 1) (Map.insert jId (ty, ("static", nStatic)) t) ys - - ---data JClass = JClass JIdentifier [JClassVarDec] [JSubroutineDec] deriving (Show, Eq) -buildSRTable :: [JClass] -> Table -buildSRTable xs = Map.fromList $ mconcat $ go <$> xs where - go (JClass cName _ subs) = go' <$> subs where - go' (JSubroutineDec (JSubroutineHeader kind (ty, sName) args) _) = - (cName ++ "." ++ sName, (kind, (ty, nArgs))) where - nArgs = length args + if kind == "method" then 1 else 0 - -buildLTable :: Bool -> [JTypeAndId] -> [JTypeAndId] -> Table -buildLTable isMethod args lcls = - (go "argument" args (if isMethod then 1 else 0) Map.empty) `Map.union` (go "local" lcls 0 Map.empty) where - go _ [] _ t = t - go kind ((ty, name):xs) n t = go kind xs (n + 1) $ Map.insert name (ty, (kind, n)) t - ---data JSubroutineDec = JSubroutineDec JSubroutineHeader JSubroutineBody deriving (Show, Eq) ---data JSubroutineHeader = JSubroutineHeader JSubroutineType JTypeAndId [JTypeAndId] deriving (Show, Eq) ---data JSubroutineBody = JSubroutineBody [JTypeAndId] [JStatement] deriving (Show, Eq) - -jackCompiler :: Table -> [[Char]] -> [[Char]] -jackCompiler initTable = vmWriter initTable . fmap (fromRight (JClass "" [] []) . jackReader) - -vmWriter :: Table -> [JClass] -> [[Char]] -vmWriter initTable xs = vClass (buildSRTable xs `Map.union` initTable) <$> xs - -vClass :: Table -> JClass -> [Char] -vClass u (JClass name vars subs) = mconcat $ vSubroutineDec name t u n <$> subs where - (t, n) = buildCTable vars - -vSubroutineDec :: [Char] -> Table -> Table -> Int -> JSubroutineDec -> [Char] -vSubroutineDec cName t u n sub = - vFunction (cName ++ "." ++ sName) nLcls ++ kindSpec ++ - vStatement t s u cName sName 0 stmts where - JSubroutineDec (JSubroutineHeader _ (_, sName) args) (JSubroutineBody lcls stmts) = sub - nLcls = length lcls - kind = fst $ u Map.! (cName ++ "." ++ sName) - s = buildLTable (kind == "method") args lcls - kindSpec = if kind == "constructor" - then vNew n - else if kind == "method" - then vPush "argument" 0 ++ vPop "pointer" 0 - else "" - --- data JStatement = JLetStatment JVarId JExpression - -- | JIfStatement JExpression [JStatement] (Maybe [JStatement]) - -- | JWhileStatment JExpression [JStatement] - -- | JDoStatement JSubroutineCall - -- | JReturnStatement (Maybe JExpression) - -vStatement _ _ _ _ _ _ [] = "" - --- vExpression: push the result of exp; vPopToVar: pop to the var addr - -vStatement t s u cName name n ((JLetStatment var exp):stmts) = - vExpression t s u cName exp ++ vPopToVar t s u cName var ++ vStatement t s u cName name n stmts - -vStatement t s u cName name n ((JIfStatement cond thenStmts elseStmts):stmts) = - vExpression t s u cName cond ++ vNot ++ vThen thenStmts ++ - maybe (vLabel labelElse) vElse elseStmts ++ vStatement t s u cName name (n + 1) stmts where - labelElse = name ++ ".Else" ++ show n - labelEndIf = name ++ ".Endif" ++ show n - labelIf = name ++ ".If" ++ show n - vThen xs = vIfGoto labelElse ++ vStatement t s u cName labelElse 0 xs - vElse xs = vGoto labelEndIf ++ vLabel labelElse ++ - vStatement t s u cName labelIf 0 xs ++ vLabel labelEndIf - -vStatement t s u cName name n ((JWhileStatment cond loopStmts):stmts) = - vLabel labelWhile ++ vExpression t s u cName cond ++ vNot ++ vIfGoto labelEndWhile ++ - vStatement t s u cName labelWhile 0 loopStmts ++ vGoto labelWhile ++ - vLabel labelEndWhile ++ vStatement t s u cName name (n + 1) stmts where - labelWhile = name ++ ".While" ++ show n - labelEndWhile = name ++ ".EndWhile" ++ show n - -vStatement t s u cName name n ((JDoStatement subCall):stmts) = - vSubroutineCall t s u cName subCall ++ vPop "temp" 0 ++ vStatement t s u cName name n stmts - -vStatement t s u cName name n ((JReturnStatement ret):stmts) = - maybe (vPush "constant" 0) (vExpression t s u cName) ret ++ vReturn ++ - vStatement t s u cName name n stmts - --- data JExpression = JIntConst Int - -- | JStrConst [Char] - -- | JKeywordConst [Char] -- can only be true, false, null or this - -- | JExpVar JVarId - -- | JExpCall JSubroutineCall - -- | JExpUna JUOp JExpression -- JOp can only be - or ~ here - -- | JExpBin JExpression [(JBOp, JExpression)] - -vExpression :: Table -> Table -> Table -> [Char] -> JExpression -> [Char] - -vExpression t s _ _ (JIntConst n) = vPush "constant" n - -vExpression t s _ _ (JStrConst xs) = - vPush "constant" (length xs) ++ vCall "String.new" 1 ++ mconcat (go <$> xs) where - go x = vPush "constant" (ord x) ++ vCall "String.appendChar" 2 - -vExpression t s _ _ (JKeywordConst x) - | x == "null" || x == "false" = vPush "constant" 0 - | x == "true" = vPush "constant" 1 ++ vNeg - | x == "this" = vPush "pointer" 0 - -vExpression t s u cName (JExpVar (JVarId name idx)) = vVar t s u cName name idx vPush - -vExpression t s u cName (JExpCall subCall) = vSubroutineCall t s u cName subCall - -vExpression t s u cName (JExpUna op exp) = vExpression t s u cName exp ++ vOp op - where vOp '~' = vNot; vOp '-' = vNeg; - -vExpression t s u cName (JExpBin exp xs) = - vExpression t s u cName exp ++ mconcat (go <$> xs) - where go (op, exp) = vExpression t s u cName exp ++ vOp op - vOp '+' = vAdd; vOp '-' = vSub; vOp '*' = vMul; vOp '/' = vDiv; - vOp '&' = vAnd; vOp '|' = vOr; vOp '<' = vLt; vOp '>' = vGt; - vOp '=' = vEq; - -vPopToVar t s u cName (JVarId name idx) = vVar t s u cName name idx vPop - -vVar :: Table -> Table -> Table -> [Char] -> [Char] -> Maybe JExpression -> ([Char] -> Int -> [Char]) -> [Char] -vVar t s u cName name idx vPushOrPop = - let (seg, n) = getSegN t s name in - case idx of - Nothing -> vPushOrPop seg n - Just exp -> vPush seg n ++ vExpression t s u cName exp ++ vAdd - ++ vPop "pointer" 1 ++ vPushOrPop "that" 0 - - -getRecord :: Table -> Table -> [Char] -> ([Char], ([Char], Int)) -getRecord t s name = case Map.lookup name s of - Just x -> x - Nothing -> t Map.! name - -getSegN :: Table -> Table -> [Char] -> ([Char], Int) -getSegN t s name = snd $ getRecord t s name - -getType :: Table -> Table -> [Char] -> [Char] -getType t s name = fst $ getRecord t s name - --- data JSubroutineCall = JSubroutineCall JIdentifier (Maybe JIdentifier) [JExpression] deriving (Show, Eq) -vSubroutineCall t s u cName (JSubroutineCall name name' args) = - method ++ mconcat (vExpression t s u cName <$> args) ++ vCall name'' nArgs - where - name'' = if name' == Nothing - then cName ++ "." ++ name - else if head name `elem` ['A' .. 'Z'] - then name ++ "." ++ fromJust name' - else getType t s name ++ "." ++ fromJust name' - -- u is the SRTable - (method, nArgs) = - if fst (u Map.! name'') == "method" - then if name' == Nothing - then (vPush "pointer" 0, length args + 1) - else let (seg, n) = getSegN t s name in (vPush seg n, length args + 1) - else ("", length args) - -vNew n = vPush "constant" n ++ vCall "Memory.alloc" 1 ++ vPop "pointer" 0 -vAdd = "add\n" -vNot = "not\n" -vNeg = "neg\n" -vSub = "sub\n" -vMul = "call Math.multiply 2\n" -vDiv = "call Math.divide 2\n" -vAnd = "and\n" -vOr = "or\n" -vLt = "lt\n" -vGt = "gt\n" -vEq = "eq\n" -vReturn = "return\n" -vLabel xs = "label " ++ xs ++ "\n" -vGoto xs = "goto " ++ xs ++ "\n" -vIfGoto xs = "if-goto " ++ xs ++ "\n" -vFunction xs n = "function " ++ xs ++ " " ++ show n ++ "\n" -vCall xs n = "call " ++ xs ++ " " ++ show n ++ "\n" -vPush xs n = "push " ++ xs ++ " " ++ show n ++ "\n" -vPop xs n = "pop " ++ xs ++ " " ++ show n ++ "\n" - - --- IO - --- reader of system subroutines' headers -jClasses :: JackParser [JClass] -jClasses = many (try $ many jSpace >> jClass) - -sysSubroutineTable :: IO Table -sysSubroutineTable = do - x <- readFile "./systemsub.txt" - return $ buildSRTable $ head $ rights [parse' jClasses x] - -main = do - dir <- head <$> getArgs - filesWODir <- filter isJackFile <$> listDirectory dir - let jackFiles = (dir++) <$> filesWODir - codes <- sequence $ readFile <$> jackFiles - initTable <- sysSubroutineTable - zipWithM writeFile (chExt <$> jackFiles) (jackCompiler initTable codes) - where isJackFile xs = drop (length xs - 5) xs == ".jack" - chExt xs = take (length xs - 4) xs ++ "vm" - --} - - ---testing - -testCompiler :: [[Char]] -> IO () -testCompiler xs = do - initTable <- sysSubroutineTable - print $ jackCompiler initTable xs - -testCompiler' :: IO () -testCompiler' = do - --xs <- readFile "./Square/Square.jack" - xs <- readFile "./Pong/Ball.jack" - testCompiler [xs] - -testReader :: IO () -testReader = do - --xs <- readFile "./Square/Square.jack" - xs <- readFile "./Pong/Ball.jack" - --print $ buildSRTable $ rights $ [jackReader $ xs] - print $ jackReader $ xs - - ---test reader writer x = let Right y = parse' reader x in writer y ---test' x = let Right y = parse' jStatement x in vStatement Map.empty Map.empty Map.empty "" 0 [y] - - diff --git a/projects/11/JackCompiler.o b/projects/11/JackCompiler.o deleted file mode 100644 index 49a6ac5..0000000 Binary files a/projects/11/JackCompiler.o and /dev/null differ diff --git a/projects/11/K/Board.jack b/projects/11/K/Board.jack deleted file mode 100644 index 49d42d5..0000000 --- a/projects/11/K/Board.jack +++ /dev/null @@ -1,305 +0,0 @@ -class Board { - field Array grid; - field int nTurn; - field int seed; - - constructor Board new() { - var int i, j; - var Array t; - let grid = Array.new(4); - let i = 0; - while (i < 4) { - let j = 0; - let grid[i] = Array.new(4); - let t = grid[i]; - while (j < 4) { - let t[j] = 32; - let j = j + 1; - } - let i = i + 1; - } - let t = grid[0]; - let t[0] = 65; - let nTurn = 0; - let seed = 0; - return this; - } - - method void arrange(Array xs, boolean isHorizontal) { - if (isHorizontal) { - do deepcopy(xs, grid); - } else { - do transpose(xs, grid); - } - do dispose4(xs); - return; - } - - - method void copy(Array xs, Array ys) { - var int i; - let i = 0; - while (i < 4) { - let ys[i] = xs[i]; - let i = i + 1; - } - return; - } - - method void deepcopy(Array xs, Array ys) { - var int i; - let i = 0; - while (i < 4) { - do copy(xs[i], ys[i]); - let i = i + 1; - } - return; - } - - method void transpose(Array xs, Array ys) { - var int i, j; - var Array t, s; - let i = 0; - while (i < 4) { - let j = 0; - let t = ys[i]; - while (j < 4) { - let s = xs[j]; - let t[j] = s[i]; - let j = j + 1; - } - let i = i + 1; - } - return; - } - - method void dispose4(Array xs){ - var int i; - var Array t; - let i = 0; - while (i < 4) { - let t = xs[i]; - do t.dispose(); - let i = i + 1; - } - do xs.dispose(); - return; - } - - method Array new4(){ - var Array xs; - var int i; - let xs = Array.new(4); - let i = 0; - while (i < 4) { - let xs[i] = Array.new(4); - let i = i + 1; - } - return xs; - } - - method Array getStrips(boolean isHorizontal){ - var Array xs; - let xs = new4(); - if (isHorizontal) { - do deepcopy(grid, xs); - } else { - do transpose(grid, xs); - } - return xs; - } - - method Array align(Array xs, boolean left){ - var int i, j; - let i = 0; - let j = 0; - if (left) { - while (i < 4) { - if (xs[i] > 64) { - let xs[j] = xs[i]; - let j = j + 1; - } - let i = i + 1; - } - while (j < 4) { - let xs[j] = 32; - let j = j + 1; - } - } else { - while (i < 4) { - if (xs[3 - i] > 64) { - let xs[3 - j] = xs[3 - i]; - let j = j + 1; - } - let i = i + 1; - } - while (j < 4) { - let xs[3 - j] = 32; - let j = j + 1; - } - } - return xs; - } - - method Array reduce(Array xs, boolean left){ - if ((xs[0] = xs[1]) & (xs[2] = xs[3]) & (xs[0] > 64) & (xs[2] > 64)) { - if (left) { - let xs[0] = xs[0] + 1; - let xs[1] = xs[2] + 1; - let xs[2] = 32; - let xs[3] = 32; - } else { - let xs[3] = xs[3] + 1; - let xs[2] = xs[1] + 1; - let xs[1] = 32; - let xs[0] = 32; - } - return xs; - } - if ((xs[0] = xs[1]) & (xs[0] > 64)) { - if (left) { - let xs[0] = xs[0] + 1; - let xs[1] = xs[2]; - let xs[2] = xs[3]; - let xs[3] = 32; - } else { - let xs[1] = xs[1] + 1; - let xs[0] = 32; - } - return xs; - } - if ((xs[2] = xs[3]) & (xs[2] > 64)) { - if (left) { - let xs[2] = xs[2] + 1; - let xs[3] = 32; - } else { - let xs[3] = xs[3] + 1; - let xs[2] = xs[1]; - let xs[1] = xs[0]; - let xs[0] = 32; - } - return xs; - } - if ((xs[1] = xs[2]) & (xs[1] > 64)) { - if (left) { - let xs[1] = xs[1] + 1; - let xs[2] = xs[3]; - let xs[3] = 32; - } else { - let xs[2] = xs[2] + 1; - let xs[1] = xs[0]; - let xs[0] = 32; - } - return xs; - } - return xs; - } - - method void addTile(){ - var Array t; - var int r, c, parity, newTile; - /* - let t = grid[1]; - if (t[1] = 32) { - let t[1] = 65; - } - */ - let seed = seed * 25173 + 13849; - if (seed < 0) { - let seed = - seed; - } - - if (seed - (seed / 2 * 2) = 0) { - let parity = 1; - } else { - let parity = -1; - } - - let seed = seed - (seed / 16 * 16); - let r = seed / 4; - let c = seed - (4 * r); - let t = grid[r]; - let newTile = 65; - - while (t[c] > 64){ - let seed = seed + parity; - if (seed < 0) { - let seed = 15; - } - let seed = seed - (seed / 16 * 16); - let r = seed / 4; - let c = seed - (4 * r); - let t = grid[r]; - let newTile = 131 - newTile; - } - let t[c] = newTile; - return; - } - - method void transform(char dir){ - var boolean isHorizontal, left; - var Array xs; - var int i; - if ((dir = 0) | (dir = 1)) { - let left = true; - } else { - let left = false; - } - if ((dir = 0) | (dir = 2)) { - let isHorizontal = true; - } else { - let isHorizontal = false; - } - let xs = getStrips(isHorizontal); - let i = 0; - while (i < 4) { - let xs[i] = reduce(align(xs[i], left), left); - let i = i + 1; - } - do arrange(xs, isHorizontal); - return; - } - - method void next(char dir){ - let nTurn = nTurn + 1; - do transform(dir); - do addTile(); - return; - } - - method void draw(){ - var int r, c, i, j; - var Array t; - let r = 9; - let c = 30; - - do Output.moveCursor(r - 1, c - 1); - do Output.printString("+----+"); - do Output.moveCursor(r + 4, c - 1); - do Output.printString("+----+"); - - let i = 0; - while (i < 4) { - let j = 0; - do Output.moveCursor(r + i, c - 1); - do Output.printString("|"); - let t = grid[i]; - while (j < 4) { - do Output.printChar(t[j]); - let j = j + 1; - } - do Output.printString("|"); - let i = i + 1; - } - - do Output.moveCursor(r + 6, c - 2); - do Output.printString("Turn: "); - do Output.printInt(nTurn); - return; - } - - method void dispose() { - do Memory.deAlloc(this); - return; - } -} diff --git a/projects/11/K/Board.vm b/projects/11/K/Board.vm deleted file mode 100644 index 272b52d..0000000 --- a/projects/11/K/Board.vm +++ /dev/null @@ -1,1183 +0,0 @@ -function Board.new 3 -push constant 3 -call Memory.alloc 1 -pop pointer 0 -push constant 4 -call Array.new 1 -pop this 0 -push constant 0 -pop local 0 -label new.While0 -push local 0 -push constant 4 -lt -not -if-goto new.EndWhile0 -push constant 0 -pop local 1 -push constant 4 -call Array.new 1 -push this 0 -push local 0 -add -pop pointer 1 -pop that 0 -push this 0 -push local 0 -add -pop pointer 1 -push that 0 -pop local 2 -label new.While0.While0 -push local 1 -push constant 4 -lt -not -if-goto new.While0.EndWhile0 -push constant 32 -push local 2 -push local 1 -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto new.While0.While0 -label new.While0.EndWhile0 -push local 0 -push constant 1 -add -pop local 0 -goto new.While0 -label new.EndWhile0 -push this 0 -push constant 0 -add -pop pointer 1 -push that 0 -pop local 2 -push constant 65 -push local 2 -push constant 0 -add -pop pointer 1 -pop that 0 -push constant 0 -pop this 1 -push constant 0 -pop this 2 -push pointer 0 -return -function Board.arrange 0 -push argument 0 -pop pointer 0 -push argument 2 -not -if-goto arrange.Else0 -push pointer 0 -push argument 1 -push this 0 -call Board.deepcopy 3 -pop temp 0 -goto arrange.Endif0 -label arrange.Else0 -push pointer 0 -push argument 1 -push this 0 -call Board.transpose 3 -pop temp 0 -label arrange.Endif0 -push pointer 0 -push argument 1 -call Board.dispose4 2 -pop temp 0 -push constant 0 -return -function Board.copy 1 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label copy.While0 -push local 0 -push constant 4 -lt -not -if-goto copy.EndWhile0 -push argument 1 -push local 0 -add -pop pointer 1 -push that 0 -push argument 2 -push local 0 -add -pop pointer 1 -pop that 0 -push local 0 -push constant 1 -add -pop local 0 -goto copy.While0 -label copy.EndWhile0 -push constant 0 -return -function Board.deepcopy 1 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label deepcopy.While0 -push local 0 -push constant 4 -lt -not -if-goto deepcopy.EndWhile0 -push pointer 0 -push argument 1 -push local 0 -add -pop pointer 1 -push that 0 -push argument 2 -push local 0 -add -pop pointer 1 -push that 0 -call Board.copy 3 -pop temp 0 -push local 0 -push constant 1 -add -pop local 0 -goto deepcopy.While0 -label deepcopy.EndWhile0 -push constant 0 -return -function Board.transpose 4 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label transpose.While0 -push local 0 -push constant 4 -lt -not -if-goto transpose.EndWhile0 -push constant 0 -pop local 1 -push argument 2 -push local 0 -add -pop pointer 1 -push that 0 -pop local 2 -label transpose.While0.While0 -push local 1 -push constant 4 -lt -not -if-goto transpose.While0.EndWhile0 -push argument 1 -push local 1 -add -pop pointer 1 -push that 0 -pop local 3 -push local 3 -push local 0 -add -pop pointer 1 -push that 0 -push local 2 -push local 1 -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto transpose.While0.While0 -label transpose.While0.EndWhile0 -push local 0 -push constant 1 -add -pop local 0 -goto transpose.While0 -label transpose.EndWhile0 -push constant 0 -return -function Board.dispose4 2 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -label dispose4.While0 -push local 0 -push constant 4 -lt -not -if-goto dispose4.EndWhile0 -push argument 1 -push local 0 -add -pop pointer 1 -push that 0 -pop local 1 -push local 1 -call Array.dispose 1 -pop temp 0 -push local 0 -push constant 1 -add -pop local 0 -goto dispose4.While0 -label dispose4.EndWhile0 -push argument 1 -call Array.dispose 1 -pop temp 0 -push constant 0 -return -function Board.new4 2 -push argument 0 -pop pointer 0 -push constant 4 -call Array.new 1 -pop local 0 -push constant 0 -pop local 1 -label new4.While0 -push local 1 -push constant 4 -lt -not -if-goto new4.EndWhile0 -push constant 4 -call Array.new 1 -push local 0 -push local 1 -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto new4.While0 -label new4.EndWhile0 -push local 0 -return -function Board.getStrips 1 -push argument 0 -pop pointer 0 -push pointer 0 -call Board.new4 1 -pop local 0 -push argument 1 -not -if-goto getStrips.Else0 -push pointer 0 -push this 0 -push local 0 -call Board.deepcopy 3 -pop temp 0 -goto getStrips.Endif0 -label getStrips.Else0 -push pointer 0 -push this 0 -push local 0 -call Board.transpose 3 -pop temp 0 -label getStrips.Endif0 -push local 0 -return -function Board.align 2 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -push constant 0 -pop local 1 -push argument 2 -not -if-goto align.Else0 -label align.Else0.While0 -push local 0 -push constant 4 -lt -not -if-goto align.Else0.EndWhile0 -push argument 1 -push local 0 -add -pop pointer 1 -push that 0 -push constant 64 -gt -not -if-goto align.Else0.While0.Else0 -push argument 1 -push local 0 -add -pop pointer 1 -push that 0 -push argument 1 -push local 1 -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -label align.Else0.While0.Else0 -push local 0 -push constant 1 -add -pop local 0 -goto align.Else0.While0 -label align.Else0.EndWhile0 -label align.Else0.While1 -push local 1 -push constant 4 -lt -not -if-goto align.Else0.EndWhile1 -push constant 32 -push argument 1 -push local 1 -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto align.Else0.While1 -label align.Else0.EndWhile1 -goto align.Endif0 -label align.Else0 -label align.If0.While0 -push local 0 -push constant 4 -lt -not -if-goto align.If0.EndWhile0 -push argument 1 -push constant 3 -push local 0 -sub -add -pop pointer 1 -push that 0 -push constant 64 -gt -not -if-goto align.If0.While0.Else0 -push argument 1 -push constant 3 -push local 0 -sub -add -pop pointer 1 -push that 0 -push argument 1 -push constant 3 -push local 1 -sub -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -label align.If0.While0.Else0 -push local 0 -push constant 1 -add -pop local 0 -goto align.If0.While0 -label align.If0.EndWhile0 -label align.If0.While1 -push local 1 -push constant 4 -lt -not -if-goto align.If0.EndWhile1 -push constant 32 -push argument 1 -push constant 3 -push local 1 -sub -add -pop pointer 1 -pop that 0 -push local 1 -push constant 1 -add -pop local 1 -goto align.If0.While1 -label align.If0.EndWhile1 -label align.Endif0 -push argument 1 -return -function Board.reduce 0 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -eq -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -eq -and -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -not -if-goto reduce.Else0 -push argument 2 -not -if-goto reduce.Else0.Else0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -goto reduce.Else0.Endif0 -label reduce.Else0.Else0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -label reduce.Else0.Endif0 -push argument 1 -return -label reduce.Else0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -eq -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -not -if-goto reduce.Else1 -push argument 2 -not -if-goto reduce.Else1.Else0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -goto reduce.Else1.Endif0 -label reduce.Else1.Else0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -label reduce.Else1.Endif0 -push argument 1 -return -label reduce.Else1 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -eq -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -not -if-goto reduce.Else2 -push argument 2 -not -if-goto reduce.Else2.Else0 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -goto reduce.Else2.Endif0 -label reduce.Else2.Else0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -label reduce.Else2.Endif0 -push argument 1 -return -label reduce.Else2 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -eq -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push constant 64 -gt -and -not -if-goto reduce.Else3 -push argument 2 -not -if-goto reduce.Else3.Else0 -push argument 1 -push constant 1 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 3 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 3 -add -pop pointer 1 -pop that 0 -goto reduce.Else3.Endif0 -label reduce.Else3.Else0 -push argument 1 -push constant 2 -add -pop pointer 1 -push that 0 -push constant 1 -add -push argument 1 -push constant 2 -add -pop pointer 1 -pop that 0 -push argument 1 -push constant 0 -add -pop pointer 1 -push that 0 -push argument 1 -push constant 1 -add -pop pointer 1 -pop that 0 -push constant 32 -push argument 1 -push constant 0 -add -pop pointer 1 -pop that 0 -label reduce.Else3.Endif0 -push argument 1 -return -label reduce.Else3 -push argument 1 -return -function Board.addTile 5 -push argument 0 -pop pointer 0 -push this 2 -push constant 25173 -call Math.multiply 2 -push constant 13849 -add -pop this 2 -push this 2 -push constant 0 -lt -not -if-goto addTile.Else0 -push this 2 -neg -pop this 2 -label addTile.Else0 -push this 2 -push this 2 -push constant 2 -call Math.divide 2 -push constant 2 -call Math.multiply 2 -sub -push constant 0 -eq -not -if-goto addTile.Else1 -push constant 1 -pop local 3 -goto addTile.Endif1 -label addTile.Else1 -push constant 1 -neg -pop local 3 -label addTile.Endif1 -push this 2 -push this 2 -push constant 16 -call Math.divide 2 -push constant 16 -call Math.multiply 2 -sub -pop this 2 -push this 2 -push constant 4 -call Math.divide 2 -pop local 1 -push this 2 -push constant 4 -push local 1 -call Math.multiply 2 -sub -pop local 2 -push this 0 -push local 1 -add -pop pointer 1 -push that 0 -pop local 0 -push constant 65 -pop local 4 -label addTile.While2 -push local 0 -push local 2 -add -pop pointer 1 -push that 0 -push constant 64 -gt -not -if-goto addTile.EndWhile2 -push this 2 -push local 3 -add -pop this 2 -push this 2 -push constant 0 -lt -not -if-goto addTile.While2.Else0 -push constant 15 -pop this 2 -label addTile.While2.Else0 -push this 2 -push this 2 -push constant 16 -call Math.divide 2 -push constant 16 -call Math.multiply 2 -sub -pop this 2 -push this 2 -push constant 4 -call Math.divide 2 -pop local 1 -push this 2 -push constant 4 -push local 1 -call Math.multiply 2 -sub -pop local 2 -push this 0 -push local 1 -add -pop pointer 1 -push that 0 -pop local 0 -push constant 131 -push local 4 -sub -pop local 4 -goto addTile.While2 -label addTile.EndWhile2 -push local 4 -push local 0 -push local 2 -add -pop pointer 1 -pop that 0 -push constant 0 -return -function Board.transform 4 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -eq -push argument 1 -push constant 1 -eq -or -not -if-goto transform.Else0 -push constant 1 -neg -pop local 1 -goto transform.Endif0 -label transform.Else0 -push constant 0 -pop local 1 -label transform.Endif0 -push argument 1 -push constant 0 -eq -push argument 1 -push constant 2 -eq -or -not -if-goto transform.Else1 -push constant 1 -neg -pop local 0 -goto transform.Endif1 -label transform.Else1 -push constant 0 -pop local 0 -label transform.Endif1 -push pointer 0 -push local 0 -call Board.getStrips 2 -pop local 2 -push constant 0 -pop local 3 -label transform.While2 -push local 3 -push constant 4 -lt -not -if-goto transform.EndWhile2 -push pointer 0 -push pointer 0 -push local 2 -push local 3 -add -pop pointer 1 -push that 0 -push local 1 -call Board.align 3 -push local 1 -call Board.reduce 3 -push local 2 -push local 3 -add -pop pointer 1 -pop that 0 -push local 3 -push constant 1 -add -pop local 3 -goto transform.While2 -label transform.EndWhile2 -push pointer 0 -push local 2 -push local 0 -call Board.arrange 3 -pop temp 0 -push constant 0 -return -function Board.next 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -add -pop this 1 -push pointer 0 -push argument 1 -call Board.transform 2 -pop temp 0 -push pointer 0 -call Board.addTile 1 -pop temp 0 -push constant 0 -return -function Board.draw 5 -push argument 0 -pop pointer 0 -push constant 9 -pop local 0 -push constant 30 -pop local 1 -push local 0 -push constant 1 -sub -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 6 -call String.new 1 -push constant 43 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 43 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 4 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 6 -call String.new 1 -push constant 43 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 43 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -pop local 2 -label draw.While0 -push local 2 -push constant 4 -lt -not -if-goto draw.EndWhile0 -push constant 0 -pop local 3 -push local 0 -push local 2 -add -push local 1 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 1 -call String.new 1 -push constant 124 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push this 0 -push local 2 -add -pop pointer 1 -push that 0 -pop local 4 -label draw.While0.While0 -push local 3 -push constant 4 -lt -not -if-goto draw.While0.EndWhile0 -push local 4 -push local 3 -add -pop pointer 1 -push that 0 -call Output.printChar 1 -pop temp 0 -push local 3 -push constant 1 -add -pop local 3 -goto draw.While0.While0 -label draw.While0.EndWhile0 -push constant 1 -call String.new 1 -push constant 124 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 2 -push constant 1 -add -pop local 2 -goto draw.While0 -label draw.EndWhile0 -push local 0 -push constant 6 -add -push local 1 -push constant 2 -sub -call Output.moveCursor 2 -pop temp 0 -push constant 6 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push this 1 -call Output.printInt 1 -pop temp 0 -push constant 0 -return -function Board.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/K/K.txt b/projects/11/K/K.txt deleted file mode 100644 index dc75c82..0000000 --- a/projects/11/K/K.txt +++ /dev/null @@ -1,25 +0,0 @@ -from a to k - -- a title frame showing game name and instructions. space to continue. -- a main frame showing the game running -- a endofgame frame showing game results: win or lose - -- a Board class with cell being a 4 by 4 two-d array. -- arrange strings according to an orientation: arrange(4 strings, dir)=cells - - dir: 0: align to left, 1: align to right, 2: align to top, 3:align to bottom - - e.g.: arrange({"abc", "bc", "dc", "efeh", 0}) gives the following board: - abc_ - bc__ - dc__ - efeh - - arrange({"abc", "bc", "dc", "efeh", 0}, 3) gives the following - ___e - a__f - bbde - ccch -- a new tile of 'a' or 'b' appears each turn somewhere, using some quasirandomisation e.g. (23 * n^2 + 79) mod 16. - - addtile(char, x, y) -- the board transformation: board.trans(dir) = arrange(dir) . (fmap reduce) . getstring(dir). calls getstrings, then reduce on each row / column -- board.getstrings(dir)= the strings according to direction dir. Inverse of arrange. -- reduce(string)=string: reduce("baac")=="bbc"; reduce("aabb")=="bc"; and reduce("cbb")== "cc" instead of "d". -- when one of the hjkl keys is pressed get the direction dir. diff --git a/projects/11/K/KGame.jack b/projects/11/K/KGame.jack deleted file mode 100644 index 796f5b5..0000000 --- a/projects/11/K/KGame.jack +++ /dev/null @@ -1,34 +0,0 @@ -class KGame{ - field Board board; - - constructor KGame new() { - let board = Board.new(); - do board.draw(); - return this; - } - - method void dispose() { - do board.dispose(); - do Memory.deAlloc(this); - return; - } - - method void run() { - var int key, dir; - var boolean exit; - let key = 0; - let exit = false; - while (~exit) { - while ((key < 130) | (key > 133)) { - let key = Keyboard.keyPressed(); - } - let dir = key - 130; - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - } - do board.next(dir); - do board.draw(); - } - return; - } -} diff --git a/projects/11/K/KGame.vm b/projects/11/K/KGame.vm deleted file mode 100644 index eef2df0..0000000 --- a/projects/11/K/KGame.vm +++ /dev/null @@ -1,74 +0,0 @@ -function KGame.new 0 -push constant 1 -call Memory.alloc 1 -pop pointer 0 -call Board.new 0 -pop this 0 -push this 0 -call Board.draw 1 -pop temp 0 -push pointer 0 -return -function KGame.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -call Board.dispose 1 -pop temp 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function KGame.run 3 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -push constant 0 -pop local 2 -label run.While0 -push local 2 -not -not -if-goto run.EndWhile0 -label run.While0.While0 -push local 0 -push constant 130 -lt -push local 0 -push constant 133 -gt -or -not -if-goto run.While0.EndWhile0 -call Keyboard.keyPressed 0 -pop local 0 -goto run.While0.While0 -label run.While0.EndWhile0 -push local 0 -push constant 130 -sub -pop local 1 -label run.While0.While1 -push local 0 -push constant 0 -eq -not -not -if-goto run.While0.EndWhile1 -call Keyboard.keyPressed 0 -pop local 0 -goto run.While0.While1 -label run.While0.EndWhile1 -push this 0 -push local 1 -call Board.next 2 -pop temp 0 -push this 0 -call Board.draw 1 -pop temp 0 -goto run.While0 -label run.EndWhile0 -push constant 0 -return diff --git a/projects/11/K/Main.jack b/projects/11/K/Main.jack deleted file mode 100644 index 4136e80..0000000 --- a/projects/11/K/Main.jack +++ /dev/null @@ -1,9 +0,0 @@ -class Main { - function void main() { - var KGame game; - let game = KGame.new(); - do game.run(); - do game.dispose(); - return; - } -} diff --git a/projects/11/K/Main.vm b/projects/11/K/Main.vm deleted file mode 100644 index 0a56ae9..0000000 --- a/projects/11/K/Main.vm +++ /dev/null @@ -1,11 +0,0 @@ -function Main.main 1 -call KGame.new 0 -pop local 0 -push local 0 -call KGame.run 1 -pop temp 0 -push local 0 -call KGame.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/Pong/Ball.jack b/projects/11/Pong/Ball.jack deleted file mode 100644 index 02e47f9..0000000 --- a/projects/11/Pong/Ball.jack +++ /dev/null @@ -1,203 +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/11/Pong/Ball.jack - -/** - * A graphical ball. Characterized by a screen location and distance of - * last destination. Has methods for drawing, erasing and moving on the screen. - * The ball is displayed as a filled, 6-by-6 pixles rectangle. - */ -class Ball { - - field int x, y; // the ball's screen location (in pixels) - field int lengthx, lengthy; // distance of last destination (in pixels) - - field int d, straightD, diagonalD; // used for straight line movement computation - field boolean invert, positivex, positivey; // (same) - - field int leftWall, rightWall, topWall, bottomWall; // wall locations - - field int wall; // last wall that the ball was bounced off of - - /** Constructs a new ball with the given initial location and wall locations. */ - constructor Ball new(int Ax, int Ay, - int AleftWall, int ArightWall, int AtopWall, int AbottomWall) { - let x = Ax; - let y = Ay; - let leftWall = AleftWall; - let rightWall = ArightWall - 6; // -6 for ball size - let topWall = AtopWall; - let bottomWall = AbottomWall - 6; // -6 for ball size - let wall = 0; - do show(); - return this; - } - - /** Deallocates the Ball's memory. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } - - /** Shows the ball. */ - method void show() { - do Screen.setColor(true); - do draw(); - return; - } - - /** Hides the ball. */ - method void hide() { - do Screen.setColor(false); - do draw(); - return; - } - - /** Draws the ball. */ - method void draw() { - do Screen.drawRectangle(x, y, x + 5, y + 5); - return; - } - - /** Returns the ball's left edge. */ - method int getLeft() { - return x; - } - - /** Returns the ball's right edge. */ - method int getRight() { - return x + 5; - } - - /** Computes and sets the ball's destination. */ - method void setDestination(int destx, int desty) { - var int dx, dy, temp; - let lengthx = destx - x; - let lengthy = desty - y; - let dx = Math.abs(lengthx); - let dy = Math.abs(lengthy); - let invert = (dx < dy); - - if (invert) { - let temp = dx; // swap dx, dy - let dx = dy; - let dy = temp; - let positivex = (y < desty); - let positivey = (x < destx); - } - else { - let positivex = (x < destx); - let positivey = (y < desty); - } - - let d = (2 * dy) - dx; - let straightD = 2 * dy; - let diagonalD = 2 * (dy - dx); - - return; - } - - /** - * Moves the ball one unit towards its destination. - * If the ball has reached a wall, returns 0. - * Else, returns a value according to the wall: - * 1 (left wall), 2 (right wall), 3 (top wall), 4 (bottom wall). - */ - method int move() { - - do hide(); - - if (d < 0) { let d = d + straightD; } - else { - let d = d + diagonalD; - - if (positivey) { - if (invert) { let x = x + 4; } - else { let y = y + 4; } - } - else { - if (invert) { let x = x - 4; } - else { let y = y - 4; } - } - } - - if (positivex) { - if (invert) { let y = y + 4; } - else { let x = x + 4; } - } - else { - if (invert) { let y = y - 4; } - else { let x = x - 4; } - } - - if (~(x > leftWall)) { - let wall = 1; - let x = leftWall; - } - if (~(x < rightWall)) { - let wall = 2; - let x = rightWall; - } - if (~(y > topWall)) { - let wall = 3; - let y = topWall; - } - if (~(y < bottomWall)) { - let wall = 4; - let y = bottomWall; - } - - do show(); - - return wall; - } - - /** - * Bounces off the current wall: sets the new destination - * of the ball according to the ball's angle and the given - * bouncing direction (-1/0/1=left/center/right or up/center/down). - */ - method void bounce(int bouncingDirection) { - var int newx, newy, divLengthx, divLengthy, factor; - - // dividing by 10 first since results are too big - let divLengthx = lengthx / 10; - let divLengthy = lengthy / 10; - if (bouncingDirection = 0) { let factor = 10; } - else { - if (((~(lengthx < 0)) & (bouncingDirection = 1)) | ((lengthx < 0) & (bouncingDirection = (-1)))) { - let factor = 20; // bounce direction is in ball direction - } - else { let factor = 5; } // bounce direction is against ball direction - } - - if (wall = 1) { - let newx = 506; - let newy = (divLengthy * (-50)) / divLengthx; - let newy = y + (newy * factor); - } - else { - if (wall = 2) { - let newx = 0; - let newy = (divLengthy * 50) / divLengthx; - let newy = y + (newy * factor); - } - else { - if (wall = 3) { - let newy = 250; - let newx = (divLengthx * (-25)) / divLengthy; - let newx = x + (newx * factor); - } - else { // assumes wall = 4 - let newy = 0; - let newx = (divLengthx * 25) / divLengthy; - let newx = x + (newx * factor); - } - } - } - - do setDestination(newx, newy); - return; - } -} diff --git a/projects/11/Pong/Ball.vm b/projects/11/Pong/Ball.vm deleted file mode 100644 index 9d7b984..0000000 --- a/projects/11/Pong/Ball.vm +++ /dev/null @@ -1,427 +0,0 @@ -function Ball.new 0 -push constant 15 -call Memory.alloc 1 -pop pointer 0 -push argument 0 -pop this 0 -push argument 1 -pop this 1 -push argument 2 -pop this 10 -push argument 3 -push constant 6 -sub -pop this 11 -push argument 4 -pop this 12 -push argument 5 -push constant 6 -sub -pop this 13 -push constant 0 -pop this 14 -push pointer 0 -call Ball.show 1 -pop temp 0 -push pointer 0 -return -function Ball.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function Ball.show 0 -push argument 0 -pop pointer 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push pointer 0 -call Ball.draw 1 -pop temp 0 -push constant 0 -return -function Ball.hide 0 -push argument 0 -pop pointer 0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push pointer 0 -call Ball.draw 1 -pop temp 0 -push constant 0 -return -function Ball.draw 0 -push argument 0 -pop pointer 0 -push this 0 -push this 1 -push this 0 -push constant 5 -add -push this 1 -push constant 5 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Ball.getLeft 0 -push argument 0 -pop pointer 0 -push this 0 -return -function Ball.getRight 0 -push argument 0 -pop pointer 0 -push this 0 -push constant 5 -add -return -function Ball.setDestination 3 -push argument 0 -pop pointer 0 -push argument 1 -push this 0 -sub -pop this 2 -push argument 2 -push this 1 -sub -pop this 3 -push this 2 -call Math.abs 1 -pop local 0 -push this 3 -call Math.abs 1 -pop local 1 -push local 0 -push local 1 -lt -pop this 7 -push this 7 -not -if-goto setDestination.Else0 -push local 0 -pop local 2 -push local 1 -pop local 0 -push local 2 -pop local 1 -push this 1 -push argument 2 -lt -pop this 8 -push this 0 -push argument 1 -lt -pop this 9 -goto setDestination.Endif0 -label setDestination.Else0 -push this 0 -push argument 1 -lt -pop this 8 -push this 1 -push argument 2 -lt -pop this 9 -label setDestination.Endif0 -push constant 2 -push local 1 -call Math.multiply 2 -push local 0 -sub -pop this 4 -push constant 2 -push local 1 -call Math.multiply 2 -pop this 5 -push constant 2 -push local 1 -push local 0 -sub -call Math.multiply 2 -pop this 6 -push constant 0 -return -function Ball.move 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Ball.hide 1 -pop temp 0 -push this 4 -push constant 0 -lt -not -if-goto move.Else0 -push this 4 -push this 5 -add -pop this 4 -goto move.Endif0 -label move.Else0 -push this 4 -push this 6 -add -pop this 4 -push this 9 -not -if-goto move.If0.Else0 -push this 7 -not -if-goto move.If0.Else0.Else0 -push this 0 -push constant 4 -add -pop this 0 -goto move.If0.Else0.Endif0 -label move.If0.Else0.Else0 -push this 1 -push constant 4 -add -pop this 1 -label move.If0.Else0.Endif0 -goto move.If0.Endif0 -label move.If0.Else0 -push this 7 -not -if-goto move.If0.If0.Else0 -push this 0 -push constant 4 -sub -pop this 0 -goto move.If0.If0.Endif0 -label move.If0.If0.Else0 -push this 1 -push constant 4 -sub -pop this 1 -label move.If0.If0.Endif0 -label move.If0.Endif0 -label move.Endif0 -push this 8 -not -if-goto move.Else1 -push this 7 -not -if-goto move.Else1.Else0 -push this 1 -push constant 4 -add -pop this 1 -goto move.Else1.Endif0 -label move.Else1.Else0 -push this 0 -push constant 4 -add -pop this 0 -label move.Else1.Endif0 -goto move.Endif1 -label move.Else1 -push this 7 -not -if-goto move.If1.Else0 -push this 1 -push constant 4 -sub -pop this 1 -goto move.If1.Endif0 -label move.If1.Else0 -push this 0 -push constant 4 -sub -pop this 0 -label move.If1.Endif0 -label move.Endif1 -push this 0 -push this 10 -gt -not -not -if-goto move.Else2 -push constant 1 -pop this 14 -push this 10 -pop this 0 -label move.Else2 -push this 0 -push this 11 -lt -not -not -if-goto move.Else3 -push constant 2 -pop this 14 -push this 11 -pop this 0 -label move.Else3 -push this 1 -push this 12 -gt -not -not -if-goto move.Else4 -push constant 3 -pop this 14 -push this 12 -pop this 1 -label move.Else4 -push this 1 -push this 13 -lt -not -not -if-goto move.Else5 -push constant 4 -pop this 14 -push this 13 -pop this 1 -label move.Else5 -push pointer 0 -call Ball.show 1 -pop temp 0 -push this 14 -return -function Ball.bounce 5 -push argument 0 -pop pointer 0 -push this 2 -push constant 10 -call Math.divide 2 -pop local 2 -push this 3 -push constant 10 -call Math.divide 2 -pop local 3 -push argument 1 -push constant 0 -eq -not -if-goto bounce.Else0 -push constant 10 -pop local 4 -goto bounce.Endif0 -label bounce.Else0 -push this 2 -push constant 0 -lt -not -push argument 1 -push constant 1 -eq -and -push this 2 -push constant 0 -lt -push argument 1 -push constant 1 -neg -eq -and -or -not -if-goto bounce.If0.Else0 -push constant 20 -pop local 4 -goto bounce.If0.Endif0 -label bounce.If0.Else0 -push constant 5 -pop local 4 -label bounce.If0.Endif0 -label bounce.Endif0 -push this 14 -push constant 1 -eq -not -if-goto bounce.Else1 -push constant 506 -pop local 0 -push local 3 -push constant 50 -neg -call Math.multiply 2 -push local 2 -call Math.divide 2 -pop local 1 -push this 1 -push local 1 -push local 4 -call Math.multiply 2 -add -pop local 1 -goto bounce.Endif1 -label bounce.Else1 -push this 14 -push constant 2 -eq -not -if-goto bounce.If1.Else0 -push constant 0 -pop local 0 -push local 3 -push constant 50 -call Math.multiply 2 -push local 2 -call Math.divide 2 -pop local 1 -push this 1 -push local 1 -push local 4 -call Math.multiply 2 -add -pop local 1 -goto bounce.If1.Endif0 -label bounce.If1.Else0 -push this 14 -push constant 3 -eq -not -if-goto bounce.If1.If0.Else0 -push constant 250 -pop local 1 -push local 2 -push constant 25 -neg -call Math.multiply 2 -push local 3 -call Math.divide 2 -pop local 0 -push this 0 -push local 0 -push local 4 -call Math.multiply 2 -add -pop local 0 -goto bounce.If1.If0.Endif0 -label bounce.If1.If0.Else0 -push constant 0 -pop local 1 -push local 2 -push constant 25 -call Math.multiply 2 -push local 3 -call Math.divide 2 -pop local 0 -push this 0 -push local 0 -push local 4 -call Math.multiply 2 -add -pop local 0 -label bounce.If1.If0.Endif0 -label bounce.If1.Endif0 -label bounce.Endif1 -push pointer 0 -push local 0 -push local 1 -call Ball.setDestination 3 -pop temp 0 -push constant 0 -return diff --git a/projects/11/Pong/Bat.jack b/projects/11/Pong/Bat.jack deleted file mode 100644 index 340760f..0000000 --- a/projects/11/Pong/Bat.jack +++ /dev/null @@ -1,103 +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/11/Pong/Bat.jack - -/** - * A graphical Pong bat. - * Displayed as a filled horizontal rectangle that has - * a screen location, a width and a height. - * Has methods for drawing, erasing, moving left and right, - * and changing its width (to make the hitting action more challenging). - * This class should have been called "paddle", following the - * standard Pong terminology. But, unaware of this terminology, - * we called it "bat", and then decided to stick to it. - */ -class Bat { - - field int x, y; // the bat's screen location - field int width, height; // the bat's width and height - field int direction; // direction of the bat's movement (1 = left, 2 = right) - - /** Constructs a new bat with the given location and width. */ - constructor Bat new(int Ax, int Ay, int Awidth, int Aheight) { - let x = Ax; - let y = Ay; - let width = Awidth; - let height = Aheight; - let direction = 2; - do show(); - return this; - } - - /** Deallocates the object's memory. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } - - /** Shows the bat. */ - method void show() { - do Screen.setColor(true); - do draw(); - return; - } - - /** Hides the bat. */ - method void hide() { - do Screen.setColor(false); - do draw(); - return; - } - - /** Draws the bat. */ - method void draw() { - do Screen.drawRectangle(x, y, x + width, y + height); - return; - } - - /** Sets the bat's direction (0=stop, 1=left, 2=right). */ - method void setDirection(int Adirection) { - let direction = Adirection; - return; - } - - /** Returns the bat's left edge. */ - method int getLeft() { - return x; - } - - /** Returns the bat's right edge. */ - method int getRight() { - return x + width; - } - - /** Sets the bat's width. */ - method void setWidth(int Awidth) { - do hide(); - let width = Awidth; - do show(); - return; - } - - /** Moves the bat one step in the bat's direction. */ - method void move() { - if (direction = 1) { - let x = x - 4; - if (x < 0) { let x = 0; } - do Screen.setColor(false); - do Screen.drawRectangle((x + width) + 1, y, (x + width) + 4, y + height); - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 3, y + height); - } - else { - let x = x + 4; - if ((x + width) > 511) { let x = 511 - width; } - do Screen.setColor(false); - do Screen.drawRectangle(x - 4, y, x - 1, y + height); - do Screen.setColor(true); - do Screen.drawRectangle((x + width) - 3, y, x + width, y + height); - } - return; - } -} diff --git a/projects/11/Pong/Bat.vm b/projects/11/Pong/Bat.vm deleted file mode 100644 index 77acfe4..0000000 --- a/projects/11/Pong/Bat.vm +++ /dev/null @@ -1,204 +0,0 @@ -function Bat.new 0 -push constant 5 -call Memory.alloc 1 -pop pointer 0 -push argument 0 -pop this 0 -push argument 1 -pop this 1 -push argument 2 -pop this 2 -push argument 3 -pop this 3 -push constant 2 -pop this 4 -push pointer 0 -call Bat.show 1 -pop temp 0 -push pointer 0 -return -function Bat.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function Bat.show 0 -push argument 0 -pop pointer 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push pointer 0 -call Bat.draw 1 -pop temp 0 -push constant 0 -return -function Bat.hide 0 -push argument 0 -pop pointer 0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push pointer 0 -call Bat.draw 1 -pop temp 0 -push constant 0 -return -function Bat.draw 0 -push argument 0 -pop pointer 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 3 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Bat.setDirection 0 -push argument 0 -pop pointer 0 -push argument 1 -pop this 4 -push constant 0 -return -function Bat.getLeft 0 -push argument 0 -pop pointer 0 -push this 0 -return -function Bat.getRight 0 -push argument 0 -pop pointer 0 -push this 0 -push this 2 -add -return -function Bat.setWidth 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Bat.hide 1 -pop temp 0 -push argument 1 -pop this 2 -push pointer 0 -call Bat.show 1 -pop temp 0 -push constant 0 -return -function Bat.move 0 -push argument 0 -pop pointer 0 -push this 4 -push constant 1 -eq -not -if-goto move.Else0 -push this 0 -push constant 4 -sub -pop this 0 -push this 0 -push constant 0 -lt -not -if-goto move.Else0.Else0 -push constant 0 -pop this 0 -label move.Else0.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 1 -add -push this 1 -push this 0 -push this 2 -add -push constant 4 -add -push this 1 -push this 3 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push constant 3 -add -push this 1 -push this 3 -add -call Screen.drawRectangle 4 -pop temp 0 -goto move.Endif0 -label move.Else0 -push this 0 -push constant 4 -add -pop this 0 -push this 0 -push this 2 -add -push constant 511 -gt -not -if-goto move.If0.Else0 -push constant 511 -push this 2 -sub -pop this 0 -label move.If0.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push constant 4 -sub -push this 1 -push this 0 -push constant 1 -sub -push this 1 -push this 3 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 3 -sub -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 3 -add -call Screen.drawRectangle 4 -pop temp 0 -label move.Endif0 -push constant 0 -return diff --git a/projects/11/Pong/Main.jack b/projects/11/Pong/Main.jack deleted file mode 100644 index 45e2dd2..0000000 --- a/projects/11/Pong/Main.jack +++ /dev/null @@ -1,20 +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/11/Pong/Main.jack - -/** - * The main class of the Pong game. - */ -class Main { - - /** Initializes a Pong game and starts running it. */ - function void main() { - var PongGame game; - do PongGame.newInstance(); - let game = PongGame.getInstance(); - do game.run(); - do game.dispose(); - return; - } -} diff --git a/projects/11/Pong/Main.vm b/projects/11/Pong/Main.vm deleted file mode 100644 index 94d76d7..0000000 --- a/projects/11/Pong/Main.vm +++ /dev/null @@ -1,13 +0,0 @@ -function Main.main 1 -call PongGame.newInstance 0 -pop temp 0 -call PongGame.getInstance 0 -pop local 0 -push local 0 -call PongGame.run 1 -pop temp 0 -push local 0 -call PongGame.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/Pong/PongGame.jack b/projects/11/Pong/PongGame.jack deleted file mode 100644 index 7e1ae4c..0000000 --- a/projects/11/Pong/PongGame.jack +++ /dev/null @@ -1,137 +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/11/Pong/PongGame.jack - -/** - * Represents a Pong game. - */ -class PongGame { - - static PongGame instance; // the singelton, a Pong game instance - field Bat bat; // the bat - field Ball ball; // the ball - field int wall; // the current wall that the ball is bouncing off of. - field boolean exit; // true when the game is over - field int score; // the current score. - field int lastWall; // the last wall that the ball bounced off of. - - // The current width of the bat - field int batWidth; - - /** Constructs a new Pong game. */ - constructor PongGame new() { - do Screen.clearScreen(); - let batWidth = 50; // initial bat size - let bat = Bat.new(230, 229, batWidth, 7); - let ball = Ball.new(253, 222, 0, 511, 0, 229); - do ball.setDestination(400,0); - do Screen.drawRectangle(0, 238, 511, 240); - do Output.moveCursor(22,0); - do Output.printString("Score: 0"); - - let exit = false; - let score = 0; - let wall = 0; - let lastWall = 0; - - return this; - } - - /** Deallocates the object's memory. */ - method void dispose() { - do bat.dispose(); - do ball.dispose(); - do Memory.deAlloc(this); - return; - } - - /** Creates an instance of Pong game, and stores it. */ - function void newInstance() { - let instance = PongGame.new(); - return; - } - - /** Returns the single instance of this Pong game. */ - function PongGame getInstance() { - return instance; - } - - /** Starts the game, and andles inputs from the user that control - * the bat's movement direction. */ - method void run() { - var char key; - - while (~exit) { - // waits for a key to be pressed. - while ((key = 0) & (~exit)) { - let key = Keyboard.keyPressed(); - do bat.move(); - do moveBall(); - do Sys.wait(50); - } - - if (key = 130) { do bat.setDirection(1); } - else { - if (key = 132) { do bat.setDirection(2); } - else { - if (key = 140) { let exit = true; } - } - } - - // Waits for the key to be released. - while ((~(key = 0)) & (~exit)) { - let key = Keyboard.keyPressed(); - do bat.move(); - do moveBall(); - do Sys.wait(50); - } - } - - if (exit) { - do Output.moveCursor(10,27); - do Output.printString("Game Over"); - } - - return; - } - - /** - * Handles ball movement, including bouncing. - * If the ball bounces off a wall, finds its new direction. - * If the ball bounces off the bat, increases the score by one - * and shrinks the bat's size, to make the game more challenging. - */ - method void moveBall() { - var int bouncingDirection, batLeft, batRight, ballLeft, ballRight; - - let wall = ball.move(); - - if ((wall > 0) & (~(wall = lastWall))) { - let lastWall = wall; - let bouncingDirection = 0; - let batLeft = bat.getLeft(); - let batRight = bat.getRight(); - let ballLeft = ball.getLeft(); - let ballRight = ball.getRight(); - - if (wall = 4) { - let exit = (batLeft > ballRight) | (batRight < ballLeft); - if (~exit) { - if (ballRight < (batLeft + 10)) { let bouncingDirection = -1; } - else { - if (ballLeft > (batRight - 10)) { let bouncingDirection = 1; } - } - - let batWidth = batWidth - 2; - do bat.setWidth(batWidth); - let score = score + 1; - do Output.moveCursor(22,7); - do Output.printInt(score); - } - } - do ball.bounce(bouncingDirection); - } - return; - } -} \ No newline at end of file diff --git a/projects/11/Pong/PongGame.vm b/projects/11/Pong/PongGame.vm deleted file mode 100644 index 5521919..0000000 --- a/projects/11/Pong/PongGame.vm +++ /dev/null @@ -1,309 +0,0 @@ -function PongGame.new 0 -push constant 7 -call Memory.alloc 1 -pop pointer 0 -call Screen.clearScreen 0 -pop temp 0 -push constant 50 -pop this 6 -push constant 230 -push constant 229 -push this 6 -push constant 7 -call Bat.new 4 -pop this 0 -push constant 253 -push constant 222 -push constant 0 -push constant 511 -push constant 0 -push constant 229 -call Ball.new 6 -pop this 1 -push this 1 -push constant 400 -push constant 0 -call Ball.setDestination 3 -pop temp 0 -push constant 0 -push constant 238 -push constant 511 -push constant 240 -call Screen.drawRectangle 4 -pop temp 0 -push constant 22 -push constant 0 -call Output.moveCursor 2 -pop temp 0 -push constant 8 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 48 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -pop this 3 -push constant 0 -pop this 4 -push constant 0 -pop this 2 -push constant 0 -pop this 5 -push pointer 0 -return -function PongGame.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -call Bat.dispose 1 -pop temp 0 -push this 1 -call Ball.dispose 1 -pop temp 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function PongGame.newInstance 0 -call PongGame.new 0 -pop static 0 -push constant 0 -return -function PongGame.getInstance 0 -push static 0 -return -function PongGame.run 1 -push argument 0 -pop pointer 0 -label run.While0 -push this 3 -not -not -if-goto run.EndWhile0 -label run.While0.While0 -push local 0 -push constant 0 -eq -push this 3 -not -and -not -if-goto run.While0.EndWhile0 -call Keyboard.keyPressed 0 -pop local 0 -push this 0 -call Bat.move 1 -pop temp 0 -push pointer 0 -call PongGame.moveBall 1 -pop temp 0 -push constant 50 -call Sys.wait 1 -pop temp 0 -goto run.While0.While0 -label run.While0.EndWhile0 -push local 0 -push constant 130 -eq -not -if-goto run.While0.Else1 -push this 0 -push constant 1 -call Bat.setDirection 2 -pop temp 0 -goto run.While0.Endif1 -label run.While0.Else1 -push local 0 -push constant 132 -eq -not -if-goto run.While0.If1.Else0 -push this 0 -push constant 2 -call Bat.setDirection 2 -pop temp 0 -goto run.While0.If1.Endif0 -label run.While0.If1.Else0 -push local 0 -push constant 140 -eq -not -if-goto run.While0.If1.If0.Else0 -push constant 1 -neg -pop this 3 -label run.While0.If1.If0.Else0 -label run.While0.If1.Endif0 -label run.While0.Endif1 -label run.While0.While2 -push local 0 -push constant 0 -eq -not -push this 3 -not -and -not -if-goto run.While0.EndWhile2 -call Keyboard.keyPressed 0 -pop local 0 -push this 0 -call Bat.move 1 -pop temp 0 -push pointer 0 -call PongGame.moveBall 1 -pop temp 0 -push constant 50 -call Sys.wait 1 -pop temp 0 -goto run.While0.While2 -label run.While0.EndWhile2 -goto run.While0 -label run.EndWhile0 -push this 3 -not -if-goto run.Else1 -push constant 10 -push constant 27 -call Output.moveCursor 2 -pop temp 0 -push constant 9 -call String.new 1 -push constant 71 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 79 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -label run.Else1 -push constant 0 -return -function PongGame.moveBall 5 -push argument 0 -pop pointer 0 -push this 1 -call Ball.move 1 -pop this 2 -push this 2 -push constant 0 -gt -push this 2 -push this 5 -eq -not -and -not -if-goto moveBall.Else0 -push this 2 -pop this 5 -push constant 0 -pop local 0 -push this 0 -call Bat.getLeft 1 -pop local 1 -push this 0 -call Bat.getRight 1 -pop local 2 -push this 1 -call Ball.getLeft 1 -pop local 3 -push this 1 -call Ball.getRight 1 -pop local 4 -push this 2 -push constant 4 -eq -not -if-goto moveBall.Else0.Else0 -push local 1 -push local 4 -gt -push local 2 -push local 3 -lt -or -pop this 3 -push this 3 -not -not -if-goto moveBall.Else0.Else0.Else0 -push local 4 -push local 1 -push constant 10 -add -lt -not -if-goto moveBall.Else0.Else0.Else0.Else0 -push constant 1 -neg -pop local 0 -goto moveBall.Else0.Else0.Else0.Endif0 -label moveBall.Else0.Else0.Else0.Else0 -push local 3 -push local 2 -push constant 10 -sub -gt -not -if-goto moveBall.Else0.Else0.Else0.If0.Else0 -push constant 1 -pop local 0 -label moveBall.Else0.Else0.Else0.If0.Else0 -label moveBall.Else0.Else0.Else0.Endif0 -push this 6 -push constant 2 -sub -pop this 6 -push this 0 -push this 6 -call Bat.setWidth 2 -pop temp 0 -push this 4 -push constant 1 -add -pop this 4 -push constant 22 -push constant 7 -call Output.moveCursor 2 -pop temp 0 -push this 4 -call Output.printInt 1 -pop temp 0 -label moveBall.Else0.Else0.Else0 -label moveBall.Else0.Else0 -push this 1 -push local 0 -call Ball.bounce 2 -pop temp 0 -label moveBall.Else0 -push constant 0 -return diff --git a/projects/11/Seven/Main.jack b/projects/11/Seven/Main.jack deleted file mode 100644 index 067402e..0000000 --- a/projects/11/Seven/Main.jack +++ /dev/null @@ -1,17 +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/11/Seven/Main.jack - -/** - * Computes the value of 1 + (2 * 3) and prints the result - * at the top-left of the screen. - */ -class Main { - - function void main() { - do Output.printInt(1 + (2 * 3)); - return; - } - -} diff --git a/projects/11/Seven/Main.vm b/projects/11/Seven/Main.vm deleted file mode 100644 index a209c18..0000000 --- a/projects/11/Seven/Main.vm +++ /dev/null @@ -1,10 +0,0 @@ -function Main.main 0 -push constant 1 -push constant 2 -push constant 3 -call Math.multiply 2 -add -call Output.printInt 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/Square/Main.jack b/projects/11/Square/Main.jack deleted file mode 100644 index 0753893..0000000 --- a/projects/11/Square/Main.jack +++ /dev/null @@ -1,17 +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/11/Square/Main.jack - -// (same as projects/09/Square/Main.jack) - -/** Initializes a new Square Dance game and starts running it. */ -class Main { - function void main() { - var SquareGame game; - let game = SquareGame.new(); - do game.run(); - do game.dispose(); - return; - } -} diff --git a/projects/11/Square/Main.vm b/projects/11/Square/Main.vm deleted file mode 100644 index a3b355b..0000000 --- a/projects/11/Square/Main.vm +++ /dev/null @@ -1,11 +0,0 @@ -function Main.main 1 -call SquareGame.new 0 -pop local 0 -push local 0 -call SquareGame.run 1 -pop temp 0 -push local 0 -call SquareGame.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/11/Square/Square.jack b/projects/11/Square/Square.jack deleted file mode 100644 index 5a92838..0000000 --- a/projects/11/Square/Square.jack +++ /dev/null @@ -1,110 +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/11/Square/Square.jack - -// (same as projects/09/Square/Square.jack) - -/** Implements a graphical square. */ -class Square { - - field int x, y; // screen location of the square's top-left corner - field int size; // length of this square, in pixels - - /** Constructs a new square with a given location and size. */ - constructor Square new(int Ax, int Ay, int Asize) { - let x = Ax; - let y = Ay; - let size = Asize; - do draw(); - return this; - } - - /** Disposes this square. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } - - /** Draws the square on the screen. */ - method void draw() { - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Erases the square from the screen. */ - method void erase() { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + size); - return; - } - - /** Increments the square size by 2 pixels. */ - method void incSize() { - if (((y + size) < 254) & ((x + size) < 510)) { - do erase(); - let size = size + 2; - do draw(); - } - return; - } - - /** Decrements the square size by 2 pixels. */ - method void decSize() { - if (size > 2) { - do erase(); - let size = size - 2; - do draw(); - } - return; - } - - /** Moves the square up by 2 pixels. */ - method void moveUp() { - if (y > 1) { - do Screen.setColor(false); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - let y = y - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + size, y + 1); - } - return; - } - - /** Moves the square down by 2 pixels. */ - method void moveDown() { - if ((y + size) < 254) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + size, y + 1); - let y = y + 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, (y + size) - 1, x + size, y + size); - } - return; - } - - /** Moves the square left by 2 pixels. */ - method void moveLeft() { - if (x > 1) { - do Screen.setColor(false); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - let x = x - 2; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 1, y + size); - } - return; - } - - /** Moves the square right by 2 pixels. */ - method void moveRight() { - if ((x + size) < 510) { - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + 1, y + size); - let x = x + 2; - do Screen.setColor(true); - do Screen.drawRectangle((x + size) - 1, y, x + size, y + size); - } - return; - } -} diff --git a/projects/11/Square/Square.vm b/projects/11/Square/Square.vm deleted file mode 100644 index 871ccf7..0000000 --- a/projects/11/Square/Square.vm +++ /dev/null @@ -1,298 +0,0 @@ -function Square.new 0 -push constant 3 -call Memory.alloc 1 -pop pointer 0 -push argument 0 -pop this 0 -push argument 1 -pop this 1 -push argument 2 -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -push pointer 0 -return -function Square.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function Square.draw 0 -push argument 0 -pop pointer 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Square.erase 0 -push argument 0 -pop pointer 0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -return -function Square.incSize 0 -push argument 0 -pop pointer 0 -push this 1 -push this 2 -add -push constant 254 -lt -push this 0 -push this 2 -add -push constant 510 -lt -and -not -if-goto incSize.Else0 -push pointer 0 -call Square.erase 1 -pop temp 0 -push this 2 -push constant 2 -add -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -label incSize.Else0 -push constant 0 -return -function Square.decSize 0 -push argument 0 -pop pointer 0 -push this 2 -push constant 2 -gt -not -if-goto decSize.Else0 -push pointer 0 -call Square.erase 1 -pop temp 0 -push this 2 -push constant 2 -sub -pop this 2 -push pointer 0 -call Square.draw 1 -pop temp 0 -label decSize.Else0 -push constant 0 -return -function Square.moveUp 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -gt -not -if-goto moveUp.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 2 -add -push constant 1 -sub -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 1 -push constant 2 -sub -pop this 1 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push constant 1 -add -call Screen.drawRectangle 4 -pop temp 0 -label moveUp.Else0 -push constant 0 -return -function Square.moveDown 0 -push argument 0 -pop pointer 0 -push this 1 -push this 2 -add -push constant 254 -lt -not -if-goto moveDown.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push this 2 -add -push this 1 -push constant 1 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 1 -push constant 2 -add -pop this 1 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 2 -add -push constant 1 -sub -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label moveDown.Else0 -push constant 0 -return -function Square.moveLeft 0 -push argument 0 -pop pointer 0 -push this 0 -push constant 1 -gt -not -if-goto moveLeft.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 1 -sub -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 0 -push constant 2 -sub -pop this 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push constant 1 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label moveLeft.Else0 -push constant 0 -return -function Square.moveRight 0 -push argument 0 -pop pointer 0 -push this 0 -push this 2 -add -push constant 510 -lt -not -if-goto moveRight.Else0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 1 -push this 0 -push constant 1 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -push this 0 -push constant 2 -add -pop this 0 -push constant 1 -neg -call Screen.setColor 1 -pop temp 0 -push this 0 -push this 2 -add -push constant 1 -sub -push this 1 -push this 0 -push this 2 -add -push this 1 -push this 2 -add -call Screen.drawRectangle 4 -pop temp 0 -label moveRight.Else0 -push constant 0 -return diff --git a/projects/11/Square/SquareGame.jack b/projects/11/Square/SquareGame.jack deleted file mode 100644 index 4fe7e39..0000000 --- a/projects/11/Square/SquareGame.jack +++ /dev/null @@ -1,81 +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/11/Square/SquareGame.jack - -// (same as projects/09/Square/SquareGame.jack) - -/** - * Implements the Square Dance game. - * This simple game allows the user to move a black square around - * the screen, and change the square's size during the movement. - * When the game starts, a square of 30 by 30 pixels is shown at the - * top-left corner of the screen. The user controls the square as follows. - * The 4 arrow keys are used to move the square up, down, left, and right. - * The 'z' and 'x' keys are used, respectively, to decrement and increment - * the square's size. The 'q' key is used to quit the game. - */ - -class SquareGame { - field Square square; // the square of this game - field int direction; // the square's current direction: - // 0=none, 1=up, 2=down, 3=left, 4=right - - /** Constructs a new Square Game. */ - constructor SquareGame new() { - // Creates a 30 by 30 pixels square and positions it at the top-left - // of the screen. - let square = Square.new(0, 0, 30); - let direction = 0; // initial state is no movement - return this; - } - - /** Disposes this game. */ - method void dispose() { - do square.dispose(); - do Memory.deAlloc(this); - return; - } - - /** Moves the square in the current direction. */ - method void moveSquare() { - if (direction = 1) { do square.moveUp(); } - if (direction = 2) { do square.moveDown(); } - if (direction = 3) { do square.moveLeft(); } - if (direction = 4) { do square.moveRight(); } - do Sys.wait(5); // delays the next movement - return; - } - - /** Runs the game: handles the user's inputs and moves the square accordingly */ - method void run() { - var char key; // the key currently pressed by the user - var boolean exit; - let exit = false; - - while (~exit) { - // waits for a key to be pressed - while (key = 0) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - if (key = 81) { let exit = true; } // q key - if (key = 90) { do square.decSize(); } // z key - if (key = 88) { do square.incSize(); } // x key - if (key = 131) { let direction = 1; } // up arrow - if (key = 133) { let direction = 2; } // down arrow - if (key = 130) { let direction = 3; } // left arrow - if (key = 132) { let direction = 4; } // right arrow - - // waits for the key to be released - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - do moveSquare(); - } - } // while - return; - } -} - - - diff --git a/projects/11/Square/SquareGame.vm b/projects/11/Square/SquareGame.vm deleted file mode 100644 index f2dd542..0000000 --- a/projects/11/Square/SquareGame.vm +++ /dev/null @@ -1,168 +0,0 @@ -function SquareGame.new 0 -push constant 2 -call Memory.alloc 1 -pop pointer 0 -push constant 0 -push constant 0 -push constant 30 -call Square.new 3 -pop this 0 -push constant 0 -pop this 1 -push pointer 0 -return -function SquareGame.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -call Square.dispose 1 -pop temp 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function SquareGame.moveSquare 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 1 -eq -not -if-goto moveSquare.Else0 -push this 0 -call Square.moveUp 1 -pop temp 0 -label moveSquare.Else0 -push this 1 -push constant 2 -eq -not -if-goto moveSquare.Else1 -push this 0 -call Square.moveDown 1 -pop temp 0 -label moveSquare.Else1 -push this 1 -push constant 3 -eq -not -if-goto moveSquare.Else2 -push this 0 -call Square.moveLeft 1 -pop temp 0 -label moveSquare.Else2 -push this 1 -push constant 4 -eq -not -if-goto moveSquare.Else3 -push this 0 -call Square.moveRight 1 -pop temp 0 -label moveSquare.Else3 -push constant 5 -call Sys.wait 1 -pop temp 0 -push constant 0 -return -function SquareGame.run 2 -push argument 0 -pop pointer 0 -push constant 0 -pop local 1 -label run.While0 -push local 1 -not -not -if-goto run.EndWhile0 -label run.While0.While0 -push local 0 -push constant 0 -eq -not -if-goto run.While0.EndWhile0 -call Keyboard.keyPressed 0 -pop local 0 -push pointer 0 -call SquareGame.moveSquare 1 -pop temp 0 -goto run.While0.While0 -label run.While0.EndWhile0 -push local 0 -push constant 81 -eq -not -if-goto run.While0.Else1 -push constant 1 -neg -pop local 1 -label run.While0.Else1 -push local 0 -push constant 90 -eq -not -if-goto run.While0.Else2 -push this 0 -call Square.decSize 1 -pop temp 0 -label run.While0.Else2 -push local 0 -push constant 88 -eq -not -if-goto run.While0.Else3 -push this 0 -call Square.incSize 1 -pop temp 0 -label run.While0.Else3 -push local 0 -push constant 131 -eq -not -if-goto run.While0.Else4 -push constant 1 -pop this 1 -label run.While0.Else4 -push local 0 -push constant 133 -eq -not -if-goto run.While0.Else5 -push constant 2 -pop this 1 -label run.While0.Else5 -push local 0 -push constant 130 -eq -not -if-goto run.While0.Else6 -push constant 3 -pop this 1 -label run.While0.Else6 -push local 0 -push constant 132 -eq -not -if-goto run.While0.Else7 -push constant 4 -pop this 1 -label run.While0.Else7 -label run.While0.While8 -push local 0 -push constant 0 -eq -not -not -if-goto run.While0.EndWhile8 -call Keyboard.keyPressed 0 -pop local 0 -push pointer 0 -call SquareGame.moveSquare 1 -pop temp 0 -goto run.While0.While8 -label run.While0.EndWhile8 -goto run.While0 -label run.EndWhile0 -push constant 0 -return diff --git a/projects/11/Test.jack b/projects/11/Test.jack deleted file mode 100644 index ff4bfae..0000000 --- a/projects/11/Test.jack +++ /dev/null @@ -1,7 +0,0 @@ -class Test{ -method void something(){ -} -constructor Test new(){ - do something(); -} -} diff --git a/projects/11/systemsub.txt b/projects/11/systemsub.txt deleted file mode 100644 index cad8797..0000000 --- a/projects/11/systemsub.txt +++ /dev/null @@ -1,59 +0,0 @@ -class Math{ -function int abs(int x, int y){} -function int multiply(int x, int y){} -function int divide(int x, int y){} -function int min(int x, int y){} -function int max(int x, int y){} -function int sqrt(int x){} -} -class String{ -constructor String new(int maxLength){} -method int dispose(){} -method int length(){} -method char charAt(int j){} -method void setCharAt(int j, char c){} -method String appendChar(char c){} -method void eraseLastChar(){} -method int intValue(){} -method void setInt(int val){} -function char backSpace(){} -function char doubleQuote(){} -function char newLine(){} -} -class Array{ -function Array new(int size){} -method void dispose(){} -} -class Output{ -function void moveCursor(int i, int j){} -function void printChar(char c){} -function void printString(String s){} -function void printInt(int i){} -function void println(){} -function void backSpace(){} -} -class Screen{ -function void clearScreen(){} -function void setColor(boolean b){} -function void drawPixel(int x, int y){} -function void drawLine(int x1, int y1, int x2, int y2){} -function void drawRectangle(int x1, int y1, int x2, int y2){} -function void drawCircle(int x, int y, int r){} -} -class Keyboard{ -function char keyPressed(){} -function char readChar(){} -function String readLine(String message){} -function int readInt(String message){} -} -class Memory{ -function int peek(int address){} -function void poke(int address, int value){} -function Array alloc(int size){} -function void deAlloc(Array o){} -} -class Sys{ -function void halt(){} -function void error(int errorCode){} -function void wait(int duration){} -} diff --git a/projects/11/systemsub1.txt b/projects/11/systemsub1.txt deleted file mode 100644 index 2095728..0000000 --- a/projects/11/systemsub1.txt +++ /dev/null @@ -1,42 +0,0 @@ -function int Math.multiply(int x, int y) -function int Math.divide(int x, int y) -function int Math.min(int x, int y) -function int Math.max(int x, int y) -function int Math.sqrt(int x) -constructor String String.new(int maxLength) -method int String.dispose() -method int String.length() -method char String.charAt(int j) -method void String.setCharAt(int j, char c) -method String String.appendChar(char c) -method void String.eraseLastChar() -method int String.intValue() -method void String.setInt(int val) -function char String.backSpace() -function char String.doubleQuote() -function char String.newLine() -function Array Array.new(int size) -method void Array.dispose() -function void Output.moveCursor(int i, int j) -function void Output.printChar(char c) -function void Output.printString(String s) -function void Output.printInt(int i) -function void Output.println() -function void Output.backSpace() -function void Screen.clearScreen() -function void Screen.setColor(boolean b) -function void Screen.drawPixel(int x, int y) -function void Screen.drawLine(int x1, int y1, int x2, int y2) -function void Screen.drawRectangle(int x1, int y1, int x2, int y2) -function void Screen.drawCircle(int x, int y, int r) -function char Keyboard.keyPressed() -function char Keyboard.readChar() -function String Keyboard.readLine(String message) -function int Keyboard.readInt(String message) -function int Memory.peek(int address) -function void Memory.poke(int address, int value) -function Array Memory.alloc(int size) -function void Memory.deAlloc(Array o) -function void Sys.halt() -function void Sys.error(int errorCode) -function void Sys.wait(int duration) diff --git a/projects/12/Array.jack b/projects/12/Array.jack deleted file mode 100644 index 343c25c..0000000 --- a/projects/12/Array.jack +++ /dev/null @@ -1,26 +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/12/Array.jack - -/** - * Represents an array. - * In the Jack language, arrays are instances of the Array class. - * Once declared, the array entries can be accessed using the usual - * syntax arr[i]. Each array entry can hold a primitive data type as - * well as any object type. Different array entries can have different - * data types. - */ -class Array { - - /** Constructs a new Array of the given size. */ - function Array new(int size) { - return Memory.alloc(size); - } - - /** Disposes this array. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } -} diff --git a/projects/12/ArrayTest/Array.jack b/projects/12/ArrayTest/Array.jack deleted file mode 100644 index 343c25c..0000000 --- a/projects/12/ArrayTest/Array.jack +++ /dev/null @@ -1,26 +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/12/Array.jack - -/** - * Represents an array. - * In the Jack language, arrays are instances of the Array class. - * Once declared, the array entries can be accessed using the usual - * syntax arr[i]. Each array entry can hold a primitive data type as - * well as any object type. Different array entries can have different - * data types. - */ -class Array { - - /** Constructs a new Array of the given size. */ - function Array new(int size) { - return Memory.alloc(size); - } - - /** Disposes this array. */ - method void dispose() { - do Memory.deAlloc(this); - return; - } -} diff --git a/projects/12/ArrayTest/Array.vm b/projects/12/ArrayTest/Array.vm deleted file mode 100644 index c0cd797..0000000 --- a/projects/12/ArrayTest/Array.vm +++ /dev/null @@ -1,12 +0,0 @@ -function Array.new 0 -push argument 0 -call Memory.alloc 1 -return -function Array.dispose 0 -push argument 0 -pop pointer 0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/ArrayTest/ArrayTest.cmp b/projects/12/ArrayTest/ArrayTest.cmp deleted file mode 100644 index d1a9798..0000000 --- a/projects/12/ArrayTest/ArrayTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[8000]|RAM[8001]|RAM[8002]|RAM[8003]| -| 222 | 122 | 100 | 10 | diff --git a/projects/12/ArrayTest/ArrayTest.out b/projects/12/ArrayTest/ArrayTest.out deleted file mode 100644 index e9f4e75..0000000 --- a/projects/12/ArrayTest/ArrayTest.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[8000]|RAM[8001]|RAM[8002]|RAM[8003]| -| 222 | 122 | 100 | 10 | diff --git a/projects/12/ArrayTest/ArrayTest.tst b/projects/12/ArrayTest/ArrayTest.tst deleted file mode 100644 index 89934b9..0000000 --- a/projects/12/ArrayTest/ArrayTest.tst +++ /dev/null @@ -1,15 +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/12/ArrayTest/ArrayTest.tst - -load, -output-file ArrayTest.out, -compare-to ArrayTest.cmp, -output-list RAM[8000]%D2.6.1 RAM[8001]%D2.6.1 RAM[8002]%D2.6.1 RAM[8003]%D2.6.1; - -repeat 1000000 { - vmstep; -} - -output; diff --git a/projects/12/ArrayTest/Main.jack b/projects/12/ArrayTest/Main.jack deleted file mode 100644 index 439770a..0000000 --- a/projects/12/ArrayTest/Main.jack +++ /dev/null @@ -1,40 +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/12/ArrayTest/Main.jack - -/** Test program for the OS Array class. */ -class Main { - - /** Performs several Array manipulations. */ - function void main() { - var Array r; // stores test results - var Array a, b, c; - - let r = 8000; - - let a = Array.new(3); - let a[2] = 222; - let r[0] = a[2]; // RAM[8000] = 222 - - let b = Array.new(3); - let b[1] = a[2] - 100; - let r[1] = b[1]; // RAM[8001] = 122 - - let c = Array.new(500); - let c[499] = a[2] - b[1]; - let r[2] = c[499]; // RAM[8002] = 100 - - do a.dispose(); - do b.dispose(); - - let b = Array.new(3); - let b[0] = c[499] - 90; - let r[3] = b[0]; // RAM[8003] = 10 - - do c.dispose(); - do b.dispose(); - - return; - } -} diff --git a/projects/12/ArrayTest/Main.vm b/projects/12/ArrayTest/Main.vm deleted file mode 100644 index 141f20a..0000000 --- a/projects/12/ArrayTest/Main.vm +++ /dev/null @@ -1,131 +0,0 @@ -function Main.main 4 -push constant 8000 -pop local 0 -push constant 3 -call Array.new 1 -pop local 1 -push constant 2 -push local 1 -add -push constant 222 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push local 0 -add -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -call Array.new 1 -pop local 2 -push constant 1 -push local 2 -add -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -push constant 100 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push local 0 -add -push constant 1 -push local 2 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 500 -call Array.new 1 -pop local 3 -push constant 499 -push local 3 -add -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -push constant 1 -push local 2 -add -pop pointer 1 -push that 0 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push local 0 -add -push constant 499 -push local 3 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -call Array.dispose 1 -pop temp 0 -push local 2 -call Array.dispose 1 -pop temp 0 -push constant 3 -call Array.new 1 -pop local 2 -push constant 0 -push local 2 -add -push constant 499 -push local 3 -add -pop pointer 1 -push that 0 -push constant 90 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push local 0 -add -push constant 0 -push local 2 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 3 -call Array.dispose 1 -pop temp 0 -push local 2 -call Array.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/Keyboard.jack b/projects/12/Keyboard.jack deleted file mode 100644 index a35704a..0000000 --- a/projects/12/Keyboard.jack +++ /dev/null @@ -1,97 +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/12/Keyboard.jack - -/** - * A library for handling user input from the keyboard. - */ -class Keyboard { - - /** Initializes the keyboard. */ - function void init() { - return; - } - - /** - * Returns the character of the currently pressed key on the keyboard; - * if no key is currently pressed, returns 0. - * - * Recognizes all ASCII characters, as well as the following keys: - * new line = 128 = String.newline() - * backspace = 129 = String.backspace() - * left arrow = 130 - * up arrow = 131 - * right arrow = 132 - * down arrow = 133 - * home = 134 - * End = 135 - * page up = 136 - * page down = 137 - * insert = 138 - * delete = 139 - * ESC = 140 - * F1 - F12 = 141 - 152 - */ - function char keyPressed() { - return Memory.peek(24576); - } - - /** - * Waits until a key is pressed on the keyboard and released, - * then echoes the key to the screen, and returns the character - * of the pressed key. - */ - function char readChar() { - var int key, key1; - let key = 0; - while (key = 0) { - let key = Memory.peek(24576); - } - let key1 = key; - while (key1 = key) { - let key1 = Memory.peek(24576); - } - if ((key > 31) & (key < 127) | (key = 128) | (key = 129)) { - do Output.printChar(key); - } - return key; - } - - /** - * Displays the message on the screen, reads from the keyboard the entered - * text until a newline character is detected, echoes the text to the screen, - * and returns its value. Also handles user backspaces. - */ - function String readLine(String message) { - var int c; - var String s; - let s = String.new(140); - do Output.printString(message); - let c = Keyboard.readChar(); - while (~(c = 128)) { - if (c = 129) { - if (s.length() > 0) { - do s.eraseLastChar(); - } - } else { - do s.appendChar(c); - } - let c = Keyboard.readChar(); - } - return s; - } - - /** - * Displays the message on the screen, reads from the keyboard the entered - * text until a newline character is detected, echoes the text to the screen, - * and returns its integer value (until the first non-digit character in the - * entered text is detected). Also handles user backspaces. - */ - function int readInt(String message) { - var String s; - do Output.printString(message); - let s = Keyboard.readLine(""); - return s.intValue(); - } -} diff --git a/projects/12/KeyboardTest/Keyboard.jack b/projects/12/KeyboardTest/Keyboard.jack deleted file mode 100644 index a35704a..0000000 --- a/projects/12/KeyboardTest/Keyboard.jack +++ /dev/null @@ -1,97 +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/12/Keyboard.jack - -/** - * A library for handling user input from the keyboard. - */ -class Keyboard { - - /** Initializes the keyboard. */ - function void init() { - return; - } - - /** - * Returns the character of the currently pressed key on the keyboard; - * if no key is currently pressed, returns 0. - * - * Recognizes all ASCII characters, as well as the following keys: - * new line = 128 = String.newline() - * backspace = 129 = String.backspace() - * left arrow = 130 - * up arrow = 131 - * right arrow = 132 - * down arrow = 133 - * home = 134 - * End = 135 - * page up = 136 - * page down = 137 - * insert = 138 - * delete = 139 - * ESC = 140 - * F1 - F12 = 141 - 152 - */ - function char keyPressed() { - return Memory.peek(24576); - } - - /** - * Waits until a key is pressed on the keyboard and released, - * then echoes the key to the screen, and returns the character - * of the pressed key. - */ - function char readChar() { - var int key, key1; - let key = 0; - while (key = 0) { - let key = Memory.peek(24576); - } - let key1 = key; - while (key1 = key) { - let key1 = Memory.peek(24576); - } - if ((key > 31) & (key < 127) | (key = 128) | (key = 129)) { - do Output.printChar(key); - } - return key; - } - - /** - * Displays the message on the screen, reads from the keyboard the entered - * text until a newline character is detected, echoes the text to the screen, - * and returns its value. Also handles user backspaces. - */ - function String readLine(String message) { - var int c; - var String s; - let s = String.new(140); - do Output.printString(message); - let c = Keyboard.readChar(); - while (~(c = 128)) { - if (c = 129) { - if (s.length() > 0) { - do s.eraseLastChar(); - } - } else { - do s.appendChar(c); - } - let c = Keyboard.readChar(); - } - return s; - } - - /** - * Displays the message on the screen, reads from the keyboard the entered - * text until a newline character is detected, echoes the text to the screen, - * and returns its integer value (until the first non-digit character in the - * entered text is detected). Also handles user backspaces. - */ - function int readInt(String message) { - var String s; - do Output.printString(message); - let s = Keyboard.readLine(""); - return s.intValue(); - } -} diff --git a/projects/12/KeyboardTest/Keyboard.vm b/projects/12/KeyboardTest/Keyboard.vm deleted file mode 100644 index 5dc3426..0000000 --- a/projects/12/KeyboardTest/Keyboard.vm +++ /dev/null @@ -1,115 +0,0 @@ -function Keyboard.init 0 -push constant 0 -return -function Keyboard.keyPressed 0 -push constant 24576 -call Memory.peek 1 -return -function Keyboard.readChar 2 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push constant 0 -eq -not -if-goto WHILE_END0 -push constant 24576 -call Memory.peek 1 -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -pop local 1 -label WHILE_EXP1 -push local 1 -push local 0 -eq -not -if-goto WHILE_END1 -push constant 24576 -call Memory.peek 1 -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -push local 0 -push constant 31 -gt -push local 0 -push constant 127 -lt -and -push local 0 -push constant 128 -eq -or -push local 0 -push constant 129 -eq -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push local 0 -call Output.printChar 1 -pop temp 0 -label IF_FALSE0 -push local 0 -return -function Keyboard.readLine 2 -push constant 140 -call String.new 1 -pop local 1 -push argument 0 -call Output.printString 1 -pop temp 0 -call Keyboard.readChar 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push constant 128 -eq -not -not -if-goto WHILE_END0 -push local 0 -push constant 129 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push local 1 -call String.length 1 -push constant 0 -gt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 1 -call String.eraseLastChar 1 -pop temp 0 -label IF_FALSE1 -goto IF_END0 -label IF_FALSE0 -push local 1 -push local 0 -call String.appendChar 2 -pop temp 0 -label IF_END0 -call Keyboard.readChar 0 -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push local 1 -return -function Keyboard.readInt 1 -push argument 0 -call Output.printString 1 -pop temp 0 -push constant 0 -call String.new 1 -call Keyboard.readLine 1 -pop local 0 -push local 0 -call String.intValue 1 -return diff --git a/projects/12/KeyboardTest/KeyboardTestOutput.gif b/projects/12/KeyboardTest/KeyboardTestOutput.gif deleted file mode 100644 index 944983a..0000000 Binary files a/projects/12/KeyboardTest/KeyboardTestOutput.gif and /dev/null differ diff --git a/projects/12/KeyboardTest/Main.jack b/projects/12/KeyboardTest/Main.jack deleted file mode 100644 index e89182c..0000000 --- a/projects/12/KeyboardTest/Main.jack +++ /dev/null @@ -1,93 +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/12/KeyboardTest/Main.jack - -/** Test program for the OS Keyboard class. */ -class Main { - - /** Gets input from the user and verifies its contents. */ - function void main() { - var char c, key; - var String s; - var int i; - var boolean ok; - - let ok = false; - do Output.printString("keyPressed test:"); - do Output.println(); - while (~ok) { - do Output.printString("Please press the 'Page Down' key"); - while (key = 0) { - let key = Keyboard.keyPressed(); - } - let c = key; - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - } - - do Output.println(); - - if (c = 137) { - do Output.printString("ok"); - do Output.println(); - let ok = true; - } - } - - let ok = false; - do Output.printString("readChar test:"); - do Output.println(); - do Output.printString("(Verify that the pressed character is echoed to the screen)"); - do Output.println(); - while (~ok) { - do Output.printString("Please press the number '3': "); - let c = Keyboard.readChar(); - - do Output.println(); - - if (c = 51) { - do Output.printString("ok"); - do Output.println(); - let ok = true; - } - } - - let ok = false; - do Output.printString("readLine test:"); - do Output.println(); - do Output.printString("(Verify echo and usage of 'backspace')"); - do Output.println(); - while (~ok) { - let s = Keyboard.readLine("Please type 'JACK' and press enter: "); - - if (s.length() = 4) { - if ((s.charAt(0) = 74) & (s.charAt(1) = 65) & (s.charAt(2) = 67) & (s.charAt(3) = 75)) { - do Output.printString("ok"); - do Output.println(); - let ok = true; - } - } - } - - let ok = false; - do Output.printString("readInt test:"); - do Output.println(); - do Output.printString("(Verify echo and usage of 'backspace')"); - do Output.println(); - while (~ok) { - let i = Keyboard.readInt("Please type '-32123' and press enter: "); - - if (i = (-32123)) { - do Output.printString("ok"); - do Output.println(); - let ok = true; - } - } - - do Output.println(); - do Output.printString("Test completed successfully"); - - return; - } -} diff --git a/projects/12/KeyboardTest/Main.vm b/projects/12/KeyboardTest/Main.vm deleted file mode 100644 index aec89d6..0000000 --- a/projects/12/KeyboardTest/Main.vm +++ /dev/null @@ -1,949 +0,0 @@ -function Main.main 5 -push constant 0 -pop local 4 -push constant 16 -call String.new 1 -push constant 107 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 80 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -label WHILE_EXP0 -push local 4 -not -not -if-goto WHILE_END0 -push constant 32 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 80 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 68 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -label WHILE_EXP1 -push local 1 -push constant 0 -eq -not -if-goto WHILE_END1 -call Keyboard.keyPressed 0 -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -push local 1 -pop local 0 -label WHILE_EXP2 -push local 1 -push constant 0 -eq -not -not -if-goto WHILE_END2 -call Keyboard.keyPressed 0 -pop local 1 -goto WHILE_EXP2 -label WHILE_END2 -call Output.println 0 -pop temp 0 -push local 0 -push constant 137 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 2 -call String.new 1 -push constant 111 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -not -pop local 4 -label IF_FALSE0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -pop local 4 -push constant 14 -call String.new 1 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 59 -call String.new 1 -push constant 40 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 41 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -label WHILE_EXP3 -push local 4 -not -not -if-goto WHILE_END3 -push constant 29 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Keyboard.readChar 0 -pop local 0 -call Output.println 0 -pop temp 0 -push local 0 -push constant 51 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 2 -call String.new 1 -push constant 111 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -not -pop local 4 -label IF_FALSE1 -goto WHILE_EXP3 -label WHILE_END3 -push constant 0 -pop local 4 -push constant 14 -call String.new 1 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 76 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 38 -call String.new 1 -push constant 40 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 41 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -label WHILE_EXP4 -push local 4 -not -not -if-goto WHILE_END4 -push constant 36 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 74 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 75 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Keyboard.readLine 1 -pop local 2 -push local 2 -call String.length 1 -push constant 4 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push local 2 -push constant 0 -call String.charAt 2 -push constant 74 -eq -push local 2 -push constant 1 -call String.charAt 2 -push constant 65 -eq -and -push local 2 -push constant 2 -call String.charAt 2 -push constant 67 -eq -and -push local 2 -push constant 3 -call String.charAt 2 -push constant 75 -eq -and -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push constant 2 -call String.new 1 -push constant 111 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -not -pop local 4 -label IF_FALSE3 -label IF_FALSE2 -goto WHILE_EXP4 -label WHILE_END4 -push constant 0 -pop local 4 -push constant 13 -call String.new 1 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 73 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 38 -call String.new 1 -push constant 40 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 41 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -label WHILE_EXP5 -push local 4 -not -not -if-goto WHILE_END5 -push constant 38 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Keyboard.readInt 1 -pop local 3 -push local 3 -push constant 32123 -neg -eq -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -push constant 2 -call String.new 1 -push constant 111 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 0 -not -pop local 4 -label IF_FALSE4 -goto WHILE_EXP5 -label WHILE_END5 -call Output.println 0 -pop temp 0 -push constant 27 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/Math.jack b/projects/12/Math.jack deleted file mode 100644 index 01bce8f..0000000 --- a/projects/12/Math.jack +++ /dev/null @@ -1,158 +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/12/Math.jack - -/** - * A library of commonly used mathematical functions. - * Note: Jack compilers implement multiplication and division using OS method calls. - */ -class Math { - static Array twoToThe; - - /** Initializes the library. */ - function void init() { - var int i, x; - let x = 1; - let i = 0; - let twoToThe = Array.new(16); - while (i < 16){ - let twoToThe[i] = x; - let x = x + x; - let i = i + 1; - } - return; - } - - function boolean bit(int x, int i) { - return ~(x & twoToThe[i] = 0); - } - - function int sign(int x) { - if (x > 0) { - return 1; - } else { - if (x < 0) { - return -1; - } else { - return 0; - } - } - } - - /** Returns the absolute value of x. */ - function int abs(int x) { - if (x > 0){ - return x; - } else { - return -x; - } - } - - /** Returns the product of x and y. - * When a Jack compiler detects the multiplication operator '*' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x*y and multiply(x,y) return the same value. - */ - function int multiply(int x, int y) { - var int res, shiftedX, i; - let shiftedX = x; - let i = 0; - let res = 0; - //while ((~(twoToThe[i] > y)) & (i < 16)) { - while (i < 16) { - if (Math.bit(y, i)){ - let res = res + shiftedX; - } - let shiftedX = shiftedX + shiftedX; - let i = i + 1; - } - return res; - } - - /** Returns the integer part of x/y. - * When a Jack compiler detects the multiplication operator '/' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x/y and divide(x,y) return the same value. - */ - function int divide(int x, int y) { - var int ax, ay; - if (x > 0) { - if (y > 0) { - return Math.divide1(x, y); - } else { - return -Math.divide1(x, -y); - } - } else { - if (y > 0) { - return -Math.divide1(-x, y); - } else { - return Math.divide1(-x, -y); - } - } - } - - function int divide1(int x, int y) { - var int q; - if (y = 0) { - do Output.printString("Error: division by zero."); - do Sys.error(0); - } - if ((y > x) | (y < 0)) { - return 0; - } - let q = Math.divide1(x, y * 2); - if (x - (2 * q * y) < y) { - return 2 * q; - } else { - return 2 * q + 1; - } - } - - function int length(int x){ - var int n; - let n = 14; - while (twoToThe[n] > x){ - let n = n - 1; - } - return n; - } - - /** Returns the integer part of the square root of x. */ - function int sqrt(int x) { - var int y, k, z, w; - if (x < 0) { - do Output.printString("Error: square rooting a negative number."); - do Sys.error(0); - } - let k = Math.length(x) / 2; - let y = 0; - while (~(k < 0)) { - let z = y + twoToThe[k]; - let w = z * z; - if ((~(w > x)) & (w > 0)) { - let y = z; - } - let k = k - 1; - } - return y; - } - - /** Returns the greater number. */ - function int max(int a, int b) { - if (a > b) { - return a; - } else { - return b; - } - } - - /** Returns the smaller number. */ - function int min(int a, int b) { - if (a < b) { - return a; - } else { - return b; - } - } -} diff --git a/projects/12/MathTest/Main.jack b/projects/12/MathTest/Main.jack deleted file mode 100644 index de5cec2..0000000 --- a/projects/12/MathTest/Main.jack +++ /dev/null @@ -1,35 +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/12/MathTest/Main.jack - -/** Test program for the OS Math class. */ -class Main { - - /** Performs various mathematical operations, using calls to the Math class methods. */ - function void main() { - var Array r; // stores the test results; - - let r = 8000; - - let r[0] = 2 * 3; // 6 - let r[1] = r[0] * (-30); // 6 * (-30) = -180 - let r[2] = r[1] * 100; // (-180) * 100 = -18000 - let r[3] = 1 * r[2]; // 1 * (-18000) = -18000 - let r[4] = r[3] * 0; // 0 - - let r[5] = 9 / 3; // 3 - let r[6] = (-18000) / 6; // -3000 - let r[7] = 32766 / (-32767); // 0 - - let r[8] = Math.sqrt(9); // 3 - let r[9] = Math.sqrt(32767); // 181 - - let r[10] = Math.min(345, 123); // 123 - let r[11] = Math.max(123, -345); // 123 - let r[12] = Math.abs(27); // 27 - let r[13] = Math.abs(-32767); // 32767 - - return; - } -} diff --git a/projects/12/MathTest/Main.vm b/projects/12/MathTest/Main.vm deleted file mode 100644 index 025f20c..0000000 --- a/projects/12/MathTest/Main.vm +++ /dev/null @@ -1,162 +0,0 @@ -function Main.main 1 -push constant 8000 -pop local 0 -push constant 0 -push local 0 -add -push constant 2 -push constant 3 -call Math.multiply 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push local 0 -add -push constant 0 -push local 0 -add -pop pointer 1 -push that 0 -push constant 30 -neg -call Math.multiply 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push local 0 -add -push constant 1 -push local 0 -add -pop pointer 1 -push that 0 -push constant 100 -call Math.multiply 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push local 0 -add -push constant 1 -push constant 2 -push local 0 -add -pop pointer 1 -push that 0 -call Math.multiply 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 4 -push local 0 -add -push constant 3 -push local 0 -add -pop pointer 1 -push that 0 -push constant 0 -call Math.multiply 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 5 -push local 0 -add -push constant 9 -push constant 3 -call Math.divide 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 6 -push local 0 -add -push constant 18000 -neg -push constant 6 -call Math.divide 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 7 -push local 0 -add -push constant 32766 -push constant 32767 -neg -call Math.divide 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8 -push local 0 -add -push constant 9 -call Math.sqrt 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 9 -push local 0 -add -push constant 32767 -call Math.sqrt 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 10 -push local 0 -add -push constant 345 -push constant 123 -call Math.min 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 11 -push local 0 -add -push constant 123 -push constant 345 -neg -call Math.max 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 12 -push local 0 -add -push constant 27 -call Math.abs 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 13 -push local 0 -add -push constant 32767 -neg -call Math.abs 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return diff --git a/projects/12/MathTest/Math.jack b/projects/12/MathTest/Math.jack deleted file mode 100644 index 01bce8f..0000000 --- a/projects/12/MathTest/Math.jack +++ /dev/null @@ -1,158 +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/12/Math.jack - -/** - * A library of commonly used mathematical functions. - * Note: Jack compilers implement multiplication and division using OS method calls. - */ -class Math { - static Array twoToThe; - - /** Initializes the library. */ - function void init() { - var int i, x; - let x = 1; - let i = 0; - let twoToThe = Array.new(16); - while (i < 16){ - let twoToThe[i] = x; - let x = x + x; - let i = i + 1; - } - return; - } - - function boolean bit(int x, int i) { - return ~(x & twoToThe[i] = 0); - } - - function int sign(int x) { - if (x > 0) { - return 1; - } else { - if (x < 0) { - return -1; - } else { - return 0; - } - } - } - - /** Returns the absolute value of x. */ - function int abs(int x) { - if (x > 0){ - return x; - } else { - return -x; - } - } - - /** Returns the product of x and y. - * When a Jack compiler detects the multiplication operator '*' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x*y and multiply(x,y) return the same value. - */ - function int multiply(int x, int y) { - var int res, shiftedX, i; - let shiftedX = x; - let i = 0; - let res = 0; - //while ((~(twoToThe[i] > y)) & (i < 16)) { - while (i < 16) { - if (Math.bit(y, i)){ - let res = res + shiftedX; - } - let shiftedX = shiftedX + shiftedX; - let i = i + 1; - } - return res; - } - - /** Returns the integer part of x/y. - * When a Jack compiler detects the multiplication operator '/' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x/y and divide(x,y) return the same value. - */ - function int divide(int x, int y) { - var int ax, ay; - if (x > 0) { - if (y > 0) { - return Math.divide1(x, y); - } else { - return -Math.divide1(x, -y); - } - } else { - if (y > 0) { - return -Math.divide1(-x, y); - } else { - return Math.divide1(-x, -y); - } - } - } - - function int divide1(int x, int y) { - var int q; - if (y = 0) { - do Output.printString("Error: division by zero."); - do Sys.error(0); - } - if ((y > x) | (y < 0)) { - return 0; - } - let q = Math.divide1(x, y * 2); - if (x - (2 * q * y) < y) { - return 2 * q; - } else { - return 2 * q + 1; - } - } - - function int length(int x){ - var int n; - let n = 14; - while (twoToThe[n] > x){ - let n = n - 1; - } - return n; - } - - /** Returns the integer part of the square root of x. */ - function int sqrt(int x) { - var int y, k, z, w; - if (x < 0) { - do Output.printString("Error: square rooting a negative number."); - do Sys.error(0); - } - let k = Math.length(x) / 2; - let y = 0; - while (~(k < 0)) { - let z = y + twoToThe[k]; - let w = z * z; - if ((~(w > x)) & (w > 0)) { - let y = z; - } - let k = k - 1; - } - return y; - } - - /** Returns the greater number. */ - function int max(int a, int b) { - if (a > b) { - return a; - } else { - return b; - } - } - - /** Returns the smaller number. */ - function int min(int a, int b) { - if (a < b) { - return a; - } else { - return b; - } - } -} diff --git a/projects/12/MathTest/Math.vm b/projects/12/MathTest/Math.vm deleted file mode 100644 index 513fc1a..0000000 --- a/projects/12/MathTest/Math.vm +++ /dev/null @@ -1,472 +0,0 @@ -function Math.init 2 -push constant 1 -pop local 1 -push constant 0 -pop local 0 -push constant 16 -call Array.new 1 -pop static 0 -label WHILE_EXP0 -push local 0 -push constant 16 -lt -not -if-goto WHILE_END0 -push local 0 -push static 0 -add -push local 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push local 1 -add -pop local 1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Math.bit 0 -push argument 0 -push argument 1 -push static 0 -add -pop pointer 1 -push that 0 -and -push constant 0 -eq -not -return -function Math.sign 0 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 1 -return -goto IF_END0 -label IF_FALSE0 -push argument 0 -push constant 0 -lt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 1 -neg -return -goto IF_END1 -label IF_FALSE1 -push constant 0 -return -label IF_END1 -label IF_END0 -function Math.abs 0 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 0 -neg -return -label IF_END0 -function Math.multiply 3 -push argument 0 -pop local 1 -push constant 0 -pop local 2 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 2 -push constant 16 -lt -not -if-goto WHILE_END0 -push argument 1 -push local 2 -call Math.bit 2 -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push local 0 -push local 1 -add -pop local 0 -label IF_FALSE0 -push local 1 -push local 1 -add -pop local 1 -push local 2 -push constant 1 -add -pop local 2 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.divide 2 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 1 -push constant 0 -gt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push argument 0 -push argument 1 -call Math.divide1 2 -return -goto IF_END1 -label IF_FALSE1 -push argument 0 -push argument 1 -neg -call Math.divide1 2 -neg -return -label IF_END1 -goto IF_END0 -label IF_FALSE0 -push argument 1 -push constant 0 -gt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push argument 0 -neg -push argument 1 -call Math.divide1 2 -neg -return -goto IF_END2 -label IF_FALSE2 -push argument 0 -neg -push argument 1 -neg -call Math.divide1 2 -return -label IF_END2 -label IF_END0 -function Math.divide1 1 -push argument 1 -push constant 0 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 24 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 122 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 1 -push argument 0 -gt -push argument 1 -push constant 0 -lt -or -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 0 -return -label IF_FALSE1 -push argument 0 -push argument 1 -push constant 2 -call Math.multiply 2 -call Math.divide1 2 -pop local 0 -push argument 0 -push constant 2 -push local 0 -call Math.multiply 2 -push argument 1 -call Math.multiply 2 -sub -push argument 1 -lt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 2 -push local 0 -call Math.multiply 2 -return -goto IF_END2 -label IF_FALSE2 -push constant 2 -push local 0 -call Math.multiply 2 -push constant 1 -add -return -label IF_END2 -function Math.length 1 -push constant 14 -pop local 0 -label WHILE_EXP0 -push local 0 -push static 0 -add -pop pointer 1 -push that 0 -push argument 0 -gt -not -if-goto WHILE_END0 -push local 0 -push constant 1 -sub -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.sqrt 4 -push argument 0 -push constant 0 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 40 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 113 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 0 -call Math.length 1 -push constant 2 -call Math.divide 2 -pop local 1 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 1 -push constant 0 -lt -not -not -if-goto WHILE_END0 -push local 0 -push local 1 -push static 0 -add -pop pointer 1 -push that 0 -add -pop local 2 -push local 2 -push local 2 -call Math.multiply 2 -pop local 3 -push local 3 -push argument 0 -gt -not -push local 3 -push constant 0 -gt -and -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 2 -pop local 0 -label IF_FALSE1 -push local 1 -push constant 1 -sub -pop local 1 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.max 0 -push argument 0 -push argument 1 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 1 -return -label IF_END0 -function Math.min 0 -push argument 0 -push argument 1 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 1 -return -label IF_END0 diff --git a/projects/12/MathTest/MathTest.cmp b/projects/12/MathTest/MathTest.cmp deleted file mode 100644 index 703c1be..0000000 --- a/projects/12/MathTest/MathTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[8000]|RAM[8001]|RAM[8002]|RAM[8003]|RAM[8004]|RAM[8005]|RAM[8006]|RAM[8007]|RAM[8008]|RAM[8009]|RAM[8010]|RAM[8011]|RAM[8012]|RAM[8013]| -| 6 | -180 | -18000 | -18000 | 0 | 3 | -3000 | 0 | 3 | 181 | 123 | 123 | 27 | 32767 | diff --git a/projects/12/MathTest/MathTest.out b/projects/12/MathTest/MathTest.out deleted file mode 100644 index 8b5a504..0000000 --- a/projects/12/MathTest/MathTest.out +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[8000]|RAM[8001]|RAM[8002]|RAM[8003]|RAM[8004]|RAM[8005]|RAM[8006]|RAM[8007]|RAM[8008]|RAM[8009]|RAM[8010]|RAM[8011]|RAM[8012]|RAM[8013]| -| 6 | -180 | -18000 | -18000 | 0 | 3 | -3000 | 0 | 3 | 181 | 123 | 123 | 27 | 32767 | diff --git a/projects/12/MathTest/MathTest.tst b/projects/12/MathTest/MathTest.tst deleted file mode 100644 index 127dbb4..0000000 --- a/projects/12/MathTest/MathTest.tst +++ /dev/null @@ -1,15 +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/12/MathTest/MathTest.tst - -load, -output-file MathTest.out, -compare-to MathTest.cmp, -output-list RAM[8000]%D2.6.1 RAM[8001]%D2.6.1 RAM[8002]%D2.6.1 RAM[8003]%D2.6.1 RAM[8004]%D2.6.1 RAM[8005]%D2.6.1 RAM[8006]%D2.6.1 RAM[8007]%D2.6.1 RAM[8008]%D2.6.1 RAM[8009]%D2.6.1 RAM[8010]%D2.6.1 RAM[8011]%D2.6.1 RAM[8012]%D2.6.1 RAM[8013]%D2.6.1; - -repeat 1000000 { - vmstep; -} - -output; diff --git a/projects/12/Memory.jack b/projects/12/Memory.jack deleted file mode 100644 index 54e04aa..0000000 --- a/projects/12/Memory.jack +++ /dev/null @@ -1,72 +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/12/Memory.jack - -/** - * This library provides two services: direct access to the computer's main - * memory (RAM), and allocation and recycling of memory blocks. The Hack RAM - * consists of 32,768 words, each holding a 16-bit binary number. - */ -class Memory { - static Array memory; - static Array heap; - static int last; - - /** Initializes the class. */ - function void init() { - let memory = 0; - let heap = 2048; - let heap[0] = -1; - let heap[1] = 14334; - let last = 0; - return; - } - - /** Returns the RAM value at the given address. */ - function int peek(int address) { - return memory[address]; - } - - /** Sets the RAM value at the given address to the given value. */ - function void poke(int address, int value) { - let memory[address] = value; - return; - } - - /** Finds an available RAM block of the given size and returns - * a reference to its base address. */ - function int alloc(int size) { - var int current; - var int size2; - var int newLast; - let current = 0; - let size2 = size + 2; - while ((current > -1) & (heap[current + 1] < size2)) { - let current = heap[current]; - } - if (current = -1) { - do String.println("Insufficient space for allocation!"); - do Sys.error(1); - return -1; - } else { - let heap[current + 1] = heap[current + 1] - size2; - let newLast = current + heap[current + 1] + 2; - let heap[newLast] = heap[current]; - let heap[current] = newLast; - let heap[newLast + 1] = size; - return heap + newLast + 2; - } - } - - /** De-allocates the given object (cast as an array) by making - * it available for future allocations. */ - function void deAlloc(Array o) { - var int oBase; - let oBase = o - heap - 2; - let heap[oBase] = -1; - let heap[last] = oBase; - let last = oBase; - return; - } -} diff --git a/projects/12/MemoryTest/Main.jack b/projects/12/MemoryTest/Main.jack deleted file mode 100644 index 77a53a9..0000000 --- a/projects/12/MemoryTest/Main.jack +++ /dev/null @@ -1,42 +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/12/MemoryTest/Main.jack - -/** Test program for the OS Memory class. */ -class Main { - - /** Performs various memory manipulations. */ - function void main() { - var int temp; - var Array a, b, c; - - do Memory.poke(8000, 333); // RAM[8000] = 333 - let temp = Memory.peek(8000); - do Memory.poke(8001, temp + 1); // RAM[8001] = 334 - - let a = Array.new(3); // uses Memory.alloc - let a[2] = 222; - do Memory.poke(8002, a[2]); // RAM[8002] = 222 - - let b = Array.new(3); - let b[1] = a[2] - 100; - do Memory.poke(8003, b[1]); // RAM[8003] = 122 - - let c = Array.new(500); - let c[499] = a[2] - b[1]; - do Memory.poke(8004, c[499]); // RAM[8004] = 100 - - do a.dispose(); // uses Memory.deAlloc - do b.dispose(); - - let b = Array.new(3); - let b[0] = c[499] - 90; - do Memory.poke(8005, b[0]); // RAM[8005] = 10 - - do c.dispose(); - do b.dispose(); - - return; - } -} diff --git a/projects/12/MemoryTest/Main.vm b/projects/12/MemoryTest/Main.vm deleted file mode 100644 index a3a9e81..0000000 --- a/projects/12/MemoryTest/Main.vm +++ /dev/null @@ -1,126 +0,0 @@ -function Main.main 4 -push constant 8000 -push constant 333 -call Memory.poke 2 -pop temp 0 -push constant 8000 -call Memory.peek 1 -pop local 0 -push constant 8001 -push local 0 -push constant 1 -add -call Memory.poke 2 -pop temp 0 -push constant 3 -call Array.new 1 -pop local 1 -push constant 2 -push local 1 -add -push constant 222 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8002 -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -call Memory.poke 2 -pop temp 0 -push constant 3 -call Array.new 1 -pop local 2 -push constant 1 -push local 2 -add -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -push constant 100 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8003 -push constant 1 -push local 2 -add -pop pointer 1 -push that 0 -call Memory.poke 2 -pop temp 0 -push constant 500 -call Array.new 1 -pop local 3 -push constant 499 -push local 3 -add -push constant 2 -push local 1 -add -pop pointer 1 -push that 0 -push constant 1 -push local 2 -add -pop pointer 1 -push that 0 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8004 -push constant 499 -push local 3 -add -pop pointer 1 -push that 0 -call Memory.poke 2 -pop temp 0 -push local 1 -call Array.dispose 1 -pop temp 0 -push local 2 -call Array.dispose 1 -pop temp 0 -push constant 3 -call Array.new 1 -pop local 2 -push constant 0 -push local 2 -add -push constant 499 -push local 3 -add -pop pointer 1 -push that 0 -push constant 90 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8005 -push constant 0 -push local 2 -add -pop pointer 1 -push that 0 -call Memory.poke 2 -pop temp 0 -push local 3 -call Array.dispose 1 -pop temp 0 -push local 2 -call Array.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/MemoryTest/Memory.jack b/projects/12/MemoryTest/Memory.jack deleted file mode 100644 index 54e04aa..0000000 --- a/projects/12/MemoryTest/Memory.jack +++ /dev/null @@ -1,72 +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/12/Memory.jack - -/** - * This library provides two services: direct access to the computer's main - * memory (RAM), and allocation and recycling of memory blocks. The Hack RAM - * consists of 32,768 words, each holding a 16-bit binary number. - */ -class Memory { - static Array memory; - static Array heap; - static int last; - - /** Initializes the class. */ - function void init() { - let memory = 0; - let heap = 2048; - let heap[0] = -1; - let heap[1] = 14334; - let last = 0; - return; - } - - /** Returns the RAM value at the given address. */ - function int peek(int address) { - return memory[address]; - } - - /** Sets the RAM value at the given address to the given value. */ - function void poke(int address, int value) { - let memory[address] = value; - return; - } - - /** Finds an available RAM block of the given size and returns - * a reference to its base address. */ - function int alloc(int size) { - var int current; - var int size2; - var int newLast; - let current = 0; - let size2 = size + 2; - while ((current > -1) & (heap[current + 1] < size2)) { - let current = heap[current]; - } - if (current = -1) { - do String.println("Insufficient space for allocation!"); - do Sys.error(1); - return -1; - } else { - let heap[current + 1] = heap[current + 1] - size2; - let newLast = current + heap[current + 1] + 2; - let heap[newLast] = heap[current]; - let heap[current] = newLast; - let heap[newLast + 1] = size; - return heap + newLast + 2; - } - } - - /** De-allocates the given object (cast as an array) by making - * it available for future allocations. */ - function void deAlloc(Array o) { - var int oBase; - let oBase = o - heap - 2; - let heap[oBase] = -1; - let heap[last] = oBase; - let last = oBase; - return; - } -} diff --git a/projects/12/MemoryTest/Memory.vm b/projects/12/MemoryTest/Memory.vm deleted file mode 100644 index 0570b46..0000000 --- a/projects/12/MemoryTest/Memory.vm +++ /dev/null @@ -1,258 +0,0 @@ -function Memory.init 0 -push constant 0 -pop static 0 -push constant 2048 -pop static 1 -push constant 0 -push static 1 -add -push constant 1 -neg -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push static 1 -add -push constant 14334 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -pop static 2 -push constant 0 -return -function Memory.peek 0 -push argument 0 -push static 0 -add -pop pointer 1 -push that 0 -return -function Memory.poke 0 -push argument 0 -push static 0 -add -push argument 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return -function Memory.alloc 3 -push constant 0 -pop local 0 -push argument 0 -push constant 2 -add -pop local 1 -label WHILE_EXP0 -push local 0 -push constant 1 -neg -gt -push local 0 -push constant 1 -add -push static 1 -add -pop pointer 1 -push that 0 -push local 1 -lt -and -not -if-goto WHILE_END0 -push local 0 -push static 1 -add -pop pointer 1 -push that 0 -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -push constant 1 -neg -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 34 -call String.new 1 -push constant 73 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call String.println 1 -pop temp 0 -push constant 1 -call Sys.error 1 -pop temp 0 -push constant 1 -neg -return -goto IF_END0 -label IF_FALSE0 -push local 0 -push constant 1 -add -push static 1 -add -push local 0 -push constant 1 -add -push static 1 -add -pop pointer 1 -push that 0 -push local 1 -sub -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 0 -push local 0 -push constant 1 -add -push static 1 -add -pop pointer 1 -push that 0 -add -push constant 2 -add -pop local 2 -push local 2 -push static 1 -add -push local 0 -push static 1 -add -pop pointer 1 -push that 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 0 -push static 1 -add -push local 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 2 -push constant 1 -add -push static 1 -add -push argument 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push static 1 -push local 2 -add -push constant 2 -add -return -label IF_END0 -function Memory.deAlloc 1 -push argument 0 -push static 1 -sub -push constant 2 -sub -pop local 0 -push local 0 -push static 1 -add -push constant 1 -neg -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push static 2 -push static 1 -add -push local 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 0 -pop static 2 -push constant 0 -return diff --git a/projects/12/MemoryTest/MemoryTest.cmp b/projects/12/MemoryTest/MemoryTest.cmp deleted file mode 100644 index 057958b..0000000 --- a/projects/12/MemoryTest/MemoryTest.cmp +++ /dev/null @@ -1,2 +0,0 @@ -|RAM[8000]|RAM[8001]|RAM[8002]|RAM[8003]|RAM[8004]|RAM[8005]| -| 333 | 334 | 222 | 122 | 100 | 10 | diff --git a/projects/12/MemoryTest/MemoryTest.out b/projects/12/MemoryTest/MemoryTest.out deleted file mode 100644 index e69de29..0000000 diff --git a/projects/12/MemoryTest/MemoryTest.tst b/projects/12/MemoryTest/MemoryTest.tst deleted file mode 100644 index 1da34fd..0000000 --- a/projects/12/MemoryTest/MemoryTest.tst +++ /dev/null @@ -1,15 +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/12/MemoryTest/MemoryTest.tst - -load, -output-file MemoryTest.out, -compare-to MemoryTest.cmp, -output-list RAM[8000]%D2.6.1 RAM[8001]%D2.6.1 RAM[8002]%D2.6.1 RAM[8003]%D2.6.1 RAM[8004]%D2.6.1 RAM[8005]%D2.6.1; - -repeat 1000000 { - vmstep; -} - -output; diff --git a/projects/12/Output.jack b/projects/12/Output.jack deleted file mode 100644 index 61b24de..0000000 --- a/projects/12/Output.jack +++ /dev/null @@ -1,281 +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/12/Output.jack - -/** - * A library of functions for writing text on the screen. - * The Hack physical screen consists of 512 rows of 256 pixels each. - * The library uses a fixed font, in which each character is displayed - * within a frame which is 11 pixels high (including 1 pixel for inter-line - * spacing) and 8 pixels wide (including 2 pixels for inter-character spacing). - * The resulting grid accommodates 23 rows (indexed 0..22, top to bottom) - * of 64 characters each (indexed 0..63, left to right). The top left - * character position on the screen is indexed (0,0). A cursor, implemented - * as a small filled square, indicates where the next character will be displayed. - */ -class Output { - - // Character map for displaying characters - static Array charMaps; - static int cursorI, cursorJ; - - /** Initializes the screen, and locates the cursor at the screen's top-left. */ - function void init() { - do Output.initMap(); - do Output.moveCursor(0, 0); - return; - } - - // Initializes the character map array - function void initMap() { - var int i; - - let charMaps = Array.new(127); - - // Black square, used for displaying non-printable characters. - do Output.create(0,63,63,63,63,63,63,63,63,63,0,0); - - // Assigns the bitmap for each character in the charachter set. - // The first parameter is the character index, the next 11 numbers - // are the values of each row in the frame that represents this character. - do Output.create(32,0,0,0,0,0,0,0,0,0,0,0); // - do Output.create(33,12,30,30,30,12,12,0,12,12,0,0); // ! - do Output.create(34,54,54,20,0,0,0,0,0,0,0,0); // " - do Output.create(35,0,18,18,63,18,18,63,18,18,0,0); // # - do Output.create(36,12,30,51,3,30,48,51,30,12,12,0); // $ - do Output.create(37,0,0,35,51,24,12,6,51,49,0,0); // % - do Output.create(38,12,30,30,12,54,27,27,27,54,0,0); // & - do Output.create(39,12,12,6,0,0,0,0,0,0,0,0); // ' - do Output.create(40,24,12,6,6,6,6,6,12,24,0,0); // ( - do Output.create(41,6,12,24,24,24,24,24,12,6,0,0); // ) - do Output.create(42,0,0,0,51,30,63,30,51,0,0,0); // * - do Output.create(43,0,0,0,12,12,63,12,12,0,0,0); // + - do Output.create(44,0,0,0,0,0,0,0,12,12,6,0); // , - do Output.create(45,0,0,0,0,0,63,0,0,0,0,0); // - - do Output.create(46,0,0,0,0,0,0,0,12,12,0,0); // . - do Output.create(47,0,0,32,48,24,12,6,3,1,0,0); // / - - do Output.create(48,12,30,51,51,51,51,51,30,12,0,0); // 0 - do Output.create(49,12,14,15,12,12,12,12,12,63,0,0); // 1 - do Output.create(50,30,51,48,24,12,6,3,51,63,0,0); // 2 - do Output.create(51,30,51,48,48,28,48,48,51,30,0,0); // 3 - do Output.create(52,16,24,28,26,25,63,24,24,60,0,0); // 4 - do Output.create(53,63,3,3,31,48,48,48,51,30,0,0); // 5 - do Output.create(54,28,6,3,3,31,51,51,51,30,0,0); // 6 - do Output.create(55,63,49,48,48,24,12,12,12,12,0,0); // 7 - do Output.create(56,30,51,51,51,30,51,51,51,30,0,0); // 8 - do Output.create(57,30,51,51,51,62,48,48,24,14,0,0); // 9 - - do Output.create(58,0,0,12,12,0,0,12,12,0,0,0); // : - do Output.create(59,0,0,12,12,0,0,12,12,6,0,0); // ; - do Output.create(60,0,0,24,12,6,3,6,12,24,0,0); // < - do Output.create(61,0,0,0,63,0,0,63,0,0,0,0); // = - do Output.create(62,0,0,3,6,12,24,12,6,3,0,0); // > - do Output.create(64,30,51,51,59,59,59,27,3,30,0,0); // @ - do Output.create(63,30,51,51,24,12,12,0,12,12,0,0); // ? - - do Output.create(65,12,12,30,30,51,51,63,51,51,0,0); // A - do Output.create(66,31,51,51,51,31,51,51,51,31,0,0); // B - do Output.create(67,28,54,35,3,3,3,35,54,28,0,0); // C - do Output.create(68,15,27,51,51,51,51,51,27,15,0,0); // D - do Output.create(69,63,51,35,11,15,11,35,51,63,0,0); // E - do Output.create(70,63,51,35,11,15,11,3,3,3,0,0); // F - do Output.create(71,28,54,35,3,59,51,51,54,44,0,0); // G - do Output.create(72,51,51,51,51,63,51,51,51,51,0,0); // H - do Output.create(73,30,12,12,12,12,12,12,12,30,0,0); // I - do Output.create(74,60,24,24,24,24,24,27,27,14,0,0); // J - do Output.create(75,51,51,51,27,15,27,51,51,51,0,0); // K - do Output.create(76,3,3,3,3,3,3,35,51,63,0,0); // L - do Output.create(77,33,51,63,63,51,51,51,51,51,0,0); // M - do Output.create(78,51,51,55,55,63,59,59,51,51,0,0); // N - do Output.create(79,30,51,51,51,51,51,51,51,30,0,0); // O - do Output.create(80,31,51,51,51,31,3,3,3,3,0,0); // P - do Output.create(81,30,51,51,51,51,51,63,59,30,48,0);// Q - do Output.create(82,31,51,51,51,31,27,51,51,51,0,0); // R - do Output.create(83,30,51,51,6,28,48,51,51,30,0,0); // S - do Output.create(84,63,63,45,12,12,12,12,12,30,0,0); // T - do Output.create(85,51,51,51,51,51,51,51,51,30,0,0); // U - do Output.create(86,51,51,51,51,51,30,30,12,12,0,0); // V - do Output.create(87,51,51,51,51,51,63,63,63,18,0,0); // W - do Output.create(88,51,51,30,30,12,30,30,51,51,0,0); // X - do Output.create(89,51,51,51,51,30,12,12,12,30,0,0); // Y - do Output.create(90,63,51,49,24,12,6,35,51,63,0,0); // Z - - do Output.create(91,30,6,6,6,6,6,6,6,30,0,0); // [ - do Output.create(92,0,0,1,3,6,12,24,48,32,0,0); // \ - do Output.create(93,30,24,24,24,24,24,24,24,30,0,0); // ] - do Output.create(94,8,28,54,0,0,0,0,0,0,0,0); // ^ - do Output.create(95,0,0,0,0,0,0,0,0,0,63,0); // _ - do Output.create(96,6,12,24,0,0,0,0,0,0,0,0); // ` - - do Output.create(97,0,0,0,14,24,30,27,27,54,0,0); // a - do Output.create(98,3,3,3,15,27,51,51,51,30,0,0); // b - do Output.create(99,0,0,0,30,51,3,3,51,30,0,0); // c - do Output.create(100,48,48,48,60,54,51,51,51,30,0,0); // d - do Output.create(101,0,0,0,30,51,63,3,51,30,0,0); // e - do Output.create(102,28,54,38,6,15,6,6,6,15,0,0); // f - do Output.create(103,0,0,30,51,51,51,62,48,51,30,0); // g - do Output.create(104,3,3,3,27,55,51,51,51,51,0,0); // h - do Output.create(105,12,12,0,14,12,12,12,12,30,0,0); // i - do Output.create(106,48,48,0,56,48,48,48,48,51,30,0); // j - do Output.create(107,3,3,3,51,27,15,15,27,51,0,0); // k - do Output.create(108,14,12,12,12,12,12,12,12,30,0,0); // l - do Output.create(109,0,0,0,29,63,43,43,43,43,0,0); // m - do Output.create(110,0,0,0,29,51,51,51,51,51,0,0); // n - do Output.create(111,0,0,0,30,51,51,51,51,30,0,0); // o - do Output.create(112,0,0,0,30,51,51,51,31,3,3,0); // p - do Output.create(113,0,0,0,30,51,51,51,62,48,48,0); // q - do Output.create(114,0,0,0,29,55,51,3,3,7,0,0); // r - do Output.create(115,0,0,0,30,51,6,24,51,30,0,0); // s - do Output.create(116,4,6,6,15,6,6,6,54,28,0,0); // t - do Output.create(117,0,0,0,27,27,27,27,27,54,0,0); // u - do Output.create(118,0,0,0,51,51,51,51,30,12,0,0); // v - do Output.create(119,0,0,0,51,51,51,63,63,18,0,0); // w - do Output.create(120,0,0,0,51,30,12,12,30,51,0,0); // x - do Output.create(121,0,0,0,51,51,51,62,48,24,15,0); // y - do Output.create(122,0,0,0,63,27,12,6,51,63,0,0); // z - - do Output.create(123,56,12,12,12,7,12,12,12,56,0,0); // { - do Output.create(124,12,12,12,12,12,12,12,12,12,0,0); // | - do Output.create(125,7,12,12,12,56,12,12,12,7,0,0); // } - do Output.create(126,38,45,25,0,0,0,0,0,0,0,0); // ~ - - return; - } - - // Creates the character map array of the given character index, using the given values. - function void create(int index, int a, int b, int c, int d, int e, - int f, int g, int h, int i, int j, int k) { - var Array map; - - let map = Array.new(11); - let charMaps[index] = map; - - let map[0] = a; - let map[1] = b; - let map[2] = c; - let map[3] = d; - let map[4] = e; - let map[5] = f; - let map[6] = g; - let map[7] = h; - let map[8] = i; - let map[9] = j; - let map[10] = k; - - return; - } - - // Returns the character map (array of size 11) of the given character. - // If the given character is invalid or non-printable, returns the - // character map of a black square. - function Array getMap(char c) { - if ((c < 32) | (c > 126)) { - let c = 0; - } - return charMaps[c]; - } - - /** Moves the cursor to the j-th column of the i-th row, - * and erases the character displayed there. */ - function void moveCursor(int i, int j) { - var int x, y; - let x = cursorJ * 8; - let y = cursorI * 11; - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + 7, y + 10); - let x = j * 8; - let y = i * 11; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 7, y + 10); - let cursorI = i; - let cursorJ = j; - return; - } - - /** Displays the given character at the cursor location, - * and advances the cursor one column forward. */ - function void printChar(char c) { - var int k, x, y, addr; - var Array cm; - if (c = 129) { - do Output.backSpace(); - return; - } - if (cursorI = 22) { - if (c = 128) { - return; - } - if (cursorJ = 63) { - return; - } - } - if (c = 128) { - do Output.println(); - return; - } - let k = 0; - let x = cursorJ / 2; - let y = cursorJ - (x * 2); // y = 0: lsb, y = 1: msb - let addr = cursorI * 352 + x + 16384; - let cm = Output.getMap(c); - if (cursorJ = 63) { - do Output.moveCursor(cursorI + 1, 0); - } else { - do Output.moveCursor(cursorI, cursorJ + 1); - } - while (k < 11) { - if (y = 0){ - do Memory.poke(addr, Memory.peek(addr) & (-128) + cm[k]); - } else { - do Memory.poke(addr, Memory.peek(addr) & 255 + (cm[k] * 256)); - } - let k = k + 1; - let addr = addr + 32; - } - return; - } - - /** displays the given string starting at the cursor location, - * and advances the cursor appropriately. */ - function void printString(String s) { - var int i; - var int n; - let i = 0; - let n = s.length(); - while (i < n) { - do Output.printChar(s.charAt(i)); - let i = i + 1; - } - return; - } - - /** Displays the given integer starting at the cursor location, - * and advances the cursor appropriately. */ - function void printInt(int i) { - var String s; - let s = String.new(6); - do s.setInt(i); - do Output.printString(s); - return; - } - - /** Advances the cursor to the beginning of the next line. */ - function void println() { - if (cursorI < 22) { - do Output.moveCursor(cursorI + 1, 0); - } - return; - } - - /** Moves the cursor one column back. */ - function void backSpace() { - if (cursorJ > 0) { - do Output.moveCursor(cursorI, cursorJ - 1); - } else { - do Output.moveCursor(cursorI - 1, 63); - } - return; - } -} diff --git a/projects/12/OutputTest/Main.jack b/projects/12/OutputTest/Main.jack deleted file mode 100644 index f243068..0000000 --- a/projects/12/OutputTest/Main.jack +++ /dev/null @@ -1,42 +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/12/OutputTest/Main.jack - -/** Test program for the OS Output class. */ -class Main { - - /** Outputs the entire character set to the screen using all the - * methods of the Output class. */ - function void main() { - var String s; - - let s = String.new(1); - do s.appendChar(String.doubleQuote()); - - do Output.moveCursor(0, 63); - do Output.printChar(66); - do Output.moveCursor(22, 0); - do Output.printChar(67); - do Output.moveCursor(22, 63); - do Output.printChar(68); - do Output.printChar(65); - - do Output.moveCursor(2, 0); - do Output.printString("0123456789"); - do Output.println(); - - do Output.printString("ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"); - do Output.println(); - - do Output.printString("!#$%&'()*+,-./:;<=>?@[\]^_`{|}~"); - do Output.printString(s); - do Output.println(); - - do Output.printInt(-12345); - do Output.backSpace(); - do Output.printInt(6789); - - return; - } -} diff --git a/projects/12/OutputTest/Main.vm b/projects/12/OutputTest/Main.vm deleted file mode 100644 index 0a4c951..0000000 --- a/projects/12/OutputTest/Main.vm +++ /dev/null @@ -1,254 +0,0 @@ -function Main.main 1 -push constant 1 -call String.new 1 -pop local 0 -push local 0 -call String.doubleQuote 0 -call String.appendChar 2 -pop temp 0 -push constant 0 -push constant 63 -call Output.moveCursor 2 -pop temp 0 -push constant 66 -call Output.printChar 1 -pop temp 0 -push constant 22 -push constant 0 -call Output.moveCursor 2 -pop temp 0 -push constant 67 -call Output.printChar 1 -pop temp 0 -push constant 22 -push constant 63 -call Output.moveCursor 2 -pop temp 0 -push constant 68 -call Output.printChar 1 -pop temp 0 -push constant 65 -call Output.printChar 1 -pop temp 0 -push constant 2 -push constant 0 -call Output.moveCursor 2 -pop temp 0 -push constant 10 -call String.new 1 -push constant 48 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 52 -call String.appendChar 2 -push constant 53 -call String.appendChar 2 -push constant 54 -call String.appendChar 2 -push constant 55 -call String.appendChar 2 -push constant 56 -call String.appendChar 2 -push constant 57 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 53 -call String.new 1 -push constant 65 -call String.appendChar 2 -push constant 66 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 68 -call String.appendChar 2 -push constant 69 -call String.appendChar 2 -push constant 70 -call String.appendChar 2 -push constant 71 -call String.appendChar 2 -push constant 72 -call String.appendChar 2 -push constant 73 -call String.appendChar 2 -push constant 74 -call String.appendChar 2 -push constant 75 -call String.appendChar 2 -push constant 76 -call String.appendChar 2 -push constant 77 -call String.appendChar 2 -push constant 78 -call String.appendChar 2 -push constant 79 -call String.appendChar 2 -push constant 80 -call String.appendChar 2 -push constant 81 -call String.appendChar 2 -push constant 82 -call String.appendChar 2 -push constant 83 -call String.appendChar 2 -push constant 84 -call String.appendChar 2 -push constant 85 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 87 -call String.appendChar 2 -push constant 88 -call String.appendChar 2 -push constant 89 -call String.appendChar 2 -push constant 90 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 106 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 113 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 122 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 30 -call String.new 1 -push constant 33 -call String.appendChar 2 -push constant 35 -call String.appendChar 2 -push constant 36 -call String.appendChar 2 -push constant 37 -call String.appendChar 2 -push constant 38 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 40 -call String.appendChar 2 -push constant 41 -call String.appendChar 2 -push constant 42 -call String.appendChar 2 -push constant 43 -call String.appendChar 2 -push constant 44 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 47 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 59 -call String.appendChar 2 -push constant 60 -call String.appendChar 2 -push constant 61 -call String.appendChar 2 -push constant 62 -call String.appendChar 2 -push constant 63 -call String.appendChar 2 -push constant 64 -call String.appendChar 2 -push constant 91 -call String.appendChar 2 -push constant 93 -call String.appendChar 2 -push constant 94 -call String.appendChar 2 -push constant 95 -call String.appendChar 2 -push constant 96 -call String.appendChar 2 -push constant 123 -call String.appendChar 2 -push constant 124 -call String.appendChar 2 -push constant 125 -call String.appendChar 2 -push constant 126 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 12345 -neg -call Output.printInt 1 -pop temp 0 -call Output.backSpace 0 -pop temp 0 -push constant 6789 -call Output.printInt 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/OutputTest/Output.jack b/projects/12/OutputTest/Output.jack deleted file mode 100644 index 61b24de..0000000 --- a/projects/12/OutputTest/Output.jack +++ /dev/null @@ -1,281 +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/12/Output.jack - -/** - * A library of functions for writing text on the screen. - * The Hack physical screen consists of 512 rows of 256 pixels each. - * The library uses a fixed font, in which each character is displayed - * within a frame which is 11 pixels high (including 1 pixel for inter-line - * spacing) and 8 pixels wide (including 2 pixels for inter-character spacing). - * The resulting grid accommodates 23 rows (indexed 0..22, top to bottom) - * of 64 characters each (indexed 0..63, left to right). The top left - * character position on the screen is indexed (0,0). A cursor, implemented - * as a small filled square, indicates where the next character will be displayed. - */ -class Output { - - // Character map for displaying characters - static Array charMaps; - static int cursorI, cursorJ; - - /** Initializes the screen, and locates the cursor at the screen's top-left. */ - function void init() { - do Output.initMap(); - do Output.moveCursor(0, 0); - return; - } - - // Initializes the character map array - function void initMap() { - var int i; - - let charMaps = Array.new(127); - - // Black square, used for displaying non-printable characters. - do Output.create(0,63,63,63,63,63,63,63,63,63,0,0); - - // Assigns the bitmap for each character in the charachter set. - // The first parameter is the character index, the next 11 numbers - // are the values of each row in the frame that represents this character. - do Output.create(32,0,0,0,0,0,0,0,0,0,0,0); // - do Output.create(33,12,30,30,30,12,12,0,12,12,0,0); // ! - do Output.create(34,54,54,20,0,0,0,0,0,0,0,0); // " - do Output.create(35,0,18,18,63,18,18,63,18,18,0,0); // # - do Output.create(36,12,30,51,3,30,48,51,30,12,12,0); // $ - do Output.create(37,0,0,35,51,24,12,6,51,49,0,0); // % - do Output.create(38,12,30,30,12,54,27,27,27,54,0,0); // & - do Output.create(39,12,12,6,0,0,0,0,0,0,0,0); // ' - do Output.create(40,24,12,6,6,6,6,6,12,24,0,0); // ( - do Output.create(41,6,12,24,24,24,24,24,12,6,0,0); // ) - do Output.create(42,0,0,0,51,30,63,30,51,0,0,0); // * - do Output.create(43,0,0,0,12,12,63,12,12,0,0,0); // + - do Output.create(44,0,0,0,0,0,0,0,12,12,6,0); // , - do Output.create(45,0,0,0,0,0,63,0,0,0,0,0); // - - do Output.create(46,0,0,0,0,0,0,0,12,12,0,0); // . - do Output.create(47,0,0,32,48,24,12,6,3,1,0,0); // / - - do Output.create(48,12,30,51,51,51,51,51,30,12,0,0); // 0 - do Output.create(49,12,14,15,12,12,12,12,12,63,0,0); // 1 - do Output.create(50,30,51,48,24,12,6,3,51,63,0,0); // 2 - do Output.create(51,30,51,48,48,28,48,48,51,30,0,0); // 3 - do Output.create(52,16,24,28,26,25,63,24,24,60,0,0); // 4 - do Output.create(53,63,3,3,31,48,48,48,51,30,0,0); // 5 - do Output.create(54,28,6,3,3,31,51,51,51,30,0,0); // 6 - do Output.create(55,63,49,48,48,24,12,12,12,12,0,0); // 7 - do Output.create(56,30,51,51,51,30,51,51,51,30,0,0); // 8 - do Output.create(57,30,51,51,51,62,48,48,24,14,0,0); // 9 - - do Output.create(58,0,0,12,12,0,0,12,12,0,0,0); // : - do Output.create(59,0,0,12,12,0,0,12,12,6,0,0); // ; - do Output.create(60,0,0,24,12,6,3,6,12,24,0,0); // < - do Output.create(61,0,0,0,63,0,0,63,0,0,0,0); // = - do Output.create(62,0,0,3,6,12,24,12,6,3,0,0); // > - do Output.create(64,30,51,51,59,59,59,27,3,30,0,0); // @ - do Output.create(63,30,51,51,24,12,12,0,12,12,0,0); // ? - - do Output.create(65,12,12,30,30,51,51,63,51,51,0,0); // A - do Output.create(66,31,51,51,51,31,51,51,51,31,0,0); // B - do Output.create(67,28,54,35,3,3,3,35,54,28,0,0); // C - do Output.create(68,15,27,51,51,51,51,51,27,15,0,0); // D - do Output.create(69,63,51,35,11,15,11,35,51,63,0,0); // E - do Output.create(70,63,51,35,11,15,11,3,3,3,0,0); // F - do Output.create(71,28,54,35,3,59,51,51,54,44,0,0); // G - do Output.create(72,51,51,51,51,63,51,51,51,51,0,0); // H - do Output.create(73,30,12,12,12,12,12,12,12,30,0,0); // I - do Output.create(74,60,24,24,24,24,24,27,27,14,0,0); // J - do Output.create(75,51,51,51,27,15,27,51,51,51,0,0); // K - do Output.create(76,3,3,3,3,3,3,35,51,63,0,0); // L - do Output.create(77,33,51,63,63,51,51,51,51,51,0,0); // M - do Output.create(78,51,51,55,55,63,59,59,51,51,0,0); // N - do Output.create(79,30,51,51,51,51,51,51,51,30,0,0); // O - do Output.create(80,31,51,51,51,31,3,3,3,3,0,0); // P - do Output.create(81,30,51,51,51,51,51,63,59,30,48,0);// Q - do Output.create(82,31,51,51,51,31,27,51,51,51,0,0); // R - do Output.create(83,30,51,51,6,28,48,51,51,30,0,0); // S - do Output.create(84,63,63,45,12,12,12,12,12,30,0,0); // T - do Output.create(85,51,51,51,51,51,51,51,51,30,0,0); // U - do Output.create(86,51,51,51,51,51,30,30,12,12,0,0); // V - do Output.create(87,51,51,51,51,51,63,63,63,18,0,0); // W - do Output.create(88,51,51,30,30,12,30,30,51,51,0,0); // X - do Output.create(89,51,51,51,51,30,12,12,12,30,0,0); // Y - do Output.create(90,63,51,49,24,12,6,35,51,63,0,0); // Z - - do Output.create(91,30,6,6,6,6,6,6,6,30,0,0); // [ - do Output.create(92,0,0,1,3,6,12,24,48,32,0,0); // \ - do Output.create(93,30,24,24,24,24,24,24,24,30,0,0); // ] - do Output.create(94,8,28,54,0,0,0,0,0,0,0,0); // ^ - do Output.create(95,0,0,0,0,0,0,0,0,0,63,0); // _ - do Output.create(96,6,12,24,0,0,0,0,0,0,0,0); // ` - - do Output.create(97,0,0,0,14,24,30,27,27,54,0,0); // a - do Output.create(98,3,3,3,15,27,51,51,51,30,0,0); // b - do Output.create(99,0,0,0,30,51,3,3,51,30,0,0); // c - do Output.create(100,48,48,48,60,54,51,51,51,30,0,0); // d - do Output.create(101,0,0,0,30,51,63,3,51,30,0,0); // e - do Output.create(102,28,54,38,6,15,6,6,6,15,0,0); // f - do Output.create(103,0,0,30,51,51,51,62,48,51,30,0); // g - do Output.create(104,3,3,3,27,55,51,51,51,51,0,0); // h - do Output.create(105,12,12,0,14,12,12,12,12,30,0,0); // i - do Output.create(106,48,48,0,56,48,48,48,48,51,30,0); // j - do Output.create(107,3,3,3,51,27,15,15,27,51,0,0); // k - do Output.create(108,14,12,12,12,12,12,12,12,30,0,0); // l - do Output.create(109,0,0,0,29,63,43,43,43,43,0,0); // m - do Output.create(110,0,0,0,29,51,51,51,51,51,0,0); // n - do Output.create(111,0,0,0,30,51,51,51,51,30,0,0); // o - do Output.create(112,0,0,0,30,51,51,51,31,3,3,0); // p - do Output.create(113,0,0,0,30,51,51,51,62,48,48,0); // q - do Output.create(114,0,0,0,29,55,51,3,3,7,0,0); // r - do Output.create(115,0,0,0,30,51,6,24,51,30,0,0); // s - do Output.create(116,4,6,6,15,6,6,6,54,28,0,0); // t - do Output.create(117,0,0,0,27,27,27,27,27,54,0,0); // u - do Output.create(118,0,0,0,51,51,51,51,30,12,0,0); // v - do Output.create(119,0,0,0,51,51,51,63,63,18,0,0); // w - do Output.create(120,0,0,0,51,30,12,12,30,51,0,0); // x - do Output.create(121,0,0,0,51,51,51,62,48,24,15,0); // y - do Output.create(122,0,0,0,63,27,12,6,51,63,0,0); // z - - do Output.create(123,56,12,12,12,7,12,12,12,56,0,0); // { - do Output.create(124,12,12,12,12,12,12,12,12,12,0,0); // | - do Output.create(125,7,12,12,12,56,12,12,12,7,0,0); // } - do Output.create(126,38,45,25,0,0,0,0,0,0,0,0); // ~ - - return; - } - - // Creates the character map array of the given character index, using the given values. - function void create(int index, int a, int b, int c, int d, int e, - int f, int g, int h, int i, int j, int k) { - var Array map; - - let map = Array.new(11); - let charMaps[index] = map; - - let map[0] = a; - let map[1] = b; - let map[2] = c; - let map[3] = d; - let map[4] = e; - let map[5] = f; - let map[6] = g; - let map[7] = h; - let map[8] = i; - let map[9] = j; - let map[10] = k; - - return; - } - - // Returns the character map (array of size 11) of the given character. - // If the given character is invalid or non-printable, returns the - // character map of a black square. - function Array getMap(char c) { - if ((c < 32) | (c > 126)) { - let c = 0; - } - return charMaps[c]; - } - - /** Moves the cursor to the j-th column of the i-th row, - * and erases the character displayed there. */ - function void moveCursor(int i, int j) { - var int x, y; - let x = cursorJ * 8; - let y = cursorI * 11; - do Screen.setColor(false); - do Screen.drawRectangle(x, y, x + 7, y + 10); - let x = j * 8; - let y = i * 11; - do Screen.setColor(true); - do Screen.drawRectangle(x, y, x + 7, y + 10); - let cursorI = i; - let cursorJ = j; - return; - } - - /** Displays the given character at the cursor location, - * and advances the cursor one column forward. */ - function void printChar(char c) { - var int k, x, y, addr; - var Array cm; - if (c = 129) { - do Output.backSpace(); - return; - } - if (cursorI = 22) { - if (c = 128) { - return; - } - if (cursorJ = 63) { - return; - } - } - if (c = 128) { - do Output.println(); - return; - } - let k = 0; - let x = cursorJ / 2; - let y = cursorJ - (x * 2); // y = 0: lsb, y = 1: msb - let addr = cursorI * 352 + x + 16384; - let cm = Output.getMap(c); - if (cursorJ = 63) { - do Output.moveCursor(cursorI + 1, 0); - } else { - do Output.moveCursor(cursorI, cursorJ + 1); - } - while (k < 11) { - if (y = 0){ - do Memory.poke(addr, Memory.peek(addr) & (-128) + cm[k]); - } else { - do Memory.poke(addr, Memory.peek(addr) & 255 + (cm[k] * 256)); - } - let k = k + 1; - let addr = addr + 32; - } - return; - } - - /** displays the given string starting at the cursor location, - * and advances the cursor appropriately. */ - function void printString(String s) { - var int i; - var int n; - let i = 0; - let n = s.length(); - while (i < n) { - do Output.printChar(s.charAt(i)); - let i = i + 1; - } - return; - } - - /** Displays the given integer starting at the cursor location, - * and advances the cursor appropriately. */ - function void printInt(int i) { - var String s; - let s = String.new(6); - do s.setInt(i); - do Output.printString(s); - return; - } - - /** Advances the cursor to the beginning of the next line. */ - function void println() { - if (cursorI < 22) { - do Output.moveCursor(cursorI + 1, 0); - } - return; - } - - /** Moves the cursor one column back. */ - function void backSpace() { - if (cursorJ > 0) { - do Output.moveCursor(cursorI, cursorJ - 1); - } else { - do Output.moveCursor(cursorI - 1, 63); - } - return; - } -} diff --git a/projects/12/OutputTest/Output.vm b/projects/12/OutputTest/Output.vm deleted file mode 100644 index dd83b63..0000000 --- a/projects/12/OutputTest/Output.vm +++ /dev/null @@ -1,1757 +0,0 @@ -function Output.init 0 -call Output.initMap 0 -pop temp 0 -push constant 0 -push constant 0 -call Output.moveCursor 2 -pop temp 0 -push constant 0 -return -function Output.initMap 1 -push constant 127 -call Array.new 1 -pop static 0 -push constant 0 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 32 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 33 -push constant 12 -push constant 30 -push constant 30 -push constant 30 -push constant 12 -push constant 12 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 34 -push constant 54 -push constant 54 -push constant 20 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 35 -push constant 0 -push constant 18 -push constant 18 -push constant 63 -push constant 18 -push constant 18 -push constant 63 -push constant 18 -push constant 18 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 36 -push constant 12 -push constant 30 -push constant 51 -push constant 3 -push constant 30 -push constant 48 -push constant 51 -push constant 30 -push constant 12 -push constant 12 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 37 -push constant 0 -push constant 0 -push constant 35 -push constant 51 -push constant 24 -push constant 12 -push constant 6 -push constant 51 -push constant 49 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 38 -push constant 12 -push constant 30 -push constant 30 -push constant 12 -push constant 54 -push constant 27 -push constant 27 -push constant 27 -push constant 54 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 39 -push constant 12 -push constant 12 -push constant 6 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 40 -push constant 24 -push constant 12 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 12 -push constant 24 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 41 -push constant 6 -push constant 12 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 12 -push constant 6 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 42 -push constant 0 -push constant 0 -push constant 0 -push constant 51 -push constant 30 -push constant 63 -push constant 30 -push constant 51 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 43 -push constant 0 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 63 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 44 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 6 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 45 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 63 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 46 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 47 -push constant 0 -push constant 0 -push constant 32 -push constant 48 -push constant 24 -push constant 12 -push constant 6 -push constant 3 -push constant 1 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 48 -push constant 12 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 49 -push constant 12 -push constant 14 -push constant 15 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 50 -push constant 30 -push constant 51 -push constant 48 -push constant 24 -push constant 12 -push constant 6 -push constant 3 -push constant 51 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 51 -push constant 30 -push constant 51 -push constant 48 -push constant 48 -push constant 28 -push constant 48 -push constant 48 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 52 -push constant 16 -push constant 24 -push constant 28 -push constant 26 -push constant 25 -push constant 63 -push constant 24 -push constant 24 -push constant 60 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 53 -push constant 63 -push constant 3 -push constant 3 -push constant 31 -push constant 48 -push constant 48 -push constant 48 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 54 -push constant 28 -push constant 6 -push constant 3 -push constant 3 -push constant 31 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 55 -push constant 63 -push constant 49 -push constant 48 -push constant 48 -push constant 24 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 56 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 57 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 62 -push constant 48 -push constant 48 -push constant 24 -push constant 14 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 58 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 59 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -push constant 12 -push constant 12 -push constant 6 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 60 -push constant 0 -push constant 0 -push constant 24 -push constant 12 -push constant 6 -push constant 3 -push constant 6 -push constant 12 -push constant 24 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 61 -push constant 0 -push constant 0 -push constant 0 -push constant 63 -push constant 0 -push constant 0 -push constant 63 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 62 -push constant 0 -push constant 0 -push constant 3 -push constant 6 -push constant 12 -push constant 24 -push constant 12 -push constant 6 -push constant 3 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 64 -push constant 30 -push constant 51 -push constant 51 -push constant 59 -push constant 59 -push constant 59 -push constant 27 -push constant 3 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 63 -push constant 30 -push constant 51 -push constant 51 -push constant 24 -push constant 12 -push constant 12 -push constant 0 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 65 -push constant 12 -push constant 12 -push constant 30 -push constant 30 -push constant 51 -push constant 51 -push constant 63 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 66 -push constant 31 -push constant 51 -push constant 51 -push constant 51 -push constant 31 -push constant 51 -push constant 51 -push constant 51 -push constant 31 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 67 -push constant 28 -push constant 54 -push constant 35 -push constant 3 -push constant 3 -push constant 3 -push constant 35 -push constant 54 -push constant 28 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 68 -push constant 15 -push constant 27 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 27 -push constant 15 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 69 -push constant 63 -push constant 51 -push constant 35 -push constant 11 -push constant 15 -push constant 11 -push constant 35 -push constant 51 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 70 -push constant 63 -push constant 51 -push constant 35 -push constant 11 -push constant 15 -push constant 11 -push constant 3 -push constant 3 -push constant 3 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 71 -push constant 28 -push constant 54 -push constant 35 -push constant 3 -push constant 59 -push constant 51 -push constant 51 -push constant 54 -push constant 44 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 72 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 63 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 73 -push constant 30 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 74 -push constant 60 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 27 -push constant 27 -push constant 14 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 75 -push constant 51 -push constant 51 -push constant 51 -push constant 27 -push constant 15 -push constant 27 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 76 -push constant 3 -push constant 3 -push constant 3 -push constant 3 -push constant 3 -push constant 3 -push constant 35 -push constant 51 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 77 -push constant 33 -push constant 51 -push constant 63 -push constant 63 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 78 -push constant 51 -push constant 51 -push constant 55 -push constant 55 -push constant 63 -push constant 59 -push constant 59 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 79 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 80 -push constant 31 -push constant 51 -push constant 51 -push constant 51 -push constant 31 -push constant 3 -push constant 3 -push constant 3 -push constant 3 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 81 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 63 -push constant 59 -push constant 30 -push constant 48 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 82 -push constant 31 -push constant 51 -push constant 51 -push constant 51 -push constant 31 -push constant 27 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 83 -push constant 30 -push constant 51 -push constant 51 -push constant 6 -push constant 28 -push constant 48 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 84 -push constant 63 -push constant 63 -push constant 45 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 85 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 86 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 30 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 87 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 63 -push constant 63 -push constant 63 -push constant 18 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 88 -push constant 51 -push constant 51 -push constant 30 -push constant 30 -push constant 12 -push constant 30 -push constant 30 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 89 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 12 -push constant 12 -push constant 12 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 90 -push constant 63 -push constant 51 -push constant 49 -push constant 24 -push constant 12 -push constant 6 -push constant 35 -push constant 51 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 91 -push constant 30 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 6 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 92 -push constant 0 -push constant 0 -push constant 1 -push constant 3 -push constant 6 -push constant 12 -push constant 24 -push constant 48 -push constant 32 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 93 -push constant 30 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 24 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 94 -push constant 8 -push constant 28 -push constant 54 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 95 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 63 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 96 -push constant 6 -push constant 12 -push constant 24 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 97 -push constant 0 -push constant 0 -push constant 0 -push constant 14 -push constant 24 -push constant 30 -push constant 27 -push constant 27 -push constant 54 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 98 -push constant 3 -push constant 3 -push constant 3 -push constant 15 -push constant 27 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 99 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 3 -push constant 3 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 100 -push constant 48 -push constant 48 -push constant 48 -push constant 60 -push constant 54 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 101 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 63 -push constant 3 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 102 -push constant 28 -push constant 54 -push constant 38 -push constant 6 -push constant 15 -push constant 6 -push constant 6 -push constant 6 -push constant 15 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 103 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 62 -push constant 48 -push constant 51 -push constant 30 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 104 -push constant 3 -push constant 3 -push constant 3 -push constant 27 -push constant 55 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 105 -push constant 12 -push constant 12 -push constant 0 -push constant 14 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 106 -push constant 48 -push constant 48 -push constant 0 -push constant 56 -push constant 48 -push constant 48 -push constant 48 -push constant 48 -push constant 51 -push constant 30 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 107 -push constant 3 -push constant 3 -push constant 3 -push constant 51 -push constant 27 -push constant 15 -push constant 15 -push constant 27 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 108 -push constant 14 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 109 -push constant 0 -push constant 0 -push constant 0 -push constant 29 -push constant 63 -push constant 43 -push constant 43 -push constant 43 -push constant 43 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 110 -push constant 0 -push constant 0 -push constant 0 -push constant 29 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 111 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 112 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 31 -push constant 3 -push constant 3 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 113 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 51 -push constant 51 -push constant 62 -push constant 48 -push constant 48 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 114 -push constant 0 -push constant 0 -push constant 0 -push constant 29 -push constant 55 -push constant 51 -push constant 3 -push constant 3 -push constant 7 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 115 -push constant 0 -push constant 0 -push constant 0 -push constant 30 -push constant 51 -push constant 6 -push constant 24 -push constant 51 -push constant 30 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 116 -push constant 4 -push constant 6 -push constant 6 -push constant 15 -push constant 6 -push constant 6 -push constant 6 -push constant 54 -push constant 28 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 117 -push constant 0 -push constant 0 -push constant 0 -push constant 27 -push constant 27 -push constant 27 -push constant 27 -push constant 27 -push constant 54 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 118 -push constant 0 -push constant 0 -push constant 0 -push constant 51 -push constant 51 -push constant 51 -push constant 51 -push constant 30 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 119 -push constant 0 -push constant 0 -push constant 0 -push constant 51 -push constant 51 -push constant 51 -push constant 63 -push constant 63 -push constant 18 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 120 -push constant 0 -push constant 0 -push constant 0 -push constant 51 -push constant 30 -push constant 12 -push constant 12 -push constant 30 -push constant 51 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 121 -push constant 0 -push constant 0 -push constant 0 -push constant 51 -push constant 51 -push constant 51 -push constant 62 -push constant 48 -push constant 24 -push constant 15 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 122 -push constant 0 -push constant 0 -push constant 0 -push constant 63 -push constant 27 -push constant 12 -push constant 6 -push constant 51 -push constant 63 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 123 -push constant 56 -push constant 12 -push constant 12 -push constant 12 -push constant 7 -push constant 12 -push constant 12 -push constant 12 -push constant 56 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 124 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 12 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 125 -push constant 7 -push constant 12 -push constant 12 -push constant 12 -push constant 56 -push constant 12 -push constant 12 -push constant 12 -push constant 7 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 126 -push constant 38 -push constant 45 -push constant 25 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -push constant 0 -call Output.create 12 -pop temp 0 -push constant 0 -return -function Output.create 1 -push constant 11 -call Array.new 1 -pop local 0 -push argument 0 -push static 0 -add -push local 0 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -push local 0 -add -push argument 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 1 -push local 0 -add -push argument 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 2 -push local 0 -add -push argument 3 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 3 -push local 0 -add -push argument 4 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 4 -push local 0 -add -push argument 5 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 5 -push local 0 -add -push argument 6 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 6 -push local 0 -add -push argument 7 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 7 -push local 0 -add -push argument 8 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 8 -push local 0 -add -push argument 9 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 9 -push local 0 -add -push argument 10 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 10 -push local 0 -add -push argument 11 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return -function Output.getMap 0 -push argument 0 -push constant 32 -lt -push argument 0 -push constant 126 -gt -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -pop argument 0 -label IF_FALSE0 -push argument 0 -push static 0 -add -pop pointer 1 -push that 0 -return -function Output.moveCursor 2 -push static 2 -push constant 8 -call Math.multiply 2 -pop local 0 -push static 1 -push constant 11 -call Math.multiply 2 -pop local 1 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push local 0 -push local 1 -push local 0 -push constant 7 -add -push local 1 -push constant 10 -add -call Screen.drawRectangle 4 -pop temp 0 -push argument 1 -push constant 8 -call Math.multiply 2 -pop local 0 -push argument 0 -push constant 11 -call Math.multiply 2 -pop local 1 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push local 0 -push local 1 -push local 0 -push constant 7 -add -push local 1 -push constant 10 -add -call Screen.drawRectangle 4 -pop temp 0 -push argument 0 -pop static 1 -push argument 1 -pop static 2 -push constant 0 -return -function Output.printChar 5 -push argument 0 -push constant 129 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -call Output.backSpace 0 -pop temp 0 -push constant 0 -return -label IF_FALSE0 -push static 1 -push constant 22 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push argument 0 -push constant 128 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 0 -return -label IF_FALSE2 -push static 2 -push constant 63 -eq -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push constant 0 -return -label IF_FALSE3 -label IF_FALSE1 -push argument 0 -push constant 128 -eq -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -call Output.println 0 -pop temp 0 -push constant 0 -return -label IF_FALSE4 -push constant 0 -pop local 0 -push static 2 -push constant 2 -call Math.divide 2 -pop local 1 -push static 2 -push local 1 -push constant 2 -call Math.multiply 2 -sub -pop local 2 -push static 1 -push constant 352 -call Math.multiply 2 -push local 1 -add -push constant 16384 -add -pop local 3 -push argument 0 -call Output.getMap 1 -pop local 4 -push static 2 -push constant 63 -eq -if-goto IF_TRUE5 -goto IF_FALSE5 -label IF_TRUE5 -push static 1 -push constant 1 -add -push constant 0 -call Output.moveCursor 2 -pop temp 0 -goto IF_END5 -label IF_FALSE5 -push static 1 -push static 2 -push constant 1 -add -call Output.moveCursor 2 -pop temp 0 -label IF_END5 -label WHILE_EXP0 -push local 0 -push constant 11 -lt -not -if-goto WHILE_END0 -push local 2 -push constant 0 -eq -if-goto IF_TRUE6 -goto IF_FALSE6 -label IF_TRUE6 -push local 3 -push local 3 -call Memory.peek 1 -push constant 128 -neg -and -push local 0 -push local 4 -add -pop pointer 1 -push that 0 -add -call Memory.poke 2 -pop temp 0 -goto IF_END6 -label IF_FALSE6 -push local 3 -push local 3 -call Memory.peek 1 -push constant 255 -and -push local 0 -push local 4 -add -pop pointer 1 -push that 0 -push constant 256 -call Math.multiply 2 -add -call Memory.poke 2 -pop temp 0 -label IF_END6 -push local 0 -push constant 1 -add -pop local 0 -push local 3 -push constant 32 -add -pop local 3 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Output.printString 2 -push constant 0 -pop local 0 -push argument 0 -call String.length 1 -pop local 1 -label WHILE_EXP0 -push local 0 -push local 1 -lt -not -if-goto WHILE_END0 -push argument 0 -push local 0 -call String.charAt 2 -call Output.printChar 1 -pop temp 0 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Output.printInt 1 -push constant 6 -call String.new 1 -pop local 0 -push local 0 -push argument 0 -call String.setInt 2 -pop temp 0 -push local 0 -call Output.printString 1 -pop temp 0 -push constant 0 -return -function Output.println 0 -push static 1 -push constant 22 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push static 1 -push constant 1 -add -push constant 0 -call Output.moveCursor 2 -pop temp 0 -label IF_FALSE0 -push constant 0 -return -function Output.backSpace 0 -push static 2 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push static 1 -push static 2 -push constant 1 -sub -call Output.moveCursor 2 -pop temp 0 -goto IF_END0 -label IF_FALSE0 -push static 1 -push constant 1 -sub -push constant 63 -call Output.moveCursor 2 -pop temp 0 -label IF_END0 -push constant 0 -return diff --git a/projects/12/OutputTest/OutputTestOutput.gif b/projects/12/OutputTest/OutputTestOutput.gif deleted file mode 100644 index b8ec2c0..0000000 Binary files a/projects/12/OutputTest/OutputTestOutput.gif and /dev/null differ diff --git a/projects/12/Screen.jack b/projects/12/Screen.jack deleted file mode 100644 index a370ab9..0000000 --- a/projects/12/Screen.jack +++ /dev/null @@ -1,138 +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/12/Screen.jack - -/** - * A library of functions for displaying graphics on the screen. - * The Hack physical screen consists of 512 rows (indexed 0..511, top to bottom) - * of 256 pixels each (indexed 0..255, left to right). The top left pixel on - * the screen is indexed (0,0). - */ -class Screen { - static Array twoToThe; - static Array screen; - static boolean color; - - /** Initializes the Screen. */ - function void init() { - var int i, x; - let x = 1; - let i = 0; - let twoToThe = Array.new(16); - while (i < 16){ - let twoToThe[i] = x; - let x = x + x; - let i = i + 1; - } - let screen = 16384; - let color = true; - return; - } - - /** Erases the entire screen. */ - function void clearScreen() { - var boolean c; - let c = color; - let color = false; - do Screen.drawRectangle(0, 0, 511, 255); - let color = c; - return; - } - - /** Sets the current color, to be used for all subsequent drawXXX commands. - * Black is represented by true, white by false. */ - function void setColor(boolean b) { - let color = b; - return; - } - - /** Draws the (x,y) pixel, using the current color. */ - function void drawPixel(int x, int y) { - var int addr, t; - if ((x < 0) | (y < 0) | (x > 511) | (y > 255)) { - //String.println("drawPixel: coordinates out of range!"); - //Sys.error(2); - return; - } - let t = x / 16; - let addr = 32 * y + t; - if (color) { - let screen[addr] = screen[addr] | twoToThe[x - (t * 16)]; - } else { - let screen[addr] = screen[addr] & (- (twoToThe[x - (t * 16)] + 1)); - } - return; - } - - /** Draws a line from pixel (x1,y1) to pixel (x2,y2), using the current color. */ - function void drawLine(int x1, int y1, int x2, int y2) { - var int dx, dy, x, y, a, b, diff; - let x = x1; - let y = y1; - do Screen.drawPixel(x, y); - if (x1 = x2) { - if (y1 = y2) { - return; - } else { - let diff = 1; - } - } else { - if (y1 = y2) { - let diff = -1; - } else { - let diff = 0; - } - } - let dx = x2 - x1; - let dy = y2 - y1; - let a = Math.sign(dx); - let b = Math.sign(dy); - let dx = Math.abs(dx); - let dy = Math.abs(dy); - while (~((x = x2) & (y = y2))) { - if (diff < 0){ - let x = x + a; - let diff = diff + dy; - } else { - let y = y + b; - let diff = diff - dx; - } - do Screen.drawPixel(x, y); - } - return; - } - - /** Draws a filled rectangle whose top left corner is (x1, y1) - * and bottom right corner is (x2,y2), using the current color. */ - function void drawRectangle(int x1, int y1, int x2, int y2) { - var int x; - if ((x1 > x2) | (y1 > y2)) { - return; - } - let x = x1; - while (~(x > x2)) { - do Screen.drawLine(x, y1, x, y2); - let x = x + 1; - } - return; - } - - /** Draws a filled circle of radius r<=181 around (x,y), using the current color. */ - function void drawCircle(int x, int y, int r) { - var int dx, dy, r2; - if (r > 181) { - do String.println("drawCircle: radius too big!"); - do Sys.error(2); - return; - } - let dy = -r; - let r2 = r * r; - while (~(dy > r)) { - let dx = Math.sqrt(r2 - (dy * dy)); - do Screen.drawLine(x - dx, y + dy, x + dx, y + dy); - let dy = dy + 1; - } - return; - } -} diff --git a/projects/12/ScreenTest/Main.jack b/projects/12/ScreenTest/Main.jack deleted file mode 100644 index 00f36bd..0000000 --- a/projects/12/ScreenTest/Main.jack +++ /dev/null @@ -1,36 +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/12/ScreenTest/Main.jack - -/** Test program for the OS Screen class. */ -class Main { - - /** Draws a sample pictue on the screen using lines and circles. */ - function void main() { - - do Screen.drawLine(0,220,511,220); // base line - do Screen.drawRectangle(280,90,410,220); // house - - do Screen.setColor(false); - do Screen.drawRectangle(350,120,390,219); // door - do Screen.drawRectangle(292,120,332,150); // window - - do Screen.setColor(true); - do Screen.drawCircle(360,170,3); // door handle - do Screen.drawLine(280,90,345,35); // roof - do Screen.drawLine(345,35,410,90); // roof - - do Screen.drawCircle(140,60,30); // sun - do Screen.drawLine(140,26, 140, 6); - do Screen.drawLine(163,35,178,20); - do Screen.drawLine(174,60,194,60); - do Screen.drawLine(163,85,178,100); - do Screen.drawLine(140,94,140,114); - do Screen.drawLine(117,85,102,100); - do Screen.drawLine(106,60,86,60); - do Screen.drawLine(117,35,102,20); - - return; - } -} diff --git a/projects/12/ScreenTest/Main.vm b/projects/12/ScreenTest/Main.vm deleted file mode 100644 index 69e860f..0000000 --- a/projects/12/ScreenTest/Main.vm +++ /dev/null @@ -1,104 +0,0 @@ -function Main.main 0 -push constant 0 -push constant 220 -push constant 511 -push constant 220 -call Screen.drawLine 4 -pop temp 0 -push constant 280 -push constant 90 -push constant 410 -push constant 220 -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -call Screen.setColor 1 -pop temp 0 -push constant 350 -push constant 120 -push constant 390 -push constant 219 -call Screen.drawRectangle 4 -pop temp 0 -push constant 292 -push constant 120 -push constant 332 -push constant 150 -call Screen.drawRectangle 4 -pop temp 0 -push constant 0 -not -call Screen.setColor 1 -pop temp 0 -push constant 360 -push constant 170 -push constant 3 -call Screen.drawCircle 3 -pop temp 0 -push constant 280 -push constant 90 -push constant 345 -push constant 35 -call Screen.drawLine 4 -pop temp 0 -push constant 345 -push constant 35 -push constant 410 -push constant 90 -call Screen.drawLine 4 -pop temp 0 -push constant 140 -push constant 60 -push constant 30 -call Screen.drawCircle 3 -pop temp 0 -push constant 140 -push constant 26 -push constant 140 -push constant 6 -call Screen.drawLine 4 -pop temp 0 -push constant 163 -push constant 35 -push constant 178 -push constant 20 -call Screen.drawLine 4 -pop temp 0 -push constant 174 -push constant 60 -push constant 194 -push constant 60 -call Screen.drawLine 4 -pop temp 0 -push constant 163 -push constant 85 -push constant 178 -push constant 100 -call Screen.drawLine 4 -pop temp 0 -push constant 140 -push constant 94 -push constant 140 -push constant 114 -call Screen.drawLine 4 -pop temp 0 -push constant 117 -push constant 85 -push constant 102 -push constant 100 -call Screen.drawLine 4 -pop temp 0 -push constant 106 -push constant 60 -push constant 86 -push constant 60 -call Screen.drawLine 4 -pop temp 0 -push constant 117 -push constant 35 -push constant 102 -push constant 20 -call Screen.drawLine 4 -pop temp 0 -push constant 0 -return diff --git a/projects/12/ScreenTest/Math.jack b/projects/12/ScreenTest/Math.jack deleted file mode 100644 index 01bce8f..0000000 --- a/projects/12/ScreenTest/Math.jack +++ /dev/null @@ -1,158 +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/12/Math.jack - -/** - * A library of commonly used mathematical functions. - * Note: Jack compilers implement multiplication and division using OS method calls. - */ -class Math { - static Array twoToThe; - - /** Initializes the library. */ - function void init() { - var int i, x; - let x = 1; - let i = 0; - let twoToThe = Array.new(16); - while (i < 16){ - let twoToThe[i] = x; - let x = x + x; - let i = i + 1; - } - return; - } - - function boolean bit(int x, int i) { - return ~(x & twoToThe[i] = 0); - } - - function int sign(int x) { - if (x > 0) { - return 1; - } else { - if (x < 0) { - return -1; - } else { - return 0; - } - } - } - - /** Returns the absolute value of x. */ - function int abs(int x) { - if (x > 0){ - return x; - } else { - return -x; - } - } - - /** Returns the product of x and y. - * When a Jack compiler detects the multiplication operator '*' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x*y and multiply(x,y) return the same value. - */ - function int multiply(int x, int y) { - var int res, shiftedX, i; - let shiftedX = x; - let i = 0; - let res = 0; - //while ((~(twoToThe[i] > y)) & (i < 16)) { - while (i < 16) { - if (Math.bit(y, i)){ - let res = res + shiftedX; - } - let shiftedX = shiftedX + shiftedX; - let i = i + 1; - } - return res; - } - - /** Returns the integer part of x/y. - * When a Jack compiler detects the multiplication operator '/' in the - * program's code, it handles it by invoking this method. In other words, - * the Jack expressions x/y and divide(x,y) return the same value. - */ - function int divide(int x, int y) { - var int ax, ay; - if (x > 0) { - if (y > 0) { - return Math.divide1(x, y); - } else { - return -Math.divide1(x, -y); - } - } else { - if (y > 0) { - return -Math.divide1(-x, y); - } else { - return Math.divide1(-x, -y); - } - } - } - - function int divide1(int x, int y) { - var int q; - if (y = 0) { - do Output.printString("Error: division by zero."); - do Sys.error(0); - } - if ((y > x) | (y < 0)) { - return 0; - } - let q = Math.divide1(x, y * 2); - if (x - (2 * q * y) < y) { - return 2 * q; - } else { - return 2 * q + 1; - } - } - - function int length(int x){ - var int n; - let n = 14; - while (twoToThe[n] > x){ - let n = n - 1; - } - return n; - } - - /** Returns the integer part of the square root of x. */ - function int sqrt(int x) { - var int y, k, z, w; - if (x < 0) { - do Output.printString("Error: square rooting a negative number."); - do Sys.error(0); - } - let k = Math.length(x) / 2; - let y = 0; - while (~(k < 0)) { - let z = y + twoToThe[k]; - let w = z * z; - if ((~(w > x)) & (w > 0)) { - let y = z; - } - let k = k - 1; - } - return y; - } - - /** Returns the greater number. */ - function int max(int a, int b) { - if (a > b) { - return a; - } else { - return b; - } - } - - /** Returns the smaller number. */ - function int min(int a, int b) { - if (a < b) { - return a; - } else { - return b; - } - } -} diff --git a/projects/12/ScreenTest/Math.vm b/projects/12/ScreenTest/Math.vm deleted file mode 100644 index 513fc1a..0000000 --- a/projects/12/ScreenTest/Math.vm +++ /dev/null @@ -1,472 +0,0 @@ -function Math.init 2 -push constant 1 -pop local 1 -push constant 0 -pop local 0 -push constant 16 -call Array.new 1 -pop static 0 -label WHILE_EXP0 -push local 0 -push constant 16 -lt -not -if-goto WHILE_END0 -push local 0 -push static 0 -add -push local 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push local 1 -add -pop local 1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Math.bit 0 -push argument 0 -push argument 1 -push static 0 -add -pop pointer 1 -push that 0 -and -push constant 0 -eq -not -return -function Math.sign 0 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 1 -return -goto IF_END0 -label IF_FALSE0 -push argument 0 -push constant 0 -lt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 1 -neg -return -goto IF_END1 -label IF_FALSE1 -push constant 0 -return -label IF_END1 -label IF_END0 -function Math.abs 0 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 0 -neg -return -label IF_END0 -function Math.multiply 3 -push argument 0 -pop local 1 -push constant 0 -pop local 2 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 2 -push constant 16 -lt -not -if-goto WHILE_END0 -push argument 1 -push local 2 -call Math.bit 2 -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push local 0 -push local 1 -add -pop local 0 -label IF_FALSE0 -push local 1 -push local 1 -add -pop local 1 -push local 2 -push constant 1 -add -pop local 2 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.divide 2 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 1 -push constant 0 -gt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push argument 0 -push argument 1 -call Math.divide1 2 -return -goto IF_END1 -label IF_FALSE1 -push argument 0 -push argument 1 -neg -call Math.divide1 2 -neg -return -label IF_END1 -goto IF_END0 -label IF_FALSE0 -push argument 1 -push constant 0 -gt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push argument 0 -neg -push argument 1 -call Math.divide1 2 -neg -return -goto IF_END2 -label IF_FALSE2 -push argument 0 -neg -push argument 1 -neg -call Math.divide1 2 -return -label IF_END2 -label IF_END0 -function Math.divide1 1 -push argument 1 -push constant 0 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 24 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 122 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 1 -push argument 0 -gt -push argument 1 -push constant 0 -lt -or -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 0 -return -label IF_FALSE1 -push argument 0 -push argument 1 -push constant 2 -call Math.multiply 2 -call Math.divide1 2 -pop local 0 -push argument 0 -push constant 2 -push local 0 -call Math.multiply 2 -push argument 1 -call Math.multiply 2 -sub -push argument 1 -lt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 2 -push local 0 -call Math.multiply 2 -return -goto IF_END2 -label IF_FALSE2 -push constant 2 -push local 0 -call Math.multiply 2 -push constant 1 -add -return -label IF_END2 -function Math.length 1 -push constant 14 -pop local 0 -label WHILE_EXP0 -push local 0 -push static 0 -add -pop pointer 1 -push that 0 -push argument 0 -gt -not -if-goto WHILE_END0 -push local 0 -push constant 1 -sub -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.sqrt 4 -push argument 0 -push constant 0 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 40 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 113 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 0 -call Math.length 1 -push constant 2 -call Math.divide 2 -pop local 1 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 1 -push constant 0 -lt -not -not -if-goto WHILE_END0 -push local 0 -push local 1 -push static 0 -add -pop pointer 1 -push that 0 -add -pop local 2 -push local 2 -push local 2 -call Math.multiply 2 -pop local 3 -push local 3 -push argument 0 -gt -not -push local 3 -push constant 0 -gt -and -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 2 -pop local 0 -label IF_FALSE1 -push local 1 -push constant 1 -sub -pop local 1 -goto WHILE_EXP0 -label WHILE_END0 -push local 0 -return -function Math.max 0 -push argument 0 -push argument 1 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 1 -return -label IF_END0 -function Math.min 0 -push argument 0 -push argument 1 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -return -goto IF_END0 -label IF_FALSE0 -push argument 1 -return -label IF_END0 diff --git a/projects/12/ScreenTest/Screen.jack b/projects/12/ScreenTest/Screen.jack deleted file mode 100644 index a370ab9..0000000 --- a/projects/12/ScreenTest/Screen.jack +++ /dev/null @@ -1,138 +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/12/Screen.jack - -/** - * A library of functions for displaying graphics on the screen. - * The Hack physical screen consists of 512 rows (indexed 0..511, top to bottom) - * of 256 pixels each (indexed 0..255, left to right). The top left pixel on - * the screen is indexed (0,0). - */ -class Screen { - static Array twoToThe; - static Array screen; - static boolean color; - - /** Initializes the Screen. */ - function void init() { - var int i, x; - let x = 1; - let i = 0; - let twoToThe = Array.new(16); - while (i < 16){ - let twoToThe[i] = x; - let x = x + x; - let i = i + 1; - } - let screen = 16384; - let color = true; - return; - } - - /** Erases the entire screen. */ - function void clearScreen() { - var boolean c; - let c = color; - let color = false; - do Screen.drawRectangle(0, 0, 511, 255); - let color = c; - return; - } - - /** Sets the current color, to be used for all subsequent drawXXX commands. - * Black is represented by true, white by false. */ - function void setColor(boolean b) { - let color = b; - return; - } - - /** Draws the (x,y) pixel, using the current color. */ - function void drawPixel(int x, int y) { - var int addr, t; - if ((x < 0) | (y < 0) | (x > 511) | (y > 255)) { - //String.println("drawPixel: coordinates out of range!"); - //Sys.error(2); - return; - } - let t = x / 16; - let addr = 32 * y + t; - if (color) { - let screen[addr] = screen[addr] | twoToThe[x - (t * 16)]; - } else { - let screen[addr] = screen[addr] & (- (twoToThe[x - (t * 16)] + 1)); - } - return; - } - - /** Draws a line from pixel (x1,y1) to pixel (x2,y2), using the current color. */ - function void drawLine(int x1, int y1, int x2, int y2) { - var int dx, dy, x, y, a, b, diff; - let x = x1; - let y = y1; - do Screen.drawPixel(x, y); - if (x1 = x2) { - if (y1 = y2) { - return; - } else { - let diff = 1; - } - } else { - if (y1 = y2) { - let diff = -1; - } else { - let diff = 0; - } - } - let dx = x2 - x1; - let dy = y2 - y1; - let a = Math.sign(dx); - let b = Math.sign(dy); - let dx = Math.abs(dx); - let dy = Math.abs(dy); - while (~((x = x2) & (y = y2))) { - if (diff < 0){ - let x = x + a; - let diff = diff + dy; - } else { - let y = y + b; - let diff = diff - dx; - } - do Screen.drawPixel(x, y); - } - return; - } - - /** Draws a filled rectangle whose top left corner is (x1, y1) - * and bottom right corner is (x2,y2), using the current color. */ - function void drawRectangle(int x1, int y1, int x2, int y2) { - var int x; - if ((x1 > x2) | (y1 > y2)) { - return; - } - let x = x1; - while (~(x > x2)) { - do Screen.drawLine(x, y1, x, y2); - let x = x + 1; - } - return; - } - - /** Draws a filled circle of radius r<=181 around (x,y), using the current color. */ - function void drawCircle(int x, int y, int r) { - var int dx, dy, r2; - if (r > 181) { - do String.println("drawCircle: radius too big!"); - do Sys.error(2); - return; - } - let dy = -r; - let r2 = r * r; - while (~(dy > r)) { - let dx = Math.sqrt(r2 - (dy * dy)); - do Screen.drawLine(x - dx, y + dy, x + dx, y + dy); - let dy = dy + 1; - } - return; - } -} diff --git a/projects/12/ScreenTest/Screen.vm b/projects/12/ScreenTest/Screen.vm deleted file mode 100644 index 8468225..0000000 --- a/projects/12/ScreenTest/Screen.vm +++ /dev/null @@ -1,407 +0,0 @@ -function Screen.init 2 -push constant 1 -pop local 1 -push constant 0 -pop local 0 -push constant 16 -call Array.new 1 -pop static 0 -label WHILE_EXP0 -push local 0 -push constant 16 -lt -not -if-goto WHILE_END0 -push local 0 -push static 0 -add -push local 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push local 1 -push local 1 -add -pop local 1 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 16384 -pop static 1 -push constant 0 -not -pop static 2 -push constant 0 -return -function Screen.clearScreen 1 -push static 2 -pop local 0 -push constant 0 -pop static 2 -push constant 0 -push constant 0 -push constant 511 -push constant 255 -call Screen.drawRectangle 4 -pop temp 0 -push local 0 -pop static 2 -push constant 0 -return -function Screen.setColor 0 -push argument 0 -pop static 2 -push constant 0 -return -function Screen.drawPixel 2 -push argument 0 -push constant 0 -lt -push argument 1 -push constant 0 -lt -or -push argument 0 -push constant 511 -gt -or -push argument 1 -push constant 255 -gt -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -return -label IF_FALSE0 -push argument 0 -push constant 16 -call Math.divide 2 -pop local 1 -push constant 32 -push argument 1 -call Math.multiply 2 -push local 1 -add -pop local 0 -push static 2 -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push local 0 -push static 1 -add -push local 0 -push static 1 -add -pop pointer 1 -push that 0 -push argument 0 -push local 1 -push constant 16 -call Math.multiply 2 -sub -push static 0 -add -pop pointer 1 -push that 0 -or -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -goto IF_END1 -label IF_FALSE1 -push local 0 -push static 1 -add -push local 0 -push static 1 -add -pop pointer 1 -push that 0 -push argument 0 -push local 1 -push constant 16 -call Math.multiply 2 -sub -push static 0 -add -pop pointer 1 -push that 0 -push constant 1 -add -neg -and -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -label IF_END1 -push constant 0 -return -function Screen.drawLine 7 -push argument 0 -pop local 2 -push argument 1 -pop local 3 -push local 2 -push local 3 -call Screen.drawPixel 2 -pop temp 0 -push argument 0 -push argument 2 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 1 -push argument 3 -eq -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 0 -return -goto IF_END1 -label IF_FALSE1 -push constant 1 -pop local 6 -label IF_END1 -goto IF_END0 -label IF_FALSE0 -push argument 1 -push argument 3 -eq -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push constant 1 -neg -pop local 6 -goto IF_END2 -label IF_FALSE2 -push constant 0 -pop local 6 -label IF_END2 -label IF_END0 -push argument 2 -push argument 0 -sub -pop local 0 -push argument 3 -push argument 1 -sub -pop local 1 -push local 0 -call Math.sign 1 -pop local 4 -push local 1 -call Math.sign 1 -pop local 5 -push local 0 -call Math.abs 1 -pop local 0 -push local 1 -call Math.abs 1 -pop local 1 -label WHILE_EXP0 -push local 2 -push argument 2 -eq -push local 3 -push argument 3 -eq -and -not -not -if-goto WHILE_END0 -push local 6 -push constant 0 -lt -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push local 2 -push local 4 -add -pop local 2 -push local 6 -push local 1 -add -pop local 6 -goto IF_END3 -label IF_FALSE3 -push local 3 -push local 5 -add -pop local 3 -push local 6 -push local 0 -sub -pop local 6 -label IF_END3 -push local 2 -push local 3 -call Screen.drawPixel 2 -pop temp 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Screen.drawRectangle 1 -push argument 0 -push argument 2 -gt -push argument 1 -push argument 3 -gt -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -return -label IF_FALSE0 -push argument 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push argument 2 -gt -not -not -if-goto WHILE_END0 -push local 0 -push argument 1 -push local 0 -push argument 3 -call Screen.drawLine 4 -pop temp 0 -push local 0 -push constant 1 -add -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Screen.drawCircle 3 -push argument 2 -push constant 181 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 27 -call String.new 1 -push constant 100 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call String.println 1 -pop temp 0 -push constant 2 -call Sys.error 1 -pop temp 0 -push constant 0 -return -label IF_FALSE0 -push argument 2 -neg -pop local 1 -push argument 2 -push argument 2 -call Math.multiply 2 -pop local 2 -label WHILE_EXP0 -push local 1 -push argument 2 -gt -not -not -if-goto WHILE_END0 -push local 2 -push local 1 -push local 1 -call Math.multiply 2 -sub -call Math.sqrt 1 -pop local 0 -push argument 0 -push local 0 -sub -push argument 1 -push local 1 -add -push argument 0 -push local 0 -add -push argument 1 -push local 1 -add -call Screen.drawLine 4 -pop temp 0 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return diff --git a/projects/12/ScreenTest/ScreenTestOutput.gif b/projects/12/ScreenTest/ScreenTestOutput.gif deleted file mode 100644 index f1742cc..0000000 Binary files a/projects/12/ScreenTest/ScreenTestOutput.gif and /dev/null differ diff --git a/projects/12/String.jack b/projects/12/String.jack deleted file mode 100644 index 3ef40b2..0000000 --- a/projects/12/String.jack +++ /dev/null @@ -1,176 +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/12/String.jack - -/** - * Represents character strings. In addition for constructing and disposing - * strings, the class features methods for getting and setting individual - * characters of the string, for erasing the string's last character, - * for appending a character to the string's end, and more typical - * string-oriented operations. - */ -class String { - field int maxLen; - field int len; - field Array s; - - /** constructs a new empty string with a maximum length of maxLength - * and initial length of 0. */ - constructor String new(int maxLength) { - if (maxLength > 0) { - let s = Array.new(maxLength); - } - let maxLen = maxLength; - let len = 0; - return this; - } - - /** Disposes this string. */ - method void dispose() { - if (maxLen > 0) { - do s.dispose(); - } - do Memory.deAlloc(this); - return; - } - - /** Returns the current length of this string. */ - method int length() { - return len; - } - - /** Returns the character at the j-th location of this string. */ - method char charAt(int j) { - if ((j < 0) | (j + 1 > len)){ - do Output.printString("String.charAt: index out of range!"); - do Sys.error(5); - } - return s[j]; - } - - /** Sets the character at the j-th location of this string to c. */ - method void setCharAt(int j, char c) { - if ((j < 0) | (j + 1 > len)){ - do Output.printString("String.setCharAt: index out of range!"); - do Sys.error(5); - } - let s[j] = c; - return; - } - - /** Appends c to this string's end and returns this string. */ - method String appendChar(char c) { - if (len = maxLen) { - do Output.printString("String.appendChar: reached max length!"); - do Sys.error(5); - } - let s[len] = c; - let len = len + 1; - return this; - } - - /** Erases the last character from this string. */ - method void eraseLastChar() { - if (len = 0){ - do Output.printString("String.eraseLastChar: string is already empty!"); - do Sys.error(5); - } - let len = len - 1; - return; - } - - /** Returns the integer value of this string, - * until a non-digit character is detected. */ - method int intValue() { - var int n, i; - var char c; - var boolean neg, done; - let n = 0; - if (s[0] = 45) { - let i = 1; - let neg = true; - } else { - let i = 0; - let neg = false; - } - let c = s[i]; - if ((c < 48) | (c > 57)) { - do Sys.error(3); - do Output.printString("String.intValue: the input data is not number!"); - } - let done = false; - while ((~done) & (i < len)) { - let c = s[i]; - if ((c > 47) & (c < 58)) { - let n = n * 10 + (c - 48); - } else { - let done = true; - } - let i = i + 1; - } - if (neg) { - return -n; - } else { - return n; - } - - } - - /** Sets this string to hold a representation of the given value. */ - method void setInt(int val) { //change Output.printInt after this - var int x, i, y; - var boolean neg; - if (val < 0) { - let neg = true; - let len = 2; - } else { - let neg = false; - let len = 1; - } - let x = Math.abs(val); - if (x > 9999) { - let len = len + 4; - } else { if (x > 999) { - let len = len + 3; - } else { if (x > 99) { - let len = len + 2; - } else { if (x > 9) { - let len = len + 1; - }}}} - if (len > maxLen) { - do Output.printString("String.setInt: val is too big for the string!"); - do Sys.error(5); - } - if (x = 0) { - do setCharAt(0, 48); - return; - } - if (neg) { - do setCharAt(0, 45); - } - let i = len - 1; - while (x > 0) { - let y = x / 10; - do setCharAt(i, x - (y * 10) + 48); - let x = y; - let i = i - 1; - } - return; - } - - /** Returns the new line character. */ - function char newLine() { - return 128; - } - - /** Returns the backspace character. */ - function char backSpace() { - return 129; - } - - /** Returns the double quote (") character. */ - function char doubleQuote() { - return 34; - } -} diff --git a/projects/12/StringTest/Main.jack b/projects/12/StringTest/Main.jack deleted file mode 100644 index 2848548..0000000 --- a/projects/12/StringTest/Main.jack +++ /dev/null @@ -1,83 +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/12/StringTest/Main.jack - -/** Test program for the OS String class. */ -class Main { - - /** Performs various string manipulations and displays their results. */ - function void main() { - var String s; - var String i; - - let s = String.new(0); // a zero-capacity string should be supported - do s.dispose(); - - let s = String.new(6); // capacity 6, make sure that length 5 is displayed - let s = s.appendChar(97); - let s = s.appendChar(98); - let s = s.appendChar(99); - let s = s.appendChar(100); - let s = s.appendChar(101); - do Output.printString("new,appendChar: "); - do Output.printString(s); // new, appendChar: abcde - do Output.println(); - - let i = String.new(6); - do i.setInt(12345); - do Output.printString("setInt: "); - do Output.printString(i); // setInt: 12345 - do Output.println(); - - do i.setInt(-32767); - do Output.printString("setInt: "); - do Output.printString(i); // setInt: -32767 - do Output.println(); - - do Output.printString("length: "); - do Output.printInt(s.length()); // length: 5 - do Output.println(); - - do Output.printString("charAt[2]: "); - do Output.printInt(s.charAt(2)); // charAt[2]: 99 - do Output.println(); - - do s.setCharAt(2, 45); - do Output.printString("setCharAt(2,'-'): "); - do Output.printString(s); // setCharAt(2,'-'): ab-de - do Output.println(); - - do s.eraseLastChar(); - do Output.printString("eraseLastChar: "); - do Output.printString(s); // eraseLastChar: ab-d - do Output.println(); - - let s = "456"; - do Output.printString("intValue: "); - do Output.printInt(s.intValue()); // intValue: 456 - do Output.println(); - - let s = "-32123"; - do Output.printString("intValue: "); - do Output.printInt(s.intValue()); // intValue: -32123 - do Output.println(); - - do Output.printString("backSpace: "); - do Output.printInt(String.backSpace()); // backSpace: 129 - do Output.println(); - - do Output.printString("doubleQuote: "); - do Output.printInt(String.doubleQuote());// doubleQuote: 34 - do Output.println(); - - do Output.printString("newLine: "); - do Output.printInt(String.newLine()); // newLine: 128 - do Output.println(); - - do i.dispose(); - do s.dispose(); - - return; - } -} diff --git a/projects/12/StringTest/Main.vm b/projects/12/StringTest/Main.vm deleted file mode 100644 index 2c9fb9f..0000000 --- a/projects/12/StringTest/Main.vm +++ /dev/null @@ -1,469 +0,0 @@ -function Main.main 2 -push constant 0 -call String.new 1 -pop local 0 -push local 0 -call String.dispose 1 -pop temp 0 -push constant 6 -call String.new 1 -pop local 0 -push local 0 -push constant 97 -call String.appendChar 2 -pop local 0 -push local 0 -push constant 98 -call String.appendChar 2 -pop local 0 -push local 0 -push constant 99 -call String.appendChar 2 -pop local 0 -push local 0 -push constant 100 -call String.appendChar 2 -pop local 0 -push local 0 -push constant 101 -call String.appendChar 2 -pop local 0 -push constant 16 -call String.new 1 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 44 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 6 -call String.new 1 -pop local 1 -push local 1 -push constant 12345 -call String.setInt 2 -pop temp 0 -push constant 8 -call String.new 1 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 73 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 1 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push local 1 -push constant 32767 -neg -call String.setInt 2 -pop temp 0 -push constant 8 -call String.new 1 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 73 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 1 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 8 -call String.new 1 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call String.length 1 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 11 -call String.new 1 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 91 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 93 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -push constant 2 -call String.charAt 2 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push local 0 -push constant 2 -push constant 45 -call String.setCharAt 3 -pop temp 0 -push constant 18 -call String.new 1 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 40 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 44 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 45 -call String.appendChar 2 -push constant 39 -call String.appendChar 2 -push constant 41 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push local 0 -call String.eraseLastChar 1 -pop temp 0 -push constant 15 -call String.new 1 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 76 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 3 -call String.new 1 -push constant 52 -call String.appendChar 2 -push constant 53 -call String.appendChar 2 -push constant 54 -call String.appendChar 2 -pop local 0 -push constant 10 -call String.new 1 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call String.intValue 1 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 6 -call String.new 1 -push constant 45 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 49 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 51 -call String.appendChar 2 -pop local 0 -push constant 10 -call String.new 1 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push local 0 -call String.intValue 1 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 11 -call String.new 1 -push constant 98 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 83 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call String.backSpace 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 13 -call String.new 1 -push constant 100 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 81 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call String.doubleQuote 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 9 -call String.new 1 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 76 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call String.newLine 0 -call Output.printInt 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push local 1 -call String.dispose 1 -pop temp 0 -push local 0 -call String.dispose 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/StringTest/String.jack b/projects/12/StringTest/String.jack deleted file mode 100644 index 3ef40b2..0000000 --- a/projects/12/StringTest/String.jack +++ /dev/null @@ -1,176 +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/12/String.jack - -/** - * Represents character strings. In addition for constructing and disposing - * strings, the class features methods for getting and setting individual - * characters of the string, for erasing the string's last character, - * for appending a character to the string's end, and more typical - * string-oriented operations. - */ -class String { - field int maxLen; - field int len; - field Array s; - - /** constructs a new empty string with a maximum length of maxLength - * and initial length of 0. */ - constructor String new(int maxLength) { - if (maxLength > 0) { - let s = Array.new(maxLength); - } - let maxLen = maxLength; - let len = 0; - return this; - } - - /** Disposes this string. */ - method void dispose() { - if (maxLen > 0) { - do s.dispose(); - } - do Memory.deAlloc(this); - return; - } - - /** Returns the current length of this string. */ - method int length() { - return len; - } - - /** Returns the character at the j-th location of this string. */ - method char charAt(int j) { - if ((j < 0) | (j + 1 > len)){ - do Output.printString("String.charAt: index out of range!"); - do Sys.error(5); - } - return s[j]; - } - - /** Sets the character at the j-th location of this string to c. */ - method void setCharAt(int j, char c) { - if ((j < 0) | (j + 1 > len)){ - do Output.printString("String.setCharAt: index out of range!"); - do Sys.error(5); - } - let s[j] = c; - return; - } - - /** Appends c to this string's end and returns this string. */ - method String appendChar(char c) { - if (len = maxLen) { - do Output.printString("String.appendChar: reached max length!"); - do Sys.error(5); - } - let s[len] = c; - let len = len + 1; - return this; - } - - /** Erases the last character from this string. */ - method void eraseLastChar() { - if (len = 0){ - do Output.printString("String.eraseLastChar: string is already empty!"); - do Sys.error(5); - } - let len = len - 1; - return; - } - - /** Returns the integer value of this string, - * until a non-digit character is detected. */ - method int intValue() { - var int n, i; - var char c; - var boolean neg, done; - let n = 0; - if (s[0] = 45) { - let i = 1; - let neg = true; - } else { - let i = 0; - let neg = false; - } - let c = s[i]; - if ((c < 48) | (c > 57)) { - do Sys.error(3); - do Output.printString("String.intValue: the input data is not number!"); - } - let done = false; - while ((~done) & (i < len)) { - let c = s[i]; - if ((c > 47) & (c < 58)) { - let n = n * 10 + (c - 48); - } else { - let done = true; - } - let i = i + 1; - } - if (neg) { - return -n; - } else { - return n; - } - - } - - /** Sets this string to hold a representation of the given value. */ - method void setInt(int val) { //change Output.printInt after this - var int x, i, y; - var boolean neg; - if (val < 0) { - let neg = true; - let len = 2; - } else { - let neg = false; - let len = 1; - } - let x = Math.abs(val); - if (x > 9999) { - let len = len + 4; - } else { if (x > 999) { - let len = len + 3; - } else { if (x > 99) { - let len = len + 2; - } else { if (x > 9) { - let len = len + 1; - }}}} - if (len > maxLen) { - do Output.printString("String.setInt: val is too big for the string!"); - do Sys.error(5); - } - if (x = 0) { - do setCharAt(0, 48); - return; - } - if (neg) { - do setCharAt(0, 45); - } - let i = len - 1; - while (x > 0) { - let y = x / 10; - do setCharAt(i, x - (y * 10) + 48); - let x = y; - let i = i - 1; - } - return; - } - - /** Returns the new line character. */ - function char newLine() { - return 128; - } - - /** Returns the backspace character. */ - function char backSpace() { - return 129; - } - - /** Returns the double quote (") character. */ - function char doubleQuote() { - return 34; - } -} diff --git a/projects/12/StringTest/String.vm b/projects/12/StringTest/String.vm deleted file mode 100644 index 36664c1..0000000 --- a/projects/12/StringTest/String.vm +++ /dev/null @@ -1,917 +0,0 @@ -function String.new 0 -push constant 3 -call Memory.alloc 1 -pop pointer 0 -push argument 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push argument 0 -call Array.new 1 -pop this 2 -label IF_FALSE0 -push argument 0 -pop this 0 -push constant 0 -pop this 1 -push pointer 0 -return -function String.dispose 0 -push argument 0 -pop pointer 0 -push this 0 -push constant 0 -gt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push this 2 -call Array.dispose 1 -pop temp 0 -label IF_FALSE0 -push pointer 0 -call Memory.deAlloc 1 -pop temp 0 -push constant 0 -return -function String.length 0 -push argument 0 -pop pointer 0 -push this 1 -return -function String.charAt 0 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -lt -push argument 1 -push constant 1 -add -push this 1 -gt -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 34 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 5 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 1 -push this 2 -add -pop pointer 1 -push that 0 -return -function String.setCharAt 0 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -lt -push argument 1 -push constant 1 -add -push this 1 -gt -or -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 37 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 5 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push argument 1 -push this 2 -add -push argument 2 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push constant 0 -return -function String.appendChar 0 -push argument 0 -pop pointer 0 -push this 1 -push this 0 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 38 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 120 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 5 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push this 1 -push this 2 -add -push argument 1 -pop temp 0 -pop pointer 1 -push temp 0 -pop that 0 -push this 1 -push constant 1 -add -pop this 1 -push pointer 0 -return -function String.eraseLastChar 0 -push argument 0 -pop pointer 0 -push this 1 -push constant 0 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 46 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 76 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 67 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 5 -call Sys.error 1 -pop temp 0 -label IF_FALSE0 -push this 1 -push constant 1 -sub -pop this 1 -push constant 0 -return -function String.intValue 5 -push argument 0 -pop pointer 0 -push constant 0 -pop local 0 -push constant 0 -push this 2 -add -pop pointer 1 -push that 0 -push constant 45 -eq -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 1 -pop local 1 -push constant 0 -not -pop local 3 -goto IF_END0 -label IF_FALSE0 -push constant 0 -pop local 1 -push constant 0 -pop local 3 -label IF_END0 -push local 1 -push this 2 -add -pop pointer 1 -push that 0 -pop local 2 -push local 2 -push constant 48 -lt -push local 2 -push constant 57 -gt -or -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push constant 3 -call Sys.error 1 -pop temp 0 -push constant 46 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 86 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -label IF_FALSE1 -push constant 0 -pop local 4 -label WHILE_EXP0 -push local 4 -not -push local 1 -push this 1 -lt -and -not -if-goto WHILE_END0 -push local 1 -push this 2 -add -pop pointer 1 -push that 0 -pop local 2 -push local 2 -push constant 47 -gt -push local 2 -push constant 58 -lt -and -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push local 0 -push constant 10 -call Math.multiply 2 -push local 2 -push constant 48 -sub -add -pop local 0 -goto IF_END2 -label IF_FALSE2 -push constant 0 -not -pop local 4 -label IF_END2 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP0 -label WHILE_END0 -push local 3 -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push local 0 -neg -return -goto IF_END3 -label IF_FALSE3 -push local 0 -return -label IF_END3 -function String.setInt 4 -push argument 0 -pop pointer 0 -push argument 1 -push constant 0 -lt -if-goto IF_TRUE0 -goto IF_FALSE0 -label IF_TRUE0 -push constant 0 -not -pop local 3 -push constant 2 -pop this 1 -goto IF_END0 -label IF_FALSE0 -push constant 0 -pop local 3 -push constant 1 -pop this 1 -label IF_END0 -push argument 1 -call Math.abs 1 -pop local 0 -push local 0 -push constant 9999 -gt -if-goto IF_TRUE1 -goto IF_FALSE1 -label IF_TRUE1 -push this 1 -push constant 4 -add -pop this 1 -goto IF_END1 -label IF_FALSE1 -push local 0 -push constant 999 -gt -if-goto IF_TRUE2 -goto IF_FALSE2 -label IF_TRUE2 -push this 1 -push constant 3 -add -pop this 1 -goto IF_END2 -label IF_FALSE2 -push local 0 -push constant 99 -gt -if-goto IF_TRUE3 -goto IF_FALSE3 -label IF_TRUE3 -push this 1 -push constant 2 -add -pop this 1 -goto IF_END3 -label IF_FALSE3 -push local 0 -push constant 9 -gt -if-goto IF_TRUE4 -goto IF_FALSE4 -label IF_TRUE4 -push this 1 -push constant 1 -add -pop this 1 -label IF_FALSE4 -label IF_END3 -label IF_END2 -label IF_END1 -push this 1 -push this 0 -gt -if-goto IF_TRUE5 -goto IF_FALSE5 -label IF_TRUE5 -push constant 45 -call String.new 1 -push constant 83 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 73 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 118 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 33 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 5 -call Sys.error 1 -pop temp 0 -label IF_FALSE5 -push local 0 -push constant 0 -eq -if-goto IF_TRUE6 -goto IF_FALSE6 -label IF_TRUE6 -push pointer 0 -push constant 0 -push constant 48 -call String.setCharAt 3 -pop temp 0 -push constant 0 -return -label IF_FALSE6 -push local 3 -if-goto IF_TRUE7 -goto IF_FALSE7 -label IF_TRUE7 -push pointer 0 -push constant 0 -push constant 45 -call String.setCharAt 3 -pop temp 0 -label IF_FALSE7 -push this 1 -push constant 1 -sub -pop local 1 -label WHILE_EXP0 -push local 0 -push constant 0 -gt -not -if-goto WHILE_END0 -push local 0 -push constant 10 -call Math.divide 2 -pop local 2 -push pointer 0 -push local 1 -push local 0 -push local 2 -push constant 10 -call Math.multiply 2 -sub -push constant 48 -add -call String.setCharAt 3 -pop temp 0 -push local 2 -pop local 0 -push local 1 -push constant 1 -sub -pop local 1 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function String.newLine 0 -push constant 128 -return -function String.backSpace 0 -push constant 129 -return -function String.doubleQuote 0 -push constant 34 -return diff --git a/projects/12/StringTest/StringTestOutput.gif b/projects/12/StringTest/StringTestOutput.gif deleted file mode 100644 index 5c2932c..0000000 Binary files a/projects/12/StringTest/StringTestOutput.gif and /dev/null differ diff --git a/projects/12/Sys.jack b/projects/12/Sys.jack deleted file mode 100644 index 53c078c..0000000 --- a/projects/12/Sys.jack +++ /dev/null @@ -1,51 +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/12/Sys.jack - -/** - * A library that supports various program execution services. - */ -class Sys { - - /** Performs all the initializations required by the OS. */ - function void init() { - do Keyboard.init(); - do Math.init(); - do Memory.init(); - do Output.init(); - do Screen.init(); - do Main.main(); - do Sys.halt(); - return; - } - - /** Halts the program execution. */ - function void halt() { - while (true){ - } - return; - } - - /** Waits approximately duration milliseconds and returns. */ - function void wait(int duration) { - var int i, j; - let i = 0; - while (i < duration){ - let i = i + 1; - let j = 0; - while (j < 318){ - let j = j + 1; - } - } - return; - } - - /** Displays the given error code in the form "ERR", - * and halts the program's execution. */ - function void error(int errorCode) { - do Output.printString("ERR"); - do Output.printInt(errorCode); - return; - } -} diff --git a/projects/12/SysTest/Main.jack b/projects/12/SysTest/Main.jack deleted file mode 100644 index a153b25..0000000 --- a/projects/12/SysTest/Main.jack +++ /dev/null @@ -1,31 +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/12/SysTest/Main.jack - -/** Test program for the OS Sys class. */ -class Main { - - /** Tests the wait method of the Sys class. */ - function void main() { - var char key; - - do Output.printString("Wait test:"); - do Output.println(); - do Output.printString("Press any key. After 2 seconds, another message will be printed:"); - - while (key = 0) { - let key = Keyboard.keyPressed(); - } - while (~(key = 0)) { - let key = Keyboard.keyPressed(); - } - - do Sys.wait(2000); - - do Output.println(); - do Output.printString("Time is up. Make sure that 2 seconds elapsed."); - - return; - } -} diff --git a/projects/12/SysTest/Main.vm b/projects/12/SysTest/Main.vm deleted file mode 100644 index 4890e2f..0000000 --- a/projects/12/SysTest/Main.vm +++ /dev/null @@ -1,281 +0,0 @@ -function Main.main 1 -push constant 10 -call String.new 1 -push constant 87 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 64 -call String.new 1 -push constant 80 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 121 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 65 -call String.appendChar 2 -push constant 102 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 44 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 103 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 119 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 98 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 58 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -label WHILE_EXP0 -push local 0 -push constant 0 -eq -not -if-goto WHILE_END0 -call Keyboard.keyPressed 0 -pop local 0 -goto WHILE_EXP0 -label WHILE_END0 -label WHILE_EXP1 -push local 0 -push constant 0 -eq -not -not -if-goto WHILE_END1 -call Keyboard.keyPressed 0 -pop local 0 -goto WHILE_EXP1 -label WHILE_END1 -push constant 2000 -call Sys.wait 1 -pop temp 0 -call Output.println 0 -pop temp 0 -push constant 45 -call String.new 1 -push constant 84 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 109 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 105 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 77 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 107 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 117 -call String.appendChar 2 -push constant 114 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 104 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 116 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 50 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 99 -call String.appendChar 2 -push constant 111 -call String.appendChar 2 -push constant 110 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 32 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 108 -call String.appendChar 2 -push constant 97 -call String.appendChar 2 -push constant 112 -call String.appendChar 2 -push constant 115 -call String.appendChar 2 -push constant 101 -call String.appendChar 2 -push constant 100 -call String.appendChar 2 -push constant 46 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push constant 0 -return diff --git a/projects/12/SysTest/Sys.jack b/projects/12/SysTest/Sys.jack deleted file mode 100644 index 53c078c..0000000 --- a/projects/12/SysTest/Sys.jack +++ /dev/null @@ -1,51 +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/12/Sys.jack - -/** - * A library that supports various program execution services. - */ -class Sys { - - /** Performs all the initializations required by the OS. */ - function void init() { - do Keyboard.init(); - do Math.init(); - do Memory.init(); - do Output.init(); - do Screen.init(); - do Main.main(); - do Sys.halt(); - return; - } - - /** Halts the program execution. */ - function void halt() { - while (true){ - } - return; - } - - /** Waits approximately duration milliseconds and returns. */ - function void wait(int duration) { - var int i, j; - let i = 0; - while (i < duration){ - let i = i + 1; - let j = 0; - while (j < 318){ - let j = j + 1; - } - } - return; - } - - /** Displays the given error code in the form "ERR", - * and halts the program's execution. */ - function void error(int errorCode) { - do Output.printString("ERR"); - do Output.printInt(errorCode); - return; - } -} diff --git a/projects/12/SysTest/Sys.vm b/projects/12/SysTest/Sys.vm deleted file mode 100644 index fec2862..0000000 --- a/projects/12/SysTest/Sys.vm +++ /dev/null @@ -1,74 +0,0 @@ -function Sys.init 0 -call Keyboard.init 0 -pop temp 0 -call Math.init 0 -pop temp 0 -call Memory.init 0 -pop temp 0 -call Output.init 0 -pop temp 0 -call Screen.init 0 -pop temp 0 -call Main.main 0 -pop temp 0 -call Sys.halt 0 -pop temp 0 -push constant 0 -return -function Sys.halt 0 -label WHILE_EXP0 -push constant 0 -not -not -if-goto WHILE_END0 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Sys.wait 2 -push constant 0 -pop local 0 -label WHILE_EXP0 -push local 0 -push argument 0 -lt -not -if-goto WHILE_END0 -push local 0 -push constant 1 -add -pop local 0 -push constant 0 -pop local 1 -label WHILE_EXP1 -push local 1 -push constant 318 -lt -not -if-goto WHILE_END1 -push local 1 -push constant 1 -add -pop local 1 -goto WHILE_EXP1 -label WHILE_END1 -goto WHILE_EXP0 -label WHILE_END0 -push constant 0 -return -function Sys.error 0 -push constant 3 -call String.new 1 -push constant 69 -call String.appendChar 2 -push constant 82 -call String.appendChar 2 -push constant 82 -call String.appendChar 2 -call Output.printString 1 -pop temp 0 -push argument 0 -call Output.printInt 1 -pop temp 0 -push constant 0 -return diff --git a/projects/13/more fun to go.txt b/projects/13/more fun to go.txt deleted file mode 100644 index a7f066e..0000000 --- a/projects/13/more fun to go.txt +++ /dev/null @@ -1,9 +0,0 @@ -See Chapter 13. It's your call! - -And, if you develop something cool, please let us know about it. - -We hope that you enjoyed the course! - --- Noam and Shimon - -www.nand2tetris.org \ No newline at end of file diff --git a/projects/demo/Xor.cmp b/projects/demo/Xor.cmp deleted file mode 100644 index a1e07b2..0000000 --- a/projects/demo/Xor.cmp +++ /dev/null @@ -1,5 +0,0 @@ -| a | b | out | -| 0 | 0 | 0 | -| 0 | 1 | 1 | -| 1 | 0 | 1 | -| 1 | 1 | 0 | diff --git a/projects/demo/Xor.hdl b/projects/demo/Xor.hdl deleted file mode 100644 index db49351..0000000 --- a/projects/demo/Xor.hdl +++ /dev/null @@ -1,25 +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/demo/Xor.hdl - -/** - * Exclusive-or gate: true if either a is true and b is false, or - * a is false and b is true; false otherwise. - * QUESTION: how can the simulator execute this program properly without - * HDL implementations of the underlying Not, And, and Or chip-parts? - * Answer: since the demo folder contains no Not.hdl, And.hdl and Or.hdl - * files, the simulator reverts to using their built-in implementations. - */ - -CHIP Xor { - IN a, b; - OUT out; - - PARTS: - Not (in=a, out=nota); - Not (in=b, out=notb); - And (a=a, b=notb, out=x); - And (a=nota, b=b, out=y); - Or (a=x, b=y, out=out); -} \ No newline at end of file diff --git a/projects/demo/Xor.out b/projects/demo/Xor.out deleted file mode 100644 index e69de29..0000000 diff --git a/projects/demo/Xor.tst b/projects/demo/Xor.tst deleted file mode 100644 index 658cbe5..0000000 --- a/projects/demo/Xor.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/01/Xor.tst - -load Xor.hdl, -output-file Xor.out, -compare-to Xor.cmp, -output-list a%B3.1.3 b%B3.1.3 out%B3.1.3; - -set a 0, -set b 0, -eval, -output; - -set a 0, -set b 1, -eval, -output; - -set a 1, -set b 0, -eval, -output; - -set a 1, -set b 1, -eval, -output; -- cgit v1.2.3