William DesLauriers wrote
I copied a program off a Coursera website. The program is named "Rectangle.asm", which is a graphic version of the "hello world" program. It seems having its infinite loop and a blank screen.
My 3 questions are; 1)Do we have a flowchart program? 2)Do we do some flowchart manual drawings? 3)How do I paste my code here instead of my file?
Wm
I don't know Rectangle.asm. There is a file in projects/06/Rect names Rect.asm which is probably what Rectangle.asm was derived from. This file is used for testing the Assembler that you will write, and its .hack file is used for testing your Computer in project 5.
That program requires that R0 be set manual before it is run to a non-zero value (the number of lines to draw). This is done by the test script in project 05 that uses the .hack file.
What you are probably seeing is that the program is drawing R0 = 0 black lines and entering its halt loop. Try setting R0 = 10 and running the program.
To answer your questions,
Flowcharts are not generally used in the nand2tetris course; algorithms are presented in pseudocode.
You can insert any file by using "upload file" found under the "More" button. You can also insert code snippets inline in your posts by placing <raw> and </raw> tags around them. Raw text is also good for simple tables using fixed layout:
a | b ||a^b
---|---||---
0 | 0 || 0
0 | 1 || 1
1 | 0 || 1
1 | 1 || 0
--Mark