home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / HDTEST1.ZIP / HDTESTSH.EXE / HDTEST.DOC < prev    next >
Encoding:
Text File  |  1989-11-28  |  128.4 KB  |  2,362 lines

  1.           
  2.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  3.           _______________________________        _______________________________
  4.           
  5.           
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                           HDTEST - Hard Disk Test/Repair Utility
  17.                           ______________________________________
  18.  
  19.                            Copyright (1984-1989), P. R. Fletcher
  20.                            _____________________________________
  21.                                     All Rights Reserved
  22.                                     ___________________
  23.  
  24.  
  25.  
  26.                         Distributed by:
  27.  
  28.                                P. R. Fletcher (Software)
  29.                                1515 West Montgomery Avenue
  30.                                Rosemont
  31.                                PA 19010
  32.  
  33.  
  34.  
  35.                                   _______
  36.                              ____|__     |               (tm)
  37.                           --|       |    |-------------------
  38.                             |   ____|__  |  Association of
  39.                             |  |       |_|  Shareware
  40.                             |__|   o   |    Professionals
  41.                           -----|   |   |---------------------
  42.                                |___|___|    MEMBER
  43.  
  44.            
  45.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  46.           _______________________________        _______________________________
  47.           
  48.           
  49.                                      TABLE OF CONTENTS
  50.                                      _________________
  51.  
  52.  
  53.           User-Supported Software                                    1
  54.           Introduction                                               2
  55.           Getting Started                                            5
  56.           Hardware and Software Requirements                         7
  57.           Limitations and Restrictions                               9
  58.           Running the Programs - HDCHEK                             10
  59.                                - HDTEST                             12
  60.           Using the On-Disk Pre-Boot                                16
  61.           Dealing with Bad Clusters                                 18
  62.           Running HDTEST from a .BAT file                           19
  63.           Bugs and Other Unpleasant Subjects                        20
  64.           Changes from Previous Versions                            20
  65.           Appendix A - Summary of Flag Settings                     24
  66.           Appendix B - Disk Error Messages                          26
  67.           Appendix C - Example Program Runs                         33
  68.           Registration Form                                         36
  69.            
  70.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  71.           _______________________________        _______________________________
  72.           
  73.           
  74.                                   USER-SUPPORTED SOFTWARE
  75.                                   _______________________
  76.  
  77.           Much of the software which is available for your computer has, in the
  78.           past, been produced and sold on the assumption that you are a crook
  79.           and that you will take any available opportunity to cheat software
  80.           writers and vendors out of their rightful reward. Such software was
  81.           copy-protected within an inch of its (and your computer's) life and
  82.           was priced at a level which still guaranteed its producers a profit
  83.           even if four or five illegal copies were made for each one sold.
  84.           Thankfully, prices of commercial software have (for the most part)
  85.           come down somewhat, and copy-protection is becoming much less
  86.           prevalent, but buying such software remains something of a lottery -
  87.           you often cannot be sure that the software does what you want in the
  88.           way you want it done until you have paid for it. User-supported
  89.           software (Shareware) is different. You may have got a copy of this
  90.           package free from a friend or a bulletin board or (for a nominal fee)
  91.           from a users' group or software library. In any case, you have a
  92.           perfectly legal working copy of the HDTEST package. You are encouraged
  93.           to make as many copies of the package as you like and to distribute
  94.           them to all your friends. If, after trying the program out, you find
  95.           that it is useful and want to continue to keep and use it, you must
  96.           register your copy by sending the registration fee ($35.00, unless you
  97.           are already a registered user of DIREDIT, in which case it is $25.00)
  98.           together with the completed registration form, to the address on the
  99.           form. Only your conscience can make you do this (although you are
  100.                                          ____                              
  101.           probably breaking the law if you don't), but bear in mind that the
  102.           distributors of "user-supported" software are making the assumption
  103.           that you are honest and willing to pay a reasonable price for a useful
  104.           program, many commercial software vendors, on the other hand, would
  105.           still apparently rather believe you are a crook. You can decide who
  106.           you would rather prove right. Registered users are entitled to
  107.           support, upgrades, and help with HDTEST-related problems (including
  108.           telephone support) for a year from the date of registration.
  109.  
  110.           The author of this program is a member of the Association of Shareware
  111.           Professionals (ASP).  ASP wants to make sure that the shareware
  112.           principle works for you. If you are unable to resolve a shareware-
  113.           related problem with an ASP member by contacting the member directly,
  114.           ASP may be able to help. The ASP Ombudsman can help you resolve a
  115.           dispute or problem with an ASP member, but does not provide technical
  116.           support for members' products. Please write to the ASP Ombudsman at
  117.           P.O. Box 5786, Bellevue, WA 98006 or send a Compuserve message via
  118.           easyplex to ASP Ombudsman 70007,3536"
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.           
  134.           
  135.                                           Page 1 
  136.            
  137.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  138.           _______________________________        _______________________________
  139.           
  140.           
  141.                                        INTRODUCTION
  142.                                        ____________
  143.  
  144.           HDTEST was originally written to allow comprehensive Read/Write
  145.           testing of hard disks on IBM PCs, XTs, ATs, and "true" compatibles.
  146.           The V4.10 release removed many of the hardware restrictions imposed by
  147.           earlier (V2.xx and V3.xx) versions of the program and made it useful
  148.           for testing most MS-DOS-compatible storage devices currently in use on
  149.           IBM-compatible computers, including removable (floppy and hard) disks
  150.           and logically partitioned hard disks. The V4.34 release included BIOS-
  151.           level support for DOS 3.3 (and above) "extended devices" and more
  152.           options for the handling of totally unreadable sectors. The V4.53
  153.           release added even more extensive support for IBM-incompatible
  154.           hardware and removed the requirement that ANSI.SYS be loaded to
  155.           support a proper screen display. The current release adds support for
  156.           the large (> 32Mb) devices allowed by DOS 4.0, the ability to locate
  157.           bad spots physically (by track, head, and sector) on the disk, and
  158.           some support for the use of .BAT files to run HDTEST on multiple disks
  159.           at one "sitting".
  160.  
  161.           Although many programs, including IBM's diagnostics, allow "surface
  162.           scanning" and seek testing of hard disks, none that are available to
  163.           the average user test whether the whole disk can retain the data that
  164.           is or will be written to it. HDTEST's principal "claim to fame" is the
  165.           ability thoroughly to test the magnetic media in a device which
  166.           contains data while preserving the data (although data loss is
  167.                         _________________________                       
  168.           unavoidable if an area which is in use has become unreadable). HDTEST
  169.                                                               ____             
  170.           tests the disk much more thoroughly than programs such as DFixer,
  171.           Mace, and Norton's DT. Mace and DT, like many public domain "disk
  172.           test" programs, simply read every cluster on the disk and report on
  173.           any errors encountered.  DFixer does better, writing 4 test patterns
  174.           to every free cluster and checking that they can be read back
  175.           correctly, but it makes no attempt to test clusters that are already
  176.           in use - the very ones which contain your precious data! Disk
  177.           Technician (TM), a product which has come to market fairly recently,
  178.           is more closely comparable to HDTEST than any other disk testing
  179.           program that I know about. It is, however, much more expensive, is
  180.           (functionally, at least) copy-protected, and is not available as
  181.                                                           ___             
  182.           Shareware!
  183.  
  184.           In addition to its testing function, HDTEST has been reported to be
  185.           useful as an automatic disk repair utility for both hard and floppy
  186.           disks which have developed (especially) intermittent or persistent
  187.           read errors, preventing or impeding their normal use. Although HDTEST
  188.           cannot read the totally unreadable, it tries much harder that DOS does
  189.           and will almost always, in the course of its operation, allow you to
  190.           recover the entire readable portion(s) of a file with one or more
  191.                              ________                                      
  192.           unreadable clusters in it, optionally either remapping all of what it
  193.           reads from the disk or replacing bad sectors (the default) or clusters
  194.           with NULLs. HDTEST is not an alternative to backing up your floppies
  195.                                 ___                                           
  196.           and/or hard disk - it may sometimes be able to save your neck when you
  197.                                     _________                                   
  198.           forgot or your backup went bad too! On hard disks which have developed
  199.           intermittent read errors, running HDTEST can sometimes totally cure
  200.                                                    ___                       
  201.           the problem, presumably because the "flaky" sectors get rewritten and
  202.           the minor misalignments and/or weakening of the magnetic "image" which
  203.           were causing the trouble are corrected when the data is rewritten. In
  204.           its default ("slow") mode, HDTEST writes 20 different test patterns to
  205.           every cluster on the disk and checks that each pattern can be read
  206.           _____                                                             
  207.           
  208.           
  209.                                           Page 2 
  210.            
  211.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  212.           _______________________________        _______________________________
  213.           
  214.           
  215.           back correctly, while preserving (and eventually restoring) the
  216.           contents of the clusters that contain data.  HDTEST can even (on many
  217.           devices) detect hard disk errors which are minor enough to be
  218.           correctable (and corrected) by the disk controller's own "error-
  219.           correcting code" (ECC).  These errors are normally totally invisible
  220.           to programs running under DOS and will not usually be picked up by
  221.           other disk test utilities.  They may, however, be early signs of
  222.           problems that will become significant later, and HDTEST consequently
  223.           marks these clusters, too, as bad. As long as HDTEST can read the data
  224.           from a flaky cluster correctly once (and it tries quite hard) it will
  225.           be able to save the file of which that cluster is a part intact, while
  226.                                                                    ______       
  227.           marking the cluster so that DOS does not try to use it again. The
  228.           program was designed to minimize the likelihood of user error causing
  229.           data loss on a good (or slightly bad) disk, and to be easy to use - it
  230.           could not be made very fast, since multiple bit patterns have to be
  231.           written to and read from each cluster, and this takes a significant
  232.           time even on a fast hard disk. The program does, however, have a less
  233.           sensitive "fast" test mode, which writes only two test patterns to
  234.           each block and is recommended for use when testing/repairing floppy
  235.           disks and/or to correct intermittent problems or rule out gross
  236.           problems on a hard disk.
  237.  
  238.           The program can be used to test/repair single and double-sided 8- and
  239.           9-sector minifloppies (if you have plenty of patience!), as well as
  240.                                              ______                          
  241.           AT-format 1.2Mb minifloppies, 8" standard floppies, and 3.5"
  242.           microfloppies (with the same proviso regarding a need for patience).
  243.  
  244.           HDTEST's companion program, HDCHEK, simply examines the logical
  245.           structure of the system and target device and gives a short report on
  246.           what it finds. It does not write to the disk, and is provided
  247.                                  ___                                   
  248.           principally to allow a quick and easy, but fairly reliable, check on
  249.           the compatibility between HDTEST and a given software/hardware
  250.           configuration. As part of its report, HDCHEK notes at what level (DOS
  251.           interrupts only, INT 13, or direct entry to the BIOS) it was able to
  252.           access the target device, which has a bearing on HDTEST's ability to
  253.           detect certain types of errors. In general, if HDCHEK runs
  254.                                           __________                
  255.           successfully on a system and target device, then HDTEST can be
  256.           expected to do so, although the latter program requires much more
  257.           available memory.
  258.  
  259.           The HDTEST package is distributed as "User-supported Software". If you
  260.           intend to continue using the program, you are required to become a
  261.           Registered user. Send a completed copy of the Registration Form (which
  262.           is included in this documentation), together with a check or money
  263.           order for $35.00 (+ $5.00 for shipping outside the continent of North
  264.           America) to me at the address which appears on the form. Please also
  265.           add $2.50 (or equivalent) if you want the software on a 1.2 Mb HD
  266.           floppy or a 3.5" minifloppy, rather than a 360 Kb DSDD floppy, and
  267.           specify which you want on the Reg. form. Checks and money orders in
  268.           denominations other than U.S. dollars are acceptable, but please add a
  269.           further $10.00 for bank charges before using the current exchange rate
  270.           to calculate the fee in the currency in which you are paying. On
  271.           receiving your Registration, I will send you a personalised copy of
  272.           the latest, enhanced, version of the HDTEST package (currently V4.91),
  273.           and register you for a year's support. Registration entitles you to be
  274.           notified of upgrades, bug fixes, newly discovered incompatibilities,
  275.           etc., and to ask for (and get) necessary help in adapting the program
  276.           
  277.           
  278.                                           Page 3 
  279.            
  280.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  281.           _______________________________        _______________________________
  282.           
  283.           
  284.           to work on your hardware. I cannot guarantee to make HDTEST work with
  285.           every possible combination of hardware and software, but I will
  286.           promise to try to solve problems as they come up, and I will return
  287.           your Registration fee if I cannot support HDTEST on your system.
  288.           Support is available TO REGISTERED USERS ONLY by mail, BIXmail,
  289.                                ________________________                  
  290.           Compuserve EMail and telephone. Please also bear in mind that my
  291.           willingness and ability to continue to support and enhance these
  292.           programs will be directly dependent on users' willingness to pay the
  293.           Registration fee and (to some extent) inversely dependent on the
  294.           number of questions I get that could be answered by reading the docu-
  295.           mentation(!).
  296.  
  297.           The HD programs were written principally in C, compiled by the
  298.           Microsoft C compiler (Version 5.10) using its "small" memory model,
  299.           and linked with code from the distributed Microsoft C object libraries
  300.           using the Microsoft LINK program (Version 4.06).  Some low-level
  301.           functions were written in assembly language and assembled by the
  302.           Microsoft MASM Macro Assembler (Version 5.10). Portions of the
  303.           distributed program are consequently Copyright (C) by Microsoft Corp.,
  304.           1985 - 1988. All rights reserved. These portions are used under the
  305.           terms of a license from Microsoft Corp.
  306.  
  307.           The HD programs were written with care and have been tested on a
  308.           number of different systems.  I cannot, however, give any guarantee as
  309.           to their performance on a specific system, nor can I accept liability
  310.           for any actual or consequential loss resulting from their use. The
  311.           programs may only be used and/or copied in their original form.
  312.           Unauthorized modifications and/or the use of all or part of the
  313.           programs in other software, commercial or otherwise, are strictly
  314.           prohibited.
  315.  
  316.           The HD programs owe a lot of their value to suggestions and bug
  317.           reports (more of the former than the latter, fortunately) from
  318.           Registered users. They were originally written in response to
  319.           a "challenge" issued by Roedy Green on Bix, and their further
  320.           development has also been significantly influenced by his input.
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.           
  343.           
  344.                                           Page 4 
  345.            
  346.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  347.           _______________________________        _______________________________
  348.           
  349.           
  350.                                       GETTING STARTED
  351.                                       _______________
  352.  
  353.           This section gives step by step instructions for running HDCHEK and
  354.           HDTEST on the C: drive of a standard IBM PC, XT, AT, or 100%
  355.           compatible. Subsequent sections of this documentation go into much
  356.           more detail about some of the program's other features and options,
  357.           and should help to explain and let you deal with any problems which
  358.           you may encounter. Note that you should never attempt to run HDTEST
  359.                                                   _____                      
  360.           under a multi-tasking or multi-user operating system, nor activate any
  361.           "pop-up" program (e.g. SideKick) while the program is running.
  362.  
  363.           1) Use the DOS DISKCOPY program to make a duplicate of the
  364.           distribution disk, put the original away in a safe place, and use the
  365.           duplicate as your working disk.
  366.  
  367.           2) Make sure that you have current backups of all the files on drive
  368.           C:. This is particularly important when running the program for the
  369.           first time on a given system.
  370.  
  371.           3) Run DOS's CHKDSK program on drive C: and correct any errors
  372.           reported by it before proceeding further.
  373.  
  374.           4) Make the drive and/or directory which contains HDCHEK.EXE and
  375.           HDTEST.EXE your current drive and/or directory.
  376.  
  377.           5) Insert a formatted, non-write-protected floppy disk in drive A.
  378.           HDTEST will write an ASCII log file called HDTEST.LOG to this disk -
  379.           any other files on it will be undisturbed.
  380.  
  381.           6) Give the command: "HDCHEK C:". After a certain amount of disk
  382.           activity has taken place, and certainly within a minute or two, your
  383.           screen should look like one of the examples given in Appendix C. If
  384.           any errors are reported, DO NOT PROCEED until you have read the rest
  385.                                    ______________                             
  386.           of the documentation and/or are sure you know what is going on.
  387.  
  388.           7) If HDCHEK reported no errors, give the command "HDTEST C: A:".
  389.              ____________________________                                  
  390.           After some disk activity, the program will prompt for replies to three
  391.           questions - press <Return> in response to each prompt. The program
  392.           will report its progress to the screen and will record any problems
  393.           encountered in the log file on the floppy disk. Depending on the size
  394.           of your DOS partition and the access time of the disk, a complete run
  395.           of HDTEST (in its normal, "slow", mode) will take between 2 and 5
  396.           hours. Your intervention will only be required if a recovered bad
  397.           _____                                                            
  398.           cluster is found in a "hidden", "system", or write-protected file,
  399.           when you will be asked to approve remapping; otherwise, bad clusters
  400.           will be automatically remapped. HDTEST can be aborted at any time by
  401.           pressing <Esc> and responding to the "Are you sure...." prompt by
  402.           pressing <Return>.
  403.  
  404.           8) If HDTEST finishes testing without finding any bad clusters, it
  405.           will simply record that fact and the finishing time in the log file
  406.           and return to the DOS prompt. Otherwise, when read/write testing has
  407.           been completed, you will be prompted for permission to complete the
  408.           remapping process by updating the disk FATs and Directories.  Pressing
  409.           <Return> will allow this to take place, and you will then be returned
  410.           to the DOS prompt.
  411.           9) N.B. If HDTEST reported and remapped any bad clusters and you are
  412.              ____                                                  ___        
  413.           
  414.           
  415.                                           Page 5 
  416.            
  417.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  418.           _______________________________        _______________________________
  419.           
  420.           
  421.           using the DOS (3.3 and above) FASTOPEN utility, or any other
  422.           directory- or file-cacheing software, you should reboot your system
  423.           before proceeding with other work on it.
  424.  
  425.           10) In any event, if HDTEST reported and remapped some bad clusters,
  426.           you should read the section on "Dealing with bad clusters" later in
  427.           this documentation.
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.           
  479.           
  480.                                           Page 6 
  481.            
  482.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  483.           _______________________________        _______________________________
  484.           
  485.           
  486.                              HARDWARE & SOFTWARE REQUIREMENTS
  487.                              ________________________________
  488.  
  489.           HDTEST and HDCHEK make a number of assumptions about the environment
  490.           in which they are operating. They will, generally speaking, abort with
  491.           an informative error message if they find one of these assumptions to
  492.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  493.           about 320 Kb of free memory (the exact amount required depends on the
  494.           size and other characteristics of the device being tested) to run -
  495.           the presence of more memory may (slightly) increase HDTEST's speed
  496.           when testing devices with large cluster sizes. The device to be tested
  497.           must be usable as a normal DOS device - commands such as DIR, COPY,
  498.           and CHKDSK should be valid for it and for files and subdirectories on
  499.           it. It need not, however, be bootable. Only the DOS partition(s) of a
  500.           multi-operating-system disk can be tested, but all the partitions of a
  501.           disk that is divided into multiple DOS partitions can be tested (one
  502.                                              ___                              
  503.           by one). This version of HDTEST fully supports DOS 3.3 (and above)
  504.           extended partitions, and will test them as thoroughly as it does
  505.           normal DOS partitions. HDTEST's support for other disk partitioning
  506.           software is provided only to the extent that DOS support is provided
  507.           by the producers of that software.
  508.  
  509.           If you wish to use HDTEST to test a new hard disk which is to be
  510.                                        ____                               
  511.           configured to support multiple operating systems, you should first
  512.           configure it as one or more DOS partitions, test it in that
  513.           configuration, and then reconfigure it as you intend to use it. If you
  514.                                   __                                            
  515.           have low-level disk formatting software which allows you to specify
  516.           bad sectors and/or tracks to be "locked out", you can use HDTEST's /G
  517.           option on the DOS partition(s) to produce a list of defects, which can
  518.           then be used in reformatting the disk. Note that HDTEST can only be
  519.                                                                       ____   
  520.           used as a test for areas of the disk that are to be devoted to other
  521.                     ____                                                      
  522.           operating systems - when you repartition the disk, any remapping
  523.           and/or marking of bad clusters which HDTEST may have done in the DOS
  524.           partition is lost.
  525.  
  526.           Ideally, for normal hard disks, the BIOS handler for interrupt 13
  527.           should be capable of handling (at least) normal disk reads and writes
  528.           (sub-functions 2 and 3) in a way that is compatible with that
  529.           documented for the XT hard disk adapter (and AT BIOS) in IBM's
  530.           technical documentation. This should be no problem for most disk
  531.           systems on IBM PCs and most compatibles.  HDTEST may, however, be
  532.           forced to use the (somewhat more limiting) DOS device interface when
  533.           used with non-bootable hard disks and/or with hard disks which require
  534.           special device drivers to be installed, and will be forced to use the
  535.           DOS device interface when dealing with disks partitioned by means
  536.           other that the DOS 3.3 (and above) utilities.
  537.  
  538.           Earlier V4.xx releases of HDCHEK and HDTEST would abort if run on
  539.           small (<= 10 Mb) hard disks which had been patched to use a cluster
  540.           size smaller than the DOS standard (and 16-bit FATs). This deficiency
  541.           has been corrected in the current version, but very small (less than
  542.           1024 clusters) partitions may still cause problems if 16-bit FATs are
  543.           used (there is no good reason why such partitions should use 16-bit
  544.           FATs).
  545.  
  546.           If run under DOS 3.0 or above on an IBM INT 13 compatible hard disk,
  547.           The HD programs attempt to locate and use the ROM BIOS INT 13 entry
  548.           point, rather than the normal INT 13 vector (which DOS 3.x intercepts
  549.           
  550.           
  551.                                           Page 7 
  552.            
  553.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  554.           _______________________________        _______________________________
  555.           
  556.           
  557.           and interferes with). By default, for machines with 8088, 8086, 80188,
  558.           80186, or equivalent CPUs the programs assume that, if a ROM is
  559.                                                               ___________
  560.           present at absolute address C8000H, it contains the hard disk BIOS and
  561.           _______                                                            ___
  562.           has initialization code starting at offset 3. This assumption is true
  563.           for all hard disks which "plug in" to the IBM PC and XT. It may not be
  564.           true for all clones which come with hard disks installed, although it
  565.           is likely to be true for most of them. Also by default, the programs
  566.           assume that the hard disk BIOS in systems with 80286 or 80386
  567.           processors is in the "system" ROM at absolute address F0000H, but
  568.           make no more specific assumptions about its location. Problems (up to
  569.                __                                                              
  570.           and including system halts) may occur if none of the special flags is
  571.           set and your system is configured in a way that is not consistent with
  572.           these assumptions. They are almost guaranteed for PC or XT systems if
  573.           the initialization code does not start at offset 3 in the ROM. If you
  574.           know that your hard disk ROM is located somewhere other than at the
  575.           default segment address and/or does not obey the "rules", you can use
  576.           the /H flag to tell the programs where to look for it. Unless you know
  577.           that your system is particularly non-IBM-compatible, however, it is
  578.           usually worth trying to run the HD programs in their default mode
  579.           first. Problem hardware should respond to one of the approaches
  580.           described in the "Using the On-Disk Preboot" section of this
  581.           documentation. The use of all the command line flags is discussed in
  582.           more detail below.
  583.  
  584.           Note that, since HDTEST remaps bad clusters to free space, there is
  585.           not much point in running it on a disk which has none (as shown by DIR
  586.           or CHKDSK), since the program will abort immediately if it finds a bad
  587.           cluster.  Unless you have a really flaky disk, however, you should not
  588.           need more than a couple of hundred Kb free to remap any reasonably
  589.           probable number of bad clusters.
  590.  
  591.           This version of the HD programs does not require an ANSI console
  592.           driver (such as ANSI.SYS) to be loaded. The programs will, however,
  593.           continue to function correctly if such a driver is present.
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.           
  618.           
  619.                                           Page 8 
  620.            
  621.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  622.           _______________________________        _______________________________
  623.           
  624.           
  625.                                LIMITATIONS AND RESTRICTIONS
  626.                                ____________________________
  627.  
  628.           The current version of HDTEST still has a few (mainly theoretical)
  629.           limitations, most of which result from the way data is stored
  630.           internally by the program. None of them are "etched in stone",
  631.           although some could only be avoided at the cost of slowing down what
  632.           is already (and necessarily) far from a fast program. The known
  633.           limitations are as follows:
  634.  
  635.           1) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  636.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  637.           less than that and may, since sector and cluster sizes tend to run in
  638.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  639.           enough for most people!.
  640.  
  641.           2) DOS 4.0 and Compaq DOS 3.31 allow larger FATs than previous
  642.           versions of DOS (the FAT may be up to 128 Kbytes in extent, compared
  643.           with 64 Kbytes in previous DOS versions) Compaq DOS is not yet using
  644.                                                                          _____
  645.           FATs of this size, except on very large devices, but IBM/MS-DOS
  646.           creates FATs greater than 64Kb in extent on all partitions bigger than
  647.           about 66Mb. This version of the HDTEST package cannot handle
  648.           partitions with FATs larger than 64 Kbytes (128 sectors) in extent.
  649.           The Registered version of the package can handle devices up to the
  650.           current DOS size limit (512 Mb).
  651.  
  652.           3) Because of certain limitations of the chips used to support direct
  653.           memory access (DMA, the method used to transfer data from disk to
  654.           memory and vice versa) in the IBM PC and most clones and compatibles,
  655.           HDTEST may be unable to use available memory efficiently when cluster
  656.           sizes (and the buffers needed to hold them) are large. This
  657.           inefficiency can result in "Insufficient Memory" or "Memory
  658.           Allocation" errors, even on systems with more than the minimum 320 Kb
  659.           of free memory prescribed above. The only cure for this is to free up
  660.           (or buy!) more memory (remove RAMdisks, remove resident software,
  661.           etc.).
  662.  
  663.           4) The current version of HDTEST will run, in its default mode, on ATs
  664.           and most AT clones, but may not be able to detect corrected ECC errors
  665.           when run in that mode on some of the clones - a warning message will
  666.           be displayed when the program initializes itself if corrected ECC
  667.           errors are not being detected. Appropriate use of the extended form of
  668.           the /H flag or the /U flag, as described in the "Using the On-Disk
  669.           Preboot" section of this documentation, will allow detection of
  670.           corrected ECC errors on almost all hardware. The program will not
  671.                                                                         ___
  672.           detect corrected ECC errors when invoked with the /I flag (under DOS
  673.           3.0 or above) or with the /D flag.
  674.  
  675.           5) For reasons which are poorly understood (at least by the author!),
  676.           HDTEST runs very slowly on Epson Equity II systems, particularly when
  677.                       ____                                                     
  678.           used to test "plug-in" hard drives of the "Hardcard" or "Flashcard"
  679.           variety. For this hardware, the estimated run times given elsewhere in
  680.           the documentation need to be multiplied by about 2.5. There is some
  681.                                        __________          ___               
  682.           reason to think that this problem may be related to an excessively
  683.           "optimistic" interleave setting on (at least) some of these systems.
  684.  
  685.  
  686.  
  687.           
  688.           
  689.                                           Page 9 
  690.            
  691.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  692.           _______________________________        _______________________________
  693.           
  694.           
  695.                                    RUNNING THE PROGRAMS
  696.                                    ____________________
  697.  
  698.           Always run HDCHEK on any new hardware/software configuration before
  699.           ______                                                             
  700.           you attempt to run HDTEST (at least the first time). The latter
  701.           program has been written as conservatively as possible, but it is not
  702.           possible to predict the behavior of every conceivable combination of
  703.           hardware and operating system when dealing with a program which
  704.           bypasses most of the controls which normally protect the user from
  705.           destroying his world. HDCHEK is invoked with the command line:
  706.  
  707.           HDCHEK device [/A] [/Cn | /CQ] [/D | /I | /U] [/Hnnnn[:nnnn] [/M]
  708.  
  709.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  710.           are permitted but not required). For versions of HDCHEK from V4.35,
  711.                             ___                                              
  712.           the spaces between the device identifier and the flags (and between
  713.           different flags) are optional - the command lines "HDCHEK C:/C2/D" and
  714.           "HDCHEK C: /C2 /D" are equivalent.
  715.  
  716.           The /A(T) flag is used to tell the HD program that it is being run on
  717.           an IBM AT. Setting the /A flag allows the programs to deal correctly
  718.           with a known bug in the IBM AT floppy disk controller BIOS when HDTEST
  719.           is used on 1.2 Mb "AT format" 5.25" floppy disks. If the /A flag is
  720.           set and the CPU is not an 80286 or better, you will be asked to
  721.           confirm that you wish to use AT defaults (HD BIOS at F0000H).
  722.  
  723.           N.B. the definition of the /A flag changed (slightly) at V4.71 - it
  724.           ___________________________________________________________________
  725.           need now only be used if you are testing a 1.2 Mb floppy disk on a
  726.           __________________________________________________________________
  727.           "vanilla" IBM AT. It may still be used to change the default BIOS
  728.           _________________________________________________________________
  729.           segment to F0000H on a PC or XT class machine, but the use of the /H
  730.           ____________________________________________________________________
  731.           flag for this purpose is preferred.
  732.           ___________________________________
  733.  
  734.           The /C flag has two variants. It is used, immediately followed by a
  735.           single decimal digit ("n") in systems which do not support IBM's
  736.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  737.           The parameter ("n") is the number of floppy drives attached to the
  738.           system, which would otherwise be determined by the program, using INT
  739.           11. The second variant should be used on Compaq computers - here, the
  740.           flag is followed by a "Q", instead of a number. This variant enables
  741.           large device support (as for IBM DOS 4.00) under Compaq DOS 3.31.
  742.  
  743.           The /D(OS interrupts) flag forces HDCHEK to use the hardware-
  744.           independent DOS interrupt 25 for access to the target device. It is
  745.           usually not required, since the program is usually smart enough to
  746.           _______                                    _______                
  747.           recognize devices which have to be accessed this way (e.g. logical
  748.           disk partitions other than those created as DOS 3.3 (and above)
  749.           "Extended Devices", non-bootable hard disks, some removable-media hard
  750.           disks). If the /D flag is not used, the program will issue a warning
  751.                                     ___                                       
  752.           message if it finds it has to use the DOS interrupts.
  753.  
  754.           N.B. the definition of the /D flag changed at V4.00 - the new /I flag
  755.           _____________________________________________________________________
  756.           has the same effect as the old (pre-V4.00) /D flag. Only one of these
  757.           _____________________________________________________________________
  758.           flags may be present on the command line.
  759.           _________________________________________
  760.  
  761.           The /I(nterrupt 13) flag has no effect under DOS 2.x.  Under DOS 3.0
  762.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  763.           always does under DOS 2.x), and prevents the program from trying to
  764.           determine the ROM BIOS entry point; the flag should be used if you
  765.           
  766.           
  767.                                          Page 10 
  768.            
  769.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  770.           _______________________________        _______________________________
  771.           
  772.           
  773.           know that your system's fixed disk BIOS uses INT 13 but does not
  774.           follow IBM's "rules" or if the program crashes the system when invoked
  775.           without it.
  776.  
  777.           The /H(ex BIOS address) flag is normally used (with a single numeric
  778.           argument) to tell the HD programs that the ROM BIOS of the device
  779.           being tested is located at nnnn, which is interpreted as a Hexadecimal
  780.           segment address, rather than at C800, which is the default for PC and
  781.           XT class machines, or F000, which is the default for systems using a
  782.           80286 or better CPU. There must be no space between the H and the
  783.           number. The extended form of the /H flag (e.g. /HF000:80D5) forces the
  784.           HD programs to use the given address as the ROM BIOS INT 13 entry
  785.                                                ____________________________
  786.           point. Its use is documented in more detail in the "Using the On-Disk
  787.           _____                                                                
  788.           Preboot" section of this documentation.
  789.  
  790.           The /M(ulti-track read problem) flag forces HDCHEK to split up disk
  791.           accesses that would otherwise require the BIOS to read data from more
  792.           than one track in a single "bite". Its use is documented in more
  793.           detail in the "Using the On-Disk Preboot" section of this
  794.           documentation.
  795.  
  796.           The /U(se INT 68) flag forces the HD programs to use the existing INT
  797.           68 vector (which must have been set up to point to an appropriate
  798.           location!) instead of locating and using the INT 13 BIOS entry point.
  799.           The use of this flag is documented in more detail in the "Using the
  800.           On-Disk Preboot" section of this documentation.
  801.  
  802.           After a short delay, during most of which the specified device will be
  803.           active, a description of the device's logical structure will be disp-
  804.           layed.  After a further delay, and more disk activity, a message will
  805.           be printed giving the number of files and subdirectories found on the
  806.           disk, and the program will exit back to DOS. Note that the total
  807.           number of files and subdirectories reported by HDCHEK will be greater
  808.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  809.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  810.  
  811.           Errors and/or problems encountered, if any, will be reported on in
  812.           some detail. A number of example screen displays and log files
  813.           produced by running HDCHEK (and HDTEST) on different systems will be
  814.           found in Appendix C at the end of this documentation. If HDCHEK tells
  815.           you that you have a bad 8088 chip, believe it - some early 8088s had a
  816.           bug which allowed them to be interrupted while changing their stack
  817.           frame*  - this is not benign, and can cause all sorts of rare,
  818.           otherwise almost inexplicable, problems. The only cure is to replace
  819.           the CPU (which is, fortunately, not a particularly expensive
  820.           proposition these days). If HDCHEK reports a discrepancy between the
  821.           two FATs, HDTEST will abort. The FIXFAT program (also in the package)
  822.           may be able to correct this problem - see FIXFAT.DOC.
  823.  
  824.  
  825.           _____________________________________________________________________
  826.  
  827.           * See "Chips in Transition", by Bob Smith. PC Tech J. 4:4 (Apr. 1986):
  828.                                                      __________                 
  829.           56-69. The code which the HD programs use to identify the CPU and
  830.           diagnose this problem is adapted from the CPUID program described in
  831.           this article and includes code from subsequent, related, articles in
  832.           that magazine.
  833.           
  834.           
  835.                                          Page 11 
  836.            
  837.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  838.           _______________________________        _______________________________
  839.           
  840.           
  841.           Always run the DOS CHKDSK program immediately before running
  842.           HDTEST on a disk. If CHKDSK reports any problems, its /F option (or
  843.           other means) should be used to correct them before HDTEST is run.
  844.                                                       ____________________ 
  845.  
  846.  
  847.           HDTEST is invoked with the command line:
  848.  
  849.                HDTEST device1 [device2[:pathname]] [optional parameters]
  850.  
  851.           "optional parameters" may include one or more of the following:
  852.  
  853.           [/A] [/B] [/Cn | /CQ] [/D | /I | /U] [/F] [/G[V]] [/Hnnnn[:nnnn]] [/M]
  854.           [/N] [/P] [/R[n]] [/Snnnnn] [/U] [/X] [/Yn] [/Z[n]]
  855.  
  856.           "device1" is the name of the device to be tested, as for HDCHEK.
  857.           "device2" (which, if present, must be different from "device1") is the
  858.           name of a device on which a log file is to be written. If only a
  859.           device name (with or without a colon) is specified for the log file,
  860.           a file called HDTESTdn.LOG will be written to the default directory on
  861.           the specified device. "d" in this file specification is replaced by
  862.           the single-character specifier of the device being tested, while "n"
  863.           is replaced by the lowest decimal digit which results in the creation
  864.           of a new file (previous log files will not be overwritten). If all ten
  865.                ___                               ___                            
  866.           possible log file names for this test device have already been used,
  867.           the program will prompt for a new name. If a directory path (ending in
  868.           a backslash (\)) is specified as device2, HDTESTdn.LOG will be created
  869.           in the specified directory. If a full pathname is specified (not
  870.                                                                        ___
  871.           ending in a backslash), a file with that pathname will be opened as
  872.           the log file. In this case (only), any pre-existing file of the same
  873.           name will be overwritten. If "device2" is not specified, errors are
  874.           reported to the console terminal. The DOS console redirection facility
  875.           should not be used to redirect them elsewhere.
  876.                  ___                                    
  877.  
  878.           For versions of HDTEST from V4.35, the spaces between the device
  879.           identifier and the flags (and between different flags) are optional -
  880.           the command lines "HDTEST C:/A/F" and "HDTEST C: /A /F" are
  881.           equivalent.
  882.  
  883.           The /A, /C, /D, /H, /I, /M, and /U flags have the same meaning and
  884.           effect that they do for HDCHEK. When used for HDTEST, the /D flag
  885.           forces the use of INT 25 to read from and INT 26 to write to the
  886.           target disk.
  887.  
  888.           The /B(oot/Partition sector test) flag forces the program to include
  889.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  890.           for the purposes of read/write testing. The default action is only to
  891.           perform read and seek tests on this sector, even if read/write testing
  892.           of the DOS area is specified. Since the boot/partition sector is
  893.           effectively read-only under normal circumstances (it is only written
  894.                                                                        _______
  895.           to during low-level formatting, and by FDISK and other disk
  896.           __                                                         
  897.           partitioning programs), read/write testing is less vital than for the
  898.           rest of the disk. In addition, at least one hard disk controller (a
  899.           Western Digital board which allows a single disk to be addressed as
  900.           two "physical" devices) will not allow test patterns to be written to
  901.           this sector. Certain devices (chiefly RAMdisks) appear to DOS to be
  902.           hard disks but do not, in fact, possess boot/partition sectors. On
  903.           these devices, HDTEST will report check/test results on the
  904.           
  905.           
  906.                                          Page 12 
  907.            
  908.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  909.           _______________________________        _______________________________
  910.           
  911.           
  912.           boot/partition sector while actually reading/writing the device's boot
  913.           sector - the latter sector will simply end up being checked/tested
  914.           twice under these circumstances.
  915.  
  916.           The /F(ast mode) flag causes the program to use only two test patterns
  917.           (all 1s and all 0s) for read/write testing. It is intended for use on
  918.           floppy disks and for "quick and dirty" testing of other devices.
  919.  
  920.           The /G(ive error details) flag causes the program to determine the
  921.           location of errors occurring during testing of the disk's data area
  922.           at the sector level (they are normally handled at the cluster level),
  923.           and to report on the location of all bad sectors found. The report is
  924.           written to the log device or file after all testing is finished. By
  925.                                             _____________________________    
  926.           default, only an error code is given for each bad sector - if a V (for
  927.           "verbose"!) is appended to the flag, the error code is expanded to a
  928.           report similar to that given for each bad cluster. This flag is
  929.           ineffective (and ignored) if HDTEST is using DOS interrupts, either
  930.           because the /D flag was set or because the program was not able to
  931.           access the disk at the BIOS level.
  932.  
  933.           The /N(o Query) flag disables the individual prompts for confirmation
  934.           which the program normally issues before remapping clusters which are
  935.           marked as "Reserved" or which are part of a file which is marked as
  936.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the
  937.                                                                ___            
  938.           program from prompting for confirmation before updating the disk.
  939.  
  940.           The /P(rint) flag causes the log file to be directed to the PRN device
  941.           (normally LPT1), and overrides any "device2" specification.
  942.  
  943.           The /R(epeat)n flag causes HDTEST to go through n complete testing
  944.           cycles. Omitting n, or setting it to zero, causes HDTEST to run
  945.           continuously until terminated by pressing <Esc>). Instead of stopping
  946.           after completing the testing of allocated data clusters, the program
  947.           immediately starts again with the DOS area. Any bad clusters found and
  948.           flagged in the first pass should be reported as "already marked as
  949.           bad" in subsequent passes. The /R flag implicitly sets the /N flag.
  950.  
  951.           The /S(tart)nnnnn flag causes HDTEST to start testing occupied
  952.                                                                 ________
  953.           clusters at cluster number nnnnn (expressed as a decimal number).
  954.                                                            _______         
  955.           There must be no space between the "S" and the number. This option
  956.           will mainly be useful when a previous run of HDTEST was interrupted
  957.           (by pressing <Esc>), since it allows you to start where you left off.
  958.           Note that, in order to be sure that data is not remapped to a bad
  959.           area, HDTEST always tests all empty clusters before starting to test
  960.                        ______       ___                                       
  961.           occupied clusters. For this reason, using the /S flag will not result
  962.           in a large time saving if your disk is nearly empty, and it will make
  963.           the most difference on a full, or nearly full, disk.
  964.  
  965.           The /Y(es, please remap)n flag causes HDTEST to remap up to n (a
  966.           decimal number) bad clusters without prompting for confirmation. It is
  967.           effective only if HDTEST is allowed to run to completion, and is
  968.           intended to allow the program to be run unattended on multiple disks
  969.           from a .BAT file. If more than n bad clusters are found or if the
  970.           program is aborted (by pressing <Esc>), the normal prompt for
  971.           confirmation is issued before any bad clusters are remapped. See
  972.           "Running HDTEST from a .BAT file".
  973.  
  974.           
  975.           
  976.                                          Page 13 
  977.            
  978.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  979.           _______________________________        _______________________________
  980.           
  981.           
  982.           The /X(clude bad clusters) flag causes HDTEST not to test clusters
  983.                                                         ___                 
  984.           that are already marked as bad by FORMAT or previous runs of HDTEST
  985.           (the default is to test all clusters every time the program is run).
  986.                                   ___                                         
  987.           This saves some time when testing a disk with a substantial number of
  988.           known defects. The marked clusters will be reported as bad but will
  989.           not be retested. The /X flag overrides the /G flag for previously
  990.           marked clusters - no bad sector report will appear for these clusters
  991.           if both flags are used.
  992.  
  993.           The /Z(ero bad sectors)n flag controls how HDTEST deals with sectors
  994.           that could not be read correctly (due to unrecoverable read errors)
  995.           when it remaps bad clusters. Versions of HDTEST up to and including
  996.           V4.10 (somewhat cavalierly) disregarded the remaining contents of the
  997.           entire cluster if one or more sectors in it were unreadable, and
  998.           remapped it to a cluster of NULLs. The default action is now to
  999.           replace only the unreadable sector(s) with NULLs, transferring the
  1000.                                       _________                             
  1001.           remaining sectors intact to the remapped cluster. There are, however,
  1002.           two other options, which can be chosen by setting n to 0 or 2 (if n is
  1003.           omitted, 1, or any other number, the default action is taken). Setting
  1004.           n to 0 uses the old default (remaps the bad cluster to a cluster of
  1005.                           ___                                      _______   
  1006.           NULLs), while setting n to 2 goes to the other extreme and copies all
  1007.           data read (some of which is almost certainly invalid) to the remapped
  1008.           cluster. It is always safe and often advisable to use the /Z2 option
  1009.           provided that you do not try to use any non-ASCII files that have been
  1010.           ______________________________________________________________________
  1011.           remapped with unrecovered read errors and this (/Z) option. Remapped
  1012.           ___________________________________________________________         
  1013.           ASCII files can be inspected with an editor and fixed up where
  1014.           necessary - non-ASCII files (e.g. .EXE, .COM, .WKS files) may appear
  1015.           to be undamaged (the program may run, the worksheet be readable, etc.)
  1016.           but they can still contain small changes which will cause trouble
  1017.           later, and they cannot easily be checked. The large "holes" which /Z
  1018.           options 0 and 1 leave in such files usually allows it to be much more
  1019.           obvious that they are defective!
  1020.  
  1021.           After displaying its copyright message, HDTEST reads the FATs and
  1022.           scans the root directory and all subdirectory trees of the specified
  1023.           device before initiating a short dialogue. All questions are of the
  1024.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  1025.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  1026.           alone is equivalent to giving the default response (which appears in
  1027.           square brackets at the end of each prompt).  HDTEST then proceeds to
  1028.           test the specified device. By default, the DOS area (boot sector,
  1029.           FATs, and root directory) is not subjected to Read/Write testing,
  1030.           since failures in this area usually make themselves apparent fairly
  1031.           rapidly. The user can, however, choose to run these tests on the DOS
  1032.           area too, or to limit testing to read and seek tests only over the
  1033.           whole partition.
  1034.  
  1035.           In its reports to the screen, HDTEST uses the convention that read-
  1036.           only testing is "Checking" while read/write testing is "Testing" - it
  1037.           always "checks" the boot/partition sector and the rest of the DOS
  1038.           area, but only "tests" them if requested to do so.
  1039.  
  1040.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  1041.           reads it (retrying, if necessary, up to five times) and then does the
  1042.           longest possible seek away from it before attempting to read it again.
  1043.           "Checking" is complete at this point. "Testing" continues with the
  1044.           program sequentially writing 20 (or 2, for "fast mode") different bit
  1045.           
  1046.           
  1047.                                          Page 14 
  1048.            
  1049.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1050.           _______________________________        _______________________________
  1051.           
  1052.           
  1053.           patterns to the block and checking that each one can be read
  1054.           correctly, before rewriting the original contents of the block (and
  1055.           reading it again to ensure that it has been restored correctly).
  1056.           Errors that occur at any point in this process are reported and (if
  1057.           the block is in the data area - errors in the DOS area are always
  1058.           treated as fatal) the block is remapped. If an error is detected in a
  1059.           "Reserved" cluster or in one that is part of a file which is marked as
  1060.           "System", "Hidden", or "Readonly", the user is normally asked for
  1061.           confirmation before the cluster is remapped, otherwise it is assumed
  1062.           that remapping is desired.
  1063.  
  1064.           HDTEST keeps a copy of the FAT and a map of the device's directory
  1065.           structure in memory. A bad cluster is remapped by transferring its
  1066.           contents to a free cluster and (if the bad cluster was in use)
  1067.           changing all necessary FAT and directory entries in memory so that the
  1068.           pointer chain which maintains the structure of the affected file or
  1069.           subdirectory remains valid. The bad cluster's FAT entry is then
  1070.           altered to identify it as bad to DOS. The device's FATs and
  1071.                                                     ________         
  1072.           directories are not altered until the whole device has been scanned,
  1073.           and then only after the user has confirmed that it is OK to proceed.
  1074.           This means that a power failure and/or an inadvertent power-off which
  1075.           occurs while the program is running will cause the loss of, at most,
  1076.           one cluster of data and of no FAT or root directory information
  1077.           (unless you are very unlucky and it happens after you have confirmed
  1078.                           ____                                                
  1079.           that you want a damaged data area to be remapped and while this is
  1080.           being done). If a power failure and/or power-off occurs while a
  1081.           cluster which contains the directory information of a subdirectory is
  1082.           being tested, part or all of that subdirectory will probably become
  1083.           inaccessible to DOS, although the data in it will remain on the disk
  1084.           and be potentially recoverable with the aid of (e.g.) the Norton
  1085.           Utilities (TM).
  1086.  
  1087.           You can safely interrupt the testing process part way through (by
  1088.           pressing the <Esc> key) with no risk of leaving a partially updated
  1089.           FAT or directory. If you do interrupt the program in this way, you
  1090.           will be given the option of updating the disk, so that bad clusters
  1091.           which were detected before <Esc> was pressed can be remapped.
  1092.  
  1093.           Errors which occur in the program's initialization phase cause it to
  1094.           abort with an error message and (sometimes) a hexadecimal error code.
  1095.           The meaning of the error code is context-dependent and it is useful
  1096.           only to technical support personnel. Errors detected during read-write
  1097.           testing only cause the program to abort if they occur during testing
  1098.           of the DOS area, or if remapping is impossible (only likely to happen
  1099.           if the disk is full). In any event, a description of the error is
  1100.           written to the log file (if any) and/or to the screen. This specifies
  1101.           the cluster or (for the DOS area) sector number and the name of the
  1102.           affected file (if any), and defines the type(s) of error which
  1103.           occurred. Appendix B contains a discussion of some of the more
  1104.           technical aspects of data storage on disks (floppy and hard), and
  1105.           includes more information about some of the possible errors that may
  1106.           be encountered.
  1107.  
  1108.           HDTEST takes a very long time to run to completion because of the
  1109.                          ____                                              
  1110.           large number of reads and writes it does for each cluster. A typical
  1111.           time for full testing ("slow" mode) of an XT disk (10 Mb) would be 2
  1112.           hrs; full disk testing on a 30 Mb Enhanced AT takes at least 4 hrs.
  1113.           
  1114.           
  1115.                                          Page 15 
  1116.            
  1117.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1118.           _______________________________        _______________________________
  1119.           
  1120.           
  1121.           Note also that using the /D or /G flags will substantially slow down
  1122.           the testing of disks with significant numbers of bad spots. Using
  1123.           the /X flag as well will allow the physical location of new defects to
  1124.           be reported without requiring that known bad areas be exhaustively
  1125.           retested.
  1126.  
  1127.  
  1128.                                 USING THE ON-DISK PRE-BOOT
  1129.                                 __________________________
  1130.  
  1131.           All IBM systems (at least non-PS/2 ones - I have little experience,
  1132.           yet, with the new line of IBM hardware) - and almost all clones
  1133.           capable of running IBM PC-DOS (rather than "generic" MS-DOS) should
  1134.           also run the HD programs with no problems, and should allow them to
  1135.           locate and use the ROM BIOS INT 13 entry point with no help from the
  1136.           user. Less compatible systems have presented more problems in the
  1137.           past, but this version of HDTEST is distributed with a supplemental
  1138.           program (BOOTLOAD) which can be used to modify the boot sector on a
  1139.           floppy disk and create a special pre-boot floppy to allow
  1140.           identification and use of the "real" INT 13 entry point on almost any
  1141.           MS-DOS-compatible system. Once created by BOOTLOAD, the special boot
  1142.           sector will be correctly duplicated if copy the disk by using the DOS
  1143.                  ____                                                          
  1144.           "DISKCOPY" command - it will not be copied by a "COPY *.*" command.
  1145.                                        ___                                   
  1146.           Further documentation for the BOOTLOAD program (BOOTLOAD.DOC) should
  1147.           have been included in this package.
  1148.  
  1149.           After using BOOTLOAD to create the special pre-boot disk, insert it in
  1150.           the boot drive (normally drive A), then (re)boot your system as you
  1151.           normally do (either by switching it on or by pressing the <Ctrl>-
  1152.           <Alt>-<Del> combination or its equivalent for your hardware). After
  1153.           performing its self-test, the system's BIOS will load and pass control
  1154.           to the code on the boot sector of the floppy. On a normally FORMATTed
  1155.           floppy disk, this code attempts to locate the MS-DOS system files at
  1156.           the beginning of the disk's root directory and to load and execute
  1157.           them. The HDTEST boot disk will not load DOS (even if you SYS the
  1158.           disk) - it simply reads and reports on the contents of the INT 13
  1159.           vector (which DOS has not yet had a chance to tamper with, since it
  1160.           has not been loaded) and conditionally transfers the vector to the INT
  1161.           68 location. The INT 68 location is normally unused in MS-DOS systems
  1162.           - it is defined that way by IBM - and is usually loaded either with
  1163.           zeroes or with a pointer to some "do-nothing" code by the BIOS
  1164.           bootstrap. The HD programs use it for the "real" INT 13 vector,
  1165.           normally saving the original contents of the location on entry and
  1166.           restoring them on exit. This behavior is modified by specifying the /U
  1167.           switch on the command line. The HDTEST boot sector code will only
  1168.           transfer the "real" INT 13 BIOS entry point to the INT 68 location if
  1169.           the latter contains either zeroes or the same vector as INT 69. In the
  1170.                               ______        __                                  
  1171.           latter case (since there is no point in having two "real" interrupt
  1172.           vectors pointing at the same place), it is assumed that both are
  1173.           pointing at "do-nothing" code. If the INT 68 vector is neither 0:0 nor
  1174.                                                                  _______     ___
  1175.           the same as the INT 69 vector, the preboot code will leave it alone
  1176.           and report that the INT 13 vector was not transferred, otherwise it
  1177.           will confirm that the transfer has taken place - in any event, you
  1178.           will be given an opportunity to write down the vector and can then
  1179.           remove the disk and press a key to allow the boot process to complete.
  1180.           If you need to boot from a floppy disk, for some reason, a new,
  1181.           bootable, disk can be inserted before you press the key to continue.
  1182.  
  1183.           
  1184.           
  1185.                                          Page 16 
  1186.            
  1187.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1188.           _______________________________        _______________________________
  1189.           
  1190.           
  1191.           If the preboot reported that the INT 13 vector was successfully
  1192.           transferred, you should simply specify the /U flag on the HDTEST or
  1193.           HDCHEK command line, in addition to the "short" form of the /H flag
  1194.                                ______________                                
  1195.           (if the BIOS ROM is at an unusual location for the class of machine).
  1196.           The requirement for the /H flag with unusual hardware allows the
  1197.           program to do some additional "reasonableness checking". Unless some
  1198.           other software interferes with it, the INT 68 vector will then
  1199.           continue to be set up correctly for use by the HD programs until the
  1200.           system is switched off or rebooted.
  1201.  
  1202.           If the preboot was not able to transfer the vector, or if you know
  1203.           that a device driver or resident program loaded by your DOS uses INT
  1204.           68, you should invoke the HD programs with the "long" form of the /H
  1205.           flag, specifying the full address displayed by the preboot. No error
  1206.           checking is attempted in this case - if you mistype the address, the
  1207.           first time the program attempts to access the disk, it will jump to a
  1208.           (effectively) random location in ROM, with potentially disastrous
  1209.           results. If it is feasible, use of the pre-boot disk and the /U flag
  1210.           is preferable (in terms of safety, if for no other reason) to that of
  1211.           the "long" form of /H.
  1212.  
  1213.           The following example may help to clarify matters. You have a clone
  1214.           system with a BIOS ROM location that is non-standard. The HDTEST boot
  1215.           disk reports that the INT 13 entry point is at E000:13AC, and that the
  1216.           vector has been successfully transferred. You may now run HDTEST with
  1217.           the command line:
  1218.  
  1219.           HDTEST C: A: /U /HE000
  1220.                             ____
  1221.  
  1222.           You may also, now or later, with or without prior use of the pre-boot,
  1223.                                       _______________                           
  1224.           run HDTEST with the command line:
  1225.  
  1226.           HDTEST C: A: /HE000:13AC
  1227.                          _________
  1228.  
  1229.           Note that the /H flag is not needed with the /U flag if the segment
  1230.                                    ___                                       
  1231.           address of the hard disk BIOS is the usual value for the system type
  1232.                                                            ___________________
  1233.           (as determined by the processor). For a system based on an 8088, 8086,
  1234.           80188, or 80186 processor, this "usual" value is C800. For all other
  1235.           systems, the "usual" value is F000.
  1236.  
  1237.           One further problem may be encountered - certain hard disk BIOSes do
  1238.           not exactly comply with IBM standards in dealing with disk accesses
  1239.           that cross track boundaries, and will produce frequent errors when
  1240.           such accesses are attempted. It was this "multi-track read" problem
  1241.           which resulted in a number of previously apparently 99.99% IBM-
  1242.           compatible systems failing to run IBM PC-DOS 3.3 (which was the first
  1243.           version of DOS actually to attempt such accesses). IBM issued a "fix"
  1244.           for this problem, in the form of a program which, when run on the
  1245.           "bad" system, creates a device driver which protects the BIOS from
  1246.           being asked to do something that it can't. This device driver does its
  1247.           job by intercepting INT 13, and will, of course, do nothing to help
  1248.           the HD programs if they are bypassing that interrupt. Use the /M flag
  1249.           with the HD programs if you have a system on which PC-DOS 3.3 or above
  1250.           will not run without being "fixed" as described. It forces the
  1251.           programs to split up the multi-track accesses into manageable chunks -
  1252.           this can be expected to cause a substantial slowing of the programs'
  1253.           operation.
  1254.           
  1255.           
  1256.                                          Page 17 
  1257.            
  1258.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1259.           _______________________________        _______________________________
  1260.           
  1261.           
  1262.                                  DEALING WITH BAD CLUSTERS
  1263.                                  _________________________
  1264.  
  1265.           It is not unusual for a new hard disk to have a small, constant,
  1266.                                                           _____  ________ 
  1267.           number of bad clusters. IBM's quality control standards allow, for
  1268.           example, 5% of the surface area of a disk to be bad (!). These pre-
  1269.           existing bad clusters, which correspond to imperfections in the
  1270.           magnetic coating on the disk, will normally be detected and marked by
  1271.           the DOS FORMAT program, and HDTEST will report them as "already marked
  1272.           as bad". This should not be regarded as evidence of any real problem
  1273.           with the disk, although some suppliers (not including IBM) will
  1274.                                                   ___                    
  1275.           replace such disks under warranty if pressed to do so. It is also not
  1276.           unusual for a disk to develop a few more defects as it ages. When
  1277.                                           ___                              
  1278.           these do develop, they are also subsequently constant in size and
  1279.           position, and will be reported as "already marked as bad" by HDTEST on
  1280.           runs subsequent to that during which they are first found. The
  1281.           occasional appearance (and subsequent persistence) of a new bad
  1282.           __________                                                     
  1283.           cluster is, therefore, not necessarily evidence of serious trouble
  1284.           developing.  However, if more than one or two new bad clusters are
  1285.           reported by HDTEST, and especially if two consecutive runs (or passes,
  1286.           if the /R flag is set) of HDTEST report different bad clusters, there
  1287.                                                   _________                    
  1288.           is a good chance that the hard disk or controller is developing a
  1289.           serious problem - the disk should be backed up immediately and the
  1290.           disk and/or controller sent for repair at the earliest opportunity.
  1291.  
  1292.           New bad clusters in the data area are automatically mapped out by
  1293.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  1294.           area can be handled in two ways:
  1295.  
  1296.           1) If you are able to do a low-level format on your hard disk (most
  1297.                                      _________                               
  1298.           makers of "add-on" hard disks supply a method of doing this, either in
  1299.           the form of a short program, or by giving instructions for running a
  1300.           program in the ROM BIOS from DEBUG), back up the entire hard disk
  1301.                                                            ______          
  1302.           (including any non-DOS partitions), run the low-level format, use
  1303.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  1304.           HDTEST now reports no errors in the DOS area you can restore all your
  1305.           files and continue to use the disk. You should, however, use HDTEST to
  1306.           test (at least) the DOS area fairly frequently for a month or so to be
  1307.           sure that the problems are not going to recur.
  1308.  
  1309.           2) If you do not have the means to do a low-level format, or if you
  1310.           follow the above instructions and HDTEST continues to report errors in
  1311.           the DOS area, your only other choice is to back up the DOS partition,
  1312.           reconfigure the disk with FDISK so that the new DOS partition starts
  1313.           above the bad area, reFORMAT it, and restore all of the old files to
  1314.           the new DOS partition (which will unavoidably be a little smaller than
  1315.           the old).
  1316.  
  1317.           If the hard disk's boot/partition sector (track 0, Head 0, sector 1)
  1318.           becomes bad, the disk is useless and must be replaced. This sector is
  1319.           only subjected to read/write testing if the /B flag is specified on
  1320.                             __________                                       
  1321.           the command line, so any reported errors (in sector -1) during normal
  1322.                                                               __               
  1323.           testing represent a problem reading the sector and are likely to be
  1324.                                       _______                                
  1325.           significant. Problems encountered during read/write testing of this
  1326.           sector do not always indicate a significant problem - certain
  1327.                     ___                                                
  1328.           controller cards may not allow test patterns to be written to it,
  1329.           resulting in a report of multiple errors on read/write testing.
  1330.           Consequently, if multiple errors are reported on read/write testing of
  1331.           
  1332.           
  1333.                                          Page 18 
  1334.            
  1335.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1336.           _______________________________        _______________________________
  1337.           
  1338.           
  1339.           the boot/partition sector, but read-only testing proceeds without
  1340.           problems and the rest of the disk seems to be OK, there is probably no
  1341.           cause for concern.
  1342.  
  1343.  
  1344.                               RUNNING HDTEST FROM A .BAT FILE
  1345.                               _______________________________
  1346.  
  1347.           Versions of HDTEST from V4.75 can be run from a .BAT file (e.g. for
  1348.           unattended testing of multiple disks) without the user losing the
  1349.           ability to "escape" cleanly from the program. The /Y flag also allows
  1350.           the user to specify a maximum number of new bad clusters for each disk
  1351.           to be remapped "automatically". By using this flag, you can arrange
  1352.           that the .BAT file will normally just keep going, but will pause and
  1353.           wait for input if something terrible seems to have happened to a disk.
  1354.           In order to run HDTEST from a .BAT file, it is necessary to prepare
  1355.           both the .BAT file with your usual HDTEST command lines, generally
  1356.           ____                                                              
  1357.           including the /Y and /N flags, and a second ASCII file containing the
  1358.                                          ___                                   
  1359.           answers to HDTEST's initial questions, one per line. DOS's input
  1360.           redirection ("<") command is used to "feed" these answers to HDTEST.
  1361.           If the "answer" file is called (e.g.) ANSWERS.TXT, each line in the
  1362.           .BAT file will look like:
  1363.  
  1364.               HDTEST dev1 dev2 /opt1 /opt2 <ANSWERS.TXT
  1365.                                            ____________
  1366.  
  1367.           If you do not wish to read/write test the DOS area of the disk, your
  1368.           answer file can consist of three blank lines. If you do wish to
  1369.                                                                __        
  1370.           read/write test the DOS area, the first line of the answer file can be
  1371.           blank, the next two must start with a "y" and the fourth can be blank.
  1372.                           ___                                                   
  1373.           In order to allow HDTEST to be interrupted from the keyboard, if
  1374.           necessary, the program terminates input redirection before starting
  1375.           testing the disk, so anything in the answer file after the answers to
  1376.                                                            _____               
  1377.           HDTEST's initial questions will be ignored.
  1378.  
  1379.           On exit, HDTEST now returns a meaningful ERRORLEVEL, which can be
  1380.           tested from a .BAT file by means of DOS's "IF ERRORLEVEL" syntax.
  1381.           Versions of the program prior to V4.81 returned an ERRORLEVEL of 1
  1382.           on aborts and 0 otherwise - HDCHEK still does this. The current
  1383.           version of HDTEST normally returns an ERRORLEVEL equal to the number
  1384.           of new bad clusters found. On aborts it returns 254, and, if
  1385.           deliberately terminated by the user (either by answering "N" to the
  1386.           last question in the introductory dialogue or by pressing and
  1387.           confirming <Esc> during testing), it returns 255.
  1388.  
  1389.           Note that this application of HDTEST is really intended for advanced
  1390.           users, and I am aware that this description is somewhat cursory - more
  1391.           help in using it can, if necessary, be obtained by Registered users
  1392.           directly from me.
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.           
  1404.           
  1405.                                          Page 19 
  1406.            
  1407.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1408.           _______________________________        _______________________________
  1409.           
  1410.           
  1411.                             BUGS AND OTHER UNPLEASANT SUBJECTS
  1412.                             __________________________________
  1413.  
  1414.           Although, like all programmers, I like to think that my product is
  1415.           perfect, it is possible that there are a few bugs lurking in the
  1416.           depths of the program, and likely that some combination of software
  1417.           and hardware exists which HDTEST cannot figure out and/or cope with.
  1418.           If you think you have found a bug and/or if you cannot get either of
  1419.           the programs to work on your system, do the following:
  1420.  
  1421.           1) Reread this documentation! Make sure that you are doing exactly
  1422.           what the documentation says to do. Make sure (if you are testing a
  1423.           drive with removable media) that the media is not write-protected.
  1424.  
  1425.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  1426.           your DOS distribution disk - and try to run the HD programs again. If
  1427.           they run in this environment but not in your normal DOS environment,
  1428.           try reconstructing the system under which they failed by adding things
  1429.           one by one until the problem recurs. If you find a specific piece of
  1430.           software which causes the trouble, let me know about the
  1431.           incompatibility.
  1432.  
  1433.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  1434.           bombs (the reverse should never happen), send me as detailed a
  1435.           description of the problem as possible and I will do my best to
  1436.           diagnose and fix it. A bug report should always include a full
  1437.                                                    ______               
  1438.           description of the system being used (hardware and software), as well
  1439.                                                          ___                   
  1440.           as a copy of the output from a run of HDCHEK.
  1441.  
  1442.           I can be contacted by U.S. mail at the address given earlier in the
  1443.           documentation, by BIXMail to pfletcher, or by Compuserve EMail to
  1444.           72255,305.
  1445.  
  1446.  
  1447.                               CHANGES FROM PREVIOUS VERSIONS
  1448.                               ______________________________
  1449.  
  1450.           The first version of the HD programs actually released (not including
  1451.           beta-test versions) was V2.60. The programs have grown and developed
  1452.           gradually, for the most part, but the pre-V4.65 releases listed below
  1453.           have constituted the most significant "watersheds" - features added
  1454.           and changes made between the listed releases are treated here as if
  1455.                            _______                                           
  1456.           first included in the next listed release. Note that the V4.45
  1457.                                 ____                                    
  1458.           Shareware version of the program is not listed here - it was identical
  1459.           to V4.41 except that it included the "fix" for the deficiency which
  1460.           was corrected at V4.70 in the Registered version. Unless otherwise
  1461.           noted, both programs were affected by the listed changes.
  1462.  
  1463.  
  1464.           Version 4.84 (this version)
  1465.           ____________               
  1466.  
  1467.           1) Minor change to reporting of initialization errors (HDCHEK).
  1468.  
  1469.  
  1470.           Version 4.83
  1471.           ____________
  1472.  
  1473.           1) Remainder of fix for bug noted at V4.80!
  1474.  
  1475.  
  1476.           
  1477.           
  1478.                                          Page 20 
  1479.            
  1480.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1481.           _______________________________        _______________________________
  1482.           
  1483.           
  1484.           Version 4.81
  1485.           ____________
  1486.  
  1487.           1) Meaningful ERRORLEVEL returned on exit (see "Running HDTEST from a
  1488.           .BAT file) (HDTEST).
  1489.  
  1490.  
  1491.           Version 4.80
  1492.           ____________
  1493.  
  1494.           1) Bug causing the programs to fail if a subdirectory were physically
  1495.           located beyond the 32 Mb boundary on a large (> 32 Mb) device
  1496.           partially located and corrected.
  1497.  
  1498.  
  1499.           Version 4.75
  1500.           ____________
  1501.  
  1502.           1) Log file specification capabilities enhanced (HDTEST).
  1503.  
  1504.           2) /Y flag and .BAT file support added (HDTEST).
  1505.  
  1506.  
  1507.           Version 4.71
  1508.           ____________
  1509.  
  1510.           1) Fully automatic setting of default ROM BIOS location by CPU type.
  1511.  
  1512.           2) Meaning of and requirement for /A flag modified.
  1513.  
  1514.  
  1515.           Version 4.70
  1516.           ____________
  1517.  
  1518.           1) Deficiency causing "fallback" to DOS interrupt level under some
  1519.           circumstances when attempting to test "extended devices" on a second
  1520.           physical hard drive fixed. The Shareware V4.45 also included this
  1521.           "fix".
  1522.  
  1523.  
  1524.           Version 4.66
  1525.           ____________
  1526.  
  1527.           1) Support for large devices under Compaq DOS 3.31 added (see
  1528.           description of /C flag).
  1529.  
  1530.  
  1531.           Version 4.65
  1532.           ____________
  1533.  
  1534.           1) DOS 4.0 support added (including BIOS-level access to large
  1535.           partitions), but see notes on V4.8x.
  1536.  
  1537.           2) Minor changes made to final screen & file output format (HDTEST).
  1538.  
  1539.           3) Minor improvements made to memory allocation algorithms.
  1540.  
  1541.           4) /G option added (HDTEST).
  1542.  
  1543.           5) /X option added (HDTEST).
  1544.  
  1545.  
  1546.  
  1547.  
  1548.           
  1549.           
  1550.                                          Page 21 
  1551.            
  1552.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1553.           _______________________________        _______________________________
  1554.           
  1555.           
  1556.           Version 4.54
  1557.           ____________
  1558.  
  1559.           1) Deficiency in CPU recognition code (which caused fast AT clones
  1560.           sometimes not to appear to be ATs) fixed.
  1561.                     ___                            
  1562.  
  1563.           2) ANSI.SYS requirement removed.
  1564.  
  1565.           3) Semi-automatic CPU recognition added.
  1566.  
  1567.           4) Pre-boot functionality, /M option, /U option, and extended
  1568.           (segment:offset) form of /H option added.
  1569.  
  1570.  
  1571.           Version 4.41
  1572.           ____________
  1573.  
  1574.           1) Deficiency (introduced at V4.00) causing HDCHEK to issue an
  1575.           incorrect error report on an abort resulting from a FAT comparison
  1576.           error corrected.
  1577.  
  1578.           2) Minor deficiency, causing HDTEST to create an empty log file on the
  1579.           specified device when both a log device and the /P option were
  1580.           specified, corrected.
  1581.  
  1582.           3) Work-around for hardware multi-sector read ECC problem (see
  1583.           Appendix B) added (HDTEST).
  1584.  
  1585.           4) Support for small (<= 10 Mb) hard disks patched to have small
  1586.           clusters and 16-bit FATs added.
  1587.  
  1588.           5) Requirement that command line option flags be separated by one or
  1589.           more spaces or tabs removed.
  1590.  
  1591.           6) /R option added (to HDTEST) for multi-pass disk testing.
  1592.  
  1593.  
  1594.           Version 4.30
  1595.           ____________
  1596.  
  1597.           1) Support for BIOS-level access to DOS 3.3 extended partitions added.
  1598.  
  1599.           2) /Z option added (to HDTEST) to control remapping of unreadable
  1600.           sectors in bad clusters.
  1601.  
  1602.  
  1603.           Version 4.10
  1604.           ____________
  1605.  
  1606.           1) Assorted minor changes made to screen displays.
  1607.  
  1608.           2) /C option added to allow the programs to be used on some non-IBM
  1609.           compatible MS-DOS systems.
  1610.  
  1611.           3) /D option redefined - old /D option became new /I option.
  1612.  
  1613.           4) /F option added (to HDTEST).
  1614.  
  1615.           5) "Short" form of /H option added.
  1616.  
  1617.  
  1618.           
  1619.           
  1620.                                          Page 22 
  1621.            
  1622.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1623.           _______________________________        _______________________________
  1624.           
  1625.           
  1626.           Version 3.13
  1627.           ____________
  1628.  
  1629.           1) Assorted minor bugs and deficiencies in error reporting and
  1630.           termination routines fixed (HDTEST).
  1631.  
  1632.           2) Minor bug affecting reporting of multiple corrected ECC errors
  1633.           fixed (HDTEST).
  1634.  
  1635.           3) Disk reset added before retry on all errors (HDTEST).
  1636.  
  1637.           4) Absolute limit on number of files and directories on device
  1638.           removed.
  1639.  
  1640.           5) Display of total sector/cluster count during testing added
  1641.           (HDTEST).
  1642.  
  1643.           6) /A option added.
  1644.  
  1645.           7) /B option added (HDTEST).
  1646.  
  1647.  
  1648.           Version 2.73
  1649.           ____________
  1650.  
  1651.           1) Bug (in V2.60) which could cause bad termination and possible
  1652.           subdirectory inconsistencies if a sector which was not in use was
  1653.           found to be bad, fixed (HDTEST).
  1654.  
  1655.           2) Bug (in V2.70) which caused HDTEST to enter a terminal input loop
  1656.           if ANSI.SYS was not loaded and <Esc> was entered to abort it, fixed.
  1657.  
  1658.           3) Minor bug in V2.60 (which resulted in a failed directory scan if
  1659.           the program was run on a write-protected device) fixed.
  1660.  
  1661.           4) Internal changes made to avoid interference with expanded memory
  1662.           device handlers.
  1663.  
  1664.           5) Ability to update disk after HDTEST terminated by user (typing
  1665.           <Esc>) added.
  1666.  
  1667.           6) /S option to start checking occupied clusters at a given cluster
  1668.           number added (HDTEST).
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.           
  1686.           
  1687.                                          Page 23 
  1688.            
  1689.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1690.           _______________________________        _______________________________
  1691.           
  1692.           
  1693.                            APPENDIX A - SUMMARY OF FLAG SETTINGS
  1694.                            _____________________________________
  1695.  
  1696.           /A(T) - used to tell the HD program that it is being run on an IBM AT
  1697.           (HDCHEK and HDTEST). /A is not equivalent to /HF000.
  1698.  
  1699.           /B(oot/Partition sector test) - used to include the hard disk
  1700.           boot/partition sector in the DOS area for the purposes of read/write
  1701.           testing (HDTEST only).
  1702.  
  1703.           /C(lone BIOS)n - used in systems which do not support the IBM BIOS's
  1704.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  1705.           The parameter ("n") is the number of floppy drives attached to the
  1706.           system, which is otherwise determined automatically (HDCHEK and
  1707.           HDTEST).
  1708.  
  1709.           /CQ (Compaq) - used to indicate that the program is running on a
  1710.           Compaq system. If DOS 3.31 (or above) is in use, large (> 32 Mb)
  1711.           devices are supported (HDCHEK and HDTEST).
  1712.  
  1713.           /D(OS interrupts) forces the program to use only DOS interrupts
  1714.           (INT 25 and INT 26) for access to the target device. May not be
  1715.           combined with the /I, /H, or /U flag (HDCHEK and HDTEST).
  1716.  
  1717.           /F(ast mode) limits read/write testing to the use of two patterns
  1718.           only (HDTEST only).
  1719.  
  1720.           /G(ive error details) allows the physical disk location of bad sectors
  1721.           to be identified (HDTEST only).
  1722.  
  1723.           /H(ex BIOS address)nnnn[:nnnn] - used to tell the HD programs that the
  1724.           ROM BIOS of the device being tested is located at nnnn, which is
  1725.           interpreted as a Hexadecimal segment address, rather than at the
  1726.           (CPU-dependent) default. The extended (segment:offset) form of the
  1727.           command is used to force the programs to use the given address as the
  1728.           INT 13 entry point (HDCHEK and HDTEST).
  1729.  
  1730.           /I(nterrupt 13) - forces the program to use the existing INT 13
  1731.           vector.  This is the default under DOS 2.x. May not be combined with
  1732.           the /D, /H, or /U flag (HDCHEK and HDTEST).
  1733.  
  1734.           /M(ulti-track read problem) - bypasses the multi-track read problem
  1735.           which also prevents certain otherwise IBM-compatible clones from
  1736.           running PC-DOS 3.3 (HDCHEK and HDTEST).
  1737.  
  1738.           /N(o Query) - disables the individual prompts for confirmation which
  1739.           the program normally issues before remapping "special" clusters - does
  1740.           not prevent the program from prompting for confirmation before
  1741.           ___                                                           
  1742.           updating the disk (HDTEST only).
  1743.  
  1744.           /P(rint) - causes the log file to be directed to the PRN device
  1745.           (HDTEST only).
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.           
  1753.           
  1754.                                          Page 24 
  1755.            
  1756.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1757.           _______________________________        _______________________________
  1758.           
  1759.           
  1760.           /R(epeat)n - causes HDTEST to perform n complete testing cycles (or to
  1761.           continue until interrupted for n=0) (HDTEST only).
  1762.  
  1763.           /S(tart from)nnnnn - causes HDTEST to start testing occupied clusters
  1764.                                                               ________         
  1765.           at cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  1766.  
  1767.           /U(se existing INT 68 vector) - causes the HD programs to use the
  1768.           existing INT 68 vector as the INT 13 entry point (HDCHEK and HDTEST).
  1769.                    ______                                                      
  1770.  
  1771.           /X(clude marked bad sectors) - causes HDTEST to report on but not
  1772.           retest clusters that are already marked as bad (HDTEST only).
  1773.  
  1774.           /Y(es, please remap)n - allows HDTEST to update the disk by remapping
  1775.           up to n new bad sectors without prompting for confirmation (HDTEST
  1776.                                   _______                                   
  1777.           only).
  1778.  
  1779.           /Z(ap bad sectors)n - controls remapping of unreadable sectors in bad
  1780.           clusters (HDTEST only) - n may have one of the following values:
  1781.               0 - Remap clusters with any unreadable sectors to all NULLs
  1782.               1 (default) - Remap only actual unreadable sectors to NULLs
  1783.               2 - Transfer all data read to the new cluster
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.           
  1821.           
  1822.                                          Page 25 
  1823.            
  1824.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1825.           _______________________________        _______________________________
  1826.           
  1827.           
  1828.                              APPENDIX B - DISK ERROR MESSAGES
  1829.                              ________________________________
  1830.  
  1831.           Users of earlier versions of this software repeatedly requested that I
  1832.           provide a more detailed explanation of the significance of some of the
  1833.           error messages displayed by HDTEST when it encounters a bad sector or
  1834.           cluster on the disk. It is not possible to do this without assuming
  1835.           (or imparting) a more detailed understanding of the "nitty-gritty"
  1836.           details of data storage on hard and floppy disks than most people want
  1837.           or need, let alone possess. This Appendix is not, therefore, "required
  1838.           reading" for the safe or effective use of the HD programs. It is
  1839.           intended as a tutorial for those who would like to understand some-
  1840.           thing more of what is really going on on their hard or floppy disk
  1841.                                 ______                                      
  1842.           drive when the little red light comes on.
  1843.  
  1844.           For the purposes of what follows, it is (fortunately) not necessary to
  1845.           know or understand exactly how changes in magnetic flux on the surface
  1846.           of a hard (or floppy) disk are translated into binary data, or vice
  1847.           versa. That could be the subject of another long dissertation. I will
  1848.           simply take for granted that binary data, conceptually organized into
  1849.           8-bit bytes, can be read and written by the disk drive hardware under
  1850.           the command of its controller (which usually resides on a separate
  1851.           card plugged into one of the computer's expansion slots). I will be
  1852.           describing how blocks of data are physically arranged on a disk and
  1853.           how the disk controller goes about ensuring that the data it reads has
  1854.           not been corrupted since it was written.
  1855.  
  1856.           I propose to start off by referring to some of the error-detection and
  1857.           error-correction techniques and procedures that are applied to data
  1858.           stored on magnetic media. These techniques and procedures are
  1859.           necessary because, although magnetic media are very reliable and the
  1860.           technology of recording and playback is well understood, there always
  1861.           remains the possibility that a defect in the medium or some other
  1862.           intercurrent problem may cause the sequence of bytes read back from a
  1863.           disk or tape to be something other than a perfect duplicate of the
  1864.           sequence that was stored. If a single copy of the raw data were all
  1865.           that were recorded, there would be no way of immediately detecting
  1866.           (let alone correcting) such an error. It might be brought to light
  1867.           when the file that was changed caused problems when it is used by or
  1868.           executed as a program, but it might not become apparent until it had
  1869.           propagated itself through and caused problems or errors in multiple
  1870.           other programs or files. This would clearly be an unacceptable state
  1871.           of affairs. In order to prevent this from occurring, then, there
  1872.           should be some means of checking data which is read in from storage
  1873.           for errors, and/or (preferably) of correcting any errors which may
  1874.           have occurred before any use is made of the data.
  1875.                         ______                             
  1876.  
  1877.           Although error checking and/or correction can (and sometimes does)
  1878.           take place at any level from that of the application program down to
  1879.           that of the device controller, I am only going to describe the means
  1880.           that are used by hard and floppy disk controllers. When a block of
  1881.           data is passed to the controller to be written to the disk, a series
  1882.           of arithmetical operations is performed in sequence on all the bytes
  1883.           in the block, to produce a 2-byte (for diskettes) or multi-byte (for
  1884.           hard drives) code. The diskette controller implements what is known as
  1885.           a cyclic redundancy check (CRC) algorithm, which is optimized to allow
  1886.           detection of all single bit errors and many longer error bursts (it is
  1887.           _________                                                             
  1888.           reasonable to assume that errors will most probably either affect a
  1889.           
  1890.           
  1891.                                          Page 26 
  1892.            
  1893.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1894.           _______________________________        _______________________________
  1895.           
  1896.           
  1897.           single bit at random or, if they result from media defects, a number
  1898.           of adjacent bits). The longer (at least 32-bit) error correcting code
  1899.           (ECC) calculated by a hard disk controller gives enough information to
  1900.           allow detection and correction of, at least, all single bit errors and
  1901.                           ______________                                        
  1902.           detection of most likely longer error bursts. The CRC or ECC is saved
  1903.           on disk with the data and is read back in by the controller when the
  1904.           data is read. The controller then compares the saved CRC or ECC with
  1905.           one newly calculated from the data. If the two are identical, the data
  1906.           is assumed to be valid and a successful read is signalled. If there is
  1907.           a discrepancy, a diskette controller always returns the data with a
  1908.           "CRC error", since the CRC code does not contain enough information to
  1909.           allow the incorrect bit or bits to be identified. On a hard disk, if
  1910.           the ECC comparison suggests a correctable error, it will be corrected,
  1911.           and the read call will return with a "Corrected ECC Error" code but
  1912.           with (presumably) valid data in the transfer buffer. If a more
  1913.           extensive error is detected, on the other hand, the call returns with
  1914.           a "Uncorrectable ECC Error" code (which is the same as the CRC error
  1915.           code).
  1916.  
  1917.           The 32-bit ECC used by IBM and many compatible disk manufacturers
  1918.           allows correction of single-bit errors only. Manufacturers of other,
  1919.                                                  ____                         
  1920.           usually more expensive, controllers use longer and more complex ECCs,
  1921.           to allow the correction of some multi-bit errors, but the necessity to
  1922.           minimize the time taken to calculate the ECC (which is part of "access
  1923.           time") sets tight limits on how complex it can be. ECC error
  1924.           correction is unfortunately not infallible. It is possible for a
  1925.                                       ___                                 
  1926.           complex, uncorrectable error to result in the same ECC disparity as a
  1927.                    __                                                          
  1928.           different, correctable, error, so that invalid "corrected" data can be
  1929.                                                                           ______
  1930.           returned. The longer and more complex the ECC, the less likely this
  1931.           becomes, but there is no way of completely avoiding this ambiguity,
  1932.           short of keeping multiple copies of the data on the disk. In addition,
  1933.           some hard disk controllers* apparently abort with the "corrected ECC
  1934.           error" code immediately on encountering a sector containing such an
  1935.                       ___________                                            
  1936.           error, even if it is not the last sector in the block specified by a
  1937.                                ___                                            
  1938.           (multi-sector) read request. This non-intuitive (to say the least of
  1939.           it) behavior can combine with DOS 3.x's habit of ignoring corrected
  1940.                                                            ________          
  1941.           ECC errors to result in apparently inexplicable disk-related problems,
  1942.           up to and including system crashes (if the file in which the problem
  1943.           occurred contained executable code). This hardware deficiency may be
  1944.           related to the problems which have plagued users of DOS 3.3 on some
  1945.           (previously) apparently IBM-compatible non-IBM hardware, since these
  1946.           also result from (similar but distinct) deficiencies in the clones'
  1947.           handling of multi-sector disk reads. Prior to V4.36, HDTEST did retry
  1948.                                                                       ___      
  1949.           corrected ECC errors which were reported on the first read of a
  1950.           cluster, but would eventually (if the corrected error persisted)
  1951.           accept the data read as valid and copy and remap it to a "good"
  1952.           cluster. This could cause trouble if the controller had the "immediate
  1953.           abort on corrected ECC error" problem described above and the ECC
  1954.                                                                 ___        
  1955.           error were not in the last sector of the cluster, since the sectors
  1956.           after the "bad" one would not have been read, and would be lost
  1957.           (actually replaced by the corresponding sectors from the previous
  1958.                                                                    ________
  1959.           cluster read) after remapping. On a machine with this problem, DOS
  1960.  
  1961.           _____________________________________________________________________
  1962.  
  1963.           * This behavior is known to occur with some early Western Digital
  1964.           controllers (1002A-WX1, 1002S-WX2) but it may occur with others, too.
  1965.           
  1966.           
  1967.                                          Page 27 
  1968.            
  1969.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  1970.           _______________________________        _______________________________
  1971.           
  1972.           
  1973.           would not, of course, have done any better than the earlier versions
  1974.           of HDTEST at reading the bad cluster, and HDTEST at least warned you
  1975.           that there was a problem, but the behavior described was certainly not
  1976.           ideal. From V4.36, HDTEST rereads clusters in which a persistent
  1977.           corrected ECC error is reported on the initial read sector by sector,
  1978.                                                               ________________ 
  1979.           to ensure that all the data in the cluster is transferred when it is
  1980.                          ___                                                  
  1981.           remapped. In most cases (as long as the ECC error was really
  1982.                                                                 ______
  1983.           correctable), this will save the cluster (and the file of which it is
  1984.           a part) intact.
  1985.  
  1986.           DOS allows the programmer and/or computer user to think of and deal
  1987.           with disk data in terms of files, lines, and/or records, but data is
  1988.           always moved between a disk and memory a sector at a time. Any disk
  1989.           read or write request passed to DOS eventually gets translated into a
  1990.           command to read or write one or more sectors on the disk, commencing
  1991.           at a specified head, track, and sector. A floppy disk may have either
  1992.           one or two usable surfaces, corresponding to the top and bottom of the
  1993.                             ________                                            
  1994.           disk. A hard disk usually has at least two surfaces, and may have
  1995.           more, since multiple physical "platters" are frequently incorporated
  1996.           in a single device. Each surface is normally accessed by and
  1997.           corresponds to a single read/write head, which moves radially across
  1998.                                              ____                             
  1999.           it, although one surface on newer disks is often reserved for "servo"
  2000.           tracks, which are written with a special pattern that allows the
  2001.           controller to ensure that the read/write heads are kept exactly
  2002.           aligned with the data tracks. For a single device, the (data) heads
  2003.           are, by convention, numbered sequentially from zero up to one less
  2004.           than the total number present. Each surface is further divided into a
  2005.           number of circumferential tracks (or cylinders) and each track is
  2006.                                     ______     _________                   
  2007.           divided into a number of sectors. Again by convention, the tracks on
  2008.                                    _______                                    
  2009.           each surface are also numbered sequentially from zero, with track zero
  2010.           being the outermost track. The sectors on each track are normally
  2011.           numbered from one to a number corresponding to the total number of
  2012.                         ___                                                 
  2013.           sectors on the track, but adjacent sectors do not normally have
  2014.                                                         ___              
  2015.           consecutive sector numbers. A typical arrangement of the seventeen
  2016.           sectors on a single track of an XT hard disk, for example, would be as
  2017.           follows: 1,8,15,5,12,2,9,16,6,13,3,10,17,7,14,4,11. This "inter-
  2018.                                                                     ______
  2019.           leaving" of sectors helps to make multi-sector disk reads and writes
  2020.           _______                                                             
  2021.           more efficient. The controller requires a finite time to process the
  2022.           data from one sector before it can start reading (or writing) the
  2023.           next. During this time, of course, the disk continues to rotate and
  2024.           one or more of the sectors which physically "follow" the one that was
  2025.           last accessed pass under the read/write head unread. Ideally, the
  2026.           interleave (number of physical sectors separating consecutively
  2027.           numbered sectors) should be such that the next sector is just about to
  2028.           come under the read-write head when the controller is free to deal
  2029.           with it, but, because this time is not exactly predictable, it is
  2030.           better to be too conservative (as IBM usually is) and make it one or
  2031.           two sectors longer than necessary than to be too optimistic. Too small
  2032.           an interleave value is very undesirable, because it results in the
  2033.           controller having to wait almost a complete disk rotation time for
  2034.           each sector it misses to come round again.
  2035.  
  2036.           At the beginning of each disk sector is an address mark, a short,
  2037.                                                      ____________          
  2038.           recognizable (to the controller) bit sequence containing the track and
  2039.           sector number. The process of writing the address marks for each
  2040.           sector on a disk is known as "low-level" or "sector" formatting. The
  2041.           DOS FORMAT program does this when it is run on floppy disks, but on
  2042.           
  2043.           
  2044.                                          Page 28 
  2045.            
  2046.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2047.           _______________________________        _______________________________
  2048.           
  2049.           
  2050.           hard disks the DOS program merely makes sure that all required address
  2051.           marks are present - they are created by the disk manufacturer or
  2052.           supplier's low-level format program, which may or may not be available
  2053.           to the end user. After each address mark there follows a short gap (to
  2054.           allow the controller time to recognize and respond to the address
  2055.           mark), then the raw data, then the CRC or ECC data. A sector normally
  2056.           contains 512 bytes of raw data, but DOS (and HDTEST) can recognize and
  2057.           deal appropriately with devices with non-standard sector sizes.
  2058.  
  2059.           When a sector read/write command is passed to the disk controller, it
  2060.           (the controller) causes the disk's read/write head to move (seek) to
  2061.                                                                       ____    
  2062.           the specified track, waits a few milliseconds for it to settle down,
  2063.           and then starts to "pay attention to" the data passing underneath it.
  2064.           The controller locates and reads the address marks to confirm that the
  2065.           read/write head is positioned at the correct track and to identify
  2066.           each sector. If data is being read from the disk, the raw data and
  2067.           recorded CRC or ECC from the requested sector(s) are transferred into
  2068.           the disk controller's internal buffers and (assuming that no errors
  2069.           are detected), thence to main memory. If data is being written, the
  2070.           controller derives the error-checking data from the raw data and
  2071.           writes both to the disk. Some of this process is under the direct
  2072.           control of the controller hardware, but it is supervised by the
  2073.           device's ROM BIOS, which is responsible for error-reporting. Errors
  2074.           can occur at almost any stage of the read/write process, but (if the
  2075.           disk is working at all) usually result from media defects or problems
  2076.           developing in the mechanical components of the hard disk drive. Media
  2077.           defects, once present, are generally constant in size and position
  2078.           (although jarring a disk while it is being written to may sometimes
  2079.           generate a temporary bad sector).
  2080.                      _________             
  2081.  
  2082.           When HDTEST detects an error during read/write testing of a sector or
  2083.           cluster which has not previously been marked as bad, a (normally)
  2084.           four-line error message is printed, either to the screen (by default),
  2085.           to the printer (/P option), or to the logging file (if an output
  2086.           device was specified). The first line of the message simply indicates
  2087.           the sector or cluster number at which the error occurred. The second
  2088.           line indicates what sort of error was detected and during what phase
  2089.           of read/write testing it occurred. The third line indicates whether
  2090.           HDTEST was able to recover and/or remap the data from the bad sector
  2091.           or cluster, and the fourth indicates either the file which a bad
  2092.           cluster formed part of or that the cluster was not in use. If it was
  2093.           not possible to read one or more sectors from a cluster which
  2094.           contained data (unrecoverable read error), a further two-line message
  2095.           is printed which notes how many sectors were unreadable and how the
  2096.                                           _______                            
  2097.           data from the bad cluster has been remapped (which depends on whether
  2098.           a /Zn option was specified on the command line). If the /M flag is
  2099.           not specified when HDTEST is run on a system that suffers from the
  2100.           "multi-track read" problems discussed in the main part of the
  2101.           documentation, multiple bad clusters may be reported with no errors
  2102.                                                                     __       
  2103.           persisting on sector-by sector reading. These reports should disappear
  2104.           if the /M flag is used.
  2105.  
  2106.           If the "verbose" form of the /G option is used, the bad sector report
  2107.           will contain the equivalent of the second and third lines of the bad
  2108.           cluster report for each bad sector. Note that, if the /X option is not
  2109.                          ___________________                                    
  2110.           used to prevent testing of previously flagged bad clusters, these may
  2111.           give rise to spurious warnings of possible data loss in the third line
  2112.           
  2113.           
  2114.                                          Page 29 
  2115.            
  2116.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2117.           _______________________________        _______________________________
  2118.           
  2119.           
  2120.           of the bad sector report. If no unrecoverable bad clusters were
  2121.                                                             ________     
  2122.           reported, such warnings can safely be ignored. If the default form of
  2123.           the /G option is used, the bad sector report gives only a Hex error
  2124.           code for each bad sector. The LSB of this code is the value returned
  2125.           (in AH) by INT 13. The MSB of the code depends on the phase of testing
  2126.           during which the error occurred. In general, if the first digit (of a
  2127.           four digit code) is C or above, an unrecoverable error occurred, but
  2128.           error codes FFFD through FFFF have special meanings and indicate
  2129.           recovered errors.
  2130.  
  2131.           When the program detects an error during read/write testing of a
  2132.           sector in the DOS area, only the first three lines described above are
  2133.           printed and the program aborts. The remainder of this Appendix
  2134.           contains more details of and further information on the possible
  2135.           contents of lines two and three of HDTEST's disk error message.
  2136.  
  2137.           The second line of the disk read/write error message will usually take
  2138.           the form: "[Error Type] occurred during [phase of testing]". Possible
  2139.           values for [Error Type] are as follows (in alphabetical order):
  2140.  
  2141.           Address Mark Not Found - this is a fairly common error reported for
  2142.           bad blocks which are present from "scratch" on a new disk, since a
  2143.           significant media defect may well not retain sector formatting data
  2144.           and/or the manufacturer may have made sure that a known bad track on
  2145.           the disk will not be used by deliberately not writing address marks
  2146.           there. If new bad clusters are reported with this error message, it is
  2147.           likely that the hard disk surface has been physically damaged (perhaps
  2148.           by a shock to the drive) but possible that the controller has a
  2149.           problem.
  2150.  
  2151.           Bad Controller - this means what it says, but check that all boards
  2152.           and cables are properly seated before giving up.
  2153.  
  2154.           Bad Sector - the BIOS was instructed to read a sector number which
  2155.           should not (according to its configuration data) exist on the device.
  2156.           This indicates either an internal program error or that the program is
  2157.           having a problem determining the physical layout of the disk. Check
  2158.           the values reported by HDCHEK against those in the disk documentation.
  2159.  
  2160.           Bad Track - analogous to "Bad Sector".
  2161.  
  2162.           Buffer Comparison - the data read from a sector differs from that
  2163.           written to it. This should not happen, since it suggests either that
  2164.           the device's error-detection functionality has failed or that it has
  2165.           been overwhelmed. If it does occur, the most likely causes are
  2166.           controller and memory problems (in that order of likelihood).
  2167.  
  2168.           Corrected ECC - as discussed at some length above, the data retrieved
  2169.           from a hard disk was incorrect but the device's error-correction
  2170.           hardware was (probably) able to correct it.
  2171.  
  2172.           DMA Boundary Violation - should not occur (HDTEST positions its
  2173.           buffers to avoid crossing absolute segment boundaries). Suggests
  2174.           either an internal program error or a controller/BIOS problem.
  2175.  
  2176.  
  2177.  
  2178.           
  2179.           
  2180.                                          Page 30 
  2181.            
  2182.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2183.           _______________________________        _______________________________
  2184.           
  2185.           
  2186.           Hardware Timeout - a seek or other operation was not completed within
  2187.           the maximum time allowed by the BIOS. Check connections, reseat
  2188.           boards, otherwise suspect the mechanics of the disk.
  2189.  
  2190.           Init Fail - should not occur (on a working disk).
  2191.  
  2192.           Internal - internal program error. Make sure that your working copy of
  2193.           HDTEST has not been corrupted. The disk is probably not defective.
  2194.  
  2195.           Invalid Command - should not occur. Treat as Internal Error.
  2196.  
  2197.           Multiple Errors - one or more additional errors occurred while HDTEST
  2198.           was attempting to recover from an initial one. Multiple phase report
  2199.           lines will be printed but the error types cannot be further specified.
  2200.  
  2201.           Recovered - HDTEST recovered from the error and did not report on the
  2202.           error type (should not occur).
  2203.  
  2204.           Reset Fail - The device could not be reset (after an error). Usually
  2205.           indicates major problems with the disk or controller, but check
  2206.           connections, etc.
  2207.  
  2208.           Sector Not Found - the requested sector's address mark was not found.
  2209.           Likely to result from a media defect.
  2210.  
  2211.           Seek Fail - after a seek to a track, the controller found that the
  2212.           read/write head was not positioned correctly. Usually indicates a
  2213.           significant problem with the (drive) hardware.
  2214.  
  2215.           Sense Fail - the controller cannot find the drive! Check connections,
  2216.           etc.
  2217.  
  2218.           Uncorrected ECC - data error too major to be corrected. Usually a
  2219.           media defect. This message will also be produced if a CRC error is
  2220.           detected on a floppy disk.
  2221.  
  2222.           Undefined - the BIOS cannot figure out what went wrong, but something
  2223.           did!
  2224.  
  2225.           Unknown - likewise!
  2226.  
  2227.           Write Protection - HDTEST is attempting to write to a write-protected
  2228.           device.
  2229.  
  2230.  
  2231.           Possible forms for the rest of the second line are as follows:
  2232.  
  2233.           ... Error (unrecovered) occurred during first read - the cluster could
  2234.           not be read without error in five tries before a seek to the other
  2235.           "end" of the disk.
  2236.  
  2237.           ... Error occurred during first read - the error occurred during the
  2238.           first read but was recovered after one or more retries.
  2239.  
  2240.           ... Error occurred during read after seek - the error occurred when
  2241.           the cluster was read after a seek away.
  2242.  
  2243.           
  2244.           
  2245.                                          Page 31 
  2246.            
  2247.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2248.           _______________________________        _______________________________
  2249.           
  2250.           
  2251.           ... Error occurred during pattern read/writes - the error occurred
  2252.           during the pattern read/write phase of testing.
  2253.  
  2254.           ... Error occurred during final write - the error occurred when the
  2255.           saved copy of the cluster was being restored to the disk.
  2256.  
  2257.           ... Error occurred during read after final write - the error occurred
  2258.           when the restored cluster was being read back.
  2259.  
  2260.           ... (Buffer comparison) error occurred after final read - the copy of
  2261.           the cluster read back after restoration to the disk differed from its
  2262.           original memory image.
  2263.  
  2264.  
  2265.           There are only three basic forms of the third line:
  2266.  
  2267.           This error is (or "These errors are") recoverable (no data loss has
  2268.           occurred). - the bad cluster was read successfully and has been
  2269.           successfully restored to its original form, but it remains suspect and
  2270.           will (with your permission) be remapped.
  2271.  
  2272.           This error is unrecoverable, but remapping is possible. - the bad
  2273.           cluster was read successfully but has not been restored to its
  2274.                                                 ___                     
  2275.           original form. Remapping should be successful, but the data will be
  2276.           lost if this is not permitted.
  2277.  
  2278.           This error is unrecoverable, and data may be lost! - the bad cluster
  2279.           was not read successfully and will be remapped as provided by the
  2280.           value of the /Z switch parameter if remapping is permitted. In any
  2281.           event, some data loss has almost certainly occurred.
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.           
  2310.           
  2311.                                          Page 32 
  2312.                 
  2313.                Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2314.                _______________________________        _______________________________
  2315.                
  2316.                
  2317.  
  2318.                    APPENDIX C - EXAMPLE PROGRAM RUNS
  2319.                    _________________________________
  2320.  
  2321.      Screen display from successful run of HDCHEK on partition occupying the
  2322.      whole of a 20 Mb hard disk:
  2323.  
  2324. Device C: appears to be the DOS partition of a hard disk
  2325. It contains 41531 sectors
  2326. It starts at absolute sector 17 on the disk      {THIS IS CORRECT}
  2327.                                                   _______________ 
  2328. The total partition size is approximately 20 Mb
  2329. There are 4 heads and 17 sectors/track
  2330. Sector size is 512 bytes
  2331. Each of the 2 (16 bit) FATs occupies 41 sectors
  2332. The Root Directory occupies 32 sectors
  2333. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2334. consisting of 4 sectors
  2335. The directory scan was successful; a total of 1260 files and subdirectories
  2336. was found.
  2337.  
  2338.  
  2339.  
  2340.      Screen display from successful run of HDCHEK on a freshly FORMATted DSDD
  2341.      9-sector floppy disk:
  2342.  
  2343. Device A: is not a hard disk - using DOS interrupts
  2344.  
  2345.  
  2346. Device A: is a floppy disk
  2347. The disk contains 720 sectors
  2348. There are 2 heads and 9 sectors/track
  2349. Sector size is 512 bytes
  2350. Each of the 2 (12 bit) FATs occupies 2 sectors
  2351. The Root Directory occupies 7 sectors
  2352. The data area starts at DOS sector 12, and contains 354 clusters, each
  2353. consisting of 2 sectors
  2354. The directory scan was successful; a total of 0 files and subdirectories
  2355. was found.
  2356.  
  2357.  
  2358.      Screen display from run of HDCHEK on 20 Mb DOS partition - directory
  2359.      structure bad or unrecognizable:
  2360.  
  2361. Device C: appears to be the DOS partition of a hard disk
  2362. It contains 41531 sectors
  2363. It starts at absolute sector 17 on the disk
  2364. The total partition size is approximately 20 Mb
  2365. There are 4 heads and 17 sectors/track
  2366. Sector size is 512 bytes
  2367. Each of the 2 (16 bit) FATs occupies 41 sectors
  2368. The Root Directory occupies 32 sectors
  2369. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2370. consisting of 4 sectors
  2371. The preliminary directory scan failed.
  2372.  
  2373.  
  2374.  
  2375.  
  2376.                
  2377.                
  2378.                                               Page 33 
  2379.                 
  2380.                Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2381.                _______________________________        _______________________________
  2382.                
  2383.                
  2384.      Screen display from run of HDCHEK on 20 Mb DOS partition - FATs not
  2385.      identical:
  2386.  
  2387. FATS are different
  2388. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  2389. Continue comparison (Y/N)? [Y]: n     {user input}
  2390.                                 _                 
  2391.  
  2392. Device C: appears to be the DOS partition of a hard disk
  2393. It contains 41531 sectors
  2394. It starts at absolute sector 17 on the disk
  2395. The total partition size is approximately 20 Mb
  2396. There are 4 heads and 17 sectors/track
  2397. Sector size is 512 bytes
  2398. Each of the 2 (16 bit) FATs occupies 41 sectors
  2399. The Root Directory occupies 32 sectors
  2400. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2401. consisting of 4 sectors
  2402.  
  2403.  
  2404.  
  2405.      Screen display from run of HDCHEK - program unable to deduce disk
  2406.      structure - disk not recognizable as a DOS device:
  2407.  
  2408. Unrecognized media descriptor byte! - see error code
  2409. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.                
  2443.                
  2444.                                               Page 34 
  2445.            
  2446.           Documentation for HDTEST V4.84          Copyright 1988, P. R. Fletcher
  2447.           _______________________________        _______________________________
  2448.           
  2449.           
  2450.      Log file from successful run of HDTEST on 20 Mb DOS partition:
  2451.  
  2452.      HDTEST Log File - Wed Jan 07 11:44:52 1986
  2453.      Testing Device C:
  2454.  
  2455.      No new bad clusters identified - HDTEST finished.
  2456.      Wed Jan 07 16:10:41 1987
  2457.  
  2458.  
  2459.      Log file from run of HDTEST on 20 Mb DOS partition - one bad cluster
  2460.      detected and remapped:
  2461.  
  2462.      HDTEST Log File - Mon Jan 05 21:09:32 1987
  2463.      Testing Device C:
  2464.  
  2465.      Read/Write error at cluster number 7623!!
  2466.      Corrected ECC error occurred during pattern read/writes
  2467.      This error is recoverable (no data loss has occurred).
  2468.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  2469.  
  2470.      1 new bad clusters identified, marked, and remapped - HDTEST finished.
  2471.      Tue Jan 06 05:08:04 1987
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.           
  2508.           
  2509.                                          Page 35 
  2510.  
  2511.                         REGISTRATION FORM - HDTEST V4.84
  2512.                         ________________________________
  2513.  
  2514.      Please complete this form and return it with a check or money order for
  2515.      $35.00 (+ $5.00 for shipping outside North America) or equivalent to:
  2516.  
  2517.                      Peter R. Fletcher
  2518.                      1515 West Montgomery Avenue
  2519.                      Rosemont
  2520.                      PA 19010
  2521.                      U.S.A.
  2522.  
  2523.      None of the information on this form will be passed on to any other
  2524.      individual or commercial organization.
  2525.  
  2526.      --------------------------------------------------------------------------
  2527.  
  2528.      This information is required to process your Registration:
  2529.  
  2530.      Last Name:____________________________  Other Names:______________________
  2531.  
  2532.      Address:______________________________  Town/City:________________________
  2533.  
  2534.      State:_____________  Post Code:____________  Telephone:_________________
  2535.                                                            (evenings/weekends)
  2536.  
  2537.      I understand that this software is supplied without warranty, express or
  2538.      implied, and agree not to hold its author liable for any direct or
  2539.      consequential loss arising out of my use of it.
  2540.  
  2541.      Signature:______________________________
  2542.  
  2543.      -------------------------------------------------------------------------
  2544.  
  2545.      You are requested, but not required, also to answer the following
  2546.      questions:
  2547.  
  2548.      On What type(s) of computer are you using HDTEST? _________________________
  2549.  
  2550.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  2551.  
  2552.      Type & Size of Hard Disk(s)? ____________________________________
  2553.  
  2554.      Make and Type of Hard Disk Controller(s)? ______________________________
  2555.  
  2556.      Do you own a Modem?                                             Y  N
  2557.  
  2558.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  2559.  
  2560.      How did you obtain/hear about this program?
  2561.  
  2562.      Did you think that the $35.00 registration fee for this program was:
  2563.  
  2564.      Very Good Value?              About Right?             Excessively High?
  2565.  
  2566.  
  2567.      Are there any other utility programs that you would like to see made
  2568.      available as "User Supported Software"? What sort of programs?
  2569.  
  2570.