|
LOAD
Abbreviation: L <SHIFT+O>
TYPE: Command
FORMAT: LOAD["<file-name>"][,<device>][,<address>]
Action: The LOAD statement reads the contents of a program file
from tape or disk into memory. That way you can use the information
LOADed or change the information in some way. The device number
is optional, but when it is left out the computer will automatically
default to 1, the cassette unit. The disk unit is normally device
number 8. The LOAD closes all open files and, if it is used in
direct mode, it performs a CLR (clear) before reading the program.
If LOAD is executed from within a program, the program is RUN.
This means that you can use LOAD to "chain" several
programs together. None of the variables are cleared during a
chain operation.
If you are using file-name pattern matching, the first file
which matches the pattern is loaded. The asterisk in quotes by
itself ("*") causes the first file-name in the disk
directory to be loaded. if the filename used does not exist or
if it is not a program file, the BASIC error message ?FILE NOT
FOUND occurs.
When LOADing programs from tape, the <file-name> can be
left out, and the next program file on the tape will be read.
The Commodore 64 will blank the screen to the border color after
the PLAY key is pressed. When the program is found, the screen
clears to the background color and the "FOUND" message
is displayed. When the <C=> key, <CTRL> key, <ARROW
LEFT> key, or <SPACE BAR> is pressed, the file will be
loaded. Programs will LOAD starting at memory location 2048 unless
a secondary <address> of 1 is used. If you use the secondary
address of 1 this will cause the program to LOAD to the memory
location from which it was saved.
EXAMPLES of LOAD Command:
LOAD (Reads the next program on tape)
LOAD A$ (Uses the name in A$ to search)
LOAD"*",8 (LOADs first program from disk)
LOAD"",1,1 (Looks for the first program on tape,
and LOADs it into the same part of memory that it came from)
LOAD"STAR TREK" (LOAD a file from tape)
PRESS PLAY ON TAPE
FOUND STAR TREK
LOADING
READY.
LOAD"FUN",8 (LOAD a file from disk)
SEARCHING FOR FUN
LOADING
READY.
(LOAD a file to the specific memory location from which
the program was saved on the disk)
LOAD"GAME ONE",8,1
SEARCHING FOR GAME ONE
LOADING
READY.
|