Table of Contents

Advertisement

all improperly-closed files are automatically SCRATCHED. However, this bare descrip-
tion of its workings doesn't indicate either the power or the danger of the COLLECT
command. Its power is in restoring to good health many diskettes whose directories or
block availability maps have become muddled. Any time the blocks used by the files on a
diskette plus the blocks shown as free don't add up to [he 664 available on a fresh diskette,
COLLECT is needed (with one exception below.) Similarly. any time a diskette contains
an improperly-closed tile (splat file), indicated by an asterisk
(*)
next to its file type in the
directory, that diskette needs to be collected. In fact, but for the one exception below, it is
a good idea to COLLECT diskettes whenever you are the least bit concerned about their
integrity. Just note the number of blocks free in the diskette's directory before and after
using COLLECT, and if the totals differ, there was indeed a problem, and the diskette
should probably be copied onto a fresh diskette file by file, using the COpy command
described in the previous section, rather than using a backup command or program.
The exception is diskettes containing Direct Access files, as described in Chapter 7.
Most direct access (random) files do not allocate their sectors in a way COLLECT can
recognize. Thus, collecting such a diskette may result in un-allocating all direct access
files, with loss of all their contents when other files are added. Unless specifically
instructed otherwise, never collect a diskette containing direct access files. (Note: these
are not the same as the relative files described in Chapter 6. COLLECT may be used on
relative files without difficulty.)
FORMAT FOR THE COLLECT COMMAND
COLLECT
The alternate command is:
PRINT# 15. "VALIDATE"
or abbreviated to:
PRINT# 15, "V"
INITIALIZE
One command that should not often be needed on the 1551, but is still of occasional
value is INITIALIZE. On the 1551, and nearly all other Commodore drives, this function
is performed automatically, whenever a new diskette is inserted. (The optical write-
protect switch is used to sense when a diskette is changed.)
The result of an INITIALIZE, whether forced by a command, or done automatically
by the DOS, is a re-reading of the current diskette's BAM (Block Availability Map). This
information must always be correct in order for the disk to store new files properly.
However, since the chore is handled automatically, the only times you'd need to use the
command is if something happened to make the information in the drive buffers unreliable
or when an error condition prevents you from performing some operation you want to do.
The INITIALIZE command returns the disk drive to the same state as when it was
powered up.
28

Advertisement

Table of Contents
loading

Table of Contents