home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug001.arc / DUU.HLP < prev    next >
Text File  |  1979-12-31  |  14KB  |  444 lines

  1. DUU.DOC
  2. by Ward Christensen (revised 10/23/81)
  3. Includes notes by Ron Fowler for DU-V75.
  4.  
  5. HOW TO USE DU ver 7.5 DISK UTILITY
  6.     (Extended and called DUU on CP/MUG v.71)
  7.  
  8. DUU, Disk Utility-Universal, is an enhanced version of
  9. previous DU programs, on CP/MUG volumes 40 and 46.
  10.  
  11. The primary change over the earlier CP/MUG versions is the
  12. additions by Ron Fowler, to make DU work with virtually any 1.4
  13. or 2.2 system, single or double density.
  14.  
  15.  
  16.     INDEX
  17. 0.0    Changes from DU-V75
  18. 1.0    INSTALLATION:
  19. 2.0    USE:
  20.   2.1    COMMANDS, BY FUNCTION (quick reference)
  21.   2.2    ALPHABETIC COMMAND SUMMARY
  22. 3.0    NOTES
  23. 4.0    INTERPRETATING DIRECTORY DATA
  24.   4.1    SINGLE DENSITY
  25.   4.2    DOUBLE DENSITY
  26.  
  27.  
  28. 0.0    CHANGES FROM DU-V75
  29. ===
  30.  
  31.     The primary change is that all routines    which original-
  32. ly accepted a decimal number, such as /, +, -, and Z, which
  33. were changed to HEX in DU-V75, are now changed BACK to decimal.
  34.     The "F" command now works completely under 1.4 and 2.2,
  35. and finds all users, and even erased files.  Ambiguous file
  36. names are now allowed.  After using "F" with a specifid name,
  37. F with no operands will find the next "occurrence" (i.e.
  38. extent, or earlier erased copy, etc) of a file.
  39.     This is    a matter of taste - I don't believe in
  40. "babying" CP/M users with "press any key to continue" when more
  41. than 16 lines has scrolled by.  I removed these, so use ^S to
  42. suspend scrolling of the "?" (help) output.
  43.     The "U"    command    has been deleted, since    its only
  44. purpose was to change users for the sake of the old "F"
  45. command.  The new "F" command obsoleted the "U" command.
  46.     Made sure + and    - check    the "NOTPOS" flag; that    was a
  47. "loophole" that could "mislead" you.
  48.     Added ability to put Hex into default decimal fields.
  49. Needed this to transfer files, where their hex length is known,
  50. i.e. a file 29h sectors long in contiguous extents may be read
  51. into memory via: <<;+;/29h
  52.     Added "E" (erase screen) command.  Store the character
  53. sequence, 0ffH terminated, at 104h.  Useful as in "e;+;d;z20;/"
  54. to dump, sit, loop.  The screen clear "e" causes the display to
  55. "sit".
  56.     Set "@" when using "F" command, so for example to erase
  57. a file: "ffoo.zot;ch@,e5";w     Also change "not found" of "F"
  58. command so it aborts, thus preventing, in the above ex., the
  59. actual change-and-write.
  60.  
  61.  
  62. 1.0    INSTALLATION:
  63. ===
  64.     The 7.0    and later versions of DU are designed to be
  65. installed with a minimum of trouble.  In fact, in almost all
  66. cases, no changes to the source file should be necessary to get
  67. DU up and running. This is because DU uses the disk paramter
  68. block of CP/M to determine the characteristics of the disk
  69. environment.  (see the disclaimer for certain non-standard
  70. versions of CP/M 1.4).
  71.     The only parameter that    should need to be changed will
  72. be the clock speed flag at 103H.  Leave this byte zero if you
  73. have a 2 mhz clock.  Patch it non-zero for 4 mhz.  This is only
  74. needed for the "Z" (sleep) command.  An alternative is just to
  75. use larger numbers when running 4mHZ or 5MHz.
  76.  
  77.  
  78. 2.0    USE:
  79. ===
  80. An initial command string may optionally be placed as an
  81. operand of the original DU command, i.e.:
  82.  
  83.      A>DU G0;D;G2;=OK<D><A><1A>;D
  84.  
  85. For example, if you want to only MAP the disk, then exit:
  86.  
  87.     A>DU M;X
  88.  
  89. Once DU is running, it expects single-letter commands much
  90. like SID or DDT.  For ease of use, multiple commands may be
  91. placed on one line, separated by ";".  In addition, a given
  92. command or string of commands may be repeated, either indef-
  93. initely (until ^C is pressed), or a given number of times.
  94.  
  95. To avoid an accidental ^C from dropping out of DU, only an
  96. explicit "X" command will exit DU.
  97.  
  98.  
  99. 2.1    COMMANDS, BY FUNCTION
  100. ===
  101.  
  102. Help:
  103.     ?    request help
  104.  
  105. Positioning:
  106.  
  107.     Gnn    by allocation group
  108.     Snn    by sector
  109.     Tnn    by track
  110.     +nn    going ahead nn sectors
  111.     -nn    going back nn sectors
  112.  
  113. I/O:
  114.     R    Reads sector
  115.     W    Writes sector
  116.     <    Puts current sector "away" into a buffer
  117.     >    Recalls previously saved sector
  118.  
  119. Displaying:
  120.     G    Shows current group, track, sector
  121.     M    Maps the disk - where are the files
  122.     Mxx    Map starting at group xx
  123.     D    Dump the sector (hex + ascii)
  124.     A    Dump sector in ASCII
  125.     H    Dump sector in hex
  126.     Vnn    Views (like CP/M TYPE) nn sectors
  127.     #    Shows disk parameters, also # of sectors
  128.         stacked and used via "<<" and ">>"
  129.  
  130. Changing:
  131.     CHnn,val Change data in hex
  132.     CAnn,val Change data in ascii ( with <xx> escape to hex)
  133.     N    insert new disk
  134.     Unn    Change user to nn
  135.  
  136. Searching:
  137.     Fname    Find a file in the directory
  138.     F    Find next occurrence (extent) of same name
  139.     =aaaa    Scan for aaaa (in ASCII) from current
  140.         sector on
  141.  
  142. Misc:
  143.     Znn    Sleep (nn tenths of a second) such as to allow
  144.         viewing data before it scrolls off
  145.     Lx    Log in disk x
  146.     P    Turn on/off printer output toggle
  147.     Q    Before any command does it "quietly"
  148.     X    Exit to CP/M
  149.     /nn    Repeat previous command nn times
  150.         (indefinitely if nn omitted)
  151.  
  152.  
  153. 2.2    ALPHABETIC COMMAND SUMMARY
  154. ===
  155.  
  156.     #    Prints the disk parameters
  157.  
  158.     +    advance 1 sector (if below track 2,
  159.         this advances to next numerical, if
  160.         2 or >, advances based on CP/M's normal
  161.         sector scrambling algorithm, i.e. so +
  162.         will get the next logical sector of the file
  163.  
  164.     -    backs up 1 logical sector
  165.  
  166.         Note + and - may take an amount:
  167.         for example, +15 steps in 15 sectors.
  168.  
  169.     /    Repeats entire command.  Defaults
  170.     /nn    to "forever".  nn may be 2 to 65535
  171.  
  172.     <    Saves current sector in a save buffer
  173.         also resets buffer pointer used by << and >>
  174.  
  175.     <<    Saves current sector, bumps memory pointer.
  176.         Thus subsequent "<<" saves "next" buffer in
  177.         memory.  Use "<" to reset, or ">>" to
  178.         sequentially retrieve the buffers, such as to
  179.         move several sectors from one place on disk
  180.         to another, or to another disk, or just to
  181.         memory (stored at 2000H where DDT or SID
  182.         can subsequently access them)
  183.  
  184.     =string    Ascii search, starting at current
  185.         sector. <xx> hex may be imbedded,
  186.         or used alone:  To find "IN 0FEH":
  187.         =<db><fe>
  188.         Ignores bit 7 unless <xx> is used.
  189.  
  190.         Since ";" is a command delimiter, you
  191.         have to use <3b> to search for a ";".
  192.         
  193.         Also, since "<" is a hex-escape char,
  194.         use << to meane a single "<".
  195.  
  196.         N-O-T-E the special symbol "@" contains
  197.         the displacement at which the match occurred.
  198.         It may thus be subsequently used in a C
  199.         command, as in:
  200.  
  201.             =LIX;CA@,LXI;W
  202.  
  203.         would search for the string LIX, change
  204.         it to an LXI, and write it back.
  205.  
  206.     >    Gets saved buffer.  < and > may be used
  207.         to move a sector to another place.
  208.  
  209.     >>    Restore "oldest" unrestored sector saved
  210.         by "<<" command.  This command may be
  211.         "buried" in the middle of an infinite
  212.         repeat "/", because it will stop operating
  213.         when there are no more sectors in the buffer.
  214.  
  215.     ?    Gives command summary
  216.  
  217.     A    Dump sector, ASCII only
  218.  
  219.     CHaddr,val,val,val... change hex in sector
  220.     CAaddr,char string... change ASCII in sector
  221.         NOTE that <xx> may be hex imbedded
  222.         in the Ascii:  ca0,OK<d><a><1a>
  223.  
  224.         ----> Use W to write changes to disk.
  225.         Note that the C command echoes
  226.         the overlaid data for verification.
  227.  
  228.     CHaddr-addr,byte
  229.  or    CAaddr-addr,byte    repeats a change
  230.  
  231.     D    Dump sector, hex + ASCII
  232.  
  233.     Fname    print directory for file "name",
  234.         then positions to it's directory
  235.         sector.
  236.  
  237.     F    Find next occurrence of name in dir.
  238.  
  239.     Gnn    Position to group nn and read.
  240.  
  241.     G    Shows current position
  242.  
  243.     H    Dump sector, hex only
  244.  
  245.     L    Re-logs in the current disk. You may pull
  246.         out a disk, put in a new, and "L" just
  247.         to log it in. (See "LOGGING IN DISK" in NOTES
  248.         below)
  249.  
  250.     Lx    Logs in disk 'x', such as: LB
  251.  
  252.     M    Dumps a map of the group allocations
  253.         for files.
  254.     Mn    Shows which file is allocated to
  255.         group "n".
  256.  
  257.     N    Resets CP/M via the BDOS.  This may
  258.         make it possible under some implementations
  259.         of CP/M to change the disk format (e.g., density,
  260.         sides, etc)
  261.  
  262.     P    Toggle printer switch on/off
  263.  
  264.     Q    Quiet: Preceeding any command, suppresses console
  265.         output
  266.  
  267.     R    Reads the sector currently positioned to
  268.         into memory.  Note R (Read) is implicit in
  269.         the G, +, and - commands, but N-O-T in the
  270.         S and T commands (I did it because I was
  271.         tired of disk reading after T command before
  272.         I had a chance to issue the S command)
  273.  
  274.  
  275.     Snn    Position to sector nn, and read
  276.  
  277.     Tnn    Seek to track nn (no read)
  278.  
  279.     Ux    Logs user 'x' for next F command.  Gives
  280.         '?' error if not CP/M version 2.x.
  281.         (Note "F" no longer needs this - finds
  282.          ALL files - erased, any user, etc)
  283.  
  284.     V    Views the current sector.
  285.         (assumes ASCII data)
  286.     Vnn    Views nn sectors
  287.  
  288.     W    Write back the current sector (N-O-T-E may
  289.         not be used after an F command, as CP/M was
  290.         used to find the file in the directory
  291.  
  292.     X    Exit back to CP/M (Must press return).  Ctl-c
  293.         was too easy to hit over modem lines, so I
  294.         decided on 2-byte (X, CR) to exit.
  295.  
  296.  
  297.     Z    Sleep - causes the program to pause, such
  298.         as to look at a dump.  Z is 1 sec.  Znn
  299.         is nn tenths of a second on a 2 MHz 8080.
  300.  
  301.  
  302.  
  303. 3.0    ====== NOTES ======
  304. ===
  305. * MULTIPLE COMMANDS: May be separated by ";"
  306.  
  307. Example: the following commands will erase the
  308.     b disk directory to all E5's:
  309.  
  310.     lb        log in b drive
  311.     g0        position to dir.
  312.     ch0-7f,e5    fill with e5
  313.     <        save the sector
  314.     >;w;+;/16    restore, write, next,
  315.             repeat 16
  316.  
  317. ----This could be shortened to:
  318.  
  319.     lb;g0;ch0-7f,e5;<
  320.     >;w;+;/16
  321.  
  322. * DUMP COMMANDS: All dump commands (D, A, H) may be optionally
  323. followed by a starting and ending address:
  324.     D0,7F    is the same as just D
  325.     D3,5
  326.     A20,3F
  327.  
  328. * LOGGING IN DISK: In the original DU, I logged in the disk the
  329. way DU now does.  Then, I found that when you had a blown
  330. directory, you DIDN'T want to log the new disk in.  Thus I
  331. changed DU to just change which disk was selected.  Then along
  332. came double density, with its attendant "select density"
  333. functions, and Ron apparently put this back in.  So, it now
  334. sometimes works for double density, but makes DU very
  335. "intolerant" of disks with un-readable directories.  A
  336. solution is to log in a disk which is OK, and is of the same
  337. density as the blown disk, then put in the blown disk WITHOUT
  338. logging it in.
  339.     However, you are now opening yourself up to possible
  340. problems because of the buffering of physical sectors in the
  341. BIOS.  The best technique, (but not guaranteed), would be to
  342. seek to the unused inner tracks of the first disk, do the
  343. read, THEN change disks.  That way if it writes anything, you
  344. won't have destroyed anything.  ...assuming the disk is not
  345. completely full.  Another technique, assuming the second disk
  346. does not contain a CP/M system, would be to seek to track 1,
  347. then do the read there, then change disks to the blown one.
  348.  
  349.     Regarding the << and >> commands:
  350. *    Up to 255 sectors (only because its a 1 byte counter)
  351.     may be saved by <<.
  352. *    ANY TIME "<" is executed, the buffers are "thrown away".
  353. *    One ">>" to fetch a saved buffer and make it available
  354.     for writing, may be issued for each previous "<<".
  355. *    The "M" (directory map) command uses an area of memory
  356.     for a buffer.  To minimize problems, the Map buffer is
  357.     placed a the END of the CURRENTLY HIGHEST USED "<<"
  358.     buffer.  On small systems, where a "lot" of buffers have
  359.     been saved via "<<", the "M" command might report that
  360.     it ran out of memory.  Executing "<" (or ">>" sufficient
  361.     times for it to tell you there are no more sectors
  362.     in the buffer) will then make room available at a lower
  363.     address, for "M" to use for the directory.
  364.  
  365.     The following command could be used to move your directory
  366.     out to the end of your disk. (to keep a "back up" copy).
  367.  
  368.     1) Map the disk to find an open space at the end:
  369.         Me0        map starting at e0.
  370.     2) Suppose E0 is wide open.  Capture the directory:
  371.         g0
  372.         <<;+;/26
  373.  
  374.  
  375.  
  376. 4.0    INTERPRETATING DIRECTORY DATA
  377. ===
  378.  
  379. 4.1    SINGLE DENSITY
  380. ===
  381.  
  382. The following explains the format of a CP/M directory entry
  383. as shown by DU, using either the "F" (find file) command,
  384. or just doing "D" (dump) of the directory sectors, which
  385. are located in groups 0 and 1 on a single density disk.
  386.         ----------------
  387. Sample result of "FSID.COM" command:
  388.  
  389. 40  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  390. 50  33343536 3738393A  00000000 00000000  *3456789:........*
  391.  
  392. First line -
  393.  
  394. 40  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  395. ||  |||                      |  ||    ||    |         |
  396. ||  ||^----hex file name-----^  ||    ||    ^file name^
  397. ||  ||                          ||    ||     in ASCII
  398. ||  ||                   extent-^^    ||
  399. ||  ||                                ||
  400. ||  ||           file size in sectors-^^
  401. ||  ||
  402. ||  ^^-00 = file active  Other values (e.g 03) = User #
  403. ||     E5 = file erased
  404. ^^-displacement of line in directory sector
  405.  
  406. Second line -
  407.  
  408. 50  33343536 3738393A  00000000 00000000  *3456789:........*
  409.     |                       |   |
  410.     |                       |   ^- allocation groups
  411.     ^-----allocation group numbers-----^    just happened
  412.                         to be printable
  413.  
  414.  
  415. 4.2    DOUBLE DENSITY
  416. ===
  417.  
  418. The following is a sample of FSID.COM running on double
  419. density system:
  420.  
  421. :FSID.COM
  422. 00  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  423. 10  38003900 3A003B00  00000000 00000000  *8.9.:.;.........*
  424. G=0000:00, T=2, S=1, PS=0
  425.  
  426. The primary difference is that the groups now occupy
  427. 2 bytes, i.e. "38 00" "39 00" ...  This follows the INTEL
  428. and CP/M convention of putting 16 bit values high-byte-first.
  429. Thus it means group 0038, 0039, etc.
  430.  
  431. Note that in double density, each group stood for 2K, not 1K,
  432. so there were half as many groups for the same file.
  433.  
  434. Be VERY careful when patching a directory under double density.
  435. I once made the mistake of putting, for example:
  436.  
  437.     ch10,38,39,3a,3b...
  438.  
  439. When I went to read this file, it tried to access group 3938,
  440. with resultant angry exclamations from the disk stepper as it
  441. attempted to go south to Peoria for the data.
  442.  
  443.                     10/23/81 Ward C.
  444.