110 OPEN 15,8,15
120 PRINT#15, "M-R"CHR$(106)CHR$(0)
130 GET#15,G$:IF
G$=
""
THEN G$=CHR$(0)
140
G=ASqG$)
Open command channel.
Same
as
G = PEEK(106).
150
B=G
AND 128:B$=
"ON":IF
B THEN
B$=
"OFF"
Check bit 7.
160 S = G AND 64:S$ =
"ON":IF
S THEN
S$
=
"OFF"
Check bit 6.
170
T=G
AND 31:PRINT
"#
OF TRIES
IS";T
Check bits
0-5
180 PRINT "BUMPS ARE";B$ and give results.
190 PRINT "SEEKS ARE";S$
200 CLOSE
15
Tidy up after.
210 END
Here's a more general purpose program that reads one or more locations anywhere in disk
memory:
110 OPENI5,8,
15
120
INPUT"#
OF BYTES TO READ
(0
= END)";NL
130 IF
NL<l
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#15,A$:IF
A$=
""
THEN A$=CHR$(0)
200 PRINT
ASqA$);
210 NEXT I
220 PRINT
230 GOTO 120
MEMORY-WRITE
Open command channel.
Enter number
of
bytes wanted
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.
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-
Wallows you to write
up to 34 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 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$O value.
76