home *** CD-ROM | disk | FTP | other *** search
- UNERA20.DOC - 07/21/84
-
- RECOVERING ERASED CP/M FILES
-
- UNERA, a utility program written for CP/M 1.4 and 2.2, appeared in
- INTERFACE AGE for December, 1981 (page 96) and was written by Gene
- Cotton.
-
- When a file is erased, a hexadecimal "E5" is placed at the start of
- that file name in the disk directory area. This releases the sectors
- used by that file for future use. If you realize that you have
- inadvertently erased the wrong file, you can recover it immediately by
- using this program:
-
- A)UNERA FILENAME.EXT (name of recently erased file)
-
- Since the file allocation table usually proceeds sequentially
- through the sectors remaining, you can often recover an erased file even
- after some additional disk activity, particularly on a partially-used
- disk. Normally by that time you would have forgotten the name of the
- file you wanted to recover, anyway.
-
- If you do recover the file immediately, it should be back to its
- normal state. If things have been added to the disk in the since you
- have erased the file, it may be recovered intact, or sections may have
- been overwritten. In that case, examine it carefully, and with luck it
- will again be a normal file. In any case portions can likely be
- recovered.
-
- This program does support "wild cards" such as "?" or "*". It
- automatically adjusts for the current CP/M 2.2 or for older CP/M 1.4. It
- can be used with Micropolis drives but in that case you need to edit one
- byte at the start of the program and reassemble.
-
- For limitations on files that may be un-erased, see the article in
- Interface Age, 12/81 page 98.
-
-
- A description of the command format follows:
-
- A>UNERA [d:]filename.ext [p] <CR>
-
- d: is the drive where the erased file is located
- (optional).
-
- filename.ext is the filename and extension of the file that
- has been erased. (The file name may be an
- unambiguous or ambiguous file reference --
- wildcards are allowed.)
-
- p will allow a change of diskettes and prompt
- to continue. (useful for one drive systems.)
-
- This should reclaim the file D:FILENAME.EXT to the current user
- area that you erased in error.
-
- COMMENTS:
-
- Using ERAA.COM or ERAQ.COM with which to erase files rather than
- the ERA command will minimize accidentally erasing incorrect files.
- Those programs show the name of the file to be erased and asks if you
- want to then erase that file? (They work with wild cards).
-
- Files may also be recovered using programs such as DU, DUU, DUUP,
- DU-V79, etc. Those require some talent to use and do not compare with
- UNERA for simplicity. They are very powerful multi-purpose
- disk-handling utilities.
-
- If you erase a file then run UNERA, it will now (version 1.4)
- restore the file to the current user area and not user area 0. (May be
- changed by setting the conditional assembly constant "CURUSR" to
- "FALSE".) This is handy when you are in user area 8, kill a file, want
- to reclaim it, and the program puts it in user area 0 instead -- meaning
- you have to run another program to move it back to 8.
-
- "Short messages" are now implemented. If you don't like L--O--N--G
- warning messages, (i.e., you are an experienced hacker), then set this
- option TRUE.
-
- The UNERA program is written to run on an 8080, 8085 or Z80
- (registered trademark of you know who) microprocessor and to assemble
- with ASM, the assembler that comes with CP/M. The program uses direct
- BIOS calls to read and write back the directory. To use UNERA, look
- over the source file and change it as required. As distributed, the ASM
- and COM files are set up to include CP/M 2.2 and CP/M 1.4 code with long
- error messages. The UNERAsed file will go to the logged on user area.
-
- You may shorten the COM file by excluding CP/M 1.4 code and
- displaying short error messages. (See conditional assembly statements
- "CPM14" and "SHORT".) You may have the UNERAsed file go to user area 0
- (see "CURUSR"). If you are using CP/M 1.4, you must include the CP/M
- 1.4 code and also check the disk translate table to be sure it is
- correct for your disk system. Change if necessary. To user the program
- with Micropolis drives change "MICROP" to TRUE at the start of the
- program and reassemble.
-
- This program has not been tested with MP/M and CP/M+ and, if used
- on these systems, will display a message and abort.
- UNERA20.DOC - 07/21/84
-
-
- Notes and comments by: Irv Hoff and
- Paul S. Traina
-