Index of /atarilibrary/atari_cd04/GAMES/SPRACHEN/SPR_HOCH/STOBERON
Name Last modified Size Description
Parent Directory 11-May-2007 21:02 -
BINTREE.M 23-Jun-1993 20:31 2k
ERRLIST.DOK 23-Jun-1993 20:32 7k
IO.M 23-Jun-1993 20:31 2k
OBERON.TEX 23-Jun-1993 20:33 189k
OP2.TTP 23-Jun-1993 20:34 158k
OP2CONV.TOS 23-Jun-1993 20:31 11k
OP2LINK.TTP 23-Jun-1993 20:32 25k
OPDECSYM.TTP 23-Jun-1993 20:32 24k
RUNTIME.M 23-Jun-1993 20:31 31k
SORTTEST.M 23-Jun-1993 20:31 4k
STOBERON.ASC 08-Sep-1993 17:48 1k
TOS.M 23-Jun-1993 20:31 10k
This is the README to the 68000 version of the OP2-Oberon-Compiler of
ETH Zurich as of June 21, 1993.
The current version of the compiler is 1.00.
The frontend of the compiler was written by R. Crelier and Prof. N. Wirth
from ETH Zurich, the backend was developed by M. Momberg during a study work
at Institut fuer Programmiersprachen und Uebersetzer, Technical University
Darmstadt, Germany, headed by Prof. H.-J. Hoffmann.
Although the frontend was provided by the ETHZ, only M. Momberg will
support this version of the compiler. Thus, any request concerning
this compiler version should be directed to him.
The compiler and the other components of the distribution are still
in a test state. Thus, the use of the compiler and the other components
of the distribution is at the users own risk.
Nevertheless, any comments and error reports are welcome and should be
directed to
Martin Momberg
Hahlgartenstr. 13a
D-64331 Weiterstadt
Germany
E-Mail: Inet:momberg@dik.maschinenbau.th-darmstadt.de
This distribution is in the public domain and may be copied freely.
Sale, renting or hiring of the distribution or parts of it or committing
any other action yielding in money transfers are prohibited.
If you like this implementation, you may send a picture post card to the above
address.
How to get?
-----------
This distribution can be obtained by anonymously FTPing to ftp.th-darmstadt.de,
changing to directory /pub/machines/atari/programming/stoberon,
and GETting the file 'stoberon.tar.Z' in binary mode.
After UNCOMPRESSing the file by 'uncompress stoberon.tar.Z', the application
of the command 'tar xvf stoberon.tar' will lead to the files listed below.
The commands 'uncompress' and 'tar' are usually available on every Unix
system. If not, get the C sources of public domain versions of this utilities
by anonymously FTPing to, for instance, prep.ai.mit.edu and 'cd' to pub/gnu.
The files can then be transmitted to the Atari via Kermit in binary mode.
The following files are included in this distribution:
README This description
ERRLIST.DOK The adapted error list
OP2.TTP The compiler
OP2CONV.TOS The error file converter
OP2LINK.TTP The linker
OP2DECSYM.TTP The symbol file decoder
OBERON.TEX The written result of the study work (in german and TeX format)
RUNTIME.M The runtime system
IO.M A tool module for input/output
TOS.M A tool module consisting of a subset of TOS system calls
BINTREE.M A sample implementation of a binary tree abstract data type
SORTTEST.M A sample module using BINTREE and the special features of Oberon
Installation
------------
The files should be copied to a common directory.
Then the runtime system should be compiled by double-clicking the program
OP2.TTP, entering the command line
/S RUNTIME
in the command line box, and pressing RETURN.
Currently distinct search paths for the different file types are not supported.
Thus, all files have to reside in the current directory or the directory, where
the compiler and the linker are placed.
The compiler OP2.TTP
--------------------
The language accepted by this compiler is the Oberon version described in
N.Wirth: The Programming Language Oberon, ETH Report 111, Sept. 1989.
Beyond others this means:
- the concept of definition and implementation modules is no longer supported;
both parts are melted into one module;
- the module SYSTEM is available, as described in the above ETH report;
- the features of Oberon-2 are not supported yet.
The compiler takes an ASCII file with the suffix .M conforming to
the Oberon language definition and produces two to three files:
- the .OBJ file consisting of the translated code and other structures
necessary to load the module into the running Oberon system (not included
in this distribution) or to link the module;
- the file ERR.DAT describing errors by number and absolute text position;
see program OP2CONV.TOS;
- if the option /S was chosen the .SYM file is generated which includes
information for importing this module in other modules.
From the desktop the compiler can be called by double-clicking the OP2.TTP icon.
The command line box which appears right now is used to type in the filename
of the module to be compiled with or without the .M suffix.
The filename can be preceded by one or more options of the following:
/A the parameter following this option is a decimal number or a hexadecimal
number, if ended with a 'H', describing the module-relative address of
a machine command. For the module to be compiled, the error file
ERR.DAT contains a line with error number 246 together with the source
code position where the machine command in question is generated.
This option may be used for debugging purposes.
/B After the first of the two compiling phases the syntax tree hold in the
memory is displayed in a linearised form. This option is generally not
useful for the average programmer. Only programmers interested in how
the compiler maintains the intermediate representation of the module
should use this option.
/O With the translation of mathematical expressions in machine language it
is guaranteed that side effects, like changing a global variable, which
appears earlier or later in the expression, in a just executed function
call, have the expected impact.
However, the generated code doesn't exhaust the addressing capabilities
of the 68000 microprocessor and thus, the compiler produces longer
code sequences.
To optimize the code at the expense of undefined side effects this option
can be used.
/R Using this option causes the initiation of Oberon runtime error no. 8 if
set operations lead to a range violation.
/S No symbol file 'name.SYM' is generated unless this option is used.
This protects the programmer from accidently changing the interface
of the module which always requires a recompilation of the modules
importing the module in question.
If a symbol file was already existent, the option /S was not used, and
the compiler has found an inconsistency between the old symbol file and
the currently exported structures, the error message no. 155 is emitted.
/T This option suppresses the generation of type guards, regional type guards,
and implicit type guard. This option should be used with extreme caution.
/V Code for catching overflows in mathematical operations can be generated by
the specification of the option /V. An Oberon runtime error no. 9 will be
initiated, if an overflow is recognized.
/X The option /X suppresses the generation of index range check during a
selection of array elements. Normally an Oberon runtime error no. 6 is
initiated in this case.
After entering the options and the filename of the module, pressing RETURN
will start the compilation.
The Error File Converter OP2CONV.TOS
------------------------------------
The error file created by the compiler consists of one header line and zero or
more error lines. The header line only contains the filename of the module
to which the errors belong. Each error line is composed of the absolute
source code position where the error occurred, and the error number.
For the description of the error number consult the file ERRLIST.DOK.
As most editors do not provide a facility for locating a text position from
the absolute character number, the converter program OP2CONV.TOS is included
in the distribution, which transforms the error location to the format used
by the well known editor TEMPUS (by CCD D. Beyelstein, D-6228 Eltville).
The format is <linenumber>^<columnnumber>, e.g. 16^8 means line 16, column 8.
The line number begins with 1, the column number with 0.
The suggestion of other position formats to the author is encouraged.
After starting the converter, the file ERR.DAT is converted using the source
code file mentioned in the header of ERR.DAT. The resulting error file
is called ERRTEMP.DAT.
The Linker OP2LINK.TTP
----------------------
Prof. Wirth decided to limit the distribution of the Oberon System
sources to his institute until his book about this matter is
published. As a consequence this distribution cannot include the
Oberon System but allows to use Oberon in meaningful way.
(Meanwhile Prof. Wirth's and Prof. Gutknecht's book `Project Oberon,
the design of an Operating System and Compiler', published by
Addison-Wesley in 1992, is available, in which a streamlined version
of the Oberon System is described in source and prose.
Though there isn't enough time for me to implement the Oberon System
on Atari ST, I will try to coordinate requests for implementation.
So, if you are interested in adapting a module of the Oberon System,
please contact me via E- or yellow mail)
A translated module and all his imports can be linked together using
the OP2LINK.TTP linker. The resulting TOS program can be started
as usual. The initialization sequence of the linked module serves as
the main program.
The module always linked as the first one is the runtime system module
RUNTIME. The source code of the runtime system is included in the
distribution for educational reasons. It should NOT be changed, otherwise
the proper operation of the linked program cannot be guaranteed.
The global variable areas of the modules are moved into the BSS segment
which is allocated not until the execution the program.
The memory space reserved for the program during execution is controlled
by the constant 'Runtime.ResMem' which describes the amount of memory remaining
for other programs like accessories. This is (beyond a few others) the only
meaningful situation when the runtime module source code may be changed.
After starting the program OP2LINK.TTP by a double-click on the icon the
name of the module to be linked should be entered, finished by a RETURN.
The resulting file receives the suffix .PRG.
Implementation limitations
--------------------------
Because the time for the study work was limited the author couldn't implement the
following features:
- code for overflow testing in integer multiplication, division, and
modulo is not generated yet;
- passing LONGREAL parameters and returning LONGREAL values isn't implemented;
- neither operand transport nor the operation for real arithmetic are
implemented.
- the reference counter needed to properly free the module in the Oberon System
isn't inserted in the module descriptor.
The details
-----------
For further information the included TeX source of the authors study work
dissertation should be consulted. Due to the local needs this documentation
is written in german, which unfortunately limits the readers extremely.
Nevertheless the author does currently not intend to translate the text to
english.
Other reports in english are listed in the reference part of the work and
can be used as an introduction to the Oberon subject area.
Martin Momberg