home *** CD-ROM | disk | FTP | other *** search
/ Futura 11 / Futura_Issue_11_1994_01_NOSAUG_Side_B.atr / diskutl1.doc < prev    next >
Text File  |  2023-02-26  |  13KB  |  1 lines

  1. ¢גחצירקחכ  (DOC 1)¢By Les Wagar           rev.12/02/93¢¢¢      disk tutorial based on¢         D-Utilities Disk¢           by Les Wagar¢¢¢     You've just deleted a file by mistake?  DISKUTIL has the answer.  You've a file that won't run, and gives you a "file number mismatch" error?  DISKUTIL to the rescue!  Want to personalize your disks, add notation lines to your directory, trace files, find what deleted filenames are still in the directory, or change data in programs you can't list?  DISKUTIL does all that, and more.¢¢     At its core is a small, assembly language subroutine for sector read-write.  (I can't remember my source for this subroutine, and have failed to find it in several searches.)  But other than these two DATA lines of assembly code, this versatile and powerful program is entirely BASIC.  Unless indicated by a screen choice, file or sector input/output is limited to Drive One--no "D:" prefix needed.  Choice of drives, including Ramdisk is offered only where is is most needed:  in the Restore, Datalift, and Directory Options.¢¢     When you run the DISKUTIL program, you are first presented with the Main Menu:¢¢         1. Datacopy¢         2. Stylus¢         3. Filetrak¢         4. Restore¢         5. Datalift¢         6. Directory¢         7. Quit¢¢¢     õ« גβ⌠βπ∩≡∙¢¢     A program for reading, copying, and replicating sectors.  It will copy sectors from one area of the disk to another, or from one disk to another.  Choose <1> in the Main Menu, and the Datacopy לσ∈⌡ appears:¢¢         1. Read sectors¢         2. Viewcopy sectors¢         3. Copy sectors¢         4. Replicate¢         5. Main menu¢¢     Choose "õ« פσβΣ ≤σπ⌠∩≥≤" and you get the prompt "READ SECTORS (a,b)?".  Enter your choice, and the sectors will be displayed and scrolled for easy viewing.  To pause the scrolling, use <CONTROL><1>.  When scrolling is complete, you will be asked if you wish to return to Datacopy.  A <Y>ES returns you to the Datacopy Menu; a <RETURN> sends you back to the Main Menu.¢¢     Choose "Ø« שΘσ≈π∩≡∙ ≤σπ⌠∩≥≤" and you are given the prompt "COPY SECTORS  (a,b) ?".  Enter your choice, and the sectors will be displayed as they are being read, flipping over one at a time in the "FROM:" viewframe so that you can confirm what you are going to copy.  When that is complete, you will be given the prompt "TO WHAT SECTORS  (c,d) ?".  IF YOUR DESTINATION DISK IS NOT THE DISK YOU HAVE READ FROM, YOU CHANGE DISKS AT THIS POINT.  If you decide not to proceed with copying, hit <RETURN> at this point, and you will be returned to the Datacopy Menu.  Otherwise, make your choice, and the chosen sectors will be displayed as they are being written, flipping over one at a time in the "TO:" viewframe.  When copying is complete, you will again be given the choice of returning to either the Datacopy Menu or the Main Menu.¢¢     Sectors which include <RETURN> data will not display neatly within the viewframe, so will not be fully erased when the next sector is displayed.  If this occurs, BREAK the program, and go to Datacopy Option "ø« ב∩≡∙ ≤σπ⌠∩≥≤".  Copying here is the same as the former except that the sectors are not displayed as they are being read or written, and the routine runs faster.¢¢     "œ« פσ≡∮Θπβ⌠σ" is a copy program also, except that only one sector is read, which is then repeatedly copied into any number of sectors as specified.  This procedure can be used, for instance, to re-format a number of sectors.¢¢     The copy programs will not overwrite a VTOC or Directory sector (360-368 or 1024) without first doublechecking to make sure you know where you are.¢¢     Ø« צ⌠∙∮⌡≤¢¢     A program for revising, personalizing, or creating sectors.  Choose <2> in the Main Menu, and the Stylus Menu appears:¢¢        1. Read sectors¢        2. Add directory note¢        3. Signature sector¢        4. Revise sector¢        5. Copy sector¢        6. Main menu¢¢     FIRST, A PRECAUTIONARY NOTE:  If in doubt about a sector change you want to make, first use "Œ« ב∩≡∙ צσπ⌠∩≥" to move a copy of the original sector to a safe area of the disk so that you can move it back if your change doesn't work.¢¢     The "õ« פσβΣ ≤σπ⌠∩≥≤" option here is the same as the one in Datacopy, and is provided here just to have it handy.¢¢     The "Œ« ב∩≡∙ ≤σπ⌠∩≥" option is not the same as the one in Datacopy.  It is designed to copy only one sector at a time, and to give a preview of the destination sector before writing to it.¢¢     I use "Ø« IJΣΣ ΣΘ≥σπ⌠∩≥∙ ∈∩⌠σ" to insert titles, signatures, or revision data in the Directory (Sectors 361-368).  It can be used to add a single line of anything you want.  The number of sectors can be made to read anything you want--up to 999---but the actual number of sectors used, as recorded in VTOC (Sectors 360 and 1024), will always be zero, and addressed to Sector 3.  (NOTE:  if you wish to insert a title, number, or signature at the top of a disk directory, the first bytes of Sector 361, either the disk should be newly formatted, or any existing file in that position will have to be moved, and the original filename(s) deleted.)¢¢     When you choose this option, you are first asked for the number of the sector on which to write.  Assuming that you have already used the Read Option to determine which sector, enter your choice.  The screen will then display that sector, and ask you to confirm it.  A <RETURN> takes you back to the Menu; a <Y>ES brings up the prompt for your input notation.  The allowable space for your entry is clearly marked.  After entry, you are then asked if you wish to display a number in the sector count--Σσµβ⌡∮⌠ is 000, if all you do is hit <RETURN>.  After entry, you are then shown how your notation will look, and are given the choice of continuing, or returning to revise it.  Choose (Y)es for continuing, and, if sector space is available for it, the note will be written to the disk, and the revised sector displayed for your viewing.  If you don't like what you see when the result is displayed, don't panic.  Nothing is hurt except your self-esteem, and Option "4. Revise sector" will repair even that.¢¢     I use "ø« צΘτ∈β⌠⌡≥σ ≤σπ⌠∩≥" to bury an identification on the disk.  Look at Sector 3 or Sector 720 for an example.  (NOTE:  Sector 3 is an FMS Sector, reserved when DOS formats the disk, but though it is left full of impressive-looking data, it doesn't seem to do anything.  It is my usual Sector address for dummy filenames, so I customize it.)  If in doubt about writing to a sector, use Stylus Option 5 to store a copy of it to a safe sector before you customize the original out of existence.  The setup for a Signature Sector is on כΘ∈σ ÀÃã of the DISKUTIL program.  Change the name to whatever you like.¢¢     Option "œ« פσ÷Θ≤σ ≤σπ⌠∩≥" is the major Stylus program, and takes a little practise.  A knowledge of disk and sector structure helps, but the program can be quickly put to use by careful observation and experiment.  With the Read Sectors Option, look at Sector 368 and Sectors 706-720 to see examples of what the Revise Option is able to do easily.  It has other uses, of course.  For instance, Revise provides the only easy way to ≥σ∈βϕσ dummy, notation, deleted, or zapped filenames.  Also, if you don't program in Assembly, changes are sometimes possible in untouchable M/L programs with this option.¢¢     TO GET ACQUAINTED WITH OPTION 4, LET'S TAKE A TRIAL RUN.  After choosing <4> you are asked what sector you want to change.  Let's say Sector 700:  we can't hurt anything there; it's presently unused.  Now the program shows you the current Sector 700--128 hearts in 4 rows, the CHR$ look of a formatted sector--and asks "Are you sure?".  If you aren't, hit <RETURN> and you're back in the Stylus Menu.  But say <Y>ES, and you are given the נ≡⌠Θ∩∈ œ ≤⌡Γ¡ϕσ∈⌡:¢¢         1. Format¢         2. Modify¢         3. Write¢         4. Menu¢¢     Choosing "œ« לσ∈⌡" here will send you back to the Stylus Menu.  So let's choose "ø« ת≥Θ⌠σ".  The sub-menu is replaced with the write-screen, and a little arrow is pointing where to start.  Let's see what happens if we don't want to start.  Hit <RETURN>.  A flight of arrows wipes out the WRITE title, and you are asked "Save to disk  Y/N ?".  It won't hurt anything if we say <Y>ES, but let's put it off.  Hit <RETURN>.  The write-screen disappears, and we're back in the sub-menu.  Choose "ø« ת≥Θ⌠σ" again.  This time we'll try something.  Hold the <B> down for a couple of rows, then the <V> till you run off the write-screen entirely.  But you can't run off!  As soon as you pass the bottom right corner, a flight of arrows wipes out the title again, and you're asked whether or not you want to save your creation.  Say <N>O.  We're back in the sub-menu.  Choose "ø« ת≥Θ⌠σ" again, and the edited sector full of BBBVVV's reappears.  This time let's move around a bit before we start.  Holding down <CONTROL> use the <RIGHT ARROW> for 5 spaces, and the <DOWN ARROW> for 1 space, then try carving out space in the middle with the <SPACEBAR>.¢¢     Finished?  Now, how do we get out?  Six ways of doing it.  With <CONTROL> held down, any <ARROW KEY> will bring you out correctly as soon as you cross an edge of the write-screen.  Or run out the bottom with your row of <V>s, or go the easy way, and just hit <RETURN>.  When the flight of arrows leaves you with the question this time, let's say <Y>ES to saving our creation.  Now the write-screen disappears, the Drive light goes on, and a new Sector 720 is displayed.  Now you are asked if you want to go back to Stylus again.  Say <Y>ES, and go back to bring up Sector 700 in Option 4 again.  But Sector 700 is a mess now, so let's put it back to normal.  Choose "õ« ה∩≥ϕβ⌠" in the sub-menu, follow through, and a newly-formatted Sector 700 will appear.¢¢     To see what the Write Option πβ∈ do, use Stylus Option 1 to read Sectors 706-720.  These designs were all created on the write-screen.  When scrolling is complete, and the prompt asks where you want to return, try something else this time.  Go back to the Main Menu, choose DATACOPY, then Datacopy Option "2. Viewcopy sectors".  Ask for Sectors 712-716, but when asked where to copy them to, hit <BREAK> instead.  Now write:  PRINT T$ <RETURN>.  Does that display give you any ideas?¢¢     Now go back to צ⌠∙∮⌡≤ נ≡⌠Θ∩∈ œ.  Ask for Sector 364, then "Ø« ל∩ΣΘµ∙" from the sub-menu.  The Modify Option is the trickiest to use because it expects you to know something about the structure of the sector you are looking at, and this varies with different kinds of sector.  Sector 364, which you are now looking at, is a Directory Sector.  In it are the last 2 active files in the Directory (DIR and DISK), 3 dummy files (the two hyphen lines and the revision note), and 1 deleted file (TRYOUT).  Byte 0 of each file is the LOCKED, UNLOCKED, OR DELETED flag.  Bytes 1-2 of each file are the LSB/MSB (least significant byte/most significant byte) stating how many sectors are in the file.  Bytes 3-4 of each file are the LSB/MSB stating at what sector the file begins.  But of course the display is all in CHR$, not decimal, so you will have to decipher what you are seeing.  A "heart" is CHR$(0)--meaning zero--so the two hearts in bytes 1-2 of the Revision Note file tells you that this file is taking up zero sectors of space.  The CHR$(67) in byte 3, plus the "heart" (zero) in byte 4, tells you that the address of this non-existent file is Sector 3--which DOS does not use for files, so now you know for sure that you are looking at a dummy file.¢¢     So let's MODIFY.  If you change byte 0 of the deleted file (TRYOUT) to "B" you will have a file which the Directory lists as UNLOCKED.  If you change byte 0 to "b" you will have a file which lists as LOCKED.  If you are in enhanced density, and change byte 0 to "#" you will have a file which the Directory will list as LOCKED with a brace around it.  If in enhanced density and you change byte 0 to CHR$(67)--<CONTROL><C> on the keyboard--you will have a file which lists as UNLOCKED with a brace around it.  Try any of these, and check what you've done by going back to the Main Menu for the Directory.  Now go one step further.  Change byte 1 of this file (TRYOUT) to read CHR$(65) --<CONTROL><A> on the keyboard--repeat it in byte 2, save to disk, and again check the Directory.  You have a file 257 sectors long, right?¢¢     Well, not quite.  The file says it has 257 sectors, but the VTOC (Volume Table of Contents) still says "Øøø FREE SECTORS."  To change the VTOC you'd have to save the file, which you can't; or change the VTOC, which maybe you can if you're a graduate hacker; or else make the file a deleted file again so you can RESTORE it (לβΘ∈ נ≡⌠Θ∩∈ œ), which you could if the file was restorable, which this time it isn't.¢¢     So let's not leave an untabulated active file in the Directory.  You can wipe it out by overwriting its Directory record with "hearts" (<CONTROL> <COMMA>) or by revising byte 0 to say "deleted" again (<INVERSE><CTRL><COMMA>).¢¢