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
/
UNDEL11.ARK
/
UNDEL.DOC
next >
Wrap
Text File
|
1989-09-27
|
3KB
|
67 lines
Rejoice, all Hard Disk Users!!
At last, an UNDELETE program that will work on a hard disk!
To the best of my knowledge, this program will work on any
physical disk media - regardless of sector skew factors, maximum
directory entries per disk, or groups per directory. As far as I
know, this is the only UNDELETE that looks at the Disk Parameter
Header to get the Sector Translation Table and the Disk Parameter
Block and all of its associated values to go out and access the
directory one sector at a time through either the physical end-
of-directory or an 'E5 wall' (note: because of the 'E5 wall',
this will not work on TURBO DOS's hashed directory). It was
written in MicroSoft Fortran-80 only because I couldn't figure
any way to get a 16-bit by 16-bit divide to work nicely in
assembly (don't panic, I don't use ANY of Fortran's I/O, I do my
own); thus since not everyone HAS Fortran, I am not including the
source. But if anyone out there would like to provide mK1with a
nice divide routine, I would be more than happy to re-write this
in Z-80 assembly and take advantage of a little faster execution.
If you are interested, the execution goes as follows:
1) clear the crt screen (I use a general purpose clear code: 1
carriage return, 24 line feeds, then 23 vertical tabs) then
give the sign-on.
2) check for CP/M 2.0 or greater
3) get the input file name from the system FCB (I don't allow
ANY wild cards, as I know this could be a 26Mbyte disk and
that's asking for trouble).
4) get and stash the current drive, then BIOS select the
working drive (thus getting the address of the DPH).
5) get the addresses of the Sector Translation Table and the
DPB.
6) from the values in the DPB, calculate the maximum number
groups in the directory.
7) then start stepping through the directory at group 0 using
the BIOS sectrn to convert from logical to physical sector
numbers until encountering either an 'E5 wall' or the
physical end-of-directory.
8) when done, inform user of physical or logical end-of-
directory, and whether we did any undeletions.
9) if we did any undeletions, use BDOS function 37 to reset
only that working drive.
10) finallly BDOS select the old current drive, and we are done!
As usual for any undelete program, there is the caveat that I
don't check if you are undeleting any older-and-larger-extents or
re-used entries, but this sure beats using DU as I can't think of
any way that DU can do this as nicely.
If you would like to contribute that 16-bit by 16-bit divide
routine, please respond to:
Matthew R. Ward
Mail Stop: 201-230
Jet Propulsion Laboratory
4800 Oak Grove Drive
Pasadena, CA 91109