Download Print this page

RETRO The Spectrum User Manual page 50

Advertisement

Chapter 11
To load saved information back at a later date, the tape file that has been written to
must be attached in Media select. For example, attach the file test_WR created above,
return to The Spectrum BASIC prompt, and run the following:
NEW
LOAD ""
Once The Spectrum has reset and you have entered the LOAD command, you will
see The Spectrum display the following text
Program: test
and the usual 0 OK, 0:1 completion message at the bottom of the screen. Typing LIST
will show the program you previously saved:
10 PRINT "Test"
The saving of BASIC programs is often followed by the saving of arrays and bytes.
For example:
DIM b(2,3)
SAVE "array" DATA b()
The contents of the data array b array will be saved to USB stick by being appended to
the end of the writable tape file currently in use, which in this case is the file created by
saving the BASIC program. This behaviour supports the common use case of having
a BASIC program first on a tape, followed by all the data it needs stored sequentially
as separate files on the same cassette tape.
In general, saving a BASIC program will define the .TAP filename used for subsequent
SAVE commands.
To illustrate this dynamic naming of files on USB stick, press HOME and enter Media
select. Now eject the currently attached tape file by pressing F, and then return to
The Spectrum BASIC.
Save the test program again using the same filename as before:
SAVE "test"
Confirm that this has been written to USB stick by pressing HOME and entering Media
select. You will see the file test_WR listed as before, in addition to a new file named
test-1_WR.
50

Advertisement

loading
Need help?

Need help?

Do you have a question about the The Spectrum and is the answer not in the manual?

Subscribe to Our Youtube Channel