EasyManua.ls Logo

Commodore 1581 - Memory-Execute Command

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...
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,"M-W"CHR$(48)CHR$(0)CHR$(1)CHR$(31)
These
two
examples
may
be
very
useful
under
some
circum
stances.
They
are
the
equivalent
of
POKE
48,133
and
POKE
48,31
re
spectively,
but
in
disk
memory,
not
inside
the
computer.
As
mentioned
in
the
previous
section's
first
example,
location
48
in
the
1581
disk
drive
signifies
two
separate
activities
to
the
drive,
all
related
to
error
recovery.
Bit
7
(the
high
bit),
if
set
means
no
"bumps"
(don't
move
the
read
head
to
track
1).
The
bottom
six
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 six
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
potential
power.
MEMOFY-EXECUTE
Any
routine
in
disk
memory,
either
in
RAM
or
ROM,
can
be
ex
ecuted
with
the
MEMORY-EXECUTE
command.
It
is
the
equivalent
of
the
BASIC
Sys
call
to
a
machine
language
program
or
subroutine,
but
works
in
disk
memory
instead
of
within
the
computer.
FORMAT
FOR THE
MEMORY-EXECUTE
COMMAND:
PRINT#15,"M-E"CHR$(<address)CHR$(>address)
where
"<address"
is
the
low
order
part,
and
">address"
is
the
high
or
der
part
of
the
address
in
disk
memory
at
which
execution
is
to
begin.
Most
uses
require
intimate
knowledge
of
the
inner
workings
of
the
DOS,
and
preliminary
setup
with
other
commands,
such
as
MEMORY-WRITE.
The
routine
should
end
with
an
RTS
to
return
control
to
the
1581.
BLOCK-EXECUTE
This
rarely-used
command
will
load
a
sector
containing
a
machine
language
routine
intxra
memory
buffer
from
diskette,
and
execute
it
85

Table of Contents

Other manuals for Commodore 1581

Related product manuals