Here - 1000 BiT
Here - 1000 BiT Here - 1000 BiT
TO REACH A SPOT ON THE SCREEN:1. Start your PRINT line with a home cursor, "hm", or a clear screen, "clr".2. Then move the cursor down as far as you want.3. Then PRINT right CRSR characters to move over as far as you want. (Or you can usespaces instead of "rt" characters.)4. Then PRINT what you want.A MOVING PICTURETry this program: 10REM ::: BIRD:::20 PRINT'clr dn dn dn dn dn dn";25 PRINT'Vt rt rt rt rt rt rt Dur";30 PRINT1 ***-* If If lf";:REM WINGS DOWN40 FOR T=1 TO 200.-NEXTT50 PRINT" ^•-* If If lf';:REM WINGS UP60 FOR T=1 TO 200:NEXTT70 GO TO 30Here "If If If' means three left CRSR characters (remember to use the SHIFT key). Weuse "rt rt rt" for right CRSR characters.Do you remember what to do when you see "pur"? If you forgot, look at Lesson 2.Which lines are the delay loops?If you do it correctly, you will get a single purple bird slowly flapping its wings in themiddle of the screen. If you get a lot of birds, check that you have the ";" at the ends ofthe PRINT lines, and that lines 30 and 50 have the birds, three left CRSR characters, andno spaces.How does it work?Read lines 30 and 50 character by character.Line 30 prints left wing, body, right wing. Now the invisible PRINT cursor is to the rightof the bird, so three "If CRSR characters bring the cursor back over the leftwing of the bird.
Line 40 waits for you to see this bird with its wings down.Line 50 prints a bird with wings up, on top of the first bird. Then it moves the cursorback over the left wing of the bird.Line 60 waits for you to see this bird with its wings up. Then the cycle repeats.ERASING OLD PICTURESIn "BIRD" we erased the "down wing" bird by writing an "up wing" bird over it.Suppose we want the bird to fly away?We must erase the old bird with spaces before we print the new bird.Change lines 10,20,25,45 and 65 in "BIRD":10REM FLYAWAY20 PRINT'clr dn dn dn dn ... dn"; (22 of them)25 PRINT"pur";30 PRINT" "-•-* If If If"; :REM PRINT DOWN WINGS40 FOR T=1 TO 200:NEXT T :REM DELAY LOOP45 PRINT'sp sp sp If If up";:REM ERASE BIRD, GO UP50 PRINT' ^-9^ If If If"; :REM PRINT UP WINGS60 FOR T=1 TO 200:NEXT T65 PRINT'sp sp sp If If up";70 GOTO 30Assignment 16:1. Write a program which makes a ball move across the screen, from left to right. Be sureto erase the old ball before printing the new ball. Then change the program so the ballmoves from right to left.2. Write a program to make your first name print on the screen red, then blink to green,back to red, etc. The name doesn't move on the screen.97
- Page 47 and 48: LESSON 7THE LET COMMAND, GLUING STR
- Page 49 and 50: GLUING THE STRINGSHere is how to st
- Page 51 and 52: LESSON 8THE GOTO COMMAND AND THE ST
- Page 53 and 54: A CAN OF SPAGHETTILook at this: 10
- Page 55 and 56: Assignment 8:1. Just for practice i
- Page 57 and 58: LESSON 9 THE IF COMMANDClear the me
- Page 59 and 60: JtTHE "NOT EQUAL" SIGNTwo signs:= m
- Page 61 and 62: INSTRUCTOR NOTES 10 INTRODUCING NUM
- Page 63 and 64: The thing which is put into the box
- Page 65 and 66: MIXTURES IN PRINTYou can print numb
- Page 67 and 68: INSTRUCTOR NOTES 11TAB AND DELAY LO
- Page 69 and 70: HOW BIG A SPACE CAN TAB( ) MAKE?The
- Page 71 and 72: INSTRUCTOR NOTES 12 THE IF COMMAND
- Page 73 and 74: AN IF INSIDE AN IFThe "teenager" pr
- Page 75 and 76: 2. Here is another program. What wi
- Page 77 and 78: LESSON 13RANDOM NUMBERS AND THE INT
- Page 79 and 80: ROUNDING OFF NUMBERSPerhaps you kno
- Page 81 and 82: INSTRUCTOR NOTES 14SAVING TO TAPEWe
- Page 83 and 84: The computer automatically turned o
- Page 85 and 86: nnr^nnnnnr^nnLOADING A PROGRAM FROM
- Page 87 and 88: 5. We are ready to put in the next
- Page 89 and 90: n INSTRUCTOR NOTES 15 SOME SHORTCUT
- Page 91 and 92: AN INPUT SHORTCUTInstead of10 PRINT
- Page 93 and 94: WHEN TO USE THE COLON SHORTCUTUse t
- Page 95 and 96: But if we write this line in a prog
- Page 97: LESSON 16 MOVING PICTURESMOVING THE
- Page 101 and 102: LESSON 17FOR-NEXT LOOPSRemember the
- Page 103 and 104: LOOP VARIABLESTo make sure that eac
- Page 105 and 106: ^ INSTRUCTOR NOTES 18 DATA, READ, R
- Page 107 and 108: STRANGE RULES1. It doesn't matter w
- Page 109 and 110: MIXTURES OF DATAThe DATA statement
- Page 111 and 112: LESSON 19SOUND EFFECTSTurn up the s
- Page 113 and 114: TONES BY THE BUSHELEnter: 10 REM **
- Page 115 and 116: "TM" stands for "timbre." Timbre is
- Page 117 and 118: INSTRUCTOR NOTES 20NAMES, CLOCKS AN
- Page 119 and 120: cAnytimeyou type, the characters ar
- Page 121 and 122: LESSON 21COLOR GRAPHICSADJUST YOUR
- Page 123 and 124: Add these lines to the above progra
- Page 125 and 126: INSTRUCTOR NOTES 22POKEing GRAPHICS
- Page 127 and 128: Try this: Change the number 83 to a
- Page 129 and 130: We can number the streets and house
- Page 131 and 132: n INSTRUCTOR NOTES 23 SECRET WRITIN
- Page 133 and 134: THE COMPUTER ISIMPATIENTThe compute
- Page 135 and 136: ^ INSTRUCTOR NOTES 24 PRETTY PROGRA
- Page 137 and 138: Assignment 24A:1. The delay loop is
- Page 139 and 140: Assignment 24B:1. Write a short pro
- Page 141 and 142: LESSON 25 LOGIC: AND, OR, NOTANOTHE
- Page 143 and 144: THE IF COMMAND TELLS LITTLE WHITE L
- Page 145 and 146: THE LOGIC SIGNSYou can use these si
- Page 147 and 148: LESSON 26 SNIPPING STRINGS: LEFTS,
Line 40 waits for you to see this bird with its wings down.Line 50 prints a bird with wings up, on top of the first bird. Then it moves the cursorback over the left wing of the bird.Line 60 waits for you to see this bird with its wings up. Then the cycle repeats.ERASING OLD PICTURESIn "BIRD" we erased the "down wing" bird by writing an "up wing" bird over it.Suppose we want the bird to fly away?We must erase the old bird with spaces before we print the new bird.Change lines 10,20,25,45 and 65 in "BIRD":10REM FLYAWAY20 PRINT'clr dn dn dn dn ... dn"; (22 of them)25 PRINT"pur";30 PRINT" "-•-* If If If"; :REM PRINT DOWN WINGS40 FOR T=1 TO 200:NEXT T :REM DELAY LOOP45 PRINT'sp sp sp If If up";:REM ERASE BIRD, GO UP50 PRINT' ^-9^ If If If"; :REM PRINT UP WINGS60 FOR T=1 TO 200:NEXT T65 PRINT'sp sp sp If If up";70 GOTO 30Assignment 16:1. Write a program which makes a ball move across the screen, from left to right. Be sureto erase the old ball before printing the new ball. Then change the program so the ballmoves from right to left.2. Write a program to make your first name print on the screen red, then blink to green,back to red, etc. The name doesn't move on the screen.97