EasyManua.ls Logo

Commodore 1581 - Chapter 3: Basic 7.0 Commands; Error Checking

Commodore 1581
138 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...
CHAPTER
3
BASIC
7.0
COMMANDS
This
chapter
describes
the
disk
commands
used
with
the
Com
modore
128
computer
(in
C128
mode).
This
is
BASIC
7.0,
which
includes
BASIC
2.0,
BASIC
3.5,
and
BASIC
4.0
commands,
all
of
which
can
be
used.
ERROR
CHECKING
When
the
drive
light
(red
light)
flashes,
you must
use
the
follow
ing
command
to
find
out
what
the
error
is:
PRINT
DS$
A
message
is
displayed
whether
there
is
an
error
or
not.
If
there
was
an
error,
this
command
clears
it
from
disk
memory
and
turns
off
the
error
light
on
the
disk
drive.
Once
the
message
is
on
the
screen,
you
can
look
it
up
in
Appen
dix
B
to
see
what
it
means,
and
what
to
do
about
it.
For
those
of
you
who
are
writing
programs,
the
following
is
a
small
error-checking
subroutine
you
can
include
in
your
programs:
59990
REM
READ
ERROR
CHANNEL
60000
IF
DS>1
THEN
PRINT
DS$:STOP
60010
RETURN
The
subroutine
reads
the
error
channel
and
puts
the
results
into
the
reserved
variables
DS
and
DS$.
They
are
updated
automatically
by
BASIC.
Two
error
numbers
are
harmless—0
means
everything
is
OK,
and
1
tells
how
many
files
were
erased
by
a
SCRATCH
command
(de
scribed
later
in
this
chapter).
If
the
error
status
is
anything
else,
line
60000
prints
the
error
message
and
halts
the
program.
Because
this
is
a
subroutine,
you
access
it
with
the
BASIC
GOSUB
command,
either
in
immediate
mode
or
from
a
program.
The
RETURN
statement
in
line
60010
will
jump
back
to
immediate
mode
or
the
next
statement
in
your
program,
whichever
is
appropriate.
SAVE
This
command
will
save
a
program
or
file
so
you
can
reuse
it.
The
diskette
must
be
formatted
before
you
can
save
it
to
that
diskette.
27

Table of Contents

Other manuals for Commodore 1581

Related product manuals