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.

CHAPTER 10-SHAPING UP 107as the <strong>computer</strong> draws off the end of your shape and on into memorygarbage. To save the table currently in memory, type:orBSAVE TABLE1,A$3, L$19BSAVE TABLE1, A768 , L25The only difference b<strong>et</strong>ween the two is that the first gives the address (A)and length (L) in hex, and the second gives them in decim<strong>al</strong>. If you add thefollowing lines to Listing 10-1, they will automatic<strong>al</strong>ly load the table andinform the Apple of its location when the program is run.22 PRINT CHR$(4); "BLOAD TABLEl"24 REM CHR$ (4) IS CTRL-D26 POKE 232,: POKE 233 ,328 REM $ INTO $E8, $3 INTO $E9A longer shape table may not fit at $3(/)(/) since only the range $3©©-$3BF isavailable; a tot<strong>al</strong> of 192 bytes. (See the memory map in Chapter 3.) Longtables are often placed up at the top of available memory, and thenHIMEM s<strong>et</strong> underneath them so they will not be overwritten by the variablesof your APPLESOFT program. For a 48K machine, DOS s<strong>et</strong>s HIMEM to$96©© (384©©), so if your shape table was $1 (]')(]') (256) bytes long you wou IdBLOAD [tablename] ,A$95HIMEM : 38144or, in decim<strong>al</strong>,BLOAD [tablename] , A38144HIMEM : 38144A more thorough discussion of the use of BLOAD and HIMEM can befound in Chapter 7 where we covered saving the Low-Res screen.If you wish to save the table on tape, you must enter the Monitor anduse a variation of the Write command to save the memory range containingthe table. You must know the hex v<strong>al</strong>ues fo r the fi rst address, the lastaddress, and the length of the table. In the table that contains the saucer,this would be $3©©, $318, and $19, respectively. First, you put the lengthof the table in locations (]') and 1 by typing:: 19 (Remember lo-byte/hi-byte)then write the information onto the tape using the Monitor "W" . Writebytes zero and one onto the tape (they contain the length of the table),and then immediately write the table itself. To do <strong>al</strong>l this in one instruction,you could type:.lW 3 .318W

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

Saved successfully!

Ooh no, something went wrong!