"This is in response to a question ["Ask The Readers," COMPUTE!, February, 1982, #21] asked by Mr. Michael A. Ivins concerning the saving of screen data to cassette [on the Atari]. The following program can be used as a subroutine to do just that.
0 POKE 82,0:GR. 0 10 OPEN #3,12,0,"E:":OPEN #5,4,0,"K:" 15 ? "Do you want to Make or Retrieve a picture?": GET #5,A: IF A = ASC("R") THEN 200 20 ?"Use the keyboard to draw": ?"Hit RETURN to save to cassette" 30 GET #3,A:IF A = 155 THEN 100 40 GOTO 30 99 REM SAVE TO TAPE 100 POKE 752,1 :? CHR$(126);:OPEN #4,8,0, "C:": REM "D:FILESPEC" FOR DISK 110 FOR Y = 0 TO 23 120 FOR X = 0 TO 39 130 LOC. X,Y,Z 140 PUT #4,Z 150 NEXT X 160 NEXT Y 170 CLOSE #3:CLOSE #4:CLOSE #5 180 END 199 REM LOAD A PICTURE FROM CASSETTE 200 ?"(ESC CTRL CLR)";:OPEN #4,4,0, "C:":REM "D:" FOR DISK AGAIN 205 OPEN #6,8,0, "S:" 210 FOR I = 1 TO 960 220 GET #4,A:PUT #6,A 230 NEXT I 240 CLOSE #4:CLOSE#3:CLOSE#2:CLOSE#5:CLOSE#6 250 GOTO 250
The cassette version takes only 50 seconds and the disk version is probably much faster.
Also, for all of you who have the assembler/editor cartridge there is a command to save source programs to cassette. It is LIST#C<, to save and LOAD#C to retrieve. Just ignore the inevitable ERROR -4 that you get when loading."