> !Help for !BasCrunch v 1.00

Copyright 1991 Ragnar Hafsta  (Email: gnari@grun.is)


Front end for BASIC program cruncher (ccrunch)

the BasCrunch icon installs on the icon bar.
to crunch a BASIC program, just drag it onto icon, and lots of nasty
things will happen to it, namely:
  variable names will shorten.
  REMs will be removed
  unessential spaces will be removed
  as many statements as will fit in one line will be appended together
  unreferenced empty lines will be removed
  swi names will be changed to numbers after SYS command

 
click MENU button over icon to access options:
  variables:       this option enables the crunching of variable
                   names to shorter versions. First all possible
                   2 character names are used, then 3 character.
                   maximum dispertion is achieved on first character
                   of variables to shorten the symbol table linked
                   lists maintained by BASIC. This results in markedly
                   faster execution. 1 character variable names are
                   left unchanged. Some special variable names in all
                   case combinations are also left unchanged because
                   of assembler. (r1-r14,pc,asl ...)
  
  FN/PROC:         this option enables the crunching of FN/PROC names
                   in the same manner as variables. Some people like
                   to disable this for debugging reasons.

  append lines:    this option enables the building of multiple
                   statement lines where appropriate. This reduces code
                   by 3 bytes/line eliminated, and speeds up execution
                   slightly.

  empty lines:     this option enables the removal of empty lines where
                   possible. this option and the previous one should not
                   be enabled if computed GOTOs OR computed GOSUBs are
                   used. normal GOTOs and GOSUBs are allowed for (but
                   frowned upon, of course :-).

  swi names:       this option enables the changing of SWI names to
                   decimal numbers in SYS statements (not with SWI in
                   assembler, sorry). Some SWI names are disgustingly
                   long, and decoding can take an obscenely long time
                   in some tight loops.
  
  exceptions:      if you drag a TEXT file onto the icon, it will be
                   read as a list of variables NOT to be crunched.
                   this can be handy for different reasons. If EVAL is
                   used, either put variables that are likely to be
                   EVALuateded into this file or disable variable crunching.
                   the same applies to EVALuated DATA statements, i.e:
                   DATA 2*constant
                   the format of the exception file is simply 1 variable
                   per line. Lines terminated by linefeed.



BasCrunch is a front end for the command line oriented program ccrunch.
ccrunch resides in the application directory and is called by BasCrunch
when a program is dropped on the icon. BasCrunch uses 32K, ccrunch grabs
free slotspace, runs and exits, releasing space. There must be enough
space to load target BASIC program, and then some.
ccrunch is extremely fast, if I say so myself. example:
  I crunch a 475K 17000 line program (2300 variables) to 220K in 12 seconds
  giving a reduction of 53%, 1400 lines/sec or almost 200 variables/sec.
  these are typical values in my experience. Also, big programs run faster
  after crunching.



ccrunch can also be run from the command line. syntax:

*ccrunch [-h] [-v] [-m] [-f] [-e] [-s] [-n] [-xfile] [-i]file [[-o]file]
  switches:
      -h      help (this text)
      -v      report on progress
      -m      disable multiple statement line building
      -f      disable crunching of FN/PROC names
      -e      disable discarding of empty lines
      -s      disable crunching of variables.(implies -f)
      -n      disable changing SYS names to numbers
      -xfile  file contains a list of variables not to be crunched
      -ifile  source file. the -i may be omitted.
      -ofile  destination file. the -o may be omitted.
              if this parameter is omitted then source filename is used


examples:
*ccrunch file       will crunch file with all options enabled and overwrite
                    original program.

*crunch -v -m -e -s -n file file2     will crunch file, only removing spaces
                                      and REMs and such, and save result as
                                      file2. It will report on progress.



also included in this distribution are: 
the application !Rename (see its !Help file) that supplies a save box
the module MenUtils (see MenuDoc file), a menu manager


Bugs and sane suggestions should be addressed to the

Author:    Ragnar Hafsta
           Grun Ltd
           Box 852, Brautarholt 2
           121 Reykjavk
           Iceland

           Tel:   (354)(1)624672
           Email: gnari@grun.is
