This commit is contained in:
ceriel 1988-04-11 13:03:14 +00:00
parent eeb2f2ba80
commit 52085d5555
4 changed files with 51 additions and 18 deletions

View file

@ -18,6 +18,7 @@ LLgen
i80.doc
z80.doc
m68020.doc
m2ref.doc
top
ego
occam

View file

@ -14,7 +14,7 @@ RESFILES= \
peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \
basic.$(SUF) crefman.$(SUF) pcref.$(SUF) val.$(SUF) \
6500.$(SUF) i80.$(SUF) z80.$(SUF) top.$(SUF) ego.$(SUF) \
m68020.$(SUF) occam.$(SUF) nopt.$(SUF)
m68020.$(SUF) occam.$(SUF) m2ref.$(SUF)
.SUFFIXES: .doc .$(SUF)
@ -33,6 +33,8 @@ val.$(SUF): val.doc
$(NROFF) val.doc >$@
6500.$(SUF): 6500.doc
$(TBL) 6500.doc | $(NROFF) $(MS) >$@
ncg.$(SUF): ncg.doc
$(TBL) ncg.doc | $(NROFF) $(MS) >$@
LLgen.doc: LLgen.X
LLgen.X:
cd LLgen; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER)

View file

@ -725,8 +725,10 @@ lib are needed for compilation.
The column head i/p contains the integer and pointer size used in units of
bytes.
The subdirectories with the same name in mach contain the sources.
A * in the column headed 'fp' indicates whether floating point can be used
for that particular machine.
A * in the column headed 'fp' indicates that floating point can be used
for that particular machine. A + in that column indicates that floating
point is only available under the '-fp' option. In this case, software
floating point emulation is used.
.TS
c c c c c c c
l l l l l l l.
@ -742,57 +744,61 @@ vax4 VAX/BSD 4.? 4/4 C * vax4 No assembler
Basic
Occam
m68k2 M68000/Unisoft 2/4 C m68k2
m68k2 M68000/Unisoft 2/4 C + m68k2
Pascal
Basic
Occam
m68k4 M68000/Unisoft 4/4 C m68k4
m68k4 M68000/Unisoft 4/4 C + m68k4
Pascal m68k2
Basic
Occam
pmds M68000/PMDS 2/4 C pmds Philips Micro
pmds M68000/PMDS 2/4 C + pmds Philips Micro
Pascal m68k2 Devel. System
Basic
Occam
pmds4 M68000/PMDS 4/4 C pmds4 Philips Micro
pmds4 M68000/PMDS 4/4 C + pmds4 Philips Micro
Pascal m68k2 Devel. System
Basic m68k4
Occam
mantra M68000/SysV.0 4/4 C mantra
mantra M68000/SysV.0 4/4 C + mantra
Pascal m68k2
Basic m68k4
Occam
m68020 M68020/V/68 4/4 C m68020
m68020 M68020/V/68 4/4 C + m68020
R2V2.1 Pascal
Basic
Occam
sun3 SUN 3 R3.0 4/4 C sun3
sun3 SUN 3 R3.0 4/4 C + sun3
Pascal m68020
Basic
Occam
sun2 SUN 2 R3.0 4/4 C sun2
sun2 SUN 2 R3.0 4/4 C + sun2
Pascal m68k4
Basic m68k2
Occam
i86 IBM PC/IX 2/2 C i86 IBM PC with PC/IX
i86 IBM PC/IX 2/2 C + i86 IBM PC with PC/IX
Pascal Causes kernel crashes
Basic
Occam
xenix3 Microsoft Xenix V3 2/2 C + xenix3 IBM AT with Xenix
Pascal i86
Basic
Occam
z8000 Zilog 8000 2/2 C z8000 Central Data
Pascal CPU board
Basic Uses assembler/loader
Occam
int Same as int22
int22 EM machine 2/2 C * int22 Needs interpreter
Pascal
Basic
@ -845,7 +851,7 @@ the Mantra system, etc.
The first one can only interpret 2/2 e.out files,
the other takes 2/4 and 4/4 files.
The PDP 11 interpreter executes floating point instructions.
The interpreter on the PMDS traps if you try to use floating point.
The interpreter for the M68000 traps if you try to use floating point.
.LP
The program \fBem\fP in the bin directory calls the appropriate
interpreter.

View file

@ -50,11 +50,13 @@ ARRAY [0 .. 0] OF CHAR
and contains one character: \f50C\fP.
.PP
When the text of a comment starts with a '\f5$\fP', it may be a pragma.
Currently, two pragmas exist:
Currently, the following pragmas exist:
.DS
.ft 5
(*$F (F stands for Foreign) *)
(*$R[+|-] (Runtime checks, on or off) *)
(*$R[+|-] (Runtime checks, on or off, default on) *)
(*$A[+|-] (Array bound checks, on or off, default off) *)
(*$U (Allow for underscores within identifiers) *)
.ft P
.DE
The Foreign pragma is only meaningful in a \f5DEFINITION MODULE\fP,
@ -67,6 +69,11 @@ range checks,
checks when assigning a \f5CARDINAL\fP to an \f5INTEGER\fP and vice versa,
and checks that \f5FOR\fP-loop control-variables are not changed
in the body of the loop.
Array bound checks can be enabled, because many EM implementations do not
implement the array bound checking of the EM array instructions.
When enabled, the compiler generates a check before generating an
EM array instruction.
Even when underscores are enabled, they still may not start an identifier.
.PP
Constants of type \f5LONGINT\fP are integers with a suffix letter \f5D\fP
(for instance \f51987D\fP).
@ -305,7 +312,9 @@ The detection of this error depends on the EM implementation.
.IP "cardinal overflow"
.br
This error is detected, unless runtime checks are disabled.
This message is also given on cardinal underflow.
.IP "cardinal underflow"
.br
This error is detected, unless runtime checks are disabled.
.IP "real overflow"
.br
The detection of this error depends on the EM implementation.
@ -366,6 +375,21 @@ Calling the compiler
.PP
See [4,5,6] for a detailed explanation.
.NH 1
The procedure call interface
.PP
Parameters are pushed on the stack in reversed order, so that the EM AB
(argument base) register indicates the first parameter.
For VAR parameters, its address is passed, for value parameters its value.
The only exception to this rule is with conformant arrays.
For conformant arrays, the address is passed, and an array descriptor is
passed. The descriptor is an EM array descriptor. It consists of three
fields: the lower bound (always 0), upper bound - lower bound, and the
size of the elements.
The descriptor is pushed first.
If the parameter is a value parameter, the called routine must make sure
that its value is never changed, for instance by making its own copy
of the array.
.NH 1
References
.IP [1]
Niklaus Wirth,