Reading The Error Channel - Commodore 1541 User Manual

Hide thumbs Also See for 1541:
Table of Contents

Advertisement

There is a danger in using this command. When using random files (see chapter 6),
blocks allocated will be de-allocated by this command. Therefore, this command
should never be used with a diskette that uses random files,
FORMAT FOR VALIDATE COMMAND:
PRINTJU5, "VALIDATE"
or abbreviated as
PRINT# 15. "V"
DUPLICATE
This command is a hangover from the operating systems that were contained on
the dual drives like the 4040. Jt was used 10 copy entire diskettes from Dne drive to
another, but has no function on a single disk drive.
READING THE ERROR CHANNEL
Without Ihe DOS Support Program, there is no way 10 read 1 he disk error channel
without a program, since you need to use the INPUTS command which won*t work
outside a program. Here is a simple BASIC routine to read the error channel:
10 OPEN 15,8, 15
20 INPUTS 15. AS, BS, CS> DS
30 PRINT AS. BS, C$, DS
Whenever you perform an INPUTS operation from the command channel, you
read up to 4 variables that describe the error condition. The first, third, and fourlh
variables come in as numbers, and cart be INPUT into numeric variables if you like.
The first variable describes the error#S. where 0 is no error. The second variable is the
error description. The third variable is ihe track number on which the error occurred,
and the fourth and final is the block number inside that track. (A block is also known
as a sector)
Errors on track 18 have to do with the BAM and directory. Tor example, a READ
ERROR on track 18 block 0 may indicate that the disk was never formatted.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents