home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
languages
/
oberon
/
readme
< prev
next >
Wrap
Text File
|
1990-10-11
|
17KB
|
515 lines
May to August 1990
OBERON V1.16 (Limited Version)
Introduction
This is a freely distributable demo version of a powerful compiler for a
modern, object-oriented language called Oberon. It is the newest
development of Prof Dr Niklaus Wirth of ETH Zurich in Switzerland. The
language is the result of a project to improve the performance and to
reduce the complexity of the language Modula-2. Primarily, the concept of
type extension has been added to Oberon, providing object-oriented
programming facilities comparable to those of the languages Smalltalk and
C++. At the same time, Oberon retains the notational conventions of
Modula-2 and Pascal.
The compiler on this disk has a few features seldom found in other compilers:
- The compiler performs only a single pass, thereby providing fast
translations. Still, the code produced is short and fast, because the
compiler applies carefully selected optimisations.
- Object modules are both ALink and BLink compatible, making it possible
to link them with modules generated by different language compilers,
like Assembler and C.
- Oberon programs are optimised at link time. Unused procedures are not
included in the executable code module. The size of an empty program,
for example, is less than half a kilobyte.
- Programs are very robust at run time, because the compiler employs a
lot of checks in order to minimise errors. In most cases, run time
failures do not result in a guru meditation; rather, they are captured
by the run time system.
- In order to permit access to the functions and resources of the Amiga
operating system, the language has been extended by Amiga specific types.
- There are already many library modules, and further libraries are under
development. They will be made available from time to time as
additional proprietary or public domain packages.
- Any executable Oberon program may be made resident.
- Setting one single compiler option causes the compiler to create fully
reentrant (pure) programs. The only restriction is, that these programs
may not have more than 32K of global variables.
Hence, this compiler is an ideal tool to develop small and large programs
effectively. Code re-use based on module libraries is supported via the
object-oriented features of the language, and any object previously defined
may easily be adapted to new problems.
Limitations of the demo version
This version of the compiler shall enable you to translate a few Oberon
programs and to investigate some of the compiler's features. However, this
is not the full version. A few restrictions have been built into the
compiler which will prevent you from using it over an extended time period.
The ideas is to encourage you to purchase the full version (see details
below) if you believe it is worth it to keep me alive. The following
paragraphs list the restrictions build into this demo version.
- Only a small subset of the module library and the Amiga interface
modules are provided
- Instructions are short and incomplete
- Every Monday the compiler refuses to do its job
- The source text in each module must not be longer than 10K bytes
- The resulting object code module must not be longer than 5K bytes
- The area for global variables per module is limited to 3K bytes
- The area for string constants per module is limited to 1K bytes
- For each module, the maximum number of imported modules is restriced to 6
- The editor cannot handle more than 200 lines of source code
I realise that it is no problem for a hacker to eliminiate these
limitations. However, any modification of the program, text and data files
is expressly forbidden. Likewise, the possession, use and distribution of
modified versions of the included files is unlawful. Of course, this also
applies to any copy of the full compiler version.
This disk contains the following files:
ReadMe The present file
LiesMich German documentation file
Oberon-Report The revised report on the language Oberon, as published
by ETH Zurich, Switzerland
ModulaToOberon The paper "From Modula to Oberon", also published by
ETH Zurich, Switzerland
Install Script file for an easy compiler installation
Oberon The compiler itself
OLink A link utility for Oberon programs, provided as a
comfortable alternative to BLink
OEd The editor
OErr If errors occurred during compilation, this program
will list the corresponding error messages
ExeIcon Utility similar to IconX
BLink The linker
BLink.doc Linker documentation
Path Path file for the compiler and for OLink
Fehler-Meldungen This file is used by OEd and OErr to display error
messages
Demos (dir) Demonstration programs
Pute CLI-based pocket calculator for INTEGER expressions like
103 MOD 32 * (98 DIV 3) DIV 2 - 7
Cube 3D demonstration: cube
Amok 3D demonstration: AMOK Logo
Sparks Line demonstration
Hello Simple hello world demonstration
Modules (dir): Sources of the amiga-oberon-intraface modules Exec,
Dos, Graphics, Intuition and the automatically
created definition of 'io'.
Icons (dir) Icons for Oberon files
The icons are copied by the compiler, linker etc on
request.
c (dir) Command directory, containing only MuchMore
libs (dir) Library directory, containing arp.library which is
required by the compiler etc
sym, obj (dir) Symbol- and object-files of the included modules. In
addition to the amiga interface modules, the following
modules are included:
- OberonLib: Oberon base module, will be included
in every oberon program automatically
- io: standard i/o-module
- NoGuru: if you import this module, error-messages
will be printed in case of a run time
error.
All programs on this disk, except BLink, have been written in Oberon and
translated with this Oberon compiler.
File name extension conventions
Module / program file .mod
Symbol file .sym
Object file .obj
Object file using small data model .objs
Link support file (calls BLink) .lnk
BLink "with" file .wth
Executable file <none>
Installation of the compiler
The compiler may simply be installed by double-clicking the 'Install'
icon. The arp.library (used by OEd) is copied to logical device LIBS:,
and this floppy disk is assigned the logical device name OBERON:.
If you intend to run the programs from the Shell or the CLI, type the
command
Path OBERON: ADD
after installation.
The Editor OEd
This editor supports in particular the development of Oberon programs. It
is essentially mouse driven, and it allows you to deal with several files
at the same time. It also provides an Oberon syntax checking mechanism.
You may start the compiler, the linker, the error message listing program
and any compiled program without leaving the editor.
Synopsis
OEd { [-t#i] | <text file> }
You may start OEd simply by double-clicking its icon or by typing "OEd" in a
Shell or CLI window. It is also possible to pass several text files to OEd
using multiple arguments (Shell or CLI) or multiple selection (Shift click
under Workbench). In this case, each of the selected text files is
displayed in a separate window. If you start OEd from a Shell or CLI window,
then you can also set the tab size explicitly (the default value is 2). Eg
if you prefer a value of 8, type "OEd -t8 Progr.mod". Tab size values larger
than 9 cannot be specified. Option 'i' enforces icon generation on program
save even if OEd has been started from the Shell or CLI.
The title bar of the text window is used as a status line. It displays
important information like error messages, cursor position, length of text,
and the file name.
Use of Keyboard
Cursor keys (arrow keys):
As you may have assumed already, you can move the cursor character by
character around the text file using these keys.
with Alt key pressed simultaneously: movement word by word / page by page
with Shift key pressed simultaneously: movement to beginning / end of
line / text
Backspace: deletes character to the left of the cursor
Del: deletes character under the cursor
Shift-Del: deletes whole line
Ctrl-Del: deletes all characters to the right of the cursor
Return: inserts new line at cursor position
Tab: jumps to the next tab stop
Shift-Tab: jumps to the previous tab stop
Ctrl+'S': splits current line into two lines at current cursor position
Ctrl+'J': joins two lines
Use of Mouse
Press left button to modify cursor position
Keep left button pressed and move mouse to mark a block
The Menus
Project Menu
Load (Amiga + 'L'): load text file
New Window (Amiga + 'W'): open new text window
Save (Amiga + 'S'): save text file using current name
Save As (Amiga + 'V'): save text file using new name
Save block (Amiga + 'O'): save selected block of text
Insert File (Amiga + 'I'): insert text file
Quit (Amiga + 'Q'): exit OEd
About (Amiga + 'J'): display OEd information
Search Menu
Find (Amiga + 'F'): find given string
Next (Amiga + 'N'): find next occurrence of string
Previous (Amiga + 'P'): find previous occurrence of string
FindRep (Amiga + 'G'): find and replace string
NextRep (Amiga + 'R'): find and replace next occurrence of string
PrevRep (Amiga + 'H'): find and replace previous occurrence of string
Block Menu
Begin (Amiga + 'B'): mark beginning of block
End (Amiga + 'E'): mark end of block
Copy (Amiag + 'Y'): copy block
Move (Amiga + 'M'): move block
Delete (Amiga + 'D'): delete block
TAB right (Ctrl + 'R'): Move Block to rigtht
TAB left (Ctrl + 'L'): Move Block to left
Unmark (Amiga + 'U'): delete block marks
Oberon Menu
Parse (Amiga + 'A'): check Oberon syntax - if an error is found,
then move to the error's position
parse permits finding syntax errors quickly
before compilation
Compile (Amiga + 'C'): compiles a text file which must have been
saved before
Link (Amiga + 'K'): links the compiled text using OLink
Execute (Amiga + 'X'): executes the linked program
Next Error (Amiga + 'T'): in the event of errors during compilation
the cursor moves to the next error position;
errors are listed in the status line
First Error (Amiga + 'Z'): moves to the first error position
The Oberon Compiler
Starting the compiler
from the editor:
Under the editor, the compiler may simply be started by selecting menu
item 'compile'.
from the CLI:
First, the default directory must be set to the directory containing the
text files or the 'txt' subdirectory (using CD).
The compiler usually requires more than 4KB of stack memory. It should be
set with the CLI command 'stack' to 10,000 to 20,000 bytes.
Now the compiler can be started with the following command
Oberon { [-dmsvbcrnti] <source> }
<source> is the text to be compiled. The affix '.mod' may be omitted.
If the source text is in a subdirectory named 'txt' it will be loaded
from there.
The options ('[-dmsvbcrnti]') refer to all the source texts that are listed
to the right:
Option Effect
'-d' use small data-model, create reentrant (pure) code, program may
not have more than 32K of global variables
'-d' use small code-model, program code may not be larger than 32K
'-s' disable stack control
'-v' disable overflow control
'-b' disable block control
'-c' disable case index control
'-r' disable return control
'-n' disable null pointer control
'-t' disable type control
'-i' produce icons
If the compiler was started without parameters it returns with the prompt
'in>' and expects the name of the source text. To leave the compiler,
press the return key.
from the Workbench:
If the compiler is started from the workbench, select the source texts
using multiple selection with the mouse (press the shift key and klick
on icons). Then double-klick the compiler's icon.
The compiler should not be started without parameters from the workbench,
because in this case it will save the object and symbol files to the
compiler's directory rather than the directory containing the source
files.
OLink:
OLink simplifies the start of BLink. From the workbench, Olink may be
started by double clicking the icon of the object file created by the
compiler.
Start from the CLI:
OLink [-bsmdi] <object file>
<object file> is the obect file of the main module created by the compiler
Options:
-b do not start BLink
-s start BLINK with options SMALLCODE and SMALLDATA
-m should be set when program was compiled using the small code-model
-d must be set when program was compiled using the small data-model
-i create icons
OErr:
OErr shows the errors during compilation
Start: OErr <source text>
Differences to the OBERON-Report
- Memory administration is done like in Pascal with NEW() and DISPOSE()
and not with garbage collections. I think that an implementation of
the garbage collection system on the Amiga is hardly possible and that
it would not make much sense.
- The type guards are determined at compilation time rather than at
loading time, as is the case on the CERES machine.
Copyright:
This disk may be distributed freely without alternations, free of charge.
The programs and the files on this disk may not be altered. Altered
versions of these programs may neither be used nor distributed.
These programs may only be distributed together with this disk. Ie it
it is not permitted to copy and distribute just the editor, despite the
fact that it is fully functional without the compiler.
The texts by Niklaus Wirth may be distributed on their own, and eg be
uploaded into bulletin boards. But they may not be altered, and it
should be ensured by an appropiate note that they will not be altered.
BLink and BLink.doc are from the Software Distillery. They may also be
distributed without this disk, but only together and unaltered.
All other files are © 1989/1990 by Fridtjof Siebert
Nobileweg 67
D-7000 Stuttgart 40
Germany
Any unlawful use of these files will be prosecuted.
I will always be grateful for any information on bugs in my programs. I
cannot guarantee that I will find time to answer all correspondence. So
please direct all queries to A+L AG, and don't keep me unnecessarily from
programming. I won't answer any questions by telephone.
The author wil not be held liable for the correctness and functionality
of the programs and files. Also, the author is not liable for any damages
incurred through the use of the programs and the files.
Full Compiler Version
The fully functional compiler version is expected to be released in September
1990. It may be ordered directly from
A+L AG
Im Däderiz 61
CH-2540 Grenchen
Switzerland
or in Australia from
Tenera Merx Productions Pty Ltd
Unit 1, 25 Buckingham Drive
Wangara WA 6065
This version will be supplied with comprehensive documentation, further
auxiliary programs, many library modules and a complete interface to
the Amiga's system routines (including ARP).
--- Compiler, utilities and original documentation by
Fridtjof Siebert, Amiga Modula-2 und Oberon Klub
Stuttgart, Reunified Germany
--- Documentation translated into Anglo-Saxon dialect by
Rainer and Sabine Liffers, Tenera Merx Productions Pty Ltd
Wangara, Western Australia (Down Under, also known as Banana Republic)
Thanks to Rainer and Sabine for translating this documantion. I've done some
final changes for the documentation to fit with the latest version of the
compiler. I hope I didn't include too many language mistakes...
Fridtjof.