Chapter 16 - Tape storage
As was mentioned in chapter 1, & you have no douby found out from experience anyway, when you turn
the ZX81 off you lose all the program & variables that were sored inside it. The only way to save these is to
have the computer record them onto a cassette tape; & then later you can load them back in & the
computer will be restored to practically the same state as it was in when it made the recording.
You will have found that with the ZX81 a pair of leads (article (v) in chapter 1) which connect the ZX81 to
a cassette recorder. You must provide your own tape recorder, & some work better than others.
First, as far as the ZX81 is concerned, the cheap, portable mono cassette recorders are at least as good
as expensive stereo ones, & give less trouble as well. You will find a tape counter very useful.
Second, the tape recorder must have an input socket for use with microphones, & an optput socket for
use with earphones if there isn't one, try the external loudspeaker socket.) They should preferably be 3.5
mm jack sockets i.e. to fit the jack plugs on the leads provided), because other sorts often do not give a
signal powerful enough for the ZX81.
Any cassette tape should work, although low noise tapes are preferable.
Now, having acquired a suitable cassette recorder, connect it to the computer: one lead should connect
the microphone input socket on the recorder to the socket marked 'MIC' on the side of the ZX81, & the
other connects the earphone output socket on the recorder to the 'EAR' socket on the ZX81. Make sure
that the leads are not crossed over (although you won't damage the ZX81 if they are.)
Type some program into the computer, say the character set program in chapter 11. You are going to
have to give the program a name when you save it, & it is a good idea to put this name into the program so
that it appears in listings - the easiest way is with a REM statement. So type
5
REM
"CHARACTERS"
Now - & this is just a dry run, so that you can see what happens, - type
SAVE
"CHARACTERS"
& watch the television. For five seconds it will just be a greyish colour, then for about six seconds there will
be a distinctive pattern of thin black & white stripes, & then the screen will go white with the report 0/0. The
computer was sending a signal to the 'MIC' socket; but it was also sending the same signal to the
television, producing the picture that you saw. The grey part was a silent lead-in, & the black & white part
was the program.
What you want to do, of course, is catch that signal on tape, so let's do it properly this time.
Saving a program
1. Position the tape in a part either that is blank, or that you are prepared to overwrite.
2. Using a microphone, record yourself saying 'characters'. This is not essential, but it will make it easier to
find the program afterwards. Reconnect the computer to the tape recorder.
3. Type
SAVE
"CHARACTERS" (without
NEWLINE
)
4. Start the tape recorder recording.
5. Press
NEWLINE
.
6. Watch the television as before. When it has finished (with the report 0/0), stop the tape recorder.
To make sure that this has worked, you should now listen to the tape through the tape recorder's own
loudspeaker. (You will probably have to unplug the lead from the earphone socket on the tape recorder.)
Rewind the tape to where you started before, & play it back.
First, you will hear your own voice saying 'characters'.
After that, comes a soft, humming buzz. This is not really part of the recording, but the end of the signal
for the television (before you pressed
NEWLINE
), which happens to have been sent to the tape recorder
aswell.
Next come five seconds of silence, the beginning of the proper tape signal. This corresponds to the
period when the television screen went grey.
Next come about six seconds of a very harsh high-pitched buzz, & at full volume this should be very
unpleasantly loud. This is a recording of the program, & corresponds to the black & white patterns on the
television screen.