home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / SNOBOL / SNOBOL_A.ZIP / UTILSDOC.PRT < prev   
Encoding:
Text File  |  1988-05-24  |  501.5 KB  |  8,094 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                           GORDON PETERSON'S SNOBOL4+ UTILITIES
  17.  
  18.  
  19.  
  20.                                                       Users' Guide
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                                                      Version 1.012
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                                       May 24, 1988
  53.  
  54.  
  55.  
  56.  
  57.                                                       Noah Systems
  58.                                                     P. 0. Box 40476
  59.                                               San Antonio, TX  78229-1476
  60.                                                         U. S. A.
  61.  
  62.                                                                                           page i
  63.  
  64.  
  65.  
  66.                     
  67.                                                   Table of Contents
  68.                     
  69.                     
  70.                        1.  INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . .   1
  71.                           1.1  Printing this User's Guide  . . . . . . . . . . . . . . .   1
  72.                           1.2  Overall Format  . . . . . . . . . . . . . . . . . . . . .   2
  73.                           1.3  About Public Domain and Shareware Distribution  . . . . .   2
  74.                           1.4  What is SNORUN.EXE? . . . . . . . . . . . . . . . . . . .   3
  75.                              1.4.1  SNORUN version 2.0 for Public Domain Distribution  .   4
  76.                              1.4.2  SNORUN versions for Registered Users . . . . . . . .   4
  77.                     
  78.                        2.  ABOUT SHAREWARE, FREEWARE, AND PUBLIC DOMAIN SOFTWARE . . . .   6
  79.                           2.1  Public Domain Software  . . . . . . . . . . . . . . . . .   6
  80.                           2.2  Freeware  . . . . . . . . . . . . . . . . . . . . . . . .   6
  81.                           2.3  Shareware . . . . . . . . . . . . . . . . . . . . . . . .   7
  82.                           2.4  Distribution Channels . . . . . . . . . . . . . . . . . .   8
  83.                           2.5  But the Terms Do Vary . . . . . . . . . . . . . . . . . .   9
  84.                           2.6  License to Distribute . . . . . . . . . . . . . . . . . .   9
  85.                     
  86.                        3.  ANGLICIZ  --  "ANGLICIZE" FOREIGN CHARACTER SET . . . . . . .  12
  87.                     
  88.                        4.  ASMGEN2  --  DISASSEMBLY SUPERVISOR . . . . . . . . . . . . .  14
  89.                     
  90.                        5.  ASMRECOV  --  RECOVER ASSEMBLER SOURCE FROM LISTING FILE  . .  15
  91.                     
  92.                        6.  ASMSTAT  --  GENERATE ASSEMBLER PROGRAM STATISTICS  . . . . .  18
  93.                     
  94.                        7.  CASE  --  CASE CONVERSION AND FOLDING . . . . . . . . . . . .  19
  95.                     
  96.                        8.  CHARDF  --  CHARACTERIZE A DELIMITED FILE . . . . . . . . . .  22
  97.                     
  98.                        9.  CHOPUP  --  CHOP UP A FILE FOR TRANSMISSION . . . . . . . . .  26
  99.                     
  100.                        10.  CISSTRIP  --  STRIP JUNK FROM COMPUSERVE CAPTURE FILES . . .  28
  101.                     
  102.                        11.  COMBINE  --  COMBINE FILES AND ELIMINATE DUPLICATES  . . . .  34
  103.                     
  104.  
  105.                                                                                           page ii
  106.  
  107.  
  108.  
  109.                        12.  COPYSEG  --  COPY A FILE TO MULTIPLE SEGMENTS  . . . . . . .  37
  110.                     
  111.                        13.  CPRANGE  --  COPY RANGES OF RECORDS  . . . . . . . . . . . .  40
  112.                     
  113.                        14.  DELALL  --  DELETE ALL MATCHING FILES  . . . . . . . . . . .  45
  114.                     
  115.                        15.  DELIEOF  --  FIND AND DELETE INTERNAL EOF MARKS  . . . . . .  47
  116.                     
  117.                        16.  DIFFER  --  FIND DIFFERENCES IN TWO TEXT FILES . . . . . . .  50
  118.                     
  119.                        17.  DIRCMP2  --  COMPARE FILES IN DIFFERENT SUBDIRECTORIES . . .  52
  120.                     
  121.                        18.  DIRTREE  --  MAKE FILE OF SUBDIRECTORIES PRESENT . . . . . .  54
  122.                     
  123.                        19.  EXPTAB  --  TAB CHARACTER EXPANSION  . . . . . . . . . . . .  57
  124.                     
  125.                        20.  EXTEND  --  EXTEND A FILE (RECOVER LOST DATA)  . . . . . . .  59
  126.                     
  127.                        21.  FILEDUMP  --  HEXADECIMAL FILE DUMP  . . . . . . . . . . . .  63
  128.                     
  129.                        22.  FMTHDLL  --  FORMAT HARD DISK, LOW LEVEL . . . . . . . . . .  65
  130.                     
  131.                        23.  GENTBLS  --  GENERATE PROGRAM SOURCE CODE TABLES . . . . . .  69
  132.                     
  133.                        24.  LASERPG  --  MULTIPAGE OUTPUT TO LANDSCAPE MODE PRINTER  . .  74
  134.                     
  135.                        25.  LINEAN1  --  SERIAL COMMUNICATIONS ANALYSIS AID  . . . . . .  76
  136.                     
  137.                        26.  LIST  --  (YES, ANOTHER) TEXT FILE LISTER  . . . . . . . . .  78
  138.                     
  139.                        27.  MAKASEQ  --  DISASSEMBLY AID (USED WITH ASMGEN2) . . . . . .  80
  140.                     
  141.                        28.  MAKDUMMY  --  MAKE DUMMY FILES FOR ARC'D FILES . . . . . . .  82
  142.                     
  143.                        29.  MAKEALL  --  CONVERT A MAKE FILE TO "ALL" BATCH FILE . . . .  84
  144.                     
  145.                        30.  MAKEMAKE  --  BUILD A MAKE FILE BASED ON INCLUSIONS  . . . .  90
  146.                     
  147.  
  148.                                                                                           page iii
  149.  
  150.  
  151.  
  152.                        31.  MAKERMAK  --  BUILD A RAW MAKE FILE  . . . . . . . . . . . .  95
  153.                     
  154.                        32.  MELIZA  --  PSYCHOANALYSIS PROGRAM (FAMOUS EARLY AI EFFORT)   98
  155.                     
  156.                        33.  MERGECMP  --  MERGE WORD'S .CMP USER DICTIONARY FILES  . . .  99
  157.                     
  158.                        34.  MSCRIBE  --  DOCUMENT FORMATTING AND ENTRY PROGRAM . . . . . 101
  159.                     
  160.                        35.  OVER  --  SHIFT A PRINT FILE OVER TO THE RIGHT . . . . . . . 104
  161.                     
  162.                        36.  PADREC  --  PAD RECORDS TO A FIXED SIZE  . . . . . . . . . . 105
  163.                     
  164.                        37.  PLAYCVMS  --  SUPERKEY TO DRVSPKR FORMAT CONVERTER . . . . . 107
  165.                     
  166.                        38.  PLAYCVT  --  PLAY FILE TO DRVSPKR FORMAT CONVERTER . . . . . 110
  167.                     
  168.                        39.  PMUSCVT  --  PIANOMAN .MUS TO DRVSPKR FORMAT CONVERTER . . . 114
  169.                     
  170.                        40.  PUBLBL  --  PUBLIC LABEL INCLUSION GENERATOR . . . . . . . . 116
  171.                     
  172.                        41.  REPAGIN8  --  INTELLIGENT DOCUMENT PAGINATION AND TOC  . . . 120
  173.                     
  174.                        42.  SAPPREF  --  APPEND ASSEMBLER CROSS-REFERENCE TO LISTING . . 126
  175.                     
  176.                        43.  SPACE  --  DISK SPACE MANAGEMENT AND RECOVERY UTILITY  . . . 129
  177.                     
  178.                        44.  STRIPBS  --  STRIP BACKSPACE CHARACTERS FROM TEXT FILE . . . 135
  179.                     
  180.                        45.  TITLGEN  --  GENERATE A TITLE PAGE . . . . . . . . . . . . . 137
  181.                     
  182.                        46.  TOTSIZ  --  TOTAL SIZE OF SUBDIRECTORIES . . . . . . . . . . 142
  183.                     
  184.                        47.  TP  --  WIPE CLEAN THE TAIL END OF A FILE  . . . . . . . . . 144
  185.                     
  186.                        48.  TRUNCATE  --  REDUCE THE SIZE OF A FILE  . . . . . . . . . . 147
  187.                     
  188.                        49.  TSELIM  --  TRAILING SPACE ELIMINATION . . . . . . . . . . . 149
  189.                     
  190.  
  191.                                                                                           page iv
  192.  
  193.  
  194.  
  195.                        50.  TYPEOF  --  CHARACTERIZE AN ASCII TEXT FILE  . . . . . . . . 151
  196.                     
  197.                        51.  UNBACK  --  RECOVER BACKUP FILES THAT RESTORE WON'T  . . . . 153
  198.                     
  199.                        52.  UNOVER  --  DELETE LEADING SPACES IN TEXT FILE . . . . . . . 154
  200.                     
  201.                        53.  WC  --  WORD COUNT . . . . . . . . . . . . . . . . . . . . . 157
  202.                     
  203.                        54.  WFREQ  --  WORD FREQUENCY  . . . . . . . . . . . . . . . . . 160
  204.                     
  205.                        55.  XTRCOMS  --  EXTRACT COMMENTS FROM ASSEMBLER PROGRAMS  . . . 163
  206.                     
  207.                        56.  SETTING UPPER AND LOWER CASE CHARACTER SETS  . . . . . . . . 164
  208.                     
  209.                        57.  HOW TO GET MORE  . . . . . . . . . . . . . . . . . . . . . . 166
  210.                     
  211.                        58.  COMMON QUESTIONS AND ANSWERS . . . . . . . . . . . . . . . . 167
  212.                     
  213.                        59.  ABOUT SNOBOL4 VERSIONS FOR MS-DOS  . . . . . . . . . . . . . 174
  214.                           59.1  What Does SNOBOL Stand For?  . . . . . . . . . . . . . . 174
  215.                           59.2  About the SNOBOL4 Language . . . . . . . . . . . . . . . 174
  216.                           59.3  Implementations for MS-DOS . . . . . . . . . . . . . . . 175
  217.                              59.3.1  Minnesota SNOBOL4.2 by Viktors Berstis  . . . . . . 176
  218.                              59.3.2  Macro SPITBOL by Robert B. K. Dewar . . . . . . . . 177
  219.                              59.3.3  Vanilla SNOBOL4 by Mark B. Emmer  . . . . . . . . . 179
  220.                              59.3.4  Catspaw SNOBOL4+ by Mark B. Emmer . . . . . . . . . 181
  221.                           59.4  Recommendation . . . . . . . . . . . . . . . . . . . . . 183
  222.                     
  223.                        60.  LEGALITIES . . . . . . . . . . . . . . . . . . . . . . . . . 186
  224.                           60.1  License to Distribute  . . . . . . . . . . . . . . . . . 186
  225.                           60.2  Disclaimer of Liability  . . . . . . . . . . . . . . . . 186
  226.                           60.3  Trademark and Product Acknowledgements . . . . . . . . . 187
  227.                     
  228.                        61.  MACRO SPITBOL ERROR CODE NUMBERS . . . . . . . . . . . . . . 189
  229.                     
  230.                        62.  ABOUT THE AUTHOR . . . . . . . . . . . . . . . . . . . . . . 197
  231.                     
  232.                        63.  LATEST VERSIONS OF THESE SNOBOL4+ UTILITIES  . . . . . . . . 200
  233.  
  234.                                                                                           page 1
  235.  
  236.  
  237.                     
  238.                     1.  INTRODUCTION
  239.                     
  240.                           The document you are reading describes a variety of interesting and
  241.                         hopefully useful utilities and other programs, most of which are being
  242.                         distributed as shareware.  Some of the utilities are very simple (but
  243.                         still useful!), others are quite sophisticated.  Many of them provide
  244.                         simple but useful functions which are not adequately addressed by any
  245.                         widely available shareware (and sometimes even commercially available)
  246.                         software package.
  247.                     
  248.                           It is virtually certain that one or more of the utilities in this
  249.                         package will solve a problem, or improve the operation of your MS-DOS
  250.                         system.  Note too that most, if not all, of the utilities described
  251.                         herein will work on network volumes (which is important if you are
  252.                         using a local area network);  most of these utilities will also work
  253.                         on non-PC-compatibles, as long as they are running MS-DOS version 2.0
  254.                         or above.
  255.                     
  256.                     1.1  Printing this User's Guide
  257.                     
  258.                           In most distributions, this document has been formatted with the
  259.                         intention that it be printed in condensed-print mode on an 80-column
  260.                         (or wider) printer.  Short pages (about 42 lines or so) have been used
  261.                         so that the resulting printed copy can be bound and trimmed to a nice,
  262.                         convenient size, about eight inches high and about six inches wide.
  263.                         It has also been shifted over so that, once bound, the left-hand edge
  264.                         is not buried in the staples, punched holes, Velobind strip, or whatever
  265.                         else you might have used to hold your printed copy together.  The number
  266.                         of columns shifted over, normally twenty, was chosen to make it easier
  267.                         to read through the ".PRT" file using the popular shareware interactive
  268.                         text file listing program "LIST", written by Vernon D. Buerg, (not to
  269.                         be confused with the SNOBOL4+ "LIST" program described herein).
  270.                     
  271.                           Other distributions of this document may have been formatted
  272.                         differently, either by the author or by subsequent people who modified
  273.                         it before you got your copy (such changes by others are NAUGHTY! and
  274.                         are discouraged by the author).
  275.                     
  276.  
  277.                                                                                           page 2
  278.  
  279.  
  280.                     1.2  Overall Format
  281.                     
  282.                           Most of the following chapters each describe one utility or program
  283.                         of interest.  Each includes a basic description of what the program does,
  284.                         one or more sample command lines which one might use to invoke the
  285.                         program, and a description of how you would specify any required file
  286.                         names.  Each chapter also contains a thorough description of the
  287.                         available options provided by the utility or program.
  288.                     
  289.                           Constructive suggestions for improvements to this document are always
  290.                         welcome and should be sent directly to the author.
  291.                     
  292.                     1.3  About Public Domain and Shareware Distribution
  293.                     
  294.                           Depending upon where you found this document, you probably got it
  295.                         along with one or more of the utilities described herein.  Like most
  296.                         public domain and shareware software, there have been numerous
  297.                         distributions of this package over time.  Different distributions have
  298.                         incorporated, where appropriate, updated versions of some of the
  299.                         included programs.  Note that this document describes the NEWEST
  300.                         versions of these programs, as of the date this document was generated.
  301.                         (Depending upon how you actually got this document, the original date
  302.                         stamped on this document file may have been changed during one or more
  303.                         intermediate transfers).  These newest versions described herein may
  304.                         not necessarily reflect the versions of the software that you happen
  305.                         to have concurrently received.  (In some cases, this document explicitly
  306.                         mentions restrictions that may have been applicable to some older
  307.                         versions.)
  308.                     
  309.                           Public domain distribution is by its nature relatively unstructured.
  310.                         Old versions of programs do float around nearly forever.  The diskette
  311.                         which the author releases, containing this document, is not large enough
  312.                         to contain all of the utilities described herein.  Therefore, each
  313.                         distribution contains some subset of these described utilities.  In some
  314.                         cases, public domain distributors, bulletin board SYSOPs, and the like
  315.                         may have re-packaged useful utilities from prior distributions along with
  316.                         utilities selected from the newer distribution to result in the package
  317.                         you have received.  These things are obviously out of the control of the
  318.                         program author.
  319.                     
  320.  
  321.                                                                                           page 3
  322.  
  323.  
  324.  
  325.                           If you find that some of the utilities described herein are of interest
  326.                         to you, but are not part of the package you have received, you are
  327.                         encouraged to contact the author directly.  This is also obviously the
  328.                         only way to ensure that you have the newest revisions of each of the
  329.                         utilities you are interested in.  Registered users (those who have
  330.                         registered as users of the package with the author) are notified
  331.                         periodically of updated versions of this package.  Note that
  332.                         distributions of the current shareware version of these utilities,
  333.                         direct from the author, are made subject to a nominal charge for
  334.                         diskettes, postage and handling charges.
  335.                     
  336.                           In any package of utilities as diverse as this one is, there are bound
  337.                         to be some utilities described herein whose usage is complicated or
  338.                         whose usefulness you might not understand.  Some of the utilities in
  339.                         this set are quite straightforward, others are quite complex and
  340.                         sophisticated.  If you get bogged down while reading the description
  341.                         of some utility in this document, don't just put the whole document
  342.                         aside.  Just skip to the next chapter!  Chances are good that you'll
  343.                         find at least a few "must have" utilities among this set.  One thing is
  344.                         for sure, you'll find utilities here that are not available anywhere
  345.                         else.
  346.                     
  347.                           At least one of the programs described herein, "SPACE", is considered
  348.                         to be a "program product" and is not distributed in the public domain.
  349.                         This program is, rather, offered on an individual sale basis only.  SPACE
  350.                         is priced at $30 (and is well worth it!).  The $30 charge gets you your
  351.                         own, personalized, non-copy-protected copy of the program.  (Liberal
  352.                         quantity discounts apply to multiple-processor, network, or commercial
  353.                         users).
  354.                     
  355.                     1.4  What is SNORUN.EXE?
  356.                     
  357.                           Virtually all of these utilities have been written in the SNOBOL4+
  358.                         language.  This language is supported by a public-domain run-time called
  359.                         SNORUN, which is needed to execute any of the programs you find in this
  360.                         package with the extension ".SAV".  The use of the public domain run-time
  361.                         makes the individual ".SAV" files much smaller than they would be if they
  362.  
  363.                                                                                           page 4
  364.  
  365.  
  366.  
  367.                         each had to include all of the common routines used by virtually every
  368.                         SNOBOL4+ program.  Whether you transmit the ".SAV" files via some kind
  369.                         of communications line or via copies on diskette, this reduced size is
  370.                         a real advantage over programs written in other languages which require
  371.                         that each utility include a duplicate copy of the full runtime library.
  372.                         There is, however, a corollary disadvantage:  ".SAV" files have to be
  373.                         executed with the version of SNORUN which matches the version of the
  374.                         SNOBOL4+ compiler which originally produced the ".SAV" file.  This sounds
  375.                         more complicated than it really is:  all it means is that you can't
  376.                         freely mix-and-match different versions of SNORUN with different versions
  377.                         of ".SAV" files.
  378.                     
  379.                     1.4.1  SNORUN version 2.0 for Public Domain Distribution
  380.                     
  381.                           To help eliminate confusion, the author has thus far (at least as of
  382.                         this writing, in April 1987) distributed all shareware distributions
  383.                         of this software using one single version of the SNOBOL4+ system, namely
  384.                         version 2.0.  This ensures that the version of SNORUN which people find
  385.                         in public domain distribution is likely to match the ".SAV" files which
  386.                         they also find in public domain distribution.
  387.                     
  388.                           However, there is a known bug in version 2.0 of the SNOBOL4+ system.
  389.                         This bug does not occur frequently, and it is data-sensitive.  The bug
  390.                         generally causes the executing program to hang in what appears to be a
  391.                         loop.  Since the bug occurs so rarely, the author's judgement call is
  392.                         that the chances of you being inconvenienced by it are probably less than,
  393.                         especially for casual users, your likelihood of being confused by having
  394.                         non-matching SNORUNs and ".SAV" files.  (The bug has been fixed in
  395.                         version 2.03, which as of this writing is the newest version of SNOBOL4+).
  396.                         If it turns out that the bug actually impacts you users out there more
  397.                         than I expect it will, then this decision is certainly subject to change.
  398.                     
  399.                     1.4.2  SNORUN versions for Registered Users
  400.                     
  401.                           In the meantime, those users who use one or more of the programs from
  402.                         this package a lot will probably want to register with the author for the
  403.                         newest versions of these utilities.  I assume that those users who
  404.  
  405.                                                                                           page 5
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.                         choose to register with the author, and therefore receive a complete
  417.                         distribution, are using the utilities more heavily than those users who
  418.                         get the distribution through public domain and shareware channels and
  419.                         use these programs infrequently.  Registered users are assumed to be
  420.                         both more likely to encounter the bug, and simultaneously less likely
  421.                         to be confused by having a newer version of SNORUN.  Registered users
  422.                         will therefore normally be sent a distribution with ".SAV" files
  423.                         compiled by the newest available version of the SNOBOL4+ system.
  424.                     
  425.  
  426.                                                                                           page 6
  427.  
  428.  
  429.                     
  430.                     2.  ABOUT SHAREWARE, FREEWARE, AND PUBLIC DOMAIN SOFTWARE
  431.                     
  432.                           There seems to be a great deal of confusion regarding the terms
  433.                         "public domain", "freeware", and "shareware".  In this chapter, I'll
  434.                         try to explain the differences and what it means to you as a computer
  435.                         user.
  436.                     
  437.                     2.1  Public Domain Software
  438.                     
  439.                           Public domain software is software which has been literally placed
  440.                         into the public domain, meaning that it is freely available.  Such
  441.                         software may be changed, improved, chopped up, or whatever else anyone
  442.                         wants to do with it.  Public domain software tends to be rather chaotic,
  443.                         especially when the original source is distributed as well.  Such
  444.                         programs get modified by "compulsive tinkerers", sometimes for the
  445.                         better and sometimes for the worse.  Often the executable version of
  446.                         the program shows no obvious signs of these "modifications".  No two
  447.                         versions of such programs are ever quite alike.  Now that this
  448.                         phenomenon is well known, most responsible authors are no longer
  449.                         releasing their worthwhile and significant programs into the true
  450.                         "public domain".  Much true "public domain" software is anonymously
  451.                         written... if you find a bug or have any problems, the author doesn't
  452.                         want to hear about it.  Even worse, unscrupulous "diskette sellers"
  453.                         can package and sell public domain software at uncontrolled prices,
  454.                         and the author will receive no payment for his program, and has no
  455.                         control over selling price or marketing practices.
  456.                     
  457.                     2.2  Freeware
  458.                     
  459.                           Freeware is a step above public domain software.  Software which is
  460.                         freeware is generally protected by an author's copyright notice, which
  461.                         implies that the author is taking a continuing interest in his program
  462.                         and specifically intends to keep it from diverging off in many
  463.                         diverse and incompatible directions.  This also usually suggests some
  464.                         measure of periodic, coordinated improvements and enhancements.  Such
  465.                         software, without the intervening hands of many "helpful tinkerers",
  466.                         tends to be more consistent and error-free than true public domain
  467.                         software.
  468.                     
  469.  
  470.                                                                                           page 7
  471.  
  472.  
  473.                           Freeware differs from Shareware (described below) in that the author
  474.                         of software described as freeware generally expects no financial
  475.                         rewards from the users of his package.
  476.                     
  477.                     2.3  Shareware
  478.                     
  479.                           Shareware is a "different animal" from the others.  Shareware is
  480.                         actually often commercial-grade software (or better), where the author
  481.                         has been frustrated by attempts to pursue commercial distribution.
  482.                         Instead, in a variation on the old "chain letter" scheme, the idea is
  483.                         to simply give the software to one's friends, and ask them to give
  484.                         copies to their friends, and so on.  People receiving the software can
  485.                         thoroughly test the software to decide whether it is suitable for
  486.                         their needs.  If not, they can just pass the diskette on to a friend
  487.                         who they think might be more interested.  If they do decide to use
  488.                         the software, the Shareware author requests that the user "register"
  489.                         with the author, and pay a nominal registration fee.
  490.                     
  491.                           When you receive a piece of shareware, the people you've received it
  492.                         from as a rule pay nothing to the shareware's author.  You've merely
  493.                         bought the diskette or communications line time used for the transfer.
  494.                         You win in this scheme.  Unlike your local computer store, where they
  495.                         ask you to part with considerable sums of money for a "professional"
  496.                         software package that may or may not be quite what you want, (and how
  497.                         to decide which one of the ten on their shelf is the best for you?),
  498.                         with shareware you can try the software yourself just as long as you
  499.                         like, in the comfort of your own home or office.  Only after you've
  500.                         decided that you like it, do you actually pay for the right to use it
  501.                         on an ongoing basis.  Even then, you win again.  The distribution system
  502.                         for shareware is less costly than that for commercial software, so that
  503.                         as a user you have access to a very diverse array of software, at a
  504.                         lower price than you would have to pay for the same software if you
  505.                         had bought it in the normal way.
  506.                     
  507.                           This system also works well for the Shareware author.  He has the
  508.                         satisfaction of knowing who his users are (if they register), and he
  509.                         (or she, of course) actually receives a much higher percentage of the
  510.                         money paid than would be the case for regular commercial distribution.
  511.                         These funds support additional work on both the software being
  512.                         registered, and further products that are made available later.
  513.                     
  514.  
  515.                                                                                           page 8
  516.  
  517.  
  518.                           Of course, this system breaks down if none of the package's users
  519.                         decide to register their software and support its author.  In this
  520.                         case, the real loser is the software's user, because its author will
  521.                         eventually lose interest and stop supporting the existing software
  522.                         products, and turn back to the more expensive and less interesting
  523.                         retail computer software channels.
  524.                     
  525.                           Normal retail software marketing, where they try to force EVERY
  526.                         user of a software package to pay for it (and usually up-front),
  527.                         has other disadvantages as well, painfully evident to anyone
  528.                         who has been inconvenienced by the continuing Gestapo-like tactics
  529.                         of copy-protected commercial software.  Your support of shareware
  530.                         is your way to reward the first major about-face from the idea of
  531.                         software copy protection, and to support a genuine alternative.
  532.                     
  533.                           The moral of the story is this:  if you have received shareware
  534.                         software, and find that you never use it, don't feel guilty about
  535.                         having it and not paying for it.  Just remember that you've got it,
  536.                         and pass along a copy to a friend who might have more use for it
  537.                         later.  If, on the other hand, you've got a shareware software package
  538.                         which you've ended up using regularly, it makes sense for you to
  539.                         register it and pay the requested fee to its author.  In so doing,
  540.                         you ensure its continued support and development.  Besides, when
  541.                         somebody does something nice for you, it just simply feels good when
  542.                         you can return the favor... and even better when you know that it's
  543.                         going directly to the person who actually designed and wrote the
  544.                         software you've decided you like, and not disappearing into a faceless
  545.                         bureaucratic organization somewhere.
  546.                     
  547.                     2.4  Distribution Channels
  548.                     
  549.                           Shareware, freeware, and public domain software are all typically
  550.                         distributed in the same manner:  through computer clubs, users groups,
  551.                         bulletin boards, and diskette copying services.  Since much of this
  552.                         deluge of software is "true public domain software", in this document
  553.                         I've decided to simply refer to the collection of friends, bulletin
  554.                         boards, and all the rest as simply "public domain distribution
  555.                         channels".
  556.                     
  557.  
  558.                                                                                           page 9
  559.  
  560.  
  561.                           If you've looked at much of the stuff that gets distributed this
  562.                         way, you've no doubt seen that some of it is very good, some is
  563.                         average, and much of it is simply garbage.  Typically, the software
  564.                         which is "shareware" IS actually worth paying for:  the author has
  565.                         gone to the trouble of polishing the program(s), providing carefully
  566.                         considered options and extra features, and expended the considerable
  567.                         effort of preparing thorough documentation.  In many cases, those
  568.                         users who register their shareware get first-rate printed documentation,
  569.                         telephone or online support, and automatic free or reduced-priced
  570.                         software updates as new and improved versions get released.
  571.                     
  572.                     2.5  But the Terms Do Vary
  573.                     
  574.                           Some authors still interpret the terms "shareware", "freeware", and
  575.                         "public domain" differently than I do here.  However, usually they
  576.                         will explain their interpretation along with their product, and give
  577.                         some indication of their intentions regarding usage, distribution, and
  578.                         registration.  Please respect their wishes.
  579.                     
  580.                           If you have already sent in shareware registrations for one or more
  581.                         of the shareware packages you already have that you find of value to
  582.                         you, I'm sure I can speak for the programmer responsible as well as
  583.                         the rest of us programmers dedicated to this new method of software
  584.                         distribution, in saying a sincere, "Thank you for supporting the
  585.                         free enterprise system."
  586.                     
  587.                     2.6  License to Distribute
  588.                     
  589.                           Anyone having a copy of this package of shareware utilities is welcome
  590.                         (even encouraged!) to give copies of it to their friends, business
  591.                         associates, computer club members, or the like.  It may be freely loaded
  592.                         onto bulletin board services for downloading.  However, there are a few
  593.                         restrictions which must be observed:
  594.                     
  595.                           The registered version of these utilities uses a different version of
  596.                         the "SNORUN" runtime package.  To prevent confusion, the registered
  597.                         version may not be distributed without express written permission from
  598.                         the author.
  599.                     
  600.  
  601.                                                                                           page 10
  602.  
  603.  
  604.  
  605.                           Some programs as specified herein (such as SPACE) are program products
  606.                         and are not for general distribution.
  607.                     
  608.                           If this package is to be copied for distribution, it must be complete
  609.                         and unmodified.  Specifically, no files part of the original distribution
  610.                         package may be modified or appended to in any way whatsoever.  Additional
  611.                         files MAY BE ADDED to the package as long as they are clearly and
  612.                         centrally indicated as additions, and as long as those added files are
  613.                         placed under the identical distribution license as described in this
  614.                         section.  Any such additions must clearly identify who added them, and
  615.                         when.  It is specifically prohibited from adding any copyrighted
  616.                         additional files, unless the copyright of such added material is thereby
  617.                         assigned to this package's author.
  618.                     
  619.                           Any for-profit organization wishing to distribute this package may
  620.                         charge a reasonable fee, not exceeding six U.S. dollars per diskette or
  621.                         twelve U.S. dollars for the complete shareware package, or its
  622.                         equivalent in local currency, to cover diskette duplication and handling
  623.                         costs, as long as they strictly adhere to the other requirements of
  624.                         this license.  Furthermore, such organizations must advise me of their
  625.                         intention to distribute the package, so that I may ensure that they
  626.                         have the most recent shareware distribution.
  627.                     
  628.                           Anyone charging any fee for distributing this package must clearly
  629.                         indicate that "shareware" is NOT "free software", but that the user
  630.                         is expected to register the software with the author if any or all of the
  631.                         software is to be used on an ongoing basis.  They must also explain that
  632.                         the fee charged by the distributor does not constitute "registration",
  633.                         and is not being paid to the author.
  634.                     
  635.                           Distribution rights to this package and any other software copyright
  636.                         by me, Gordon Peterson II, are specifically denied to Nelson Ford and/or
  637.                         "The Public (Software) Library" until further notice.  This unusual and
  638.                         unfortunate step has been taken because of his inflexible policy of
  639.                         adding separately copyrighted material to authors' disks in an attempt
  640.                         to impede their further distribution, and his policy of modifying
  641.                         author's documentation files.
  642.                     
  643.  
  644.                                                                                           page 11
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                           Any other commercial distribution of these programs is the exclusive
  656.                         right of the author.  Contact me for further details.
  657.                     
  658.                           Since programs and packages distributed under public domain type
  659.                         distribution channels are not under the author's direct control, note
  660.                         that this license agreement is subject to change without prior notice.
  661.                     
  662.  
  663.                                                                                           page 12
  664.  
  665.  
  666.                     
  667.                     3.  ANGLICIZ  --  "ANGLICIZE" FOREIGN CHARACTER SET
  668.                     
  669.                           Many files, especially those originating in foreign countries, contain
  670.                         many characters which are part of the "IBM extended ASCII character set",
  671.                         but are not part of the "normal" 96-character ASCII character set.  Such
  672.                         characters might include letters with diacritical marks, fractions,
  673.                         foreign punctuation, and various currency symbols.
  674.                     
  675.                           It is often necessary to convert such files to their 96-character-ASCII
  676.                         equivalent.  In some cases, such as the "upside down question mark" used
  677.                         in Spanish, the special characters may simply be discarded.  In other
  678.                         cases, the diacritical mark accompanying the character must be deleted.
  679.                         A more complicated case occurs when a single character must be replaced
  680.                         by several, especially if one wishes the replacement characters to
  681.                         correspond correctly with the upper/lower case indicated by the character
  682.                         replaced and those following it.
  683.                     
  684.                           ANGLICIZ performs all these conversions quickly and conveniently.
  685.                         Users involved in international operations will find it to be extremely
  686.                         useful.
  687.                     
  688.                           For example, assume that one has the German surname "Hübner".  (Note:
  689.                         the quoted word should contain a "u" with two dots over it.  If your
  690.                         printer did not print that letter, or printed it as something strange,
  691.                         this shows why you need a utility like this one).  ANGLICIZ will change
  692.                         this name to its Anglicized equivalent "Huebner".  The phrase "¼ cup"
  693.                         will be changed to "1/4 cup".  And so forth.
  694.                     
  695.                            Note that this program operates as a "filter", much the same way as
  696.                         the DOS "MORE" command.  It reads from standard input and writes to
  697.                         standard output.  Therefore, its input and/or output can be "piped" the
  698.                         same way as any other DOS filter.  See the DOS User's Guide for more
  699.                         details on filters and "piping" of standard input and standard output.
  700.                     
  701.                           It also should be pointed out that the program automatically deletes
  702.                         trailing spaces at the end of each record, and that input records are
  703.                         assumed to be less than 4000 characters long.
  704.                     
  705.  
  706.                                                                                           page 13
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.                           The program is invoked with a command line of the form:
  714.                     
  715.                         snorun angliciz [<iooptions>]
  716.                     
  717.                         <iooptions>::
  718.                            <<inputfile>      or
  719.                            /5=<inputfile>    or
  720.                            /5:<inputfile>
  721.                               This item allows specification of a file (or device) from which
  722.                               the input file is to be read.  If this item is not specified at
  723.                               all, the program reads from "default standard input", which may
  724.                               be a piped input file, or the console.
  725.                     
  726.                            ><outputfile>     or
  727.                            >><outputfile>    or
  728.                            /6=<outputfile>   or
  729.                            /6:<outputfile>
  730.                               This item allows specification of a file (or device) to which
  731.                               the output file is to be written.  This can be either a printer
  732.                               or a disk file, or in general any MS-DOS sequential output device.
  733.                               Note that the ">>" form appends the output to the end of the
  734.                               existing contents of the specified file, if any.  If this item
  735.                               is not specified at all, the program writes to the "default
  736.                               standard output", which may likewise be piped into another program
  737.                               or by default will appear upon the console.
  738.                     
  739.  
  740.                                                                                           page 14
  741.  
  742.  
  743.  
  744.                     
  745.                     4.  ASMGEN2  --  DISASSEMBLY SUPERVISOR
  746.                     
  747.                           This program works in conjunction with the public domain program ASMGEN
  748.                         to generate disassemblies of .COM and/or .EXE program files.  One of
  749.                         ASMGEN's biggest problems is that it does not recognize character
  750.                         string constants and obvious data areas (blocks of binary zeros or
  751.                         hex FF's, for example).  It does, however, support an auxiliary input
  752.                         file (the .SEQ file), which allows the user to tell it where it is to
  753.                         generate ASCII strings, data bytes, and the like.  Unfortunately, making
  754.                         the .SEQ file is usually a tedious manual process.
  755.                     
  756.                           ASMGEN2 automates this process.  It supervises ASMGEN while it performs
  757.                         the first pass over the executable file and generates a "first stab" at
  758.                         a decent source file output.  ASMGEN2 next invokes the utility MAKASEQ,
  759.                         which examines the first pass output from ASMGEN and figures out where
  760.                         character strings and data areas are likely.  MAKASEQ outputs a .SEQ
  761.                         file suitable for input to ASMGEN.  ASMGEN2 finally invokes ASMGEN for
  762.                         a third pass, which generates a considerably cleaner output source file.
  763.                     
  764.                           Note that early versions of this system do not support object files
  765.                         larger than 32K bytes, due to a limitation in MAKASEQ version 1.0.  Using
  766.                         versions of MAKASEQ 1.1 or above, the limit is 64K.  This 64K limitation
  767.                         is imposed by the public domain ASMGEN program.
  768.                     
  769.                           Note that ASMGEN2 must be run from a disk containing DOS, ASMGEN,
  770.                         and MAKASEQ.  To disassemble the executable file "MYPROG.EXE", the
  771.                         command line would look like:
  772.                     
  773.                         snorun  asmgen2 ;MYPROG.EXE
  774.                     
  775.                           ASMGEN2 generates appropriate error messages if it detects that any
  776.                         of the processes it supervises have not been successful.
  777.                           It may be interesting that the MAKASEQ program is also written in
  778.                         the SNOBOL4 language.  It was compiled using an alternate SNOBOL4
  779.                         system (called Macro Spitbol).
  780.                     
  781.  
  782.                                                                                           page 15
  783.  
  784.  
  785.  
  786.                     
  787.                     5.  ASMRECOV  --  RECOVER ASSEMBLER SOURCE FROM LISTING FILE
  788.                     
  789.                           This utility program uses the print file on your disk from a (hopefully
  790.                         recent) assembly, and uses it to recover the source file.  This makes it
  791.                         much less painful when you have accidentally deleted or overwritten your
  792.                         original source file.
  793.                     
  794.                           ASMRECOV is designed to work with listing files produced by Microsoft
  795.                         Macro Assembler version 4.0, but the output from other versions will
  796.                         probably work just as well.
  797.                     
  798.                           The current version of ASMRECOV does not attempt to strip out any
  799.                         inclusions or macro expansions which might have appeared in your listing.
  800.                         Therefore, there may be some manual editing to do to "clean up" the
  801.                         output file produced by ASMRECOV.  However, this should be in all cases
  802.                         less than the work it would take to key the program back in from the
  803.                         same listing!!
  804.                     
  805.                           Likewise, note that sometimes (due to the way MASM handles tab
  806.                         characters) it may be necessary to add or remove a tab character here or
  807.                         there from the resulting output file.
  808.                     
  809.                           One thing you might need to watch out for are some of the bugs which
  810.                         Microsoft's Macro Assembler is so famous for.  Just one, of special
  811.                         concern to us here, causes a line such as:
  812.                     
  813.                            NAME     DD      0,0
  814.                     
  815.                         to appear twice in your listing, once where it belongs and again right
  816.                         below it where it doesn't belong.  The current version of ASMRECOV does
  817.                         not attempt to suppress this (although it will usually be apparent when
  818.                         you later try to re-assemble your file;  if you have a label on the line,
  819.                         you'll get a "duplicate definition" error message for the label.  If not,
  820.                         you will just have to find it on your own!) and you'll get both of the
  821.                         two lines written to the ASMRECOV output file.
  822.                     
  823.  
  824.                                                                                           page 16
  825.  
  826.  
  827.  
  828.                           ASMRECOV assumes that listing file lines are never more than 300
  829.                         characters wide, and also automatically deletes trailing spaces from the
  830.                         records it writes to standard output.
  831.                     
  832.                           Note that this program can operate as a "filter", much the same way as
  833.                         the DOS "MORE" command.  It reads from standard input and writes to
  834.                         standard output.  Therefore, its input and/or output can be "piped" the
  835.                         same way as any other DOS filter.  See the DOS User's Guide for more
  836.                         details on filters and "piping" of standard input and standard output.
  837.                     
  838.                           The program is invoked with a command line of the form:
  839.                     
  840.                         snorun asmrecov [<iooptions>]
  841.                     
  842.                         <iooptions>::
  843.                            <<inputfile>      or
  844.                            /5=<inputfile>    or
  845.                            /5:<inputfile>
  846.                               This item allows specification of a file (or device) from which
  847.                               the listing file is to be read.  If this item is not specified at
  848.                               all, the program reads from "default standard input", which may
  849.                               be a piped input file, or even the console (although why you would
  850.                               want ASMRECOV to read from the console is beyond me!)
  851.                     
  852.                            ><outputfile>     or
  853.                            >><outputfile>    or
  854.                            /6=<outputfile>   or
  855.                            /6:<outputfile>
  856.                               This item allows specification of a file (or device) to which
  857.                               the output file is to be written.  This can be either a printer
  858.                               or a disk file, or in general any MS-DOS sequential output device.
  859.                               Note that the ">>" form appends the output to the end of the
  860.                               existing contents of the specified file, if any.  If this item
  861.                               is not specified at all, the program writes to the "default
  862.                               standard output", which may likewise be piped into another program
  863.                               or by default will appear upon the console.  This file is the
  864.                               reconstructed assembler source file.
  865.                     
  866.  
  867.                                                                                           page 17
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.                           Example command lines would look like:
  880.                     
  881.                             snorun asmrecov <program.lst >program.asm
  882.                             snorun asmrecov /5:program.lst /6:prog.asm
  883.                     
  884.  
  885.                                                                                           page 18
  886.  
  887.  
  888.  
  889.  
  890.  
  891.                     
  892.                     6.  ASMSTAT  --  GENERATE ASSEMBLER PROGRAM STATISTICS
  893.                     
  894.                           This utility program compiles some interesting statistics about assembly
  895.                         language programs.  It reads in assembly language programs (formatted
  896.                         according to the rules for Microsoft's MS-DOS assembler, although it
  897.                         would probably work with most compatible-format assembly languages) and
  898.                         produces statistics indicating the ratio of comment keystrokes to program
  899.                         keystrokes, and many other interesting statistics.  It is surprising
  900.                         to see how closely an individual programmer's statistics end up being,
  901.                         even in quite different programs.  This program can also be used to
  902.                         "screen" a series of programs, to see which might need be checked for
  903.                         adequate commenting.  The program is invoked with a command line of
  904.                         the form:
  905.                     
  906.                         snorun asmstat <<inputfilespec>
  907.                     
  908.                         Note that the first of the left-pointy-brackets above is used in the
  909.                         actual command line to redirect the input to the program from the file
  910.                         indicated by <inputfilespec>.  Alternatively, this first "<" character
  911.                         may be replaced by "/5:" or "/5=".  (These are generally the three ways
  912.                         to redirect the input file to any program based on SNORUN).
  913.                     
  914.                           Example command lines would look like:
  915.                     
  916.                             snorun asmstat <c:\asm\prog1.asm
  917.                             snorun asmstat <myprog.asm
  918.                     
  919.  
  920.                                                                                           page 19
  921.  
  922.  
  923.  
  924.                     
  925.                     7.  CASE  --  CASE CONVERSION AND FOLDING
  926.                     
  927.                           This utility program converts files containing upper and lower case
  928.                         alphabetic characters to all upper or all lower case, depending upon
  929.                         the option entered on the command line.  Options may be entered in
  930.                         either upper or lower case.  If both /U and /L options are specified,
  931.                         the program will invert the case of all alphabetic characters.  If
  932.                         no option is specified, the program displays an example command line
  933.                         with a list of available options and terminates, without processing
  934.                         the input file.  CASE can also optionally fold the 256-character IBM
  935.                         extended ASCII character set into a 128-character set, by forcing the
  936.                         high order bit to a zero.
  937.                     
  938.                           Note that this program operates as a "filter", much the same way as
  939.                         the DOS "MORE" command.  It reads from standard input and writes to
  940.                         standard output.  Therefore, its input and/or output can be "piped" the
  941.                         same way as any other DOS filter.  See the DOS User's Guide for more
  942.                         details on filters and "piping" of standard input and standard output.
  943.                     
  944.                           It also should be pointed out that the program automatically deletes
  945.                         trailing spaces at the end of each record, and that input records are
  946.                         assumed to be less than 4000 characters long.  (The limit was 1000 for
  947.                         earlier versions of this program).
  948.                     
  949.                           The program is invoked with a command line of the form:
  950.                     
  951.                         snorun case [<iooptions>][;<options>]
  952.                     
  953.                         <iooptions>::
  954.                            <<inputfile>      or
  955.                            /5=<inputfile>    or
  956.                            /5:<inputfile>
  957.                               This item allows specification of a file (or device) from which
  958.                               the input file is to be read.  If this item is not specified at
  959.                               all, the program reads from "default standard input", which may
  960.                               be a piped input file, or the console.
  961.                     
  962.  
  963.                                                                                           page 20
  964.  
  965.  
  966.  
  967.                            ><outputfile>     or
  968.                            >><outputfile>    or
  969.                            /6=<outputfile>   or
  970.                            /6:<outputfile>
  971.                               This item allows specification of a file (or device) to which
  972.                               the output file is to be written.  This can be either a printer
  973.                               or a disk file, or in general any MS-DOS sequential output device.
  974.                               Note that the ">>" form appends the output to the end of the
  975.                               existing contents of the specified file, if any.  If this item
  976.                               is not specified at all, the program writes to the "default
  977.                               standard output", which may likewise be piped into another program
  978.                               or by default will appear upon the console.
  979.                     
  980.                         <options>::
  981.                            /L                or
  982.                            /l
  983.                               This option specifies that any input file characters found in upper
  984.                               case are to be converted to lower case.
  985.                     
  986.                            /U                or
  987.                            /u
  988.                               This option specifies that any input file characters found in lower
  989.                               case are to be converted to upper case.    As mentioned before,
  990.                               note that if both /U and /L are specified, the case of the file
  991.                               is inverted (i.e. upper case input characters are converted to
  992.                               lower case and lower case input characters are converted to upper
  993.                               case).
  994.                     
  995.                            /F                or
  996.                            /f
  997.                               This option specifies that any character greater than hex 7F is to
  998.                               have its high order bit set to zero.  This "folds" the character
  999.                               set into a normal 128-character ASCII set.  This option can be
  1000.                               useful when dealing with WORDSTAR files, or those which have been
  1001.                               received using certain communications packages.  If other options
  1002.                               are also active, note that they effectively are performed after
  1003.                               the case-folding takes place.
  1004.                     
  1005.  
  1006.                                                                                           page 21
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.                           Example command lines would look like:
  1018.                     
  1019.                             snorun case <infile.txt >outfile.txt ;/U
  1020.                             snorun case <c:\mixfile.txt >c:\lower\mixfile.txt ;/L
  1021.                             snorun case /5=d:\insd\tempfile.asm /6:c:\outsd\uprcase.asm;/u
  1022.                             snorun case /5:flipinp.txt;/L /U
  1023.                     
  1024.  
  1025.                                                                                           page 22
  1026.  
  1027.  
  1028.  
  1029.                     
  1030.                     8.  CHARDF  --  CHARACTERIZE A DELIMITED FILE
  1031.                     
  1032.                           This utility program is a terrific aid if you've received a delimited
  1033.                         ASCII file which you wish to manipulate or convert to a normal ASCII
  1034.                         text file containing fixed-length-records and fixed-length-fields.  The
  1035.                         program will read one or more input files, carefully examining all the
  1036.                         records.  Upon completion of each file, statistics including the number
  1037.                         of records in the file, and how many records for each given number of
  1038.                         fields were found, is displayed.
  1039.                     
  1040.                           When all the input files have been examined, CHARDF will output the
  1041.                         total number of records examined.  It also displays the minimum size
  1042.                         possible for each of the fields, maximum number of fields found in any
  1043.                         record, and (therefore) the minimum record size sufficient to contain
  1044.                         all data from the original delimited files, without truncation.
  1045.                     
  1046.                           If the memory capacity is sufficient, an option is available which
  1047.                         causes CHARDF to create an output file containing the data from the
  1048.                         delimited records found in all of the input files.  The output file
  1049.                         records are fixed length records, containing fixed length fields.  The
  1050.                         data from the corresponding input file fields are left-justified in the
  1051.                         output file fields, and padded on the right with spaces within each
  1052.                         field.
  1053.                     
  1054.                           What is a delimited ASCII file?  It is simply a standard ASCII file.
  1055.                         Each line of the file corresponds to a single record.  Within that line,
  1056.                         there may be one or more "fields", or data items.  Data items may consist
  1057.                         of numbers, character strings, or any ASCII text.  Individual data items
  1058.                         within a line are separated by commas or "tab" characters (the ASCII
  1059.                         "tab" character has the decimal value 9).  If a data item is contained
  1060.                         within double quotes, then that data item may contain commas.  (It is
  1061.                         not a good idea to use tab characters within quoted strings, since it
  1062.                         is not clear where the "tab stops" are intended).  Quoted strings may
  1063.                         also be used where leading or trailing blanks must be retained.  In non-
  1064.                         quoted fields, leading and/or trailing blanks are eliminated.
  1065.                     
  1066.  
  1067.                                                                                           page 23
  1068.  
  1069.  
  1070.                           For example, the following lines each contain six fields and are
  1071.                         exactly equivalent:
  1072.                     
  1073.                         Mr. Thomas,3,  4.7, " yes, really!",,Jeffries
  1074.                         "Mr. Thomas","3","4.7"," yes, really!", "" ,"Jeffries"
  1075.                     
  1076.                           Delimited ASCII files are often used as a standard method of transfer
  1077.                         of multi-field data files between programs.  Delimited files are often
  1078.                         used for mail-merge files within word processors, produced by dBase III
  1079.                         or other database managers, and are easily handled by programs written
  1080.                         in BASIC.
  1081.                     
  1082.                           On the other hand, delimited files are not easily dealt with by other
  1083.                         languages, mainframes, and many utilities.  Most "serious" programs
  1084.                         expect data to be represented in fixed-size fields within fixed-length
  1085.                         records.
  1086.                     
  1087.                           CHARDF, therefore, allows you to take one or more delimited files and
  1088.                         find out rapidly:
  1089.                     
  1090.                           1.  How many records are present?
  1091.                           2.  Do all records contain the same number of fields?
  1092.                           3.  What is the maximum number of fields in any record?
  1093.                           4.  What is the size required for each field to avoid data loss?
  1094.                           5.  What is the total maximum record size needed?
  1095.                     
  1096.                           Having found out the above, CHARDF can create a fixed-length, field-
  1097.                         oriented ASCII text file which combines the data from all the input
  1098.                         files.
  1099.                     
  1100.                           One possible example of the use of CHARDF is the following:  you have
  1101.                         produced a form letter using Microsoft WORD and wish to add all the
  1102.                         addressees you've sent it to to your mainframe system's data files.  You
  1103.                         have produced a simple delimited file (with WORD's formatting removed)
  1104.                         containing all of the names and addresses, but you're not sure which
  1105.                         records have the longest data for each field and what the required format
  1106.                         needs to be for input to your mainframe.  You also would like to then
  1107.                         convert the file to a form the mainframe can handle.
  1108.                     
  1109.  
  1110.                                                                                           page 24
  1111.  
  1112.  
  1113.                           CHARDF will work with multiple input files.  Each input file record
  1114.                         (i.e. each single line) is limited to no more than 4000 characters long.
  1115.                     
  1116.                           If the creation of a fixed-length record, field-structured output file
  1117.                         is requested, the current version of CHARDF buffers the input file data
  1118.                         in memory until it has decided what the field and record sizes need to
  1119.                         be.  This eliminates the need to reread and re-parse the input files,
  1120.                         but does limit the amount of data that can be written to the field-
  1121.                         structured output file if memory overflow is to be avoided.  Typically
  1122.                         the CHARDF program permits output files up to 300K bytes or so, but
  1123.                         this number will vary according to how many records, how many fields, and
  1124.                         the like, are to be handled.  An important benefit of SNOBOL4's very
  1125.                         sophisticated memory management is that fields which contain identical
  1126.                         values are stored only once in memory, regardless of how many records
  1127.                         or fields contain that same value.  In some cases, therefore, output
  1128.                         files of quite large final size may be buffered without running out of
  1129.                         memory.
  1130.                     
  1131.                           To invoke the CHARDF program, use a command line like the following:
  1132.                     
  1133.                         snorun chardf [<iooptions>] ;<options>
  1134.                     
  1135.                         <iooptions>::
  1136.                            /4=<fieldfile>    or
  1137.                            /4:<fieldfile>
  1138.                               This item allows specification of a file (or device) to which the
  1139.                               field-oriented, fixed-length-record version of the combined input
  1140.                               file data is to be written.  If output to this file is desired, the
  1141.                               /W option should also be specified (see below).
  1142.                     
  1143.                            <<inputfile>      or
  1144.                            /5=<inputfile>    or
  1145.                            /5:<inputfile>
  1146.                               This item allows specification of a file (or device) from which
  1147.                               the input file is to be read.  If this item is not specified at
  1148.                               all, the program reads from "default standard input", which may
  1149.                               be a piped input file, or the console.  Note that this input file
  1150.                               (unit five) is the FIRST input file.
  1151.                     
  1152.  
  1153.                                                                                           page 25
  1154.  
  1155.  
  1156.  
  1157.                            ><outputfile>     or
  1158.                            >><outputfile>    or
  1159.                            /6=<outputfile>   or
  1160.                            /6:<outputfile>
  1161.                               This item allows specification of a file (or device) to which
  1162.                               the standard output is to be written.  This can be either a printer
  1163.                               or a disk file, or in general any MS-DOS sequential output device.
  1164.                               Note that the ">>" form appends the output to the end of the
  1165.                               existing contents of the specified file, if any.  If this item
  1166.                               is not specified at all, the program writes to the "default
  1167.                               standard output", which may likewise be piped into another program
  1168.                               or by default will appear upon the console.  WARNING:  CHARDF
  1169.                               can produce several different output files.  The output file
  1170.                               referred to by this item is the one which normally is directed
  1171.                               to the screen, and NOT the one containing the fixed-length, field-
  1172.                               oriented data file.
  1173.                     
  1174.                            /8=<inputfile>    or
  1175.                            /8:<inputfile>
  1176.                               This item allows specification of a file (or device) from which
  1177.                               the second input file is to be read, if any.
  1178.                     
  1179.                            /9=<inputfile>    or
  1180.                            /9:<inputfile>
  1181.                               This item allows specification of a file (or device) from which
  1182.                               the third input file is to be read, if any, and so forth, up
  1183.                               through unit number 14 (although typically less than eight input
  1184.                               files will be possible due to limitations on command line length).
  1185.                     
  1186.                         <options>::
  1187.                            /W                or
  1188.                            /w
  1189.                               This option specifies "write", and tells CHARDF that a fixed-length
  1190.                               record data file (with fixed-length fields) is to be written to the
  1191.                               output file defined in the "/4:" description.  NOTE that the
  1192.                               semicolon before the /w option is important (see the example
  1193.                               command line, above)!
  1194.                     
  1195.  
  1196.                                                                                           page 26
  1197.  
  1198.  
  1199.                     
  1200.                     9.  CHOPUP  --  CHOP UP A FILE FOR TRANSMISSION
  1201.                     
  1202.                           Sometimes it is desirable to be able to send a file by electronic mail,
  1203.                         but some electronic mail systems (notably CompuServe's EMAIL) cannot
  1204.                         deal with message files over 10K bytes in length.  If you have a file you
  1205.                         need to transmit more than 10K bytes long, the obvious approach is to
  1206.                         chop it into pieces that you can send, and allow the recipient to simply
  1207.                         put them back together at the receiving end.  Unfortunately, there are
  1208.                         no standard utilities available to facilitate the process of chopping up
  1209.                         a file.  Text files can sometimes be divided by a good editor, but what
  1210.                         could one do with a big archive or other binary file?
  1211.                     
  1212.                           The CHOPUP utility takes an input file, whether text, binary, or
  1213.                         whatever, and divides it up into pieces of 9600 bytes each.  This value
  1214.                         is comfortably under CompuServe's 10K byte message size limit.  In
  1215.                         addition, some communications packages pad XMODEM-protocol transmissions
  1216.                         to 128-byte multiples.  By using a 9600 byte message, the 128 byte
  1217.                         multiple will not pose any problem (other than perhaps at the very last
  1218.                         piece of the file, but this is usually not critical regardless).
  1219.                     
  1220.                           To facilitate its use in a batch or MAKE file, CHOPUP will automatically
  1221.                         increment the name of its output file to produce as many names as are
  1222.                         needed to contain the (subdivided) input file.  It first tries to
  1223.                         increment a number it finds in the extension of the file, and if that
  1224.                         doesn't work it tries to increment the first number it finds in the
  1225.                         filename.  NOTE THAT CHOPUP EXPECTS TO SEE A NUMBER EITHER AS PART OF
  1226.                         THE OUTPUT FILE'S EXTENSION OR NAME.  If CHOPUP cannot figure out how to
  1227.                         increment the output file name, it will abort.
  1228.                     
  1229.                           When the output files arrive at the destination end, it is a simple
  1230.                         matter to append them together using the MS-DOS "COPY" command, as
  1231.                         follows:
  1232.                     
  1233.                             COPY  A.TX1+A.TX2+A.TX3+A.TX4  A.TXT
  1234.                     
  1235.                           Please refer to your MS-DOS User's Guide for more information on the
  1236.                         use of COPY.
  1237.                     
  1238.  
  1239.                                                                                           page 27
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.                           To invoke the CHOPUP program, use a command line like the following:
  1246.                     
  1247.                         snorun chopup [<iooptions>] ;<options>
  1248.                     
  1249.                         <iooptions>::
  1250.                            /4=<inputfile>    or
  1251.                            /4:<inputfile>
  1252.                               This item allows specification of a file (or device) from which
  1253.                               the input file is to be read.
  1254.                     
  1255.                            /8=<outputfile>   or
  1256.                            /8:<outputfile>
  1257.                               This item allows specification of a file to which the first piece
  1258.                               of the input file is to be written.  This name should have a number
  1259.                               either in the extension or in the filename that CHOPUP can increment
  1260.                               on subsequent output files.
  1261.                     
  1262.                         <options>::
  1263.                            /=nnnn
  1264.                               This option specifies a different output file size to use.  The
  1265.                               number can be any decimal value up to 32767.  NOTE:  It is a good
  1266.                               idea to use only values which are multiples of 128.  NOTE that the
  1267.                               semicolon before the /= option is important (see the example
  1268.                               command line, above)!
  1269.                     
  1270.                           An example of a typical command line for the use of CHOPUP might
  1271.                         look like:
  1272.                     
  1273.                           snorun  chopup  /4=datafile.arc /8=datafile.a1 ;/=9728
  1274.                     
  1275.  
  1276.                                                                                           page 28
  1277.  
  1278.  
  1279.  
  1280.                     
  1281.                     10.  CISSTRIP  --  STRIP JUNK FROM COMPUSERVE CAPTURE FILES
  1282.                     
  1283.                           Users of CompuServe who make a habit of saving their CompuServe (or
  1284.                         other communications systems) sessions to a disk capture file may
  1285.                         notice that a lot of space is wasted in such capture files with
  1286.                         repetitive junk.  Such junk might include common prompt lines, such
  1287.                         as:
  1288.                     
  1289.                           Press <ENTER> to continue:
  1290.                     
  1291.                           Another common space waster in capture files are those "helpful"
  1292.                         menus that get displayed all the time.  Although these menus can be
  1293.                         helpful while you are online, they are generally not at all helpful
  1294.                         when enshrined forever in your retained capture files.
  1295.                     
  1296.                           The CISSTRIP utility allows you to strip the most commonly occurring
  1297.                         junk from your capture files in a painless way.  This reduces the size
  1298.                         of your capture files, saving space on disk and making it easier and
  1299.                         faster to find messages or conversations you might wish to later find
  1300.                         in them.
  1301.                     
  1302.                           CISSTRIP reads an editable file which contains exact copies of all
  1303.                         the lines you wish stripped from your capture files.  In addition,
  1304.                         CISSTRIP will also remove consecutive blank lines (i.e. four consecutive
  1305.                         blank lines will be reduced to one), trailing spaces, and backspaces that
  1306.                         your communications program is not smart enough to remove before writing
  1307.                         its capture file to disk.
  1308.                     
  1309.                           CISSTRIP's operation can be summarized in the following steps:
  1310.                     
  1311.                           1.  The file containing the "junk lines" to be stripped is read.  A
  1312.                         sample CISSTRIP.TXT file is probably included on the distribution
  1313.                         diskette, but you are encouraged to modify this file according to your
  1314.                         own requirements.  (There is nothing "magic" about it, you can modify
  1315.                         it using your favorite text editor).  This file will typically be several
  1316.                         hundred lines long.
  1317.                     
  1318.  
  1319.                                                                                           page 29
  1320.  
  1321.  
  1322.                           2.  If the "junk lines" file contains duplicate lines (i.e. lines
  1323.                         which are EXACT duplicates of each other), or null lines, the "junk lines"
  1324.                         file is automatically updated to remove the null or duplicate records.
  1325.                     
  1326.                           3.  If an output file is specified, that file is used.  If not, CISSTRIP
  1327.                         will attempt to create a temporary work file on a user-specified path.
  1328.                         (If you have a RAM drive, for example, it is usually a good idea to
  1329.                         place the work file there).  If a work file is used, CISSTRIP will copy
  1330.                         the stripped work file back over the original input file upon completion.
  1331.                     
  1332.                           4.  The input file (the capture file) is read and any record in it which
  1333.                         EXACTLY matches a record in the "junk lines" file is discarded.  Multiple
  1334.                         consecutive null lines are reduced to one blank line, and backspaces are
  1335.                         removed by eliminating each one with the preceding character on the line,
  1336.                         if any.  Remaining records are written to the output file.
  1337.                     
  1338.                           5.  When all the input records have been processed, the input and
  1339.                         output files are closed.  If a temporary work file was used, CISSTRIP
  1340.                         then copies the work file back over the original input file.
  1341.                     
  1342.                           6.  If you have a program which will reset your DOS clock (e.g. many
  1343.                         multifunction boards having a clock/calendar come with such a utility,
  1344.                         often called something like "getclock"), you can specify its name as an
  1345.                         option.  If you do so, CISSTRIP will retain the original input file's
  1346.                         date and timestamp for the output file.
  1347.                     
  1348.                           Note:  CISSTRIP does not attempt to determine the context of the lines
  1349.                         it is told to strip;  i.e. a prompt line that you tell it to remove will
  1350.                         be removed, even if it is in the middle of a message you have received
  1351.                         and was not intended by its author as a prompt.  Successful use of
  1352.                         CISSTRIP is dependent upon how well you set up the "junk lines" file
  1353.                         based upon your own personal usage patterns and requirements.
  1354.                     
  1355.                           Although CISSTRIP was developed by the author for the specific purpose
  1356.                         of cleaning up CompuServe capture files, it is by no means limited to that
  1357.                         use.  The program can actually remove any specified matching lines from
  1358.                         almost any kind of file.  With a little imagination you can probably come
  1359.                         up with a number of other fascinating ways to use it.  I'd be interested
  1360.                         in hearing what you come up with.
  1361.                     
  1362.  
  1363.                                                                                           page 30
  1364.  
  1365.  
  1366.  
  1367.                           To run CISSTRIP, the basic command line is of the form:
  1368.                     
  1369.                         snorun cisstrip <iooptions>[;<options>]
  1370.                     
  1371.                           (The "<iooptions>" and "<options>" fields will be described below).
  1372.                     
  1373.                           CISSTRIP is also designed so that it can easily handle a number of
  1374.                         capture files at once.  For example, the author's capture files have
  1375.                         file names of the form:  "CPSVmmdd.txt", where "mm" is the month and "dd"
  1376.                         is the day of the month.  A simple batch command line such as the
  1377.                         following:
  1378.                     
  1379.                         for %i in (cpsv*.txt) do snorun cisstrip /5:%i ;wpath=d: /t=getclock.exe
  1380.                     
  1381.                           will automatically strip the junk from all the CompuServe capture
  1382.                         files and update them in place.  Note that the command line specifies
  1383.                         that drive "D:" (which could be a RAM drive) is used for the temporary
  1384.                         output file(s), and that the "getclock" command will be used for
  1385.                         resetting the system clock.  For more information on the use of such
  1386.                         batch file commands, you should refer to your DOS User's Guide;  note
  1387.                         in particular that if you put this line into a batch file, you need
  1388.                         TWO "%" characters for each occurrence of the character in the line above.
  1389.                     
  1390.                           One thing users of CISSTRIP need to be careful of:  many communications
  1391.                         programs can occasionally leave hex "1A" (DOS end of file) characters
  1392.                         in the middle of their capture files.  When such a character is
  1393.                         encountered by CISSTRIP (as is true for most of the programs in this
  1394.                         package), they sincerely believe that the end of the input file has been
  1395.                         reached and all following data is therefore ignored.  THIS CAN RESULT
  1396.                         IN LOSING ALL FOLLOWING DATA FROM YOUR CAPTURE FILES.  Perhaps your
  1397.                         communications software never writes embedded hex "1A" characters into
  1398.                         your capture file (count yourself lucky!).  If you're not sure, it is
  1399.                         safest to make sure that any such characters are first eliminated from
  1400.                         your communications capture files (see the DELIEOF utility, described
  1401.                         elsewhere in this document) before running CISSTRIP.
  1402.                     
  1403.                           Note that, effective beginning with version 1.02, CISSTRIP will bypass
  1404.                         embedded end-of-file marks contained within the input file.  This makes
  1405.  
  1406.                                                                                           page 31
  1407.  
  1408.  
  1409.  
  1410.                         it less likely that important capture file data will be lost.  The
  1411.                         "bypass internal end-of-file mark" feature can be disabled, if desired,
  1412.                         by specifying the /X1A option (see below).  When the hexadecimal "1A"
  1413.                         character is skipped, note that it is not copied to the output file;
  1414.                         an informational message is also written to the screen indicating that
  1415.                         an internal EOF mark was skipped and its offset within the input file.
  1416.                     
  1417.                           CISSTRIP assumes that the system file "COMMAND.COM" is available on your
  1418.                         disk(s) under your current directory, or in your path string (see your
  1419.                         DOS User's Guide's description of the PATH command for more information).
  1420.                     
  1421.                           In the option descriptions which follow, note that you may use either
  1422.                         upper or lower case.  It makes no difference.
  1423.                     
  1424.                         <iooptions>::
  1425.                            /4=<junkfile>    or
  1426.                            /4:<junkfile>
  1427.                               This item allows specification of a file (or device) from which
  1428.                               the "junk" file is to be read.  This is the file which contains
  1429.                               examples of all the lines which you wish to be removed from the
  1430.                               capture file(s).  If you do not specify this option, CISSTRIP will
  1431.                               look for a file named "CISSTRIP.TXT" in the current directory.
  1432.                                 Note that many communications services send lines with one or
  1433.                               more leading line feeds.  These are considered by DOS to be part
  1434.                               of the following record, so these linefeed characters MUST be
  1435.                               included in the "junkfile" lines if the corresponding lines in the
  1436.                               capture file are to "match" and be stripped.
  1437.                     
  1438.                            /5=<inputfile>    or
  1439.                            /5:<inputfile>
  1440.                               This item allows specification of a file (or device) from which
  1441.                               the input file is to be read.  This is the file which contains
  1442.                               your captured communications session from which junk lines are to
  1443.                               be stripped.  This is the only one of the <iooptions> which you
  1444.                               MUST specify.  (If you do not, the program will attempt to read
  1445.                               from the console, and this will cause the program to fail since
  1446.                               the console is not a repositionable device).
  1447.                     
  1448.  
  1449.                                                                                           page 32
  1450.  
  1451.  
  1452.  
  1453.                            /8=<outputfile>   or
  1454.                            /8:<outputfile>
  1455.                               This item allows specification of a file (or device) to which
  1456.                               the output file is to be written.  This can be either a printer
  1457.                               or a disk file, or in general any MS-DOS sequential output device.
  1458.                               If this item is not specified at all, the program will attempt to
  1459.                               modify the input file name (the one specified for unit 5, above)
  1460.                               by using the "work file path" option (see below), and use that
  1461.                               as the name of the output file.
  1462.                     
  1463.                         <options>::
  1464.                            /wpath:<pathname> or
  1465.                            /wpath=<pathname> or
  1466.                            /w:<pathname>     or
  1467.                            /w=<pathname>
  1468.                               This option is used to specify the path on which the temporary
  1469.                               output work file is to be placed.  If you have specified the name
  1470.                               of a specific output file (using the /8: option as described above),
  1471.                               and that file can be opened, then this option is ignored.  See the
  1472.                               example command lines below for specific ways this option can be
  1473.                               used.  You may use either a colon or an equals sign to separate the
  1474.                               option name from the path name.  (The path name given will be
  1475.                               put at the BEGINNING of the "base portion" of the input file name
  1476.                               and the resultant string will be the name of the temporary output
  1477.                               file).
  1478.                                 If you specify this option, it is important to make sure that
  1479.                               it will in fact place the work file somewhere different than the
  1480.                               drive and subdirectory containing the input file.  IF NOT, YOU
  1481.                               MAY INADVERTENTLY OVERWRITE THE INPUT FILE DIRECTLY, WHICH MAY
  1482.                               RESULT IN THE TOTAL LOSS OF YOUR CAPTURE FILE.  CISSTRIP tries to
  1483.                               prevent this from occurring, but it can be fooled by names which
  1484.                               appear to be different but in fact end up referencing the exact
  1485.                               same file.  BE CAREFUL!
  1486.                     
  1487.                            /time:<progname>  or
  1488.                            /time=<progname>  or
  1489.                            /t:<progname>     or
  1490.  
  1491.                                                                                           page 33
  1492.  
  1493.  
  1494.  
  1495.                            /t=<progname>
  1496.                               This option specifies the name of your program which can reset
  1497.                               your DOS clock from your battery-backed-up system clock.  If this
  1498.                               option is specified, CISSTRIP will be able to retain the same date
  1499.                               and time stamp on its output file as there was on the input file.
  1500.                               If you have no such program, or don't understand the need for this
  1501.                               option, you can safely ignore it.
  1502.                     
  1503.                            /x1A
  1504.                               This option specifies that the presence of a hexadecimal "1A"
  1505.                               character in the input file is to be taken as a genuine end-of-file
  1506.                               mark, even if the MS-DOS directory entry for the input file
  1507.                               indicates that there is supposed to be additional file data
  1508.                               following it.  Specifying this option could result in the loss
  1509.                               of data if a communications line error results in a hex "1A"
  1510.                               character being captured into your capture file.  This option
  1511.                               (and the ability to bypass embedded EOF mark bytes) only applies
  1512.                               to the input file specified as unit 5 (i.e. the file from which
  1513.                               the "junk" lines are to be stripped) and not the file defining
  1514.                               which lines are "junk", i.e. unit 4.
  1515.                     
  1516.                            NOTE:  If any of the above options are specified, don't forget the
  1517.                               semicolons separating them from the <iooptions>.  The semicolon IS
  1518.                               important.
  1519.                     
  1520.                           Example command lines might look like:
  1521.                     
  1522.                         snorun cisstrip /4:c:\junkfile.txt /5:c:\modem\comm.cap /6:a:comms.cap
  1523.                         snorun cisstrip /5:cpsv0104.txt ;/w=d: /t=c:\mfcard\getclock
  1524.                         snorun cisstrip /5:received.txt ; wpath:c:\scratch
  1525.                     
  1526.                           NOTE:  CISSTRIP is being distributed in different versions.  The
  1527.                         shareware version includes a shareware information screen, and may be
  1528.                         freely distributed.  The version for registered users is personalized
  1529.                         and must not be distributed to anyone other than the user to which it
  1530.                         is personally registered.
  1531.                     
  1532.  
  1533.                                                                                           page 34
  1534.  
  1535.  
  1536.                     
  1537.                     11.  COMBINE  --  COMBINE FILES AND ELIMINATE DUPLICATES
  1538.                     
  1539.                           This program combines two to four files, eliminating in the process all
  1540.                         records which are EXACT duplicates of another.  In other words, if all
  1541.                         of the input files, together, contain four records consisting of simply
  1542.                         "**", the output file produced by COMBINE will contain just one such
  1543.                         record.
  1544.                     
  1545.                           As an example, suppose that you have a name and address file which
  1546.                         contains one record for each of your friends.  You have copies of this
  1547.                         file on your personal computer at home, as well as your computer at the
  1548.                         office.  Occasionally, you make additions to the file, and don't always
  1549.                         remember to update the other copy right away.  After several additions
  1550.                         in each place, as well as perhaps some changes to existing records, it is
  1551.                         difficult to combine the two files, ensuring that all additions to any
  1552.                         of its separate copies are reflected in the new, consolidated file.
  1553.                         With COMBINE, you can handle such problems with ease.
  1554.                     
  1555.                           It is important to recognize that COMBINE does not attempt to discern
  1556.                         whether or not two records, which originally were identical, are now
  1557.                         different because of a change made to one of the copies.  It simply
  1558.                         observes that they are now different.  Therefore, the output file of
  1559.                         COMBINE can of course contain records which reflect multiple generations
  1560.                         of the same input record.  Even if it could detect that the almost-
  1561.                         duplicate records were modified copies of the same record, it would
  1562.                         certainly be impossible to determine automatically which is the "newest"
  1563.                         and which data in which copy of the record might be outdated.  The
  1564.                         easiest way to deal with such problems is to use the "sort" option,
  1565.                         described below.  Use of this option causes records which start out the
  1566.                         same, at least, to group together where they can be visually checked
  1567.                         for similarity.
  1568.                     
  1569.                           This program requires that the output file (after elimination of
  1570.                         duplicates) is small enough to be kept in available memory... usually
  1571.                         around 300K or so.  Most files applicable to this sort of processing are
  1572.                         smaller than that size.  COMBINE has several other characteristics which
  1573.                         might affect some users:  it eliminates trailing blanks, if any, at the
  1574.                         end of each record;  it assumes that input records are 4000 characters
  1575.                         (or less) each;  and it removes null lines in addition to duplicates.
  1576.                     
  1577.  
  1578.                                                                                           page 35
  1579.  
  1580.  
  1581.                           To use COMBINE, enter a command line like:
  1582.                     
  1583.                         snorun  combine  /1=<infile> ... /4=<infile> /6=<outfile> ;<options>
  1584.                     
  1585.                           You are allowed up to four input files, numbered one to four.  The
  1586.                         separator after each input file number may be a ":", a "=", or omitted
  1587.                         entirely if you prefer.  In the resulting output file, the input records
  1588.                         (those which are not duplicates) appear in sequence:
  1589.                     
  1590.                            1)  records from input file 1
  1591.                            2)  records from input file 2
  1592.                            3)  records from input file 3
  1593.                            4)  records from input file 4
  1594.                     
  1595.                           Records (unless the SORT option is specified) are not sorted or
  1596.                         otherwise reordered during the COMBINE operation.  Note that duplicates
  1597.                         are removed even if they occur within one input file.  They do not have
  1598.                         to be adjacent for COMBINE to find and remove the multiple copies.
  1599.                     
  1600.                           In order to be considered "duplicates", records (after trailing blanks
  1601.                         have been removed) must match exactly, character for character.  Upper
  1602.                         and lower case characters are considered different during this comparison.
  1603.                         Likewise, tab characters are treated just as any other character, and must
  1604.                         match exactly in order for two records to be treated as identical.
  1605.                     
  1606.                         <options>::=
  1607.                            /S               or
  1608.                            /s
  1609.                               This option specifies that the output file, once duplicates
  1610.                               have been removed, is to be sorted alphabetically (according to
  1611.                               the ASCII collating sequence).  This can sometimes help to locate
  1612.                               "almost-duplicate" records that have been modified in only one of
  1613.                               the several copies of a file, by bringing them together in the
  1614.                               output file.  Note that, as mentioned above, this will typically
  1615.                               not help unless the first part of each record is the same;
  1616.                               otherwise, they will generally sort "apart" rather than together.
  1617.                               NOTE:  If you use the /s option, be careful to include the ";"
  1618.                               before the /s.  It IS important.
  1619.                     
  1620.  
  1621.                                                                                           page 36
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.                           Typical command lines for COMBINE might look like:
  1634.                     
  1635.                         snorun  combine  /1:input1.fil /2:input2.fil /6:output.fil
  1636.                         snorun  combine  /2:a.txt /3:b.txt /4:c.txt /6=abc.txt ;/s
  1637.                     
  1638.  
  1639.                                                                                           page 37
  1640.  
  1641.  
  1642.                     
  1643.                     12.  COPYSEG  --  COPY A FILE TO MULTIPLE SEGMENTS
  1644.                     
  1645.                           If you've ever had a big file you needed to put onto floppy disks or
  1646.                         other such "small" devices, you probably have wondered how one goes
  1647.                         about transferring a file which is too big to fit on a single floppy
  1648.                         disk.  The answer to the problem:  use COPYSEG.
  1649.                     
  1650.                           COPYSEG will copy either an ASCII text or binary input file to one or
  1651.                         more output files.  If there is not enough space on the output volume to
  1652.                         copy the entire input file, COPYSEG will copy as much as will fit, then
  1653.                         increment the file name, and continue copying to the new file, and so on,
  1654.                         until the entire input file has been copied.
  1655.                     
  1656.                           When an output file must be written as multiple segments, COPYSEG will
  1657.                         propose an incremented file name for each additional segment.  File names
  1658.                         are incremented by incrementing the first number COPYSEG finds in the
  1659.                         extension part of the file name, if any.  If there is no numeric part in
  1660.                         the extension, then COPYSEG will try to increment the first numeric
  1661.                         part it finds in the file name.  (The user is responsible to make sure
  1662.                         that there is enough space in the extension or name for the number to
  1663.                         be incremented as many times as necessary).
  1664.                     
  1665.                           For example, here are some possible file names and the corresponding
  1666.                         incremented names that would be generated:
  1667.                     
  1668.                              JUNK.TX1               JUNK.TX2
  1669.                              JUNK1.TX4              JUNK1.TX5
  1670.                              J1NK2.TXT              J2NK2.TXT
  1671.                              JUNK9A.TXT             JUNK10A.TXT
  1672.                     
  1673.                           When COPYSEG proposes the incremented file name for an additional output
  1674.                         file segment, the user may accept the suggestion (this is a good time to
  1675.                         change the floppy disk if needed), give the program a different output
  1676.                         drive and/or file name if desired, or can terminate the program.
  1677.                     
  1678.                           If COPYSEG cannot increment the file name (generally this is because
  1679.                         neither the file name or extension contain any numbers), the user is
  1680.                         given the chance to tell COPYSEG what drive and filename are to be used
  1681.                         for the next segment to be written.
  1682.                     
  1683.  
  1684.                                                                                           page 38
  1685.  
  1686.  
  1687.  
  1688.                           COPYSEG is designed to be interactive, and it continually advises the
  1689.                         operator of its assumptions and activity during the operation.
  1690.                     
  1691.                           If the file being copied seems to be an ASCII text file, COPYSEG will
  1692.                         try to copy only complete text records to each output segment.  If the
  1693.                         file being copied appears to be a binary file, COPYSEG will copy as much
  1694.                         of the input file to each output segment as it possibly can.  COPYSEG
  1695.                         decides whether the input file is an ASCII text file or a binary file by
  1696.                         reading the first portion of the input file and performing a character
  1697.                         occurrence analysis.  This usually is reliable.  However, for unusual
  1698.                         cases, this can be overriden by a command line option when necessary.
  1699.                     
  1700.                           To use COPYSEG, the command line is of the form:
  1701.                     
  1702.                         snorun  copyseg  <iooptions> [;<options>]
  1703.                     
  1704.                         <iooptions>::
  1705.                            /3=<inputfile>    or
  1706.                            /3:<inputfile>
  1707.                               This item allows specification of the input file which is to
  1708.                               be copied.  Note that this must be a file, not a device, since
  1709.                               it must be positionable:  COPYSEG processes this file using
  1710.                               random access.
  1711.                     
  1712.                            /4=<outputfile>   or
  1713.                            /4:<outputfile>
  1714.                               This item allows specification of the first file to which the
  1715.                               output of COPYSEG is to be written.  Don't forget to include the
  1716.                               drive specification if necessary.  WARNING:  Be careful to make
  1717.                               sure that the output file specified (and any incrementation of
  1718.                               that name that COPYSEG may perform) will not end up being the same
  1719.                               file as the input file.  If this occurs, it can cause the input
  1720.                               file to be overwritten and possibly destroyed.
  1721.                     
  1722.                         <options>::
  1723.                            /B                or
  1724.                            /b
  1725.  
  1726.                                                                                           page 39
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.                               This option is used to specify that the file is to be treated
  1737.                               as a binary file, regardless of whether it appears to be an ASCII
  1738.                               text file or not.  NOTE:  Don't forget the semicolon on the command
  1739.                               line between the <iooptions> and the regular options.  It IS
  1740.                               important.
  1741.                     
  1742.                           As a few examples, typical command lines to COPYSEG might look like:
  1743.                     
  1744.                         snorun copyseg /3=c:\prtfiles\report.prt /4=a:report.pr1
  1745.                         snorun copyseg /3:utilsdoc.prt /4:a:utilsdoc.p1
  1746.                         snorun copyseg /3=bigarc.arc /4=a:bigarc.ar0 ;/b
  1747.                     
  1748.  
  1749.                                                                                           page 40
  1750.  
  1751.  
  1752.                     
  1753.                     13.  CPRANGE  --  COPY RANGES OF RECORDS
  1754.                     
  1755.                           This utility program is useful when you want to extract one or more
  1756.                         series of records from one file and place them into another file.  This
  1757.                         is especially useful when the input file is large, or contains long
  1758.                         records, and doing the extraction with a normal editor would be tedious
  1759.                         or impossible.
  1760.                     
  1761.                           Note that this program operates as a "filter", much the same way as
  1762.                         the DOS "MORE" command.  It reads from standard input and writes to
  1763.                         standard output.  Therefore, its input and/or output can be "piped" the
  1764.                         same way as any other DOS filter.  See the DOS User's Guide for more
  1765.                         details on filters and "piping" of standard input and standard output.
  1766.                     
  1767.                           CPRANGE will work with files containing arbitrary numbers of records.
  1768.                         Each record may be up to 4000 bytes long.  Note:  all trailing spaces
  1769.                         are removed from input records before they are written to the output
  1770.                         file.  If this is undesirable, (typically when the records are supposed
  1771.                         to be a fixed, known length) the output file records may be repadded to
  1772.                         the desired length (see the PADREC utility).  (Note that the record size
  1773.                         limit was 1000 for some older versions of this program).
  1774.                     
  1775.                           The ranges of records which are copied by CPRANGE are determined by
  1776.                         giving a starting key string and an ending key string.  In this way, the
  1777.                         starting and ending records of each sequence to be copied are determined
  1778.                         by context and not by something artificial such as a line number.
  1779.                         CPRANGE will find the key string anywhere in the input records, (it does
  1780.                         not have to be field-aligned).  However, note that the key string IS
  1781.                         case-sensitive;  a specified key string of "ABC" will NOT match a record
  1782.                         containing the string "Abc".
  1783.                     
  1784.                           The CPRANGE program is normally in one of two modes:  it is scanning,
  1785.                         looking for the start of a sequence of records to be copied;  or, it is
  1786.                         copying, looking for the end of the current sequence.
  1787.                     
  1788.                           The program is invoked with a command line of the form:
  1789.                     
  1790.                         snorun cprange [<iooptions>];<options>
  1791.                     
  1792.  
  1793.                                                                                           page 41
  1794.  
  1795.  
  1796.  
  1797.                         <iooptions>::
  1798.                            <<inputfile>      or
  1799.                            /5=<inputfile>    or
  1800.                            /5:<inputfile>
  1801.                               This item allows specification of a file (or device) from which
  1802.                               the input file is to be read.  If this item is not specified at
  1803.                               all, the program reads from "default standard input", which may
  1804.                               be a piped input file, or the console.
  1805.                     
  1806.                            ><outputfile>     or
  1807.                            >><outputfile>    or
  1808.                            /6=<outputfile>   or
  1809.                            /6:<outputfile>
  1810.                               This item allows specification of a file (or device) to which
  1811.                               the output file is to be written.  This can be either a printer
  1812.                               or a disk file, or in general any MS-DOS sequential output device.
  1813.                               Note that the ">>" form appends the output to the end of the
  1814.                               existing contents of the specified file, if any.  If this item
  1815.                               is not specified at all, the program writes to the "default
  1816.                               standard output", which may likewise be piped into another program
  1817.                               or by default will appear upon the console.
  1818.                     
  1819.                         <options>::
  1820.                            /S:<key>          or
  1821.                            /S=<key>          or
  1822.                            /s:<key>          or
  1823.                            /s=<key>
  1824.                               This option specifies the starting pattern.  The starting pattern
  1825.                               is the pattern which, when found in an incoming record, causes that
  1826.                               record (and the ones following) to be copied to the output file.
  1827.                               The format of the <key> item is described below.
  1828.                                 If no starting key is specified, the program will go immediately
  1829.                               into copy mode and copy until a record containing the ending key
  1830.                               is copied.
  1831.                     
  1832.                            /E:<key>          or
  1833.                            /E=<key>          or
  1834.  
  1835.                                                                                           page 42
  1836.  
  1837.  
  1838.  
  1839.                            /e:<key>          or
  1840.                            /e=<key>
  1841.                               This option specifies the ending pattern.  The ending pattern is
  1842.                               the pattern which, when found in a record of a sequence being
  1843.                               copied to the output file, causes the program to revert to scan
  1844.                               mode (looking for the starting pattern), beginning with the next
  1845.                               record of the input file.  The format of the <key> item is
  1846.                               described below.
  1847.                                 If no ending key is specified, the program, once it begins to
  1848.                               copy records of a sequence, will copy all remaining input records
  1849.                               until the end of the input file is reached.
  1850.                     
  1851.                            /R                or
  1852.                            /r
  1853.                               This option specifies "repeat".  It causes the same set of starting
  1854.                               and ending keys to be used again and again, until the input file
  1855.                               has reached end of file.
  1856.                                 If this option is NOT specified, CPRANGE will (when it has
  1857.                               completed copying a sequence of records as specified) look on the
  1858.                               command line for another set of starting and ending keys, and
  1859.                               continue operation (from the current location in the input file)
  1860.                               using the new starting and ending keys.
  1861.                                 NOTE:  If the /R option has been specified anywhere on the command
  1862.                               line, then only the first starting and ending keys found on the
  1863.                               command line will be used.
  1864.                     
  1865.                         <key>::
  1866.                            "string"          or
  1867.                            'string'          or
  1868.                            string
  1869.                               The key may be specified as a simple string of characters, if it
  1870.                               contains no commas or spaces.  In this case, the key string
  1871.                               (which must be found exactly in a record to start or end a sequence
  1872.                               of records to be copied) begins with the character immediately
  1873.                               following the ":" or "=", and continues up to (but not including)
  1874.                               the next space or comma, or to the end of the entered command line.
  1875.                                 If the key to be searched for contains commas or spaces, then it
  1876.  
  1877.                                                                                           page 43
  1878.  
  1879.  
  1880.  
  1881.                               must be surrounded by quotation marks.  Either single or double
  1882.                               quotes may be used;  if your key string contains one or more double
  1883.                               quote characters, then surround it with single quotes.  If your
  1884.                               key string contains one or more single quote characters, then
  1885.                               surround it with double quotes.  If your key string has to contain
  1886.                               both single and double quotes, then eliminate the spaces and commas
  1887.                               and use the form which does not require surrounding quote marks.
  1888.                     
  1889.                           The CPRANGE program is normally in one of two modes:  it is scanning,
  1890.                         looking for the start of a sequence of records to be copied;  or, it is
  1891.                         copying, looking for the end of the current sequence.
  1892.                     
  1893.                           For example, if you had an assembly language source file and you
  1894.                         wanted to extract all the subroutines, you could use a command line
  1895.                         like the following:
  1896.                     
  1897.                         snorun cprange <input.asm >inputsr.asm;/s=proc /e=endp /r
  1898.                     
  1899.                         Note that "proc" will match any appearance of the four letters "proc",
  1900.                         even if they are contained completely within another word.
  1901.                     
  1902.                           As another example, suppose that you had been printing a file when
  1903.                         the printer jammed, and the last third of the file printed onto the same
  1904.                         single (by now very black!) line.  You notice that the first line of the
  1905.                         page on which the printer jammed had a page heading that included the
  1906.                         exact character string "PAGE  1776".  You can restart your printing there
  1907.                         by using the command line:
  1908.                     
  1909.                         snorun cprange <myfile.prt >prn;/s="PAGE  1776"
  1910.                     
  1911.                           NOTE:  Each time that CPRANGE looks for starting and ending keys to
  1912.                         define a sequence of records, it takes the NEXT starting and the NEXT
  1913.                         ending key that it finds on the command line.  The order in which they
  1914.                         appear on the command line is not significant.  Therefore, the command
  1915.                         line:
  1916.                     
  1917.                         snorun cprange <input.txt >a:output.txt;/E:ABC,S:/DEF,/E:GHI
  1918.                     
  1919.  
  1920.                                                                                           page 44
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.                         will NOT copy the sequence starting from the first record through the
  1931.                         record containing "ABC", followed by the sequence beginning with a
  1932.                         record containing "DEF" through a record containing "GHI".  Instead,
  1933.                         what the above command line will actually do is to copy a sequence
  1934.                         of records beginning with a record containing "DEF" through a record
  1935.                         containing "ABC", and then additionally copy the following records,
  1936.                         until it finally has copied a record containing "GHI".
  1937.                     
  1938.                           If your key string includes spaces, note that spaces and space produced
  1939.                         by tab characters are not the same (although they typically look the
  1940.                         same on the screen or on a printer).
  1941.                     
  1942.  
  1943.                                                                                           page 45
  1944.  
  1945.  
  1946.  
  1947.                     
  1948.                     14.  DELALL  --  DELETE ALL MATCHING FILES
  1949.                     
  1950.                           This utility program searches through the indicated path and deletes
  1951.                         all files from it that match the indicated skeleton.  Intended for use
  1952.                         in batch and "make" files, the command DOES NOT ASK FOR CONFIRMATION.
  1953.                     
  1954.                           DELALL will optionally list the path and name of each file as it is
  1955.                         deleted.  Due to the danger inherent in deleting files, a command line
  1956.                         option must be present in order for the automatic deletion to take
  1957.                         place.  If that option is not present, DELALL simply lists those files
  1958.                         which match the indicated path and would (therefore) be deleted if the
  1959.                         option had been specified.  Due to the same danger, DELALL will not
  1960.                         delete files outside of the single subdirectory specified.
  1961.                     
  1962.                           To use the DELALL program, enter the command line:
  1963.                     
  1964.                         snorun delall <iooptions>[;<options>]
  1965.                     
  1966.                           Options, as usual, may be entered in either upper or lower case.
  1967.                     
  1968.                         <iooptions>::
  1969.                            ><outputfile>     or
  1970.                            >><outputfile>    or
  1971.                            /6=<outputfile>   or
  1972.                            /6:<outputfile>
  1973.                               This option allows specification of a file (or device) to which
  1974.                               the output file is to be written.  This can be either a printer
  1975.                               or a disk file, or in general any MS-DOS sequential output device.
  1976.                               Note that the ">>" form appends the output to the end of the
  1977.                               existing contents of the specified file, if any.  This file is the
  1978.                               output which would ordinarily be written on the screen.  You might
  1979.                               wish to keep this file as a record of which files were deleted.
  1980.                     
  1981.                         <options>::
  1982.                            path=<pathname>   or
  1983.                            /p=<pathname>
  1984.  
  1985.                                                                                           page 46
  1986.  
  1987.  
  1988.  
  1989.                               This option allows specification of the path name and skeleton
  1990.                               file spec that describes the files to be deleted.  Examples are:
  1991.                                     c:\asm\lst\             <--- all files in the subdirectory
  1992.                                     c:\asm\lst\*.lst        <--- only those files ending in .LST
  1993.                                     c:\asm\xyz.             <--- only a single file (not subdir)
  1994.                     
  1995.                               Note that you can also specify the prefix part of a file name
  1996.                               as well as the name of a subdirectory.  In this case, DELALL
  1997.                               will delete all files beginning with the given prefix part.  An
  1998.                               example of using DELALL to delete all files beginning with CL in
  1999.                               a given subdirectory (DOS) might be something like:
  2000.                                     snorun delall ;path=c:\dos\cl /f /d
  2001.                               This example would delete, for example,
  2002.                                     c:\dos\clock.exe
  2003.                                     c:\dos\clearmem.com
  2004.                                     c:\dos\clubroll.txt
  2005.                     
  2006.                            /dpo
  2007.                               This option causes no file deletion, but merely displays the
  2008.                               effective path name that would be used for the lookup.  This
  2009.                               is NOT a particularly useful option.
  2010.                     
  2011.                            file             or
  2012.                            /f
  2013.                               This option causes the output to include an entry for each file
  2014.                               that is (or would have been) deleted.
  2015.                     
  2016.                            /k               or
  2017.                            killem
  2018.                               This option specifies that any files matching the path name and
  2019.                               file skeleton given in the PATH option are really and truly to be
  2020.                               deleted.  NOTE:  DELALL makes no attempt to delete subdirectory
  2021.                               files, volume names, or files with the HIDDEN, SYSTEM, or READ-
  2022.                               ONLY attributes (see your DOS User's Guide for more details on the
  2023.                               meaning of these attributes if this is unfamiliar to you).
  2024.                     
  2025.  
  2026.                                                                                           page 47
  2027.  
  2028.  
  2029.                     
  2030.                     15.  DELIEOF  --  FIND AND DELETE INTERNAL EOF MARKS
  2031.                     
  2032.                           Occasionally when one appends text files (usually occurring as the
  2033.                         result of the capture of a communications session) the text files will
  2034.                         contain hex "1A" characters, either as a result of the closing of the
  2035.                         communications session or as the result of noisy communications lines.
  2036.                         (It would be nice if the communications program would make sure these
  2037.                         don't find their way into capture files, but many communications
  2038.                         programs are evidently not that clever).
  2039.                     
  2040.                           This is serious only because DOS takes those characters to indicate
  2041.                         the end of the file.  Many DOS utilities, including many of those in
  2042.                         this package, will stop processing their input file upon reaching a
  2043.                         hex "1A" character, and anything occurring after that (which might
  2044.                         include a subsequent communications session) can get lost in the
  2045.                         process.
  2046.                     
  2047.                           Although such lost capture data can usually be recovered (if you notice
  2048.                         it often enough) using the EXTEND utility (described elsewhere in this
  2049.                         package), the safer alternative is to process files prone to contain
  2050.                         such erroneous characters, and remove them, prior to handling the files
  2051.                         with other programs.
  2052.                     
  2053.                           DELIEOF is an interactive program which allows you to search for
  2054.                         internal EOF mark characters that might be placed in a text file.  Upon
  2055.                         finding each one, DELIEOF gives the operator the choice of whether to
  2056.                         retain it, replace it with an ASCII space, or exit the program.  A
  2057.                         command line option allows the operator to pre-answer all the questions
  2058.                         for a session, if desired.
  2059.                     
  2060.                           WARNING:  Executable or other binary files will often happen to contain
  2061.                         hex "1A" characters as instructions or other binary data.  Such files,
  2062.                         if processed by DELIEOF, can be irreparably damaged.  Use DELIEOF only
  2063.                         on files which contain editable ASCII text data.
  2064.                     
  2065.                           To use the DELIEOF utility program, use a command line of the form:
  2066.                     
  2067.                         snorun delieof <iooptions>[;<options>]
  2068.                     
  2069.  
  2070.                                                                                           page 48
  2071.  
  2072.  
  2073.                         <iooptions>::
  2074.                            /4=<filespec>     or
  2075.                            /4:<filespec>
  2076.                               This option allows specification of the disk file which is to be
  2077.                               searched for internal end-of-file mark characters.  Make certain
  2078.                               that any file specified be an EDITABLE ASCII TEXT FILE.  Other
  2079.                               types of files, especially .EXE or .COM files, can be damaged
  2080.                               irreparably by DELIEOF.
  2081.                     
  2082.                            ><outputfile>     or
  2083.                            >><outputfile>    or
  2084.                            /6=<outputfile>   or
  2085.                            /6:<outputfile>
  2086.                               This item allows specification of a file (or device) to which
  2087.                               the output file is to be written.  This can be either a printer
  2088.                               or a disk file, or in general any MS-DOS sequential output device.
  2089.                               Note that the ">>" form appends the output to the end of the
  2090.                               existing contents of the specified file, if any.  If this item
  2091.                               is not specified at all, the program writes to the "default
  2092.                               standard output", which may likewise be piped into another program
  2093.                               or by default will appear upon the console.
  2094.                                 NOTE:  This option should normally only be used if the /Y or
  2095.                               /N option is specified, see below.
  2096.                     
  2097.                         <options>::
  2098.                            /Y
  2099.                               This option allows the processing of the specified file without
  2100.                               further operator intervention.  All hex "1A" bytes found in the
  2101.                               file will be changed to ASCII spaces.  This option may appear in
  2102.                               either upper or lower case, but note that the semicolon before the
  2103.                               option on the command line IS important.
  2104.                     
  2105.                            /N
  2106.                               This option allows the processing of the specified file without
  2107.                               further operator intervention.  All hex "1A" bytes found in the
  2108.                               file will be commented on but left "as is".  The file will not
  2109.                               be changed.  This option may appear in either upper or lower case,
  2110.                               but note that the semicolon before the option on the command line
  2111.                               IS important.
  2112.                     
  2113.  
  2114.                                                                                           page 49
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.                           Some typical DELIEOF command lines might look like:
  2127.                     
  2128.                         snorun delieof /4:cpsv0101.txt ;/y
  2129.                         snorun delieof /4=e:\tempdir\capture.txt
  2130.                     
  2131.  
  2132.                                                                                           page 50
  2133.  
  2134.  
  2135.  
  2136.                     
  2137.                     16.  DIFFER  --  FIND DIFFERENCES IN TWO TEXT FILES
  2138.                     
  2139.                           This utility program compares two text files and indicates how many
  2140.                         areas in the file have been changed.  A report is produced to compare the
  2141.                         changed areas.
  2142.                     
  2143.                           The program is basically the work of P.R. Tallett, Datacall Ltd,
  2144.                         Kirkstall Rd., Leeds, England.  It has been elaborated somewhat by A. P.
  2145.                         McCann.  Inclusion of line numbers and slight rework for the IBM PC
  2146.                         version has been done by David Shields and Robert Dewar.  Several bugs
  2147.                         in command line scanning and end-of-file handling have been corrected
  2148.                         by Gordon Peterson II.
  2149.                     
  2150.                           The program is invoked by a command line of the form:
  2151.                     
  2152.                         differ <file1> <file2> <outfile> [<options>]
  2153.                     
  2154.                           The first two file specs define the two input files to be compared,
  2155.                         and these two must be present.  The third file spec, if present,
  2156.                         defines where the output file is to go.  This can be either a disk file
  2157.                         or a device (such as CON, PRN, or LPTn).  If no output file is specified,
  2158.                         the console is assumed.  (Note that if the /W format is being routed to
  2159.                         the console, it is much more readable if /W39 is specified).
  2160.                     
  2161.                         <options>::
  2162.                            /M
  2163.                               This option forces blank lines to match in compared files.  The
  2164.                               default is that blank lines are ignored during the matching
  2165.                               process.
  2166.                     
  2167.                            /L[n][+]
  2168.                               This option specifies that "n" lines must be found identical before
  2169.                               the program can assume the files are again in parallel.  The
  2170.                               default is 3.  If the + is found, then the listing includes the
  2171.                               n lines which were the same.  The default is that only the first
  2172.                               such line matching gets included in the listing.
  2173.                     
  2174.  
  2175.                                                                                           page 51
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.                            /Rc
  2182.                               Normally, any character found in either input file less than 20H
  2183.                               is replaced by a "?" character in the output report.  If this
  2184.                               option is specified, the character specified as "c" specifies an
  2185.                               alternate replacement character to use instead.
  2186.                     
  2187.                            /X
  2188.                               This option prevents the replacement of characters less than 20H
  2189.                               in the output report.  (They are retained and output as found in
  2190.                               the input files).
  2191.                     
  2192.                            /W[n][-]
  2193.                               This option specifies that a double column listing format is to be
  2194.                               used.  Use of this option is recommended.  The first "n" characters
  2195.                               of each line (one from file1, one from file2) are printed side by
  2196.                               side, making the comparison easier.  The total line length is 2n + 2
  2197.                               including the separator characters.  Default is 65.  The "-" sign,
  2198.                               if present, reduces the length of the line of asterisks separating
  2199.                               the blocks of different code.  The "-" option, which might be useful
  2200.                               on slow printers, is not really recommended.
  2201.                     
  2202.                            Example:
  2203.                               To compare "OLDVER.TXT" with "NEWVER.TXT" and print a file of the
  2204.                               changes, the suggested command line would be:
  2205.                     
  2206.                               differ oldver.txt newver.txt prn /W
  2207.                     
  2208.  
  2209.                                                                                           page 52
  2210.  
  2211.  
  2212.                     
  2213.                     17.  DIRCMP2  --  COMPARE FILES IN DIFFERENT SUBDIRECTORIES
  2214.                     
  2215.                           This utility program allows comparing the files within specified
  2216.                         directories.  The directories may be on the same or different disk
  2217.                         volumes, and may also be network volumes running within, for example,
  2218.                         PC network.  The program is invoked with a command line of the form:
  2219.                     
  2220.                         snorun dircmp2 [<iooptions>];CMDFILE=<cmdfile>[,BATFILE=<outputfile>]
  2221.                     
  2222.                         <iooptions>::
  2223.                            ><outputfile>     or
  2224.                            >><outputfile>    or
  2225.                            /6=<outputfile>   or
  2226.                            /6:<outputfile>
  2227.                               This item allows specification of a file (or device) to which
  2228.                               the output file is to be written.  This can be either a printer
  2229.                               or a disk file, or in general any MS-DOS sequential output device.
  2230.                               Note that the ">>" form appends the output to the end of the
  2231.                               existing contents of the specified file, if any.  If this item
  2232.                               is not specified at all, the program writes to the "default
  2233.                               standard output", which may likewise be piped into another program
  2234.                               or by default will appear upon the console.
  2235.                     
  2236.                         The CMDFILE contains entries of the form:
  2237.                     
  2238.                         MATCH  C:\,D:\
  2239.                         MATCH  D:\ASM\SRCPROG  F:\ASM\SRCPROG
  2240.                         MATCH  D:\PROG, D:\PROG\BACKUP
  2241.                     
  2242.                           Each of these entries define a pair of subdirectories (and the drives on
  2243.                         which they are located) which are to be compared.  NOTE:  In version
  2244.                         1.01 of DIRCMP2, the command lines must be in upper case as shown.  In
  2245.                         later versions, these command file lines are case-insensitive.
  2246.                     
  2247.                           The separator between the two subdirectories may include an optional
  2248.                         comma, followed by zero or more spaces, as long as some such separator
  2249.                         obviously divides the two subdirectories.  ASCII tab characters are
  2250.                         also legal;  they are treated as spaces.
  2251.                     
  2252.  
  2253.                                                                                           page 53
  2254.  
  2255.  
  2256.  
  2257.  
  2258.                           There are three output streams from the program:
  2259.                     
  2260.                           Display output (written to SCREEN) includes progress messages which
  2261.                         are displayed on the screen as each new directory is read from the
  2262.                         specified drive.  This output stream cannot normally be redirected.
  2263.                     
  2264.                           Standard output (written to OUTPUT) includes an echo of each entered
  2265.                         command received.  This is followed by a listing of all files in the
  2266.                         two subdirectories which are of different age or size, as well as those
  2267.                         which are missing from one or the other of the directories.  Note that
  2268.                         the program will not process MATCH commands where one or the other of
  2269.                         the two subdirectories is missing or contains no files (and lower-
  2270.                         level subdirectories do not count as a file for the purpose of this
  2271.                         test!)  This stream is normally redirected (see the discussion of
  2272.                         I/O options above) to either the printer or an output file for subsequent
  2273.                         analysis.
  2274.                     
  2275.                           Batch output (written if the BATFILE= option is specified) consists of
  2276.                         a batch file which includes COPY commands which update older versions
  2277.                         of files from the newer versions, and copies over files which previously
  2278.                         were missing from one or the other of the corresponding subdirectories.
  2279.                     
  2280.                           DIRCMP2 is a very useful tool for maintaining, for example, a series of
  2281.                         subdirectories which include files being maintained by separate
  2282.                         programmers.  It also is very useful if a programmer is maintaining
  2283.                         a file server subdirectory, but updates his own personal copy on his
  2284.                         own machine and then periodically wants to update the later versions
  2285.                         to the generally-available copies on the file server.  Another good use
  2286.                         for DIRCMP2 is when one receives a software update for some package, and
  2287.                         is interested in finding out which of the many files on the update disk
  2288.                         are unchanged from the previous version.
  2289.                     
  2290.  
  2291.                                                                                           page 54
  2292.  
  2293.  
  2294.                     
  2295.                     18.  DIRTREE  --  MAKE FILE OF SUBDIRECTORIES PRESENT
  2296.                     
  2297.                           This utility program allows listing subdirectory information on either
  2298.                         an entire volume or within any specified subdirectory of a volume.  All
  2299.                         options may be entered in either upper or lower case.  The output file
  2300.                         may be redirected in the same way one would redirect any other output
  2301.                         file produced via SNORUN.  The program works fine on local drives, or on
  2302.                         remote drives under many available networking systems.  This is not true
  2303.                         for commercially available programs such as PCTOOLS or Norton Utilities,
  2304.                         which will not generally work on network drives.
  2305.                     
  2306.                           The TREE option (described below) assumes that your output device
  2307.                         (normally the display or printer) supports the IBM extended ASCII
  2308.                         character set (specifically, the line-drawing graphics characters).
  2309.                     
  2310.                         snorun dirtree [<iooptions>][;<options>]
  2311.                     
  2312.                         <iooptions>::
  2313.                            /6=<outputspec>
  2314.                               This option allows putting the output of DIRTREE to a disk file
  2315.                               or to the printer.  Either the equal sign (as shown) or a colon
  2316.                               are equally valid delimiters for this option.  Example command
  2317.                               lines are:
  2318.                                     snorun dirtree /6=lpt1: ;path=c:
  2319.                                     snorun dirtree /6=c:\prt\mydirs.prt ;path=d:
  2320.                     
  2321.                            ><outputspec>
  2322.                               The output of DIRTREE may also be routed to a disk file or a
  2323.                               device by simple redirection.  Example command lines are:
  2324.                                     snorun dirtree >mydirs.prt ;path=d: list
  2325.                     
  2326.                            >><outputspec>
  2327.                               The output of DIRTREE may be appended to a disk file.  To create
  2328.                               a disk file containing the listings of all valid paths for hard
  2329.                               drives C: and D:, the command lines might be:
  2330.                                     snorun dirtree >mydirs.txt ;path=c: list
  2331.                                     snorun dirtree >>mydirs.txt ;path=d: list
  2332.                     
  2333.  
  2334.                                                                                           page 55
  2335.  
  2336.  
  2337.  
  2338.                         <options>::
  2339.                            path=<pathname>   or
  2340.                            /p=<pathname>
  2341.                               This option allows specification of the path name to be used for
  2342.                               the subdirectory lookup.  Example pathnames are:
  2343.                                     c:  a:ms*  d:ms?as*      etc.
  2344.                               The default path name is "\".  As in the output file options,
  2345.                               you may use either a "=" or a ":" in the option specification,
  2346.                               whichever you prefer.
  2347.                     
  2348.                            /dpo
  2349.                               This option causes no subdirectory scanning, but merely displays
  2350.                               the effective path name that would be used for the lookup.
  2351.                     
  2352.                            list             or
  2353.                            /l
  2354.                               This option causes all subdirectories to be written to the output
  2355.                               file.  They are output as FULL PATH NAMES, in sorted, interleaved
  2356.                               sequence.
  2357.                     
  2358.                            indent           or
  2359.                            /i
  2360.                               This option causes all subdirectories to be written to the output
  2361.                               file.  They are output as FULL PATH NAMES, in sorted, interleaved
  2362.                               sequence, just as for the "list" form, except that nested
  2363.                               subdirectories are indented.
  2364.                     
  2365.                            stair            or
  2366.                            step             or
  2367.                            /s
  2368.                               This option causes all subdirectories to be written to the output
  2369.                               file.  They are output, one subdirectory to a line (with higher
  2370.                               levels of each path name suppressed), in sorted, interleaved
  2371.                               sequence.  The left end of each nested subdirectory is lined up
  2372.                               under the right hand end of the name of the containing (sub)-
  2373.                               directory above.
  2374.                     
  2375.  
  2376.                                                                                           page 56
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.                            tree             or
  2383.                            /t
  2384.                               This option causes all subdirectories to be written to the output
  2385.                               file in the style used by PCTOOLS, except in a continuous format
  2386.                               (PCTOOLS displays them one screenful at a time, making it incon-
  2387.                               venient to print them).
  2388.                     
  2389.                            nohdr            or
  2390.                            /nh
  2391.                               This option suppresses the heading from being written to the output
  2392.                               file.  The heading contains the path name used, the date and time,
  2393.                               and the volume name (unless suppressed).
  2394.                     
  2395.                            novol            or
  2396.                            /nv
  2397.                               This option suppresses the volume name from being accessed.  If
  2398.                               not suppressed, the volume name is read and placed in the heading
  2399.                               (which could also be suppressed).
  2400.                     
  2401.                            /lej
  2402.                               This option causes a page eject to be sent to the output at the
  2403.                               beginning of the output.  The mnemonic means "leading page eject".
  2404.                     
  2405.                            /tej
  2406.                               This option causes a page eject to be sent to the output at the
  2407.                               end of the output.  The mnemonic means "trailing page eject".
  2408.                     
  2409.  
  2410.                                                                                           page 57
  2411.  
  2412.  
  2413.  
  2414.                     
  2415.                     19.  EXPTAB  --  TAB CHARACTER EXPANSION
  2416.                     
  2417.                           This utility program expands the tab characters found in its input
  2418.                         file to the appropriate number of ASCII space characters.  A command
  2419.                         line option allows the user to specify how many columns wide each tab
  2420.                         zone is to be.  The command line values (including the options) are not
  2421.                         case-sensitive.  If no explicit tab zone width is specified, EXPTAB
  2422.                         assumes the normal DOS eight-character-wide zones.
  2423.                     
  2424.                           Note that this program operates as a "filter", much the same way as
  2425.                         the DOS "MORE" command.  It reads from standard input and writes to
  2426.                         standard output.  Therefore, its input and/or output can be "piped" the
  2427.                         same way as any other DOS filter.  See the DOS User's Guide for more
  2428.                         details on filters and "piping" of standard input and standard output.
  2429.                     
  2430.                           It also should be pointed out that the program automatically deletes
  2431.                         trailing spaces at the end of each record, and that input records are
  2432.                         assumed to be less than 4000 characters long.
  2433.                     
  2434.                           The program is invoked with a command line of the form:
  2435.                     
  2436.                         snorun exptab [<iooptions>][;<options>]
  2437.                     
  2438.                         <iooptions>::
  2439.                            <<inputfile>      or
  2440.                            /5=<inputfile>    or
  2441.                            /5:<inputfile>
  2442.                               This item allows specification of a file (or device) from which
  2443.                               the input file is to be read.  If this item is not specified at
  2444.                               all, the program reads from "default standard input", which may
  2445.                               be a piped input file, or the console.
  2446.                     
  2447.                            ><outputfile>     or
  2448.                            >><outputfile>    or
  2449.                            /6=<outputfile>   or
  2450.                            /6:<outputfile>
  2451.  
  2452.                                                                                           page 58
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.                               This item allows specification of a file (or device) to which
  2459.                               the output file is to be written.  This can be either a printer
  2460.                               or a disk file, or in general any MS-DOS sequential output device.
  2461.                               Note that the ">>" form appends the output to the end of the
  2462.                               existing contents of the specified file, if any.  If this item
  2463.                               is not specified at all, the program writes to the "default
  2464.                               standard output", which may likewise be piped into another program
  2465.                               or by default will appear upon the console.
  2466.                     
  2467.                         <options>::
  2468.                            /t<number>        or
  2469.                            /T<number>
  2470.                               This option specifies how many characters wide the tab zones are to
  2471.                               be.  If this option is not specified, the default is the same as
  2472.                               DOS uses, which is eight.  You may use a ":" or "=" between the "T"
  2473.                               and the number if you prefer.
  2474.                                 NOTE:  Even if you want the default eight-character-wide tab
  2475.                               zones, specifying the option (or at least the semicolon) will
  2476.                               suppress the help message from being displayed when the program
  2477.                               runs.
  2478.                     
  2479.                           Example command lines would look like:
  2480.                     
  2481.                             snorun exptab <infile.txt >outfile.txt ;/T7
  2482.                             snorun exptab <c:\mixfile.txt >c:\retabbed\mixfile.txt ;/T=9
  2483.                             snorun exptab /5=d:\insd\tempfile.asm /6:c:\outsd\tempfile.asm;
  2484.                     
  2485.  
  2486.                                                                                           page 59
  2487.  
  2488.  
  2489.  
  2490.                     
  2491.                     20.  EXTEND  --  EXTEND A FILE (RECOVER LOST DATA)
  2492.                     
  2493.                           When MS-DOS appends to the end of a file, it writes the information
  2494.                         being appended into an area of the disk which is in something of a
  2495.                         "limbo" state.  It is the intention of MS-DOS to make this information
  2496.                         a part of the file being appended to;  however, the actual change to
  2497.                         the file being appended to is postponed until the file is finally
  2498.                         closed.
  2499.                     
  2500.                           Actually, even when you are writing to a completely new file,
  2501.                         MS-DOS treats it as if you had created an empty file, and then started
  2502.                         appending to it.  You've probably found files on your disk that
  2503.                         are zero bytes long.  These are usually files that have been created,
  2504.                         often even written to, but then not closed before the system went down.
  2505.                     
  2506.                           Imagine, for example, that you are online to some communications
  2507.                         service, perhaps doing a database search.  The entire session is being
  2508.                         faithfully recorded by your favorite communications program, and as
  2509.                         the desired information is received by your system, it is reassuring
  2510.                         to see the hard disk "blink" at you periodically as the data you have
  2511.                         been seeking is recorded on disk.  After several lengthy (and costly!)
  2512.                         hours, it is time to log off of the service and start your offline
  2513.                         examination of the information you've found.  But, Murphy's Law strikes,
  2514.                         and some gremlin in your system causes your computer to die just as
  2515.                         you're trying to get back to MS-DOS.  After rebooting, you discover
  2516.                         that all of the information you've been downloading has evaporated.
  2517.                     
  2518.                           If this has never happened to you, consider yourself lucky (so far).
  2519.                         If it has, I'll bet you wished you had a program like EXTEND.
  2520.                     
  2521.                           The frustrating part about problems like this is that the data you've
  2522.                         lost is there, on your hard disk, the whole time.  If you've got a good
  2523.                         disk dump program, you can even go and look at it, and see it there,
  2524.                         staring forlornly back at you.
  2525.                     
  2526.                           Fortunately, MS-DOS usually thinks that the area of the disk
  2527.                         that your "lost" data is stored in is still unused (this means that
  2528.  
  2529.                                                                                           page 60
  2530.  
  2531.  
  2532.                         the disk sectors themselves are not "lost", as a rule).  The next time
  2533.                         that a program asks MS-DOS for disk space, they'll probably get the
  2534.                         same sectors that you've written your valuable data into.  What you need,
  2535.                         then, is just a way to tell MS-DOS to take some of its free disk
  2536.                         sectors, (including... cross your fingers... the ones containing your
  2537.                         missing data) and stick them on to the end of the file you originally
  2538.                         wanted them written into to begin with.  This is just what EXTEND does.
  2539.                     
  2540.                           It is important, after such a loss of information, that nothing
  2541.                         be written to the disk in question until you've retrieved your lost
  2542.                         data:  anything else written to the same drive will quite likely
  2543.                         overwrite the stuff you're trying to recover.
  2544.                     
  2545.                           You will need to have some vague idea of how much stuff you've lost,
  2546.                         because you'll need to tell EXTEND how much of the free space on your
  2547.                         disk you want to "corral" and add to your existing file.  If you're
  2548.                         not sure, just specify extra, to be safe.  Always specify more, rather
  2549.                         than less.  It is easy to release the excess later.
  2550.                     
  2551.                           After you've recovered the lost data, it is a good idea to examine
  2552.                         your file with a file listing or dumping utility (my FILEDUMP is not a
  2553.                         bad choice, although Vernon Buerg's excellent LIST utility is ideal
  2554.                         for this use, especially in its hexadecimal mode).  This will show
  2555.                         you the data you've recovered, along with any other random junk that
  2556.                         MS-DOS may have given you.  Once you've found the byte location of the
  2557.                         last of the useful stuff you want to retain, you're ready to use
  2558.                         TRUNCATE, described later in this User's Guide, to give the rest of
  2559.                         the real garbage back to MS-DOS.
  2560.                     
  2561.                           This utility is (hopefully!) not something you'll need to use often,
  2562.                         but when you do need it, you'll need it BAD.
  2563.                     
  2564.                           Depending upon what your system was doing when it went down, it
  2565.                         MAY have invalidated other system tables on the disk.  It is usually
  2566.                         a good idea to run CHKDSK on the drive in question before running
  2567.                         EXTEND.  Letting it correct any problems it finds (see your DOS
  2568.                         User's Manual for details) will usually not interfere with your
  2569.                         recovering your lost data using EXTEND.
  2570.                     
  2571.  
  2572.                                                                                           page 61
  2573.  
  2574.  
  2575.  
  2576.                           Note that some systems treat their disk files in unusual ways, and
  2577.                         in such cases the data may not have physically been written to the
  2578.                         disk before the system went down.  But, typically, if you saw the data
  2579.                         being written, EXTEND will get it back for you.  There are, of course,
  2580.                         no guarantees.
  2581.                     
  2582.                           To use the EXTEND program, the command line looks like:
  2583.                     
  2584.                             snorun  extend  <iooptions> ;<options>
  2585.                     
  2586.                         <iooptions>::
  2587.                            /2=<file>    or
  2588.                            /2:<file>
  2589.                               This item allows specification of the file to which the "lost"
  2590.                               data is to be appended.  Usually, best results are obtained if
  2591.                               this is the same as the data the file was originally being written
  2592.                               to.  However, if necessary, you can append the data to another
  2593.                               file, as long as it is on the same physical disk.  Note that if
  2594.                               you append to a different file, you are likely to lose as much
  2595.                               as one full cluster of your "lost" data... this is the portion
  2596.                               that was written between the "logical" end of file and the end
  2597.                               of the dos cluster (the cluster is MS-DOS's unit of disk space
  2598.                               allocation).  NOTE that EXTEND uses unit 2 rather than the
  2599.                               customary unit 5.  The purpose of the change is to enable
  2600.                               EXTEND to extend binary files.  NOTE:  Although EXTEND will
  2601.                               extend files of any type, the odds of getting your data back
  2602.                               in some semblance of its former self is much better for simple
  2603.                               text files.
  2604.                     
  2605.                         <options>::
  2606.                            /=filesize           or
  2607.                            /=filesizeH
  2608.                               This option specifies that the file is to be extended until it
  2609.                               is "filesize" bytes long.  If "filesize" is followed immediately
  2610.                               by an H (upper or lower case, EXTEND doesn't care), then the
  2611.                               filesize is assumed to be in hexadecimal.  If "filesize" is not
  2612.                               followed by an H, then the value is assumed to be in decimal.
  2613.  
  2614.                                                                                           page 62
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.                               This numeric value specifies the size you want to make the file.
  2625.                               The amount of data that will be found on the disk and added to
  2626.                               your file is equal to the size specified with this option MINUS
  2627.                               the current size of the file.  Note that this option MUST BE
  2628.                               SPECIFIED.  Also, don't forget the ";" between the file spec
  2629.                               and the file size option, it is important.
  2630.                     
  2631.                           Typical command lines might look like:
  2632.                     
  2633.                             snorun  extend  /2:comm.cap ;/=734512          -or-
  2634.                             snorun  extend  /2:c:\importnt.vry ;/=34A7Bh
  2635.                     
  2636.  
  2637.                                                                                           page 63
  2638.  
  2639.  
  2640.                     
  2641.                     21.  FILEDUMP  --  HEXADECIMAL FILE DUMP
  2642.                     
  2643.                           It is sometimes useful to be able to carefully examine a file on a
  2644.                         detailed, record-by-record basis.  When this is necessary, there are
  2645.                         few tools as handy as a program to dump the records of the file in
  2646.                         hexadecimal and printable ASCII characters.  FILEDUMP will dump the
  2647.                         file either as logical records or as physical sectors.
  2648.                     
  2649.                           This program dumps each record of the input file separately, with
  2650.                         its record number and length.  NOTE:  FILEDUMP limits records in the
  2651.                         input file to no more than 4000 bytes each, and deletes trailing
  2652.                         ASCII spaces from each record before computing its length (which
  2653.                         therefore does not include existing trailing spaces, if any) or the
  2654.                         dumping of the record to the output file.  (If the file is dumped in
  2655.                         physical sector mode, each 512-byte sector is dumped individually and
  2656.                         no trailing spaces are deleted).
  2657.                     
  2658.                           Each record is then dumped to hexadecimal and printable ASCII
  2659.                         characters.  All ASCII characters between 020H (ASCII space) up to
  2660.                         07EH (just below ASCII DEL) are output as is.  All others are converted
  2661.                         to a "." character.  Note that no expansion of tab characters, if any,
  2662.                         takes place in the input records:  TAB characters are treated like any
  2663.                         other.
  2664.                     
  2665.                           The current version of the program formats its output records such
  2666.                         that they can be shown on an 80-column display, or printed on an 80-
  2667.                         column wide printer in non-condensed mode.
  2668.                     
  2669.                           To use the FILEDUMP utility, the command line looks like:
  2670.                     
  2671.                             snorun  filedump  <iooptions>[;<options>]
  2672.                     
  2673.                         <iooptions>::
  2674.                            /2=<inputfile>    or
  2675.                            /2:<inputfile>
  2676.                               This item allows specification of a file (or device) from which
  2677.                               the input file is to be read.  NOTE that FILEDUMP uses unit 2
  2678.                               rather than the customary unit 5.  The purpose of the change is to
  2679.                               enable FILEDUMP to support an optional sector mode, which requires
  2680.                               binary access to the input file.
  2681.                     
  2682.  
  2683.                                                                                           page 64
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.                            ><outputfile>     or
  2691.                            >><outputfile>    or
  2692.                            /6=<outputfile>   or
  2693.                            /6:<outputfile>
  2694.                               This item allows specification of a file (or device) to which
  2695.                               the output file is to be written.  This can be either a printer
  2696.                               or a disk file, or in general any MS-DOS sequential output device.
  2697.                               Note that the ">>" form appends the output to the end of the
  2698.                               existing contents of the specified file, if any.  If this item
  2699.                               is not specified at all, the program writes to the "default
  2700.                               standard output", which may likewise be piped into another program
  2701.                               or by default will appear upon the console.
  2702.                     
  2703.                         <options>::
  2704.                            /S                or
  2705.                            /s
  2706.                               This option specifies that the file is to be dumped in sector
  2707.                               mode rather than in record mode.  When the file is dumped in
  2708.                               sector mode, the file is accessed as a binary file and all 256
  2709.                               possible characters are permitted in each sector.  In this mode,
  2710.                               no trailing space suppression takes place.  All sectors (except
  2711.                               for the usually only partially used last sector of each file)
  2712.                               are 512 bytes long.
  2713.                     
  2714.  
  2715.                                                                                           page 65
  2716.  
  2717.  
  2718.  
  2719.                     
  2720.                     22.  FMTHDLL  --  FORMAT HARD DISK, LOW LEVEL
  2721.                     
  2722.                           This program is used to perform a low-level format of the hard disk
  2723.                         drive on XT- and AT-compatible computers.  It performs basically the same
  2724.                         function as that performed by the program supplied on the IBM XT or AT
  2725.                         Advanced Diagnostics diskette.
  2726.                     
  2727.                           Often, this low-level format operation will have already been performed
  2728.                         on a new hard drive by either the manufacturer or your dealer before you
  2729.                         receive the drive.  If you have just received and installed a new hard
  2730.                         drive, however, and the drive doesn't seem to work at all, it might well
  2731.                         need to be low-level formatted.  Typical symptoms include the system
  2732.                         taking a long time to boot, even from diskette, often eventually giving
  2733.                         an error message about some kind of a hard disk failure.  If you are
  2734.                         certain that you've never written anything on the hard drive, you've got
  2735.                         nothing to lose by performing a low-level format on it, so it's certainly
  2736.                         worth a try!
  2737.                     
  2738.                           Another case where a hard drive might need to have a low-level format
  2739.                         performed is the case where the drive had been previously formatted using
  2740.                         a different type of hard disk controller.  For example, a drive which
  2741.                         had previously been used on an XT-compatible using an RLL-type controller
  2742.                         and which is now to be used on an AT-compatible using a non-RLL-type
  2743.                         disk controller will have to be low-level formatted again, using the
  2744.                         new non-RLL-type controller.  WARNING:  Do NOT assume that the low-level
  2745.                         format operation CONVERTS RLL-type formatted drives leaving their contents
  2746.                         intact.  After a low-level format the drive will be EMPTY.
  2747.                     
  2748.                           You can think of the low-level format operation as being like that
  2749.                         performed during an early stage of creating a housing subdivision.  When
  2750.                         the surveyors go through the future streets-to-be, measuring the size of
  2751.                         each lot, driving stakes and posting little signs indicating the "street
  2752.                         number" of each lot, they are performing a "low-level format" by
  2753.                         identifying the exact location where each home will eventually be built,
  2754.                         and what its house number will be.
  2755.                     
  2756.  
  2757.                                                                                           page 66
  2758.  
  2759.  
  2760.  
  2761.                           Similarly, the low-level format operation writes "markers" on the disk
  2762.                         indicating where every sector of every track of every cylinder will
  2763.                         eventually be written, and what the exact address of each one will be.
  2764.                         During the operation, blank data sectors are also written following each
  2765.                         "marker".  This implies that the entire disk is overwritten, and data
  2766.                         that had previously been written on it, if any, IS NOT RECOVERABLE, even
  2767.                         by programs which claim to "unformat" a hard drive.
  2768.                     
  2769.                           The program is interactive and basically self-explanatory.  The only
  2770.                         information the operator needs to know (and respond when asked) is which
  2771.                         hard drive is to be low-level-formatted, either the primary one (unit 0,
  2772.                         which is usually drive C:) or the secondary one (unit 1, which is usually
  2773.                         drive D:).  You may be interested to know that, unlike most of the other
  2774.                         utilities described in this document, FMTHDLL is written in assembly
  2775.                         language.
  2776.                     
  2777.                           IF YOU HAVE AN AT-COMPATIBLE:  Before using FMTHDLL, you need to run
  2778.                         SETUP on your computer (on many AT-compatibles, this can be done without
  2779.                         a diskette, since the SETUP function is often contained in the BIOS ROM
  2780.                         and can be accessed during the power-on-self-test procedure) to tell the
  2781.                         AT what type of hard disk drive you have.  This is important because
  2782.                         FMTHDLL asks the AT's BIOS what the characteristics are of your hard
  2783.                         drive, such as the number of cylinders and heads the drive contains.
  2784.                     
  2785.                           IF YOU HAVE AN XT-COMPATIBLE:  Before using FMTHDLL, you need to make
  2786.                         sure that your controller is correctly set for the type of disk drive
  2787.                         that you have attached.  The way to do this will vary depending upon your
  2788.                         specific controller, but often requires the setting of straps or a "DIP"
  2789.                         switch.  This is important because FMTHDLL asks the hard disk controller's
  2790.                         BIOS what the characteristics are of your hard drive, such as the number
  2791.                         of cylinders and heads the drive contains.
  2792.                     
  2793.                           The current version of FMTHDLL always formats disks using 17 sectors
  2794.                         per track and an interleave factor of four.  Note that this setting is
  2795.                         usually okay for hard drives, unless you are using an RLL controller.
  2796.                         RLL controllers allow one to put more than the "normal" amount of data
  2797.                         on a disk, usually putting 25 or more sectors on each track.
  2798.                     
  2799.  
  2800.                                                                                           page 67
  2801.  
  2802.  
  2803.  
  2804.                           Also note that the current version of FMTHDLL does not accept the user
  2805.                         entry of a "bad sector map".  Therefore, it is a good idea after running
  2806.                         FMTHDLL to also run a program (there are several fine ones available from
  2807.                         various public domain distribution channels) to test the disk and lock
  2808.                         out any sectors which may be marginal.
  2809.                     
  2810.                           To use the FMTHDLL utility, it is simply invoked on the command line:
  2811.                     
  2812.                             FMTHDLL
  2813.                     
  2814.                           After the FMTHDLL utility has completed, you need to perform several
  2815.                         more steps before your hard disk is ready for use:
  2816.                     
  2817.                           1.  Use FDISK (on your DOS diskette) to create a DOS partition.  Note
  2818.                         that some versions of FDISK do not always seem to work successfully if
  2819.                         you answer "Y" to the question "Use entire disk for DOS?".  It seems to
  2820.                         be more reliable if you answer "N", and then use the default responses to
  2821.                         the partition size questions.  After creating the DOS partition, be sure
  2822.                         to set the DOS partition active before returning to DOS.  (NOTE:  Any
  2823.                         disk partition modified using FDISK generally loses its entire contents
  2824.                         in the process, and this loss is generally not reversible.  FDISK is a
  2825.                         very powerful utility, and deserves to be used with great respect.)
  2826.                     
  2827.                           2.  Run the DOS FORMAT command on your hard drive.  The DOS format,
  2828.                         unlike the low-level format, READS the entire hard disk (it does NOT
  2829.                         overwrite it) and then writes the basic DOS tables onto the drive, such
  2830.                         as the boot sector, the File Allocation Table, the root directory, and
  2831.                         so forth.  The DOS FORMAT command also confines itself to the DOS
  2832.                         partition, as set previously by FDISK, and does not interfere with any
  2833.                         other partitions that may be present on the same hard drive.  NOTE:  It
  2834.                         is always better to be safe than sorry.  Your DOS FORMAT command may
  2835.                         differ.  Be sure to check the relevant documentation before using any
  2836.                         FORMAT command.
  2837.                     
  2838.                           3.  Usually the next step is to put a copy of DOS onto the drive using
  2839.                         the DOS SYS command.  Alternatively, you can ask DOS FORMAT to do this
  2840.                         by specifying the /S option.
  2841.                     
  2842.  
  2843.                                                                                           page 68
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.                           Now your hard disk is ready for use.  For more information on the use
  2856.                         of the DOS FDISK and FORMAT commands, please refer to your DOS User's
  2857.                         Manual.
  2858.                     
  2859.  
  2860.                                                                                           page 69
  2861.  
  2862.  
  2863.                     
  2864.                     23.  GENTBLS  --  GENERATE PROGRAM SOURCE CODE TABLES
  2865.                     
  2866.                           A frequent problem for a programmer is to associate each of a series of
  2867.                         textual messages with one or perhaps a range of numeric values.  A
  2868.                         typical example, given a numeric return code, is to look up the
  2869.                         corresponding error message.
  2870.                     
  2871.                           The fact that there are many possible ways to arrange such a table,
  2872.                         along with the desire to minimize the effort to handle ranges of return
  2873.                         codes and still allow for easy program maintenance, usually results in
  2874.                         a table storage and lookup method being chosen at an early stage of
  2875.                         program design, and a corresponding lookup routine written for each
  2876.                         such table.  Subsequent changes to program requirements can often change
  2877.                         the contents or the table lookup method of choice, but by this time there
  2878.                         is usually an understandable reluctance to restructure the lookup table
  2879.                         until "later when I have the time".
  2880.                     
  2881.                           The GENTBLS utility is designed to read a simplified text file which
  2882.                         contains the (possibly range of) numeric value(s) that are to be
  2883.                         associated with a given string of text, followed by the text itself.
  2884.                         GENTBLS then produces a commented assembler language inclusion file,
  2885.                         suitable for most 8088-family assemblers, which defines the text of
  2886.                         each message, along with a complete lookup table to facilitate the
  2887.                         conversion from return code to text message.  The lookup table even
  2888.                         generates commonly needed equates typically used by lookup routines
  2889.                         (the length of each entry, a pointer past the last byte of the table,
  2890.                         and the number of entries in the table).
  2891.                     
  2892.                           If a range of numeric values correspond to the same message, note that
  2893.                         only one copy of the message text will be generated.  A separate entry
  2894.                         in the table will be generated for each of the values in the range.
  2895.                         The table may be sparse;  i.e. there may be many numeric values for
  2896.                         which no corresponding entry appears in the table.
  2897.                     
  2898.                           Of course, the use of GENTBLS can be specified in a MAKE file, such
  2899.                         that a change of the original, plain-text file can cause a subsequent
  2900.                         MAKE to automatically regenerate the suitable inclusion file,
  2901.                         re-assemble the relevant portions of the program, and re-link the
  2902.                         resulting program.
  2903.                     
  2904.  
  2905.                                                                                           page 70
  2906.  
  2907.  
  2908.  
  2909.                           A single input file can specify lists of entries for several different
  2910.                         tables to be generated by a single run of the GENTBLS program.  If
  2911.                         multiple tables are to be processed in a single input file, they should
  2912.                         be separated by the "-GROUP" control statement (described in greater
  2913.                         detail below).
  2914.                     
  2915.                           It is anticipated that future versions of this program will provide
  2916.                         considerably enhanced capabilities, including support for generating
  2917.                         tables suitable for lookup by other languages.  Another strong
  2918.                         possibility would be to allow the user to specify which of several
  2919.                         different lookup strategies are to be used, with GENTBLS automatically
  2920.                         modifying the structure and layout of the generated tables appropriately.
  2921.                         It is intended that a future version also be able to produce, upon
  2922.                         request, a fully documented lookup subroutine, customized based upon the
  2923.                         particular programming language, lookup strategy, and table organization
  2924.                         that is most appropriate to solving the given problem.
  2925.                     
  2926.                           Features such as this will ultimately help to bring a measure of
  2927.                         DBMS-like storage structure independence to applications programs,
  2928.                         without the serious run-time performance penalty or program
  2929.                         maintenance costs usually associated with such flexibility.
  2930.                     
  2931.                           To use the GENTBLS utility, the command line looks like:
  2932.                     
  2933.                         snorun gentbls <iooptions>
  2934.                     
  2935.                         <iooptions>::
  2936.                            <<inputfile>      or
  2937.                            /5=<inputfile>    or
  2938.                            /5:<inputfile>
  2939.                               This item allows specification of a file (or device) from which
  2940.                               the input file is to be read.  If this item is not specified at
  2941.                               all, the program reads from "default standard input", which may
  2942.                               be a piped input file, or the console.  The format of the input
  2943.                               file is described below.
  2944.                     
  2945.                            ><outputfile>     or
  2946.                            >><outputfile>    or
  2947.  
  2948.                                                                                           page 71
  2949.  
  2950.  
  2951.                            /6=<outputfile>   or
  2952.                            /6:<outputfile>
  2953.                               This item allows specification of a file (or device) to which
  2954.                               the output file is to be written.  This can be either a printer
  2955.                               or a disk file, or in general any MS-DOS sequential output device.
  2956.                               Note that the ">>" form appends the output to the end of the
  2957.                               existing contents of the specified file, if any.  If this item
  2958.                               is not specified at all, the program writes to the "default
  2959.                               standard output", which may likewise be piped into another program
  2960.                               or by default will appear upon the console.
  2961.                     
  2962.                           The input file consists of a series of lines of different types:
  2963.                     
  2964.                           1.  Comment lines.  Any line in the input file which starts with
  2965.                         an "*" in column 1 is considered to be a comment line and is discarded
  2966.                         by GENTBLS.
  2967.                     
  2968.                           2.  Control commands.  Any line with a "-" in column 1 is considered
  2969.                         to be a control command.  These provide information which GENTBLS uses
  2970.                         in order to decide what kind of tables are to be produced.
  2971.                     
  2972.                               A.  "-GROUP" control statements are used to specify that the end
  2973.                           of one table's entries has been reached.  The word GROUP is not case-
  2974.                           sensitive.  A "-GROUP" control statement is assumed at end of file, so
  2975.                           it is not normally necessary to specify one there explicitly.  If you
  2976.                           are using multiple groups in a single input file, the "-GROUP" control
  2977.                           statement is usually followed by a "-NAMES" control statement, (see
  2978.                           below).
  2979.                     
  2980.                                   The "-GROUP" control statement looks simply like:
  2981.                     
  2982.                           -GROUP
  2983.                     
  2984.                               B.  "-NAMES" control statements are used to specify how the
  2985.                           generated labels and text associated with the table are to be
  2986.                           constructed.  Like all control statements, the word "NAMES" is not
  2987.                           case-sensitive.  A "-NAMES" control statement must appear before the
  2988.                           first table data record.
  2989.                     
  2990.  
  2991.                                                                                           page 72
  2992.  
  2993.  
  2994.  
  2995.                                   The record looks like:
  2996.                     
  2997.                           -NAMES  <ilpfx>,<tbllabel>[,<strpfx>]
  2998.                     
  2999.                                   The fields are:
  3000.                     
  3001.                                     <ilpfx> is the prefix to be used to generate the labels
  3002.                                             for individual text strings.  The actual label
  3003.                                             consists of the specified prefix, followed by the
  3004.                                             decimal numeric lookup value.
  3005.                     
  3006.                                     <tbllabel> is the name of the beginning of the lookup table
  3007.                                             which the program generates.  This is also used as
  3008.                                             the first part of the names of the relevant equates
  3009.                                             which are generated corresponding to the table:
  3010.                     
  3011.                                             ....S   length of each entry, in number of bytes
  3012.                                             ....E   offset past the last byte of the table
  3013.                                             ....N   number of entries in the lookup table
  3014.                     
  3015.                                     <strpfx> is a string which is appended to the beginning of
  3016.                                             each text message, followed by a ":" and a space.
  3017.                                             This field is optional.  If no value for it is
  3018.                                             specified, then the text messages are not prefixed
  3019.                                             by a constant string.  NOTE:  It is not illegal
  3020.                                             to also have NAMES control statements embedded within
  3021.                                             the lines which define a single table.  This can be
  3022.                                             useful if you wish to change the constant text prefix
  3023.                                             in mid-table.  However, if this is done, it is
  3024.                                             strongly recommended that the values of the other
  3025.                                             fields on the NAMES command line not be changed from
  3026.                                             their value at the beginning of the given table.
  3027.                     
  3028.                           3.  Table data records.  Any line which is neither a comment line nor
  3029.                         a control command is assumed to be a table data record.  These records
  3030.                         simply consist of a numeric value, followed by a comma, followed by the
  3031.                         text of the corresponding message.
  3032.                     
  3033.  
  3034.                                                                                           page 73
  3035.  
  3036.  
  3037.  
  3038.  
  3039.                             The number is assumed be hexadecimal if it is terminated with an
  3040.                         "X" or an "H" (and these are case-insensitive), or if it contains any
  3041.                         of the characters "A" through "F" (also case-insensitive).  Otherwise,
  3042.                         it is assumed to be decimal.
  3043.                     
  3044.                             Note that, if you have a constant prefix which you wish to appear
  3045.                         at the beginning of each message, you can also specify that on the
  3046.                         NAMES control statement (see above) and need not key it manually at the
  3047.                         beginning of each line of text.
  3048.                     
  3049.                             Typical table data records might be:
  3050.                     
  3051.                         0,Normal completion
  3052.                         1f,Name table is full
  3053.                         f0-ff,Fatal internal error
  3054.                     
  3055.                           The easiest way to figure out how GENTBLS works is to look at a
  3056.                         specific example.  The GENTBLS utility should be accompanied by an
  3057.                         example text file called "GENTBLS.SMP", which shows two tables.
  3058.                         The first is a list of error messages corresponding to various return
  3059.                         codes provided by the IBM PC Network Adapter's NETBIOS routines.   The
  3060.                         second table is a much simpler one which shows messages corresponding
  3061.                         to a simple trio of hypothetical return codes.
  3062.                     
  3063.                           To generate the assembly language inclusion file corresponding to this
  3064.                         sample pair of tables, key in the command line:
  3065.                     
  3066.                         snorun gentbls /5:gentbls.smp /6:gentbls.asm
  3067.                     
  3068.                         Then use your favorite file listing program to examine the input and
  3069.                         output files, and you will appreciate how much work the use of a tool
  3070.                         such as GENTBLS can truly save.
  3071.                     
  3072.  
  3073.                                                                                           page 74
  3074.  
  3075.  
  3076.  
  3077.                     
  3078.                     24.  LASERPG  --  MULTIPAGE OUTPUT TO LANDSCAPE MODE PRINTER
  3079.                     
  3080.                           This program is useful if you have a printer able to print landscape
  3081.                         mode pages each of which can contain two printed pages.  (Many laser
  3082.                         printers and some wide-carriage dot matrix printers can do this well).
  3083.                     
  3084.                           LASERPG will scan through your print file, (which should not contain
  3085.                         escape sequences, tab characters, or the like, but should contain page
  3086.                         ejects at the start of each new page) and will then print the document,
  3087.                         two pages per physical sheet.  The order in which the pages are printed
  3088.                         is such that one can take the resulting stack of paper, cut the sheets
  3089.                         in half, stack the two halves on top of each other, and the document is
  3090.                         ready for binding.
  3091.                     
  3092.                           Note that the commands to put a printer into landscape mode, and
  3093.                         compressed print mode, vary widely.  LASERPG does not attempt to do
  3094.                         this.  You need to ensure that the printer is in the desired mode
  3095.                         before you run LASERPG.
  3096.                     
  3097.                           To bring up LASERPG, the command line is of the form:
  3098.                     
  3099.                         snorun laserpg <ioptions>
  3100.                     
  3101.                         <iooptions>::
  3102.                            /5=<inputfile>    or
  3103.                            /5:<inputfile>
  3104.                               This item allows specification of a file from which the input
  3105.                               file is to be read.  Note that since LASERPG reads the file
  3106.                               twice, this file must be repositionable (i.e. don't use "standard
  3107.                               input", the console, or any non-repositionable device).  The file
  3108.                               should contain page ejects at the start of each page, but should
  3109.                               not contain escape sequences, backspace characters, or other
  3110.                               embedded control information.  It should not contain any tab
  3111.                               characters either;  expand them first using EXPTAB.
  3112.                     
  3113.                            ><outputfile>     or
  3114.                            /6=<outputfile>   or
  3115.  
  3116.                                                                                           page 75
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.                            /6:<outputfile>
  3128.                               This item allows specification of a file (or device) to which
  3129.                               the output file is to be written.  This can be either a printer
  3130.                               or a disk file, or in general any MS-DOS sequential output device.
  3131.                     
  3132.                           An example of a LASERPG command line might look like:
  3133.                     
  3134.                         snorun laserpg /5=c:\project\document.prt /6=lpt1
  3135.                     
  3136.  
  3137.                                                                                           page 76
  3138.  
  3139.  
  3140.                     
  3141.                     25.  LINEAN1  --  SERIAL COMMUNICATIONS ANALYSIS AID
  3142.                     
  3143.                           This special-purpose program can be of help in analyzing communications
  3144.                         line behavior.  If one is looking at asynchronous hexadecimal characters
  3145.                         arriving on a communications line, it is sometimes useful to know how the
  3146.                         bit stream is actually being sent on the line.  This allows one, for
  3147.                         example, to look at the actual bit stream as it appears on the line and
  3148.                         attempt to figure out why the data is not being received as expected.
  3149.                     
  3150.                           This program is generally not useful to persons without a fairly good
  3151.                         low-level understanding of serial communications.  However, for such
  3152.                         persons this program can save a great deal of mechanical bit fiddling!
  3153.                     
  3154.                           To use LINEAN1, the command line would look like:
  3155.                     
  3156.                         snorun linean1 >lpt1
  3157.                     
  3158.                           The program will prompt for the entry of strings of received hexadecimal
  3159.                         bytes.  It assumes that the hex bytes received represent asynchronous,
  3160.                         eight bit data with no parity bit, one start bit and one stop bit.  If
  3161.                         you are entering a byte which was received with a framing error, follow
  3162.                         the entry of its two hex digits with an "x".  For example, a typical line
  3163.                         you might enter could look like:
  3164.                     
  3165.                         00,46x,3f,7ex,55x,02,42,47,5c
  3166.                     
  3167.                           You then have the option to enter a comment describing the conditions
  3168.                         under which this data was observed, if you like.  If not, just press
  3169.                         the Enter key.  This field, if entered, is simply printed as annotation
  3170.                         on the output listing.
  3171.                     
  3172.                           The program will then compute the bit pattern that this would represent
  3173.                         on the line and send it to the printer.  In the output, the line time
  3174.                         (which may be a non-integral number of bit times on asynchronous serial
  3175.                         transmission) is represented by a "." character.  (This period generally
  3176.                         represents zero or more non-start-bits).  The hex character representing
  3177.                         the bit pattern appears centered under its corresponding data bits.
  3178.                     
  3179.  
  3180.                                                                                           page 77
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.                           The program will also show the way the same data would appear on the
  3192.                         line for eight-bit synchronous format as well.
  3193.                     
  3194.                           (Because of the nature of this program and the complexity of the topic
  3195.                         it deals with, the author would rather not enter into lengthy
  3196.                         correspondence about the use of this program or interpretation of its
  3197.                         output).  I've considered simply removing it from the Utilities but have
  3198.                         decided for the time being to leave it in, since it is unusual and might
  3199.                         be useful or interesting to somebody out there.
  3200.                     
  3201.  
  3202.                                                                                           page 78
  3203.  
  3204.  
  3205.                     
  3206.                     26.  LIST  --  (YES, ANOTHER) TEXT FILE LISTER
  3207.                     
  3208.                           This utility program allows listing a text file with a variety of
  3209.                         options.
  3210.                     
  3211.                           Note that you may have LIST in either of two forms, the SNOBOL4+
  3212.                         form (with the extension .SAV) or the SPITBOL form (with the extension
  3213.                         .EXE).  The command lines are slightly different between the two forms:
  3214.                         If you have LIST.SAV, use the "snorun" form of the command line;  if
  3215.                         you have LIST.EXE, use the "list" form of the command line instead.
  3216.                     
  3217.                         snorun list ;<inputfile>[,<outputfile>][<options>]          OR:
  3218.                         list <inputfilespec>[,<outputfile>][<options>]
  3219.                     
  3220.                         <outputfile>::
  3221.                            This item specifies the name of a file to which output is to be
  3222.                            written.  If no file name is specified, default is to output to
  3223.                            PRN: (the printer).
  3224.                     
  3225.                         <options>::
  3226.                            /f
  3227.                               This option specifies that the file being listed is already in
  3228.                               print file format.  No headings are added, and no numbering of
  3229.                               lines is done.  The file is assumed to contain no tab characters.
  3230.                     
  3231.                            /n<integer>
  3232.                               This option allows specifying how many input record lines are to
  3233.                               be printed on each page.  The default is 55.
  3234.                     
  3235.                            /p
  3236.                               This option causes a print file to be generated.  This file
  3237.                               is formatted for being output to a printer, including page
  3238.                               headings.  The extension defaults to ".LST" if none is specified.
  3239.                     
  3240.                            /q
  3241.                               This option causes the output to be appended to the end of the
  3242.                               output file, if it already exists.  If the output file is empty
  3243.                               or does not already exist, this option has no effect.
  3244.                     
  3245.  
  3246.                                                                                           page 79
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.                            /t<integer>
  3258.                               This option causes any tab characters encountered to be expanded
  3259.                               so that tabs occur every <integer> columns.  The default is to
  3260.                               tab every eight columns.
  3261.                     
  3262.                            /x
  3263.                               This option causes numbering of the lines to be suppressed.  The
  3264.                               default is to number the input records.  The first record number
  3265.                               is 1.
  3266.                     
  3267.  
  3268.                                                                                           page 80
  3269.  
  3270.  
  3271.                     
  3272.                     27.  MAKASEQ  --  DISASSEMBLY AID (USED WITH ASMGEN2)
  3273.                     
  3274.                           This program is generally used as a companion program to ASMGEN2, which
  3275.                         is described earlier.  However, it might also be desirable to use it
  3276.                         individually on some occasions, so its separate usage will also be
  3277.                         described.
  3278.                     
  3279.                           MAKASEQ reads through the disassembled source file produced by the
  3280.                         public domain program ASMGEN and attempts to locate areas that look
  3281.                         like character string constants or obvious data areas.  It then creates
  3282.                         a .SEQ file which can be used as input to a subsequent invocation of
  3283.                         ASMGEN, which will yield a cleaner disassembled source file.
  3284.                     
  3285.                           MAKASEQ version 1.0 can only process object files which are less than
  3286.                         32K bytes in size.  Starting with version 1.1 of MAKASEQ, it can now
  3287.                         process 64K byte object files.  This is also a limitation of the public-
  3288.                         domain ASMGEN program.  If an object file exceeding 64K bytes in size is
  3289.                         given, MAKASEQ does not bomb, but merely does not process (or make .SEQ
  3290.                         file entries for) that part of the program past 64K.
  3291.                     
  3292.                           If the output from ASMGEN is in a file named JUNK.ASM (note that the
  3293.                         extension must be .ASM), then the command line to execute MAKASEQ and
  3294.                         create the file JUNK.SEQ would look like:
  3295.                     
  3296.                         makaseq junk
  3297.                     
  3298.                           Upon completion, you might want to examine the .SEQ file (use LIST or
  3299.                         your favorite file listing utility).  It will indicate where each
  3300.                         apparently separate character string constant begins, and includes the
  3301.                         first portion (if long) of that constant.  It also indicates where
  3302.                         obvious data areas (those containing blocks of binary zeros or hex "FF")
  3303.                         begin.  The basic format of each output line is:
  3304.                     
  3305.                         addr type [;string]
  3306.                     
  3307.                         where:
  3308.                     
  3309.                           addr   is the hexadecimal starting address of the memory area found,
  3310.                     
  3311.  
  3312.                                                                                           page 81
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.                           type   is the apparent type of the area:
  3323.                                     B    data bytes
  3324.                                     C    code
  3325.                                     S    character string constant
  3326.                     
  3327.                           string is the beginning portion of the character string constant in
  3328.                                  the area described.
  3329.                     
  3330.                           Note:  MAKASEQ expects to see a "raw" file from ASMGEN, i.e. one
  3331.                         generated in the absence of a .SEQ file.  If you already have a .SEQ
  3332.                         file for the indicated executable file, rename or delete the .SEQ file
  3333.                         before generating the .ASM file which MAKASEQ is to process.
  3334.                     
  3335.  
  3336.                                                                                           page 82
  3337.  
  3338.  
  3339.                     
  3340.                     28.  MAKDUMMY  --  MAKE DUMMY FILES FOR ARC'D FILES
  3341.                     
  3342.                           This utility program generates dummy files on a diskette with the same
  3343.                         names as the corresponding files in a ".ARC" archive file.
  3344.                     
  3345.                           The shareware utilities ARC and PKARC are extremely useful for
  3346.                         compressing a number of files down into a much smaller single file that
  3347.                         can be stored (and transported) easily on a single diskette.  The only
  3348.                         problem is that diskette cataloguing programs (such as the shareware
  3349.                         DBS-KAT system) will then catalog the ".ARC" file but not the individual
  3350.                         files therein.  This means possibly hunting through a large number of
  3351.                         diskettes, each having a big (and very opaque) ".ARC" file on it, to
  3352.                         find the ones that have copies of the file(s) you are looking for.
  3353.                     
  3354.                           What MAKDUMMY does is to create dummy files, usually on the same
  3355.                         diskette as the ".ARC" file, of the same names as the files that are
  3356.                         archived.  Each dummy file simply contains a text record which directs
  3357.                         the reader's attention to the ".ARC" file, giving its name, in which
  3358.                         the correspondingly-named file can be found.
  3359.                     
  3360.                           If the diskette gets too full to write the dummy files, MAKDUMMY will
  3361.                         continue to write directory entries (for empty files) having the
  3362.                         appropriate names as long as space remains in the directory to hold
  3363.                         the file name entries.
  3364.                     
  3365.                           Assume that you are using MAKDUMMY to make dummy files for the archive
  3366.                         file named "TEST.ARC" on diskette drive A.  You will need to have the
  3367.                         SNORUN run-time package somewhere within your environment's PATH, of
  3368.                         course.  You must also have the PKARC utility (early versions of MAKDUMMY
  3369.                         used ARC 5.12 instead) also accessible.  You should be in the subdirectory
  3370.                         where your archive file exists.  Unless the MAKDUMMY.SAV file is in that
  3371.                         same place (which is unlikely), you will need to include a path name so
  3372.                         that SNORUN can find it.  The command line to run MAKDUMMY, in general,
  3373.                         would look like (you may use either upper or lower case as you wish):
  3374.                     
  3375.                         snorun c:makdummy;<arcfile>,<drivespec>             OR FOR EXAMPLE:
  3376.                         snorun c:makdummy;myfiles,a:
  3377.                     
  3378.                         <arcfile>::
  3379.                            This item specifies the name of the archive file which contains
  3380.                            the members you want to create dummy files for.  This file must
  3381.  
  3382.                                                                                           page 83
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.                            have the extension ".ARC".  You need not specify the extension on
  3394.                            the command line (".ARC" is supplied by default).
  3395.                     
  3396.                         <drivespec>::
  3397.                            This item specifies the drive spec on which the dummy files are to
  3398.                            be created.  Note that the comma between <arcfile> and <drivespec>
  3399.                            is optional.  You may in fact use a comma or any combination of ASCII
  3400.                            blanks and tab characters.  However, the drive spec must be terminated
  3401.                            with the colon as shown.
  3402.                     
  3403.  
  3404.                                                                                           page 84
  3405.  
  3406.  
  3407.                     
  3408.                     29.  MAKEALL  --  CONVERT A MAKE FILE TO "ALL" BATCH FILE
  3409.                     
  3410.                           The original idea for a MAKE utility apparently originated somewhere
  3411.                         deep in Bell Labs, and I believe was generated for use with UNIX and
  3412.                         related software.
  3413.                     
  3414.                           Unlike many simple programs, complex systems of software (especially
  3415.                         those comprising many different modules, multiple inclusions, different
  3416.                         languages which must be combined, and the like) often require a very
  3417.                         carefully choreographed (and often delicate) sequence of operations to
  3418.                         prepare before the software is ready for testing, use, or distribution.
  3419.                         MAKE is an attempt to allow the programmer to define (once, in theory)
  3420.                         which modules depend upon which others, so that the system can decide
  3421.                         for itself just which of the steps are necessary to repeat following some
  3422.                         program modification.  The MAKE utility then carries out only those steps
  3423.                         of the entire procedure which are necessitated by the changes it figures
  3424.                         out have been made.  It judges that a module (which it refers to as the
  3425.                         "target" file) needs to be remade if it is older than one or more of the
  3426.                         other files which it depends on (these other files are hence called
  3427.                         "dependent" files).
  3428.                     
  3429.                           It is outside the scope of this document to fully describe the usage
  3430.                         of the normal MAKE command and the format of a MAKE file.  This is fully
  3431.                         described in the document accompanying Microsoft MAKE (or Borland MAKE)
  3432.                         and will not be repeated here.  It is assumed that the reader is familiar
  3433.                         with the basic concepts of the MAKE utility.
  3434.                     
  3435.                           It occasionally turns out that you need to reperform more parts of your
  3436.                         system generation process than you had originally planned, (a
  3437.                         modification to your make file itself, for example, often suggests a major
  3438.                         regeneration and the make file itself is rarely included in the list of
  3439.                         dependent files for a given target) and it is sometimes difficult to
  3440.                         get MAKE to do things that you really do want it to do, regardless of
  3441.                         what the file date stamps say.
  3442.                     
  3443.                           This utility program reads a MAKE file and converts it to a batch file
  3444.                         which will perform all the steps, regardless of the date and time stamp
  3445.                         on each of the originally specified target files.
  3446.                     
  3447.  
  3448.                                                                                           page 85
  3449.  
  3450.  
  3451.  
  3452.                           The version of MAKE supported by this utility is the current version of
  3453.                         Microsoft MAKE (my copy is version 4.02).  It is believed, but cannot be
  3454.                         promised, that MAKEALL will work for other versions of MAKE as well...
  3455.                         such things tend to be reasonably standardized.
  3456.                     
  3457.                           Converting a MAKE file to a batch file has several consequences.  Among
  3458.                         these are the fact that batch files do not understand the inference rules
  3459.                         or the macro substitutions supported by MAKE.  Therefore, MAKEALL has to
  3460.                         expand both the macros and the inference rules.
  3461.                     
  3462.                           The current version has a few minor implementation restrictions which
  3463.                         mean it is not quite like Microsoft MAKE:
  3464.                     
  3465.                           1.  MAKE's command line options are not supported (but macros MAY have
  3466.                         their values defined on the command line).  Macro replacement values
  3467.                         which are defined on the command line override any values which may
  3468.                         appear in the make file, even if the macro replacement item is redefined
  3469.                         in the make file several times.
  3470.                     
  3471.                           2.  Reading of inference rules from TOOLS.INI is not supported.
  3472.                     
  3473.                           3.  I have decided to not duplicate in MAKEALL the numerous bugs
  3474.                         that are present in Microsoft MAKE.  These include bugs regarding the
  3475.                         handling of comment lines and the handling of inference rules when
  3476.                         the target file is outside of the current subdirectory.
  3477.                     
  3478.                           4.  I have decided to follow Borland's example and treat a "#" and
  3479.                         everything after it on each input line as a comment, even on command
  3480.                         lines.  This implies that one cannot use MAKEALL to generate a command
  3481.                         line which contains a "#" character.  (Microsoft avoids this problem by
  3482.                         requiring that the "#" be the first character on a command line in order
  3483.                         to be taken as a comment... but then, they don't handle such comment lines
  3484.                         correctly anyhow).
  3485.                     
  3486.                           The current version, however, includes several enhancements not
  3487.                         supported by Microsoft MAKE.  Some of these are taken from Borland's
  3488.                         MAKE.
  3489.                     
  3490.  
  3491.                                                                                           page 86
  3492.  
  3493.  
  3494.                           1.  The macro replacement item "$<" is replaced with the full target
  3495.                         name, including path and extension.
  3496.                     
  3497.                           2.  The macro replacment item "$:" is replaced with the target's
  3498.                         path (only), not including the file name itself or extension.
  3499.                     
  3500.                           3.  The macro replacement item "$." is replaced with the target's
  3501.                         file name and extension, not including the path.
  3502.                     
  3503.                           4.  The macro replacement item "$&" is replaced with the target's
  3504.                         file name (only), not including the path or extension.
  3505.                     
  3506.                           5.  Note that the macro replacement item "$**" is replaced by the
  3507.                         complete list of dependent files, like in Microsoft MAKE (but this
  3508.                         feature is not supported by Borland's MAKE).
  3509.                     
  3510.                           6.  Note also that Microsoft and Borland disagree on the meaning of
  3511.                         the "$*" macro replacement operator.  Borland considers that this
  3512.                         is replaced with the target file's path and filename (but not extension),
  3513.                         while Microsoft considers that the "$*" should be replaced with the
  3514.                         filename only (neither path nor extension).  Since Borland's MAKE
  3515.                         provides an operator ("$&") which works like Microsoft's "$*", I've
  3516.                         decided to make "$*" work according to either Borland's convention or
  3517.                         Microsoft's, according to a command line option.
  3518.                     
  3519.                           7.  Trying to use the "$**" replacement item (which in Microsoft's
  3520.                         MAKE is replaced by a list of the dependent files) within the dependent
  3521.                         file list itself generates an error message and causes the related
  3522.                         command block to be skipped.
  3523.                     
  3524.                           8.  MAKEALL is smart enough to not go into a hard loop if looping
  3525.                         or recursive macro replacement items are defined.  MAKEALL will only
  3526.                         perform 100 macro replacements on any given line, and then it simply
  3527.                         continues and processes the line as it is at the point when it gives up.
  3528.                     
  3529.                           Note that this program operates as a "filter", much the same way as
  3530.                         the DOS "MORE" command.  It reads from standard input and writes to
  3531.                         standard output.  Therefore, its input and/or output can be "piped" the
  3532.                         same way as any other DOS filter.  See the DOS User's Guide for more
  3533.                         details on filters and "piping" of standard input and standard output.
  3534.                     
  3535.  
  3536.                                                                                           page 87
  3537.  
  3538.  
  3539.                           It also should be pointed out that the program automatically deletes
  3540.                         trailing spaces at the end of each record, and that input records are
  3541.                         assumed to be less than 4000 characters long.
  3542.                     
  3543.                           NOTE:  The fact that MAKEALL deletes trailing spaces at the end of each
  3544.                         record can cause problems in certain cases.  MAKE assumes that some
  3545.                         characters (such as the "\") have special meanings if they are the very
  3546.                         last character on a given line.  If a programmer needs to have such a
  3547.                         character as the last character on a line, a common trick to "fake out"
  3548.                         MAKE is to put a space or something after the special character so MAKE
  3549.                         will ignore it.  MAKEALL deletes this blank, so "caveat emptor".
  3550.                     
  3551.                           To use the MAKEALL program, the command line looks like:
  3552.                     
  3553.                         snorun makeall [<iooptions>][;<options>]
  3554.                     
  3555.                         <iooptions>::
  3556.                            <<inputfile>      or
  3557.                            /5=<inputfile>    or
  3558.                            /5:<inputfile>
  3559.                               This item allows specification of a file (or device) from which
  3560.                               the input file is to be read.  If this item is not specified at
  3561.                               all, the program reads from "default standard input", which may
  3562.                               be a piped input file, or the console.  By convention, MAKE files
  3563.                               usually have blank extensions, but MAKEALL doesn't care if you
  3564.                               follow the convention or not.
  3565.                     
  3566.                            ><outputfile>     or
  3567.                            >><outputfile>    or
  3568.                            /6=<outputfile>   or
  3569.                            /6:<outputfile>
  3570.                               This item allows specification of a file (or device) to which
  3571.                               the output file is to be written.  This can be either a printer
  3572.                               or a disk file, or in general any MS-DOS sequential output device.
  3573.                               Note that the ">>" form appends the output to the end of the
  3574.                               existing contents of the specified file, if any.  If this item
  3575.                               is not specified at all, the program writes to the "default
  3576.                               standard output", which may likewise be piped into another program
  3577.                               or by default will appear upon the console.  I suggest that the
  3578.                               extension for output files from MAKEALL use either ".ALL" or ".BAT",
  3579.                               but you are free to choose other conventions if you prefer.
  3580.                     
  3581.  
  3582.                                                                                           page 88
  3583.  
  3584.  
  3585.                         <options>::
  3586.                            /borl
  3587.                               This option causes the "$*" macro replacment item to be replaced
  3588.                               by the target file's path name AND file name (but not extension).
  3589.                               If this option is not specified, the "$*" macro replacement item
  3590.                               is replaced by the target file's file name (only), including
  3591.                               neither the path name nor extension, as per Microsoft's convention.
  3592.                     
  3593.                            /cs
  3594.                               This option makes macro replacement items case sensitive.  If this
  3595.                               option is specified, "name=replace" will not replace $(NAME).  Note
  3596.                               that the case sensitivity option does not affect inference rule
  3597.                               extensions (these are always case insensitive, since DOS treats
  3598.                               file names as case insensitive anyhow).  It also does not affect
  3599.                               the macros whose values are taken from MS-DOS environment variables.
  3600.                               MS-DOS environment variable names are ALWAYS in upper case;  using
  3601.                               macro replacement items in lower case will ensure that they are
  3602.                               never supplied from the MS-DOS environment variables.  The default
  3603.                               is that macro replacement items' names are not case-sensitive (they
  3604.                               are in the default case converted internally to upper case by
  3605.                               MAKEALL).
  3606.                     
  3607.                            /einp
  3608.                               This option specifies that the input make file is to be echoed to
  3609.                               the console as it is being read.  This permits one to watch the
  3610.                               input of make file lines and observe how each one is modified to
  3611.                               batch file output records.  This option can also be useful in
  3612.                               tracking down discrepancies or problems during the MAKEALL process.
  3613.                     
  3614.                            /dirt
  3615.                               This option causes the inference rules table (containing all the
  3616.                               inference rules known to MAKEALL) to be dumped to the screen upon
  3617.                               completion of reading the input make file.  This is sometimes
  3618.                               useful in trying to track down problems.
  3619.                     
  3620.                            /dmrt
  3621.                               This option causes the table containing all known macro replacement
  3622.                               items and their final values to be dumped to the screen upon
  3623.                               completion of reading the input make file.  NOTE:  This table does
  3624.                               NOT contain those values which have been specified on the command
  3625.                               line, as these are kept in a different, higher-priority table.
  3626.                     
  3627.  
  3628.                                                                                           page 89
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.                           Example command lines would look like:
  3641.                     
  3642.                             snorun makeall <inmake >outmake.bat
  3643.                             snorun makeall <c:\mymake.mak >c:\mymake.all
  3644.                             snorun makeall /5=d:\source\payrsys /6:c:\source\payrsys.all;/einp
  3645.                     
  3646.  
  3647.                                                                                           page 90
  3648.  
  3649.  
  3650.                     
  3651.                     30.  MAKEMAKE  --  BUILD A MAKE FILE BASED ON INCLUSIONS
  3652.                     
  3653.                           One of the other problems involved with using MAKE files is that one
  3654.                         is rarely really certain that all the files upon which a given source
  3655.                         module depends are included in its list of dependencies in its MAKE
  3656.                         file.
  3657.                     
  3658.                           MAKEMAKE reads through a make file.  For each MAKE file
  3659.                         target/dependency line encountered, the first dependency item is
  3660.                         presumed to be a source file (if its extension is either .SNO, .C,
  3661.                         .ASM, or .H).  This file is read, as are any inclusion files it requires,
  3662.                         any inclusion files those require, and so forth.  (NOTE:  .ASM files
  3663.                         are only processed if the /A option has been specified, see below).
  3664.                     
  3665.                           If you do not yet have a MAKE file for your programs, you may wish to
  3666.                         use the separate MAKERMAK program, described below, which will
  3667.                         construct a raw MAKE file from the entries it finds in one or more of
  3668.                         your directories.
  3669.                     
  3670.                           The output file from MAKEMAKE is basically the same as the input
  3671.                         make file, except that:
  3672.                     
  3673.                           1)  The new "dependency list" includes all referenced inclusion files,
  3674.                         as well as all inclusions of inclusions, as well as any dependency
  3675.                         files that were contained in the original make file;
  3676.                     
  3677.                           2)  The new "dependency list" will have the path names associated
  3678.                         with inclusion files that have been located based on default paths
  3679.                         (described below).
  3680.                     
  3681.                           When looking for inclusion files which do not contain an explicit drive
  3682.                         or path specification, MAKEMAKE looks both in the "current directory" as
  3683.                         well as in all the directories indicated by the enviroment strings
  3684.                         "SNOLIB=", "INCLUDE=", and "LIB=" (as set up using the DOS "SET" command,
  3685.                         see the MS-DOS User's Guide).  If an inclusion request in a file contains
  3686.                         any kind of a explicit path specification (either a drive specifier or a
  3687.                         subdirectory name of any kind), then MAKEMAKE will not attempt to search
  3688.                         other paths to find that inclusion file.
  3689.                     
  3690.  
  3691.                                                                                           page 91
  3692.  
  3693.  
  3694.  
  3695.                         WARNING:  "current directory" above refers to the directory in which
  3696.                         MAKEMAKE is being run, which may not be the same as the directory in
  3697.                         which the "subject file", or the file it has included, is in.  Although
  3698.                         this could be changed in MAKEMAKE, note that most MAKE programs running
  3699.                         through the same MAKE file would have the same problem!
  3700.                     
  3701.                           MAKEMAKE, if you use it in conjunction with the DRVSPKR Speaker Device
  3702.                         Driver, will give a distinctive audible alert to notify you of any
  3703.                         referenced inclusion files which MAKEMAKE is unable to find.
  3704.                     
  3705.                           MAKEMAKE will allow inclusion files to be nested to essentially
  3706.                         arbitrary depth.  It can handle continuation lines on the input MAKE
  3707.                         file (lines can be up to 400 characters wide) and will generate
  3708.                         continuation lines as appropriate to the output MAKE file.
  3709.                     
  3710.                           The current version of MAKEMAKE does not attempt to perform any macro
  3711.                         substitutions, either when processing the dependency items from the input
  3712.                         make file or when processing the INCLUDE statements in the source
  3713.                         program files.
  3714.                     
  3715.                           MAKEMAKE also supports many different options which allow the user quite
  3716.                         a bit of control over the degree of output produced by MAKEMAKE.  See the
  3717.                         options as described below for more details.  All options may appear in
  3718.                         either upper or lower case.  Don't forget the semicolon which must
  3719.                         precede any options you specify... it is important.
  3720.                     
  3721.                           If you are an international user of MAKEMAKE, note that MAKEMAKE will
  3722.                         support the proper case conversion of your national character set if you
  3723.                         specify the correct corresponding upper and lower case characters using
  3724.                         the environment option as described elsewhere in this document.
  3725.                     
  3726.                           To use the MAKEMAKE utility program, the command line is of the form:
  3727.                     
  3728.                         snorun  makemake [<iooptions>][;<options>]
  3729.                     
  3730.                         <iooptions>::
  3731.                            /5=<inputfile>    or
  3732.                            /5:<inputfile>
  3733.  
  3734.                                                                                           page 92
  3735.  
  3736.  
  3737.  
  3738.                               This item allows specification of a file from which the input
  3739.                               make file is to be read.  This file contains lines in the
  3740.                               "usual" MAKE file format (see the documentation of your MAKE program
  3741.                               for more details).
  3742.                     
  3743.                            ><outputfile>     or
  3744.                            >><outputfile>    or
  3745.                            /6=<outputfile>   or
  3746.                            /6:<outputfile>
  3747.                               This item allows specification of a file (or device) to which
  3748.                               the output file is to be written.  This can be either a printer
  3749.                               or a disk file, or in general any MS-DOS sequential output device.
  3750.                               Note that the ">>" form appends the output to the end of the
  3751.                               existing contents of the specified file, if any.  If this item
  3752.                               is not specified at all, the program writes to the "default
  3753.                               standard output", which may likewise be piped into another program
  3754.                               or by default will appear upon the console.  It is usually a good
  3755.                               idea to examine the output make file from MAKEMAKE, to ensure that
  3756.                               MAKEMAKE has done what you intended, before you blindly try to
  3757.                               use it!
  3758.                     
  3759.                         <options>::
  3760.                            /a
  3761.                               This option causes MAKEMAKE to also scan .ASM source files.  The
  3762.                               support for .ASM source files has been made optional, since this
  3763.                               form of source files requires more complex scanning and I didn't
  3764.                               want to force SNOBOL4+ and C users to have to do the more complex
  3765.                               scanning unless it was really required.
  3766.                     
  3767.                            /d
  3768.                               This option causes MAKEMAKE to display the target and dependency
  3769.                               file name, as it has parsed them off, to be displayed.  Note that
  3770.                               only the inclusions required for the FIRST DEPENDENCY ITEM
  3771.                               SPECIFIED (which MAKEMAKE refers to as the Subject) will be
  3772.                               searched by MAKEMAKE.
  3773.                     
  3774.                            /f
  3775.                               This option causes MAKEMAKE to display messages on the screen
  3776.  
  3777.                                                                                           page 93
  3778.  
  3779.  
  3780.                               telling the user exactly which files are being processed at all
  3781.                               times.  This output may be useful if MAKEMAKE is having trouble
  3782.                               locating one or more inclusion files and the user would like
  3783.                               additional information to figure out why this might be happening.
  3784.                     
  3785.                            /i
  3786.                               This option causes MAKEMAKE to display a message on the console as
  3787.                               it finds each request for an inclusion.  The message includes the
  3788.                               name of the file being read, and the name of the file which the
  3789.                               inclusion has requested.
  3790.                     
  3791.                            /o
  3792.                               This option causes the output target/dependency header (as written
  3793.                               to the output make file) to also be echoed to the screen.  This
  3794.                               might be desirable if the user wishes to follow on the console the
  3795.                               progress of the MAKEMAKE program.
  3796.                     
  3797.                            /p
  3798.                               This option causes MAKEMAKE to display on the screen, at the start
  3799.                               of execution, the total list of paths through which it will
  3800.                               automatically search for inclusion files which do not contain a
  3801.                               specific drive or path specification and which are not found in
  3802.                               the current directory.
  3803.                     
  3804.                            /sa
  3805.                               This option causes MAKEMAKE to summarize, after it has processed
  3806.                               each MAKE file target/dependency item, the names of all the
  3807.                               inclusions which have been referenced (both directly and
  3808.                               indirectly).
  3809.                     
  3810.                            /sd
  3811.                               This option causes MAKEMAKE to summarize, after it has processed
  3812.                               each MAKE file target/dependency item, the names of all the
  3813.                               inclusions which have been DIRECTLY referenced by the "subject"
  3814.                               source file (the first dependency item in the group).
  3815.                     
  3816.                            /sk
  3817.                               This option causes MAKEMAKE to summarize, when it has nearly
  3818.                               completed execution, the names of all the source files and
  3819.                               inclusion files which it has processed.
  3820.                     
  3821.  
  3822.                                                                                           page 94
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.                           Example command lines would look like:
  3835.                     
  3836.                             snorun makemake /5:inmake. /6=outmake.mak
  3837.                             snorun makemake 5=c:\mymake.txt /6=c:\mymake2.txt ;/i /sa
  3838.                     
  3839.  
  3840.                                                                                           page 95
  3841.  
  3842.  
  3843.                     
  3844.                     31.  MAKERMAK  --  BUILD A RAW MAKE FILE
  3845.                     
  3846.                           This is another useful utility if you use MAKE files for major
  3847.                         projects.  This utility will go through one (or more) subdirectories,
  3848.                         find all the .ASM, .C, .SNO and .SPT programs, and automatically build
  3849.                         a MAKE file to compile or assemble each of them to the corresponding
  3850.                         .REL, .SAV, or .EXE files, as appropriate.
  3851.                     
  3852.                           The output of this program is suitable for input to the MAKEMAKE
  3853.                         program, described earlier.  (In fact, you can even "pipe" the output
  3854.                         of MAKERMAK directly to MAKEMAKE... how to do this will be described
  3855.                         a little later).
  3856.                     
  3857.                           Please see the warning in the description of the MAKEMAKE program,
  3858.                         described earlier, regarding the context in which MAKEMAKE searches
  3859.                         by default for any referenced inclusion files.
  3860.                     
  3861.                           The command line to invoke MAKERMAK is of the form:
  3862.                     
  3863.                         snorun makermak <iooptions>[;<options>]
  3864.                     
  3865.                         <iooptions>::
  3866.                            ><outputfile>     or
  3867.                            >><outputfile>    or
  3868.                            /6=<outputfile>   or
  3869.                            /6:<outputfile>
  3870.                               This item allows specification of a file (or device) to which
  3871.                               the output file is to be written.  This can be either a printer
  3872.                               or a disk file, or in general any MS-DOS sequential output device.
  3873.                               Note that the ">>" form appends the output to the end of the
  3874.                               existing contents of the specified file, if any.  If this item
  3875.                               is not specified at all, the program writes to the "default
  3876.                               standard output", which may likewise be piped into another program
  3877.                               or by default will appear upon the console.  It is usually a good
  3878.                               idea to examine the output make file from MAKERMAK, to ensure that
  3879.                               MAKERMAK has done what you intended, before you blindly try to
  3880.                               use it!
  3881.                     
  3882.  
  3883.                                                                                           page 96
  3884.  
  3885.  
  3886.  
  3887.                         <options>::
  3888.                            path=<pathname>   or
  3889.                            /p=<pathname>
  3890.                               This option allows specification of the path name to be used for
  3891.                               the subdirectory and file lookup.  Example pathnames are:
  3892.                                     c:  a:ms*  d:ms?as*      etc.
  3893.                               The default path name is "\".  As in the output file options,
  3894.                               you may use either a "=" or a ":" in the option specification,
  3895.                               whichever you prefer.
  3896.                     
  3897.                               If you are only going to specify a subdirectory, and wish MAKERMAK
  3898.                               to process all the files in that subdirectory, you should terminate
  3899.                               the name of the subdirectory with a "\" character.  For example, if
  3900.                               you want to build a MAKE file to compile all the programs in your
  3901.                               directory SNOPLUS, your path option might look like:
  3902.                                     /p=c:\snoplus\
  3903.                     
  3904.                               Note that you can also specify the prefix part of a file name
  3905.                               as well as the name of a subdirectory.  In this case, MAKERMAK
  3906.                               will find all files beginning with the given prefix part.  If the
  3907.                               pathname also matches a subdirectory name, then MAKERMAK will also
  3908.                               operate on that subdirectory as well IF the "/R" option has been
  3909.                               specified (see below).  An example of using MAKERMAK to build a
  3910.                               MAKE file for all ".C" files beginning with "CL" in a given
  3911.                               subdirectory might be something like:
  3912.                                     snorun makermak /6:clc.mak ;path=c:\cprog\cl*.c
  3913.                               This example would build a MAKE file to compile, for example,
  3914.                                     c:\cprog\clock.c
  3915.                                     c:\cprog\clearmem.c
  3916.                                     c:\cprog\clubroll.c
  3917.                     
  3918.                            /r
  3919.                               This option causes MAKERMAK to also scan any lower-level
  3920.                               subdirectories (and so on) corresponding to the path indicated.
  3921.                               In this way, one could conceivably create a MAKE file which would
  3922.                               assemble or compile, as appropriate, everything containined on an
  3923.                               entire volume.
  3924.                     
  3925.  
  3926.                                                                                           page 97
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.                               NOTE:  The use of this option, especially when using MAKERMAK in
  3934.                               conjunction with MAKEMAKE, has a minor "trap" in that inclusion
  3935.                               files that MAKEMAKE finds referenced will be assumed (first) to
  3936.                               be in the same directory that MAKEMAKE is being run in, which may
  3937.                               not be the same directory as the source file being read (the one
  3938.                               that contains the inclusion) is in.  This could be changed in a
  3939.                               future version of MAKEMAKE;  however, note that if you tried to
  3940.                               run the resulting MAKE file from the same directory you were in
  3941.                               when you built it, you would have the same problem finding the
  3942.                               inclusions anyhow.  If you have the DRVSPKR Speaker Device Driver
  3943.                               installed, MAKEMAKE will give a distinctive audible warning for
  3944.                               any referenced inclusion files it cannot find.
  3945.                     
  3946.                            NOTE:  The output of MAKERMAK is suitable for input to the previously
  3947.                               described MAKEMAKE program.  The "piping" facility is described
  3948.                               further in your MS-DOS User's Guide.  However, just as an example,
  3949.                               if you wanted to create a MAKE file for all the .C, .ASM, and .SNO
  3950.                               programs contained in your entire tree of directories starting at
  3951.                               C:\ASM, and wish at the same time for MAKEMAKE to find all their
  3952.                               dependencies based upon any inclusions they might have, you could
  3953.                               achieve this by use of the single command line:
  3954.                     
  3955.                             snorun makermak ;path=c:\asm\ /r | snorun makemake /6:hugemake. ;/a
  3956.                     
  3957.  
  3958.                                                                                           page 98
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.                     
  3966.                     32.  MELIZA  --  PSYCHOANALYSIS PROGRAM (FAMOUS EARLY AI EFFORT)
  3967.                     
  3968.                           This is a version of the famous "ELIZA" psychoanalysis program, one of
  3969.                         the earliest famous attempts at "artificial intelligence".  Although
  3970.                         this program is relatively straightforward, if the subject is persistent
  3971.                         for a while, and attempts to converse seriously, the program can
  3972.                         occasionally produce some rather startling insights and is sometimes
  3973.                         terribly funny.  (ELIZA is the happiest when you talk to her using
  3974.                         complete sentences and don't ask too many questions.)
  3975.                     
  3976.                           This program has been around for quite some time, in many different
  3977.                         forms.  I don't know who the original authors were.  The version
  3978.                         described here is a consolidation of several SNOBOL4 efforts, apparently
  3979.                         beginning with a version in the December 1970 issue of SIGPLAN, page 50,
  3980.                         by Robert T. Duquet.  This in turn was modified by Mike Alexander and
  3981.                         Viktors Berstis, and finally by Gordon E. Peterson II.
  3982.                     
  3983.                           To start your appointment with ELIZA, simply enter the command line:
  3984.                     
  3985.                         snorun meliza
  3986.                     
  3987.                         and then take your place on the couch, and relax.  The doctor will be
  3988.                         with you shortly.
  3989.                     
  3990.  
  3991.                                                                                           page 99
  3992.  
  3993.  
  3994.  
  3995.                     
  3996.                     33.  MERGECMP  --  MERGE WORD'S .CMP USER DICTIONARY FILES
  3997.                     
  3998.                           This utility program is especially useful if you use Microsoft WORD.
  3999.                         Microsoft WORD's user spelling dictionaries are sequential text files
  4000.                         which are used by the spelling checker.  WORD version 2, although not
  4001.                         documented (in classic Microsoft style!), keeps a default user dictionary
  4002.                         under the name of "SPECIALS.CMP".  When the user adds a word (not found
  4003.                         in the normal dictionary) to his user dictionary, this is where WORD
  4004.                         ordinarily places it.  (Microsoft finally got around to documenting this
  4005.                         feature, I am told, in version 3.)
  4006.                     
  4007.                           If you have several such .CMP files, and wish to combine them, the
  4008.                         MERGECMP program will help you to do this.  It takes two text files,
  4009.                         sorted into ascending or descending sequence, and merges them into a
  4010.                         single output file.  Options allow you to decide how you want to handle
  4011.                         records which are identical in both the two input files:  you may output
  4012.                         them both, or only once, or delete them entirely if you choose.
  4013.                     
  4014.                           Although this program was written specifically to process Microsoft
  4015.                         WORD's user dictionary files, it can also merge any other combination
  4016.                         of sorted text files, as long as the "sort key field" starts in the
  4017.                         first byte of the record and continues for the duration of the record.
  4018.                     
  4019.                           Note that multiple identical input records within a SINGLE input file
  4020.                         are not deleted by MERGECMP.  Input records are assumed to be less than
  4021.                         4000 characters long.  (This limit was 1000 characters for some earlier
  4022.                         versions of this program).  Any trailing spaces are removed from records
  4023.                         processed by MERGECMP.  Options can be entered in either upper or lower
  4024.                         case, and are normally separated somehow.  Also note that the entire
  4025.                         input record is compared, starting with the first column.
  4026.                     
  4027.                           The command line to invoke MERGECMP looks like:
  4028.                     
  4029.                         snorun  mergecmp;<inputfile1>,<inputfile2>,<outputfile>[,<options>]
  4030.                     
  4031.                         <inputfile1>
  4032.  
  4033.                                                                                           page 100
  4034.  
  4035.  
  4036.  
  4037.                         <inputfile2>
  4038.                         <outputfile>::
  4039.                            These are the file specifications for the two input files and the
  4040.                            output file.  They should adhere to normal MS-DOS file naming
  4041.                            conventions.  Path names are, of course, permitted.  If no file
  4042.                            extensions are supplied for any file, ".CMP" is assumed.  If no
  4043.                            output file is specified, it will default to the console.  File
  4044.                            specifications can be separated by commas or spaces.  Note in
  4045.                            particular, however, that all three file specifications must be
  4046.                            present:  it is not permissible to omit, say, inputfile2 and
  4047.                            assume that the two commas are sufficient to indicate it as a
  4048.                            null file.  (Of course, this would be pointless on a merge program,
  4049.                            anyway!).
  4050.                     
  4051.                         <options>::
  4052.                            /D
  4053.                               This option specifies that the output file is to be produced in
  4054.                               descending sequence.  In this case, note that the input files
  4055.                               supplied should also be sorted in descending sequence.  If this
  4056.                               option is not specified, ascending sequence is assumed, and in
  4057.                               this case the input files should likewise be in ascending sequence.
  4058.                     
  4059.                            /B
  4060.                               This option specifies that, in the event of the same record being
  4061.                               found in both input files, both copies are to be written to the
  4062.                               output file.  The default, if neither the /B or /X option are
  4063.                               specified, is to write identical input records to the output file
  4064.                               only once.
  4065.                     
  4066.                            /X
  4067.                               This option specifies that, in the event of the same record being
  4068.                               found in both input files, neither copy is to be written to the
  4069.                               output file.  This provides an "XOR" type feature for sorted text
  4070.                               files.  The default, if neither the /B or /X option are specified,
  4071.                               is to write identical input records to the output file only once.
  4072.                     
  4073.  
  4074.                                                                                           page 101
  4075.  
  4076.  
  4077.                     
  4078.                     34.  MSCRIBE  --  DOCUMENT FORMATTING AND ENTRY PROGRAM
  4079.                     
  4080.                           This utility program is similar to the Datapoint MSCRIBE program.  It
  4081.                         reads in a simply formatted text file, and ends up producing a nicely
  4082.                         formatted version of the documentation, according to a standard format.
  4083.                         This is suitable for product specifications, user's guides, and such.
  4084.                         MSCRIBE works in conjunction with the Borland program SUPERKEY and the
  4085.                         word processing program WORDSTAR 2000+.  The output macro files are
  4086.                         kept smaller than 8K bytes, by segmenting them into multiple files (the
  4087.                         extension of the macro file name is incremented for additional macro
  4088.                         files, which are automatically linked).  WORDSTAR 2000 should be con-
  4089.                         figured to support document histories.  Also, before running the "key"
  4090.                         command below, it is assumed that a format file (same name as the input
  4091.                         file, but with extension .FRM) exists for the document body, and that
  4092.                         the format file MSCRIBET.FRM exists (which is used for the title page
  4093.                         and preface).  The final document is to be found in the resulting files
  4094.                         with extensions .TIT, .TOC, and .BOD, which are then printed by WORDSTAR.
  4095.                     
  4096.                           Note that you may have MSCRIBE in either of two forms, the SNOBOL4+
  4097.                         form (with the extension .SAV) or the SPITBOL form (with the extension
  4098.                         .EXE).  The command lines are slightly different between the two forms:
  4099.                         If you have MSCRIBE.SAV, use the "snorun" form of the command line;  if
  4100.                         you have MSCRIBE.EXE, use the "mscribe" form of the command line instead.
  4101.                     
  4102.                         snorun mscribe /5:<inputfilespec> /6:<macrofilespec>        OR:
  4103.                         mscribe /5:<inputfilespec> /6:<macrofilespec>
  4104.                         key <macrofilespec> /ml
  4105.                     
  4106.                           The input file contains text with embedded formatting commands.  These
  4107.                         commands are all beginning in column one of their record.  Within the
  4108.                         input file, the following formatting commands are used:
  4109.                     
  4110.                             +m1 <projectname>
  4111.                         This command furnishes the project name for the document.
  4112.                     
  4113.                             +m2 <title>
  4114.                         This command furnishes the title of the document.
  4115.                     
  4116.  
  4117.                                                                                           page 102
  4118.  
  4119.  
  4120.  
  4121.                             +m3 <documenttype>
  4122.                         This command furnishes the type of document ("User's Guide", "Prelimin-
  4123.                         ary Specification", or the like).
  4124.                     
  4125.                             +m4 <date>
  4126.                         This command supplies the version date of the document.
  4127.                     
  4128.                             +m5
  4129.                         This command indicates that the following text (beginning with the next
  4130.                         record) is the Preface for the document.
  4131.                     
  4132.                             +m6 <docdescription>
  4133.                         This command indicates the end of the Preface and supplies the name for
  4134.                         the Body file (this is keyed into the Document History kept by Wordstar
  4135.                         for the main part of the document).  It also indicates where the Table
  4136.                         of Contents is to be inserted.
  4137.                     
  4138.                             +m7 0.  <chapterheading>
  4139.                         This command supplies the heading for each chapter.  The "0" is auto-
  4140.                         matically replaced by MSCRIBE with the chapter number.
  4141.                     
  4142.                             +m8 0.0[[.0].0] <sectionheading>
  4143.                         This command supplies the heading for each section, subsection, etc.
  4144.                         The zeros are automatically replaced by MSCRIBE with the appropriate
  4145.                         numbers for the given section, subsection, or sub-subsection.  Four
  4146.                         levels of section numbers are presently supported (more could be
  4147.                         supported on request, but Wordstar 2000+ only supports four levels in
  4148.                         its table of contents, hence the restriction).  The number of zeros
  4149.                         indicate the nesting level.
  4150.                     
  4151.                             +pp<n>  (e.g. +pp0, +pp1, etc.)
  4152.                         This command causes the text following to be the start of a new para-
  4153.                         graph.  You may start the new paragraph either on the following line or
  4154.                         on the same line as the +pp<n>, as long as at least one space follows
  4155.                         the command (and optional number).  New paragraphs are automatically
  4156.                         assumed after any +m<n> heading command which is followed by text.
  4157.                     
  4158.  
  4159.                                                                                           page 103
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.                             +sl<n>  (e.g. +sl0, +sl1, etc.)
  4170.                         This command causes the text following (beginning on the following line)
  4171.                         to be the start of a new paragraph.  You may start the new paragraph
  4172.                         either on the following line or on the same line as the +sl<n>, as long
  4173.                         as at least one space follows the command (and optional number).  The
  4174.                         only difference between this command and the +pp command is that using
  4175.                         this command keeps the new paragraph from being indented.
  4176.                     
  4177.                             +turnoff
  4178.                         This causes text following it to be ignored, including any +m<n> commands
  4179.                         that might be encountered, until a +turnon command is encountered.
  4180.                     
  4181.  
  4182.                                                                                           page 104
  4183.  
  4184.  
  4185.                     
  4186.                     35.  OVER  --  SHIFT A PRINT FILE OVER TO THE RIGHT
  4187.                     
  4188.                           This utility program is used to shift print files right by a specified
  4189.                         number of columns.  It is useful, for example, to get a listing of
  4190.                         a program documentation file which can be put into a binder without the
  4191.                         leftmost characters of each line becoming buried in the binding.  If
  4192.                         one or more nonprinting printer control characters are at the beginning
  4193.                         of each record, they are kept at the beginning and the padding characters
  4194.                         are inserted following those control characters.
  4195.                     
  4196.                           Note that this program, since it is compiled by the SPITBOL
  4197.                         implementation of the SNOBOL4 language to produce a true .EXE file, does
  4198.                         not use the SNORUN runtime module.
  4199.                     
  4200.                           To use the OVER utility, the command line is of the form:
  4201.                     
  4202.                         over  <inputfilespec> <outputfilespec> [/n<integer>]
  4203.                     
  4204.                         <inputfilespec>::
  4205.                            file name and extension, with optional drive spec and/or path name,
  4206.                            defining where the input is to come from.
  4207.                     
  4208.                         <outputfilespec>::
  4209.                            file name and extension, with optional drive spec and/or path name,
  4210.                            or device name, where the output file is to be placed.  It may also
  4211.                            be written to a specified device.
  4212.                     
  4213.                         /n<integer>::
  4214.                            This option specifies by how many columns the input file is to be
  4215.                            shifted to the right.  The default is twenty columns.  The option
  4216.                            letter "n" may be either upper or lower case.  Examples for this
  4217.                            option would look like:
  4218.                                     /N16
  4219.                                     /n7
  4220.                     
  4221.                         Therefore, example command lines might be:
  4222.                     
  4223.                             over  file1  file1ovr  /n5
  4224.                             over  a:docfile.txt  c:\docfiles\over\docfileo.txt
  4225.                     
  4226.  
  4227.                                                                                           page 105
  4228.  
  4229.  
  4230.                     
  4231.                     36.  PADREC  --  PAD RECORDS TO A FIXED SIZE
  4232.                     
  4233.                           This utility program copies the standard input file to the standard
  4234.                         output file.  While doing so, it converts all records to a fixed size.
  4235.                         This fixed record size, specified, may be as large as 5000 characters.
  4236.                         Each input record longer than the fixed size is truncated.  Each input
  4237.                         record shorter than the size indicated will have spaces added to
  4238.                         the right-hand side of the record until it is the length desired.
  4239.                     
  4240.                           Note that this program operates as a "filter", much the same way as
  4241.                         the DOS "MORE" command.  It reads from standard input and writes to
  4242.                         standard output.  Therefore, its input and/or output can be "piped" the
  4243.                         same way as any other DOS filter.  See the DOS User's Guide for more
  4244.                         details on filters and "piping" of standard input and standard output.
  4245.                     
  4246.                           The program is invoked with a command line of the form:
  4247.                     
  4248.                         snorun padrec [<iooptions>];<options>
  4249.                     
  4250.                         <iooptions>::
  4251.                            <<inputfile>      or
  4252.                            /5=<inputfile>    or
  4253.                            /5:<inputfile>
  4254.                               This item allows specification of a file (or device) from which
  4255.                               the input file is to be read.  If this item is not specified at
  4256.                               all, the program reads from "default standard input", which may
  4257.                               be a piped input file, or the console.
  4258.                     
  4259.                            ><outputfile>     or
  4260.                            >><outputfile>    or
  4261.                            /6=<outputfile>   or
  4262.                            /6:<outputfile>
  4263.                               This item allows specification of a file (or device) to which
  4264.                               the output file is to be written.  This can be either a printer
  4265.                               or a disk file, or in general any MS-DOS sequential output device.
  4266.                               Note that the ">>" form appends the output to the end of the
  4267.                               existing contents of the specified file, if any.  If this item
  4268.                               is not specified at all, the program writes to the "default
  4269.                               standard output", which may likewise be piped into another program
  4270.                               or by default will appear upon the console.
  4271.                     
  4272.  
  4273.                                                                                           page 106
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.                         <options>::
  4280.                            /S=<recsize>
  4281.                               This option specifies the fixed size of the records desired.  The
  4282.                               record size can contain embedded commas if you prefer:  specifying
  4283.                               "/S=2,048" is exactly the same as specifying "/S=2048".  The option
  4284.                               may be specified in upper case or lower case, and the delimiter
  4285.                               between the "S" and the record size may be an "=", a ":", or may
  4286.                               be omitted entirely if you prefer.
  4287.                     
  4288.                            /T=<tabwidth>     or
  4289.                               This option specifies that the input records may contain tab
  4290.                               characters, and that, if so, they should be expanded before
  4291.                               padding or truncating the record to the fixed size desired.  If
  4292.                               this option is specified, the output records will contain zero or
  4293.                               more spaces where the tab characters had been in the input records.
  4294.                               (Zero spaces would only apply at the end of the record if truncation
  4295.                               had taken place).  The option may be specified in upper or lower
  4296.                               case, and the delimiter between the "T" and the tab column width
  4297.                               may be an "=", a ":", or may be omitted entirely if you prefer.
  4298.                                 NOTE:  If the "/T" option is not specified, any tab characters
  4299.                               that might appear in the input records are treated as any ordinary
  4300.                               character.
  4301.                                 If the "/T" option is specified, but no tab width is explicitly
  4302.                               specified, tab characters will be expanded to the DOS default
  4303.                               spacing (which is eight columns).
  4304.                     
  4305.                           A typical command line would look like:
  4306.                     
  4307.                             snorun padrec <infile.txt >outfile.txt;/s=325
  4308.                     
  4309.  
  4310.                                                                                           page 107
  4311.  
  4312.  
  4313.  
  4314.                     
  4315.                     37.  PLAYCVMS  --  SUPERKEY TO DRVSPKR FORMAT CONVERTER
  4316.                     
  4317.                           The shareware music editing and generation system "Pianoman", by Neil
  4318.                         Rubenking, is capable of generating delightful music and melodies.  It
  4319.                         allows for interactively entering and editing these melodies, and can
  4320.                         perform in up to four-part harmony on a standard PC-compatible.
  4321.                         (The PIANOMAN software is by a different author, but may be available
  4322.                         from the same place you got your shareware copy of these SNOBOL4+
  4323.                         utilities).
  4324.                     
  4325.                           My loudspeaker device driver makes it possible to "queue up" lengthy
  4326.                         musical selections (or any sequence of tones, for that matter) and
  4327.                         then proceed to do other things while they are produced.  The PLAYCVMS
  4328.                         utility provides part of a "gateway" between PIANOMAN and the
  4329.                         DRVSPKR.SYS loudspeaker device driver.  (The loudspeaker device driver
  4330.                         is also available through many bulletin boards, users groups, CompuServe,
  4331.                         all decent shareware diskette distributors, or directly from me if you
  4332.                         prefer).
  4333.                     
  4334.                           A normal part of the PIANOMAN package is a conversion utility called
  4335.                         PLAYRPNO.  This utility can take PIANOMAN music files (which typically
  4336.                         have extensions ".MUS") and convert these into ASCII text files suitable
  4337.                         for loading by Borland's SUPERKEY utility (although larger musical
  4338.                         selections typically don't work this way because they tend to exceed
  4339.                         SUPERKEY's macro memory capacity).  In any case, the PLAYCVMS utility
  4340.                         can take these SUPERKEY macro files and convert them to the format
  4341.                         suitable for use by the DRVSPKR.SYS loudspeaker device driver.
  4342.                     
  4343.                           NOTE:  The PLAYRPNO utility generates a rather specific form of
  4344.                         Superkey macro file.  The PLAYCVMS utility has been tailored to this
  4345.                         specific format.
  4346.                     
  4347.                           The output file from PLAYCVT (normally with extension .SPK, by
  4348.                         convention) can be routed directly to the speaker (SPKR:) or can be
  4349.                         saved in a disk file and copied to the speaker later, using COPY or
  4350.                         any other program.
  4351.                     
  4352.  
  4353.                                                                                           page 108
  4354.  
  4355.  
  4356.  
  4357.                           Note that the speaker device driver is somewhat limited by its
  4358.                         interrupt-driven mode of operation to a "granularity" of something
  4359.                         like eighteen different tones (corresponding to "timer ticks") per
  4360.                         second.  On some PIANOMAN music, typically those with multiple voices
  4361.                         and very rapidly changing notes, the PLAYCVMS utility has to slow the
  4362.                         piece down by a factor of two or more to avoid losing notes.  On single-
  4363.                         voice selections, this problem rarely occurs.
  4364.                     
  4365.                           A special option to PLAYCVMS permits one to request that PLAYCVMS
  4366.                         attempt to "shrink" excess slowness out of the piece by dropping
  4367.                         every "n-th" (very) short note.  This is most successful when the piece
  4368.                         has multiple voices and the notes are typically rather long.  It is less
  4369.                         successful on rapidly moving pieces, where its "sampling" technique
  4370.                         can result in the occasional loss of musically necessary notes.  If in
  4371.                         doubt, try it and see how the results are.
  4372.                     
  4373.                           Note that PLAYCVMS does not require you to give it the name of an
  4374.                         output file.  The SUPERKEY macro files generated by PLAYRPNO contain a
  4375.                         "<TITLE>" phrase which PLAYCVMS uses to find the name of the macro
  4376.                         file (it is generally has a ".mac" extension).  PLAYCVMS uses the
  4377.                         same name, only changing the extension to ".spk".  To prevent confusion,
  4378.                         PLAYCVMS displays the name of the output file it is writing to.
  4379.                     
  4380.                           To use the PLAYCVMS program, the command line format is:
  4381.                     
  4382.                         snorun playcvt <iooptions>[;<options>]
  4383.                     
  4384.                         <iooptions>::
  4385.                            <<inputfile>      or
  4386.                            /5=<inputfile>    or
  4387.                            /5:<inputfile>
  4388.                               This item allows specification of a file (or device) from which
  4389.                               the input file is to be read.
  4390.                     
  4391.                         <options>::
  4392.                            /s:<number>       or
  4393.                            /s=<number>
  4394.  
  4395.                                                                                           page 109
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.                               This option allows requesting that the output file (the one
  4404.                               formatted for the speaker device driver) be "shrunk" by dropping
  4405.                               every "n-th" note, if and only if that is a "very short" note.
  4406.                               Generally, for a good speedup and minimum loss of musically
  4407.                               significant material, I suggest a value of one less than the
  4408.                               number of voices present.  In other words, for a four-voice
  4409.                               musical selection, one might try specifying a command line like:
  4410.                     
  4411.                               snorun playcvms /5:mntpythn.mac /6:mntpythn.spk ;/s=3
  4412.                     
  4413.                               Note that the option can be specified in either upper or lower
  4414.                               case, and the separator may be either ":" or "=" (or omitted
  4415.                               altogether, if you prefer something like "/S3").
  4416.                     
  4417.                            /x
  4418.                               This option specifies that the extra spaces normally added to the
  4419.                               output file (separating notes from each other, for the sake of
  4420.                               readability) be omitted to make the output file smaller.  The file
  4421.                               will play just the same as normal, but will be perhaps 15% smaller.
  4422.                               Note that the option may be specified, as normal, in either upper
  4423.                               or lower case.
  4424.                     
  4425.  
  4426.                                                                                           page 110
  4427.  
  4428.  
  4429.                     
  4430.                     38.  PLAYCVT  --  PLAY FILE TO DRVSPKR FORMAT CONVERTER
  4431.                     
  4432.                           This utility program converts a file containing BASIC-format "PLAY"
  4433.                         strings into a format suitable for the loudspeaker device driver
  4434.                         DRVSPKR.SYS.  The loudspeaker device driver is another shareware
  4435.                         software product from this author.
  4436.                     
  4437.                           Many BASIC programs which play music can be relatively easily changed
  4438.                         to write their "PLAY" strings to a file by changing their PLAY statements
  4439.                         to PRINT statements.  For example, the following statements in a BASIC
  4440.                         program:
  4441.                     
  4442.                             PLAY "abc#"
  4443.                             PLAY "o3deg"
  4444.                     
  4445.                             Could be changed to:
  4446.                     
  4447.                             OPEN "xxx.tun" FOR OUTPUT AS #1
  4448.                             PRINT #1,"abc#"
  4449.                             PRINT #1,"o3deg"
  4450.                     
  4451.                           The resulting output file (in this case, "xxx.tun") would then be
  4452.                         suitable for input to the PLAYCVT program.  The output file from
  4453.                         PLAYCVT (normally with extension .SPK, although this is simply a
  4454.                         convention and does not represent a default) can be routed directly
  4455.                         to the speaker (SPKR:) or can be saved in a disk file and copied to
  4456.                         the speaker later, using COPY or any other program.
  4457.                     
  4458.                           Note that you need not use BASIC to generate a file in "PLAY string"
  4459.                         format.  This can be generated using any program you like (even an
  4460.                         editor or the DOS COPY command can be used!).  The actual format of
  4461.                         PLAY strings is described in the relevant BASIC User's Guide and is
  4462.                         outside the scope of this document.
  4463.                     
  4464.                           Input to the PLAYCVT program can come directly from another program
  4465.                         using the MS-DOS "pipe" facility.  See your DOS User's Guide for further
  4466.                         information.
  4467.                     
  4468.  
  4469.                                                                                           page 111
  4470.  
  4471.  
  4472.                           Note that the BASIC "PLAY" facility, in all of its capabilities,
  4473.                         requires a much more frequent and intensive use of your computer's
  4474.                         resources than the DRVSPKR device driver does.  As a result, some
  4475.                         things with are possible with BASIC's "PLAY" command are not fully
  4476.                         "do-able" by the speaker device driver.
  4477.                     
  4478.                           For example, the "music normal" and "music staccato" features of
  4479.                         the BASIC "PLAY" command can only be supported by the speaker device
  4480.                         driver on relatively long notes.  This is because DRVSPKR has at most
  4481.                         about eighteen "uses" of the processor per second.  In each case, the
  4482.                         PLAYCVT program attempts to come as close as DRVSPKR can to the
  4483.                         intent of the original PLAY command.
  4484.                     
  4485.                           This coarser granularity also comes into play on very short or
  4486.                         irregularly sized notes.  Relatively subtle changes in tempo, note
  4487.                         duration or the like which are below the resolution of DRVSPKR will
  4488.                         generally not be translatable.
  4489.                     
  4490.                           Since the loudspeaker device driver is buffered and interrupt-
  4491.                         driven, the "music foreground" and "music background" commands to the
  4492.                         BASIC "play" statement are irrelevant to DRVSPKR and are discarded by
  4493.                         PLAYCVT.
  4494.                     
  4495.                           A more serious problem concerns BASIC's ability to embed variables
  4496.                         in its PLAY strings by variable name.  Since those variables are of
  4497.                         course long gone by the time PLAYCVT is running, it cannot replace
  4498.                         such variables with their then-current string values.  These embedded
  4499.                         variable commands are not supported by PLAYCVT.  These commands usually
  4500.                         look like:
  4501.                     
  4502.                             Xa$;    or
  4503.                             =name;  or
  4504.                             some reference to VARPTR$(name)
  4505.                     
  4506.                           Such references in PLAY statements must be changed, either by
  4507.                         manually inserting the variable's value or by dividing the PLAY
  4508.                         string into several concatenated strings or possibly multiple PLAY
  4509.                         statements.  This is sometimes trivial, and sometimes a real pain.
  4510.                         It's too bad that the design of BASIC incorporates such a screwball
  4511.                         feature in a way so contrary to the design of the rest of the language.
  4512.                         But, as in many things with BASIC, that's just the way it is.
  4513.                     
  4514.  
  4515.                                                                                           page 112
  4516.  
  4517.  
  4518.  
  4519.                           There is another program which I have used to aid in such conversions,
  4520.                         which finds such items and replaces them with the last-seen string
  4521.                         constants assigned to the variable each refers to.  However, the program
  4522.                         is not really general, since it reads the BASIC program sequentially
  4523.                         rather than executing it, and I'm disinclined to offer it as part of
  4524.                         this package of utilities.  Typically, BASIC music programs (with some
  4525.                         notable exceptions) are very straightforward and are amenable to such
  4526.                         a simpleminded tool.  If you are interested in the program (it's named
  4527.                         PLAYREP), please contact me directly.
  4528.                     
  4529.                           At the end of the output file, the PLAYCVT program automatically
  4530.                         sends commands to the speaker device driver to reset its parameters to
  4531.                         their normal values (gap size, duration, and tempo) and also sends a
  4532.                         suitable inter-selection pause of several seconds' duration.
  4533.                     
  4534.                           Version 1.1 of PLAYCVT has fixed a problem that caused the notes
  4535.                         played to be one octave high, improved the timings (it was playing
  4536.                         too fast), and added the IN= option (see below).
  4537.                     
  4538.                           To use the PLAYCVT program, the command line format is:
  4539.                     
  4540.                         snorun playcvt <iooptions>[;<options>]
  4541.                     
  4542.                         <iooptions>::
  4543.                            <<inputfile>      or
  4544.                            /5=<inputfile>    or
  4545.                            /5:<inputfile>
  4546.                               This item allows specification of a file (or device) from which
  4547.                               the input file is to be read.
  4548.                     
  4549.                            ><outputfile>     or
  4550.                            >><outputfile>    or
  4551.                            /6=<outputfile>   or
  4552.                            /6:<outputfile>
  4553.                               This item allows specification of a file (or device) to which
  4554.                               the output file is to be written.  This can be either a printer
  4555.                               or a disk file, or in general any MS-DOS sequential output device.
  4556.  
  4557.                                                                                           page 113
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.                               Note that the ">>" form appends the output to the end of the
  4567.                               existing contents of the specified file, if any.  By convention,
  4568.                               the extension ".SPK" is used for files formatted for the speaker
  4569.                               device driver.  You can also use "SPKR" (or "SPKR:") as the
  4570.                               output file name, in which case the output is sent directly to
  4571.                               the loudspeaker and is not saved to disk.
  4572.                     
  4573.                         <options>::
  4574.                            IN=<filename>
  4575.                               This option specifies the name of the input file (which must have
  4576.                               an extension of .TUN) and the PLAYCVT program will put the output
  4577.                               in a file of the same name and path but with extension .SPK (this
  4578.                               option makes it easier to use PLAYCVT automatically from a batch
  4579.                               file).  The option may appear in upper or lower case.
  4580.                     
  4581.  
  4582.                                                                                           page 114
  4583.  
  4584.  
  4585.                     
  4586.                     39.  PMUSCVT  --  PIANOMAN .MUS TO DRVSPKR FORMAT CONVERTER
  4587.                     
  4588.                           This utility program converts a Pianoman binary ".MUS" file
  4589.                         into a format suitable for the loudspeaker device driver DRVSPKR.SYS.
  4590.                         The loudspeaker device driver is another shareware software product
  4591.                         from this author.
  4592.                     
  4593.                           One of the most spectacular features of the shareware Pianoman
  4594.                         program is its ability to rapidly switch between several different
  4595.                         frequencies, in effect "time-slicing" the PC's limited sound-generation
  4596.                         capability, in order to produce a good simulation of multiple voices.
  4597.                         Unfortunately, the low rate of MS-DOS timer interrupts prevents the
  4598.                         Speaker Device Driver from playing more than about eighteen notes per
  4599.                         second.  In order to not miss any notes, this means that some multi-
  4600.                         voiced Pianoman music files will play more slowly than usual.  PMUSCVT
  4601.                         will generally, however, play single-voiced music files very successfully
  4602.                         and sometimes do surprisingly well on multi-voiced music files.
  4603.                     
  4604.                           The output from PMUSCVT (normally with extension .SPK, although this
  4605.                         is simply a convention and does not represent a default) can be routed
  4606.                         directly to the speaker (SPKR:) or can be saved in a disk file and copied
  4607.                         to the speaker later, using COPY or any other program.
  4608.                     
  4609.                           At the end of the output file, the PMUSCVT program automatically
  4610.                         sends commands to the speaker device driver to reset its parameters to
  4611.                         their normal values (gap size, duration, and tempo) and also sends a
  4612.                         suitable inter-selection pause of several seconds' duration.
  4613.                     
  4614.                           To use the PMUSCVT program, the command line format is:
  4615.                     
  4616.                         snorun pmuscvt <iooptions>[;<options>]
  4617.                     
  4618.                         <iooptions>::
  4619.                            /2=<inputfile>    or
  4620.                            /2:<inputfile>
  4621.                               This item allows specification of a file (or device) from which
  4622.                               the input file is to be read.  NOTE:  This program reads from
  4623.                               unit 2 rather than from the standard unit 5.  (This is because the
  4624.                               program reads the .MUS file as a binary file.)
  4625.                     
  4626.  
  4627.                                                                                           page 115
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.                            ><outputfile>     or
  4636.                            >><outputfile>    or
  4637.                            /6=<outputfile>   or
  4638.                            /6:<outputfile>
  4639.                               This item allows specification of a file (or device) to which
  4640.                               the output file is to be written.  This can be either a printer
  4641.                               or a disk file, or in general any MS-DOS sequential output device.
  4642.                               Note that the ">>" form appends the output to the end of the
  4643.                               existing contents of the specified file, if any.  By convention,
  4644.                               the extension ".SPK" is used for files formatted for the speaker
  4645.                               device driver.  You can also use "SPKR" (or "SPKR:") as the
  4646.                               output file name, in which case the output is sent directly to
  4647.                               the loudspeaker and is not saved to disk.
  4648.                     
  4649.                         <options>::
  4650.                            IN=<filename>
  4651.                               This option specifies the name of the input file (which must have
  4652.                               an extension of .MUS) and the PLAYCVT program will put the output
  4653.                               in a file of the same name and path but with extension .SPK (this
  4654.                               option makes it easier to use PLAYCVT automatically from a batch
  4655.                               file).  The option may appear in upper or lower case.
  4656.                     
  4657.  
  4658.                                                                                           page 116
  4659.  
  4660.  
  4661.  
  4662.                     
  4663.                     40.  PUBLBL  --  PUBLIC LABEL INCLUSION GENERATOR
  4664.                     
  4665.                           When one is debugging assembly language programs with a symbolic
  4666.                         debugger (such as Microsoft's SYMDEB), the debugger generally will let
  4667.                         one reference program locations by name if the name corresponds with a
  4668.                         label which has been declared "public".
  4669.                     
  4670.                           Typically, however, programs contain many more labels than those which
  4671.                         need to be known outside of the containing module, and good programming
  4672.                         practice keeps these known only within their local module.  Unfortunately,
  4673.                         this means that such symbols cannot be referenced symbolically while
  4674.                         debugging.
  4675.                     
  4676.                           The PUBLBL program aids symbolic debugging of assembly language programs
  4677.                         by rapidly and automatically generating an inclusion file which contains
  4678.                         "public" statements which make all source file labels and procedure names
  4679.                         known to the "outside world", including the symbolic debugger.  This
  4680.                         inclusion file can then be included into a subsequent assembly of the
  4681.                         assembly language program.
  4682.                     
  4683.                           NOTE:  Labels and procedure names which are not normally intended to be
  4684.                         declared as "public" may not be unique when thrust into the world of other
  4685.                         public names.  The PUBLBL program does not make any attempt to leave
  4686.                         private those names which can or do conflict with the same name which
  4687.                         may be declared in other modules.  In this case, the name in the assembly
  4688.                         language program to be debugged should be changed and PUBLBL rerun, or
  4689.                         the output file from PUBLBL can be edited to manually remove the
  4690.                         conflicting public label declaration.
  4691.                     
  4692.                           Note that this program operates as a "filter", much the same way as
  4693.                         the DOS "MORE" command.  It reads from standard input and writes to
  4694.                         standard output.  Therefore, its input and/or output can be "piped" the
  4695.                         same way as any other DOS filter.  See the DOS User's Guide for more
  4696.                         details on filters and "piping" of standard input and standard output.
  4697.                         NOTE:  This paragraph only applies to the ".SAV" file form of PUBLBL.
  4698.                     
  4699.  
  4700.                                                                                           page 117
  4701.  
  4702.  
  4703.  
  4704.                           Note that there are two different versions of this utility, one of
  4705.                         which (the .SAV file form) uses SNORUN, and the other (the .EXE file
  4706.                         form, compiled with SPITBOL) which does not require SNORUN.  Use only
  4707.                         the example command lines and options descriptions below which correspond
  4708.                         to the version of PUBLBL which you have.
  4709.                     
  4710.                           The following section describes the use of the PUBLBL.SAV version of
  4711.                         the PUBLBL utility.
  4712.                     
  4713.                           The PUBLBL.SAV program is invoked with a command line of the form:
  4714.                     
  4715.                         snorun publbl [<iooptions>][;<options>]         (PUBLBL.SAV version only)
  4716.                     
  4717.                         <iooptions>::               (PUBLBL.SAV version only)
  4718.                            <<inputfile>      or
  4719.                            /5=<inputfile>    or
  4720.                            /5:<inputfile>
  4721.                               This item allows specification of a file (or device) from which
  4722.                               the input file is to be read.  If this item is not specified at
  4723.                               all, the program reads from "default standard input", which may
  4724.                               be a piped input file, or the console.  This file normally contains
  4725.                               an assembly language source program.
  4726.                     
  4727.                            ><outputfile>     or
  4728.                            >><outputfile>    or
  4729.                            /6=<outputfile>   or
  4730.                            /6:<outputfile>
  4731.                               This item allows specification of a file (or device) to which
  4732.                               the output file is to be written.  This can be either a printer
  4733.                               or a disk file, or in general any MS-DOS sequential output device.
  4734.                               Note that the ">>" form appends the output to the end of the
  4735.                               existing contents of the specified file, if any.  If this item
  4736.                               is not specified at all, the program writes to the "default
  4737.                               standard output", which may likewise be piped into another program
  4738.                               or by default will appear upon the console.  This file will contain
  4739.                               a series of "public" declarations for suitable labels and procedure
  4740.                               names which were found in the source file.
  4741.                     
  4742.  
  4743.                                                                                           page 118
  4744.  
  4745.  
  4746.  
  4747.                           Example command lines would look like:
  4748.                     
  4749.                             snorun publbl /5:myprog.asm /6:myprog.pub
  4750.                             snorun publbl /5=c:\asm\src\test.asm /6=a:\testinc.pub
  4751.                     
  4752.                           The following section describes the PUBLBL.EXE version of the PUBLBL
  4753.                         utility.
  4754.                     
  4755.                           Effective with version 1.5, PUBLBL now recognizes two special lines
  4756.                         contained within the assembler source program file:
  4757.                     
  4758.                           ;publbl -1                      and
  4759.                           ;publbl +1
  4760.                     
  4761.                           The first of these turns "off" the PUBLBL processing of labels for
  4762.                         subsequent lines, and the second turn PUBLBL processing back "on".
  4763.                         These may be nested:  initially the "publbl" tag has a value of one
  4764.                         (any value greater than zero turns on label scanning).  Note that this
  4765.                         means you can negate a subsequent "-1" by preceding it in the text file
  4766.                         with a "+1" line.  Likewise, you can turn it "on" (+1) twice, then
  4767.                         turn it off (-1) once, and it will stay on until you turn it off (-1)
  4768.                         again.  These special lines must appear -exactly- as indicated, (the
  4769.                         semicolon must be in column one), and are most useful for preventing
  4770.                         PUBLBL from trying to make public any local labels that may appear in
  4771.                         macro definitions.
  4772.                     
  4773.                           The PUBLBL.EXE program is invoked with a command line of the form:
  4774.                     
  4775.                         publbl <inputfile>[,<outputfile>][;<options>]   (PUBLBL.EXE version)
  4776.                     
  4777.                         <inputfile>                 (PUBLBL.EXE version only)
  4778.                               This is the specification of the input file which contains the
  4779.                               assembler language source code to be processed.  If no extension
  4780.                               is given, the default is ".ASM".
  4781.                     
  4782.                         <outputfile>                (PUBLBL.EXE version only)
  4783.                               This is the specification of the output file which is to receive
  4784.  
  4785.                                                                                           page 119
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.                               the assembler language inclusion file, containing the "public"
  4794.                               definitions that the PUBLBL utility has generated.  If no output
  4795.                               file spec is given at all, the same name and path as for the
  4796.                               input file is assumed.  If no extension is specified, the default
  4797.                               extension of ".PUB" is supplied automatically.
  4798.                     
  4799.                         <options>::                 (PUBLBL.EXE version only)
  4800.                            /q
  4801.                               This option tells PUBLBL that it should append its output to the
  4802.                               existing contents of the indicated output file, rather than
  4803.                               overwriting the output file from the beginning (which is the normal
  4804.                               case).
  4805.                     
  4806.                           Example command lines would look like:    (PUBLBL.EXE version only)
  4807.                     
  4808.                             publbl myprog.asm,myprog.pub        ) these two are exactly equivalent
  4809.                             publbl myprog                       )
  4810.                             publbl c:\asm\src\myprog.asm,c:\asm\inc\myprog
  4811.                             publbl myprog,appendit.txt ;/q
  4812.                     
  4813.  
  4814.                                                                                           page 120
  4815.  
  4816.  
  4817.  
  4818.                     
  4819.                     41.  REPAGIN8  --  INTELLIGENT DOCUMENT PAGINATION AND TOC
  4820.                     
  4821.                           This utility program repaginates documentation files and processes them
  4822.                         to create more satisfactory printed copies.  Those who get a lot of
  4823.                         public domain software, for example, often get documentation files which
  4824.                         are simple, 80-column wide text files.  Sometimes these files have been
  4825.                         paginated in their past, but subsequent revisions may have resulted in
  4826.                         all pagination having been lost.  Often, the original, numbered chapter
  4827.                         and section headings remain, and even an outdated index and/or table of
  4828.                         contents.
  4829.                     
  4830.                           When such files are printed, there is also often not enough space to
  4831.                         the left of column one to permit binding or punching of the printout
  4832.                         without punching through the leftmost columns of text, or burying the
  4833.                         leftmost columns into the deep crevasses of the binding.  This problem
  4834.                         is made especially acute when the files are printed in condensed print
  4835.                         mode.
  4836.                     
  4837.                           The REPAGIN8 utility repaginates such text files, restoring them to
  4838.                         a goodlooking format, suitable for punching or binding.  It eliminates
  4839.                         existing page eject control characters, adds page headings with optional
  4840.                         page numbers, and shifts the text some specified number of columns to the
  4841.                         right to leave space for binding.  Rather than just printing so-many
  4842.                         lines per page (although a nominal value can be specified), the program
  4843.                         attempts to "intelligently" paginate the file.  It looks for chapter
  4844.                         and section headings, and paginates appropriately:  chapters always
  4845.                         start on a new page, and section headings are bumped to the following
  4846.                         page if they are close to the end of the previous one.  REPAGIN8 also
  4847.                         takes into account widow/orphan control, attempting to keep paragraphs
  4848.                         together when it seems practical and reasonable to do so.  It also
  4849.                         partially centers "short" pages vertically, so that a page with just a
  4850.                         few lines on it will not hug the top of the page quite so tightly.
  4851.                     
  4852.                           The shift-right logic should work correctly, even if the line contains
  4853.                         overprinted characters.  Implementing this feature is less trivial than
  4854.                         it would seem.
  4855.                     
  4856.  
  4857.                                                                                           page 121
  4858.  
  4859.  
  4860.  
  4861.                           A related program, called TITLGEN, has been written which is useful
  4862.                         to automatically create title pages for documents.  This program is
  4863.                         especially useful in conjunction with REPAGIN8.  See the TITLGEN chapter
  4864.                         for further details.
  4865.                     
  4866.                           REPAGIN8, if it finds numbered chapter and section headings, will
  4867.                         automatically generate a new table of contents, which it will print at
  4868.                         the end of the document.  Paginated like the rest of the document, the
  4869.                         table of contents pages are numbered (if page numbering is in effect)
  4870.                         using the standard, lower-case roman numerals, beginning with "i".
  4871.                         Typically, this new table of contents will be removed after printing
  4872.                         and moved to the front of the document.
  4873.                     
  4874.                           An option also exists, if preferred, (starting with version 1.4) which
  4875.                         will cause the table of contents to be written to a different file.
  4876.                         This file has the same name and extension as the original output file,
  4877.                         but the extension is changed to ".TOC".  This permits a batch or MAKE
  4878.                         file to automatically append the table of contents file and the paginated
  4879.                         output file, eliminating the need to move the table of contents to the
  4880.                         beginning of the file.
  4881.                     
  4882.                           Another option, beginning with version 1.6, allows you to specify the
  4883.                         nominal page width.  This has no effect on most lines in the file
  4884.                         (REPAGIN8 does not attempt to word-wrap or otherwise modify how the data
  4885.                         is broken up into lines), but does affect the way that the page headings
  4886.                         and table of contents pages are generated (i.e. it affects those lines
  4887.                         that REPAGIN8 itself has added to the file).
  4888.                     
  4889.                           If you like, REPAGIN8 also offers an option to renumber the chapter
  4890.                         and section headings.  This is especially useful if you have combined
  4891.                         several documentation files, or rearranged their sections.  In this
  4892.                         case, chapter and section heading numbers will be used only to indicate
  4893.                         the appropriate level.  If renumbering is in effect, all chapter headings
  4894.                         will be forced to upper case.  (NOTE:  In the conversion to upper case
  4895.                         characters, foreign users can specify the suitable upper and lower case
  4896.                         character sets.  See the chapter titled "Setting Upper and Lower Case
  4897.                         Character Sets" elsewhere in this document for further details).
  4898.                     
  4899.  
  4900.                                                                                           page 122
  4901.  
  4902.  
  4903.  
  4904.                           Note that, if you want chapter headings to begin on a new page,
  4905.                         REPAGIN8 requires that they be preceded by at least two blank lines, and
  4906.                         followed by one.  This helps to prevent its triggering a new page when
  4907.                         it hasn't got a real chapter heading.
  4908.                     
  4909.                           The user's guide you are presently reading has been processed through
  4910.                         the REPAGIN8 utility program.  Looking at its format carefully will give
  4911.                         you a good idea of what REPAGIN8 does.  Note that page breaks generally
  4912.                         take place in reasonable places.  The heuristics are complicated, but
  4913.                         fortunately, like many good programs, you don't have to understand how
  4914.                         most of them work to use and appreciate them.
  4915.                     
  4916.                           You might be interested to learn that REPAGIN8 was originally written
  4917.                         to fix up the received (and sorta garbled) documentation for the public
  4918.                         domain program "MSKERMIT", although REPAGIN8 has been used since then
  4919.                         on a large amount of public domain and shareware software documentation.
  4920.                     
  4921.                           REPAGIN8 assumes that each input record is less than 300 bytes long
  4922.                         (these are, after all, normally expected to be print lines!).  Trailing
  4923.                         spaces, if any, are removed (as is true for most of these SNOBOL4+
  4924.                         utilities).
  4925.                     
  4926.                           In the REPAGIN8 command line, note that any items may be specified
  4927.                         in either upper or lower case.  The separator between option values and
  4928.                         the corresponding numbers (if any) may be either ":", "=", or omitted
  4929.                         altogether if you prefer.  Options may be separated by spaces or commas
  4930.                         or whatever, if you prefer, but do not require separators.  (However,
  4931.                         don't forget the ";"!)  The command line to REPAGIN8 looks like:
  4932.                     
  4933.                         snorun repagin8 [<iooptions>][;<options>]
  4934.                     
  4935.                         <iooptions>::
  4936.                            <<inputfile>      or
  4937.                            /5=<inputfile>    or
  4938.                            /5:<inputfile>
  4939.                               This item allows specification of a file (or device) from which
  4940.                               the input file is to be read.
  4941.                     
  4942.  
  4943.                                                                                           page 123
  4944.  
  4945.  
  4946.  
  4947.                            ><outputfile>     or
  4948.                            >><outputfile>    or
  4949.                            /6=<outputfile>   or
  4950.                            /6:<outputfile>
  4951.                               This item allows specification of a file (or device) to which
  4952.                               the output file is to be written.  This can be either a printer
  4953.                               or a disk file, or in general any MS-DOS sequential output device.
  4954.                               Note that the ">>" form appends the output to the end of the
  4955.                               existing contents of the specified file, if any.
  4956.                     
  4957.                         <options>::
  4958.                            /h:<nn>           or
  4959.                            /h=<nn>           or
  4960.                            /h<nn>
  4961.                               This option allows specifying the number of lines of header to
  4962.                               be placed at the top of each page (minimum is one) before the
  4963.                               first line of text is printed.  (Note that the header will often
  4964.                               be larger than specified based on a variety of factors designed
  4965.                               to put the text on the page in a more pleasing way.)  The default
  4966.                               for this value, if not explicitly specified, is currently three.
  4967.                     
  4968.                            /l:<nn>           or
  4969.                            /l=<nn>           or
  4970.                            /l<nn>
  4971.                               This option allows specification of the nominal number of lines
  4972.                               to print on the body of the page (note that this is NOT the same
  4973.                               as the number of print lines per page, normally 66).  This is the
  4974.                               approximate number of lines to print per page, following the header
  4975.                               and before however many blank lines may appear at the bottom of
  4976.                               each page.  An example value might be "/L50".  The default for this
  4977.                               value, if not explicitly specified, is currently 55.
  4978.                     
  4979.                            /n
  4980.                               This option specifies that REPAGIN8 is to add page numbers at the
  4981.                               top of each page.  The new table of contents, if generated, will
  4982.                               be numbered using lower case roman numerals.  The page numbers
  4983.                               are approximately vertically centered within the specified header.
  4984.                     
  4985.  
  4986.                                                                                           page 124
  4987.  
  4988.  
  4989.                            /o:<nn>           or
  4990.                            /o=<nn>           or
  4991.                            /o<nn>            or
  4992.                            /o
  4993.                               This option specifies that the file is to be printed further over
  4994.                               on the printed page than it would otherwise.  If the option does
  4995.                               not appear at all, then the file is not shifted over at all.  If
  4996.                               the option is given without a value, then the default value
  4997.                               (twenty columns) is used.  If a numeric value is specified, then
  4998.                               the input file is shifted to the right by that number of columns.
  4999.                     
  5000.                            /r
  5001.                               This option specifies that chapter and section headings are to be
  5002.                               renumbered.  The existing numbers are used to indicate the level
  5003.                               only.  Chapter headings are forced to upper case if this option is
  5004.                               in effect.
  5005.                     
  5006.                            /t
  5007.                               This option specifies that the table of contents, if any, is to be
  5008.                               written to a different output file than the main output file.  The
  5009.                               table of contents file is given the same name as the main output
  5010.                               file, but with the extension "TOC".  If this option is not
  5011.                               specified and a table of contents is produced, it is written at
  5012.                               the end of the main output file.  Having the table of contents
  5013.                               written to a different file makes it possible to simply use COPY
  5014.                               to append those two files, producing a third:
  5015.                     
  5016.                                     copy  outfile.toc+outfile.doc  outfile.prt
  5017.                     
  5018.                           As an example, the exact command lines which were used to format this
  5019.                         User's Guide are as follows (the first three lines are used to append
  5020.                         the list of most current versions of each utility):
  5021.                     
  5022.                         snobol4 bldverl /5:utilsdoc.txt /6:f:utilsdoc.tx2
  5023.                         copy utilsdoc.txt+f:utilsdoc.tx2 utilsdoc.doc
  5024.                         del f:utilsdoc.tx2
  5025.                         snorun repagin8 /5:utilsdoc.doc /6:utilsdoc.do2;/l42 /n /o20 /r /t
  5026.                         copy utilsdoc.toc+utilsdoc.do2 utilsdoc.prt
  5027.                         del utilsdoc.toc
  5028.                         del utilsdoc.do2
  5029.                     
  5030.  
  5031.                                                                                           page 125
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.                            /w:<nn>           or
  5042.                            /w=<nn>           or
  5043.                            /w<nn>
  5044.                               This option allows specifying the nominal page width, or the
  5045.                               maximum number of columns that are normally expected to appear
  5046.                               on a given line.  This value only affects page headings and table
  5047.                               of contents lines actually generated by REPAGIN8, and DOES NOT
  5048.                               OTHERWISE AFFECT LINES FROM THE USER'S FILE.  REPAGIN8 DOES NOT
  5049.                               REARRANGE PARAGRAPHS OR OTHER ORIGINAL TEXT.  The default for this
  5050.                               value, if not explicitly specified, is currently 78.
  5051.                     
  5052.  
  5053.                                                                                           page 126
  5054.  
  5055.  
  5056.                     
  5057.                     42.  SAPPREF  --  APPEND ASSEMBLER CROSS-REFERENCE TO LISTING
  5058.                     
  5059.                           If you use Microsoft's Macro Assembler very much, one real annoyance
  5060.                         (of the many, ahem!) is the fact that its cross references, prepared with
  5061.                         the companion program CREF, are written into a separate print file.  This
  5062.                         is less serious if you are printing direct to a printer, but is a royal
  5063.                         pain if you are running on a network or use some other kind of spooling
  5064.                         to a shared printer... it often means that your program listing and
  5065.                         cross-reference arrive in two separate parts, with burst pages, blank
  5066.                         sheets, and/or someone else's listings in between.
  5067.                     
  5068.                           It is also a pain that Microsoft apparently provides no mechanism to
  5069.                         suppress the CREF cross-referencing of local labels used within macros.
  5070.                         Having these in the cross-reference makes it bigger than it needs to be
  5071.                         (by a LOT if you are using a lot of macros!) and is dumb anyway since
  5072.                         (unless your macros are really humongous):
  5073.                     
  5074.                           1) you can immediately see all the references to the label (if your
  5075.                         macros are expanded in your listing... they are, after all, local) or
  5076.                     
  5077.                           2) you can't see the references to the label anyhow (if your macros
  5078.                         aren't expanded in your listing): in this case, the cross-reference will
  5079.                         show all the references as being on the same one line.
  5080.                     
  5081.                           The SAPPREF program takes the output file from Microsoft's CREF
  5082.                         program and removes references to macro local symbols (those which begin
  5083.                         with "??") and others to be suppressed (those which begin with a single
  5084.                         "$"... I use these for general equates and the like, such as extended
  5085.                         instruction mnemonics).  It then repaginates the resulting print file
  5086.                         (using Microsoft's existing page headings), renumbers the pages and tacks
  5087.                         the final product onto the end of the source listing print file.  The
  5088.                         result is a single print file, with local symbols suppressed, just like
  5089.                         a decent assembler would have provided to begin with.
  5090.                     
  5091.                           Except for the often-considerable reduction in the size of your cross-
  5092.                         reference, the only other indication from the listing that SAPPREF has
  5093.                         been used is the recomputed symbol count at the end of the cross-reference
  5094.                         and a new line following it that shows the number of local symbols
  5095.                         that have been suppressed.
  5096.                     
  5097.  
  5098.                                                                                           page 127
  5099.  
  5100.  
  5101.  
  5102.                           SAPPREF is fully suitable for use in MAKE files.  (MAKE is a useful
  5103.                         utility which helps to automate the sometimes-complex system generation
  5104.                         process for programs or large systems).
  5105.                     
  5106.                           SAPPREF is written in SPITBOL (see the discussion on the various
  5107.                         implementations of SNOBOL4 later in this document), so it is FAST.  It
  5108.                         typically takes a small fraction of the time CREF requires (to generate
  5109.                         the ".REF" file) to fully process it and append it to MASM's ".LST" file.
  5110.                     
  5111.                           The program is invoked by a command line of the form:
  5112.                     
  5113.                         sappref <infile> <outfile> [<options>]
  5114.                     
  5115.                           The first file spec defines the output file previously produced by
  5116.                         Microsoft's CREF.  If you do not specify an extension for this file,
  5117.                         the normal CREF output-file extension of ".REF" is assumed as a default.
  5118.                         If you want a blank extension, simply use a trailing "." at the end of
  5119.                         the file name, as per MS-DOS conventions.  Drive specifiers and path
  5120.                         names may be used as necessary.  This file represents the input file to
  5121.                         SAPPREF.
  5122.                     
  5123.                           The second file spec defines the output file from SAPPREF, and
  5124.                         normally is the listing file that has been output from Microsoft's MASM.
  5125.                         If you do not specify an output file, a file of the same name as the
  5126.                         input file will be assumed (see the /Q option below for further details
  5127.                         on defaults).
  5128.                     
  5129.                           Note that the options listed below may be entered in either upper or
  5130.                         lower case.
  5131.                     
  5132.                         <options>::
  5133.                            /q
  5134.                               This option causes the resulting output to be appended to the
  5135.                               output file.  IF THIS OPTION IS NOT SPECIFIED, THE OUTPUT OF
  5136.                               SAPPREF WILL OVERWRITE THE OUTPUT FILE STARTING AT THE BEGINNING.
  5137.                               If this option is specified, the output file extension will default
  5138.                               to ".LST".  If not, the output file extension defaults to ".RF2".
  5139.                     
  5140.  
  5141.                                                                                           page 128
  5142.  
  5143.  
  5144.                            /n<integer>
  5145.                               This option allows specifying how many lines are to be printed
  5146.                               on each page.  The default is 58 (the same as CREF uses).  If you
  5147.                               prefer, you can optionally put either an "=" or ":" after the "/n".
  5148.                     
  5149.                            /sfs
  5150.                               This option causes the program to display to the console the name
  5151.                               of the output file which will be written to.  This option is not
  5152.                               terribly useful, but is documented for the sake of completeness.
  5153.                               The display also indicates whether SAPPREF is using APPEND or
  5154.                               (over)WRITE mode.
  5155.                     
  5156.                            Invoking the SAPPREF program with no command line file specs or
  5157.                            options will cause it to display a help screen with the available
  5158.                            options.
  5159.                     
  5160.                            Examples:
  5161.                               To suppress the local symbols in "TEST.REF" and append the result
  5162.                               to the MASM source listing file "TEST.LST", the suggested command
  5163.                               line would be:
  5164.                     
  5165.                               sappref test /q
  5166.                     
  5167.                               The above command line is exactly equivalent to a command line
  5168.                               (not taking advantages of the defaults) looking like:
  5169.                     
  5170.                               sappref test.ref test.lst /q
  5171.                     
  5172.                               If you just wanted to remove the local symbols from "TEST.REF" and
  5173.                               produce a new file named "TEST.RF2", without modifying MASM's ".LST"
  5174.                               file, one possible command line might be simply:
  5175.                     
  5176.                               sappref test
  5177.                     
  5178.                               The above command line is exactly equivalent to a command line (not
  5179.                               taking advantages of the defaults) looking like:
  5180.                     
  5181.                               sappref test.ref test.rf2
  5182.                     
  5183.  
  5184.                                                                                           page 129
  5185.  
  5186.  
  5187.                     
  5188.                     43.  SPACE  --  DISK SPACE MANAGEMENT AND RECOVERY UTILITY
  5189.                     
  5190.                           If you have a hard disk on your PC-compatible, you need the SPACE
  5191.                         program.  This program helps you to manage your hard disk space better,
  5192.                         and find space consumed by files you either don't need any more, or
  5193.                         can move offline to floppies.
  5194.                     
  5195.                           This utility program is an enhanced version of DIRTREE (shown above).
  5196.                         Like DIRTREE, it allows listing subdirectory information on either
  5197.                         an entire volume or within any specified subdirectory of a volume.
  5198.                         Also like DIRTREE (and unlike PCTOOLS or Norton Utilities), the SPACE
  5199.                         utility works fine on remote volumes under most local area networking
  5200.                         systems.
  5201.                     
  5202.                           However, SPACE also optionally displays the number of files and sectors
  5203.                         contained within each subdirectory, broken down by file extension within
  5204.                         that subdirectory, and for the entire volume (or highest level path
  5205.                         as specified on the command line).  These space utilization reports may
  5206.                         be ordered either alphabetically by extension, or by descending order
  5207.                         of space used by files of each extension.  The report can also optionally
  5208.                         compute the percentage represented by files of each extension.
  5209.                     
  5210.                           The SPACE program can also find likely duplicate files which have been
  5211.                         copied to various hiding places on your hard disk and then forgotten
  5212.                         about, even if the name or extension has been changed, or if the files
  5213.                         which are duplicates of each other are in different subdirectories.  It
  5214.                         does this, without having to read the actual file data, by finding files
  5215.                         anywhere within the paths searched which have exactly the same file size,
  5216.                         creation date, and creation time.  NOTE:  This does not guarantee that
  5217.                         the files are indeed the same, or that any such duplicates found may be
  5218.                         freely deleted.  The responsibility for such determination rests, of
  5219.                         course, on each individual user.  However, most users will find that this
  5220.                         option will help them to recover a surprising amount of space on their
  5221.                         hard disk.
  5222.                     
  5223.                           So, if you've a hard disk, and it always seems to be too close to full
  5224.                         for comfort, you'd probably be surprised how many sectors you can free up
  5225.                         using the information supplied by SPACE.  You'll wonder how you got along
  5226.                         without it.
  5227.                     
  5228.  
  5229.                                                                                           page 130
  5230.  
  5231.  
  5232.                           NOTE:  SPACE (as of this writing) is NOT being distributed as
  5233.                         shareware.  It is a separate product, which must be registered
  5234.                         individually with the author.  SPACE is priced at $30 US, and is
  5235.                         well worth that price.  A special reduction applies to users who
  5236.                         are registered users of these SNOBOL4+ utilities or who register
  5237.                         the rest of this package concurrently.  Prices are subject to change
  5238.                         without notice.  Write the author for current prices and ordering
  5239.                         information.
  5240.                     
  5241.                           The TREE option (described below) assumes that your output device
  5242.                         (normally the display or printer) supports the IBM extended ASCII
  5243.                         character set (specifically, the line-drawing graphics characters).
  5244.                     
  5245.                           (Note that, throughout the options descriptions that follow, ":" and
  5246.                         "=" are both equally acceptable between an option keyword and its
  5247.                         specified value.)  Also, all options may be entered in either upper or
  5248.                         lower case.
  5249.                     
  5250.                         snorun space [<iooptions>][;<options>]
  5251.                     
  5252.                         <iooptions>::
  5253.                            ><outputfile>     or
  5254.                            >><outputfile>    or
  5255.                            /6=<outputfile>   or
  5256.                            /6:<outputfile>
  5257.                               This option allows specification of a file (or device) to which
  5258.                               the output file is to be written.  This can be either a printer
  5259.                               or a disk file, or in general any MS-DOS sequential output device.
  5260.                               Note that the ">>" form appends the output to the end of the
  5261.                               existing contents of the specified file, if any.
  5262.                     
  5263.                         <options>::
  5264.                            path=<pathname>   or
  5265.                            /p=<pathname>
  5266.                               This option allows specification of the path name to be used for
  5267.                               the subdirectory lookup.  Example pathnames are:
  5268.                                     c:  a:ms*  d:ms?as*      etc.
  5269.                               The default path name is "\".  As in the output file options,
  5270.                               you may use either a "=" or a ":" in the option specification,
  5271.                               whichever you prefer.
  5272.                     
  5273.  
  5274.                                                                                           page 131
  5275.  
  5276.  
  5277.                            alloc            or
  5278.                            /a
  5279.                               This option causes the output of space utilization reports which
  5280.                               are sorted in descending order by amount of space used for files
  5281.                               of each given extension.
  5282.                     
  5283.                            /dpo
  5284.                               This option causes no subdirectory scanning, but merely displays
  5285.                               the effective path name that would be used for the lookup.  This
  5286.                               is NOT a particularly useful option.
  5287.                     
  5288.                            dup              or
  5289.                            /d
  5290.                               This option causes an analysis and report of possible duplicate
  5291.                               files.  A report is generated of all files of the exact same
  5292.                               length and generation time for the specified path(s).  Although
  5293.                               the data in the files is not actually checked, use of this option
  5294.                               will generally turn up several files which are needlessly wasting
  5295.                               space on your hard disk by existing in several places at the same
  5296.                               time.  Note that it is not necessary that the file name or
  5297.                               extensions be the same for them to turn up on this report.
  5298.                     
  5299.                            ext              or
  5300.                            /x
  5301.                               This option causes the output of space utilization reports which
  5302.                               are sorted in alphabetic order of file extension.  This option
  5303.                               takes precedence over the "alloc" and "/a" options, should both
  5304.                               be specified.
  5305.                     
  5306.                            list             or
  5307.                            /l
  5308.                               This option causes all subdirectories to be written to the output
  5309.                               file.  They are output as FULL PATH NAMES, in sorted, interleaved
  5310.                               sequence.
  5311.                     
  5312.                            indent           or
  5313.                            /i
  5314.                               This option causes all subdirectories to be written to the output
  5315.                               file.  They are output as FULL PATH NAMES, in sorted, interleaved
  5316.                               sequence, just as for the "list" form, except that nested
  5317.                               subdirectories are indented.
  5318.                     
  5319.  
  5320.                                                                                           page 132
  5321.  
  5322.  
  5323.  
  5324.                            stair            or
  5325.                            step             or
  5326.                            /s
  5327.                               This option causes all subdirectories to be written to the output
  5328.                               file.  They are output, one subdirectory to a line (with higher
  5329.                               levels of each path name suppressed), in sorted, interleaved
  5330.                               sequence.  The left end of each nested subdirectory is lined up
  5331.                               under the right hand end of the name of the containing (sub)-
  5332.                               directory above.
  5333.                     
  5334.                            tree             or
  5335.                            /t
  5336.                               This option causes all subdirectories to be written to the output
  5337.                               file in the style used by PCTOOLS, except in a continuous format
  5338.                               (PCTOOLS displays them one screenful at a time, making it incon-
  5339.                               venient to print them).
  5340.                     
  5341.                            util             or
  5342.                            /u
  5343.                               This option causes the output of space utilization reports.  These
  5344.                               reports break down the number of files and number of bytes
  5345.                               allocated per file extension, per subdirectory.  If more than one
  5346.                               space utilization report is produced, a summary report is also
  5347.                               provided at the end which consolidates all of the previously
  5348.                               produced space utilization reports.  Note that the number of bytes
  5349.                               allocated as shown in these reports does not include the additional
  5350.                               unused bytes normally found at the end of each file.  The default
  5351.                               ordering of these reports is in alphabetic order by file extension.
  5352.                     
  5353.                            width=<integer>  or
  5354.                            /w=<integer>
  5355.                               This option sets the width of the output lines to the indicated
  5356.                               maximum width.  The default maximum width is 80.  If the usage
  5357.                               option is in effect, setting the maximum width to 132 (or some
  5358.                               value bigger than 80) may result in more columns being able to
  5359.                               fit per output line.
  5360.                     
  5361.  
  5362.                                                                                           page 133
  5363.  
  5364.  
  5365.  
  5366.                            nohdr            or
  5367.                            /nh
  5368.                               This option suppresses the heading from being written to the output
  5369.                               file.  The heading contains the path name used, the date and time,
  5370.                               and the volume name (unless suppressed).
  5371.                     
  5372.                            novol            or
  5373.                            /nv
  5374.                               This option suppresses the volume name from being accessed.  If
  5375.                               not suppressed, the volume name is read and placed in the heading
  5376.                               (which could also be suppressed).
  5377.                     
  5378.                            per              or
  5379.                            /p
  5380.                               This option adds an additional figure to each file extension's
  5381.                               entry within the space allocation reports.  This percentage figure
  5382.                               represents the percentage of the total space allocation, for that
  5383.                               report, which is represented by files with the indicated extension.
  5384.                               Specifying this option also implicitly specifies the /u option.
  5385.                     
  5386.                            /lej
  5387.                               This option causes a page eject to be sent to the output at the
  5388.                               beginning of the output.  The mnemonic means "leading page eject".
  5389.                     
  5390.                            /tej
  5391.                               This option causes a page eject to be sent to the output at the
  5392.                               end of the output.  The mnemonic means "trailing page eject".
  5393.                     
  5394.                         POSTSCRIPT:
  5395.                     
  5396.                           It should be pointed out that the SPACE utility keeps a lot of
  5397.                         information in memory.  Although this is organized quite efficiently,
  5398.                         as hard disk drives get larger and contain more files, it becomes
  5399.                         harder for SPACE to deal with the large numbers of files.  If you
  5400.                         receive some kind of an error message, perhaps an "overflow" message
  5401.                         of some kind (the exact message will differ depending upon what the
  5402.                         program was in the process of doing when it ran out of memory), there
  5403.  
  5404.                                                                                           page 134
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.                         are several things you might try.  First is to reduce the number of
  5415.                         options you are using all in the same run.  For example, if you are
  5416.                         requesting the duplicate file analysis (which uses a lot of memory),
  5417.                         it will help to not also request other options at the same time.
  5418.                         Of course, you should also try to maximize the available DOS memory
  5419.                         space.  You might try, for example, to run SPACE with fewer memory-
  5420.                         resident utilities (such as Sidekick, Superkey, or PC-Tools) loaded.
  5421.                         This will maximize the amount of memory that SPACE can use.  The
  5422.                         actual limits are widely variable depending upon how your disk is
  5423.                         organized, but on the author's hard disk, SPACE tends to exceed its
  5424.                         available memory (using the /d option) at around 2700 files.
  5425.                     
  5426.  
  5427.                                                                                           page 135
  5428.  
  5429.  
  5430.  
  5431.                     
  5432.                     44.  STRIPBS  --  STRIP BACKSPACE CHARACTERS FROM TEXT FILE
  5433.                     
  5434.                           This utility program eliminates backspace characters from records read
  5435.                         from standard input and copies the rest to standard output.  Some
  5436.                         communications software, such as BITCOM when talking online to CompuServe,
  5437.                         simply stores backspace characters into its capture files:  this program
  5438.                         gets rid of them.
  5439.                     
  5440.                           Backspace characters at the beginning of each record are simply
  5441.                         discarded.  Backspace characters which are preceded by some other
  5442.                         character are eliminated along with the previous character.
  5443.                     
  5444.                           STRIPBS also eliminates trailing spaces that may be at the end of
  5445.                         each input record.  Input records may be up to 4000 bytes long.
  5446.                     
  5447.                           Note that this program operates as a "filter", much the same way as
  5448.                         the DOS "MORE" command.  It reads from standard input and writes to
  5449.                         standard output.  Therefore, its input and/or output can be "piped" the
  5450.                         same way as any other DOS filter.  See the DOS User's Guide for more
  5451.                         details on filters and "piping" of standard input and standard output.
  5452.                     
  5453.                           The program is invoked with a command line of the form:
  5454.                     
  5455.                         snorun stripbs [<iooptions>]
  5456.                     
  5457.                         <iooptions>::
  5458.                            <<inputfile>      or
  5459.                            /5=<inputfile>    or
  5460.                            /5:<inputfile>
  5461.                               This item allows specification of a file (or device) from which
  5462.                               the input file is to be read.  If this item is not specified at
  5463.                               all, the program reads from "default standard input", which may
  5464.                               be a piped input file, or the console.
  5465.                     
  5466.                            ><outputfile>     or
  5467.                            >><outputfile>    or
  5468.  
  5469.                                                                                           page 136
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.                            /6=<outputfile>   or
  5479.                            /6:<outputfile>
  5480.                               This item allows specification of a file (or device) to which
  5481.                               the output file is to be written.  This can be either a printer
  5482.                               or a disk file, or in general any MS-DOS sequential output device.
  5483.                               Note that the ">>" form appends the output to the end of the
  5484.                               existing contents of the specified file, if any.  If this item
  5485.                               is not specified at all, the program writes to the "default
  5486.                               standard output", which may likewise be piped into another program
  5487.                               or by default will appear upon the console.
  5488.                     
  5489.                           A typical command line would look like:
  5490.                     
  5491.                             snorun stripbs <infile.txt >outfile.txt
  5492.                     
  5493.  
  5494.                                                                                           page 137
  5495.  
  5496.  
  5497.                     
  5498.                     45.  TITLGEN  --  GENERATE A TITLE PAGE
  5499.                     
  5500.                           This utility program reads a parameter file containing a title,
  5501.                         subtitle, version and release number, date of preparation, and
  5502.                         an author name.  TITLGEN then formats this information in a
  5503.                         standardized manner and creates a title page for the corresponding
  5504.                         document.  The user can specify the desired maximum width of the
  5505.                         printing on the page, the nominal page length, and how many bytes
  5506.                         the information on the page is to be shifted over (to the right)
  5507.                         in order to allow space for binding.
  5508.                     
  5509.                           Note that this program is intended for use as a companion program
  5510.                         to REPAGIN8, described in an earlier chapter.  The program is also
  5511.                         designed to be easily used within a MAKE file.
  5512.                     
  5513.                           To use TITLGEN, you must first prepare a file containing various
  5514.                         lines of information which will be placed on the title page.  This
  5515.                         is a simple text file which looks as follows (each record begins in
  5516.                         column 1):
  5517.                     
  5518.                             Document title
  5519.                             Document subtitle
  5520.                             Document version and release number
  5521.                             Document date
  5522.                             Author Name and address block (optional, up to five lines)
  5523.                     
  5524.                           The following would be an example of a suitable input file to
  5525.                         TITLGEN:
  5526.                     
  5527.                             Data Entry System
  5528.                             Program Operations Manual
  5529.                             Version 1.0
  5530.                             March 14, 1987
  5531.                             XYZ Software Company
  5532.                             123 Main Street
  5533.                             Anywhereville, XX  98765-4321
  5534.                             U. S. A.
  5535.                             (900) 555-1212
  5536.                     
  5537.  
  5538.                                                                                           page 138
  5539.  
  5540.  
  5541.                           Some items of interest about the above records in the input file:
  5542.                     
  5543.                           Each line will be centered horizontally within the specified-width
  5544.                         printing area on the title page, and the printing area is shifted
  5545.                         a specified number of spaces to the right to allow for binding.  The
  5546.                         lines are spaced proportionately down the page according to the nominal
  5547.                         number of lines that could be placed on the page.
  5548.                     
  5549.                           The document title will be forced to upper case automatically when
  5550.                         it is placed on the title page.  If the document title is much
  5551.                         narrower than the printed area on the page, it will automatically be
  5552.                         spread out (by placing a space between each character) to give it a
  5553.                         more pleasant appearance.  NOTE:  In the conversion to upper case
  5554.                         characters, foreign users can specify the suitable upper and lower case
  5555.                         character sets.  See the chapter titled "Setting Upper and Lower Case
  5556.                         Character Sets" elsewhere in this document for further details.
  5557.                     
  5558.                           The document subtitle is centered and placed below the document title.
  5559.                     
  5560.                           The release number (that portion of the number to the right of the
  5561.                         decimal point) is automatically incremented by TITLGEN each time a title
  5562.                         page is created from the given parameter file.  It does this by actually
  5563.                         updating the parameters file on disk.  Note that TITLGEN always creates
  5564.                         a three-digit release number, which is padded if necessary on the left
  5565.                         with zeros.  This update also leaves the parameters file tagged with
  5566.                         not only the last version and release of the given title page that has
  5567.                         been generated (in the file itself), but also the date and time when
  5568.                         that version and release was put together (via the time and date fields
  5569.                         kept in MS-DOS's directory entry for the parameters file).
  5570.                     
  5571.                           The date line normally looks as shown in the example above.  This
  5572.                         allows one to hard-specify a date for the title page.  If you prefer,
  5573.                         however, you can leave this line blank (i.e. don't just omit it, it
  5574.                         must still be there but can be empty) and TITLGEN will automatically
  5575.                         supply today's date for the title page.
  5576.                     
  5577.                           Following the date line, one can place up to five lines of author
  5578.                         name and address information, telephone numbers, or whatever else
  5579.                         might be desired.  This information is placed in a block towards the
  5580.                         bottom of the page, under the line with the date.  You do not have to
  5581.                         supply an author block unless you want to.
  5582.                     
  5583.  
  5584.                                                                                           page 139
  5585.  
  5586.  
  5587.  
  5588.                           In the TITLGEN command line, note that any items may be specified
  5589.                         in either upper or lower case.  The separator between option values and
  5590.                         the corresponding numbers (if any) may be either ":", "=", or omitted
  5591.                         altogether if you prefer.  Options may be separated by spaces or commas
  5592.                         or whatever, if you prefer, but do not require separators.  (However,
  5593.                         don't forget the ";"!).
  5594.                     
  5595.                           To use TITLGEN, the command line looks like:
  5596.                     
  5597.                         snorun titlgen  [<iooptions>][;<options>]
  5598.                     
  5599.                         <iooptions>::
  5600.                            /4=<parameterfile>  or
  5601.                            /4:<parameterfile>
  5602.                               This item allows specification of the disk file from which the
  5603.                               file containing the information for the title page is to be read.
  5604.                     
  5605.                            ><outputfile>     or
  5606.                            >><outputfile>    or
  5607.                            /6=<outputfile>   or
  5608.                            /6:<outputfile>
  5609.                               This item allows specification of a file (or device) to which
  5610.                               the title page is to be written.  This can be either a printer
  5611.                               or a disk file, or in general any MS-DOS sequential output device.
  5612.                               Note that the ">>" form appends the output to the end of the
  5613.                               existing contents of the specified file, if any.
  5614.                     
  5615.                         <options>::
  5616.                            /l:<nn>           or
  5617.                            /l=<nn>           or
  5618.                            /l<nn>
  5619.                               This option allows specification of the nominal number of lines
  5620.                               that are physically present on each page.  Note that this option
  5621.                               differs from the corresponding usage in REPAGIN8.  The default
  5622.                               for this value, if not explicitly specified, is currently 66.
  5623.                     
  5624.                            /o:<nn>           or
  5625.                            /o=<nn>           or
  5626.  
  5627.                                                                                           page 140
  5628.  
  5629.  
  5630.  
  5631.                            /o<nn>
  5632.                               This option specifies that the title page is to be printed further
  5633.                               over on the printed page than it would otherwise.  This is to allow
  5634.                               space for binding.  If the option is not specified, the default
  5635.                               shift is five columns.  The number given with the option specifies
  5636.                               how many columns towards the right the page is to be shifted over.
  5637.                               NOTE:  The page width (see below) does not assume any specific
  5638.                               "left margin", i.e. the "printed page width" is assumed to start
  5639.                               at column 1 of the printed page.  If you wish a "left margin" on
  5640.                               the title page (even though this IS largely meaningless on a
  5641.                               page where everything is centered), you should increase the value
  5642.                               specified for this parameter to allow for both the "left margin"
  5643.                               and the number of columns to shift to allow for binding.
  5644.                     
  5645.                            /w:<nn>          or
  5646.                            /w=<nn>          or
  5647.                            /w<nn>
  5648.                               This option specifies the nominal maximum width of the area to be
  5649.                               printed on each page, measured in terms of the number of "space"
  5650.                               characters wide the printable area is.  This value is used when
  5651.                               deciding how to center the title page lines on the page, and to
  5652.                               decide whether or not the document title should be "spread".  If
  5653.                               this option is not specified, it currently defaults to the value
  5654.                               of 55.
  5655.                     
  5656.                           /lej
  5657.                               This option causes a page eject to be sent to the output at the
  5658.                               beginning of the title page.  The mnemonic means "leading page
  5659.                               eject".
  5660.                     
  5661.                           /tej
  5662.                               This option causes a page eject to be sent at the end of the title
  5663.                               page.  This option is usually not needed if the title page is to
  5664.                               be appended to a table of contents and/or document processed by
  5665.                               REPAGIN8, but can be handy for laser printer users who wish to
  5666.                               print just the single title page by itself.  The mnemonic means
  5667.                               "trailing page eject".
  5668.                     
  5669.  
  5670.                                                                                           page 141
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.                           An example of the way in which the TITLGEN utility might be used in
  5681.                         conjunction with the REPAGIN8 utility, described elsewhere, is the
  5682.                         following series of command lines, which are similar to those that were
  5683.                         used to create the document you are reading:
  5684.                     
  5685.                         snorun repagin8 /5:utilsdoc.doc /6:utilsdoc.do2;/l42 /n /o20 /r /t
  5686.                         snorun titlgen /4:utilsdoc.tid /6:utilsdoc.tit;/L56 /o20
  5687.                         copy utilsdoc.tit+utilsdoc.toc+utilsdoc.do2 utilsdoc.prt
  5688.                         del utilsdoc.tit
  5689.                         del utilsdoc.toc
  5690.                         del utilsdoc.do2
  5691.                     
  5692.  
  5693.                                                                                           page 142
  5694.  
  5695.  
  5696.                     
  5697.                     46.  TOTSIZ  --  TOTAL SIZE OF SUBDIRECTORIES
  5698.                     
  5699.                           This utility program searches through one or more subdirectories and
  5700.                         provides the total number of allocated bytes for each subdirectory,
  5701.                         and the total number of files in that subdirectory.  Optionally, it
  5702.                         will also list all of the files in each subdirectory (including hidden
  5703.                         files and "subdirectory pseudo-files").  It automatically searches all
  5704.                         lower level subdirectories, and also gives a summary report at the end
  5705.                         of the run (if necessary) which gives the grand totals if more than
  5706.                         one subdirectory was listed above.
  5707.                     
  5708.                           Since one can redirect the program's output, this also makes it
  5709.                         possible to capture the displayed information for input to some other
  5710.                         program, if desired.  To do this, the output from the program could
  5711.                         either be redirected to a file or "piped" directly into the other program
  5712.                         using the appropriate DOS facilities (see the DOS User's Guide for
  5713.                         details).
  5714.                     
  5715.                           Note that the allocation number displayed is the number of bytes used
  5716.                         according to the directory entry, and does not take into account the
  5717.                         number of bytes that are unused at the end of the last sector of the
  5718.                         file.  (Note that the average DOS file wastes, typically, half of its
  5719.                         last sector.  DOS only allocates whole sectors to files, even if the
  5720.                         last sector is only needed to hold one single byte).  This phenomenon,
  5721.                         known as "granularity", can affect you more or less depending upon the
  5722.                         specific sector (and allocation cluster) size in use on your particular
  5723.                         disk.  When the minimum allocation is bigger than a single sector, the
  5724.                         average amount wasted is half a cluster.
  5725.                     
  5726.                           To use the TOTSIZ program, enter the command line:
  5727.                     
  5728.                         snorun totsiz <iooptions>[;<options>]
  5729.                     
  5730.                           Options, as usual, may be entered in either upper or lower case.
  5731.                     
  5732.                         <iooptions>::
  5733.                            ><outputfile>     or
  5734.                            >><outputfile>    or
  5735.  
  5736.                                                                                           page 143
  5737.  
  5738.  
  5739.                            /6=<outputfile>   or
  5740.                            /6:<outputfile>
  5741.                               This option allows specification of a file (or device) to which
  5742.                               the output file is to be written.  This can be either a printer
  5743.                               or a disk file, or in general any MS-DOS sequential output device.
  5744.                               Note that the ">>" form appends the output to the end of the
  5745.                               existing contents of the specified file, if any.
  5746.                     
  5747.                         <options>::
  5748.                            path=<pathname>   or
  5749.                            /p=<pathname>
  5750.                               This option allows specification of the path name to be used for
  5751.                               the subdirectory lookup.  Example pathnames are:
  5752.                                     c:  a:ms*  d:ms?as*      etc.
  5753.                               The default path name is "\".  As in the output file options,
  5754.                               you may use either a "=" or a ":" in the option specification,
  5755.                               whichever you prefer.
  5756.                     
  5757.                               Note that you can also specify the prefix part of a file name
  5758.                               as well as the name of a subdirectory.  In this case, TOTSIZ
  5759.                               will find all files beginning with the given prefix part.  If the
  5760.                               pathname also matches a subdirectory name, then TOTSIZ will also
  5761.                               operate on that subdirectory as well.  An example of using TOTSIZ
  5762.                               to total the sizes of all files beginning with "CL" in a given
  5763.                               subdirectory might be something like:
  5764.                                     snorun totsiz ;path=c:\dos\cl /f
  5765.                               This example would total the sizes of, for example,
  5766.                                     c:\dos\clock.exe
  5767.                                     c:\dos\clearmem.com
  5768.                                     c:\dos\clubroll.txt
  5769.                     
  5770.                            /dpo
  5771.                               This option causes no subdirectory scanning, but merely displays
  5772.                               the effective path name that would be used for the lookup.  This
  5773.                               is NOT a particularly useful option.
  5774.                     
  5775.                            file             or
  5776.                            /f
  5777.                               This option causes the output to include an entry for each file
  5778.                               found in each subdirectory processed.  The output includes records
  5779.                               for hidden files and "subdirectory pseudo-files".
  5780.                     
  5781.  
  5782.                                                                                           page 144
  5783.  
  5784.  
  5785.  
  5786.                     
  5787.                     47.  TP  --  WIPE CLEAN THE TAIL END OF A FILE
  5788.                     
  5789.                           Most people do not realize that almost every disk file on every disk,
  5790.                         both theirs and the ones they have received from others, contain two
  5791.                         different information-carrying regions.  The first is the area used by
  5792.                         the real file, and its contents are usually as expected.  The other
  5793.                         region is the area past the end of the real file, and its contents are
  5794.                         generally unexpected and sometimes a real surprise.
  5795.                     
  5796.                           The reason there IS anything "past the end of the real file" is that
  5797.                         DOS always allocates space in terms of clusters, and these clusters
  5798.                         contain anything from one to as many as four (even more in some older
  5799.                         versions of DOS) disk sectors.  DOS is incapable of allocating space in
  5800.                         anything less than cluster increments.  Therefore, if you have a file
  5801.                         which requires "n" clusters, plus one byte, then there will exist at
  5802.                         the end of that file a "second information-carrying region" which is
  5803.                         one cluster (minus one byte) long.  If your cluster size is 2048 bytes
  5804.                         (which is typically true for hard disks), this frequently overlooked
  5805.                         region will contain almost an entire screenful of bytes!
  5806.                     
  5807.                           Persons and companies which prepare disks for distribution, although
  5808.                         they usually go to great pains to ensure the correctness and propriety
  5809.                         of the information contained in their files they are going to distribute,
  5810.                         generally do not at all consider this "second" information-carrying
  5811.                         region.  Generally one discovers that this second region contains
  5812.                         information not at all intended for distribution.
  5813.                     
  5814.                           Although generally one finds random bits of object code, or fragments
  5815.                         of old directory sectors, one also can occasionally find hunks of source
  5816.                         code, pieces of word processing documents, old letters, pieces of
  5817.                         spreadsheets, or other more interesting stuff.  Systems which are
  5818.                         used for communications, for example, might easily have pieces of dialing
  5819.                         directories, user login codes, passwords, (even old CompuServe CB
  5820.                         conversations!) and the like floating around in the pool of unused
  5821.                         sectors, and occasionally these sectors turn up on diskettes which that
  5822.                         system prepares for distribution.
  5823.                     
  5824.  
  5825.                                                                                           page 145
  5826.  
  5827.  
  5828.                           The TP utility is a tool which concerned computer users will want
  5829.                         to use often.  It "wipes" clean the "tail end" of the specified file,
  5830.                         clearing everything in this second information-carrying region to
  5831.                         binary zeros.  It does not modify the data file itself, so TP is safe
  5832.                         to use on any kind of file I know of.  (Of course, before changing ANY
  5833.                         critical files with ANY program, one should ALWAYS make sure there is a
  5834.                         backup copy.  This is just good common sense).
  5835.                     
  5836.                           TP, of course, requires that the file it is to wipe is not write-
  5837.                         protected.  It may also terminate abnormally if the disk containing the
  5838.                         file to be wiped is full.
  5839.                     
  5840.                           To use TP, the command line looks like:
  5841.                     
  5842.                           snorun  tp  /2:<filespec>[;<options>]
  5843.                     
  5844.                           The "<filespec>" item is replaced by the name of the file (including,
  5845.                         as always, optional drive specifications and/or path names) which is to
  5846.                         have its tail end wiped.  For example, one might enter the command line:
  5847.                     
  5848.                           snorun  tp  /2:a:read.me
  5849.                     
  5850.                           As always, the ":" character between the "/2" and the file
  5851.                         specification can be either a ":" or a "=", whichever you prefer.
  5852.                     
  5853.                           NOTE that the "tp" command (by default) assumes that your DOS uses
  5854.                         clusters of 2K bytes (usually as four 512-byte sectors) or smaller.  If
  5855.                         your system uses a larger cluster size, you should specify the Cluster
  5856.                         Size option.  Failure to do so will mean that your "tail end" could still
  5857.                         contain some unintended information.  For example:
  5858.                     
  5859.                           snorun  tp  /2:myfile.txt ;/c=4096
  5860.                     
  5861.                           If you have a lot of files which you wish to wipe using TP, a handy
  5862.                         feature of DOS allows you specify multiple files with a single command
  5863.                         line, by specifying a file spec "skeleton".  For example, if you are
  5864.                         going to give a diskette with a bunch of files on it to a friend, or to
  5865.                         send it off for public distribution, you could first stick the diskette
  5866.                         in your A: diskette drive and enter the command line:
  5867.                     
  5868.                           for %i in (a:*.*) do snorun tp /2=%i
  5869.                     
  5870.  
  5871.                                                                                           page 146
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.                           The above command line will "wipe the tail end" of every normal, non-
  5881.                         protected file in the diskette's current directory.  (Of course, if the
  5882.                         diskette has multiple subdirectories, you will have to repeat the above
  5883.                         command line separately for each one.  The "skeleton" command line
  5884.                         shown above does not cross subdirectory boundaries.)
  5885.                     
  5886.                           Now that you know about this second information-carrying region, there
  5887.                         are those among you that will spend a cozy evening at home on some nasty
  5888.                         winter night checking out a bunch of your diskettes to see what secrets
  5889.                         you might find on them.  (I sure hope there isn't anything embarassing
  5890.                         on any of the ones I've previously distributed!)  If you DO find anything
  5891.                         unusually interesting on any of your acquired diskettes, especially those
  5892.                         distributed by major companies, I'd be interested in hearing what you
  5893.                         found.  My address is at the end of this document;  drop me a line!
  5894.                     
  5895.  
  5896.                                                                                           page 147
  5897.  
  5898.  
  5899.  
  5900.                     
  5901.                     48.  TRUNCATE  --  REDUCE THE SIZE OF A FILE
  5902.                     
  5903.                           This utility reduces the size of a file by discarding characters
  5904.                         that are at the end of the file.  This is most useful for returning
  5905.                         excess disk space to MS-DOS that was captured using the EXTEND utility,
  5906.                         described earlier.  Refer to the EXTEND chapter for further details.
  5907.                     
  5908.                           In order to use TRUNCATE, you first need to decide just how much of
  5909.                         the existing data in the file you wish to retain, and you need to
  5910.                         know this to the exact number of bytes.  There are many programs that
  5911.                         you can use to establish such information, but perhaps the most
  5912.                         simple and useful is Vernon Buerg's excellent LIST utility.  Find where
  5913.                         you want the end of file to be, switch to hexadecimal mode, and figure
  5914.                         out its byte number.
  5915.                     
  5916.                           Next you call up TRUNCATE with a command line that looks like:
  5917.                     
  5918.                         snorun truncate /2:<file> ;<options>
  5919.                     
  5920.                         WARNING:
  5921.                           Since this program's function is to carve a piece off of an existing
  5922.                         file, it must be used with some care.  The program requires that you
  5923.                         confirm what it is about to do by entering the password PROCEED in
  5924.                         response to its confirmation request.
  5925.                     
  5926.                            /2=<file>    or
  5927.                            /2:<file>
  5928.                               This item allows specification of the file which is to be
  5929.                               shortened.  Note that unit number 2 is used, instead of the
  5930.                               customary unit 5.  This permits binary file mode access to be
  5931.                               used.  As usual, either ':' or '=' may be used following the
  5932.                               unit number.
  5933.                     
  5934.                         <options>::
  5935.                            /=newsizeH        or
  5936.                            /=newsize
  5937.  
  5938.                                                                                           page 148
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.                               This option (misnamed, since it MUST be specified) tells
  5949.                               TRUNCATE how long you want this file to be.  You can specify the
  5950.                               number in either hexadecimal (with a trailing H) or in decimal
  5951.                               (no trailing H).  When TRUNCATE is finished, you can look at the
  5952.                               file's entry in the directory (use DIR) and it should be exactly
  5953.                               the size you've specified.  This number must be smaller than the
  5954.                               file's current size (actually, the same size is legal too, but
  5955.                               pointless).
  5956.                     
  5957.                           A typical command line would look like:
  5958.                     
  5959.                             snorun truncate /2:d:\myfiles\comm\capture.txt ;/=64365       -or-
  5960.                             snorun truncate /2:myfile.prt ;/=23a0fh
  5961.                     
  5962.  
  5963.                                                                                           page 149
  5964.  
  5965.  
  5966.  
  5967.                     
  5968.                     49.  TSELIM  --  TRAILING SPACE ELIMINATION
  5969.                     
  5970.                           This utility program eliminates trailing spaces from the end of each
  5971.                         input record and copies it to standard output.  This can often improve
  5972.                         the speed of some types of printers, and can reduce line costs on
  5973.                         communications lines.
  5974.                     
  5975.                           Note that this program operates as a "filter", much the same way as
  5976.                         the DOS "MORE" command.  It reads from standard input and writes to
  5977.                         standard output.  Therefore, its input and/or output can be "piped" the
  5978.                         same way as any other DOS filter.  See the DOS User's Guide for more
  5979.                         details on filters and "piping" of standard input and standard output.
  5980.                     
  5981.                           It also should be pointed out that input records are assumed to be
  5982.                         less than 4000 characters long, and that the program deletes any trailing
  5983.                         spaces that may be found at the end of each record.
  5984.                     
  5985.                           The program is invoked with a command line of the form:
  5986.                     
  5987.                         snorun tselim [<iooptions>][;<options>]
  5988.                     
  5989.                         <iooptions>::
  5990.                            <<inputfile>      or
  5991.                            /5=<inputfile>    or
  5992.                            /5:<inputfile>
  5993.                               This item allows specification of a file (or device) from which
  5994.                               the input file is to be read.  If this item is not specified at
  5995.                               all, the program reads from "default standard input", which may
  5996.                               be a piped input file, or the console.
  5997.                     
  5998.                            ><outputfile>     or
  5999.                            >><outputfile>    or
  6000.                            /6=<outputfile>   or
  6001.                            /6:<outputfile>
  6002.                               This item allows specification of a file (or device) to which
  6003.                               the output file is to be written.  This can be either a printer
  6004.  
  6005.                                                                                           page 150
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.                               or a disk file, or in general any MS-DOS sequential output device.
  6014.                               Note that the ">>" form appends the output to the end of the
  6015.                               existing contents of the specified file, if any.  If this item
  6016.                               is not specified at all, the program writes to the "default
  6017.                               standard output", which may likewise be piped into another program
  6018.                               or by default will appear upon the console.
  6019.                     
  6020.                         <options>::
  6021.                            /?                or
  6022.                            /H                or
  6023.                            /h
  6024.                               This option causes an example command line to be displayed to the
  6025.                               screen.  The program then terminates without processing the
  6026.                               input file.
  6027.                     
  6028.                           A typical command line would look like:
  6029.                     
  6030.                             snorun tselim <infile.txt >outfile.txt
  6031.                     
  6032.  
  6033.                                                                                           page 151
  6034.  
  6035.  
  6036.                     
  6037.                     50.  TYPEOF  --  CHARACTERIZE AN ASCII TEXT FILE
  6038.                     
  6039.                           This utility is useful for examining ASCII files to determine their
  6040.                         characteristics that are not obvious by a quick inspection with a file
  6041.                         listing program.
  6042.                     
  6043.                           The TYPEOF utility not only counts the number of records in the file,
  6044.                         but also indicates maximum and minimum record lengths, average record
  6045.                         length, and mean length.  It outputs a distribution table of how many
  6046.                         records of each length are found.  It checks to see if any records
  6047.                         contain tab characters.  If so, it reports on the maximum and minimum
  6048.                         number of tabs found in a single record, and outputs a distribution
  6049.                         chart.  TYPEOF also examines records for any possible non-printing
  6050.                         characters that may be present (including TAB characters), and if it
  6051.                         finds any it provides a count of how many of each are found.
  6052.                     
  6053.                           It is intended that a future enhancement of the program will be to
  6054.                         perform a zone analysis of each record, if the records appear to be
  6055.                         columnar, indicating the type and length of each field.
  6056.                     
  6057.                           Input records are assumed to be less than 4000 characters long.  Note
  6058.                         that TYPEOF deletes trailing blanks from each record upon input, (so,
  6059.                         records which end in variable-length alphanumeric fields may appear to
  6060.                         be variable in length, even though they could be considered fixed-length).
  6061.                     
  6062.                           TYPEOF is useful for performing confidence checks on data files with
  6063.                         known characteristics, verifying the validity of ASCII text files, and
  6064.                         many other general uses.  To use the TYPEOF utility, the command line
  6065.                         looks like:
  6066.                     
  6067.                         snorun  typeof  <iooptions>
  6068.                     
  6069.                         <iooptions>::
  6070.                            <<inputfile>      or
  6071.                            /5=<inputfile>    or
  6072.                            /5:<inputfile>
  6073.                               This item allows specification of a file (or device) from which
  6074.                               the input file is to be read.  If this item is not specified at
  6075.                               all, the program reads from "default standard input", which may
  6076.                               be a piped input file, or the console.
  6077.                     
  6078.  
  6079.                                                                                           page 152
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.                            ><outputfile>     or
  6090.                            >><outputfile>    or
  6091.                            /6=<outputfile>   or
  6092.                            /6:<outputfile>
  6093.                               This item allows specification of a file (or device) to which
  6094.                               the output file is to be written.  This can be either a printer
  6095.                               or a disk file, or in general any MS-DOS sequential output device.
  6096.                               Note that the ">>" form appends the output to the end of the
  6097.                               existing contents of the specified file, if any.  If this item
  6098.                               is not specified at all, the program writes to the "default
  6099.                               standard output", which may likewise be piped into another program
  6100.                               or by default will appear upon the console.
  6101.                     
  6102.  
  6103.                                                                                           page 153
  6104.  
  6105.  
  6106.  
  6107.  
  6108.  
  6109.                     
  6110.                     51.  UNBACK  --  RECOVER BACKUP FILES THAT RESTORE WON'T
  6111.                     
  6112.                           This utility program allows you to restore files that have been placed
  6113.                         on a diskette using the DOS BACKUP utility.  Ordinarily, RESTORE requires
  6114.                         that the file BACKUPID.@@@ exist on the backup diskette, and that it be
  6115.                         a perfect match for the files on the diskette.  If that special file is
  6116.                         missing or invalid for some other reason, it normally is not possible to
  6117.                         restore the data file.  The normal RESTORE command will not process it,
  6118.                         and just COPYing the data file gives an invalid version of the file that
  6119.                         was originally backed up.
  6120.                     
  6121.                           This utility will read the file placed onto the diskette by BACKUP,
  6122.                         remove the control information, and copy it to another disk so it may be
  6123.                         used.  UNBACK does not work just like RESTORE:  it has some limitations.
  6124.                         First, UNBACK does not restore the originally backed-up file's original
  6125.                         time and date.  Secondly, UNBACK does not restore files which are not
  6126.                         entirely contained on one diskette.  However, it can be a lifesaver when
  6127.                         you need it!
  6128.                     
  6129.                         snorun unback
  6130.                     
  6131.                           The UNBACK program will prompt you for each input file and corresponding
  6132.                         output file in turn.  The prompts should be self-explanatory.  When you
  6133.                         are finished, simply enter a null record (just press ENTER) in response
  6134.                         to the keyin prompt.
  6135.                     
  6136.  
  6137.                                                                                           page 154
  6138.  
  6139.  
  6140.  
  6141.                     
  6142.                     52.  UNOVER  --  DELETE LEADING SPACES IN TEXT FILE
  6143.                     
  6144.                           Sometimes one has a file which contains a number of leading spaces
  6145.                         at the beginning of each record.  These may have been added to make the
  6146.                         file print in a more attractive manner on one kind of printer, but
  6147.                         might adversely affect the printing on some other printer, for example.
  6148.                         In such cases, the UNOVER utility can be used to remove the first run
  6149.                         of "some number" of blanks from each record in the input file.
  6150.                     
  6151.                           UNOVER therefore can be used to "undo" a previous "OVER" operation.
  6152.                         (OVER is another utility program in this package, described in an earlier
  6153.                         chapter).  Note that control characters, escape sequences, or any other
  6154.                         text which might precede the run of spaces, if any, do not interfere
  6155.                         with their removal.
  6156.                     
  6157.                           For example, this document is formatted with a number of leading spaces
  6158.                         at the start of each record, and is intended to be printed in
  6159.                         "compressed print" mode.  The use of the leading spaces prevents the
  6160.                         document text from squeezing so tightly against the left margin that it
  6161.                         interferes with binding the printed document.  If one only has an eighty
  6162.                         column printer with no ability to print in compressed mode (such as
  6163.                         perhaps a daisy wheel or older-style printer), the printer might not be
  6164.                         able to deal with the longer records.
  6165.                     
  6166.                           UNOVER allows you to specify how many consecutive blanks to remove.
  6167.                         If there are more than the specified number, only the number specified
  6168.                         will be removed.  For example, one could reduce the left margin of this
  6169.                         document, without eliminating it entirely, by removing ten of the
  6170.                         twenty blanks from each record.
  6171.                     
  6172.                           Note that this program can operate as a "filter", much the same way as
  6173.                         the DOS "MORE" command.  It reads from standard input and writes to
  6174.                         standard output.  Therefore, its input and/or output can be "piped" the
  6175.                         same way as any other DOS filter.  See the DOS User's Guide for more
  6176.                         details on filters and "piping" of standard input and standard output.
  6177.                     
  6178.  
  6179.                                                                                           page 155
  6180.  
  6181.  
  6182.                           To invoke the UNOVER utility, use a command line of the form:
  6183.                     
  6184.                         snorun unover <iooptions>[;<options>]
  6185.                     
  6186.                         <iooptions>::
  6187.                            <<inputfile>      or
  6188.                            /5=<inputfile>    or
  6189.                            /5:<inputfile>
  6190.                               This item allows specification of a file (or device) from which
  6191.                               the input file is to be read.  If this item is not specified at
  6192.                               all, the program reads from "default standard input", which may
  6193.                               be a piped input file, or the console.
  6194.                     
  6195.                            ><outputfile>     or
  6196.                            >><outputfile>    or
  6197.                            /6=<outputfile>   or
  6198.                            /6:<outputfile>
  6199.                               This item allows specification of a file (or device) to which
  6200.                               the output file is to be written.  This can be either a printer
  6201.                               or a disk file, or in general any MS-DOS sequential output device.
  6202.                               Note that the ">>" form appends the output to the end of the
  6203.                               existing contents of the specified file, if any.  If this item
  6204.                               is not specified at all, the program writes to the "default
  6205.                               standard output", which may likewise be piped into another program
  6206.                               or by default will appear upon the console.
  6207.                     
  6208.                         <options>::
  6209.                            /N=<number>       or
  6210.                            /n:<number>       or
  6211.                            /n<number>
  6212.                               This option allows the user to specify how many blanks are to be
  6213.                               removed from each record.  The first run of the specified number
  6214.                               of consecutive ASCII spaces (NOT including tab characters or their
  6215.                               expansion!) found in each record of the input file will be removed.
  6216.                               Note that the option may appear in upper or lower case, and the
  6217.                               option letter may be separated from the number, if desired, with
  6218.                               either a colon or an equals sign.  If this option is not specified,
  6219.                               the default number of spaces to remove is 20 (the same as the
  6220.                               default number inserted by the OVER utility).  NOTE:  Don't forget
  6221.                               the semicolon before the option.  It IS important.
  6222.                     
  6223.  
  6224.                                                                                           page 156
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.                           Some typical command lines would look like:
  6237.                     
  6238.                             snorun unover <utilsdoc.prt >utilsdoc.pr2
  6239.                             snorun unover /5:somefile.txt /6:revised.txt;/n=18
  6240.                             snorun unover <\print\prtfile.prt /6=\print\prtfile2.prt;/n10
  6241.                     
  6242.  
  6243.                                                                                           page 157
  6244.  
  6245.  
  6246.                     
  6247.                     53.  WC  --  WORD COUNT
  6248.                     
  6249.                           This simple but useful utility program counts the number of words in
  6250.                         an input file and displays the total.  (Simple is not an exaggeration...
  6251.                         the SNOBOL4+ source program for this utility is only four source
  6252.                         statements long, including the "END" statement!)  As a bonus, it also
  6253.                         displays a count of the number of source lines in the file.
  6254.                     
  6255.                           There is no universal agreement as to what constitutes a "word".  This
  6256.                         program considers a word as anything starting with a alphabetic character
  6257.                         or a numeric digit, and containing only alphabetic characters or digits.
  6258.                         WC counts hyphenated words and contractions (joined by an apostrophe)
  6259.                         as a single word, if they appear on the same line.  Unlike other word
  6260.                         counting programs, this one allows the user to specify that other
  6261.                         characters are legal in words as well.  This feature is especially
  6262.                         helpful for users writing in foreign languages.
  6263.                     
  6264.                           For example, "P. O. Box 40476" counts as four words.  "SNOBOL4" counts
  6265.                         as one word.  "MS/DOS" counts as two words (unless the character "/" is
  6266.                         specified as legal, in which case "MS/DOS" would count as one word).
  6267.                     
  6268.                           Some text editors produce text files which have very long individual
  6269.                         records.  Microsoft WORD, for example, writes each entire paragraph as
  6270.                         one (long!) line in its unformatted output text files.  WC allows each
  6271.                         input record to be up to 30,000 characters long.  Note that using WC on
  6272.                         "formatted"-type (counts as two words, due to the quotes) files produced
  6273.                         by some word processors can cause erroneous counts because the formatting
  6274.                         information may sometimes look like "words" and be included in the count.
  6275.                     
  6276.                           Note that this program can operate as a "filter", much the same way as
  6277.                         the DOS "MORE" command.  It reads from standard input and writes to
  6278.                         standard output.  Therefore, its input and/or output can be "piped" the
  6279.                         same way as any other DOS filter.  See the DOS User's Guide for more
  6280.                         details on filters and "piping" of standard input and standard output.
  6281.                     
  6282.                           Note, however, that only the final lines (containing the word count and
  6283.                         the total number of input records read) are written to standard output.
  6284.                         The program signon is written to the console, even if standard output has
  6285.                         been redirected to a disk file or elsewhere (see below).
  6286.                     
  6287.  
  6288.                                                                                           page 158
  6289.  
  6290.  
  6291.  
  6292.                           The program is invoked with a command line of the form:
  6293.                     
  6294.                         snorun wc [<iooptions>][;<options>]
  6295.                     
  6296.                         <iooptions>::
  6297.                            <<inputfile>      or
  6298.                            /5=<inputfile>    or
  6299.                            /5:<inputfile>
  6300.                               This item allows specification of a file (or device) from which
  6301.                               the input file is to be read.  If this item is not specified at
  6302.                               all, the program reads from "default standard input", which may
  6303.                               be a piped input file, or the console.
  6304.                     
  6305.                            ><outputfile>     or
  6306.                            >><outputfile>    or
  6307.                            /6=<outputfile>   or
  6308.                            /6:<outputfile>
  6309.                               This item allows specification of a file (or device) to which
  6310.                               the output file is to be written.  This can be either a printer
  6311.                               or a disk file, or in general any MS-DOS sequential output device.
  6312.                               Note that the ">>" form appends the output to the end of the
  6313.                               existing contents of the specified file, if any.  If this item
  6314.                               is not specified at all, the program writes to the "default
  6315.                               standard output", which may likewise be piped into another program
  6316.                               or by default will appear upon the console.
  6317.                     
  6318.                         <options>::
  6319.                            /L="<legal chars>" or
  6320.                            /l:"<legal chars>"
  6321.                               This option allows the user to specify that other characters are
  6322.                               also to be allowed as starting or intermediate characters in
  6323.                               "words".  Using this option allows foreign language users to get
  6324.                               accurate word counts too!  Note that the option can appear in
  6325.                               either upper or lower case, and either "=" or ":" is a legal
  6326.                               separator.  The double quotes around the string of legal characters
  6327.                               are required.  NOTE:  Don't forget the ";" that separates the
  6328.                               I/O options from the regular options!  It IS important.
  6329.                     
  6330.  
  6331.                                                                                           page 159
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.                               NOTE:  In the example below that demonstrates the use of this
  6342.                               option, a number of IBM Extended ASCII characters are used which
  6343.                               may cause your printer to do "strange things".  If these characters
  6344.                               cause problems on your printer, (there should be fourteen characters
  6345.                               between the double quotes), you might want to modify the example
  6346.                               so you can print it correctly.  Note also that not all keyboards
  6347.                               generate the foreign character sets easily (and sometimes not at
  6348.                               all).
  6349.                     
  6350.                           Some typical command lines would look like:
  6351.                     
  6352.                             snorun wc <infile.txt >infile.wct
  6353.                             snorun wc /6:infile.txt;/L="ÇéàçêÉôòûùáíóú"
  6354.                     
  6355.  
  6356.                                                                                           page 160
  6357.  
  6358.  
  6359.                     
  6360.                     54.  WFREQ  --  WORD FREQUENCY
  6361.                     
  6362.                           This program reads an input file and counts how many times each
  6363.                         specific word in the file is used.  This can be of use to writers, for
  6364.                         example, to point out words that they may be over-using.  On the other
  6365.                         hand, words that appear only one time in a lengthy document are more
  6366.                         likely to be misspelled than words which appear more than once.  It is
  6367.                         also interesting to analyze a document to see what the "working
  6368.                         vocabulary" is, i.e. how many different words are contained in the
  6369.                         document.
  6370.                     
  6371.                           There is no universal agreement as to what constitutes a "word".  This
  6372.                         program considers a word as anything starting with a alphabetic character
  6373.                         or a numeric digit, and containing only alphabetic characters or digits.
  6374.                         WFREQ considers hyphenated words and contractions (joined by an
  6375.                         apostrophe) as a single word, if they appear on the same line.  Unlike
  6376.                         other word frequency programs, this one allows the user to specify that
  6377.                         other characters are legal in words as well.  This feature is especially
  6378.                         helpful for users writing in foreign languages.
  6379.                     
  6380.                           For example, "P. O. Box 40476" is four different words.  "SNOBOL4"
  6381.                         is a single word.  "MS/DOS" is treated as two different words (unless
  6382.                         the character "/" is specified as legal, in which case "MS/DOS" would
  6383.                         be considered to be one word).
  6384.                     
  6385.                           Some text editors produce text files which have very long individual
  6386.                         records.  Microsoft WORD, for example, writes each entire paragraph as
  6387.                         one (long!) line in its unformatted output text files.  WFREQ allows each
  6388.                         input record to be up to 30,000 characters long.  Note that using WFREQ
  6389.                         on "formatted"-type (counts as two words, due to the quotes) files
  6390.                         produced by some word processors can cause erroneous counts because the
  6391.                         formatting information may sometimes look like "words" and be included
  6392.                         in the count.
  6393.                     
  6394.                           Upon conclusion, the program prints a multi-column report of the words
  6395.                         and their usage counts, and finally a report with other useful counts,
  6396.                         such as the number of source lines, the average word length in the file,
  6397.                         number of different words, and the like.  The number of columns in the
  6398.                         word frequency report is chosen at run-time according to the longest
  6399.                         "words" found.
  6400.                     
  6401.  
  6402.                                                                                           page 161
  6403.  
  6404.  
  6405.  
  6406.                           Note that this program can operate as a "filter", much the same way as
  6407.                         the DOS "MORE" command.  It reads from standard input and writes to
  6408.                         standard output.  Therefore, its input and/or output can be "piped" the
  6409.                         same way as any other DOS filter.  See the DOS User's Guide for more
  6410.                         details on filters and "piping" of standard input and standard output.
  6411.                     
  6412.                           Note, however, that the program signon is written specifically to the
  6413.                         console, not to standard output.  Therefore, the signon will still
  6414.                         appear on the screen, as usual, even if the remainder of the program
  6415.                         output has been redirected to a disk file or elsewhere (see below).
  6416.                     
  6417.                           The program is invoked with a command line of the form:
  6418.                     
  6419.                         snorun wfreq [<iooptions>][;<options>]
  6420.                     
  6421.                         <iooptions>::
  6422.                            <<inputfile>      or
  6423.                            /5=<inputfile>    or
  6424.                            /5:<inputfile>
  6425.                               This item allows specification of a file (or device) from which
  6426.                               the input file is to be read.  If this item is not specified at
  6427.                               all, the program reads from "default standard input", which may
  6428.                               be a piped input file, or the console.
  6429.                     
  6430.                            ><outputfile>     or
  6431.                            >><outputfile>    or
  6432.                            /6=<outputfile>   or
  6433.                            /6:<outputfile>
  6434.                               This item allows specification of a file (or device) to which
  6435.                               the output file is to be written.  This can be either a printer
  6436.                               or a disk file, or in general any MS-DOS sequential output device.
  6437.                               Note that the ">>" form appends the output to the end of the
  6438.                               existing contents of the specified file, if any.  If this item
  6439.                               is not specified at all, the program writes to the "default
  6440.                               standard output", which may likewise be piped into another program
  6441.                               or by default will appear upon the console.
  6442.                     
  6443.  
  6444.                                                                                           page 162
  6445.  
  6446.  
  6447.  
  6448.  
  6449.                         <options>::
  6450.                            /L="<legal chars>" or
  6451.                            /l:"<legal chars>"
  6452.                               This option allows the user to specify that other characters are
  6453.                               also to be allowed as starting or intermediate characters in
  6454.                               "words".  Using this option allows foreign language users to use
  6455.                               WORDFREQ as well!  Note that the option can appear in either upper
  6456.                               or lower case, and either "=" or ":" is a legal separator.  The
  6457.                               double quotes around the string of legal characters are required.
  6458.                               NOTE:  Don't forget the ";" that separates the I/O options from the
  6459.                               regular options!  It IS important.
  6460.                     
  6461.                               NOTE:  In the example below that demonstrates the use of this
  6462.                               option, I have used "normal" ASCII characters that one might
  6463.                               want to be included within words (the example above being MS/DOS).
  6464.                               Foreign users whose keyboards and printers support foreign
  6465.                               characters in the "extended ASCII character set" can key their
  6466.                               characters here as well.
  6467.                     
  6468.                           Some typical command lines would look like:
  6469.                     
  6470.                             snorun wfreq <infile.txt >infile.wfq
  6471.                             snorun wfreq /6:infile.txt;/L="/$"
  6472.                     
  6473.                           You might be surprised to learn that the entire WFREQ program
  6474.                         (excluding only the standard columnar print subroutine inclusion) is only
  6475.                         five executable statements long (and one of those five is the "END"
  6476.                         statement!)  If the output were to be printed in single-column form
  6477.                         instead (one word per line), the program would still only be five
  6478.                         executable statements, total, including the "END" statement.
  6479.                     
  6480.  
  6481.                                                                                           page 163
  6482.  
  6483.  
  6484.                     
  6485.                     55.  XTRCOMS  --  EXTRACT COMMENTS FROM ASSEMBLER PROGRAMS
  6486.                     
  6487.                           This utility program extracts blocks of comments from assembly language
  6488.                         source files.  Specifically, it looks for blocks which contain a comment
  6489.                         line whose first two bytes are upper case alphabetic characters, and
  6490.                         which is followed by a non-null comment line.  Such blocks are usually
  6491.                         the comment blocks preceding a program subroutine.  Once triggering on
  6492.                         such a comment block, the remainder of the block is written to standard
  6493.                         output (the block is not considered terminated by a null comment line).
  6494.                         Therefore, the typical command line would look like:
  6495.                     
  6496.                         snorun xtrcoms <asmfile.ASM >asmfile.CMT [/S]
  6497.                     
  6498.                         A typical comment block of the form that XTRCOMS looks for might look
  6499.                         like:
  6500.                     
  6501.                         ;
  6502.                         ;  MYSUB  --  Title of My Subroutine
  6503.                         ;     This routine does nothing other than to demonstrate the kind of
  6504.                         ;   comment blocks which the XTRCOMS programs looks for, and to give
  6505.                         ;   an example of a fairly typical subroutine header.
  6506.                         ;     On entry,  AX  =  whatever parameters might be in it
  6507.                         ;     On exit,   AX  =  unchanged
  6508.                         ;                All other registers unchanged
  6509.                         ;
  6510.                     
  6511.                           Normally, the output of XTRCOMS would be written to a disk file (where,
  6512.                         for example, it could be referenced by some kind of an on-line aid
  6513.                         facility or the like).  However, one could also redirect this output to
  6514.                         a printer, if one wanted to get a listing of the internal subroutine
  6515.                         documentation.
  6516.                     
  6517.                           The /S option, if specified, causes the various comment blocks to be
  6518.                         sorted and output in sorted sequence instead of the order in which they
  6519.                         appear in the file.  They are sorted into sequence based upon the name
  6520.                         of the comment block, which is defined to be the first word (in upper-
  6521.                         case ASCII characters) at the beginning of the comment block.
  6522.                     
  6523.  
  6524.                                                                                           page 164
  6525.  
  6526.  
  6527.  
  6528.                     
  6529.                     56.  SETTING UPPER AND LOWER CASE CHARACTER SETS
  6530.                     
  6531.                        Many of the utilities in this package convert alphabetic characters
  6532.                     from upper to lower case or vice-versa.  With most programs, this poses a
  6533.                     problem for international (especially European) users, whose character sets
  6534.                     include a number of special characters which most programs ignore when doing
  6535.                     case conversion.
  6536.                     
  6537.                        (If you are in the United States and never need to use international
  6538.                     character sets, you may safely ignore this chapter).
  6539.                     
  6540.                        In order to help resolve that problem, many of the utilities in this
  6541.                     program which assume a knowledge of the upper and lower case character sets
  6542.                     have been designed to allow the user to specify which additional characters
  6543.                     (other than the normal ASCII "A" through "Z" and "a" through "z") are legal
  6544.                     in "words" and how the different cases of those characters correspond to
  6545.                     each other.  This is done by placing two strings in the DOS environment area
  6546.                     by using the MS-DOS "SET" command, typically in one's AUTOEXEC.BAT file,
  6547.                     so that the configuration is done automatically each time the system reboots.
  6548.                     
  6549.                        For example, a user in France might want to enter the following two lines
  6550.                     into the machine's AUTOEXEC.BAT file (these two lines may not print correctly
  6551.                     if your printer does not correctly handle the IBM Extended ASCII character
  6552.                     set):
  6553.                     
  6554.                             SET UCASE=ÇÉè
  6555.                             SET LCASE=çéè
  6556.                     
  6557.                        Note especially that one can enter the same character in corresponding
  6558.                     positions on both the upper and lower case character definitions.  This tells
  6559.                     the programs which support this facility that the characters are legal in
  6560.                     "words" but that they are not to be changed during case conversions.  This
  6561.                     facility is useful, for example, for users needing or wishing to use other
  6562.                     international character sets, such as Hebrew, in which the concept of "case"
  6563.                     is not meaningful.
  6564.                     
  6565.  
  6566.                                                                                           page 165
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.                        You must always have exactly the same number of characters in both the
  6577.                     UCASE and LCASE strings.  If the number of characters in the two strings
  6578.                     are different, they will generally be ignored.
  6579.                     
  6580.                        In exceptional cases, your version of MS-DOS may not have enough room in
  6581.                     its environment area to allow you to enter the above-described SET commands.
  6582.                     In this case, you should either carefully examine your MS-DOS documentation
  6583.                     to see if it describes how to increase the size of the MS-DOS environment
  6584.                     area, or else contact the person who you usually go to for MS-DOS technical
  6585.                     support.  You might also check with some of your friendly local hackers at
  6586.                     either your local computer store, or a nearby computer club or bulletin board
  6587.                     service, for help.
  6588.                     
  6589.  
  6590.                                                                                           page 166
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.                     
  6598.                     57.  HOW TO GET MORE
  6599.                     
  6600.                        Note that not all of the utilities described in this document are being
  6601.                     distributed as "ShareWare".  In particular, I feel that the SPACE utility
  6602.                     is well worth my asking price of $30.
  6603.                     
  6604.                        Any utilities described in this document which are not part of the
  6605.                     distribution package you received are available separately upon request
  6606.                     from the author.  Please write for price and availability information.
  6607.                     
  6608.                        Also, please note that programs in this package are subject to periodic
  6609.                     improvement and updating.  The public domain distribution system inevitably
  6610.                     results in old or obsolete copies of programs floating around nearly forever.
  6611.                     The only way to ensure that you have the latest versions of these programs is
  6612.                     to register as a user directly with the author.  The contribution you make
  6613.                     when you register will help to defray the cost of sending you update and
  6614.                     latest-version information from time to time.
  6615.                     
  6616.                        Also, due to the vagaries of public domain distribution and the low
  6617.                     price of these utilities, note that I cannot accept any liability for any
  6618.                     damages or claims whatsoever that may result from the use, or inability to
  6619.                     use, any of these programs.  The user must accept any and all responsibility
  6620.                     regarding this software.  Your acceptance and use of these programs
  6621.                     constitute your acceptance of this responsibility.
  6622.                     
  6623.  
  6624.                                                                                           page 167
  6625.  
  6626.  
  6627.  
  6628.                     
  6629.                     58.  COMMON QUESTIONS AND ANSWERS
  6630.                     
  6631.                        Q.  I am having trouble getting the "append" feature to work when I try
  6632.                            to append output from a program to the end of an existing file.  What
  6633.                            am I doing wrong?
  6634.                     
  6635.                        A.  Probably nothing.  As of this writing, SNORUN version 2.03 (at least)
  6636.                            seems to have trouble appending to existing files.  I understand that
  6637.                            the problem can be bypassed by using units other than 6 (standard
  6638.                            output), but this also would prevent one from simply redirecting
  6639.                            SNOBOL4+'s standard output using the ">" and ">>" command line
  6640.                            options.  I understand that Mr. Emmer is looking into the problem,
  6641.                            but this one apparently will be challenging to correct since
  6642.                            apparently the problem is caused by a "feature" of MS-DOS.  In the
  6643.                            mean time, you can get around the problem by writing the output to
  6644.                            a new file, then combining the old and the new files with a command
  6645.                            sequence like:
  6646.                     
  6647.                             copy oldfile.ext+newfile.ext scratch.txt
  6648.                             copy scratch.txt oldfile.ext
  6649.                             del scratch.txt
  6650.                     
  6651.                        Q.  I've been using the XXXX program for quite some time and had no
  6652.                            problems.  Suddenly today it seemed to just hang in a hard loop or
  6653.                            something.  What happened?
  6654.                     
  6655.                        A.  Hard to say for sure.  If you are running the ShareWare version of
  6656.                            these utilities, you are probably using version 2.0 of the SNORUN
  6657.                            run-time package (the version number is in the signon message).
  6658.                            Version 2.0 infrequently has a problem which causes it to hang up.
  6659.                            This problem is discussed in the Introduction.  If you are running a
  6660.                            registered version (version 2.03 of the SNORUN run-time, as of this
  6661.                            writing), this problem should have been fixed.  Please report it.
  6662.                     
  6663.                        Q.  Okay, I've found a bug in one of your programs.  What do I do now?
  6664.                     
  6665.  
  6666.                                                                                           page 168
  6667.  
  6668.  
  6669.  
  6670.                        A.  First of all, please make sure it is a bug and not just a "feature".
  6671.                            Double-check the description in this user's guide to make sure you
  6672.                            haven't overlooked something.  If it is a bona-fide bug (and you can
  6673.                            get it to happen again... if you can't reproduce it, chances are I
  6674.                            can't either), please send me a diskette containing any relevant
  6675.                            programs or data files necessary to demonstrate the problem.  I
  6676.                            cannot guarantee that these programs are completely error-free
  6677.                            (even though this is the intention!).  In any case, I can't fix a bug
  6678.                            which I don't know about.  NOTE:  As of this writing, in August 1987,
  6679.                            I am not equipped to handle diskettes other than 5-1/4 inch.  Sorry.
  6680.                     
  6681.                            Send the diskette, and a complete description of the bug, direct to
  6682.                            me.  My address is located towards the end of this user's guide.  If
  6683.                            you are not a registered user, this would be an excellent opportunity
  6684.                            for you to register!  If you are a registered user (or register when
  6685.                            you report the bug), you can be assured of a reply, and most likely
  6686.                            a fix.  If you are using the ShareWare version, the bug may have been
  6687.                            fixed already in a newer version than the one you have, but I'd still
  6688.                            appreciate your report.
  6689.                     
  6690.                            Your ideas for improvements in these programs, or ideas for other
  6691.                            useful utilities, are of course always welcome as well.
  6692.                     
  6693.                        Q.  Can I give a copy of your utilities to a friend?
  6694.                     
  6695.                        A.  The ShareWare version of these utilities is distributable completely
  6696.                            freely, which means that you are welcome to give away copies.  All
  6697.                            such copies must be complete and unmodified.  If you intend to sell
  6698.                            the copies, you must charge no more than a nominal fee for diskette
  6699.                            duplication and handling.  In all cases, you must include this user's
  6700.                            guide in its entirety.  If you have a registered copy, those should
  6701.                            not be given out, as registered copies have a SNORUN (and .SAV files)
  6702.                            which are different from (and incompatible with) those in the
  6703.                            ShareWare versions.  The SPACE utility is a program product, and must
  6704.                            not be given away to others.  For more details, refer to the license
  6705.                            agreement which appears towards the beginning of this user's guide.
  6706.                     
  6707.  
  6708.                                                                                           page 169
  6709.  
  6710.  
  6711.  
  6712.                        Q.  I want to use one or more of your programs within my company.  Any
  6713.                            restrictions?
  6714.                     
  6715.                        A.  If you are a business, you really should register your copies.  This
  6716.                            ensures you with technical support and the most reliable versions of
  6717.                            these programs.  The SPACE program is a program product, but very
  6718.                            attractive site licensing terms are available.  I'm also available
  6719.                            for consulting or custom programming projects, please write for
  6720.                            details.
  6721.                     
  6722.                        Q.  You keep saying "as of this writing", but every time you give a
  6723.                            different date.  Which one is right?
  6724.                     
  6725.                        A.  All of them.  Like most documents in these days of automated document
  6726.                            preparation, this one is added to and revised periodically.  Such
  6727.                            notes which you'll find scattered through the User's Guide reflect the
  6728.                            time that the containing section was written, or last revised.  If
  6729.                            you find something that's obviously inconsistent or in error, please
  6730.                            let me know so I can correct it in the next revision.
  6731.                     
  6732.                        Q.  I am curious about why I have to use "5" so often for input files and
  6733.                            "6" so often for output files.
  6734.                     
  6735.                        A.  Good question.  The direct answer is "for historical reasons".  The
  6736.                            original version of SNOBOL4 was written for the IBM 360 (the most
  6737.                            popular mainframe at the time) and, as an expedient, the developers
  6738.                            "borrowed" the Fortran language's I/O package.  Fortran uses "unit
  6739.                            numbers" to internally reference specific "files", sort of like the
  6740.                            "file numbers" that one refers to in BASIC.  By longstanding
  6741.                            convention (in the IBM world, at least, I can't vouch for others),
  6742.                            unit 5 is the standard "input file" and unit 6 is the standard "output
  6743.                            file".  Subsequent versions of SNOBOL4 (which have, by and large,
  6744.                            thankfully eliminated the Fortran I/O nonsense), have generally
  6745.                            opted to retain the unit number, both as a convenient internal "file
  6746.                            handle" and to retain maximum possible compatibility with existing
  6747.                            SNOBOL4 programs.  My personal convention is to use "standard input"
  6748.                            (i.e. unit 5) and "standard output" (unit 6) as much as possible.  I
  6749.  
  6750.                                                                                           page 170
  6751.  
  6752.  
  6753.  
  6754.                            use other unit numbers when I have to do binary input/output, for
  6755.                            example, or if I have to open multiple input or output files at the
  6756.                            same time.
  6757.                               Just why the original Fortran developers chose 5 and 6, I'm not
  6758.                            sure anyone still remembers.  More likely than not, even their answer
  6759.                            today would also be "for historical reasons"!
  6760.                     
  6761.                        Q.  SNOBOL4 sounds like the language I need for things I occasionally
  6762.                            would like to do.  I've never seen it in any of my local computer
  6763.                            or software stores.  Where can I get a copy?
  6764.                     
  6765.                        A.  This is a question I hear all the time.  Unfortunately, most computer
  6766.                            stores only know about the products that they see big ads for in the
  6767.                            magazines that they read, or that everybody comes in asking about.
  6768.                            Even when a language is as good as SNOBOL4 is, it's hard to get any
  6769.                            of the "big guys" interested in it.  You could try going to your
  6770.                            local computer stores and simply insisting that they special-order
  6771.                            you a copy.  There are at least a few enlightened mail-order software
  6772.                            companies that carry it.  If neither of those ideas work, (which too
  6773.                            often seems to be the case), I have decided (of necessity!) to
  6774.                            process orders personally for the benefit of my clients.  You should
  6775.                            find a price list elsewhere on the diskette containing this manual.
  6776.                              If you are in Europe, you will probably find that ordering your
  6777.                            SNOBOL4 and related products from me directly will be less expensive
  6778.                            than special-ordering them through your local computer store, some
  6779.                            of which seem to have simply outrageous markup and pricing structures.
  6780.                     
  6781.                        Q.  Why don't the developers of SNOBOL4 promote this exciting product?
  6782.                     
  6783.                        A.  The original development, done at Bell Labs, was a "by-product" of
  6784.                            another project.  Bell Labs (for legal reasons) at the time was
  6785.                            prevented from selling any of their products directly to the public.
  6786.                            Fortunately for the rest of us, they decided to put the source for
  6787.                            SNOBOL4 into the public domain, guaranteeing its continued widespread
  6788.                            availability, for any system anyone wishes to "port" it to.  Meanwhile,
  6789.                            the primary developer (Ralph Griswold) has moved from Bell Labs to
  6790.                            the University of Arizona.  Continuing research there has produced
  6791.  
  6792.                                                                                           page 171
  6793.  
  6794.  
  6795.                            another fascinating language (ICON), again as a by-product of other
  6796.                            research.  Again, the funding body insists that their research funds
  6797.                            not be used to finance any commercial or for-profit organization.
  6798.                            Typically, the individuals who port SNOBOL4 to a given system do it
  6799.                            primarily for their own interests and few of these have the money or
  6800.                            inclination to pursue a costly nationwide distribution campaign.
  6801.                     
  6802.                        Q.  One of the utilities you have here looks like just what I need...
  6803.                            almost.  Can I get you to make "just one small change"?
  6804.                     
  6805.                        A.  Suggestions for improvements are always welcome.  Often, these are
  6806.                            relatively simple to implement.  If they are of the sort that will
  6807.                            continue to be of general interest, I may simply incorporate your
  6808.                            ideas in the next release.  I may even make such changes at no cost
  6809.                            to you whatsoever.  Changes which are more specialized are also
  6810.                            possible, but are usually billable.  Please contact me with your
  6811.                            requirements and we'll see if we can't reach a suitable arrangement.
  6812.                     
  6813.                        Q.  Reading through this User's Guide gave me a great idea for a program
  6814.                            I'd like to have.  It's real specific to my needs, and I would not
  6815.                            want it to "get out" to others.  I've never seen anything like it on
  6816.                            the market.  Could you make it for me?
  6817.                     
  6818.                        A.  Probably!  I offer comprehensive product design, software engineering,
  6819.                            and systems consulting services.  This includes custom programming of
  6820.                            systems and applications software in numerous languages, running the
  6821.                            gamut from Assembler and C to SNOBOL4 and ICON.  I am willing to sign
  6822.                            non-disclosure agreements if you need them.  I am also willing to
  6823.                            travel worldwide should your needs require.  Please contact me with
  6824.                            your ideas and requirements for details and a fee schedule.  In the
  6825.                            "About the Author" chapter elsewhere in this User's Guide you will
  6826.                            find a description of some the diverse areas I've already been
  6827.                            involved with.
  6828.                     
  6829.                        Q.  I live overseas and it's really complicated to send shareware payments
  6830.                            in dollars to American shareware authors.  My bank charges outrageous
  6831.                            fees for checks in dollars, and I don't want to send cash.  Isn't
  6832.                            there some other way I can register shareware packages?
  6833.                     
  6834.  
  6835.                                                                                           page 172
  6836.  
  6837.  
  6838.                        A.  One good way to send money to shareware authors in the United States
  6839.                            is to purchase American Express traveller's cheques.  Most major cities
  6840.                            worldwide have American Express representatives who will sell you
  6841.                            traveller's cheques, in US dollars, at a much smaller surcharge than
  6842.                            a bank would charge for a foreign-currency check.  (Unfortunately,
  6843.                            you may not be able to get these in denominations smaller than $20,
  6844.                            or in less than a minimum quantity of $100 worth).  Make sure, before
  6845.                            you mail the cheque, that you have signed it in BOTH the required
  6846.                            places and that you have written in the name of the person to whom
  6847.                            you are making the payment.  It is also a good idea to keep a record
  6848.                            of the serial number(s) of the cheque(s) you send, so that you can
  6849.                            claim a refund from American Express if the cheques are lost or stolen
  6850.                            in the mail.
  6851.                     
  6852.                        Q.  Is it okay if I upload the shareware versions of one or more of these
  6853.                            utilities to my local bulletin board?  I'm sure there are other users
  6854.                            who would enjoy being able to use them too.
  6855.                     
  6856.                        A.  You are encouraged to upload the shareware versions of these utilities
  6857.                            to any local bulletin board services you may frequent.  If you do so,
  6858.                            however, please note that under the license agreement described
  6859.                            elsewhere in this document, you must upload a COMPLETE and UNMODIFIED
  6860.                            copy of these utilities, INCLUDING this documentation print file.
  6861.                            You are not allowed to upload any versions of this software (existing
  6862.                            as .SAV files) which use other than version 2.0 of the SNORUN
  6863.                            run-time package.  In fact, if you DO upload a copy of this package
  6864.                            to a local bulletin board, and send me proof of having done so (this
  6865.                            might consist of a copy of the "capture" file, or "log", that most
  6866.                            communications programs allow you to record), I will send you in
  6867.                            return a diskette containing the latest version of this manual, and a
  6868.                            registered copy of your choice of any of my programs described herein.
  6869.                            (Please specify which program you wish to receive, and give the name,
  6870.                            access telephone number, and sysop's name and address (if you have it)
  6871.                            for the bulletin board you uploaded to).  (Of course, you don't have
  6872.                            to include any log data which would reveal your password or other
  6873.                            secret information!)  I reserve the right to limit this offer to a
  6874.                            reasonable number of free registered programs per person, or to
  6875.                            withdraw it, if necessary, at any time without prior notice.
  6876.                     
  6877.  
  6878.                                                                                           page 173
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.                        Q.  I've heard a lot of talk about "computer viruses" lately, and I'm not
  6886.                            sure that shareware programs are safe to use.
  6887.                     
  6888.                        A.  Virtually all programs leave their authors "virus free".  Although
  6889.                            the whole issue of computer viruses has thus far been overblown,
  6890.                            there is genuine reason for caution to be exercised.  Of course, once
  6891.                            a program is released, it may pass through many hands before it gets
  6892.                            to you and this means there is at least the opportunity for mischief.
  6893.                            It is safest to use programs acquired directly from their author, or
  6894.                            from a disk vendor or BBS which specifically certifies that the
  6895.                            specific package in question was received DIRECTLY FROM ITS AUTHOR.
  6896.                            This ensures that the software you receive and use is of "known
  6897.                            pedigree".  To minimize your chances of getting "infected" software
  6898.                            from a disk vendor, you should only deal with disk vendors who DO NOT
  6899.                            MODIFY OR ADD TO THE DISKS THEY DISTRIBUTE IN ANY WAY.  If the disk
  6900.                            vendor's system is infected, ANY change or rearranging that they
  6901.                            perform on the author's release package could result in a virus
  6902.                            already present in the disk vendor's system being transferred to the
  6903.                            package in question.  Quality software and packages carefully prepared
  6904.                            by their responsible authors do not need the dubious "improvements"
  6905.                            that some disk vendors try to add.  If you get copies of this or any
  6906.                            other package which contain files clearly NOT part of the author's
  6907.                            original distribution, COMPLAIN TO YOUR SOURCE and tell them you
  6908.                            don't want or need their dubious "improvements".  The closer you can
  6909.                            get to the original author's distribution disk, the safer you are.
  6910.                     
  6911.  
  6912.                                                                                           page 174
  6913.  
  6914.  
  6915.  
  6916.                     
  6917.                     59.  ABOUT SNOBOL4 VERSIONS FOR MS-DOS
  6918.                     
  6919.                        By the time you have read this far through this document, you are perhaps
  6920.                     interested in finding out more about the SNOBOL4 language which has been used
  6921.                     for nearly all the utility programs in this package.  Many users either
  6922.                     haven't ever heard of SNOBOL4, had no idea what it could be useful for, or
  6923.                     did not know that it was available in a version to run on their own
  6924.                     PC-compatible.
  6925.                     
  6926.                     59.1  What Does SNOBOL Stand For?
  6927.                     
  6928.                        The name SNOBOL, which was given to the language after its implementation,
  6929.                     stands for StriNg Oriented symBOlic Language.  The language, although
  6930.                     planned from the beginning for algebraic manipulations, is not really at its
  6931.                     best on heavily numerical computations.  If what you really need to do is
  6932.                     high speed matrix transforms or lots of gaussian quadrature, SNOBOL4 is not
  6933.                     probably the language you should be using.  However, if you are reading or
  6934.                     writing ASCII (or EBCDIC!) files, processing character strings or information
  6935.                     structures, performing conversions or formatting, parsing, matching, or
  6936.                     replacement, then SNOBOL4 is probably the language for you.  It is tremendous
  6937.                     for list processing, and is most likely better than LISP for AI applications.
  6938.                     
  6939.                     59.2  About the SNOBOL4 Language
  6940.                     
  6941.                        The SNOBOL series of languages originated during the 1960s at Bell Labs.
  6942.                     In the beginning, SNOBOL was a rather simple-minded language designed to
  6943.                     perform symbolic algebraic manipulations such as factoring multivariate
  6944.                     polynomials and symbolic integration.  During the next few years, its
  6945.                     capabilities were greatly extended, resulting in SNOBOL4, which was finally
  6946.                     completed in 1969.  SNOBOL4 was implemented in a macro assembly language for
  6947.                     an abstract machine, so that it could more easily be ported to different
  6948.                     processor architectures and instruction sets.  (Contrary to popular belief,
  6949.                     portable programming did not begin with C!  It is interesting to note,
  6950.                     however, that both C and SNOBOL originated at Bell Labs).
  6951.                     
  6952.                        SNOBOL4, with perhaps only the exception of its successor ICON, is today
  6953.                     probably the most powerful and highest-level general-purpose programming
  6954.  
  6955.                                                                                           page 175
  6956.  
  6957.  
  6958.  
  6959.                     language that has become widely available.  The full implementation of SNOBOL4
  6960.                     is sufficiently difficult that only maybe three or four from-scratch
  6961.                     implementations have ever been finished.  The hundreds of different versions
  6962.                     that exist for different machines and diverse operating systems all derive
  6963.                     from one of these few original efforts.  (This also explains their typically
  6964.                     considerable compatibility with each other!)
  6965.                     
  6966.                        It is quite remarkable that progress in hardware has made it possible to
  6967.                     finally port a full-blown implementation of SNOBOL4 onto hardware affordable
  6968.                     by anyone.  Not at all a "micro" language, SNOBOL4 for MS-DOS is fully
  6969.                     equivalent to the mainframe version, with all the mainframe bells and
  6970.                     whistles one could ask for.  (The biggest change, and a welcome one too, is
  6971.                     the elimination of the anachronistic FORTRAN I/O package with which the
  6972.                     original was afflicted.)
  6973.                     
  6974.                        There are many other "interesting" programming languages, including many
  6975.                     which are much better known than SNOBOL4.  However, regarding many of them,
  6976.                     skeptics are well positioned to ask "but what can you really do with the
  6977.                     language?"  SNOBOL4 is unusually rich in its features, extraordinarily
  6978.                     powerful, easy to learn and to use (even for beginners!) and applicable
  6979.                     (as you have seen by the diverse areas covered by these utilities) to a very
  6980.                     wide range of real-world applications.
  6981.                     
  6982.                        To anyone who has thus far been limited in their programming experience
  6983.                     to the primitive "knit-one-purl-two" mentality of traditional so-called
  6984.                     "high-level" programming languages, such as BASIC, PASCAL, C, MODULA-2, or
  6985.                     FORTRAN, it comes as somewhat of a revelation to discover SNOBOL4.
  6986.                     
  6987.                     59.3  Implementations for MS-DOS
  6988.                     
  6989.                        At the moment there seem to be four different implementations of SNOBOL4
  6990.                     that are available for MS-DOS machines.  I have (and have used) all four.
  6991.                     If you are interested in getting a copy of SNOBOL4 for yourself (and I think
  6992.                     it belongs on every PC and compatible), here are my remarks on the different
  6993.                     versions.
  6994.                     
  6995.  
  6996.                                                                                           page 176
  6997.  
  6998.  
  6999.                     59.3.1  Minnesota SNOBOL4.2 by Viktors Berstis
  7000.                     
  7001.                        This version of SNOBOL4 is the closest to the pure, unadorned mainframe
  7002.                     version of SNOBOL4.  It is derived from the macro implementation of SNOBOL4
  7003.                     done at Bell Labs.  Of the three versions of SNOBOL4 for MS-DOS machines,
  7004.                     this one is the only one which directly supports 32-bit integers.  It permits
  7005.                     a very large combined program and data area, over 500K bytes.  It is also
  7006.                     the least expensively priced version available for the PC, other than the
  7007.                     freeware "Vanilla SNOBOL4" from Catspaw (described later).
  7008.                     
  7009.                        The newest version of Minnesota SNOBOL4, which Mr. Berstis refers to as
  7010.                     Minnesota SNOBOL4.2, has a number of improvements and additions, including
  7011.                     support for path names (finally!), new functions including SORT, the
  7012.                     ability to generate "save" files, increased execution speed, and other
  7013.                     enhancements.  He has also added the optional use of Fortran-formatted I/O,
  7014.                     primarily to further augment his compatibility with the original mainframe
  7015.                     implementation of SNOBOL4.  SNOBOL4.2 now supports PEEK() and POKE()
  7016.                     (really!), as well as loadable assembler functions.  It also now provides
  7017.                     (optionally) the automatic expansion and compression of tab characters, as
  7018.                     well as allowing variable-length input records without requiring the
  7019.                     truncation of trailing spaces.
  7020.                     
  7021.                        There are, however, a variety of reasons that Minnesota SNOBOL4.2 is still
  7022.                     not the version of choice, in my opinion.
  7023.                     
  7024.                        First of all, and most importantly, there are still some hassles in the
  7025.                     design of its I/O package.  Even with the new enhancements that have been
  7026.                     made in this area, it is still too complicated, in my opinion, to check
  7027.                     for the existence of a file, and to handle a "file not found" condition.
  7028.                     In the case where a program needs a detailed explanation of just why the
  7029.                     file could not be opened, SNOBOL4.2 apparently shines, but the need for such
  7030.                     information is rare in any case.
  7031.                     
  7032.                        Secondly, Minnesota SNOBOL4 requires an 8087 numeric coprocessor if you
  7033.                     want to do any floating point operations.  If you have only a small amount
  7034.                     of such floating point work to do, it is annoying to be forced to buy a
  7035.                     relatively expensive piece of hardware just for that purpose alone.  (At
  7036.                     least, however, floating point is supported).
  7037.                     
  7038.  
  7039.                                                                                           page 177
  7040.  
  7041.  
  7042.  
  7043.                        Third, Minnesota SNOBOL4 does not include many of the useful language
  7044.                     extensions provided by the other two "main" versions.  These include the very
  7045.                     handy features originally introduced in Macro Spitbol: imbedded assignment,
  7046.                     alternative evaluation, and imbedded pattern matching.  (It is, of course,
  7047.                     only fair to point out that these features are also lacking from Vanilla
  7048.                     SNOBOL4).  These three features, although they sound unimportant, really
  7049.                     do change the character of the SNOBOL4 language considerably and are
  7050.                     extremely useful in the other implementations which support them.
  7051.                     
  7052.                        I certainly applaud the new upgrade to SNOBOL4.2.  This clearly represents
  7053.                     a substantial effort on the part of Mr. Berstis, and is most likely quite
  7054.                     worthwhile.  In some cases, the changes may make SNOBOL4.2 worth another
  7055.                     look.  If you are already using Minnesota SNOBOL4, you certainly could not go
  7056.                     wrong by upgrading to Minnesota SNOBOL4.2.  I personally have now been using
  7057.                     SNOBOL4+ for over a year, however, and have not seen anything sufficiently
  7058.                     interesting in SNOBOL4.2 to justify returning to its use (given its
  7059.                     continuing deficiencies) as a primary development tool.
  7060.                     
  7061.                     59.3.2  Macro SPITBOL by Robert B. K. Dewar
  7062.                     
  7063.                        Macro SPITBOL is in many ways a very interesting version of SNOBOL4.  It
  7064.                     is the only one of those for MS-DOS which does not derive directly from
  7065.                     the Bell Labs macro implementation.  As such, it has a variety of nice
  7066.                     added features, which make it easier to write and debug programs under than
  7067.                     Minnesota SNOBOL4.  Many of the extensions originally provided by SPITBOL
  7068.                     have become "industry standard" for SNOBOL4 systems, and are to be found,
  7069.                     as an example, in Catspaw SNOBOL4+.
  7070.                     
  7071.                        Macro SPITBOL is fast.  Depending upon the language features you use, and
  7072.                     how you use them, I've found its execution speed to be from five to forty
  7073.                     times faster than the other versions.  This makes it especially useful for
  7074.                     production programs or programs whose running time might otherwise be
  7075.                     excessive.  Compilation speed is equally impressive.
  7076.                     
  7077.                        Macro SPITBOL can generate .EXE files.  This means you can distribute the
  7078.                     programs you write in SPITBOL in directly executable form, and the people
  7079.                     you give them to may not even be aware that the program is written originally
  7080.  
  7081.                                                                                           page 178
  7082.  
  7083.  
  7084.                     in the SNOBOL4 language.  (The DVED full-screen editor, in many public-
  7085.                     domain distribution libraries, is an example.  It was written using Macro
  7086.                     SPITBOL.  This helps to explain the positively miraculous way in which the
  7087.                     DVED editor can crank out its own documentation file... and the documentation
  7088.                     file, which comes out of the editor, is by itself bigger than the entire
  7089.                     editor file).  Given the ease of doing so many incredible things in SNOBOL4,
  7090.                     a programmer must use caution lest programming near-miracles performed using
  7091.                     it become expected every time!  There is a minor disadvantage:  the .EXE
  7092.                     files, since they contain the complete runtime system, are individually (as
  7093.                     a rule) quite a bit larger than either the source or .SAV files would be.
  7094.                     
  7095.                        One special consideration pointing to Macro SPITBOL:  it uses the same
  7096.                     Realia Record Manager as Realia COBOL apparently does.  Therefore, if you
  7097.                     use Realia COBOL, and any of its proprietary data file formats, you should
  7098.                     find that your data files will be easily and naturally accessed by Macro
  7099.                     SPITBOL as well, perhaps making it therefore your version of choice.
  7100.                     
  7101.                        Macro SPITBOL, as with all other current SNOBOL4 releases for the PC,
  7102.                     supports path names and subdirectories.
  7103.                     
  7104.                        Unfortunately, there are a variety of problems with Macro SPITBOL too.
  7105.                     Among these are the following:
  7106.                     
  7107.                        There is no floating point whatsoever, whether you have an 8087 or not.
  7108.                     This is a potentially significant problem for some applications since Macro
  7109.                     SPITBOL supports only 16-bit integers.
  7110.                     
  7111.                        Macro SPITBOL uses a small memory model, which limits the size of combined
  7112.                     program and data space to 64K.  Since SNOBOL4 can make such effective use of
  7113.                     large data storage, this is truly a limitation.  This problem, for example,
  7114.                     makes it (unfortunately) impractical to run the SPACE utility under Macro
  7115.                     SPITBOL.
  7116.                     
  7117.                        To save on memory space, run-time error messages consist of a cryptic
  7118.                     three-digit number which requires the manual to decode.  This is doubly
  7119.                     inappropriate now that memory costs so little, and since Macro SPITBOL, with
  7120.                     its small memory model organization, doesn't let you use all that extra
  7121.                     memory for data or program code anyway.  It does, however, help reduce the
  7122.                     size of the .EXE files.
  7123.                     
  7124.  
  7125.                                                                                           page 179
  7126.  
  7127.  
  7128.  
  7129.                        Macro SPITBOL is somewhat buggy.  In particular, there seem to be
  7130.                     problems with the way it handles end-of-record marks on output files (it
  7131.                     doesn't always seem to include the line feed, which causes problems when
  7132.                     its output is directed to the screen).
  7133.                     
  7134.                        Finally, technical support with Macro SPITBOL seems to be nonexistent.
  7135.                     Bugs (as mentioned above) that I've reported have never been fixed, and I've
  7136.                     never even received responses to my letters.  (But then, the first time I
  7137.                     tried to buy the software, my letter was returned by the post office).  Macro
  7138.                     SPITBOL does not seem to be very actively supported.  This is especially
  7139.                     disappointing, since it is the most expensive implementation of the three
  7140.                     MS-DOS versions.  It appears that Macro SPITBOL is a product of the same
  7141.                     people that do REALIA COBOL (which is also an expensive commercial product).
  7142.                     Can anyone report whether their technical support for COBOL is better than
  7143.                     what they provide for Macro SPITBOL?
  7144.                     
  7145.                        I am told that a revision to Macro Spitbol will be released in late 1987
  7146.                     or early 1988, and hopefully it will resolve some of the above problems.  As
  7147.                     of this writing, I have not seen the revision and so must reserve comment.
  7148.                     
  7149.                     59.3.3  Vanilla SNOBOL4 by Mark B. Emmer
  7150.                     
  7151.                        Vanilla SNOBOL4 is a simplified, "freeware" version of Catspaw SNOBOL4+
  7152.                     as described below.  "Freeware" means that you can freely give (complete)
  7153.                     copies of Vanilla SNOBOL4 to anybody you like.  There is no requested
  7154.                     "registration fee" for your continued use of Vanilla SNOBOL4.
  7155.                     
  7156.                        Vanilla SNOBOL4 is primarily being offered to give interested programmers
  7157.                     (and even non-programmers!) a chance to play with and learn this fascinating
  7158.                     language.  It comes with a comprehensive 150+ page User's Guide on the
  7159.                     diskette, with both tutorial and reference sections.  Even if you are not
  7160.                     a programmer, you will most likely find that Vanilla SNOBOL4 is easier to
  7161.                     learn -- and use effectively -- than BASIC, C, Pascal, Modula-2, or other
  7162.                     primitive languages.  The tutorial and user's guide (actually a subset of
  7163.                     the excellent manual which is delivered with SNOBOL4+) is the best-written
  7164.                     SNOBOL4 tutorial I've yet seen, which makes the package worth getting even
  7165.                     if you end up using something else.
  7166.                     
  7167.  
  7168.                                                                                           page 180
  7169.  
  7170.  
  7171.                        This version is great for things like simple file conversion programs
  7172.                     and the like.  Many users will probably find that this version does most
  7173.                     of what they need to do with SNOBOL4, and you can't beat the price.
  7174.                     
  7175.                        This version is basically similar to SNOBOL4+, but with a feature set
  7176.                     closer to that of Minnesota SNOBOL4.  Program and data space is limited to
  7177.                     30K (even smaller than SPITBOL's).  Integers are 16-bits, and real
  7178.                     (fractional) numbers are not supported.  SPITBOL extended operators are not
  7179.                     included.  There is no support for random-access or binary files, no
  7180.                     ability to generate .SAV object files, and no built-in SORT function.
  7181.                     Likewise, loadable assembler functions are not supported.
  7182.                     
  7183.                        So what is included?  Basically all of "green book" (classic) SNOBOL4,
  7184.                     except for LOAD/UNLOAD, BACKSPACE, (thankfully) Fortran I/O, 32-bit
  7185.                     integers and real numbers.
  7186.                     
  7187.                        Paths and subdirectories in file names are included.  Execution speed is
  7188.                     generally comparable to SNOBOL4+.  Vanilla SNOBOL4 does not require PC
  7189.                     compatibility, which should be very good news indeed for users of non-PC-
  7190.                     compatible MS-DOS machines.  Vanilla SNOBOL, like SNOBOL4+, comes with a
  7191.                     sizeable collection of sample source programs to get you started.
  7192.                     
  7193.                        The 30K limitation is not necessarily a serious problem, for most users,
  7194.                     since many SNOBOL4 programs tend to be quite small anyway.  (It does, of
  7195.                     course, affect you if you need large arrays or tables).  The major advantage
  7196.                     of this version is its availability and its price:  anyone who has it can
  7197.                     give you a copy, and it costs you nothing to try it out.  Any programs you
  7198.                     write with it will upgrade easily to SNOBOL4+ when you decide you're ready
  7199.                     for the more advanced features.  Meanwhile, you get a tool you'll be able
  7200.                     to use to whip out amazing things, and quickly.  You risk nothing other than
  7201.                     addiction!  (However, that, it must be said, is a very real risk indeed!).
  7202.                     
  7203.                        The main nice things about there being a completely freeware version of
  7204.                     SNOBOL4 are that:
  7205.                     
  7206.                        1)  If you are a consultant, you can give the complete system to your
  7207.                     clients, along with your own source programs, which they will therefore be
  7208.                     be able to make minor changes to and recompile if needed, and completely
  7209.                     without language royalties or licensing hassles;
  7210.                     
  7211.  
  7212.                                                                                           page 181
  7213.  
  7214.  
  7215.                        2)  You can share your SNOBOL4 programs with your friends, in source form,
  7216.                     so they can actually see how fiendishly clever you really are;
  7217.                     
  7218.                        3)  If you're just interested in learning SNOBOL4, or even just in
  7219.                     learning something about how to program, you can get a copy of Vanilla
  7220.                     SNOBOL4, with its over 150 pages of first-class documentation on the disk,
  7221.                     for essentially free.  You are encouraged to give copies to your friends
  7222.                     at work, school, the country club or your computer club.  Whatever.  (If
  7223.                     you give a copy to the folks at your local computer store, you might just
  7224.                     be able to convince them to carry SNOBOL4+!).
  7225.                     
  7226.                     59.3.4  Catspaw SNOBOL4+ by Mark B. Emmer
  7227.                     
  7228.                        Catspaw SNOBOL4+, like Minnesota SNOBOL4, originated from Bell Labs' macro
  7229.                     implementation of SNOBOL4.  However, SNOBOL4+ has been very well adapted to
  7230.                     the MS-DOS environment.  It has been significantly extended, and includes
  7231.                     most of the language extensions and features found in Macro SPITBOL, both
  7232.                     in terms of additional built-in functions and additional language operators
  7233.                     and constructs.
  7234.                     
  7235.                        SNOBOL4+ fully supports path names and subdirectories.
  7236.                     
  7237.                        The speed of SNOBOL4+, while substantially slower than Macro SPITBOL, is
  7238.                     thirty to fifty percent faster than Minnesota SNOBOL4.  (I have not run
  7239.                     significant benchmarks as yet using Minnesota SNOBOL4.2, which is supposed
  7240.                     to be faster than its previous version).
  7241.                     
  7242.                        SNOBOL4+ permits very large program and data area, up to a combined total
  7243.                     of around 300K bytes.  This is in addition to SNOBOL4+ and MS-DOS's own
  7244.                     code requirements, meaning that SNOBOL4+ can effectively use most of the
  7245.                     memory available in even a 640K processor, especially if you have some
  7246.                     memory-resident spoolers or whatever running concurrently.
  7247.                     
  7248.                        SNOBOL4+ supports only 16-bit integers, but supports floating point
  7249.                     with or without the presence of an 8087 (it uses the 8087 if present).
  7250.                     The available precision allows up to 15 decimal digits of precision in
  7251.                     floating point numbers, if necessary, largely alleviating any problems of
  7252.                     16-bit integer size.  A special option allows integers to automatically be
  7253.                     converted to real upon overflow.
  7254.                     
  7255.  
  7256.                                                                                           page 182
  7257.  
  7258.  
  7259.  
  7260.                        SNOBOL4+ will generally run fine even on non-100%-compatibles.  If your
  7261.                     machine runs any version of MS-DOS or PC-DOS, it will probably run Catspaw
  7262.                     SNOBOL4+ without any problems, even if you have had difficulties running
  7263.                     other software designed for PC-compatibles.
  7264.                     
  7265.                        SNOBOL4+ can generate .SAV files which run under a public-domain runtime
  7266.                     package (SNORUN.EXE, distributed with these utilities).  The .SAV files
  7267.                     cannot be readily turned back into source code, so distributed software
  7268.                     can be protected.  The resulting programs (in .SAV file format) can be sold
  7269.                     or distributed without royalty or other licensing hassles.
  7270.                     
  7271.                        SNOBOL4+ can handle binary files, meaning that it is not limited to
  7272.                     handling purely text files.  Its files can contain any characters, including
  7273.                     binary zeros or anything else.
  7274.                     
  7275.                        SNOBOL4+ allows executing of any DOS commands as a subroutine.  This
  7276.                     permits the writing of "smart" supervisors, which can intelligently control
  7277.                     a "batch file" of other programs.
  7278.                     
  7279.                        Input and Output files may be piped or redirected using standard MS-DOS
  7280.                     techniques, permitting the writing of "filters" using SNOBOL4+.  For those
  7281.                     with more intensive data file problems (which require access to ISAM files,
  7282.                     for example) an interface to the well-regarded BTRIEVE file management
  7283.                     package is available for SNOBOL4+.
  7284.                     
  7285.                        SNOBOL4+ permits access to MS-DOS environment strings.
  7286.                     
  7287.                        Another exciting feature is a highly unusual, remarkable and intriguing
  7288.                     "fuzzy match" capability, implemented with the aid of special hardware
  7289.                     support (the board is optional at extra cost).
  7290.                     
  7291.                        SNOBOL4+ is under active development and nearly constant improvement, by
  7292.                     its author, Mark B. Emmer, who derives his entire income from SNOBOL4+ and
  7293.                     related products.  This means that technical support is outstanding, his
  7294.                     commitment is total, and any bugs that have turned up are fixed immediately.
  7295.                     The current version is exceedingly robust and as bug-free as almost anything
  7296.                     I've ever used.
  7297.                     
  7298.  
  7299.                                                                                           page 183
  7300.  
  7301.  
  7302.  
  7303.                        SNOBOL4+ comes with an extremely fine tutorial and reference manual, and
  7304.                     a very large collection of something like sixty demonstration and example
  7305.                     programs and utility subroutines.  These cover a very wide range, but include
  7306.                     a set of basic windowing routines and a routine which gives access to nearly
  7307.                     any MS-DOS function desired.  Assembly language routines for other functions
  7308.                     may be loaded dynamically at run-time and may be included in the .SAV files
  7309.                     created for distribution.  (My DIRTREE utility, for example, as included in
  7310.                     this set, contains an assembler-language module I use to access the disk
  7311.                     directory entries).
  7312.                     
  7313.                        In addition to SNOBOL4+, Catspaw distributes a number of other good items
  7314.                     of interest to SNOBOL4 programmers, including books and other material.  They
  7315.                     have even gone to the trouble to have one of the classic (and remarkable!)
  7316.                     SNOBOL4 books, "Algorithms in SNOBOL4," by Gimpel, reprinted (it has been out
  7317.                     of print for several years).  They also sell ICON material (ICON is a
  7318.                     descendant language of SNOBOL4, also developed by Ralph E. Griswold, one of
  7319.                     the original developers of SNOBOL).  Catspaw even has SNOBOL4+ and ICON
  7320.                     T-shirts!
  7321.                     
  7322.                        Of course, Catspaw is also the source for Vanilla SNOBOL4, described
  7323.                     earlier.
  7324.                     
  7325.                        Recent additions to the Catspaw stable of "power tools for programming"
  7326.                     include a 68000/UNIX version of Macro Spitbol, (presumably without the
  7327.                     frustrating bugs which afflict MS-DOS Macro Spitbol's file system), and a
  7328.                     Macintosh version (expected in Fall 1987).  Atari and Amiga versions are
  7329.                     expected to follow.
  7330.                     
  7331.                        Catspaw SNOBOL4+ is definitely on the leading edge, the emerging SNOBOL4
  7332.                     standard-setter for MS-DOS.
  7333.                     
  7334.                     59.4  Recommendation
  7335.                     
  7336.                        Anyone who has had a PC or compatible for any length of time either has
  7337.                     encountered (or will) a case where they need to make some changes to a text
  7338.                     file, (which might be data, a program, a batch file, a "make" file, or
  7339.                     anything like that) and where those changes are too complicated to do
  7340.  
  7341.                                                                                           page 184
  7342.  
  7343.  
  7344.  
  7345.                     automatically with their editor's "Search and Replace" function.  These are
  7346.                     the frustrating times when you look at the problem, and think, "I really
  7347.                     ought to write a program to do this," but end up spending several tedious
  7348.                     hours with the editor, making the change manually, instead.  Having a good
  7349.                     version of SNOBOL4 at your disposal will go a long way to making these
  7350.                     painful manual editing sessions a thing of the past.  It would be hard to
  7351.                     imagine a more useful and powerful tool for general-purpose file manipulation.
  7352.                     It is truly hard to imagine how I got along without it.
  7353.                     
  7354.                        Now that you've decided that you, too, need to have SNOBOL4, which one
  7355.                     to buy?
  7356.                     
  7357.                        I bought, and have used, all four of the implementations I've reviewed
  7358.                     above.  The Minnesota SNOBOL4, by Viktors Berstis, is certainly usable but
  7359.                     its numerous faults, despite its low cost, prevent me from recommending it.
  7360.                     It, in all fairness, would be a terrific product in the absence of the better
  7361.                     ones being available.
  7362.                     
  7363.                        Vanilla SNOBOL4 is a mixed bag.  It doesn't have all the nice support
  7364.                     features of SNOBOL4+, but is a great low-risk way to decide if you like the
  7365.                     kind of features that SNOBOL4 has to offer.  Even if you want to spend little
  7366.                     or no money, it's hard not to imagine Vanilla SNOBOL4, at least, being worth
  7367.                     having.  If you are a teacher, the advanced features you can teach with
  7368.                     SNOBOL4 (including trees, lists and recursion), along with the freely
  7369.                     reproducible manual and the lack of royalties or licensing, regardless of
  7370.                     how many machines your school has, are a relief for tight budgets.
  7371.                     
  7372.                        Catspaw SNOBOL4+, by Mark B. Emmer, is definitely the class act among the
  7373.                     four versions I've used.  It is solid, well-suited to MS-DOS use, and very
  7374.                     capable.  It is very well supported, and comes with first-class documentation.
  7375.                     His included tutorial is usable by anyone familiar with programming concepts:
  7376.                     if you can write simple programs in BASIC, you can learn to use SNOBOL4+.
  7377.                     This version is highly recommended.  (Note:  make sure you get version 2.0 or
  7378.                     above.  Earlier versions did not have path support or provision for .SAV
  7379.                     files).  If you have a PC or compatible and do anything with it, you should
  7380.                     have SNOBOL4+ in your toolbox.  SNOBOL4+ lists, in the United States, for
  7381.                     around $100.
  7382.                     
  7383.  
  7384.                                                                                           page 185
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.                        Macro SPITBOL, by Robert B. K. Dewar, is a mixed blessing.  Its speed is
  7392.                     certainly nice.  It is expensive, however;  it costs around $200.  Technical
  7393.                     support is spotty at best, which would be less serious if the product were
  7394.                     less buggy.  When Macro SPITBOL programs work, (and with some tinkering,
  7395.                     they can usually be made to work) they generally work extremely well.  The
  7396.                     speed increase, for programs that fit within its limited program and data
  7397.                     space, is exhilarating.  But, not all programs will port gracefully to
  7398.                     Macro SPITBOL.
  7399.                     
  7400.                        My recommendation is Catspaw SNOBOL4+.  This offers a tremendous balance
  7401.                     of power, features, reliability, support, and a reasonable price.  Once
  7402.                     you buy SNOBOL4+, and use it for a while, you might be ready to experiment
  7403.                     with Macro SPITBOL.  If you end up using SNOBOL4+ a lot, it would probably
  7404.                     be worth your time and money invested in a copy of Macro SPITBOL as well.
  7405.                     But, don't expect a lot of hand-holding, or expect Macro SPITBOL to
  7406.                     completely replace Catspaw SNOBOL4+ for you.  It probably won't.
  7407.                     
  7408.                        If you can't get your friendly local computer dealer to get SNOBOL4+ for
  7409.                     you, join the club.  It's amazing how many unenlightened dealers seem content
  7410.                     to try to constrain their customers to "stone-age" software tools ("...but
  7411.                     everyone else seems to like 'xxxx'."  GRRRR!).  I will be glad to get a
  7412.                     copy of SNOBOL4+ to you.  Please write for my current price list.
  7413.                     
  7414.  
  7415.                                                                                           page 186
  7416.  
  7417.  
  7418.  
  7419.  
  7420.                     
  7421.                     60.  LEGALITIES
  7422.                     
  7423.                         This chapter covers some of those legalities that always seem to appear
  7424.                     in software documentation:
  7425.                     
  7426.                     60.1  License to Distribute
  7427.                     
  7428.                         Basically, anyone having the shareware copy of this package is
  7429.                     encouraged to give away complete and unmodified copies to their friends
  7430.                     and business associates.  The registered copy uses a different version
  7431.                     of the SNOBOL4+ runtime package and is not to be given out, to avoid
  7432.                     confusion.
  7433.                     
  7434.                         For the complete details on permission being granted to redistribute
  7435.                     this product, please see the license agreement found towards the beginning
  7436.                     of this document.
  7437.                     
  7438.                     60.2  Disclaimer of Liability
  7439.                     
  7440.                         In consideration of the vagaries of shareware distribution and the low
  7441.                     price of these utilities, the author disclaims any and all responsibility
  7442.                     for damages resulting from their use, or inability to use, and/or for any
  7443.                     other reason whatsoever.  The author has used each of these utilities and
  7444.                     believes each one to operate reliably as described in this document, (and
  7445.                     would sincerely appreciate that any problems encountered be reported to him)
  7446.                     but the sole responsibility for the selection and use of these utilities
  7447.                     must rest with the user.
  7448.                     
  7449.                         In particular, one should never modify or overwrite any critical file
  7450.                     unless it has been backed up somewhere.  This precaution is for your own
  7451.                     protection, and is always a good habit to get into with any software product.
  7452.                     
  7453.  
  7454.                                                                                           page 187
  7455.  
  7456.  
  7457.  
  7458.                     60.3  Trademark and Product Acknowledgements
  7459.                     
  7460.                         This section acknowledges the names and trademarks of various companies
  7461.                     as mentioned in assorted places throughout this document.
  7462.                     
  7463.                     AMIGA is a trademark of Commodore International.
  7464.                     
  7465.                     AMPEX is a trademark of Ampex Corporation.
  7466.                     
  7467.                     ARC, MSCRIBE and DATAPOINT are trademarks of Datapoint Corporation.
  7468.                     
  7469.                     BITCOM is a product of BIT Software, Inc.
  7470.                     
  7471.                     BTRIEVE is a product of Softcraft, Inc., a Novell Company.
  7472.                     
  7473.                     C, SNOBOL, SNOBOL4, and UNIX are trademarks and/or products of AT&T.
  7474.                     
  7475.                     COMPUSERVE and EMAIL are products and/or services of CompuServe Information
  7476.                     Services, Inc.
  7477.                     
  7478.                     CREF, MASM, MICROSOFT, MS-DOS, MS/DOS, SYMDEB and MICROSOFT WORD refer to
  7479.                     trademarks and/or products of Microsoft Corporation.
  7480.                     
  7481.                     DBASE III is a trademark of Ashton-Tate.
  7482.                     
  7483.                     DBS-KAT is a product of Applied Foresight, Inc.
  7484.                     
  7485.                     DRVSPKR and SPACE are products of Noah Systems.
  7486.                     
  7487.                     DVED and SPITBOL are trademarks and/or products of Dewar Information Systems.
  7488.                     
  7489.                     ICON is a product of the University of Arizona.
  7490.                     
  7491.                     Macintosh is a product of Apple Computers, Inc.
  7492.                     
  7493.                     MINNESOTA SNOBOL4 is a product of Berstis International.
  7494.                     
  7495.  
  7496.                                                                                           page 188
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.                     PC, XT, AT, PL/1, and IBM are trademarks and/or products of International
  7505.                     Business Machines Corporation.
  7506.                     
  7507.                     PC-TOOLS is a product of Central Point Software, Inc.
  7508.                     
  7509.                     PIANOMAN and PLAYRPNO are products of Neil Rubenking.
  7510.                     
  7511.                     PKARC and PKXARC are products of PKWARE, Inc.
  7512.                     
  7513.                     REALIA COBOL is a product of Realia Corporation.
  7514.                     
  7515.                     SIDEKICK, SUPERKEY are trademarks and/or products of Borland International.
  7516.                     
  7517.                     SNOBOL4+ is a product of Catspaw, Inc.
  7518.                     
  7519.                     WORDSTAR and WORDSTAR 2000 are trademarks and/or products of MicroPro
  7520.                     International Corporation.
  7521.                     
  7522.                     POSTSCRIPT and VELOBIND are also trademarks of their respective owning
  7523.                     corporations.
  7524.                     
  7525.  
  7526.                                                                                           page 189
  7527.  
  7528.  
  7529.  
  7530.                     
  7531.                     61.  MACRO SPITBOL ERROR CODE NUMBERS
  7532.                     
  7533.                        Those SNOBOL4 programs contained within this package in the form of .EXE
  7534.                     files (DIFFER.EXE, for example, but not of course SNORUN.EXE) produce
  7535.                     error numbers rather than complete error messages.  This decision, though
  7536.                     regrettable, is understandable in light of the desire to reduce the size
  7537.                     of the .EXE files produced by Macro SPITBOL.
  7538.                     
  7539.                        If you should happen to receive one of these numbered error codes, you
  7540.                     will find the following table handy.  For each possible error code number,
  7541.                     it lists the matching error message.  Most of these error messages are
  7542.                     unlikely to turn up, and are more applicable to compile-time problems, but
  7543.                     are listed here regardless for the sake of completeness.
  7544.                     
  7545.                       1  Addition left operand is not numeric
  7546.                       2  Addition right operand is not numeric
  7547.                       3  Addition caused integer overflow
  7548.                       4  Affirmation operand is not numeric
  7549.                       5  Alternation right operand is not pattern
  7550.                       6  Alternation left operand is not pattern
  7551.                       7  Compilation error encountered during execution
  7552.                       8  Concatenation left opnd is not string or pattern
  7553.                       9  Concatenation right opnd is not string or pattern
  7554.                      10  Complementation operand is not numeric
  7555.                      11  Complementation caused integer overflow
  7556.                      12  Division left operand is not numeric
  7557.                      13  Division right operand is not numeric
  7558.                      14  Division caused integer overflow
  7559.                      15  Exponentiation right operand is not numeric
  7560.                      16  Exponentiation left operand is not numeric
  7561.                      17  Exponentiation caused integer overflow
  7562.                      18  Exponentiation result is undefined
  7563.                      19  Exponentiation right operand is negative
  7564.                      20  Goto evaluation failure
  7565.                      21  Function called by name returned a value
  7566.                      22  Undefined function called
  7567.  
  7568.                                                                                           page 190
  7569.  
  7570.  
  7571.  
  7572.                      23  Goto operand is not a natural variable
  7573.                      24  Goto operand in direct goto is not code
  7574.                      25  Immediate assignment left operand is not pattern
  7575.                      26  Multiplication left operand is not numeric
  7576.                      27  Multiplication right operand is not numeric
  7577.                      28  Multiplication caused integer overflow
  7578.                      29  Undefined operator referenced
  7579.                      30  Pattern assignment left operand is not pattern
  7580.                      31  Pattern assignment right operand is not string
  7581.                      32  Subtraction left operand is not numeric
  7582.                      33  Subtraction right operand is not numeric
  7583.                      34  Subtraction caused integer overflow
  7584.                      35  Unexpected failure in -NOFAIL mode
  7585.                      36  Goto abort with no preceding error
  7586.                      37  Goto continue with no preceding error
  7587.                      38  Goto undefined label
  7588.                      39  External function argument is not string
  7589.                      40  External function argument is not integer
  7590.                      41  Field function argument is wrong datatype
  7591.                      42  Attempt to change value of protected variable
  7592.                      43  ANY evaluated argument is not string
  7593.                      44  BREAK evaluated argument is not string
  7594.                      45  BREAKX evaluated argument is not string
  7595.                      46  Expression does not evaluate to pattern
  7596.                      47  LEN evaluated argument is not integer
  7597.                      48  LEN evaluated argument is negative or too large
  7598.                      49  NOTANY evaluated argument is not string
  7599.                      50  POS evaluated argument is not integer
  7600.                      51  POS evaluated argument is negative or too large
  7601.                      52  RPOS evaluated argument is not integer
  7602.                      53  RPOS evaluated argument is negative or too large
  7603.                      54  RTAB evaluated argument is not integer
  7604.                      55  RTAB evaluated argument is negative or too large
  7605.                      56  SPAN evaluated argument is not string
  7606.                      57  TAB evaluated argument is not integer
  7607.                      58  TAB evaluated argument is negative or too large
  7608.                      59  ANY argument is not string or expression
  7609.  
  7610.                                                                                           page 191
  7611.  
  7612.  
  7613.  
  7614.                      60  APPLY first arg is not natural variable name
  7615.                      61  ARBNO argument is not pattern
  7616.                      62  ARG second argument is not integer
  7617.                      63  ARG first argument is not program function name
  7618.                      64  ARRAY first argument is not integer or string
  7619.                      65  ARRAY first argument lower bound is not integer
  7620.                      66  ARRAY first argument upper bound is not integer
  7621.                      67  ARRAY dimension is zero, negative or out of range
  7622.                      68  ARRAY size exceeds maximum permitted
  7623.                      69  BREAK argument is not string or expression
  7624.                      70  BREAKX argument is not string or expression
  7625.                      71  CLEAR argument is not string
  7626.                      72  CLEAR argument has null variable name
  7627.                      73  COLLECT argument is not integer
  7628.                      74  CONVERT second argument is not string
  7629.                      75  DATA argument is not string
  7630.                      76  DATA argument is null
  7631.                      77  DATA argument is missing a left paren
  7632.                      78  DATA argument has null datatype name
  7633.                      79  DATA argument is missing a right paren
  7634.                      80  DATA argument has null field name
  7635.                      81  DEFINE first argument is not string
  7636.                      82  DEFINE first argument is null
  7637.                      83  DEFINE first argument is missing a left paren
  7638.                      84  DEFINE first argument has null function name
  7639.                      85  Null arg name or missing ) in DEFINE first arg.
  7640.                      86  DEFINE function entry point is not defined label
  7641.                      87  DETACH argument is not appropriate name
  7642.                      88  DUMP argument is not integer
  7643.                      89  DUMP argument is negative or too large
  7644.                      90  DUPL second argument is not integer
  7645.                      91  DUPL first argument is not string or pattern
  7646.                      92  EJECT argument is not a suitable name
  7647.                      93  EJECT file does not exist
  7648.                      94  EJECT file does not permit page eject
  7649.                      95  EJECT caused non-recoverable output error
  7650.                      96  ENDFILE argument is not a suitable name
  7651.  
  7652.                                                                                           page 192
  7653.  
  7654.  
  7655.  
  7656.                      97  ENDFILE argument is null
  7657.                      98  ENDFILE file does not exist
  7658.                      99  ENDFILE file does not permit endfile
  7659.                     100  ENDFILE caused non-recoverable output error
  7660.                     101  EQ first argument is not numeric
  7661.                     102  EQ second argument is not numeric
  7662.                     103  EVAL argument is not expression
  7663.                     104  EXIT argument is not suitable integer or string
  7664.                     105  EXIT action not available in this implementation
  7665.                     106  EXIT action caused irrecoverable error
  7666.                     107  FIELD second argument is not integer
  7667.                     108  FIELD first argument is not datatype name
  7668.                     109  GE first argument is not numeric
  7669.                     110  GE second argument is not numeric
  7670.                     111  GT first argument is not numeric
  7671.                     112  GT second argument is not numeric
  7672.                     113  INPUT third argument is not a string
  7673.                     114  Inappropriate second argument for INPUT
  7674.                     115  Inappropriate first argument for INPUT
  7675.                     116  Inappropriate file specification for INPUT
  7676.                     117  Input file cannot be read
  7677.                     118  LE first argument is not numeric
  7678.                     119  LE second argument is not numeric
  7679.                     120  LEN argument is not integer or expression
  7680.                     121  LEN argument is negative or too large
  7681.                     122  LEQ first argument is not string
  7682.                     123  LEQ second argument is not string
  7683.                     124  LGE first argument is not string
  7684.                     125  LGE second argument is not string
  7685.                     126  LGT first argument is not string
  7686.                     127  LGT second argument is not string
  7687.                     128  LLE first argument is not string
  7688.                     129  LLE second argument is not string
  7689.                     130  LLT first argument is not string
  7690.                     131  LLT second argument is not string
  7691.                     132  LNE first argument is not string
  7692.                     133  LNE second argument is not string
  7693.  
  7694.                                                                                           page 193
  7695.  
  7696.  
  7697.  
  7698.                     134  LOCAL second argument is not integer
  7699.                     135  LOCAL second argument is not a program function name
  7700.                     136  LOAD second argument is not string
  7701.                     137  LOAD first argument is not string
  7702.                     138  LOAD first argument is null
  7703.                     139  LOAD first argument is missing a left paren
  7704.                     140  LOAD first argument has null function name
  7705.                     141  LOAD first argument is missing a right paren
  7706.                     142  LOAD function does not exist
  7707.                     143  LOAD function caused input error during load
  7708.                     144  LPAD third agument not a string
  7709.                     145  LPAD second argument is not integer
  7710.                     146  LPAD first argument is not string
  7711.                     147  LT first argument is not numeric
  7712.                     148  LT second argument is not numeric
  7713.                     149  NE first argument is not numeric
  7714.                     150  NE second argument is not numeric
  7715.                     151  NOTANY argument is not string or expression
  7716.                     152  OPSYN third argument is not integer
  7717.                     153  OPSYN third argument is negative or too large
  7718.                     154  OPSYN second argument is not natural variable name
  7719.                     155  OPSYN first argument is not natural variable name
  7720.                     156  OPSYN first argument is not correct operator name
  7721.                     157  OUTPUT third argument is not a string
  7722.                     158  Inappropriate second argument for OUTPUT
  7723.                     159  Inappropriate first argument for OUTPUT
  7724.                     160  Inappropriate file specification for OUTPUT
  7725.                     161  Output file cannot be written to
  7726.                     162  POS argument is not integer or expression
  7727.                     163  POS argument is negative or too large
  7728.                     164  PROTOTYPE argument is not valid object
  7729.                     165  REMDR second argument is not integer
  7730.                     166  REMDR first argument is not integer
  7731.                     167  REMDR caused integer overflow
  7732.                     168  REPLACE third argument is not a string
  7733.                     169  REPLACE second argument is not string
  7734.                     170  REPLACE first argument is not string
  7735.  
  7736.                                                                                           page 194
  7737.  
  7738.  
  7739.  
  7740.                     171  Null or unequally long 2nd, 3rd args to REPLACE
  7741.                     172  REWIND argument is not a suitable name
  7742.                     173  REWIND argument is null
  7743.                     174  REWIND file does not exist
  7744.                     175  REWIND file does not permit rewind
  7745.                     176  REWIND caused non-recoverable error
  7746.                     177  REVERSE argument is not string
  7747.                     178  RPAD third argument is not string
  7748.                     179  RPAD second argument is not integer
  7749.                     180  RPAD first argument is not string
  7750.                     181  RTAB argument is not integer or expression
  7751.                     182  RTAB argument is negative or too large
  7752.                     183  TAB argument is not integer or expression
  7753.                     184  TAB argument is negative or too large
  7754.                     185  RPOS argument is not integer or expression
  7755.                     186  RPOS argument is negative or too large
  7756.                     187  SETEXIT argument is not label name or null
  7757.                     188  SPAN argument is not string or expression
  7758.                     189  SIZE argument is not string
  7759.                     190  STOPTR first argument is not appropriate name
  7760.                     191  STOPTR second argument is not trace type
  7761.                     192  SUBSTR third argument is not integer
  7762.                     193  SUBSTR second argument is not integer
  7763.                     194  SUBSTR first argument is not string
  7764.                     195  TABLE argument is not integer
  7765.                     196  TABLE argument is out of range
  7766.                     197  TRACE fourth argument is not function name or null
  7767.                     198  TRACE first argument is not appropriate name
  7768.                     199  TRACE second argument is not trace type
  7769.                     200  TRIM argument is not string
  7770.                     201  UNLOAD argument is not natural variable name
  7771.                     202  Input from file caused non-recoverable error
  7772.                     203  Input file record has incorrect format
  7773.                     204  Memory overflow
  7774.                     205  String length exceeds value of MAXLNGTH keyword
  7775.                     206  Output caused file overflow
  7776.                     207  Output caused non-recoverable error
  7777.  
  7778.                                                                                           page 195
  7779.  
  7780.  
  7781.  
  7782.                     208  Keyword value assigned is not integer
  7783.                     209  Keyword in assignment is protected
  7784.                     210  Keyword value assigned is negative or too large
  7785.                     211  Value assigned to keyword ERRTEXT not a string
  7786.                     212  Syntax error.  Value used where name is required.
  7787.                     213  Syntax error.  Statement is too complicated.
  7788.                     214  Bad label or misplaced continuation line.
  7789.                     215  Syntax error.  Undefined or erroneous entry label
  7790.                     216  Syntax error.  Missing end line
  7791.                     217  Syntax error.  Duplicate label
  7792.                     218  Syntax error.  Duplicated goto field
  7793.                     219  Syntax error.  Empty goto field
  7794.                     220  Syntax error.  Missing operator
  7795.                     221  Syntax error.  Missing operand
  7796.                     222  Syntax error.  Invalid use of left bracket
  7797.                     223  Syntax error.  Invalid use of comma
  7798.                     224  Syntax error.  Unbalanced right parenthesis
  7799.                     225  Syntax error.  Unbalanced right bracket
  7800.                     226  Syntax error.  Missing right paren
  7801.                     227  Syntax error.  Right paren missing from goto
  7802.                     228  Syntax error.  Right bracket missing from goto
  7803.                     229  Syntax error.  Missing right array bracket
  7804.                     230  Syntax error.  Illegal character
  7805.                     231  Syntax error.  Invalid numeric item
  7806.                     232  Syntax error.  Unmatched string quote
  7807.                     233  Syntax error.  Invalid use of operator
  7808.                     234  Syntax error.  Goto field incorrect
  7809.                     235  Subscripted operand is not table or array
  7810.                     236  Array referenced with wrong number of subscripts
  7811.                     237  Table referenced with more than one subscript
  7812.                     238  Array subscript is not integer
  7813.                     239  Indirection operand is not name
  7814.                     240  Pattern match right operand is not pattern
  7815.                     241  Pattern match left operand is not string
  7816.                     242  Pattern return from level zero
  7817.                     243  Function result in NRETURN is not name
  7818.                     244  Statement count exceeds value of STLIMIT keyword
  7819.  
  7820.                                                                                           page 196
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.                     245  Translation/execution time expired
  7827.                     246  Stack overflow
  7828.                     247  Invalid control line
  7829.                     248  Attempted redefinition of system function
  7830.                     249  Expression evaluated by name returned value
  7831.                     250  Insufficient memory to complete dump
  7832.                     251  Keyword operand is not name of defined keyword
  7833.                     252  Error on printing to interactive channel
  7834.                     253  Print limit exceeded on standard output channel
  7835.                     254  Erroneous argument for HOST
  7836.                     255  Error during execution of HOST
  7837.                     256  SORT/RSORT 1st arg not suitable ARRAY or TABLE
  7838.                     257  Erroneous 2nd arg in SORT/RSORT of vector
  7839.                     258  SORT/RSORT 2nd arg out of range or non-integer
  7840.                     259  FENCE argument is not pattern
  7841.                     281  CHAR argument not integer
  7842.                     282  CHAR argument not in range
  7843.                     291  SET first argument is not a suitable name
  7844.                     292  SET first argument is null
  7845.                     293  Inappropriate second argument to SET
  7846.                     294  Inappropriate third argument to SET
  7847.                     295  SET file does not exist
  7848.                     296  SET file does not permit setting file pointer
  7849.                     297  SET caused non-recoverable I/O error
  7850.                     298  External function argument is not file
  7851.                     299  Internal logic error (unexpected PPM branch)
  7852.                     
  7853.  
  7854.                                                                                           page 197
  7855.  
  7856.  
  7857.                     
  7858.                     62.  ABOUT THE AUTHOR
  7859.                     
  7860.                        I think it is important for those of us in the computing profession to
  7861.                     get to know each other.  Just as "ShareWare" software can help to extend the
  7862.                     reach of the programs we write, hopefully this concept will help to extend
  7863.                     our interpersonal network of contacts as well.  It is not necessary that
  7864.                     software authors be condemned to a life of anonymity!  I encourage other
  7865.                     authors of "ShareWare" products to further this personal and professional
  7866.                     networking by telling us about themselves as well.
  7867.                     
  7868.                        The utility programs in this package have been written during 1986, 1987
  7869.                     and 1988 by Gordon E. Peterson II (except as noted, when they have been
  7870.                     adapted from the works of other, sometimes anonymous, authors.  Thanks to
  7871.                     all!).  They represent some of the results on ongoing development efforts in
  7872.                     many diverse areas.
  7873.                     
  7874.                        I have been writing computer system software in assembly language since
  7875.                     about 1970, starting as a Computer Science major at the University of
  7876.                     Illinois in Champaign-Urbana.  This was my first exposure to IBM equipment,
  7877.                     learning on their 360/75 system (a BIG computer at the time, with a million
  7878.                     bytes of main memory and two megabytes more of slow Ampex bulk core memory.
  7879.                     It is astonishing to realize that I have nearly that much memory, and much
  7880.                     faster too, on the machine on the table in front of me).  This is also when
  7881.                     I got my first exposure to PL/1, and SNOBOL4.  Along with many interesting
  7882.                     PL/1 programs, (some quite large!), I also wrote a very good SPITBOL program
  7883.                     to convert Fortran source programs to PL/1.
  7884.                     
  7885.                        During a little over nine years after getting my degree, I worked in
  7886.                     Advanced Product Development at Datapoint Corporation.
  7887.                     
  7888.                        On the off chance that you might be familiar with Datapoint, I was the
  7889.                     developer of the "Dot-Series" disk operating systems there, being responsible
  7890.                     for DOS.A, DOS.B, DOS.C, DOS.D, and DOS.E.  I was the author of their
  7891.                     high-speed disk BACKUP and COPY programs, the REFORMAT utility, and their
  7892.                     DUMP utility, among others.  I wrote their Multi-Partition Virtual Machine
  7893.                     facility, called PS (for Partition Supervisor), and their high-performance
  7894.                     print unspooler (called UNSPOOL).  My most notable software product I created
  7895.                     there was the DOS ARC System, which was the world's first commercially
  7896.                     successful local area network.  This product eventually sold over a billion
  7897.                     dollars' worth of hardware for Datapoint.
  7898.                     
  7899.  
  7900.                                                                                           page 198
  7901.  
  7902.  
  7903.                        At various other stages of my career, I have worked with quite a variety
  7904.                     of machines and equipment, ranging from several different kinds of mainframes
  7905.                     to microprocessor control software for a very sophisticated discotheque
  7906.                     lighting control system;  an advanced credit card telephone;  a museum
  7907.                     exhibit controller running four stereo tape decks, thirty loudspeakers and a
  7908.                     similar number of spotlights; to the development of least-cost-routing
  7909.                     software controlling telephone central office switching equipment, to name
  7910.                     just a few.
  7911.                     
  7912.                        As of this writing in August 1987, I am doing contract consulting work for
  7913.                     a San Antonio based company, on assignment in Europe.  I'm presently involved
  7914.                     with industrial automation systems and local area networks.
  7915.                     
  7916.                        Besides computers, my other interests include video, stereo equipment,
  7917.                     (and in fact most kinds of home electronics), massage, travel (especially
  7918.                     interested in ocean liners and trains), Citroens (a French automobile),
  7919.                     and meeting people.  If you're ever on a cruise somewhere, and meet a
  7920.                     longhaired, moustached, bearded and gregarious computer programmer, it
  7921.                     might well be me.
  7922.                     
  7923.                        If you find these utilities to be useful for you, and decide to continue
  7924.                     using one or more of them, please register as an official user.  The price
  7925.                     is inexpensive, just $35, which is less than one dollar for each of the
  7926.                     utilities described herein.  Your registration payment will get you a
  7927.                     complete set of the utilities described above (other than those clearly
  7928.                     indicated as program products, such as the SPACE utility, which are available
  7929.                     as separate products), and will allow me to offer you periodic revisions and
  7930.                     reduced-price upgrades to this package, which is under continually ongoing
  7931.                     development.
  7932.                     
  7933.                        If you feel that these utilities are useful to you, but not -that- useful,
  7934.                     please send a smaller amount, whatever you feel is right and just.  (I hate
  7935.                     to think, on the other hand, how many videogame cartridges I've bought for
  7936.                     $35 each and never played more than once or twice).  If you find that even
  7937.                     one of these utilities is useful for you, $35 should not be unreasonable.
  7938.                     Of course, if you feel they are worth more, greater amounts will certainly
  7939.                     be gratefully received.  (Don't be afraid to send a small amount!  After
  7940.                     all, money is still money).
  7941.                     
  7942.  
  7943.                                                                                           page 199
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.                        If you have systems or applications software design, development,
  7952.                     evaluation or analysis needs, perhaps you might also be interested in
  7953.                     my consulting services.  Please contact me with your interests.
  7954.                     
  7955.                        Also, if you would just like to write, that is certainly welcome too!
  7956.                     Perhaps I will reconnect with some old friends, and make some new ones too,
  7957.                     this way.
  7958.                     
  7959.                        You can write to me at:
  7960.                     
  7961.                              Gordon E. Peterson II
  7962.                              Noah Systems
  7963.                              P.O. Box 40476
  7964.                              San Antonio, Texas  78229-1476
  7965.                     
  7966.                        You can also reach me through CompuServe EMAIL.  My CompuServe User
  7967.                     ID is 75116,3524.  (This is generally quicker than the post office,
  7968.                     especially since, as of this writing in mid-1987, I am spending most of
  7969.                     my time outside of the United States, and mail must be forwarded to me).
  7970.                     
  7971.                        I'm looking forward to hearing from you!
  7972.                     
  7973.  
  7974.                                                                                           page 200
  7975.  
  7976.  
  7977.                     
  7978.                     63.  LATEST VERSIONS OF THESE SNOBOL4+ UTILITIES
  7979.                     
  7980.                         Many of these utilities are under continuing development as ideas and
  7981.                     the opportunities to improve them arise.  In many cases, the shareware
  7982.                     versions of the utilities lag behind the newest versions developed by the
  7983.                     author.  As mentioned earlier in this document, the only way to ensure
  7984.                     that you have the newest and most useful versions of these utilities is
  7985.                     to register with the author.  This approach also has the advantage that it
  7986.                     usually works out less expensive than having to download a revised version
  7987.                     of the utilities from your local BBS, or to buy the diskettes again and
  7988.                     again from your favorite shareware dealer.  You also will have the advantage
  7989.                     of direct support in your use of these utilities by their author.
  7990.                     
  7991.                         This chapter contains the version and release number of the most recent
  7992.                     edition, as of the date this document was processed, of each program.  In
  7993.                     those cases where the program exists both as an .EXE file (generally produced
  7994.                     by Macro SPITBOL) and as a .SAV file (produced by SNOBOL4+), the latest
  7995.                     revision of each version is listed.
  7996.                     
  7997.                         NOTE:  please note the time and date stamp on this print file.  If it is
  7998.                     not within the last few months from the date you are reading this, it is
  7999.                     virtually certain that this document has been augmented and improved since
  8000.                     the version you are reading.
  8001.                     
  8002.                         You might be interested to know that the listing in this chapter is
  8003.                     automatically produced by yet another SNOBOL4+ utility, called BLDVERL.
  8004.                     It reads through this users' guide, and finds the name of each utility
  8005.                     documented herein.  It then looks up the source file for each of the
  8006.                     utilities, and scans through it to find the signon message containing the
  8007.                     relevant version and release number.  These are then summarized and written
  8008.                     to a file, which is then appended to this document.  The resulting document
  8009.                     is processed with the REPAGIN8 utility, which intelligently paginates it,
  8010.                     numbers the pages, formats and numbers the chapter and section headings,
  8011.                     shifts the document over 20 columns to provide a left margin, and produces
  8012.                     an (also paginated and page numbered) table of contents file.  That
  8013.                     table of contents file, followed by the main REPAGIN8 output file, are then
  8014.                     appended with the MS-DOS COPY command, to produce the print file you
  8015.                     received.
  8016.                     
  8017.  
  8018.                                                                                           page 201
  8019.  
  8020.  
  8021.  
  8022.                         If a version and release number in the listing below shows up as question
  8023.                     marks, it indicates that the related program is generated somewhat differently
  8024.                     from the others and was not located by the automated system which produces
  8025.                     the version and release number listing.  Please contact the author directly
  8026.                     for the latest version and release information for such program(s).
  8027.                     
  8028.                       The following is the list of current versions of these utilities.
  8029.                       This listing is current as of 05-24-88 15:14:16.
  8030.                     
  8031.                     ANGLICIZ.SAV   1.03  "Anglicize" Foreign Character Set
  8032.                     ASMGEN2.SAV    1.1   Disassembly Supervisor
  8033.                     ASMRECOV.SAV   1.2   Recover Assembler Source from Listing File
  8034.                     ASMSTAT.SAV    1.2   Generate Assembler Program Statistics
  8035.                     CASE.SAV       1.2   Case Conversion and Folding
  8036.                     CHARDF.SAV     1.2   Characterize a Delimited File
  8037.                     CHOPUP.SAV     1.00  Chop Up a File for Transmission
  8038.                     CISSTRIP.SAV   1.04  Strip Junk from CompuServe Capture Files
  8039.                     COMBINE.SAV    1.0   Combine Files and Eliminate Duplicates
  8040.                     COPYSEG.SAV    1.01  Copy a File to Multiple Segments
  8041.                     CPRANGE.SAV    1.2   Copy Ranges of Records
  8042.                     DELALL.SAV     1.01  Delete All Matching Files
  8043.                     DELIEOF.SAV    1.01  Find and Delete Internal EOF Marks
  8044.                     DIFFER.EXE     1.01  Find Differences in Two Text Files
  8045.                     DIRCMP2.SAV    1.02  Compare Files in Different Subdirectories
  8046.                     DIRTREE.SAV    1.05  Make File of Subdirectories Present
  8047.                     EXPTAB.SAV     1.01  Tab Character Expansion
  8048.                     EXTEND.SAV     1.1   Extend a File (Recover Lost Data)
  8049.                     FILEDUMP.SAV   1.1   Hexadecimal File Dump
  8050.                     FMTHDLL        ?.??  Format Hard Disk, Low Level
  8051.                     GENTBLS.SAV    1.01  Generate Program Source Code Tables
  8052.                     LASERPG.SAV    1.00  Multipage Output to Landscape Mode Printer
  8053.                     LINEAN1.SAV    1.01  Serial Communications Analysis Aid
  8054.                     LIST.EXE       1.03  (Yes, Another) Text File Lister
  8055.                     LIST.SAV       1.04  (Yes, Another) Text File Lister
  8056.                     MAKASEQ.EXE    1.1   Disassembly Aid (used with ASMGEN2)
  8057.                     MAKDUMMY.SAV   1.4   Make Dummy Files for ARC'd Files
  8058.                     MAKEALL.SAV    1.1   Convert a MAKE File to "ALL" Batch File
  8059.  
  8060.                                                                                           page 202
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.                     MAKEMAKE.SAV   1.01  Build a Make File Based on Inclusions
  8067.                     MAKERMAK.SAV   1.00  Build a Raw MAKE File
  8068.                     MELIZA.SAV     1.05  Psychoanalysis Program (Famous Early AI Effort)
  8069.                     MERGECMP.SAV   1.1   Merge WORD's .CMP User Dictionary Files
  8070.                     MSCRIBE.EXE    1.04  Document Formatting and Entry Program
  8071.                     OVER.EXE       1.03  Shift a Print File Over to the Right
  8072.                     PADREC.SAV     1.03  Pad Records to a Fixed Size
  8073.                     PLAYCVMS.SAV   1.1   SUPERKEY to DRVSPKR Format Converter
  8074.                     PLAYCVT.SAV    1.1   PLAY file to DRVSPKR Format Converter
  8075.                     PMUSCVT.SAV    1.1   Pianoman .MUS to DRVSPKR Format Converter
  8076.                     PUBLBL.EXE     1.2   Public Label Inclusion Generator
  8077.                     PUBLBL.SAV     1.3   Public Label Inclusion Generator
  8078.                     REPAGIN8.SAV   1.7   Intelligent Document Pagination and TOC
  8079.                     SAPPREF.EXE    1.1   Append Assembler Cross-Reference to Listing
  8080.                     SPACE.SAV      1.15  Disk Space Management and Recovery Utility
  8081.                     STRIPBS.SAV    1.1   Strip Backspace Characters from Text File
  8082.                     TITLGEN.SAV    1.00  Generate a Title Page
  8083.                     TOTSIZ.SAV     1.03  Total Size of Subdirectories
  8084.                     TP.SAV         1.03  Wipe Clean the Tail End of a File
  8085.                     TRUNCATE.SAV   1.1   Reduce the Size of a File
  8086.                     TSELIM.SAV     1.1   Trailing Space Elimination
  8087.                     TYPEOF.SAV     1.2   Characterize an ASCII Text File
  8088.                     UNBACK.SAV     1.1   Recover BACKUP Files that RESTORE Won't
  8089.                     UNOVER.SAV     1.03  Delete Leading Spaces in Text File
  8090.                     WC.SAV         1.0   Word Count
  8091.                     WFREQ.SAV      1.0   Word Frequency
  8092.                     XTRCOMS.SAV    1.01  Extract Comments From Assembler Programs
  8093.  
  8094.