EasyManua.ls Logo

Commodore Plus 4 - Page 347

Commodore Plus 4
464 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The
Disk
Drive
335
Renaming
Files
on
a
Diskette
Occasionally
it
is
necessary
to
change
the
name
of
an
existing
(and
properly
closed)
file
on
a
diskette.
The
BASIC
RENAME
command
is
RENAMEDdrive,
"old
name"TO"new
name"
JJunit
where
drive
is
the
optional
drive
number
(which
is
not
needed
on
the
1541),
old
name
is
the
original
name
of
the
file,
new
name
is
the
final
name
of
the
file,
and
unit
is
the
optional
device
number
of
the
disk
drive.
To
rename
a
file
by
direct
command
to
the
DOS,
use
PRUjT*
filenumber,"B,:newname'old
name"
where
filenumber
is
the
logical
file
number
of
the
previously
opened
command
channel,
and
new
name
and
old
name
are
the
final
and
original
file
names.
Copying
Files
on
a
Diskette
To
create
an
exact
duplicate
of a
file
on
the
diskette,
the
COPY
command
is
used.
The
new
copy
must
be
on
the
same
diskette
and
have
a
different
name
from
the
original.
Relative
files
cannot
be
copied
with
this
command.
GOFYDdrive/'orig
name"TODdrive,"copyname"
9OTX
Uuixzfc
where
drive
is
the
optional
drive
number
(which
is
not
needed
on
the
1541),
orig
name
is
the
name
of
the
original
file,
copy
name
is
the
name
of
the
copy,
and
unit
is
the
optional
device
number
of
the
disk
drive.
To
copy
a
file
by
direct
command
to
|he
DOS,
use
PRIET*
filenumber,"
C:
copy
name=orig
name"
where
filenumber
is
the
logical
file
number
of
the
previously
opened
command
channel,
and
copy
name
and
orig
name
are
the
names
of
the
copy
and
the
original
file.
Direct-Access
Programming
The
DOS
accepts
nine
commands
in
addition
to
those
already
described.
These
commands
allow
the
programmer
to
read
and
write
specific
sectors
on
the
diskette
and
to
access
the
memory
in
the
disk
drive.
Remember
that
sectors
you
write
directly
onto
the
diskette
do
not
normally
appear
in
the
directory
and
are
deallocated
if
the
disk
is
validated
(COLLECTed).