
                           Hard disk utilities:


No  single type of program makes more demanding use of your hard drive than 
a large database program like this one.

On the hardware side,  the hard drive vendors take every possible short cut 
to push out their products to meet consumer demand.  They won't communicate 
the most basic information to end users about the operating characteristics 
of their hardware,  such as the heat-up/cool-down cycles and voltage spikes 
that occur with their equipment.  

In the software end,  this operating system seems woefully under-engineered 
to deal with the realities of high-volume  disk access that are typical  of 
large application software.   

The net result is that our work, your use of my software and my development 
efforts, become captive to the vicissitudes of the hard drive.  

These  utilities  have appeared on a number of bulletin  boards  and  other 
sources  of  shareware.   In  all cases,  the respective authors  of  these 
utilities assert their right of intellectual ownership of their  respective 
software  programs,  though  they  are physically resident on a  number  of 
shareware sources,  such as bulletin boards or in the catalogs of shareware 
distributors.

Each  author  of  these respective utilities has the same legal  rights  of 
ownership  as would be found with a journalist or a novelist.   Any  person 
who  wishes  to  use any of these utilities would have  to  enter  into  an 
individual  license  agreement with the author of each respective  software 
program. 

No  such  license  agreement  currently  exists  between  ACS,   Juskovitch 
Corporation,  or Paul Sax  and any of these authors.
 
These  copywrited  or trademarked utilities are enclosed here merely as  an 
educational tool,  a point of reference,  an example of what you should  be 
looking  for  if you elect to buy this general type of hard  drive  utility 
from any of these authors or from another source, such a retail store.

Their presence here in no way contravenes,  inhibits, or modifies the legal 
rights or recourse of the individual authors.



DDU (Dangerous Disk Utility) provides many uncommon features such as showing
the clusters assigned to files, listing allocated, bad and free clusters and
more.

Syntax:

The syntax for DDU depends on the function you wish to perform.  More than one
function may be requested with a single execution of the program

General Syntax:

DDU param-1 param-2 param-3 ... param-x

Specific Syntax:

DDU [d:][path\]filename.extShow clusters assigned to the specified file
DDU [d:]/AShow allocated cluster numbers
DDU [d:]/BShow bad cluster numbers
DDU [d:]/FShow free cluster numbers
DDU [d:]cluster/M*Mark specified cluster as bad
DDU [d:]cluster/OShow name of file that contains this cluster
DDU [d:]/PShow parameters for specified drive
DDU [d:]cluster/U*Unmark specified cluster as free
DDU [d:]/V*Verify specified disk and mark all bad clusters

Note that all options marked with a trailing asterisk (*) rewrite the disk's
file allocation table.These options are the ones that may be "dangerous".

Requirements:

DOS 2.0 or greater.  I believe that with a slight change, this could be
  overcome but I don't have a DOS 1.XX operating system to test with.  The
  problem is that DOS 1 does not support directories or the DOS function call
  that returns the current directory.

Standard disk formats.The program has tables for 160K, 180K, 320K, 360K and
  1.2 meg 5.25 inch disks with no boot record.It should be able to support
  other formats provided with a properly formatted boot record.  I have a
  modified VDISK.SYS device driver installed with which it also works.

25 lines per screen.  If you have (for whatever reason) a smaller screen, you
  may loose information.  The best example of this is seen with the /P option
  which currently displays about 17 lines.)


When you use the /V option, you should be prepared for a long wait (10 to 15
minutes) for verifying a hard disk.  If all goes well, you should see no
messages until DDU finishes verifying the media.  If DDU discovers bad sectors
in the system area of the disk, (boot sector, FAT sectors or root directory
sectors) it will terminate immediately with an error message.  If errors are
found in the data area of the disk, it will attempt to mark the cluster
containing the bad sectors.  If the cluster is in use by a file or is
already marked as bad or reserved, a message to that effect will be displayed
and the program will continue.Otherwise, the offending cluster will be marked
bad.


                                   DDU:
                                [continued]

If any clusters are already marked bad, you will be asked if you want to
unmark them before the verify begins.  If you enter Y (or y), all
bad clusters are freed.  If you enter anything else they will be left marked.
Here are two examples:

A>DDU D:/V
    3 marked clusters -- unmark? (Y/N) <N>:N
Cluster  2152 is already marked bad
Cluster  2153 is already marked bad
Cluster  2154 is already marked bad
Verify marked     0 clusters bad

A>DDU D:/V
    3 marked clusters -- unmark? (Y/N) <N>:Y
Cluster  2152 has been unmarked (freed)
Cluster  2153 has been unmarked (freed)
Cluster  2154 has been unmarked (freed)
Cluster  2152 has been marked bad
Cluster  2153 has been marked bad
Cluster  2154 has been marked bad
Verify marked     3 clusters bad


Note that any drive specification remains in effect until another parameter on
the same command line containing a drive spec is supplied.  If no drive is
specified with the first parameter the current (default) drive will be used.
The path specification is not retained from one parameter to the next.If it
is not given, it is always assumed that the current directory for that drive
is to be used.

Be careful! Enjoy! and hopefully find this program useful.




DTST - Yet another disk tester                v1.0 15-Feb-88
==============================                (C) 1988 Samuel H. Smith

DTST is a small utility that is used to check out your hard disks.  It
has the special ability to report "slow" sectors.  These are sectors
that read properly, but often require retries.  I feel that such sectors
are on the verge of failure and should quickly be locked out before they
cause any harm.

DTST consults your FAT and reports if clusters are already marked bad.
You can use another disk utility (such as Norton's NU) to locate any
files using the questionable sectors.  Copy the files to a safe place
and then use "DT" to mark the blocks as "bad".  This will prevent real
trouble before it happens.

Use this at your own risk!  I am including source code so you can verify
that it has not been hacked.

                                                Samuel H. Smith
                                                The Tool Shop

Revision history
----------------

15-feb-88 v1.0
   Initial coding and release.

21-feb-88 v1.1
   Added two optional parameters to specify the first and last
   sector number to test.

21-may-88 v1.2
   Changed scanning direction.  Consults boot record for information
   needed to calculate cluster numbers.
   
23-may-88 v1.3
   Fixed the 'slow sector' message, which was broken in the 21-may version.
   Also reduced display activity during testing.

16-jun-88 v1.4
   The FAT is now loaded to determine clusters which are already marked
   as bad.  Added READ/WRITE test.  Initial SourceWare release.

26-jun-88 v1.5
   Directed the non-error track by track status messages to the display
   regardless of where standard output has been redirected.  This removes
   clutter from a logfile if you are running DTST in a batch with output
   redirected to a file.

17-may-89 v1.6
   Added support for DOS 4.0 and partitions over 32meg.
   Added additional error messages when a disk failure is detected.



       SST - THE SEEK STOPPER, Version 2.01
       Copyright 1986 by Alfred J. Heyman

       Feel  free to copy and share SST with others so long as it
       is  distributed in its unmodified form and as long  as  no
       disk  copy  or  duplication fee is  charged.   The  Author
       reserves the sole right to distribute SST for profit.

       If  you  find SST to be useful,  And/Or would like  to  be
       notified  about getting possible future SST  enhancements,
       you can become a registered SST user by Sending $10 to the
       Author.

       SST  may  not be used in a commercial environment  without
       the  above  mentioned   registration.     Source  code  is
       available.

                ======  WARNING, RLL Drives ======== 

Any program like SST should only be used with extreme caution AFTER BACKING 
UP  YOUR DRIVE.   But do not attempt to use SST on an RLL-formatted  drive. 
SST does not work with RLL hard drives, only MFM. 
       ----------------------------------------------------------
       WHAT IS SST?

       SST is a program that is designed to reorganize a DOS disk
       so that it will run "Faster".   Normal daily use of a disk
       will  produce  a  disk  with  many  fragmented  files  and
       subdirectories.   Simply put, these are files that are not
       completely contiguous or together,  but are spread out all
       over the disk.   These fragmented files and subdirectories
       slow disk access down because DOS must tell the Disk  Head
       to  Seek to other parts of the disk to pick up other parts
       of the same file.  For example, your disk might have three
       files on it that we will call A,B,and C.   Different parts
       might be arranged as follows....

       AAAAAAABBBBBBBBAAAC CCAAABBBB     CCC

       SST  would reorganize the three files so that all of their
       parts would be contiguous....

       AAAAAAAAAAAAABBBBBBBBBBBBCCCCCC

       This change would shorten the amount of time that it takes
       DOS to read in the file.  If a subdirectory is fragmented,
       fixing  it  will  speed  up disk  access  time  even  more
       noticeably!


       Syntax: SST [d:] [ TEST] [ CLEAR]

       TEST   - will  run  SST in  a  READ-ONLY  mode.   No
                alterations will be made to the disk.
       CLEAR  - will  Clear  move  all  erased  entries  in   all
                directories to the ends of those directories.

       __________________________________________________________

       SO WHATS SO GREAT ABOUT SST?

       The main difference between SST and other Disk  Optimizing
       programs is the way that SST achieves the end result.  SST
       was designed to be FAST.   SST is also NOT  copy-protected
       and never will be.

       SST  reads in all of the data that it will need during the
       run   session  and  Keeps  this  information  in   memory.
       Specifically,  SST uses DOS Interrupts 25h and 26h to look
       at   the  boot  track  and  other  parts  of   the   disk.
       Information  about  the disks' characteristics are  stored
       there.   SST makes a quick comparison of the data it  gets
       here  with  what DOS thinks about the disk.  If these  two
       sets of data agree with each other,  SST will read in  the
       disks  File  Allocation  Table,  Root  Directory  and  All
       subdirectories.  ALL of this information is kept in memory
       during the SST session.

       SST  then decides on the best way to reorganize the disk's
       clusters.  When this is finished,  the user is prompted (Y
       or N) to continue or not.

       A  "Y" response to the above question will start the  File
       Cluster Swapping procedure.  Here, the actual file data is
       physically  moved.   All data is buffered IN MEMORY.  When
       SST  is  finished  SWAPPING,  it  then  updates  the  File
       Allocation table on the disk, and all directories.

       Some  disk optimization programs use the slower and  safer
       method  of  buffering file data to the disk.   While  this
       practically eliminates the chances of data losses  because
       of accidents such as power failures,  it makes the program
       run incredibly slow on a nearly full disk.


       SST DISADVANTAGES:

       WARNING:  It is strongly advised that the user back up his
       disk  before  using  SST.   Since SST  buffers  all  Data,
       Tables, and Directories to Memory,

       IF  A  POWER FAILURE OCCURS WHILE CLUSTER SWAPPING  IS  IN
                 ACTION... ALL DATA WILL BE LOST.

       The  Same thing goes for ANY interruption during the  SWAP
       procedure.  Simply LEAVE SST alone after pressing "Y" when
       prompted!


       SST  assumes  that  all disk sectors that are bad  are  so
       marked  in the File Allocation Table.  If you have a  Hard
       disk  that  causes  you  problems...   I.E.   it  develops
       unexpected  bad  Sectors regularly,  Don't use SST  on  it
       unless  you  have verified that the disk is currently  OK.
       One  way  of  doing this is with Peter  Norton's  DiskTest
       Program in his Norton Utilities Package.  (CopyRight Peter
       Norton).

       THE SST USER:

       SST is intended for Computer users who have the ability to
       quickly back up their disk and who don't have the time  to
       waste   for  a  simple  disk  optimization.   Other   disk
       optimizers  can  take many hours to work on  a  LARGE/FULL
       disk.   SST  can usually handle these more  quickly.   For
       Example,  SST has reorganized a 32 MEG Hard disk on an  AT
       compatible   in   under  30   minutes.   This   particular
       Optimization  moved over 20 Meg of data.  Zero Bytes  were
       free on the disk.

       SST LIMITATIONS:

       SST is  designed to  run only in a single user, non-multi-
       tasking  system without  stay resident programs installed.
       SST can perform an optimization on almost any standard DOS
       disk up to 32 Megabytes in size as long as sectors are 512
       bytes long.   However, it should be noted that SST needs a
       lot of memory to work with Bigger disks.   If SST runs out
       of memory,  a runtime error FF will halt the program. This
       error  typically  occurs  while  SST  is  reading  in  the
       Subdirectories and before anything is moved or changed  on
       the  disk.   SST's Memory allocation routines will look to
       see if enough memory is available when the "BIG BYTES" are
       needed.  A lack of memory returns a message along with the
       Runtime  Error  FF message.   The Smaller  Dynamic  Memory
       allocations are not PreChecked.  These routines are called
       many  times...  (Thousands of times on Hard disks) and  it
       would  slow  things  up  a great deal to  do  a  bunch  of
       calculations  every  time  that  16  bytes  were   needed,
       especially  since  SST's  Library  Routines  AUTOMATICALLY
       check  on  Stack/Heap  memory  availability  in  order  to
       generate this Runtime Error.

       If SST just can't quite make it to the SWAPPING  procedure
       with the memory that you have,  you can do a few things to
       try and get it to run.

       Simply  do a cold boot without any unneeded device drivers
       like  ANSI.SYS  in the  system.  Temporarily  rename  your
       CONFIG.SYS  file to something else and boot up without any
       of the other DOS parameters that you may specify that  eat
       up memory (BUFFERS=##). SST does not use Dos' DISK buffers
       to move any disk cluster data. Don't run ANY Stay Resident
       programs  before  SST.  The extra 1 or 2K of  free  memory
       gained with these methods has proven to be enough before!



       MEMORY USAGE SPELLED OUT:

       SST uses 16 bytes of memory for every used cluster on  the
       disk.  This translates to 262k for a completely full 32Meg
       Hard  disk.   SST uses 32 bytes of memory for every active
       directory entry on the disk.  One thousand files would use
       up 32000 bytes of RAM.   SST will buffer out one  complete
       copy  of  the  File allocation Table.  This would  use  up
       another  32K of ram on a 32Meg Hard  Drive.   The  program
       also needs another 64k for dynamic variables when run on a
       32Meg drive.....
       As  you can see,  this all adds up very quickly.   If  you
       plan  to run SST on a 32Meg drive,  you will need at LEAST
       512K,  If  you  have  640K,  you should  not  have  memory
       problems with SST and a 32 Meg Drive.

       For smaller drives such as 20 Meg and 10 Meg,  The  memory
       requirements are much lower.

       __________________________________________________________

                          * DISCLAIMER *

       The  author  makes no claims or guarantees about  the  use
       misuse,  or  suitability of SST on a particular  computer.
       It  is  the  users duty to take  adequate  precautions  to
       prevent  and recover from any accidental data loss because
       of power failure or any other cause.



