EasyManua.ls Logo

Commodore 1570 - Page 85

Commodore 1570
132 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...
ALTERNATE FORMAT:
PRINT#
15,
"M-
w' 'CHR$( <address)CHR$(>address )CHR$
(#
of
bytes)CHR$(data byte(s))
EXAMPLES:
We can use this line to tum 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,"M-W"CHR$(106)CHR$(0)CHR$(I)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,"M-W"CHR$(106)CHR$(0)CHR$(I)CHR$(31)
These 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
1571
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 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 poten-
tial power.
MEMORY -EXECUTE
Any routine in disk memory, either in RAM or ROM, can be executed 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 comput-
er.
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 order part
of
the
address in disk memory at which execution
is
to begin.
77

Related product manuals