home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / amiga_e_v2.1b / docs / compiler.doc next >
Text File  |  1994-05-26  |  11KB  |  274 lines

  1.  
  2.         +-----------------------------------------------+
  3.         |                        |
  4.         |                 Amiga E v2.1b                 |
  5.         |          Compiler for The E Language          |
  6.         |           By Wouter van Oortmerssen           |
  7.         |                        |
  8.          |          Introduction - Installation          |
  9.         |                        |
  10.         +-----------------------------------------------+
  11.  
  12.     NOTE: Amiga E v2.1b is a bug-fix update, and it's functionally
  13.           identicall to v2.1a, see chapter 4 for an overview.
  14.  
  15.  
  16.             contents:
  17.  
  18.             1. Introduction, The features
  19.             2. The distribution
  20.             3. Using the compiler
  21.             4. Changes from v2.1 to v2.1b
  22.             5. Additional information
  23.  
  24.  
  25.         +-----------------------------------------------+
  26.         |         1. INTRODUCTION: THE FEATURES         |
  27.         +-----------------------------------------------+
  28.  
  29. E is a procedural higher programming language, mainly influenced by
  30. languages such as C and Modula2. It is an all-purpose programming language,
  31. and the Amiga implementation is specifically targeted at programming
  32. system applications. The major features of the language/this implementation
  33. include:
  34.  
  35. - Compilation speed of 10.000 to 35.000 lines/minute on a 7mhz Amiga 500,
  36.   25.000 to 85.000 l/m on a 14mhz Amiga 1200 (both _without_ fastram)
  37.   Faster than any other Amiga compiler.
  38. - Produces small and fast executables from source code in one go: linker,
  39.   assembler and other program modules integrated into the compiler
  40.   Very fast turnaround times even when running from your own editor.
  41. - True Inline Assembly with identifier sharing: a complete assembler
  42.   has been build in to the language that interfaces with E in a
  43.   natural fashion. However, assembly in E is 100% optional.
  44. - Module system for import of library definitions/constants/functions
  45.   (much like TurboPascals UNITs); a large set of pre-compiled modules
  46.   provide for great programming power and extendability.
  47.   _All_ commodore's 2.04 includes available as E modules (E is
  48.   still v1.3 compatible though).
  49. - Large amount of integrated system functions: OpenW(), OpenS(),
  50.   Gadget(), WriteF(), TextF(), and numerous string/list/IO functions.
  51. - All library calls of Exec, Dos, Intuition and Graphics of 2.04
  52.   integrated as system functions into the compiler: call them without
  53.   opening the library or including files. All other libraries accessible too.
  54. - Flexible and powerful "type" system: one basic non-complex 32bit
  55.   LONG variable, and datatypes ARRAY, STRING, LIST and OBJECT,
  56.   code-security and generality through low-level polymorphism.
  57. - LISP functionality: quoted expressions, functions like
  58.   Eval(), ForAll(), Exists(): Implement algorithms that would
  59.   normally require lambda-functions.
  60. - immediate lists, typed lists: build complex data structures with
  61.   all sort of data directly in expressions, make TagLists, structures,
  62.   vararg function calls on the fly
  63. - exception handling a la ADA
  64.   provide handlers on all kinds of levels in programs, define
  65.   automatic exception raising for often used functions like
  66.   memory allocations, and implement complex resource allocation
  67.   schemes with ease through recursive calls of handlers.
  68. - compiles compact small programs with SMALL code/data model and large
  69.   applications with LARGE model in seconds
  70. - Manageable development system: one executable (the compiler/assembler/
  71.   linker) and optionally a set of Module files is all you will need.
  72.  
  73. Negative points:
  74. - some features not (yet) implemented, like: OOP, creation of own modules,
  75.   source level debugger etc.
  76. - *very* memory hungry: you're advised to have a minimum memory of 1 meg.
  77.   on 512k machines, it's likely you won't get any further than helloworld;
  78.   from 2 meg upwards, E works comfortably.
  79. - no 020/030/040/881 specific code-generation (yet).
  80. - Documentation on E starts to get better, but still very small.
  81.  
  82. If these features haven't made you anxious to use E,
  83. I suggest you test-drive the compiler after reading this doc
  84. to "feel the power" yourself.
  85. This is what 'HelloWorld' looks like in E:
  86.  
  87. /* nominated for Most Boring Example */
  88.  
  89. PROC main()
  90.   WriteF('Hello, World!\n')
  91. ENDPROC
  92.  
  93.  
  94.  
  95.         +-----------------------------------------------+
  96.         |             2. THE DISTRIBUTION               |
  97.         +-----------------------------------------------+
  98.  
  99.  
  100. Next to this .doc, you will find these three docs about E:
  101.  
  102. Reference.doc    Overview of the language.
  103. Tutorial.doc    A step by step tutorial about programming in E.
  104. Utilities.doc    description of support utilities that come with E and
  105.         some example sources.
  106.  
  107. Besides the above-mentioned doc files, the distribution should include:
  108.  
  109. BIN        contains the compiler EC and the support utilities
  110. MODULES        Directory containing all Amiga 2.04 E modules.
  111. DOCS        all documentation on E
  112. SOURCES        /EXAMPLES    simple examples for you to try
  113.         /UTILITIES    a directory with utilities, some supporting
  114.                 the compiler, all written in E
  115.         /PROJECTS    other, larger examples in E
  116.         /OTHER        example sources written by other authors
  117.  
  118. This distribution should always be spread as a whole, with no
  119. additions or modifications.
  120.  
  121.  
  122.  
  123.         +-----------------------------------------------+
  124.         |            3. USING THE COMPILER              |
  125.         +-----------------------------------------------+
  126.  
  127. To install Amiga E on your system, just copy the whole distribution to
  128. some place in your system, extend your path to the BIN directory, and
  129. assign EMODULES: to the MODULES directory.
  130.  
  131. syntax of the compiler:
  132.  
  133. EC [-opts] <sourcefile>
  134.  
  135. As an example we'll compile the program 'HelloWorld.e'. The compiler will
  136. produce an executable 'HelloWorld'. Notez bien: the missing '.e' on
  137. the commandline is _obligatory_.
  138.  
  139.  
  140. 1>  ec helloworld
  141. Amiga E Compiler/Assembler/Linker v1.8 (c) 1992 $#%!
  142. CONGRATULATIONS !!!  NO ERRORS !!!
  143. 1>  helloworld
  144. Hello, World!
  145. 1>  list
  146. HelloWorld.e                  88 ----rwed Sunday    00:08:41
  147. helloworld                   512 ----rwed Today     10:51:37
  148. 2 files - 4 blocks used
  149.  
  150.  
  151. Last note on compiling the examples: if a program uses module files
  152. for library definitions like:
  153.  
  154. MODULE 'GadTools', 'Reqtools'
  155.  
  156. the compiler needs to know where to find them. Two possible solutions:
  157. 1. you make the assignment "emodules:" to the modules directory (best).
  158. 2. you state in the source code where to look for modules, like:
  159.    OPT DIR='dh0:src/e/modules'
  160.  
  161. Options.
  162. these need to be written together, preceded by a "-":
  163. -l    compiles with large code/data model. see OPT LARGE
  164. -a    puts EC into assembler mode. see OPT ASM
  165. -n    suppresses warnings. see OPT NOWARN
  166. -w    puts wb to front (for scripts)
  167. -b    shows buffer's memory usage information
  168. -mX    forces EC to allocate more memory for its buffers.
  169.     X ranges 1..9, the minimum number of 100k blocks to allocate.
  170.         default is 1.
  171.  
  172. example:  EC -l blabla
  173. compiles blabla.e with large model.
  174. NOTE: in most standard cases you won't need to use any of these options
  175.  
  176.  
  177.         +-----------------------------------------------+
  178.         |         4. CHANGES FROM v2.1 TO v2.1b         |
  179.         +-----------------------------------------------+
  180.  
  181. What's new in v2.1b:
  182.  
  183. BUG FIXES:
  184. [ The primary goal for this release: v2.1 was already very stable,
  185. v2.1b should be even better now. ]
  186.  
  187. - typed lists with expressions in them on CHAR fields would
  188.   give unwanted results, i.e. [x+1]:CHAR
  189. - The SELECT statement gave unwanted results in some nested
  190.   constructions
  191. - A RETURN statement within a HANDLE EXCEPT block was not
  192.   properly supported.
  193. - the label "main" could not be used like other labels, i.e.
  194.   {main} gave an error.
  195. - Exists() could give the wrong result.
  196. - bug fixed in "D.e" source
  197. - EC's command-line parsing didn't work well with some exotic shells.
  198. - the "-r" option has been discarded
  199.  
  200.  
  201. ENHANCEMENTS:
  202. [ no "real" enhancements here, just the ones that came along ]
  203.  
  204. - Docs have been revised somewhat
  205. - Even more examples. Especially worth mentioning:
  206.   - the new version of ShowHunk.e by Jim Cooper that now understands just
  207.     about ALL hunks, and features a complete disassembler (!)
  208.   - The various tools/examples written by Diego Caravana
  209.   - A new music programming language written by me.
  210. - '' is now an equivalent for \a in strings.
  211. - Rnd() now accepts a seed
  212. - function ListItem() added.
  213.  
  214. Note about versions:
  215. It's very likely that v2.1b is the last version that will be released
  216. until v2.5 (major update!) comes out, for which no price has been set yet.
  217.  
  218.  
  219.         +-----------------------------------------------+
  220.         |          5. ADDITIONAL INFORMATION            |
  221.         +-----------------------------------------------+
  222.  
  223. The Amiga E Compiler was developed over the course of more than one and a
  224. half year, after the author's idea of the ideal programming language, and
  225. the ideal amiga-specific compiler for it. It was programmed (as you might
  226. have guessed) in assembly, using the AsmOne assembler v1.02. All other
  227. support programs were written in E itself.
  228.  
  229. Special thanks go to the following people/companies:
  230.  
  231. RCS Management, Canada.
  232. Rob Verver - for continuous betatesting and comments/inspiration.
  233. James Cooper (SAS) - for testing enforcer/mungwall-proofness, comments
  234.   and his contributions to the system.
  235. Jens Gelhar - for inspiration and advice.
  236.   [ buy his great C++ compiler! (MaxonC++)  8-) ]
  237.  
  238. I also would like to thank the following people for their efforts:
  239.  
  240. Raymond Hoving, Erwin van Breemen, Paolo Silvera,
  241. Diego Caravana, Jeroen Vermeulen and Jan van den Baard.
  242.  
  243. This compiler was programmed with great care towards reliability, and even
  244. more so the code it generates, additionally it has been tested and
  245. debugged for a long period. However, it is not impossible that it contains
  246. bugs. if you happen to find one, or have other comments/questions,
  247. write me at the address below: I _strongly_ prefer E-mail above
  248. conventional mail.
  249.  
  250. NOTE WELL: due to the immense popularity of the previous version of
  251. Amiga E, I get an almost unreplyable amount of Email, some of which
  252. (50-75%) are questions that would not have been necessary if people
  253. read all the docs carefully. What I mean to say is that I like
  254. to receive Email, and I don't mind answering questions and helping
  255. people out with programming problems, but be sure to check all other
  256. information at your disposal (like the Amiga E docs or the RKRM's) to
  257. see if your question is relevant, before mailing me.
  258.  
  259. I don't ask for any contributions (this is (still) PD, after all), but
  260. if you can afford it and you really like Amiga E, I suggest you send me a
  261. donation that you think is appropriate.
  262.  
  263.  
  264.     Wouter van Oortmerssen ($#%!)
  265.     Levendaal 87
  266.     2311 JG  Leiden
  267.     HOLLAND
  268.  
  269. or better if you have access to Email:
  270.  
  271.     Wouter@alf.let.uva.nl        (E-programming support)
  272.     Wouter@mars.let.uva.nl        (personal)
  273.     Oortmers@gene.fwi.uva.nl    (other)
  274.