Here - 1000 BiT
Here - 1000 BiT Here - 1000 BiT
Assignment 21:1. Add lines to the "JUMPING NAME" program so that a new screen background coloris chosen for each time through. Line 58 must compare the background color and theprinting color. It must change the printing color if they are the same.2. Write a program which uses two nested loops to go through all possible screen andborder colors in order.3. Add lines to the "BIRD" program so that the user is asked what color bird she wants.Then poke the color into box number 646.4. Write a program which draws your country's flag.124
INSTRUCTOR NOTES 22POKEing GRAPHICSThe POKEing of characters and colors to the screen is explained.The character is poked to one address and its color to an entirely different address. Thiscomplication may confuse your student.The screen cells are addressed from 1024 continuously to 2023, and the color cells from55296 to 56295. A row, column method of addressing is clearer, and a program usingaddressing in that form is included in the lesson.nThe advantages of making graphics using POKE is that it may be clearer than themethod using CRSR keys. It is also faster. The most important reason is that the PEEKinstruction allows an easy way to see what character is in any given cell on the screen.This is useful for games to detect collisions, etc. This procedure is taught in Lesson 28.QUESTIONS:n1. The "home" spot on the screen has address 1024. Where on the screen isthe character at address 1027 shown?2. What address is the color box for this character?3. What color numbers may be put into this box?nnn125
- 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 and 98: LESSON 16 MOVING PICTURESMOVING THE
- Page 99 and 100: Line 40 waits for you to see this b
- 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: Add these lines to the above progra
- 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,
- Page 149 and 150: CUTTING A PIECE OUT OF THE MIDDLETh
- Page 151 and 152: nnO INSTRUCTOR NOTES 27 SWITCHING N
- Page 153 and 154: MAKING NUMBERS INTO STRINGSRun10 RE
- Page 155 and 156: Assignment 27:1. Write a program wh
- Page 157 and 158: LESSON 28ACTION GAMES AND THE FUNCT
- Page 159 and 160: LOOKING IN THE KEYBOARD'S BOXHere i
- Page 161 and 162: Run it. It puts a white diamond on
- Page 163 and 164: cTHETARGETS ARE HEARTSAdd these lin
- Page 165 and 166: LESSON 29MUSICGo back and review th
- Page 167 and 168: REGISTER ADDRESSES Base address is
- Page 169 and 170: D^ INSTRUCTOR NOTES 30 ARRAYS AND T
- Page 171 and 172: The DIM... command tells the comput
- Page 173 and 174: 1 REM *** EIGHT QUEENS ***2 GOTO 10
Assignment 21:1. Add lines to the "JUMPING NAME" program so that a new screen background coloris chosen for each time through. Line 58 must compare the background color and theprinting color. It must change the printing color if they are the same.2. Write a program which uses two nested loops to go through all possible screen andborder colors in order.3. Add lines to the "BIRD" program so that the user is asked what color bird she wants.Then poke the color into box number 646.4. Write a program which draws your country's flag.124