home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
XLINK10.LBR
/
XLINK.DZC
/
XLINK.DOC
Wrap
Text File
|
2000-06-30
|
4KB
|
109 lines
XLINK - Displays filename and cluster number for cross-linked
files.
IN THIS COLLECTION
XLINK.DOC This documentation file.
XLINK.COM A ready-to-run assembled version.
XLINK.180 Assembler source, written for SLR Systems SLR180+.
OPERATION
Reasonably simple, just issue the command XLINK and answer
the two questions the programs asks.
First, you need to specify a drive to hold a temporary file.
The program will give you an estimate of how much space this file
will need. The estimate is based on a worst-case situation, so
if you don't have a drive with quite than much space available,
you may be able to use it anyway.
Second, you are asked if you want the list of crosslinked
files (if any) sent to your printer.
The program will then go through the directory of the disk
under test and display each cluster number as it is found. This
mainly just indicates the program is running, if you would like
to turn off this display, patch the byte at 0104H to 0FFH.
WHAT IS A CROSSLINK?
The space on a disk is divided up into areas known as
'clusters' (or sometimes 'blocks'). Even if only one byte is
written to a file, the file will occupy a certain minimum of
space - for a 'standard' 8-inch disk, the area is 1Kbyte. For
disks capable of storing more than 256K the minimum size is 2K,
and can range up to a maximum of 16K. Each of these areas is
given an address or cluster-number. The first few clusters get
reserved for the directory, and the rest are used for files.
If you look at a typical directory entry, you will find the
first 16 bytes used for user area, filename, extension, extent
number, a couple of mystery bytes, and record count. The next 16
bytes are the cluster numbers 'claimed' by that directory entry.
Sometimes, more than one file will 'claim' the same cluster,
when this happens, you have a cross-link. If you write to a file
that is cross-linked you may change the contents of some other
file on that disk (possibly in some other user area).
What this program does, is to create a map of all of the
cluster numbers in use on a particular disk, and match them up
with the files that claim them. If more than one file claims a
particular cluster, the names of the two conflicting files is
displayed. You will find one of the files appears to be fine,
and the other one is damaged.
About the only remedy for the situation is to make a copy of
the 'good' file, make a copy of the corrupted file, and erase the
originals. You can then try to salvage what you can of the
corrupted file without risk to the good file.
OPERATING SYSTEM NOTES
This program was written to deal with a problem I had on a
TurboDOS system, but has been tested and works fine on a ZRDOS
computer. It should work fine under vanilla CP/M, I haven't used
any special TurboDOS system calls. Un-enhanced CP/M systems are
getting hard to find!
The program makes use of SYSLIB (version-4) subroutines,
because of that, and the instructions I used for my own code, the
program will run -only- on Z-80 processors or their successors.
THE USUAL DISCLAIMERS AND STUFF
This program should be fairly safe, the only disk-writes are
to the temporary file, all references to the directory of the
disk being tested are reads - and those are standard 'Search for
File' BDOS calls.
However, (there is always an 'however') in the event your
directory gets trashed, your system fails, or your cat turns
lime-green --- I will not be held liable.
This program is released for public distribution and
modification in the hope that others may benefit from it and
improve upon it.
I would like to thank the authors of SYSLIB - without their
routines, this would have been much more work.
Tony Newman
Genie address: T.NEWMAN2
BBS: The Machine
(503) 747-8758
24Hr.
300, 1200, 2400 bps