ScriptSave
Automatic Disk Saves For Commodore 64 SpeedScript 3.0
J. Blake Lambert, Assistant Editor
Have you ever watched your computer suddenly blink off due to an unexpected power failure, and then realized that you haven't saved your text for an hour or more? All that work down the drain. But with "ScriptSave" these accidents won't be quite so disastrous. The machine language program is designed to work with a Commodore 64, a disk drive, and the SpeedScript 3.0 word processor (COMPUTE!, March 1985).
While you are working with a computer, you're tethered to a lifeline. That lifeline is the computer's power cord. If the lifeline is disconnected or interrupted for even a brief moment, your computer suffers an attack of amnesia. Random Access Memory (RAM) chips need a constant flow of electricity to maintain their information—the information you put into the computer. Usually a power failure does not damage the computer, but it does obliterate the program or text you were working on.
Luckily, most people live in areas with reliable power sources. However, electrical service in some locales is subject to frequent interruptions. And sometimes your wayward foot, a passer-by, a small child, or even a pet can accidentally knock a power cord loose. A split-second is all it takes for the computer to forget.
Unfortunately, the writer is often forgetful, too. To protect yourself against power interruptions, you should periodically save your work on disk. But when you're working intensely, it's easy to forget this important duty. If the power does fail, you can generally remember where you left off, but it's often impossible to remember how you got there. Even if you frequently rewrite your documents, losing any of the intermediate versions interferes with the creative process.
An Extra Rope
"ScriptSave" is the solution. ScriptSave is a short (less than 256-byte) utility that ties into the Commodore 64 version of SpeedScript 3.0. Every ten minutes, it waits for you to finish the paragraph you're working on, and then automatically saves your text (except for the final return character) on disk with a special filename. That way, if a power failure unexpectedly strikes, you can later recover all but the last few minutes of your work.
ScriptSave is a BASIC loader and boot program: It loads and executes both the machine language automatic-save routine and SpeedScript 3.0. Before running ScriptSave, save it to disk; since SpeedScript loads into the same area of memory as the ScriptSave loader, the loader is erased each time it is run. Make sure both programs are on the same disk, and change the filename in line 30 of ScriptSave (listed below as "SS3") to the filename for SpeedScript 3.0 as stored on your disk. Generally, it is best to start with a blank disk and place ScriptSave on the disk first. This way, you can use LOAD"*",8: followed by SHIFT-RUN/STOP to boot up for a writing session.
Once you load and run ScriptSave, this prompt should appear:
File;
Type in a legal Commodore filename, but limit it to 14 characters or less. Press RETURN. ScriptSave automatically loads and runs SpeedScript 3.0. Now you can start writing and stop worrying about periodic saves.
When ScriptSave stores your work, it precedes the filename you specified with a two-digit version number. For example, if you choose the filename ARTICLE, the first version will be called 01ARTICLE, the second version 02ARTICLE, and so on.
Of course, you can still save manually anytime you wish. SpeedScript 3.0 functions normally except for one detail—it assumes that all your saves are on disk. You no longer have to press T or D to specify Tape or Disk after selecting the f8 SAVE option.
Additional Notes
When you finish writing, you will probably want to save a final version of your text. Later, if you want to scratch the intermediate versions off your disk, there's a quick method using SpeedScript's disk commands. First, press CTRL-↑. When SpeedScript prompts Disk Command:, type s:??article and press RETURN (substitute for article the filename you specified in ScriptSave).
There's another trick you can use to give yourself more time between saves or to force an early save. Since ScriptSave uses the internal time-of-day clock, you can exit SpeedScript 3.0 by tapping RESTORE and pressing the Y key, and then POKE 56330,0 to reset the timer and delay the save. Or you can POKE 56330,16 to set the timer for an immediate save, which will be activated the next time you press RETURN while in SpeedScript. You can toggle ScriptSave off and on by entering SYS 52993. Each time ScriptSave is toggled on, it resets the version number to 01 and prompts you to enter a new filename. All of these commands (except for toggling ScriptSave on) should be followed by RUN to reenter SpeedScript. One caution, however: While these manipulations are usually safe, there is a chance that exiting and reentering SpeedScript will erase your text.
ScriptSave
Please refer to "COMPUTE!'s Guide to Typing In Programs" before entering this listing.
10 FOR I = 52993 TO 53246: READ A: CK = CK + A: POKE I, A: NEXT : rem 175 20 IF CK<> 29572 THEN PRINT "{RVS} ERROR IN {SPACE} DATE STATEMENTS": STOP :rem 125 30 PRINT "{CLR} LOAD" CHR$ (34) "SS3" CHR$ (34) ",8" :rem 30 40 PRINT "{4 DOWN} SYS52993" :rem 132 50 POKE 631, 19: POKE 632, 13: POKE 633, 13: POKE 198, 3: END :rem 104 52993 DATE 173, 236, 2, 73, 1, 141 :rem 155 52999 DATE 236, 2, 208, 12, 160, 2 :rem 155 53005 DATA 185, 252, 207, 153, 189, 10 :rem 95 53011 DATA 136, 16, 247, 96, 160, 3 :rem 199 53017 DATA 185, 248, 207, 153, 33, 19 :rem 52 53023 DATA 136, 16, 247, 169, 48, 141 :rem 51 53029 DATE 167, 2, 141, 168, 2, 169 :rem 208 53035 DATA 212, 160, 207, 32, 30, 171 :rem 28 53041 DATA 169, 227, 160, 207, 32, 30 :rem 38 53047 DATE 171, 32, 0, 172, 160, 2 :rem 138 53053 DATA 185, 254, 1, 153, 167, 2 :rem 201 53059 DATA 240, 3, 200, 208, 245, 140 :rem 33 53065 DATA 237, 2, 169, 32, 141, 189 :rem 4 53071 DATA 10, 169, 112, 141, 190, 10 :rem 28 53077 DATA 169, 207, 141, 191, 10, 32 :rem 44 53083 DATA 96, 207, 76, 13, 8, 160 :rem 161 53089 DATA 1, 140, 238, 2, 136, 140 :rem 195 53095 DATA 8, 220, 140, 9, 220, 140 :rem 191 53101 DATA 10, 220, 96, 138, 201, 13 :rem 231 53107 DATA 240, 9, 201, 141, 240, 7 :rem 187 53113 DATE 104, 104, 76, 196, 10, 162 :rem 36 53119 DATA 95, 142, 239, 2, 173, 10 :rem 202 53125 DATA 220, 41, 240, 240, 70, 206 :rem 26 53131 DATA 238, 2, 208, 214, 238, 168 :rem 47 53137 DATA 2, 173, 168, 2, 201, 58 :rem 151 53143 DATA 208, 20, 169, 48, 141, 168 :rem 51 53149 DATA 2, 238, 167, 2, 173, 167 :rem 212 53155 DATA 2, 201, 58, 208, 5, 169 :rem 154 53161 DATA 48, 141, 167, 2, 169, 214 :rem 255 53167 DATA 160, 207, 32, 113, 9, 173 :rem 250 53173 DATA 237, 2, 162, 167, 160, 2 :rem 199 53179 DATA 32, 189, 255, 169, 1, 162 :rem 12 53185 DATA 8, 160, 0, 142, 27, 19 :rem 101 53191 DATA 32, 186, 255, 32, 197, 18 :rem 8 53197 DATA 32, 96, 207, 174, 239, 2 :rem 216 53203 DATA 96, 18, 14, 147, 211, 67 :rem 205 53209 DATA 82, 73, 80, 84, 211, 65 :rem 160 53215 DATA 86, 69, 146, 0, 32, 194 :rem 161 53221 DATA 76, 65, 75, 69, 32, 204 :rem 161 53227 DATA 65, 77, 66, 69, 82, 84 :rem 131 53233 DATA 13, 198, 73, 76, 69, 58 :rem 175 53239 DATA 0, 162, 8, 208, 24, 138 :rem 153 53245 DATA 201, 13 :rem 64