Here - 1000 BiT

Here - 1000 BiT Here - 1000 BiT

11.07.2015 Views

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

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!