home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / misc / amoner04.dms / amoner04.adf / Editor / CompilerReview.Txt next >
Encoding:
Text File  |  1992-06-18  |  9.5 KB  |  196 lines

  1. AMOS Compiler - A review
  2. By Michael D. Cox
  3. COMPILER v1.1
  4. Compiler Extension v1.34
  5. ---------------------------------------------------------------------------
  6.  
  7.         First, I'd like to say that this is my first written review so
  8. please keep your rude remarks to yourself until the end of this article.
  9. Then, you can EMail me at my address below and let me know what you think
  10. about the price of tea in China!
  11.  
  12. THE BOX
  13.  
  14.         Well, the box looks real nice.  Looks like you're going into warp
  15. speed.  Just hope the compiler does the same for the programs!
  16.  
  17. THE MANUAL
  18.  
  19.         Hey, it looks just like the box!  It's only 61 pages long.  You also
  20. get a separate pamphlet that describes what is new in AMOS v1.3.  Bit thinner
  21. than the AMOS EXTRAS manual that comes with the original AMOS package.
  22.  
  23. THE DISKS
  24.  
  25.         You get two disks.  Well, at least I did.  One is the COMPILER DISC
  26. and the other is the UPDATER DISC.  They are your usual disks with the usual
  27. AMOS labels on them, except much glossier.
  28.  
  29. WHAT TO DO FIRST
  30.  
  31.         Well, first thing I did was read the Foreword by the AMOS god himself,
  32. Francois Lionet.  Then, I quickly skimmed through to page 5 to where it says
  33. how to update to AMOS v1.3.  Heck, just boot the UPDATER disc and click on
  34. UPDATE.  Simple enough.
  35.     So, I did it.
  36.         Then, after I stuck my original AMOS disk into the drive as it asks
  37. to, I read a bit more thoroughly.  As I saw the screen telling me that it was
  38. making room on my disk, I read "Do NOT use your original disk!"  So, after I
  39. recovered from fainting, I quickly made sure I had my backup.  Shooooo!
  40.     The updating process is painless.  Well, for most people it should be.
  41. You just boot off the UPDATER disk, click on UPDATE, insert your BACKUP of the
  42. original AMOS disk and away you go!  When the process is completed, your backup
  43. now contains all you need for AMOS v1.3.  It could be v1.31 or v1.32,
  44. depending on when/where you got the compiler.
  45.         Now, if you have a floppy system (hahahahahahaha - ahem), you are all
  46. set.  If you have a hard drive, simply copy AMOS1.3 to your C or BIN directory
  47. and place everything that is in the AMOS_SYSTEM directory on the floppy in
  48. the AMOS_SYSTEM directory on your hard drive.
  49.         If you place AMOS_SYSTEM inside another directory, make sure you
  50. update your .ENV files to reflect the change.  Also, you may want to put
  51. AMOS1.3 in the directory above AMOS_SYSTEM as the Compiler Install asks you
  52. where AMOS1.3 is and looks for AMOS_SYSTEM in the same directory.
  53.         You can also run the INSTALL.AMOS program to install onto your hard
  54. drive.  It is just like the one that came with the original AMOS package.
  55.  
  56. COMPILER INSTALLATION
  57.  
  58.         This is just as simple.  If you have a floppy system, boot from the
  59. COMPILER disc.  For hard drive users (yeah!!!) boot from your hard drive and
  60. insert the COMPILER disc in DF0:,  If you use workbench, open up the COMPILER
  61. DISC and double click on WELCOME.  From CLI, just change to DF0: and enter
  62. WELCOME at the prompt.
  63.         You are once again presented with the same menu as before.  Just click
  64. on INSTALL.  You will be presented with a list of configuration options for
  65. the compiler.  Select whichever is best suited for you.  Or, you could make a
  66. floppy for each kind of different programming requirements, as the manual
  67. points out.  But, I think it is kinda useless, so I just made it install to
  68. my hard drive.
  69.         You just follow the prompts and everything will be fine.  Now, if you
  70. did put AMOS_SYSTEM in another directory, you may have to update the ENV files
  71. after the installation, as I am not sure whether or not this is done
  72. automatically.
  73.         Okay, after it is finished, you either have a floppy disk with AMOS
  74. and the compiler installed, or a hard drive with AMOS and the compiler
  75. installed (and a lot of room to work with, too).
  76.  
  77. COMPILING PROGRAMS
  78.  
  79.         Compiling a program is just as easy.  You have two ways of doing it.
  80. Either through the COMPILER.AMOS program or via the CLI using ACMP which is
  81. installed in the AMOS_SYSTEM directory.
  82.         Before you begin compiling, the program that you wish to compile must
  83. have been TESTED (F2) first.  If you ever get an error message saying that
  84. the program has not been tested, just load it into AMOS and press F2.  Then,
  85. save it again.  I doubt this will be a problem with most programs, but no
  86. need to worry!
  87.         First, we'll cover the COMPILER.AMOS program.  It is the easiest way
  88. to do compiling.
  89.         As usual, you are presented with a nice interface that shows the
  90. current compiler configuration.  The top row of three ICONS determine the
  91. compiler's memory conservation features.  As a default, it is set for loading
  92. the entire source into memory (first ICON is a chip), do all the compiling on
  93. disk (second icon is a disk), and make the program standalone and runnable via
  94. workbench (the third icon is WB).
  95.         You can change these features by clicking on the icon.  Each icon will
  96. rotate to the next one.  For source and destination, you have the option of
  97. either compiling to/from disk or to/from ram or both.  For the final product
  98. you either have CLI, WB, or AMOS.  CLI and WB are standalone while AMOS
  99. requires either AMOS or RAMOS to work.
  100.         I have mine set for RAM --> RAM : CLI.
  101.         The COMPILE icon starts the process of compiling.  You will be asked
  102. for the program to compile and then the name and destination of the compiled
  103. program.  The compiler is very quick, so don't walk away thinking you can grab
  104. a bite to eat at the local pub.
  105.         The EXIT icon....you figure it out!
  106.         The ? icon gives the credits.
  107.         The Spanner icon (looks like a wrench) lets you configure the compiler
  108. and the way the compiled program is made.  You are presented with a menu.  The
  109. first set of options deals with the way your program is compiled.  The second
  110. set deals with the configuration of the compiler itself.  Personally, I have
  111. the first options all set to NO and the second all set to YES.  Set your
  112. configuration then click on SAVE to make it permanent.
  113.         See how simple that is?!
  114.         Compiling from the CLI is just as simple, but you have to type
  115. everything out.  However, if you have saved your compiler configuration using
  116. the COMPILER.AMOS program, all of your settings are the same.  So, if you like
  117. your settings, you just enter:
  118.  
  119. acmp program.AMOS -Oprogram
  120.  
  121.         ACMP is the CLI compiler.  The -O switch will save the result as
  122. 'program.'  However, if you need to try a different setting, you have to use
  123. one of the switches for ACMP:
  124.         -Dxx = Sets the memory conservation method
  125.         -Tx     = Sets the type(AMOS, CLI, WB) of the final product
  126.         -Sx     = Default screen upon running program
  127.         -Wx     = Prevent your program from appearing until you tell it to
  128.         -L      = Use JMP instead of BRA for large programs
  129.         -Cfile  = Use a different config file
  130.         -Fpath  = Location of AMOS_SYSTEM
  131.         -Ex             = Include error messages or not
  132.         -Q              = No compiler messages except errors
  133.  
  134. COMPILER EXTENSION
  135.  
  136.         As the compiler is an extension to AMOS, it also adds new commands.
  137. Some only work from direct mode, like COMPILE, while others are definitely
  138. made for standalone CLI programs.
  139.         The ones of importance are COMPTEST [On/Off], =COMMAND LINE$=,
  140. =SQUASH, and =UNSQUASH.  COMPTEST lets you turn off the testing done by AMOS.
  141. This can increase the speed of your program.  It also disables the CONTROL-C
  142. break, so make sure you save your work first.
  143.  
  144. =COMMAND LINE$= lets you read CLI arguments.  Such as:
  145.  
  146.     program no yes maybe
  147.  
  148. COMMAND LINE$ would be equal to "no yes maybe".  This is a great benefit to
  149. some programs.  You can also set COMMAND LINE$ equal to something for the
  150. benefit of running a program from within another program.  The new program
  151. could then read the COMMAND LINE$ and take appropriate action.
  152.         =SQUASH and =UNSQUASH let you compact and uncompact an area of memory,
  153. including banks, except for sprites and icons.  They return the length of the
  154. squashed or unsquashed data.  You can also flash colors while squashing, just
  155. like some of the filecrunchers do.
  156.  
  157. PROS and CONS
  158.  
  159.         Well, I've gone over how to install, update, and compile.  Now, the
  160. big question is:   Is it worth the price?
  161.  
  162.         Well, the benefits of the compiler are:
  163.         -       Standalone programs
  164.         -       Much faster
  165.         -       Can't be modified by others
  166.  
  167.         Disadvantages:
  168.         -       Program is much larger
  169.  
  170. So, I would say that the compiler is definitely worth it.  I have compiled
  171. various programs and have found them to be much quicker.  The speed helps
  172. non-AMAL functions run faster.  For instance, I wrote a little program that
  173. scans 1k of memory and determines whether or not a byte is part of a program.
  174. Now, whether or not it actually works is not the point.  Uncompiled, it took
  175. several minutes.  While compiled, it took under 30 seconds.
  176.  
  177. BUGS
  178.  
  179.         Well, I don't know of any bugs.  There are some quirks like setting a
  180. needless floating point variable to 0.0 (i.e. A#=0.0) in the very beginning
  181. of a program so that the compiler can prepare itself for floating points.
  182.     Read the README file on the Compiler Updater disc for more info on
  183. quirks and bug fixes.
  184.  
  185. -------------------------------------------------------------------------
  186.  
  187.     Well, I hope someone enjoys this and finds it helpful.  If you want to
  188. review any AMOS products, just EMail your text to me.
  189.  
  190.     Later, folks!  And, keep programming.
  191.  
  192. Next disk, look for my article on HOW TO INTERFACE WITH LIBRARIES AND ASSEMBLER.
  193.  
  194. Michael D. Cox
  195. aj639@Cleveland.Freenet.EDU
  196.