home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / a / du86plus.arc / DU86.DOC < prev   
Encoding:
Text File  |  1990-11-30  |  12.6 KB  |  339 lines

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