Source:Create Text Save Orig

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 Orig.

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 ORG": PRINT D$"WRITE APPEND SAVE ORG"
2  LIST 5,
3  PRINT D$"CLOSE": END 
10  ONERR  GOTO 50
20 DK$ =  CHR$ (4): PRINT DK$"VERIFY GAME.PTRS": GOTO 31000
50  POKE 216,0: GOTO 22000
30000  REM  // SAVE GAME
30010  PRINT : PRINT "DO YOU WANT TO SAVE THIS GAME? ": PRINT "(Y/N) :";
30020  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 30020
30030  PRINT A$: IF A$ = "N" THEN 100
30040  PRINT DK$;"CLOSE":X =  FRE (0)
30050  PRINT DK$"BSAVE GAME.PTRS,A$69,L8"
30060  PRINT DK$"BSAVE GAME.SVAR,A"; PEEK (105) +  PEEK (106) * 256;",L"; PEEK (109) +  PEEK (110) * 256 -  PEEK (105) -  PEEK (106) * 256 + 1
30070  PRINT DK$"BSAVE GAME.STR,A"; PEEK (111) +  PEEK (112) * 256;",L"; PEEK (115) +  PEEK (116) * 256 -  PEEK (111) -  PEEK (112) * 256 + 1
30080  PRINT : PRINT "THE GAME IS NOW SAVED. BOOT ON THIS": PRINT "  DISKETTE TO RESTART THE GAME."
30090  END 
31000  REM  /// RESTART
31010  POKE 216,0: PRINT : PRINT "DO YOU WANT TO RESTART THIS GAME?": PRINT "  Y OR N:";
31020  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 31020
31030  PRINT A$: IF A$ = "N" THEN  END 
31040  PRINT DK$"BLOAD GAME.PTRS": PRINT DK$"BLOAD GAME.SVAR": PRINT DK$"BLOAD GAME.STR"
31050  PRINT DK$;"DELETE GAME.PTRS": PRINT DK$;"DELETE GAME.SVAR": PRINT DK$;"DELETE GAME.STR"
31060  PRINT DK$;"OPEN EAMON.DESC,L256": PRINT DK$;"OPEN EAMON.ROOMS,L64": PRINT DK$;"OPEN EAMON.ROOM NAMES,L64"
31080  GOTO 100