home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / a / cpmcmds.arc / UNERA20.DOC < prev    next >
Encoding:
Text File  |  1989-10-03  |  4.8 KB  |  105 lines

  1. UNERA20.DOC - 07/21/84
  2.  
  3.                  RECOVERING ERASED CP/M FILES
  4.  
  5.      UNERA, a utility program written for CP/M 1.4 and 2.2, appeared in
  6. INTERFACE AGE for December, 1981 (page 96) and was written by Gene
  7. Cotton.
  8.  
  9.      When a file is erased, a hexadecimal "E5" is placed at the start of
  10. that file name in the disk directory area.  This releases the sectors
  11. used by that file for future use.  If you realize that you have
  12. inadvertently erased the wrong file, you can recover it immediately by
  13. using this program:
  14.  
  15.        A)UNERA FILENAME.EXT   (name of recently erased file)
  16.  
  17.      Since the file allocation table usually proceeds sequentially
  18. through the sectors remaining, you can often recover an erased file even
  19. after some additional disk activity, particularly on a partially-used
  20. disk.  Normally by that time you would have forgotten the name of the
  21. file you wanted to recover, anyway.
  22.  
  23.      If you do recover the file immediately, it should be back to its
  24. normal state.  If things have been added to the disk in the since you
  25. have erased the file, it may be recovered intact, or sections may have
  26. been overwritten.  In that case, examine it carefully, and with luck it
  27. will again be a normal file.  In any case portions can likely be
  28. recovered.
  29.  
  30.      This program does support "wild cards" such as "?" or "*".  It
  31. automatically adjusts for the current CP/M 2.2 or for older CP/M 1.4. It
  32. can be used with Micropolis drives but in that case you need to edit one
  33. byte at the start of the program and reassemble.
  34.  
  35.      For limitations on files that may be un-erased, see the article in
  36. Interface Age, 12/81 page 98.
  37.  
  38.  
  39.      A description of the command format follows:
  40.  
  41.         A>UNERA [d:]filename.ext [p] <CR>
  42.  
  43.         d:              is the drive where the erased file is located
  44.                         (optional).
  45.  
  46.         filename.ext    is the filename and extension of the file that
  47.                         has been erased.  (The file name may be an
  48.                         unambiguous or ambiguous file reference --
  49.                         wildcards are allowed.)
  50.  
  51.         p               will allow a change of diskettes and prompt
  52.                         to continue.  (useful for one drive systems.)
  53.  
  54.      This should reclaim the file D:FILENAME.EXT to the current user
  55. area that you erased in error.
  56.  
  57. COMMENTS:
  58.  
  59.      Using ERAA.COM or ERAQ.COM with which to erase files rather than
  60. the ERA command will minimize accidentally erasing incorrect files.
  61. Those programs show the name of the file to be erased and asks if you
  62. want to then erase that file?  (They work with wild cards).
  63.  
  64.      Files may also be recovered using programs such as DU, DUU, DUUP,
  65. DU-V79, etc.  Those require some talent to use and do not compare with
  66. UNERA for simplicity.  They are very powerful multi-purpose
  67. disk-handling utilities.
  68.  
  69.      If you erase a file then run UNERA, it will now (version 1.4)
  70. restore the file to the current user area and not user area 0.  (May be
  71. changed by setting the conditional assembly constant "CURUSR" to
  72. "FALSE".)  This is handy when you are in user area 8, kill a file, want
  73. to reclaim it, and the program puts it in user area 0 instead -- meaning
  74. you have to run another program to move it back to 8.
  75.  
  76.      "Short messages" are now implemented.  If you don't like L--O--N--G
  77. warning messages, (i.e., you are an experienced hacker), then set this
  78. option TRUE.
  79.  
  80.      The UNERA program is written to run on an 8080, 8085 or Z80
  81. (registered trademark of you know who) microprocessor and to assemble
  82. with ASM, the assembler that comes with CP/M.  The program uses direct
  83. BIOS calls to read and write back the directory.  To use UNERA, look
  84. over the source file and change it as required.  As distributed, the ASM
  85. and COM files are set up to include CP/M 2.2 and CP/M 1.4 code with long
  86. error messages.  The UNERAsed file will go to the logged on user area.
  87.  
  88.      You may shorten the COM file by excluding CP/M 1.4 code and
  89. displaying short error messages.  (See conditional assembly statements
  90. "CPM14" and "SHORT".)  You may have the UNERAsed file go to user area 0
  91. (see "CURUSR").  If you are using CP/M 1.4, you must include the CP/M
  92. 1.4 code and also check the disk translate table to be sure it is
  93. correct for your disk system.  Change if necessary. To user the program
  94. with Micropolis drives change "MICROP" to TRUE at the start of the
  95. program and reassemble.
  96.  
  97.      This program has not been tested with MP/M and CP/M+ and, if used
  98. on these systems, will display a message and abort.
  99. UNERA20.DOC - 07/21/84
  100.  
  101.  
  102.                      Notes and comments by: Irv Hoff and
  103.                                             Paul S. Traina
  104.  
  105.