home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / arc / nusq110.lzh / NUSQ110.DOC < prev   
Text File  |  1986-03-04  |  20KB  |  491 lines

  1.  
  2.  
  3.  
  4.           NUSQ - File unsqueeze utility
  5.  
  6.           Documentation for CP/M-86 and MS-DOS
  7.      versions 1.11 (CP/M-86), 1.10 & 1.10D (MS-DOS)
  8.          Cliff Sharp   October 21, 1984
  9.  
  10.                DOCUMENTATION TOPICS
  11.  
  12.     OVERVIEW            IN CASE OF TROUBLE
  13.     COMMAND MODE            PROGRAM MESSAGES
  14.     INTERACTIVE MODE        ANNOUNCEMENT
  15.     INSTALLATION             HISTORY
  16.  
  17.  
  18.  
  19.                 OVERVIEW
  20.  
  21.      NUSQ  is  a  utility for expanding squeezed files    to  their
  22. original uncompressed state.   Two separate versions of NUSQ  are
  23. available,  one  for  CP/M-86  and one for the    MS-DOS    operating
  24. system.
  25.  
  26.      NUSQ has two operating modes.  In the command mode, a single
  27. instruction to NUSQ is passed from the command line which invokes
  28. NUSQ.  The command mode requires less effort to use when you have
  29. only  one file to unsqueeze,  or when the names of the files  you
  30. wish  to unsqueeze can all be specified by one    "wildcard"  name.
  31. However,  when    you  have more than one file to unsqueeze  and    a
  32. "wildcard" won't do the job right,  or when the files you want to
  33. unsqueeze are on more than one disk,  the interactive mode allows
  34. you to specify only those files which you want processed, without
  35. reloading the program every time.   In the interactive mode, NUSQ
  36. executes one command, then waits for another.
  37.  
  38.      MS-DOS versions of NUSQ including and subsequent to 1.10 can
  39. use date and time information encoded in files squeezed with NSQ.
  40. This  means  that  a file squeezed with NSQ, 'modemed' to another
  41. location, and unsqueezed with NUSQ  (version  1.10D  or  greater)
  42. will  retain  the date and time of ORIGIN instead of DESTINATION.
  43. NSQ encodes this information at the END of the squeezed file,  so
  44. such files retain compatibility with earlier unsqueeze programs.
  45.  
  46.      See the installation section of this document for details on
  47. how  to  implement this feature in NUSQ.  Any files squeezed with
  48. NSQ (versions 2.01 or higher) will have the  necessary  date  and
  49. time information encoded in them.
  50.  
  51.  
  52.               COMMAND MODE
  53.  
  54.      To unsqueeze only one file, the command mode invocation
  55.  
  56.             A>nusq nerts.aqm
  57.  
  58. will unsqueeze the file NERTS.AQM.  You don't need to specify the
  59. name of the output file (in fact, you can't); the name was stored
  60. within    the file at the time it was squeezed,  and that name will
  61. be  used  to  create  the new file.   (If you  want  to  name  it
  62. differently after you have unsqueezed it,  use the REName command
  63. when NUSQ is finished.)
  64.  
  65.      You  can  unsqueeze all squeezed files on a single  disk  by
  66. issuing the command
  67.  
  68.               A>nusq *.?q?
  69.  
  70. Theoretically at least,  all file squeezers create an output file
  71. whose name is the same as that of the original file,  except that
  72. the  filename extension field is modified by changing the  middle
  73. letter to a "Q".  (If a file has no filetype, a 'QQQ' is appended
  74. for  the file type for the encoded file.   When a file    has  been
  75. renamed  after    being  squeezed,  this    might not  be  the  case;
  76. hopefully,  the  person who renamed it remembered the "Q".)   The
  77. "wildcard" file specification shown above tells NUSQ to unsqueeze
  78. any  file it finds (on the default disk) which has a "Q"  in  the
  79. filename  extension;  that  should  get NUSQ to  unsqueeze  every
  80. squeezed  file on the disk.   NUSQ will display the name of  each
  81. file it finds, and the name of the output file it produces, as it
  82. proceeds:
  83.  
  84.           NERTS.AQM -> NERTS.ASM
  85.           ORGPLOTZ.DQC -> ORGPLOTZ.DOC
  86.  
  87.      Because  NUSQ checks the first two bytes of each input  file
  88. for a valid Squeeze Signature (0FF76 hex), it is possible to say:
  89.  
  90.                 nusq *.*
  91.  
  92. and  get the same results as with "nusq *.?q?".   It  is  faster,
  93. however,  to use the *.?q? method, as that will preclude a lot of
  94. unnecessary file openings.
  95.  
  96.     NUSQ  will also accept more than one filename on the  command
  97. line:
  98.  
  99.           A>nusq nerts.aqm orgplotz.dqc frop.cq
  100.  
  101.      To  use a different disk for output than for input,  end the
  102. command line with just the drive designation. Example:
  103.  
  104.               A>nusq giggle.tqt b:
  105.  
  106. will  write the output file (ostensibly GIGGLE.TXT) on drive  B:.
  107. You will find that NUSQ is very forgiving, as:
  108.  
  109.               A>nusq b: giggle.tqt
  110.  
  111. will accomplish the same thing.  (Note the space between 'b:' and
  112. 'giggle'!)
  113.  
  114.  
  115.  
  116.              INTERACTIVE MODE
  117.  
  118.      Let's  suppose now that you have a large number of  squeezed
  119. files on your disk,  and you only want to unsqueeze some of them.
  120. Unless    you  can specify only those files by using  a  "wildcard"
  121. name,  you'll  probably  find it easier to achieve your  goal  by
  122. using  the interactive mode of NUSQ.   Another instance where  it
  123. would  be easier to use interactive mode is one where  the  files
  124. you wish to unsqueeze are on more than one disk, in more than one
  125. drive.    The command
  126.  
  127.                  A>nusq
  128.  
  129. displays the startup message, then prompts for command input with
  130. an asterisk ("*").
  131.  
  132. NUSQ  Version x.xx
  133. Dave Rand, Paul Homchick and Cliff Sharp  xx/xx/xx
  134. Use: NUSQ afn [afn afn ...] [destination drive:]
  135. *_
  136.  
  137. (The underline shows the cursor position; my name appears only in
  138. the  MS-DOS  version.)     At the asterisk,  you    type  a  filename
  139. ("wildcards"  are allowed here,  too).     NUSQ will unsqueeze  the
  140. file,  then  print  the asterisk prompt again and wait    for  more
  141. commands.   When  you're finished and want to exit NUSQ,  a blank
  142. line or ^C will return you to the operating system.
  143.  
  144.      As  distributed,  NUSQ  won't write over  an  existing  file
  145. without  the user confirming the operation.   Something very like
  146. the following will happen:
  147.  
  148.       A>nusq foo.bqr
  149.  
  150.       nusq: FOO.BQR -> FOO.BAR already exists,
  151.         Overwrite <Y>es, <N>o? overwriting...
  152.  
  153. In this case the user answered "Y" at the question mark, and NUSQ
  154. went  ahead  with the operation.   If "N" is  the  response,  the
  155. unsqueeze  operation is aborted,  and the program goes on to  the
  156. next item in the list (or exits, if the list is empty).
  157.  
  158.  
  159.  
  160.               INSTALLATION
  161.  
  162. Two user-configurable options are provided:  Confirm Before Over-
  163. write, and Select Date Option.
  164.  
  165. As  distributed,  NUSQ    v1.04 will ask    for  confirmation  before
  166. overwriting  a file,  and will use the current date and time when
  167. creating the output file.
  168.  
  169. If  you  would rather have NUSQ write over  existing  files  with
  170. wanton abandon,  without pausing and asking for confirmation, use
  171. DEBUG.COM to patch location 0103H to be 00H instead of 0FFH.   An
  172. example of this patch:
  173.  
  174.           A>debug b:nusq.com
  175.           -e103
  176.           xxxx:0103 FF.00
  177.           -w
  178.           Writing YYYY bytes
  179.           -q
  180.  
  181.           A>
  182.  
  183.  
  184. Select Date Option allows you four choices for the way the output
  185. file is dated.    As distributed, NUSQ will date the output file in
  186. the same manner as most other programs do, i.e. the date and time
  187. shown  in  directory displays will be the date and time at  which
  188. you unsqueezed the file.   You may change this option by changing
  189. the  byte  at  location  0104H (which you can  do  by  using  the
  190. instructions above and the values you will see in a moment, using
  191. the  instructions  shown  above  but  substituting  104  for  103
  192. wherever  103  appears).   Copies of NUSQ patched in this  manner
  193. will display a 'D' after the version number,  signifying that the
  194. input file date option has been enabled, i.e. "1.10D".
  195.  
  196. The available options are:
  197.  
  198.      0) Leave it to DOS
  199.      1) Output file gets the same date/time as the input file
  200.      2) If the squeezed file contains the special date/time
  201.       signature inserted by NSQ at squeeze time, use the
  202.       date/time contained in that signature: otherwise,
  203.       use the current date/time
  204.      3) If the squeezed file contains the special date/time
  205.       signature inserted by NSQ at squeeze time, use the
  206.       date/time contained in that signature: otherwise,
  207.       use the same date/time as the input file
  208.  
  209.  
  210. If you would like the unsqueezed file to retain the same date and
  211. time  shown for the input file (option 1),  patch 0104H  to  0FH. 
  212. For option 2,  patch 0104H to 0F0H;  for option 3, patch 0104H to
  213. 0FFH.
  214.  
  215. Following is a table that trys to explain these options:
  216.  
  217. option   value    use current   use input file    use encoded 
  218.  
  219. 0.        00         yes             -               -
  220. 1.        0F          -             yes              -
  221. 2.        F0          -              -              yes
  222. 3.        FF          -        do this second   try this first
  223.  
  224. There  is  a reason for our distributing NUSQ with the    date/time
  225. options  disabled.   If  you have a backup utility (usually  this
  226. applies  to  a "hard" disk) that uses the file date and  time  to
  227. determine  whether  or    not a file should be  backed  up,  it  is
  228. possible  that    using the input file date could cause loss  of    a
  229. file  by  having  an 'old' date on a 'new'  file,  and    losing    a
  230. backup.  If you are unsure whether this applies to you, leave the
  231. date/time options unchanged until you can find out.
  232.  
  233.  
  234.  
  235.                IN CASE OF TROUBLE
  236.  
  237.      First,  no  matter HOW sure you are that you're doing things
  238. correctly,  try another method of using NUSQ.    If you tried com-
  239. mand mode without luck,  try the interactive mode; if you were in
  240. the interactive mode when it bombed, try command mode.    Make sure
  241. you try at least one command that is just like one shown in  this
  242. document  (but,  of course,  use the name of your file instead of
  243. NERTS or ORGPLOTZ) before you conclude that things are awry.
  244.  
  245.      Occasionally,  for one reason or another,    it's possible  to
  246. get a bad copy of a program or file; transmission errors and disk
  247. errors    have  been  known to cause many problems.   (If  you  can
  248. successfully unsqueeze at least one squeezed file,  you  probably
  249. have  a good copy of the program;  if so,  your copy of the  file
  250. you're  trying to unsqueeze may be the culprit.)  The best way to
  251. tell  if  this is the case is to use a utility like CRCK  on  the
  252. original copy of the offending file/program, and on your copy; if
  253. the numbers you get don't match,  you most likely have a bad copy
  254. of the file/program you checked and should obtain another copy of
  255. it.  (Check the new copy, too, when you get it.)
  256.  
  257.      This  may sound silly,  but do you have the correct  version
  258. for your operating system?  If you try to run the CP/M-86 version
  259. under  MS-DOS,    strange things may happen;  same for  the  MS-DOS
  260. version under CP/M-86.    Also, try using TYPE to actually type the
  261. executable  file  on  your screen;  you'll most  likely  see  the
  262. author's  name.   (See the history later in this document to  see
  263. who wrote what.)
  264.  
  265.      If all that checks out,  the logical next step is to compare
  266. notes  with someone locally to see if anyone else is experiencing
  267. problems.  The system operator ("sysop") of the system from which
  268. you obtained the software can usually be of help if you tell  him
  269. which  version    you're using (CP/M-86 or MS-DOS) and the name  of
  270. the file you're trying unsuccessfully to unsqueeze.  Alternative-
  271. ly,  you  can  leave  a message addressed to  "ALL"  on  a  local
  272. bulletin  board;  usually  some helpful person will jump in  with
  273. suggestions.   Remember, there are no silly questions, only silly
  274. mistakes.
  275.  
  276.      If you've tried all this,  and you're still sure you have    a
  277. problem,  then it's last-resort time.  Contact the author of your
  278. version of the program.   His name,  and a way to contact him, is
  279. in the very beginning of the NUSQ.COM file; TYPE NUSQ.COM and you
  280. should see it.     (If that doesn't work,  use DDT,  SID or DEBUG.)
  281. This  is  by far the slowest method of    resolving  problems,  and
  282. people    who contact program authors with problems caused by oper-
  283. ator error are usually looked upon unfavorably,  so do this  only
  284. if  all  else fails.   Be sure to include the name of the  system
  285. where  you  got your copy of the program,  the name of    the  file
  286. you're trying to unsqueeze and the place where you got the  file,
  287. and  a description of what went wrong.     It might also be nice to
  288. know the names of any people who have tried to help you with your
  289. problem so far.
  290.  
  291.  
  292.  
  293.             PROGRAM MESSAGES
  294.  
  295. Output drive = x:
  296.  
  297.      You  selected a disk drive different from the one containing
  298. the original file for the output file to be created on.
  299.  
  300.  
  301. No file(s) found.
  302.  
  303.      No  files meeting the filename specification you  gave  were
  304. found on the disk you indicated they would be on.  Try reentering
  305. the file specification,  or check to make sure you are specifying
  306. the correct drive and/or disk.     Also,    if you are using wildcard
  307. characters ('*',  '?') in the specification,  make sure the usage
  308. is correct.
  309.  
  310.  
  311. Out of memory. Use more specific filenames.
  312.  
  313.      NUSQ  is operating in a small workspace,  and  the  wildcard
  314. file  specification  you gave has found a large number of  files. 
  315. The  storage  for  all these filenames has  eaten  away  so  much
  316. workspace that NUSQ has no room left in which to unsqueeze any of
  317. the files.   Give NUSQ a filename specification which will find a
  318. smaller  number of files,  so that more unsqueezing workspace  is
  319. available.   (Users  with 96K or more memory will probably  never
  320. see this message.)
  321.  
  322.  
  323. xxxxxxxx.xxx is not a squeezed file.
  324.  
  325.      Squeezed  files  are marked with a  particular  "signature": 
  326. (FF76), NUSQ did not find this signature. Either the beginning of
  327. this file has been damaged,  somebody is being cute and is trying
  328. to invent new "standards", or this file is really not a  squeezed
  329. file.
  330.  
  331.  
  332. xxxxxxxx.xxx already exists,
  333.       Overwrite <Y>es, <N>o?
  334.  
  335.      A    file already exists which has the same name as that given
  336. in  the  squeezed  file for creating  the  output  file.   A  'Y'
  337. response  will cause NUSQ to overwrite the existing file;  a  'N'
  338. answer    will cause NUSQ not to unsqueeze this file.   If you want
  339. to unsqueeze this file without destroying the old, existing file,
  340. rename the existing file before running NUSQ again.
  341.      This  message  will  not  appear if  NUSQ    was  modified  to
  342. overwrite with wanton abandon (see DEBUG instructions preceding).
  343.  
  344.  
  345. Cannot create output file. Aborting.
  346.  
  347.      Either  this disk has so many files on it that there  is  no
  348. room  left  for  a  new directory  entry,  or  (with  MS-DOS  2.x
  349. versions) a subdirectory exists with the same name that NUSQ must
  350. use for the output file.  In any event, you will probably need to
  351. use  a different disk for the output file.   (See  the    preceding
  352. instructions.)
  353.  
  354.  
  355. File has illegal decode size. Aborting.
  356.  
  357.      Something    is  wrong with the input file;    either it is  not
  358. really a squeezed file,  or it has been modified or  damaged,  or
  359. (less  likely) the squeezer which created it did something wrong. 
  360. This file cannot be unsqueezed; try a new copy.
  361.  
  362.  
  363. Close failed...
  364.  
  365.      NUSQ  was unable to close the output file.   This is a  VERY
  366. unlikely  error,  and may mean either that your copy of  NUSQ  is
  367. damaged  or the copy of the operating system currently in  memory
  368. has  been corrupted somehow.   Try booting from a different disk,
  369. or try another copy of NUSQ.  If these fail, contact the author.
  370.  
  371.  
  372. ERROR - Checksums don't match in file xxxxxxxx.xxx
  373.  
  374.      Something is wrong with the input file;  either it has  been
  375. modified or damaged,  or (less likely) the squeezer which created
  376. it  did something wrong.   This file cannot be unsqueezed;  try a
  377. new copy.
  378.  
  379.  
  380. Disk full. Aborting and deleting output file.
  381.  
  382.      The  disk    on  which the output file is  being  written  has
  383. become full; there is no more disk space to contain the remainder
  384. of the file.  Create the output file on a different disk.
  385.  
  386.  
  387. Premature EOF on file... aborted.
  388.  
  389.      NUSQ has not found the special end-of-file (EOF) mark  which
  390. is present in every squeezed file.  Most likely, the last part of
  391. this file is missing.  This file cannot be unsqueezed.
  392.  
  393.  
  394.  
  395.               ANNOUNCEMENT
  396.  
  397.      A look at the signon message in interactive mode will reveal
  398. that NUSQ is the result of committee action.   Said committee was
  399. unable to agree on whether the source code should be  distributed
  400. as  public  domain  code;   consequently,   source  code  is  not
  401. available.
  402.  
  403.  
  404.  
  405.                  HISTORY
  406.  
  407.  
  408.      NUSQ is a file unsqueezer utility written entirely in assem-
  409. bly  language.     The  first file squeezer and unsqueezer  in  the
  410. public domain were written by Richard Greenlaw, in the C program-
  411. ming language.     A Z80 assembly language version was done by Gail
  412. Zacharias  at MIT in the Spring of 1983.   In late '83 Dave  Rand
  413. wrote  an  8080  version,  which went through  several    versions,
  414. culminating  in USQ120.COM.   Paul Homchick assumed the  task  of
  415. converting  Dave's  efforts  to 8086/8088 assembly  language  for
  416. execution  under CP/M-86 in early 1984,  and I    converted  Paul's
  417. version to run under MS-DOS a bit later.
  418.  
  419.  
  420.               CP/M VERSIONS
  421.  
  422.     1.08    January  28,  1984.   First released version
  423.         uploaded to Compuserve.
  424.  
  425.     1.09c    March  24,  1984.   Carriage Return on empty
  426.         line exits program.   Optimized  tree-walker
  427.         adapted  from    MS-DOS    version resulting in
  428.         15%  speed  increase.
  429.  
  430.     1.10    June  22,  1984.   Prior tree-walker was not
  431.         as optimized as we thought.  Further optimi-
  432.         zation borrowed from MS-DOS version, result-
  433.         ing in another 25% increase in speed.
  434.  
  435.     1.11    October 15, 1984.  Version 1.10 introduced a
  436.         bug  that  would  cause   a  'Premature EOF'
  437.         message  to  be  displayed  if  a legitimate
  438.         squeezed  file  used  every byte in the last
  439.         sector.  Now fixed.
  440.  
  441.  
  442.              MS-DOS VERSIONS
  443.  
  444.     1.00M    March 21, 1984.  Original version uploaded to
  445.         Compuserve.  Had  serious bug that  sometimes
  446.         resulted in short files with no warning.
  447.  
  448.     1.01M    March  31,  1984.   Carriage return on    empty
  449.         line at Command prompt ("*"),  now returns to
  450.         DOS  instead of giving another    prompt    line.
  451.         Short File BUG still in this version!
  452.  
  453.     1.02M    April 12,  1984. Fixed Random Block Write DOS
  454.         calls.    Files now unsqueeze to exact  length,
  455.         instead  of  128-byte multiples as  in    prior
  456.         versions.   Buffer  flush code fixed to elim-
  457.         inate short file bug.
  458.  
  459.     1.03 and 1.03D     June 22,  1984.  Decode routines re-
  460.         written  for a 30-percent increase in  speed.
  461.         Version 1.03D uses date and time of the input
  462.         file when creating output file; 1.03 does not
  463.         do so.    This date feature can be user config-
  464.         ured  by changing a byte at offset +4 in  the
  465.         .com  file.   See 'Installation,' above,  for
  466.         details.   Versions prior to this one  always
  467.         appended   a  1A  hex  to  the    end  of   the
  468.         unsqueezed  file.   This CP/M anachronism has
  469.         been removed in this version.
  470.  
  471.     1.04 and 1.04D     September 1, 1984.  Filename parsing
  472.         routine  changed to use MS-DOS "parse"    func-
  473.         tion call.  Prompt "No directory space" which
  474.         used  to appear when a file  create  function
  475.         failed    changed to read "Cannot create output
  476.         file",  because  MS-DOS 2.xx and  later  will
  477.         reject    the create request if a directory  by
  478.         the same name exists.
  479.  
  480.     1.10 and 1.10D     October  21,    1984.    "Bug"  fixed;
  481.         squeezed  files  which    were  100%   utilized
  482.         (i.e.,every last byte had  significant data),
  483.         and  which  were a multiple of 128 in length,
  484.         would  give a "Premature EOF"  error.    Added
  485.         date/time  handling  for  NSQ-created  files. 
  486.         Also  changed  input file handling to  handle
  487.         file lengths more accurately.
  488.  
  489. CP/M and CP/M-86 are trademarks of Digital Research, Inc.
  490. MS (as in MS-DOS) is a trademark of Microsoft, Inc.
  491.