EasyManua.ls Logo

Commodore 1541-II - Page 84

Commodore 1541-II
104 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...
FORMAT
FOR
THE
MEMORY-WRITE
COMMAND:
PRINT#
15,
*
'M-
W
'CHR$(<address)CHR$(>address)CHR$
(#
of
bytes)CHR$(data
byte(s))
where
"<address"
is
the
low
order
part,
and
t4>address"
is
the
high
order
part
of
the
address
in
disk
memory
to
begin
writing,
*'#
of
bytes"
is
the
number
of
memory
locations
that will
be
written
(from
1-34),
and
"data
byte"
is
1
or
more
byte values
to
be
written
into
disk
memory,
each
as
a
CHR$()
value.
If
desired,
a
colon
(:)
may
follow
M-
W
within
the
quotation
marks.
ALTERNATE
FORMAT:
PRINT#
15/
'M-W:'
'CHR$(<address)CHR$(>address)CHR$
(#
of
bytes)CHR$(data
byte(s))
EXAMPLES:
We
can
use
this
line
to
turn
off
the
"bumps"
when
loading
DOS-protected
programs
(i.e.,
programs
that
have
been
protected
against
being
copied
by
creating
and
checking
for
specific
disk
errors).
PRINT#15,ttM-W"CHR$(106)CHR$(0)CHR$(l)CHR$(133)
The
following
line
can
be.used
to
recover
bad
sectors,
such
as
when
an
important
file
has
been
damaged
and
cannot
be
read
normally.
PRINT#15,ttM-W"CHR$(106)CHR$(0)CHR$(l)CHR$(31)
The
above
two
examples
may
be
very
useful
under
some
circumstances.
They
are
the
equivalent
of
POKE
106,133
and
POKE
106,31
respectively,
but
in
disk
memory,
not
inside
the
computer.
As
mentioned
in
the
previous
section's
first
example,
location
106
in
the
1541
disk
drive
signifies
three
separate
activities
to
the
drive,
all
related
to
error
recovery.
Bit
7
(the
high
bit),
if
set
means
no
bumps
(don't
thump
the
drive
back
to
track
1).
Bit
6,
if
set,
means
no
seeks.
In
that
case,
the
drive
won't
attempt
to
read
the
half-track
above
and
below
the
assigned
track
to
see
if
it
can
read
the
data
that
way.
The
bottom
6
bits
are
the
count
of
how
many
times
the
disk
will
try
to
read
each
sector
before
and
after
trying
seeks
and
bumps
before
giving
up.
Since
31
is
the
largest
number
that
can
be
expressed
in
6
bits,
that
is
the
maximum
number
of
tries
allowed.
From
this
example,
you
can
see
the
value
of
knowing
something
about
Peeks,
Pokes,
and
machine-language
before
using
direct-access
disk
commands,
as
well
as
their
poten
tial
power.
76

Table of Contents

Related product manuals