home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / bbs / ff810.lha / FF810 / Amiga_E / Docs / Compiler.doc next >
Text File  |  1993-01-24  |  8KB  |  200 lines

  1.         +-----------------------------------------------+
  2.         |                        |
  3.         |                 Amiga E v2.1                  |
  4.         |          Compiler for The E Language          |
  5.         |           By Wouter van Oortmerssen           |
  6.         |                        |
  7.          |          Introduction - Installation          |
  8.         |                        |
  9.         +-----------------------------------------------+
  10.  
  11.  
  12.             contents:
  13.  
  14.             1. Introduction, The features
  15.             2. The distribution
  16.             3. Using the compiler
  17.             4. Additional infos
  18.  
  19.  
  20.         +-----------------------------------------------+
  21.         |         1. INTRODUCTION: THE FEATURES         |
  22.         +-----------------------------------------------+
  23.  
  24. E is a procedural higher programming language, mainly influenced by
  25. languages such as C and Modula2. It is an all-purpose programming language,
  26. and the Amiga implementation is specifically targeted at programming
  27. system applications. The major features of the language/this implementation
  28. include:
  29.  
  30. - Compilation speed of 10.000 to 35.000 lines/minute on a 7mhz Amiga 500,
  31.   25.000 to 85.000 l/m on a 14mhz Amiga 1200 (both _without_ fastram)
  32. - Produces small and fast executables from sourcecode in one go: linker,
  33.   assembler and other program modules integrated into the compiler
  34. - True Inline Assembly with identifier sharing
  35. - Module system for import of library definitions/constants/functions
  36.   (much like TurboPascals UNITs)
  37. - Large amount of integrated system functions: OpenW(), OpenS(),
  38.   Gadget(), WriteF(), TextF(), and numerous string/list/IO functions.
  39. - All librarycalls of Exec, Dos, Intuition and Graphics of 2.04
  40.   integrated as system functions into the compiler: call them without
  41.   opening the library or including files. All other libraries accessible too.
  42. - All commodore's 2.04 includes available as E modules
  43. - Flexible and powerfull "type" system: one basic non-complex 32bit
  44.   LONG variable, and datatypes ARRAY, STRING, LIST and OBJECT,
  45.   code-security and generallity through low-level polymorphism.
  46. - LISP functionality: quoted expressions, functions like
  47.   Eval(), ForAll(), Exists()
  48. - immediate lists, typed lists
  49. - exception handling a la ADA
  50. - compiles compact small programs with SMALL code/data model and large
  51.   applications with LARGE model in seconds
  52. - Managable development system: one executable (the compiler/assembler/
  53.   linker) and optionally a set of Module files is all you will need.
  54.  
  55. Negative points:
  56. - some features not (yet) implemented, like: OOP, creation of own modules,
  57.   sourcelevel debugger/interface builder etc.
  58. - *very* memory hungry: you're advised to have a minimum memory of 1 meg.
  59.   on 512k machines, it's likely you won't get any further than helloworld,
  60.   from 2 meg upwards, E works comfortably.
  61. - no 020/030/881 specific code-generation (yet).
  62. - Documentation on E starts to get better, but still very small.
  63.  
  64. If these features haven't made you anxious to use E,
  65. I suggest you testdrive the compiler after reading this doc
  66. to "feel the power" yourself.
  67. This is what 'HelloWorld' looks like in E:
  68.  
  69. /* nominated for Most Boring Example */
  70.  
  71. PROC main()
  72.   WriteF('Hello, World!\n')
  73. ENDPROC
  74.  
  75.  
  76.  
  77.         +-----------------------------------------------+
  78.         |             2. THE DISTRIBUTION               |
  79.         +-----------------------------------------------+
  80.  
  81.  
  82. Next to this .doc, you will find these three docs about E:
  83.  
  84. Reference.doc    Overview of the language.
  85. Tutorial.doc    A step by step tutorial about E-programming
  86. Utilities.doc    description of support utilities that come with E and
  87.         some example sources
  88.  
  89. Besides the above mentioned doc files, the distribution should include:
  90.  
  91. BIN        contains the compiler EC and the support utilities
  92. MODULES        Directory containing all Amiga 2.04 E modules.
  93. DOCS        all documentation on E
  94. SOURCES        /EXAMPLES    simple examples for you to try
  95.         /UTILITIES    a directory with utilities, some supporting
  96.                 the compiler, all written in E
  97.         /PROJECTS    larger other examples in E
  98.         /OTHER        example sources written by other
  99.                 authors, currently from betatesters
  100.  
  101. This distributions should always be spreaded as a whole, with no
  102. additions or modifications.
  103.  
  104.  
  105.  
  106.         +-----------------------------------------------+
  107.         |            3. USING THE COMPILER              |
  108.         +-----------------------------------------------+
  109.  
  110. To install Amiga E on your system, just copy the whole distribution to
  111. someplace in your system, extend you path to the BIN directory, and
  112. assign EMODULES: to the MODULES directory.
  113.  
  114. syntax of the compiler:
  115.  
  116. EC [-opts] <sourcefile>
  117.  
  118. As an example we'll compile the program 'HelloWorld.e'. The compiler will
  119. produce an executable 'HelloWorld'. Notez bien: the missing '.e' on
  120. the commandline is _obligatory_.
  121.  
  122.  
  123. 1>  ec helloworld
  124. Amiga E Compiler/Assembler/Linker v1.8 (c) 1992 $#%!
  125. CONGRATULATIONS !!!  NO ERRORS !!!
  126. 1>  helloworld
  127. Hello, World!
  128. 1>  list
  129. HelloWorld.e                  88 ----rwed Sunday    00:08:41
  130. helloworld                   512 ----rwed Today     10:51:37
  131. 2 files - 4 blocks used
  132.  
  133.  
  134. Last note on compiling the examples: if a program uses module files
  135. for library definitions like:
  136.  
  137. MODULE 'GadTools', 'Reqtools'
  138.  
  139. the compiler needs to know where to find them. Two possible solutions:
  140. 1. you make the assignment "emodules:" to the modules directory (best).
  141. 2. you state in the sourcecode where to look for modules, like:
  142.    OPT DIR='dh0:src/e/modules'
  143.  
  144. Options.
  145. these need to be written together, preceded by a "-":
  146. -l    compiles with large code/data model. see OPT LARGE
  147. -a    puts EC into assembler modus. see OPT ASM
  148. -n    surpresses warnings. see OPT NOWARN
  149. -r    runs compiled program from compiler buffer (not recommended)
  150. -w    puts wb to front (for scripts)
  151. -s    does not write executable, just compile
  152. -b    shows buffers memory usage infos
  153. -mX    forces EC to allocate more memory for its buffers.
  154.     X ranges 1..9, the number of 100k blocks to allocate
  155.     at least. default is 1.
  156.  
  157. example:  EC -l blabla
  158. compiles blabla.e with large model.
  159. NOTE: in most standard cases you won't need to use any of these options
  160.  
  161.  
  162.         +-----------------------------------------------+
  163.         |              4. ADDITIONAL INFOS              |
  164.         +-----------------------------------------------+
  165.  
  166. The Amiga E Compiler was developed over the course of more than one and a
  167. half year, after the author's idea of the ideal programming language, and
  168. the ideal amiga-specific compiler for it. It was programmed (as you might
  169. have guessed) in assembly, using the AsmOne assembler v1.02. All other
  170. support programs were written in E itself.
  171.  
  172. Special thanks go to the following people:
  173.  
  174. Rob Verver - for continuous betatesting and comments/inspiration
  175. Jens Gelhar - for inspiration and advice
  176.   [ buy his great C++ compiler! (MaxonC++)  8-) ]
  177. James Cooper (SAS) - for testing enforcer/mungwall proofness and comments
  178. Raymond Hoving - for interest, moral-support and betatesting
  179. Erwin van Breemen - for betatesting
  180.  
  181. This compiler was programmed with great care towards reliability, and even
  182. more so the code it generates, additionally it has been tested and
  183. debugged for a long period. However, it is not impossible that it contains
  184. bugs. if you happen to find one, or have other comments/questions,
  185. write me at the address below. I don't ask for any contributions (this is
  186. PD, not shareware), but if you can affort it and you really like Amiga E,
  187. I suggest you send me what you would have paid for E if it were
  188. commercial 8*-)
  189.  
  190.     Wouter van Oortmerssen ($#%!)
  191.     Levendaal 87
  192.     2311 JG  Leiden
  193.     HOLLAND
  194.  
  195. or if you have access to Email:
  196.  
  197.     Wouter@alf.let.uva.nl    (E-programming support)
  198. or:    Wouter@mars.let.uva.nl   (personal)
  199. or:    Oortmers@gene.fwi.uva.nl (other)
  200.