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 i80.doc
z80.doc z80.doc
m68020.doc m68020.doc
m2ref.doc
top top
ego ego
occam occam

View file

@ -14,7 +14,7 @@ RESFILES= \
peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \ peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \
basic.$(SUF) crefman.$(SUF) pcref.$(SUF) val.$(SUF) \ basic.$(SUF) crefman.$(SUF) pcref.$(SUF) val.$(SUF) \
6500.$(SUF) i80.$(SUF) z80.$(SUF) top.$(SUF) ego.$(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) .SUFFIXES: .doc .$(SUF)
@ -33,6 +33,8 @@ val.$(SUF): val.doc
$(NROFF) val.doc >$@ $(NROFF) val.doc >$@
6500.$(SUF): 6500.doc 6500.$(SUF): 6500.doc
$(TBL) 6500.doc | $(NROFF) $(MS) >$@ $(TBL) 6500.doc | $(NROFF) $(MS) >$@
ncg.$(SUF): ncg.doc
$(TBL) ncg.doc | $(NROFF) $(MS) >$@
LLgen.doc: LLgen.X LLgen.doc: LLgen.X
LLgen.X: LLgen.X:
cd LLgen; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER) 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 The column head i/p contains the integer and pointer size used in units of
bytes. bytes.
The subdirectories with the same name in mach contain the sources. The subdirectories with the same name in mach contain the sources.
A * in the column headed 'fp' indicates whether floating point can be used A * in the column headed 'fp' indicates that floating point can be used
for that particular machine. 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 .TS
c c c c c c c c c c c c c c
l l l l l l l. l l l l l l l.
@ -742,57 +744,61 @@ vax4 VAX/BSD 4.? 4/4 C * vax4 No assembler
Basic Basic
Occam Occam
m68k2 M68000/Unisoft 2/4 C m68k2 m68k2 M68000/Unisoft 2/4 C + m68k2
Pascal Pascal
Basic Basic
Occam Occam
m68k4 M68000/Unisoft 4/4 C m68k4 m68k4 M68000/Unisoft 4/4 C + m68k4
Pascal m68k2 Pascal m68k2
Basic Basic
Occam Occam
pmds M68000/PMDS 2/4 C pmds Philips Micro pmds M68000/PMDS 2/4 C + pmds Philips Micro
Pascal m68k2 Devel. System Pascal m68k2 Devel. System
Basic Basic
Occam Occam
pmds4 M68000/PMDS 4/4 C pmds4 Philips Micro pmds4 M68000/PMDS 4/4 C + pmds4 Philips Micro
Pascal m68k2 Devel. System Pascal m68k2 Devel. System
Basic m68k4 Basic m68k4
Occam Occam
mantra M68000/SysV.0 4/4 C mantra mantra M68000/SysV.0 4/4 C + mantra
Pascal m68k2 Pascal m68k2
Basic m68k4 Basic m68k4
Occam Occam
m68020 M68020/V/68 4/4 C m68020 m68020 M68020/V/68 4/4 C + m68020
R2V2.1 Pascal R2V2.1 Pascal
Basic Basic
Occam Occam
sun3 SUN 3 R3.0 4/4 C sun3 sun3 SUN 3 R3.0 4/4 C + sun3
Pascal m68020 Pascal m68020
Basic Basic
Occam Occam
sun2 SUN 2 R3.0 4/4 C sun2 sun2 SUN 2 R3.0 4/4 C + sun2
Pascal m68k4 Pascal m68k4
Basic m68k2 Basic m68k2
Occam 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 Pascal Causes kernel crashes
Basic Basic
Occam 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 z8000 Zilog 8000 2/2 C z8000 Central Data
Pascal CPU board Pascal CPU board
Basic Uses assembler/loader Basic Uses assembler/loader
Occam Occam
int Same as int22
int22 EM machine 2/2 C * int22 Needs interpreter int22 EM machine 2/2 C * int22 Needs interpreter
Pascal Pascal
Basic Basic
@ -845,7 +851,7 @@ the Mantra system, etc.
The first one can only interpret 2/2 e.out files, The first one can only interpret 2/2 e.out files,
the other takes 2/4 and 4/4 files. the other takes 2/4 and 4/4 files.
The PDP 11 interpreter executes floating point instructions. 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 .LP
The program \fBem\fP in the bin directory calls the appropriate The program \fBem\fP in the bin directory calls the appropriate
interpreter. interpreter.

View file

@ -50,11 +50,13 @@ ARRAY [0 .. 0] OF CHAR
and contains one character: \f50C\fP. and contains one character: \f50C\fP.
.PP .PP
When the text of a comment starts with a '\f5$\fP', it may be a pragma. 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 .DS
.ft 5 .ft 5
(*$F (F stands for Foreign) *) (*$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 .ft P
.DE .DE
The Foreign pragma is only meaningful in a \f5DEFINITION MODULE\fP, 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, checks when assigning a \f5CARDINAL\fP to an \f5INTEGER\fP and vice versa,
and checks that \f5FOR\fP-loop control-variables are not changed and checks that \f5FOR\fP-loop control-variables are not changed
in the body of the loop. 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 .PP
Constants of type \f5LONGINT\fP are integers with a suffix letter \f5D\fP Constants of type \f5LONGINT\fP are integers with a suffix letter \f5D\fP
(for instance \f51987D\fP). (for instance \f51987D\fP).
@ -305,7 +312,9 @@ The detection of this error depends on the EM implementation.
.IP "cardinal overflow" .IP "cardinal overflow"
.br .br
This error is detected, unless runtime checks are disabled. 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" .IP "real overflow"
.br .br
The detection of this error depends on the EM implementation. The detection of this error depends on the EM implementation.
@ -366,6 +375,21 @@ Calling the compiler
.PP .PP
See [4,5,6] for a detailed explanation. See [4,5,6] for a detailed explanation.
.NH 1 .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 References
.IP [1] .IP [1]
Niklaus Wirth, Niklaus Wirth,