This is an extract of an article in Dr. Dobb's, April 1981. This program requires a Z80 MPU, at least 32K byte RAM memory, two flexible disk drives and CP/M 2.x. All console I/O is done using the standard CP/M function calls. For maximum test speed, access to protected system areas and to avoid error interception by CP/M, disk I/O is performed directly by calls to the BIOS drivers. The program is configured to test a soft sectored, double density, double-sided 8" disk with 154 tracks (77 per side), 52 records per track (26 for single density) and 128 byte sectors. If using a different type of disk drive, the number of tracks and/or records per track may be specified during the initialization dialog, or the program may be reas- sembled to modify the default configuration. The program does not exhaustively check out the drive. Any errors detected by the program must be interpreted with care. Intermittent errors occurring throughout a broad range of disk addresses probably indicates a problem with the disk drive unit. Errors indicated at con- sistent addresses within adjacent tracks may result from worn or damaged disk. Error-free execution of the test certainly indicates an intact and useable diskette. NOTE: the program is rather insensitive to drive problems related to head movement since the diskette is addressed in a smooth sequential manner. ERROR LISTING Errors detected by the program may be itemized on the system con- sole or the line printer. The pass, drive name, track and sector where the error occurred are listed. All numbers are in decimal. The error type is designated at the right. In the explanations below, 'hardware error'signifies an error status code passed from the low-level disk driver and usually means a CRC fault or seek incomplete. The program may be aborted at any time via a CTL-C. ERROR TYPE EXPLANATION ============================================================ read error - original data If running in restore mode, hardware read error noted as the original data was being loaded into memory. write error - test data Hardware error noted as the test data pattern was being written on the diskette. read error - test data Hardware error noted as the test data pattern was being read back from the diskette. compare error - test data Difference was found between the data pattern that was written to the diskette and the data that was read back. write error - restore phase Hardware error noted as the original data was being written back to the diskette. read error - restore phase Hardware error noted as the restored original data was being read back for verification. data cannot be restored Compare error found between the original data rewritten to the diskette and the same sectors read back for verification.