Commodore VIC-20 User Manual page 264

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

250
The VIC 20 User Guide
FILES
Computer data are stored infiles. This allows you to locate information
you have placed in a certain category. To look up a word beginning with "C"
in the dictionary, you would turn to the section with the heading "C."
Similarly, to find information on a cassette or diskette, you would instruct
the computer to locate a section (file) with a heading (file name) you
assigned.
VIC data files can have names that are much longer than the single-
letter headings in the dictionary: File names can be up to 16 characters long.
The length of the files is limited only by the space available on the diskette or
cassette tape. The number of files on a 1540 diskette is limited to 144.
There are two kinds of files: program files and data files.
Program Files
Whenever you have a program in the computer memory that you wish
to save in order to use it again, you may SAVE it on tape or diskette. To read
it back into the computer, you LOAD it into memory. You should give each
program a unique name so the computer can differentiate one from the
other. When you are using the Datassette to store programs, you don't have
to use file names, since the computer can simply be instructed to LOAD the
first program it encounters. This is not true of the disk drive. You must tell
the computer which file you want when you load or save on a disk.
To use a program file, you load and run it,just as if you had entered the
program by hand. The advantage is that you do not need to enter the
program by hand. In general, the size of a program you store on disk or tape
will be limited to the amount of memory available in your computer. This is
because a program is normally saved in its entirety. You cannot easily save
part of a program and then save the rest of the program later.
One way to handle programs that will not fit into your computer's
available memory space is to break them into shorter programs and simply
load each section of the program separately and run it. In this fashion, you
can execute programs that are much larger than the memory space in your
VIC.
If
you decide to do this, make sure that the first program section that
you load is longer than any of the sections it calls. This is necessary because
the program variables will be stored at the end of your program's first

Advertisement

Table of Contents
loading

Table of Contents