50
Chapter 11
To load saved information back at a later date, the tape le that has been written to
must be attached in Media select. For example, attach the le 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 le currently in use, which in this case is the le created by
saving the BASIC program. This behaviour supports the common use case of having
a BASIC program rst on a tape, followed by all the data it needs stored sequentially
as separate les on the same cassette tape.
In general, saving a BASIC program will dene the .TAP lename used for subsequent
SAVE commands.
To illustrate this dynamic naming of les on USB stick, press HOME and enter Media
select. Now eject the currently attached tape le by pressing F, and then return to
The Spectrum BASIC.
Save the test program again using the same lename as before:
SAVE “test”
Conrm that this has been written to USB stick by pressing HOME and entering Media
select. You will see the le test_WR listed as before, in addition to a new le named
test-1_WR.