home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / dskutl / sodu82.lbr / DU-V87.DQC / DU-V87.DOC
Text File  |  1985-12-09  |  11KB  |  341 lines

  1.                   DU-V87.DOC
  2.                   ----------
  3.  
  4.         By Ward Christensen (revised 05/14/84)
  5.      additional notes by Ron Fowler, Irv Hoff, and Jeffrey Nonken
  6.  
  7. This version of DU is compatible with CP/M 1.4, 2.x and 3.x and does not
  8. require alteration for various hardware configurations.  It adjusts itself
  9. automatically to the correct number of sectors, tracks, directory size, etc.
  10.  
  11.  
  12.                  INDEX
  13.  
  14.            1.0       INSTALLATION:
  15.            2.0       USE:
  16.            2.1       COMMANDS, BY FUNCTION
  17.            2.2       ALPHABETIC COMMAND SUMMARY
  18.            3.0       NOTES
  19.            4.0       INTERPRETATING DIRECTORY DATA
  20.            4.1       SINGLE DENSITY
  21.            4.2       DOUBLE DENSITY
  22.  
  23.  
  24.  
  25. 1.0    INSTALLATION:
  26. ===
  27.     "DU" should require no changes to the source file because of the
  28. use of the automatic adaption feature.    The only alteration that needs to
  29. be done is to use DDT to set the byte at 103H for your clock speed.  Use
  30. 0 for 2MHz, 1 for 4MHz, 2 for 6MHz.  (This only affects the "Z" SLEEP
  31. command.)
  32.  
  33.  
  34. 2.0    USE:
  35. ===
  36.     To invoke "DU", simply enter "DU" at the CP/M prompt.
  37.  
  38.     A>DU
  39.  
  40.     An initial command string may optionally be placed as an operand of
  41. the original "DU" command, i.e.:
  42.  
  43.     A>DU M;X
  44.  
  45. for example, if you want to only map the disk, and then exit:
  46.  
  47.  
  48.     Once "DU" is running, it expects single-letter commands much like
  49. "SID" OR "DDT".  For ease of use, multiple commands may be placed on one
  50. line, separated by ";".  In addition, a given command or string of commands
  51. may be repeated -- either indefinitely (until ^C is pressed) or a given
  52. number of times.
  53.  
  54.     To avoid an accidental ^C from dropping out of "DU", only the
  55. explicit "X" command will exit "DU".
  56.  
  57.  
  58. 2.1    COMMANDS, BY FUNCTION
  59. ===
  60.  
  61. HELP:
  62.     ?     displays the help guide
  63.  
  64. POSITIONING:
  65.  
  66.     Gnn    by allocation group
  67.     Snn    by sector
  68.     Tnn    by track
  69.     +nn    going ahead nn sectors
  70.     -nn    going back nn sectors
  71.  
  72. I/O:
  73.     <    puts current sector "away" into a buffer
  74.     >    recalls previously saved sector
  75.     K    writes "yanked" sectors to a file
  76.             (see "saving sequential memory" in notes below)
  77.     R    reads sector
  78.     W    writes sector
  79.     Y    "yanks" current sector into sequential memory
  80.  
  81. DISPLAYING:
  82.  
  83.     #    shows disk parameters
  84.     A    dump sector in ASCII
  85.     D    dump the sector (hex + ASCII)
  86.     G    shows current group, track, sector
  87.     H    dump sector in hex
  88.     M    maps the disk -- where the files are located
  89.     Mxx    map starting at group xx
  90.     Vnn    views (like CP/M type) nn sectors
  91.  
  92. CHANGING:
  93.  
  94.     CAnn,VAL change data in ASCII (with <xx> escape to hex)
  95.     CHnn,VAL change data in hex
  96.     Unn     change user to nn
  97.  
  98. SEARCHING:
  99.  
  100.     =Abc    scan for Abc (IN ASCII) from current sector on (very
  101.             slow, allow up to 15 minutes to scan an entire disk.
  102.             Either finds the answer or says: "out of bounds".
  103.     FNAME    find a file in the directory
  104.     F    find next occurrence (extent) of same name
  105.  
  106. MISC:
  107.     (    toggles the map display to show/not show erased files
  108.     /nn    repeat previous command nn times  (repeats indefinitely
  109.             if nn omitted)
  110.     Bnn    boot nn sectors per track
  111.     LX    log in disk X
  112.     P    printer toggle
  113.     Q    before a command does it "quietly"
  114.     X    exit to CP/M
  115.     Znn    sleep (nn tenths of a second) to allow viewing data
  116.             before it scrolls off
  117.  
  118. 2.2    ALPHABETIC COMMAND SUMMARY
  119. ===
  120.  
  121.     #    Prints the disk parameters
  122.     +    Advance 1 sector (if below track 2, this advances to
  123.             next numerical, if 2 or more, advances based on
  124.             CP/M"s normal sector scrambling algorithm, i.e.,
  125.             allows + to the next logical sector of the file.
  126.     -    backs up 1 logical sector
  127.             NOTE:  + and - may take an amount:    For example,
  128.                +15 advances 15 sectors
  129.     /    repeats entire command -- defaults to "forever"
  130.     /nn    nn may be 2 TO 65535
  131.     (    toggles the map display to show/not show erased files.
  132.             When showing erased files "*" indicates that block
  133.             duplicates a block in another file.  It may not be
  134.             possible to restore this program without errors.  If
  135.             there are no "*" in this complete file, it can be
  136.             correctly restored.
  137.     <    saves current sector in a "save" buffer
  138.     =Abc    ASCII search, starting at current sector.  <xx> hex
  139.             may be imbedded or used alone.  To find the ASM
  140.             instruction: "IN 0FEH"
  141.             use:  =<DB><FE>  (Ignores bit 7 unless using <xx>.)
  142.             Since ";" is a command delimiter, you have to use
  143.             <3B> to search for a ";".  Also, since "<" is a hex
  144.             escape character, use << to mean a single "<".
  145.  
  146.             NOTE:  This is a very slow routine.  It can take 15
  147.                minutes or longer to search an entire double-
  148.                density double-sided disk so be patient.  It
  149.                either finds the string or says:  "OUT OF
  150.                BOUNDS".
  151.     >    gets saved buffer.  < and > may be used to move
  152.              a sector to another place.
  153.     ?    displays the help guide
  154.     A    dump sector (ASCII only)
  155.     Bnn    boot nn sectors per track -- not all disks have 26.
  156.     CHADDR,VAL,VAL,VAL...    change hex values in sector
  157.     CAADDR,CHAR STRING...    change ASCII calues in sector
  158.             NOTE:  <xx> may be hex imbedded in the ASCII
  159.                string:  CA00,OK<0D><0A><1A>
  160.             ---->  W writes changes to disk
  161.                note that the "C" command echoes the over-
  162.                laid data for verification.
  163.     CHADDR-ADDR,BYTE    repeats a change
  164.     CAADDR-ADDR,BYTE    repeats a change
  165.     D    dump sector (hex + ASCII)
  166.     FNAME    print directory for file "NAME", then positions to
  167.             its directory sector.
  168.     F    find next occurrence of name in directory
  169.     Gnn    position to group nn and read
  170.     G    shows current position
  171.     H    dump sector, hex only
  172.     Kdu:filename.ext   save a file from "yanked" sectors.
  173.             drive, user are optional.  Resets "yank" address.
  174.             see "saving sequential memory" in notes below.
  175.     L    re-logs in the current disk -- you may pull out a
  176.             disk, put in a new one, and "L" just to log it in.
  177.             (see "logging in disk" in notes below)
  178.     LX    logs in disk "X", such as: LB, LC, LA, etc.
  179.     M    dumps a map of the group allocations for files
  180.     Mn    shows which file is allocated to group "N"
  181.     N    resets CP/M via BDOS -- this may make it possible under
  182.             some implementations of CP/M to change the disk
  183.             format, i.e., density, sides, etc.
  184.     P    toggles the printer on/off
  185.     Q    quiet -- preceedintg any command, suppresses CRT output
  186.     R    reads into memory the sector currently positioned at.
  187.             NOTE:  "R" (read) is implicit in the G, +, and -
  188.                commands but NOT in the "S" and "T" commands
  189.     Snn    position to sector nn, and read
  190.     TNN    seek to track nn (no read)
  191.     Ux    logs user "x" for next "F" command
  192.     V    views the current sector -- assumes ASCII data
  193.     Vnn    views nn sectors
  194.     W    writes the current sector to disk
  195.             NOTE:  may NOT be used after an "F" command as
  196.                CP/M was used to find file in the directory
  197.     X    exit back to CP/M (must press return).    ^C was too
  198.             easy to hit over modem lines -- requires two bytes:
  199.             (X,CR) to exit.
  200.     Y    "yank" the current sector into sequential memory
  201.             (starts at 3000H, increments for each yank)
  202.     Z    sleep -- causes the porgram to pause -- such as to look
  203.             at a dump.    Z is 1 second
  204.     Znn    nn tenths of a second    Z50 = 5 seconds
  205.  
  206.  
  207. 3.0    NOTES
  208. ===
  209.  
  210. * Multiple commands:  May be separated by ";"
  211.  
  212. EXAMPLE:  The following commands will erase the B: disk directory to all
  213.       E5"s:
  214.  
  215.  
  216.     LB         log in B: drive
  217.     G0         position to directory
  218.     CH0-7F,E5     fill with E5
  219.     <         save the sector
  220.     >;W;+;/16     restore, write, next, repeat 16
  221.  
  222.  
  223. ---- this could be shortened to:
  224.  
  225.  
  226.     LB;G0;CH0-7F,E5;<
  227.     >;W;+;/16
  228.  
  229.  
  230. * DUMP COMMANDS:  All dump commands (D, A, H) may be optionally followed
  231.           by a starting and ending address:
  232.  
  233.     D0,7F         the same as just "D"
  234.     D3,5
  235.     A20,3F
  236.  
  237.  
  238. * LOGGING IN DISK:  If you have a disk with a "blown directory", try
  239. logging in a good disk of the same density, then put in the "blown" disk
  240. without logging it in.    You are opening yourself to possible problems
  241. because of the buffering of physical sectors in the "BIOS".  The best
  242. technique, (but not guaranteed), would be to seek to the unused inner
  243. tracks of the first disk, do the read, then change disks.  That way, if it
  244. writes anything, you won"t have destroyed anything -- assuming the disk is
  245. not completely full. Another technique (assuming the second disk does not
  246. contain a CP/M system, would be to seek to track 1, do the read there,
  247. then change disks to the blown one.
  248.  
  249.  
  250. * SAVING SEQUENTIAL MEMORY:
  251. Since CP/M v 3.0 does not have a SAVE function, one has been added.
  252. Syntax is:
  253.     Kdu:filename.ext
  254.     ^^^     ^     ^
  255.     |||     |     +-- file extension (0-3 characters)
  256.     |||     +-------- file name (1-8 characters)
  257.     ||+--------------- user # (or none)
  258.     |+---------------- drive designation (A-P or none)
  259.     +----------------- DU command
  260.  
  261. Drive and user may be omitted.    If so, omit the colon as well.    Drive must
  262. be specified if the user is.  If the user # is omitted, the current user is
  263. used.  If the drive is omitted, the current CP/M default drive is used.
  264.  
  265. This function saves the current contents of sequential memory into a disk
  266. file.  The contents of sequential memory are determined by the "yank"
  267. function, and the pointer of that function is used here.  If nothing has
  268. been yanked, you get an error.    Once the file has been saved, the "yank"
  269. pointer is re-initialized to its original value (3000H).  Control is re-
  270. turned to DU.
  271.  
  272.  
  273. 4.0    INTERPRETATING DIRECTORY DATA
  274. ===
  275.  
  276. 4.1    SINGLE DENSITY
  277. ===
  278.  
  279.     The following explains the format of a CP/M directory entry as
  280. shown by "DU", using either the "F" (find file) command, or just doing "D"
  281. (dump) of the directory sectors, which are located in groups 0 and 1 on a
  282. single-density disk.
  283.  
  284.  
  285. SAMPLE RESULT OF "FSID.COM" COMMAND:
  286.  
  287. 40  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  288. 50  33343536 3738393A  00000000 00000000  *3456789:........*
  289.  
  290.  
  291. FIRST LINE -
  292.  
  293. 40  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  294. ||  |||               | ||    ||    |          |
  295. ||  ||^---hex file name/type--^ ||    ||    ^file name^
  296. ||  ||                ||    ||     in ASCII
  297. ||  ||             extent-^^    ||
  298. ||  ||                      ||
  299. ||  ||         file size in sectors-^^
  300. ||  ||
  301. ||  ^^-00 = file active  other values (E.G 03) = user #
  302. ||     E5 = file erased
  303. ^^-displacement of line in directory sector
  304.  
  305.  
  306. SECOND LINE -
  307.  
  308. 50  33343536 3738393A  00000000 00000000  *3456789:........*
  309.     |                       |   |
  310.     |                       |   ^- allocation groups
  311.     ^-----allocation group numbers-----^     (just happened to
  312.                          be printable)
  313.  
  314.  
  315. 4.2    DOUBLE DENSITY
  316. ===
  317.     The following is a sample of "FSID.COM" running on a double-
  318. density system:
  319.  
  320. :FSID.COM
  321. 00  00534944 20202020  20434F4D 0000003A  *.SID     COM...:*
  322. 10  38003900 3A003B00  00000000 00000000  *8.9.:.;.........*
  323. G=0000:00, T=2, S=1, PS=0
  324.  
  325.  
  326.     The primary difference is that the groups now occupy 2 bytes, i.e.,
  327. 38 00" "39 00" ...  this follows the Intel and CP/M convention of putting
  328. 16-bit values high-byte-first.    This it means group 0038, 0039 etc.
  329.  
  330.     Note that in double-density, each group stood for 2k not  1K, so
  331. there were half as many groups for the same file.
  332.  
  333.     Be very careful when patching a directory under double-density.
  334. For exmaple:
  335.  
  336.     CH10,38,39,3A,3B...
  337.  
  338.     This might try to access group 3938 with resultant angry noise
  339. from the disk stepper as it attempts to find where it should go for the
  340. data.
  341.