home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / 013p / format.fix < prev    next >
Text File  |  1984-08-03  |  2KB  |  61 lines

  1. PREVENT ACCIDENTAL ERASURE OF YOUR HARD DISK
  2.  
  3. This information has been adapted for DOS 2.1 from the December 
  4. issue of PCPLUS, the newsletter of the Central Texas PC Users
  5. Group.
  6.  
  7. I hope none of you has had the misfortune to have found this 
  8. out the hard way, but the FORMAT command in DOS 2.1 (and 
  9. previous versions of DOS) will format your fixed disk just 
  10. as easily as it does your floppy diskettes.  Because the 
  11. default drive is normally "C:" on a fixed disk, the 
  12. command "FORMAT" with no operands, followed by pressing 
  13. ENTER twice, will instantly wipe out all your files on 
  14. the fixed disk.  And because you probably did not back up
  15. the files on your fixed disk yesterday, new and unique 
  16. additions to the vocabulary of the English language are 
  17. likely to be main fruits of your accident.
  18.  
  19. Fear Not!  The following simple patch to FORMAT.COM makes it
  20. impossible to format drive C: (or any higher disk drive 
  21. letter) no matter how hard you try.  Both FORMAT and FORMAT C: 
  22. are disabled when drive "C:" or higher is the default drive or 
  23. the designated drive on which a disk is to be formatted.  
  24. The patch checks for a letter lower than "C" in the "Press any 
  25. key to continue..." message and returns directly to DOS unless
  26. that is the case.
  27.  
  28. I strongly recommend that this patched version of FORMAT be 
  29. the ONLY one present on your fixed disk.  The unpatched 
  30. version of FORMAT.COM should be renamed to XFORMAT.COM, for 
  31. example, and placed on a COPY of your DOS 2.1 floppy diskette.  
  32. After all, you should be able to go from year to year without
  33. intentionally reformatting your hard disk.
  34.  
  35. Follow these instructions to patch your FORMAT.COM (Version 2.1) 
  36. program.  (Comments are enclosed in parentheses.)
  37.  
  38. C>CD\DOS                  (assumes that all of your DOS files 
  39.                            are on a subdirectory named DOS)
  40. C>DEBUG FORMAT.COM
  41.  
  42. -a 2b3
  43. xxxx:02B3 jmp 100f        (Jump to patch; drive letter is in 
  44. xxxx:02B6                  register AL)
  45.  
  46. -a 100f
  47. xxxx:100F cmp al,43       (Check for "C" or greater)
  48. xxxx:1011 jl 1015         (Jump to 1015 if less than "C")
  49. xxxx:1013 int 20          (Return to DOS)
  50. xxxx:1015 mov [ffa],al    (Place drive letter in text message)
  51. xxxx:1018 jmp 2b6         (Resume program where we left off)
  52. xxxx:101B
  53.  
  54. -w
  55. Writing 1B00 bytes
  56.  
  57. -q
  58.  
  59.  
  60.  
  61.