EasyManua.ls Logo

Commodore 1581 - Memory-Write 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...
Here's
a
more
general
purpose
program
that
reads
one
or
more
locations
anywhere
in
disk
memory:
110
OPEN15,8,15
120
INPUT"#
OF
BYTES
TO
READ
(0
=
END)";NL
130
IF
NL<1
THEN
CLOSE
15:END
140
IF
NL>255
THEN
120
150
INPUT'STARTING
AT
ADDRESS";AD
160
AH
=
INT(AD/256)AL=AD-AH*256
170
PRINT#15,"M-R"CHR$(AL)CHR$(AH)
CHR$(NL)
180
FOR
1=1
TO
NL
190
GET#15A$:IF
A$
=
""
THEN
A$
=
CHR$(0)
200
PRINT
ASC(A$);
210
NEXT
I
220
PRINT
230
GOTO
120
Open
command
channel.
Enter
number
of
bytes
want
ed
unless
done,
or
way
out
of
line.
Enter
starting
address.
Convert
it
into
disk
form.
Actual
Memory-Read.
Loop
until
have
all
the
data,
printing
it
as
we
go,
forever.
MEMORY-WRITE
The
MEMORY-WRITE
command
is
the equivalent
of
the
BASIC
Poke
command,
but
has
its
effect
in
disk
memory
instead
of
within
the
computer.
M-W
allows
you
to
write
up
to
35
bytes
at
a
time
into
disk
memory.
The
MEMORY-EXECUTE
and
some
User
commands
can
be
used
to
run
any
programs
written
this
way.
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
">address"
is
the
high
or
der
part
of
the
address
in
disk
memory
to
begin
writing,
"#
of
bytes"
is
the
number
of
memory
locations
that
will
be
written
(from
1-35),
and
"data
byte"
is
1
or
more
byte
values
to
be
written
into
disk
memory,
each
as
a
CHR$()
value.
EXAMPLES:
We
can
use
this
line
to
turn
off
the
"bumps"
when
loading
DOS-pro
tected
programs
(i.e.,
programs
that
have
been
protected
against
being
copied
by
creating
and
checking
for
specific
disk
errors).
PRINT#15,"M-W"CHR$(48)CHR$(0)CHR$(1)CHR$(133)
84

Table of Contents

Other manuals for Commodore 1581

Related product manuals