LOAD
Command/Statement
LOAD loads a complete program into the memory from a tape.
How to use LOAD
LOAD is normally used as a direct command, but it may form a statement in a program in order to load a new program. LOAD is followed by a filename, which is a string value up to ten characters long, for example
LOAD "filename"
On execution, the program currently in memory, and all the values of its variables, are deleted. The BASIC then searches for the named program and loads it when it is located. Note that the computer distinguishes between capital and lower-case letters in program names.
If a null string ("") follows LOAD, as in this command
LOAD ""
Then the BASIC loads the first complete program that it locates. Note: In BASin, LOAD "" will bring up the Windows file requester for you to locate a program to load yourself.
Note that LOAD is used differently when a microdrive is attached.
LOAD and the silicon disc
LOAD can also be used to access a file stored on the 128k Spectrum's silicon disc. To do this, insert a ! character between the keyword LOAD and the filename, for example
LOAD !"foo" CODE
You can use any of the commands used with LOAD such as CODE, DATA or SCREEN$. Perhaps the most useful is the SCREEN$ command, as loading from the silicon disc is very rapid.
Loading other types of data
LOAD can be used to load types of data other than programs; see the help entries for LOAD CODE, LOAD DATA and LOAD SCREEN$ for further information.
Format
- LOAD string-expr
See also