12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 6-TEXT AND LOW-RES 43Lost and FoundWhile running the program (Listing 6-1 ), you may have <strong>al</strong>so noted thatafter each line drawn on the bottom third of the screen, there was a slightpause before the fi lling continued on the upper third. That happens becaus<strong>et</strong>here are eight bytes of "phantom storage" following each line inthe lower portion. Those bytes exist in memory, but are not displayed onthe screen. To illustrate, c<strong>al</strong>culate the address of the right-most box in thesecond row from the bottom of Figure 6-1 . You should fi nd it to be 1872+ 39, or 1,91 1. The memory that fo llows that is the eighth line from th<strong>et</strong>op which commences with location 1, 920, so locations 1, 912 through1,919 are "lost." Lost, but not forgotten, for Apple has put that wastedmemory to use within DOS to remember which drive was most recentlyaccessed. As a matter of fact, the next time that you use your disk afterrunning this program, you will notice that your disk makes that fearsomegrunting noise as it rec<strong>al</strong>ibrates.There are other games to play with Text, such as saving the compl<strong>et</strong>escreen, but since Text is so similar to Low-Res, we might as well discussthose tricks under the more colorfu l guise of ....Low-Res GraphicsAlthough Low-Res <strong>graphics</strong> are not as popular as they once were, they stillhave their uses. Low-Res may be the proper option if your major concernsare simplicity, speed, color, and memory conservation; and if the blockynature of the mode is not a debil itating obstacle to you.Low-Res <strong>graphics</strong> use the same area of memory and the same memorymap as Text, so use of the two modes is similar. Alter the program inListing 6-1 by changing line 10 to read:1 GR : REM SET GRAPHICS DISPLAYRun the modified program. The <strong>graphics</strong> screen will be fi lled with pairs oflittle boxes-a magenta box on top of a green box. (The precise colorsmay vary with individu<strong>al</strong> TV s<strong>et</strong>s.) The text window at the bottom of thescreen will sti ll fi ll with "A's."Add a line to the program:15 X = PEEK ( 49234)and run it again. Line 15 s<strong>et</strong>s the soft switch to display fu ll screen <strong>graphics</strong>,so you will see the pairs of blocks <strong>al</strong>l the way down the screen with no textwindow.How1d Yau Do That?Line 30 POKEs the v<strong>al</strong>ue 193 ($C1) into every address in Low-Res memory.

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

Saved successfully!

Ooh no, something went wrong!