

                                The Disk Doctor



         Editing a File or Disk

              Disk Doctor allows you to change bytes in a sector, then
         save that sector back to disk. This is very powerful and you
         can damage your files, so make sure you know what you are
         doing first. It's one thing to alter the text in a file,
         quite another to alter the code stored there.


              When you have a sector displayed (from either an open
         disk or file), use the mouse to move the cursor to any byte
         on the screen. Click the mouse button at the desired byte and
         the character will highlight (invert its color). Note that a
         hexadecimal display has two characters in each byte but an
         ASCII character is alone in a byte, since it is a
         representation of a hexadecimal character. If you toggle
         between display modes, you'll see what we mean.


         To change the character at the cursor, simply type in a new
         character from the keyboard. You can continue to enter
         characters by typing and the new characters will overwrite
         what was in the byte previously and then move to the next
         character or byte to the right. In other words, what you type
         overwrites much like a typewriter. The arrow keys will also
         move you around the screen but neither insert, delete nor
         backspace work.

              There are differences between changing character and hex
         displays. You can enter anything from the keyboard as a
         character (including the space bar) and it will overwrite the
         entire byte, even if what was there originally was a
         greyed-out hex number. If you enter a numerical value such as
         1, 2, 3 etc. in the character display, it appears on the hex
         display as its hexadecimal equivalent - 31, 32, 33 etc.


              In the hex display you can change either character in a
         byte but you can only enter a single numerical value or the
         letters A through F. This is to maintain the hex display
         format. If you don't understand hexadecimal or how it
         translates to ASCII, we recommend you read up on the topic
         before altering any bytes! Although you CAN change either
         value in a byte, you MUST enter both, even if it's only to
         enter the same value as is already shown. Disk Doctor accepts
         only the FULL byte as an entry in either mode.











                                Editing: Page 6




                                The Disk Doctor


              Understand too that simply because a hex value
         translates to a recognizeable text character that it doesn't
         mean the byte contains text. It could be part of a machine
         language code that coincidentally translates to something in
         the ASCII range. If it looks like gibberish in the text
         screen, it probably is code, not text and shouldn't be
         changed unless you know what you're doing.


              If you're doing this for the first time, here's a
         suggestion. First locate a blank (empty) sector on the disk.
         Copy the sector you want to change into the buffer then go to
         that empty sector, retrieve it and write it back to disk.
         This saves a copy of the sector in its original state so you
         can always restore it later. If you make a mistake, you can
         reverse the process and rewrite the saved sector back and
         undo any damage you may have done.


              Once you've changed a byte, you have several options.
         You can press the Undo key (or select Undo from the sector
         menu) which restores the changed bytes to their originals
         since the last read or write operation. You can save the
         displayed sector to disk, which writes the entire sector back
         to disk. Or you can close the disk or file and choose then to
         save or cancel the changes.


              Sectors can be copied from one to another, one at a
         time, by using the sector buffer. You can also print the
         contents of the sector and search for various combinations of
         numbers or characters. All this is explained in the menu help
         files.


              Disk Doctor stores information in memory about a disk.
         In order to update this information properly, always close a
         disk after you write sector zero to it and then re-open it if
         you want to continue editing it. You don't need to do this if
         you change any other sectors, only sector zero.


              A caution: some versions of TOS are case sensitive and
         don't like to deal with lowercase letters in filenames in the
         directory. Avoid using lowercase and you won't have any
         problems. Be careful when changing bytes in the directory and
         FAT; if you alter the forward pointers to the wrong clusters
         you may not be able to use those files again until you
         restore the links properly.









                                Editing: Page 7


