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 >
Wrap
Text File
|
1993-01-24
|
8KB
|
200 lines
+-----------------------------------------------+
| |
| Amiga E v2.1 |
| Compiler for The E Language |
| By Wouter van Oortmerssen |
| |
| Introduction - Installation |
| |
+-----------------------------------------------+
contents:
1. Introduction, The features
2. The distribution
3. Using the compiler
4. Additional infos
+-----------------------------------------------+
| 1. INTRODUCTION: THE FEATURES |
+-----------------------------------------------+
E is a procedural higher programming language, mainly influenced by
languages such as C and Modula2. It is an all-purpose programming language,
and the Amiga implementation is specifically targeted at programming
system applications. The major features of the language/this implementation
include:
- Compilation speed of 10.000 to 35.000 lines/minute on a 7mhz Amiga 500,
25.000 to 85.000 l/m on a 14mhz Amiga 1200 (both _without_ fastram)
- Produces small and fast executables from sourcecode in one go: linker,
assembler and other program modules integrated into the compiler
- True Inline Assembly with identifier sharing
- Module system for import of library definitions/constants/functions
(much like TurboPascals UNITs)
- Large amount of integrated system functions: OpenW(), OpenS(),
Gadget(), WriteF(), TextF(), and numerous string/list/IO functions.
- All librarycalls of Exec, Dos, Intuition and Graphics of 2.04
integrated as system functions into the compiler: call them without
opening the library or including files. All other libraries accessible too.
- All commodore's 2.04 includes available as E modules
- Flexible and powerfull "type" system: one basic non-complex 32bit
LONG variable, and datatypes ARRAY, STRING, LIST and OBJECT,
code-security and generallity through low-level polymorphism.
- LISP functionality: quoted expressions, functions like
Eval(), ForAll(), Exists()
- immediate lists, typed lists
- exception handling a la ADA
- compiles compact small programs with SMALL code/data model and large
applications with LARGE model in seconds
- Managable development system: one executable (the compiler/assembler/
linker) and optionally a set of Module files is all you will need.
Negative points:
- some features not (yet) implemented, like: OOP, creation of own modules,
sourcelevel debugger/interface builder etc.
- *very* memory hungry: you're advised to have a minimum memory of 1 meg.
on 512k machines, it's likely you won't get any further than helloworld,
from 2 meg upwards, E works comfortably.
- no 020/030/881 specific code-generation (yet).
- Documentation on E starts to get better, but still very small.
If these features haven't made you anxious to use E,
I suggest you testdrive the compiler after reading this doc
to "feel the power" yourself.
This is what 'HelloWorld' looks like in E:
/* nominated for Most Boring Example */
PROC main()
WriteF('Hello, World!\n')
ENDPROC
+-----------------------------------------------+
| 2. THE DISTRIBUTION |
+-----------------------------------------------+
Next to this .doc, you will find these three docs about E:
Reference.doc Overview of the language.
Tutorial.doc A step by step tutorial about E-programming
Utilities.doc description of support utilities that come with E and
some example sources
Besides the above mentioned doc files, the distribution should include:
BIN contains the compiler EC and the support utilities
MODULES Directory containing all Amiga 2.04 E modules.
DOCS all documentation on E
SOURCES /EXAMPLES simple examples for you to try
/UTILITIES a directory with utilities, some supporting
the compiler, all written in E
/PROJECTS larger other examples in E
/OTHER example sources written by other
authors, currently from betatesters
This distributions should always be spreaded as a whole, with no
additions or modifications.
+-----------------------------------------------+
| 3. USING THE COMPILER |
+-----------------------------------------------+
To install Amiga E on your system, just copy the whole distribution to
someplace in your system, extend you path to the BIN directory, and
assign EMODULES: to the MODULES directory.
syntax of the compiler:
EC [-opts] <sourcefile>
As an example we'll compile the program 'HelloWorld.e'. The compiler will
produce an executable 'HelloWorld'. Notez bien: the missing '.e' on
the commandline is _obligatory_.
1> ec helloworld
Amiga E Compiler/Assembler/Linker v1.8 (c) 1992 $#%!
CONGRATULATIONS !!! NO ERRORS !!!
1> helloworld
Hello, World!
1> list
HelloWorld.e 88 ----rwed Sunday 00:08:41
helloworld 512 ----rwed Today 10:51:37
2 files - 4 blocks used
Last note on compiling the examples: if a program uses module files
for library definitions like:
MODULE 'GadTools', 'Reqtools'
the compiler needs to know where to find them. Two possible solutions:
1. you make the assignment "emodules:" to the modules directory (best).
2. you state in the sourcecode where to look for modules, like:
OPT DIR='dh0:src/e/modules'
Options.
these need to be written together, preceded by a "-":
-l compiles with large code/data model. see OPT LARGE
-a puts EC into assembler modus. see OPT ASM
-n surpresses warnings. see OPT NOWARN
-r runs compiled program from compiler buffer (not recommended)
-w puts wb to front (for scripts)
-s does not write executable, just compile
-b shows buffers memory usage infos
-mX forces EC to allocate more memory for its buffers.
X ranges 1..9, the number of 100k blocks to allocate
at least. default is 1.
example: EC -l blabla
compiles blabla.e with large model.
NOTE: in most standard cases you won't need to use any of these options
+-----------------------------------------------+
| 4. ADDITIONAL INFOS |
+-----------------------------------------------+
The Amiga E Compiler was developed over the course of more than one and a
half year, after the author's idea of the ideal programming language, and
the ideal amiga-specific compiler for it. It was programmed (as you might
have guessed) in assembly, using the AsmOne assembler v1.02. All other
support programs were written in E itself.
Special thanks go to the following people:
Rob Verver - for continuous betatesting and comments/inspiration
Jens Gelhar - for inspiration and advice
[ buy his great C++ compiler! (MaxonC++) 8-) ]
James Cooper (SAS) - for testing enforcer/mungwall proofness and comments
Raymond Hoving - for interest, moral-support and betatesting
Erwin van Breemen - for betatesting
This compiler was programmed with great care towards reliability, and even
more so the code it generates, additionally it has been tested and
debugged for a long period. However, it is not impossible that it contains
bugs. if you happen to find one, or have other comments/questions,
write me at the address below. I don't ask for any contributions (this is
PD, not shareware), but if you can affort it and you really like Amiga E,
I suggest you send me what you would have paid for E if it were
commercial 8*-)
Wouter van Oortmerssen ($#%!)
Levendaal 87
2311 JG Leiden
HOLLAND
or if you have access to Email:
Wouter@alf.let.uva.nl (E-programming support)
or: Wouter@mars.let.uva.nl (personal)
or: Oortmers@gene.fwi.uva.nl (other)