mjs@inmet.UUCP (07/05/84)
#N:inmet:17300004:000:1243 inmet!mjs Jul 4 19:53:00 1984 To the person who wants to mix .SEQ and .PGM: The following will save a section of RAM to tape or disk, using a filename supplied by you. S is the starting address and E is the ending address of the section of memory that you wish to save. 700 REM **** SUBROUTINE TO SAVE SECTION OF RAM TO DISK OR TAPE **** 710 : 720 INPUT "FILENAME";F$ 730 PRINT "TAPE OR DISK: (T/D)" 740 GET A$ : IF A$<>"T" AND A$<>"D" THEN 740 750 DV=1-7*(A$="D") : IF DV=8 THEN F$="@0:"+F$ 760 T$=F$ : ZK=PEEK(53)+256*PEEK(54)-LEN(T$) : POKE 782,ZK/256 762 POKE 781,ZK-PEEK(782)*256 : POKE 780,LEN(T$) : SYS 65469 763 POKE 780,1 : POKE 781,DV : POKE 782,1 : SYS 65466 765 K=S+1 : POKE 254,K/256 : POKE 253,K-PEEK(254)*256 : POKE 780,253 766 K=E+1 : POKE 782,K/256 : POKE 781,K-PEEK(782)*256 : SYS 65496 770 IF (PEEK(783) AND 1) OR (ST AND 191) THEN 780 775 PRINT "DONE." : RETURN 780 PRINT "ERROR ON SAVE. TRY AGAIN." : IF DV=1 THEN 720 781 OPEN 15,8,15 : INPUT #15,E1$,E2$ : PRINT E1$;E2$ : CLOSE 15 : GOTO 720 Your file will be saved and may be loaded in the normal fashion: LOAD "file",8,1 for disk LOAD "file",1,1 for tape Alan Taylor harpo!inmet!mjs