User`s guide

files , with loss
of
all
their contents when other
file
s are added. Unless specific
ally
instructed otherwise, never collect a diskette containing direct access files. (Note:
th
ese
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
Ddrive # , Udevice #
where
"D"
is
the drive number (always 0 on the
1541
,) and
"U
" the device number.
As
usual , if omitted they default
to
drive 0 and device 8 respectively.
EXAMPLE:
COLLECT
DO
INITIALIZING
One command that should not often be needed
on
the 1541, but
is
still
of
occasion
al
value
is
Initialize. On the 1541, and nearly all other Commodore drives, this function
is
performed automatically, whenever a new diskette
is
inserted. (The optical" write-prot
ect
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 disk, is a re-reading
of
the current diskette's BAM (Block Availability Map) into a
disk buffer. This information must,
of
course, always be correct
in
order for the disk
to
store new files properly. However, since the chore
is
handled automatically, the only time
you'd need
to
use the command
is
if something happened to
maJCe
the information
in
th
e
drive buffers umeliable. Even so, you may use the command for reassurance,
as
often
as
you like, so long as you close all your files except for the command channel first.
FORMAT FOR THE INITIALIZE COMMAND
EXAMPLE:
PRINT#15, "INITIALIZEdrive
#"
PRINT#l5,"INITIALIZE O"
odt
may be abbreviated
to
PRINT#
15, "Idrive
#"
PRINT#l5,
"IO"
where the command channel
is
assumed
to
be opened
by
file
15, and "drive
#"
is
0 on
the 1541.
40
One use for Initialize is
to
keep a cleaning diskette spinning, if
you
choos_e_
to
use
(There
is
no
need to use such kits on any regular basis
und~r
normal
con~1t1ons
of
o~~liness
and care.) Nonetheless, if you are using such a kit, the followmg short
c e will keep the diskette spinning long enough for your need:
program
tO
OPEN
15
,8,
15
20
FOR
I=
I TO
99
30:
PRINT#l5
,"
IO"
40NEXT
SO
CLOSE
15
11
uses an Initialize loop to keep the drive motor on for about 20 seconds.
41