EasyManua.ls Logo

Commodore Plus 4 - Page 336

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...
384
Using
Peripheral
Devices
begin
with
the
letter
F.
The
second
wild
card
is
the
question
mark,
which
is
used
to
mean
any
character
in
that
specific
position
matches.
For
example,
the
use
of
"F??PRG"
as
a
file
name
matches
all
file
names
on
the
diskette
starting
with
F,
followed
by
two
characters,
and
ending
in
PRG.
The
key
difference
between
the
two
wild
cards
is
that
the
asterisk
matches
all
combinations
of
any
number
of
characters
and
must
be
at
the
end
of
the
string,
whereas
the
question
mark
matches
any
single
character
and
can
be
in
any
position
in
the
string.
The
information
in
this
section
has
been
verified
with
a
1541
disk
drive.
The
BASIC
and
machine-language
access
to
the
DMA
disk
should
be
the
same.
However,
the
commands
that
the
drive
itself
recognizes
may
be
different.
Please
refer
to
the
manual
for
specific
information
on
the
DMA
disk.
Using
a
Disk
Drive
with
BASIC
The
disk
drive
can
be
used
to
save
BASIC
programs
or
to
create
and
manage
data
files
through
BASIC.
There
are
different
types
of
files
that
can
be
used
for
information
storage,
or
a
program
can
access
specific
areas
on
the
disk
directly.
Each
type of
file
and
all
the
direct-access
commands
are
covered
in
this
section.
A
number
of
maintenance
functions
are
available
for
use
with
diskettes.
These
are
detailed
in
Chapter
1
and
reviewed
in
this
chapter
(see
Diskette
Mainte
nance).
In
particular,
a
new
diskette
must
be
formatted
before
its
first
use.
If
the
red
light
on
the
disk
drive
blinks
at
any
time,
an
error
has
occurred.
To
read
the
error,
type
PRINT
DS$
For
an
explanation
of
DOS
errors,
see
Appendix
A.
A
program
can check
for
DOS
errors
by
looking
at
the
reserved
variable
DS.
If
DS
is
not
zero,
then
an
error
has
occurred
and
DS
gives
the
error
number.
The
error
message
can
then be
printed
by
printing
DS$.
Error
checking
should
be
done
frequently
in
BASIC
programs
that
use
the
disk.
Most
errors
in
disk
1/
O
are
reported
in
DS
and
DS$.
A
notable
exception
is
the
end-of-file
that
is
returned
in
the
status
variable,
ST
with
bit
6
set
(a
decimal
value
of
64).
Saving,
Loading,
and
Verifying
Programs
Since
one
of
the
main
uses
for
a
disk
drive
is
to
save
and
retrieve
BASIC
programs,
BASIC
has
built-in
commands
to
make
it
easy.
You
can
save
programs
with
the
DSAVE
(or
the
SAVE)
command.
DSAVE
filename9I>drive,TJvjiit