/***************************************************************************** * * (C) 1983, * Lee Merrick & Associated Limited * 75 The Donway West, Suite 1014 * Don Mills, Ontario M3C 2E9 * (416) 446-1011 * * Program: * ---------- * DUMPA.C * * Ver.Rv: Date: Author: Remarks: * ------- --------- ------- -------------------------------------- * 1.0 22-AUG-83 WGM New * * Command Line: * ---------------------------------------------------------------------- * -i* >* -s# -e# -b -c -? for help * * -i* input device or file (default DK:) * >* output device or file (default TT:) * -s# starting block number (default 0) * -e# ending block number (default 32767) * -b print (no -c)/display (-c) block numbers (default NO) * -c print CREATEs necessary for reconstruction (default NO) * * Description: * ---------------------------------------------------------------------- * Dump ASCII / Directory Reconstruction Program * * To dump a device or file in ascii format: * DUMPA -idevice:{file} >device:{file} -b * Examples: * DUMPA -iMYFILE.TXT !Text looks like KED display * DUMPA -iMYFILE.TXT -b !Will print block numbers * DUMPA -iMYFILE.TXT -s020 -b !Zero in front makes octal * DUMPA -iBIGFIL.TXT -s1000 -e1002 !Peeks inside big file * * Bytes are parity stripped and then output as follows: * 040 <= x <= 0176 as is * x == 011 (),012 (),015 () as is * x == 013 () as "VT" symbol * x == 014 () as "FF" symbol * x == 000 (), 177 (
) ignored * x == all others as "^" and x+0100, eg. 002 as ^B, etc. * * To reconstruct a directory (on physical device or archive file): * (1) DUMPA -idevice: >otherdevice:{file} -c * (2) INIT device: * (3) ASSIGN device: DK: * (4) @otherdevice:file * * Example: * DUMPA -iDY1: >DY0:DY1DIR.COM -c -b !display block numbers * !every 100 blocks * INIT DY1: * ASSIGN DY1: DK: * @DY0:DY1DIR.COM * * File names are created in the form Znnn.ext with 'nnn' starting * at zero and incrementing for each file, and 'ext' as follows: * (1) SAV Save file (bytes 041,043,0360 non-zero). * (2) VOL Beginning of physical device or archive * file (starts bytes 0240,000) The * directory is offset 6 blocks into * this area. If this is an archive file * a CREATE can be issued over this * file and the following files and * the archive successfully opened * if the archive directory is intact. * (3) LIB Object library (normally .OBJ) (starts bytes * 001,000,042,000,007,000) The following * .OBJ are often part of it, especially * if trailing nulls are 000. * (4) OBJ Object file (starts bytes * 001,000,056,000). * (5) C C source file (starts "/*", "#i", or "#d") * (6) MAC MACRO-11 source file (starts ";",";", * "; ",".TI",".TI"). * (7) TXT Other text file (no embedded nulls). * (8) UNK Unknown file (immediately follows .C * .MAC, or .TXT known to have ended because * of trailing nulls, but the next block * doesn't match any expected format. This * is often the remains of previously deleted * areas. * * The number of trailing nulls can be of some help in determining * if the divisions are real or imagined. Remember, the process * is by no means complete. The created files must be scanned, * renamed, and often grouped when imagined breaks are made. Files * created over what were previously deleted areas must also be deleted. * Hint: the purpose of .SAV files can often be determined by examining * the text literals stored within them. * *****************************************************************************/