home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / hce.lha / HCE / Docs / TOP.doc < prev   
Encoding:
Text File  |  1992-09-02  |  2.1 KB  |  58 lines

  1. Note from Jason Petty:
  2.    Ignore the comment related to CClib.lib, as TOP has been recompiled
  3.    and then linked with Dale Schumacher's libraries (see LIB.doc).
  4.  
  5. /* Copyright (c) 1988,1989,1991 by Sozobon, Limited.  Author: Tony Andrews
  6.  *
  7.  * Permission is granted to anyone to use this software for any purpose
  8.  * on any computer system, and to redistribute it freely, with the
  9.  * following restrictions:
  10.  * 1) No charge may be made other than reasonable charges for reproduction.
  11.  * 2) Modified versions must be clearly marked as such.
  12.  * 3) The authors are not responsible for any harmful consequences
  13.  *    of using this software, even if they result from defects in it.
  14.  */
  15.  
  16. top Version 2.00  Copyright (c) 1988-1991 by Sozobon, Limited.
  17.     Amiga Version 1.1 by Detlef Wuerkner.
  18.  
  19. Usage: top [flags] infile [outfile]
  20.  
  21. Valid optimizer flags are:
  22.    -d: Debug
  23.    -v: Verbose
  24.    -b: Branch reversal OFF
  25.    -l: Loop rotation OFF
  26.    -p: Peephole optimization OFF
  27.    -r: Variable registerizing OFF
  28.    -g: No change of stack fix-ups (for debugging)
  29.    -c: Force DATA and BSS hunks to Chip Memory
  30.  
  31. If no outputfile is specified, top will, by default, overwrite the inputfile.
  32.  
  33. The optimizer needs CClib.library to be found in 'libs:'
  34.  
  35. Temporary files are written to T: Be sure to 'Assign T: xxx' before running
  36. the optimizer the first time.
  37.  
  38. Caution: The file names of the temporary files are hard-coded in the program,
  39. so NEVER RUN TOP MORE THAN ONCE AT A TIME!
  40.  
  41. I can't say how much stack is needed by the optimizer. With my standard
  42. setting of Stack 10000, it seemed to work ok.
  43.  
  44. The optimizer converts the output of HCC to Motorola format. The output is
  45. as follows:
  46. List of XREF's,   if any
  47. List of XDEF's,   if any  (No double names in XREF's and XDEF's. Also no
  48.                            XDEF's for 'static' functions and data.)
  49. CODE,             if any
  50. DATA or CHIPDATA, if any
  51. BSS  or CHIPBSS,  if any
  52. END
  53.  
  54. The optimizer sometimes takes 'a significant amount of time' when optimizing
  55. long functions, e.g. those in peep2.c and peep3.c of it's own source code.
  56. You could split long functions in multiple shorter, or you could use some
  57. of the -blpr flags if you are in a hurry.
  58.