88 APPLE II COMPUTER GRAPHICSIn Figures 9-20 through 9-2F, some of the color bits are turned on inorder to select group 2 colors.Now that you have digitized the figure, you need a program such asListing 9-3 below to place those v<strong>al</strong>ues in Hi-Res screen memory. Theprogram l<strong>et</strong>s you select the position of the <strong>apple</strong> on the screen, withinlimits. You will be asked fo r the row and column number fo r the upper leftcorner of the <strong>apple</strong> (Figure 9-2A); the rest of the <strong>apple</strong> follows from there.1!{l REM COLOR APPLE2!{l REM3!l' REM4!{l REM INITIALIZE5!{l REM6!{l OFST% = 1!{l24 : DIM SA%(2!{l)7!{l FOR I = 1 TO 2!{l : READ SA% ( I) : NEXT8!{l HGR : VTAB (23)9!{l REM1!{l!{l REM GET ROW & COL #'S11!{l REM12!{l INPUT "BOX ROW #? (1-18) II ;R$13!{l R% = VAL (R$) : IF R% < 1 ORR% > 18 THEN PRINT CHR$ (7) :GOTO 12!{l14!{l INPUT "BOX COL. #? (1-38)";C$15!{l C% = VAL ( C$) : IF C% < 1 ORC% > 38 THEN PRINT CHR$ ( 7) :GOTO 14!{l16!{l REM17!{l REM PLOT APPLE18!{l REM19!{l FOR K = !{l TO 22!{l!{l FOR J = !{l TO 221!{l BA% = SA% (R% + K) + (C%-1) + J22 FOR I = 1 TO 823!{l READ V% : POKE BA% + (I-1) *OFST%,V%24!{l NEXT I,J, K25!{l END37!{l REM38!{l REM ADDR . TABLE39!{l REM4!{l!{l DATA 8192,832!{l,8448,8576,87!{l4,8832,896!{l,9!{l88, 8232,836!{l, 848841!{l DATA 8616,8744,8872,9!{l!{l!{l,9128,8272,84!{l!{l,8528, 865648!{l REM49!{l REMAPPLE TABLE
CHAPTER 9-Hl-RES COLOR 895 REM51 DATA '',8,84,84,4252 DATA J ,6,12,12,12,42,42,8553 DATA ''''5,21,5,254 DATA 42,42,21J,21J ,21J ,17, 17, 1755 DATA 85, 85, 17,17,17,21J ,21J ,21J56 DATA 2,2,1JJ ,1JJ,149,1J 8,1J8,1J57 DATA 84,84,8,64,,' '58 DATA 42,42,42,1,'''59 DATA 5,1,'''''Listing 9-3. POKE color <strong>apple</strong>.Line 6