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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

44 APPLE II COMPUTER GRAPHICSEach byte of Low-Res memory d<strong>et</strong>ermines two colored blocks. Refe r to theLow-Res color chart in Figure 6-2, and you will find that $C is the Low-Rescode for the light green block, while $1 is the code fo r the magenta block.In Low-Res, the bottom block is d<strong>et</strong>ermined by the left-hand nibble, andthe top block is d<strong>et</strong>ermined by the right-hand nibble. Using only a nibbl<strong>et</strong>o d<strong>et</strong>ermine each block leads to some inconvenience because memorycan be controlled one byte at a time, and no less. This means that c<strong>al</strong>culatingthe correct combination of two nibbles fo r the proper two boxes isoften confusing.$0 (0) BLACK$1 (1) MAGENTA$2 (2) DARK BLUE$3 (3) PURPLE$4 (4) DARK GREEN$5 (5) GREY$6 (6) MEDIUM BLUE$7 (7) LIGHT BLUE$8 (8) BROWN$9 (9) ORANGE$A (10) GREY$B (1 1) PINK$C (12) GREEN$D (1 3) YELLOW$E (14) AQUA$F (15) WHITEFigure 6-2. Low-Res color codes.Example 3Suppose that you want to place a grey block over a yellow block atlocation 1028. First, you must c<strong>al</strong>culate the v<strong>al</strong>ue that will give you thedesired combination. Again referring to Figure 6-2, yellow is color number$D and grey is number $5. Arrange the digits as $D5 so that grey willbe on top, and convert $D5 to decim<strong>al</strong> 213. From BASIC type:GRPOKE 1(328,213The grey and yellow pair of blocks will appear near the upper left cornerof the screen. You can use Monitor to achieve the same end by using thehex equ iv<strong>al</strong>ent of the numbers. Still from BASIC, type:GRCALL - 15 14(J4: D5Experiment with Low-Res by plotti ng various combinations of coloredblocks in diffe rent locations.Creating Low-Res PicturesCreating a drawing in either Low-Res or Hi-Res requires a good de<strong>al</strong> of

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

Saved successfully!

Ooh no, something went wrong!