home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol074 / cpack.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  11.3 KB  |  278 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.              CPACK - UTILITY PROGRAMS FOR CP/M
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                       Copyright (C) 1980
  14.                          FBN Software
  15.                       24 Mistral Avenue
  16.                       Mosman  NSW  2088
  17.  
  18.          Permission is granted to copy this  document 
  19.          and the associated programs for all purposes 
  20.          with  the  exception  of  resale  for profit
  21.  
  22.  
  23. NOTE
  24.  
  25. You  may find that the file BACKUP mentioned in this  document 
  26. has  been  renamed  BCKUP  on  this disk  in  order  to  avoid 
  27. confusion with another program with a similar name.
  28.  
  29.  
  30. PACKAGE DESCRIPTION
  31.  
  32.  
  33.      CPACK  is a package of utility programs designed for  use 
  34. with  the  CP/M operating system.   It contains  a  number  of 
  35. programs  designed  to  make  use of  the  system  easier,  in 
  36. particular  for those systems using a single disk drive  which 
  37. are  not  well  catered  for by the CP/M  software  as  it  is 
  38. distributed.
  39.  
  40.  
  41.      The following programs are included in the package:
  42.     BACKUP - Disk copier
  43.     COMPARE - File comparison utility
  44.     COPY - File copier
  45.     RESTORE - File recovery program
  46.     SORTDIR - Directory sorter
  47.  
  48.  
  49.     (CP/M is a trademark of Digital Research, PO Box 579,
  50.             Pacific Grove, California, 93950, USA)
  51.  
  52.  
  53. OVERVIEW
  54.  
  55.      On the following pages, the CP/M command lines applicable 
  56. to each program are listed,  followed by a description of  the 
  57. program  operation  and use.  THe general comments  below  are 
  58. applicable to  all programs.
  59.  
  60.      Disk  prompts:   All programs prompt the operator  for  a 
  61. possible  disk  change prior to  commencing  execution.   This 
  62. allows  use  of a single disk for utility programs and  avoids 
  63. the  requirement to have a copy of commonly used  programs  on 
  64. each  disk.   BACKUP,  COPY  and COMPARE also prompt  for  the 
  65. necessary  changes during operation.   The prompt calls for  a 
  66. carriage return (<CR>) and this character will cause execution 
  67. to continue.  Control-C  in response to a prompt will cause an 
  68. immediate warm boot.   All other responses are ignored.  If no 
  69. disk change is required, simply depress <CR>.
  70.  
  71.      Program  termination:  With the exception of BACKUP,  all 
  72. programs  return  to CP/M on  termination  without  rebooting. 
  73. This  avoids system crashes when using disks without a  system 
  74. copy on tracks 0 and 1.   BACKUP overwrites the CP/M system in 
  75. order  to  provide  the largest possible memory buffer  and  a 
  76. reboot is therefore necessary. Before terminating, the program 
  77. issues a disk change prompt. 
  78.  
  79.      Drive Selection:  None of the programs attempts to access 
  80. any drive other than the one currently logged in by CP/M.   In 
  81. a  single  drive  system,   this  will  be  drive   A.    COPY 
  82. specifically   calls  the  'Reset  BDOS'  CP/M  entry  and  is 
  83. therefore useable only in drive A.  However,  if you have more 
  84. than one drive, there are easier ways to perform a file copy!
  85.  
  86.      Logged  Disk:  All programs which write on a  disk  leave 
  87. the  one  in the drive on termination as the currently  logged 
  88. disk.    This  will  be  in  Read/Write  mode  (unless  it  is 
  89. physically write protected).   COMPARE, which reads disk files 
  90. only, does not alter the currently logged disk.
  91.  
  92.      Use  of CBIOS:  BACKUP,  SORTDIR and RESTORE all directly 
  93. access  the CBIOS  to perform some I/O  operations.   This  is 
  94. necessary  in the case of BACKUP to provide the maximum buffer 
  95. space and of the other two to allow direct access to the  CP/M 
  96. disk  directory.   In standard CP/M systems this will cause no 
  97. problems but difficulties may be encountered in systems with a 
  98. non-standard CBIOS jump vector.
  99.  
  100.      Directory  access:   Both  RESTORE  and  SORTDIR  conduct 
  101. operations  on  the CP/M Disk Directory.   Version 1.4 of  the 
  102. CP/M system uses a standard directory structure with up to  64 
  103. entries  of 32 bytes each and this is the structure assumed by 
  104. the programs.   Version 2.2 allows different structures, which 
  105. may vary between different drives of the same system.  Neither 
  106. of  the programs should be used with Version 2.2  CP/M  unless 
  107. you  are  sure  that  your system is  using  the  Version  1.4 
  108. compatible structure.
  109.  
  110.  
  111.  
  112. A>BACKUP
  113.  
  114.      BACKUP is a program for making backup copies of an entire 
  115. diskette on a single drive system.
  116.  
  117.         BACKUP   prompts  the  user  to  insert   source   and 
  118. destination disks.  The disk contents are copied on a track to 
  119. track basis, buffered in memory.  BACKUP automatically adjusts 
  120. the  size  of the memory buffer to the maximum allowed by  the 
  121. host  system.   In  a  56K system an  8  inch  single  density 
  122. diskette can be backed up in five passes.
  123.  
  124.      On  completion of the transfer,  the program asks whether 
  125. another  disk is to be backed up.  If the answer is  yes,  the 
  126. operation  repeats,  otherwise the operator is prompted for  a 
  127. command to return to  CP/M.
  128.  
  129.  
  130.  
  131. A>COPY <sourcefile> <destfile>
  132. A>COPY <sourcefile>
  133. A>COPY
  134.  
  135.      Copy  is  a program to simplify disk to  disk  copies  of 
  136. files in CP/M systems having a single drive.  It operates in a 
  137. somewhat similar manner to the CP/M supplied utility PIP,  the 
  138. disk file copying  routines of which are not usable in  single 
  139. drive systems.
  140.  
  141.      COPY  operates by buffering the file into memory and then 
  142. prompting  for a disk change before dumping the file onto  the 
  143. new  disk.   The buffer size is automatically adjusted to  the 
  144. TPA  area available under the CP/M system in use and for  long 
  145. files,  the  program  prompts for the necessary  disk  changes 
  146. caused by the requirement to transfer the file in two or  more 
  147. buffer loads.
  148.  
  149.      The  single  copy  version of the program is  invoked  by 
  150. either  of  the  first two command lines  listed  above  where 
  151. <sourcefile>   and  <destfile>  are  unambiguous  file   names 
  152. complying with the CP/M syntax.  If <destfile> is omitted,  it 
  153. is  assumed  to  be  the same as  <sourcefile>  and  the  file 
  154. transferred to the new disk has the same name as the original. 
  155. On completion of the transfer,  the program returns control to 
  156. the CP/M Console Command Processor (CCP) without rebooting the 
  157. system.   The logged-in disk is the one to which the  transfer 
  158. was made.
  159.  
  160.      If  both  file names are omitted,  then COPY  enters  the 
  161. multiple  copy mode and responds with a prompt character ('*') 
  162. and commands may be entered in the following form:  
  163.  
  164.      *<sourcefile> <destfile>
  165.  
  166.      Omission  of  <destfile> has the same effect  as  in  the 
  167. single  copy mode.   On completion of each transfer the prompt 
  168. is  re-issued and further transfers may be made.   Control  is 
  169. returned  to  the  CCP by typing <return>  after  the  prompt. 
  170. Control  may  be  returned at any time by  typing  <^C>  which 
  171. causes a warm boot. 
  172.  
  173.      During the transfer,  COPY initially creates a  temporary 
  174. file  'COPY.$$$'  on  the  destination  disk.   On  successful 
  175. completion  of the transfer,  any file on the destination disk 
  176. having  the same name as <destfile> is erased and COPY.$$$  is 
  177. renamed <destfile>.  Note that COPY may be used to duplicate a 
  178. file  on  the same disk merely by leaving  the  original  disk 
  179. inserted  before responding to the prompt.   In this case  the 
  180. <sourcefile>  and <destfile> must have different names or  the 
  181. original file will be deleted.
  182.  
  183.  
  184.  
  185. A>COMPARE <sourcefile> <compfile>
  186.  
  187.       COMPARE  carries out a byte for byte comparison  between 
  188. two  files.    If  any  difference  is  found,  the  following 
  189. information is presented on the console: 
  190.       The record number in the file
  191.       The byte number within the record
  192.       The ASCII and hex values of the differing bytes
  193.  
  194.       If  the  files are of differing lengths,  this  fact  is 
  195. reported  but  the 'overlapping' bytes are not listed.  If  no 
  196. differences  are  detected,  a 'Files  Identical'  message  is 
  197. issued.
  198.  
  199.      COMPARE  operates  in a somewhat similar manner to  COPY, 
  200. buffering   <sourcefile>   into  memory  and   then    reading 
  201. <compfile>  record by record for the comparison.  Disk  change 
  202. prompts are issued as necessary, as described for COPY.
  203.  
  204.       If   the   files  to  be   compared   have   substantial 
  205. differences, the listing of differing bytes at the console may 
  206. be  excessively long.   To avoid waiting,  the program may  be 
  207. terminated by typing a space at the console. 
  208.  
  209.  
  210.  
  211. A>RESTORE <filename>
  212. A>RESTORE <filename> n
  213.  
  214.           *****************************************
  215.           *        WARNING - USE WITH CP/M        *
  216.           *   VERSION 1.4 COMPATIBLE DISKS ONLY   *
  217.           *****************************************
  218.  
  219.      RESTORE  is  a program to recover CP/M files  which  have 
  220. been  inadvertently  ERAsed.   CP/M erases files by setting  a 
  221. byte  in their disk directory entry,  the actual file data  is 
  222. not erased but merely becomes  eligible for being overwritten. 
  223. RESTORE resets the byte, making the file once again useable.
  224.  
  225.      Use  with  long  files:  CP/M files with  more  than  128 
  226. records  have more than one directory entry.   The second  and 
  227. subsequent  entries describe extensions of the file,  each  of 
  228. 128  records  or less.   The second form of the  command  line 
  229. above allows extension n of the file to be recovered,  where n 
  230. is a hex digit.  (RESTORE <filename> 0 means exactly the  same 
  231. as  RESTORE <filename>).  To restore a long  file,  successive 
  232. calls  to RESTORE should be made,  with n increasing,  until a 
  233. 'Not found' message results.
  234.  
  235.      WARNING: Restore can have some strange and  unpredictable 
  236. effects  if it  is  not used properly.  It should only be used 
  237. after  a file has been erased and before any other  operations 
  238. affecting  the disk directory (such as  SAVE,  Editing,  COPY, 
  239. etc) have been carried out.  The reason for this is that these 
  240. operations  may  have utilised part of the disk space  of  the 
  241. ERAsed file.
  242.  
  243.      Similarly,   RESTORE   only  restores  the  first  erased 
  244. filename  it finds which matches the name  specified.  If  you 
  245. have  been  doing a lot of editing or other work there may  be 
  246. more  than  one  erased  'edition'  of  the  file.  After  use 
  247. therefore,   the file should be  carefully checked.   If it is 
  248. not the correct one, it can be RENamed, ERAsed  again and then 
  249. RESTORE  reinvoked  to find the right copy.   Note  that  this 
  250. situation can be avoided by periodic use of SORTDIR.
  251.  
  252.  
  253.  
  254. A>SORTDIR
  255. A>SORTDIR *
  256.  
  257.           *****************************************
  258.           *        WARNING - USE WITH CP/M        *
  259.           *   VERSION 1.4 COMPATIBLE DISKS ONLY   *
  260.           *****************************************
  261.  
  262.      SORTDIR  is a program which will sort the disk  directory 
  263. into  alphabetical order,  either by filename or by file  type 
  264. (ASM,  COM, etc) and name. The second command line above sorts 
  265. by file type. 
  266.  
  267.      In addition to sorting the directory, SORTDIR also tidies 
  268. the  directory entries by completely deleting all ERAsed files 
  269. and  all zero length files.  These files have  their  complete 
  270. directory entries overwritten.   Use of SORTDIR is recommended 
  271. after RESTORE has been used and all files have been checked.
  272.  
  273.      Note that RESTORE will not work immediately after SORTDIR 
  274. has  been  used because all ERAsed file names will  have  been 
  275. completely deleted from the directory.
  276.  
  277.  
  278.