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 7-PRESERVING YOUR PICTURES 57slot. To remedy those problems we present a slightly more complex technique.Using EXECWhat you will do here is create a text fi le of DATA statements on diskwhich may be EXECed into any program that you like. Each record in th<strong>et</strong>ext fi le will contain a line number followed by the DATA statement which,in turn, is followed by ten pairs of entries which are the locations andv<strong>al</strong>ues of the bytes used in screen memory. The last DATA statement maycontain less than the 2© entries the others have. The line numbers for theDATA statements will begin at 1©©©© and increment by two; the s<strong>et</strong> ofv<strong>al</strong>ues in the DATA statements will be the same as those printed with Low­Res Scan #1 .Load the program from Listing 7-1 once again, then enter the fo llowingstatements to mod ify it.10 REM CREATE EXEC FILE35 D$ = CHR$ (13) + CHR$ (4)40 INPUT "FILENAME :";FL$45 PRINT D$ "OPEN" FL$50 PRINT D$ "DELETE" FL$55 PRINT D$ "OPEN" FL$60 PRINT D$ "WRITE" FL$70 LN% = 10000 :Cl = 1104 IF PEEK (L) = 0 GOTO 120106 COUNT COUNT + 1108 IF Cl = 1 THEN PRINT LN%; "DATA" ;110 IF Cl > 1 THEN PRINT II ' II ;112 PRINT L ;", "; PEEK (L);:Cl = Cl + 1114 IF Cl > 10 THEN Cl = l :LN% = LN% + 2:PRINT140 PRINT D$ "CLOSE" FL$15YJ PRINT CHR$ (7) ; "COUNT =" ;COUNT ; "EOJ"Listing 7-5. Low-Res Scan #3 [modifications only].Line 4© requires that you enter a name for the fi le being created. Line 7©s<strong>et</strong>s the line numbers to begin at 1©©©© (LN% = 10000), and line 114increments each line number by 2 (LN% = LN% + 2).With this routine in memory, create the text fi le for the <strong>apple</strong> figure bytyping:GRBLOAD APPLERUNWhen asked for a fi lename, enter APPLE .EXC. The disk will behave very

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

Saved successfully!

Ooh no, something went wrong!