EasyManua.ls Logo

Commodore Plus 4 - Page 357

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...
The
Disk
Drive
345
30
Execute
a
memory
read
to
put
the
contents
of
locations
$35B7-$35C7
of
the
1541's
ROM
into
the
buffer.
40
I
counts
the bytes
read.
50
Get
a
byte
from
the
buffer
through
the
command
channel.
60
Print
out
the
character
after
stripping
the
high
bit.
70
Go
on
to
the
next
byte.
80
Close
the
command
channel.
Memory
Write
(M-W)
This
command
allows
information
to
be
written
into
the
RAM
of
the
1541.
Up
to
34
bytes
at
a
time
can be
sent
to
the
command
channel
for
transmission.
The
syntax
is
PRINT#
fiienumber^
where
filenumber
is
the
logical
file
number
of
the
command
channel,
ladd
is
the
low
byte
of
the
address
to
begin
writing,
hadd
is
the
high
byte
of
the
address
to
begin
writing,
and
nbyt
is
the
number
of
the
data
bytes
included
(up
to
34).
Example:
In
this
example,
whatever
the
user
types
in
is
stored
in
the
1541's
RAM
with
a
memory
write
and
retrieved
with
a
memory
read.
10
OPE1T15,8,15
20
IFDSO0THENPRINTDS$:G0T0110
30
PRINT^WHATTOWRITE'^rll^IJTWl
40
W$=LEFT$(W$,34):lT=LE]Sr(W$)
50
PRimi#15,//M-W//CHR$(0)CHR$(5)CHR$(]Sr)W$
60
PRIKTT#15,//M-R//CHR$(O)CHR$(5)CHR$(N)
70
PORI=1TON
80
GET#15,A$
90
PRINTAl;
100
NEXT
110
CLOSE15
Line-by-Line
Explanation
10
Open
the
command
channel.
20
Check
for
error.
If
an
error
is
present,
exit.
30
Ask
user
what
to
write.