Source:Create Text Save Base

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program Create Text Save Base.

Source

Eamon Utilities IV

Date

c. 1984

Author

John Nelson

License

The use of this item is permitted on the grounds that it's free or in the public domain.

1 D$ =  CHR$ (4): PRINT D$"OPEN APPEND SAVE BASE": PRINT D$"WRITE APPEND SAVE BASE"
2  LIST 10,
3  PRINT D$"CLOSE": END 
10  ONERR  GOTO 50
20 DK$ =  CHR$ (4): PRINT DK$"VERIFY GAME.PTRS": GOTO 19000
50  POKE 216,0: GOTO 1000
18000  REM   // SAVE GAME
18010  POKE 216,0: PRINT : PRINT "DO YOU WANT TO SAVE THIS GAME? ": PRINT "(Y/N) :";
18020  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 18020
18030  PRINT A$: IF A$ = "N" THEN 100
18040  PRINT DK$;"CLOSE":X =  FRE (0)
18050  PRINT DK$"BSAVE GAME.PTRS,A$69,L8"
18060  PRINT DK$"BSAVE GAME.SVAR,A"; PEEK (105) +  PEEK (106) * 256;",L"; PEEK (109) +  PEEK (110) * 256 -  PEEK (105) -  PEEK (106) * 256 + 1
18070  PRINT DK$"BSAVE GAME.STR,A"; PEEK (111) +  PEEK (112) * 256;",L"; PEEK (115) +  PEEK (116) * 256 -  PEEK (111) -  PEEK (112) * 256 + 1
18080  PRINT : PRINT "THE GAME IS NOW SAVED. BOOT ON THIS": PRINT "  DISKETTE TO RESTART THE GAME."
18090  END 
19000  REM   /// RESTART
19010  POKE 216,0: PRINT : PRINT "DO YOU WANT TO RESTART THIS GAME?": PRINT "  Y OR N:";
19020  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 19020
19030  PRINT A$: IF A$ = "N" THEN  END 
19040  PRINT DK$"BLOAD GAME.PTRS": PRINT DK$"BLOAD GAME.SVAR": PRINT DK$"BLOAD GAME.STR"
19050  PRINT DK$;"DELETE GAME.PTRS": PRINT DK$;"DELETE GAME.SVAR": PRINT DK$;"DELETE GAME.STR"
19060  PRINT DK$;"OPEN EAMON.DESC,L256": PRINT DK$;"OPEN EAMON.ROOMS,L64": PRINT DK$;"OPEN EAMON.ROOM NAMES,L64"
19070  GOTO 100