Am 08.11.2017 um 23:48 schrieb Paul Gilmartin:
On Wed, 8 Nov 2017 23:20:41 +0100, Bernd Oppolzer wrote:
Just to give an example, how small a runtime library can be:

my New Stanford Pascal compiler has a runtime library, which is also linked 
with every
Pascal program (in the same way as Dave describes). The Pascal compiler itself 
is
a Pascal program (ca. 15.000 lines at the moment - pass one, generating P-Code; 
the
P-Code is later translated to 370 machine code, which is done in pass two, 
which has
another 12000 lines). For the following discussion, PASCAL1 (pass one) only 
serves as
an example of a (large) Pascal program.

"P-Code" sounds like jargon from UCSD Pascal, which I brushed against 30+ years 
ago.
There was no pass two; there was an interpreter for the P-Code.

(In other jargon) The runtime library was a single large load module which was
linked with every program.  But there was a "smart linker" which filtered that 
large
object and deleted every unreferenced CSECT, making the executable as small as
possible.

-- gil


"P-Code" is a portable representation of the Pascal program, invented by Niklaus Wirth et al at ETH Zuerich in the 1970s. It was generated by the Pascal P-4 compiler, and the idea was to make compiler ports to other machines easier; only a translator from P-Code
to the target machine had to be built.

My compiler is a direct descendant of the P-4 compiler:

(********************************************************************)
(* *)
(*         S T A N F O R D   P A S C A L   C O M P I L E R          *)
(* *)
(*              OPPOLZER VERSION                                    *)
(* *)
(* *)
(*         AUTHOR OF ORIGINAL PROGRAM:                              *)
(* *)
(*              URS AMMANN                                          *)
(*              FACHGRUPPE COMPUTERWISSENSCHAFTEN                   *)
(*              EIDG. TECHNISCHE HOCHSCHULE                         *)
(*              CH-8006 ZUERICH                                     *)
(* *)
(* *)
(*         AUTHOR OF SECOND VERSION:                                *)
(* *)
(*              KESAV NORI                                          *)
(*              COMPUTER GROUP                                      *)
(* T.I.F.R.                                            *)
(*              HOMI BHABHA ROAD                                    *)
(*              BOMBAY - 400005                                     *)
(* INDIA                                               *)
(* *)
(* *)
(*         AUTHOR OF THIRD VERSION (STANFORD PASCAL):               *)
(* *)
(*              S. HAZEGHI                                          *)
(*              COMPUTATION RESEARCH GROUP                          *)
(*              STANFORD LINEAR ACCELERATOR CENTER                  *)
(*              STANFORD, CA. 94305.                                *)
(* *)
(* *)
(*         AUTHOR OF FOURTH VERSION (MCGILL PASCAL):                *)
(* *)
(*              R. NIGEL HORSPOOL                                   *)
(*              SCHOOL OF COMPUTER SCIENCE                          *)
(*              MCGILL UNIVERSITY                                   *)
(*              MONTREAL  QUEBEC  H3A 2K6                           *)
(* *)
(* *)
(*         AUTHOR OF This VERSION (Oppolzer Version):               *)
(* *)
(*              Bernd Oppolzer                                      *)
(* Diplom-Informatiker                                 *)
(*              Baerenhofstr. 23                                    *)
(*              D-70771 Leinfelden-Echterdingen                     *)
(* Germany                                             *)
(* *)
(*==================================================================*)

The timeline is:

ca. 1979: third version at Stanford
ca. 1982: fourth version at McGill
ca. 2007: last changes by Dave Edwards (died in 2008, unfortunately)
2011: I ported the McGill version to VM 370/R6 on Hercules
12.2016: I ported the compiler to Windows, OS/2 and Linux
(by creating the P-Code interpreter and making the P-Code "really" portable,
which - in fact - it wasn't)
04.2017: MVS port
05.2017: MacOS port by Rene Jansen, z/OS verification

... work continues ...

Wikipedia link:

https://en.wikipedia.org/wiki/P-code_machine

there are two P-Code descriptions on the New Stanford compiler website;
the new one needs again some rework:

http://bernd-oppolzer.de/pcode.pdf (from March 1978)
http://bernd-oppolzer.de/pcode.txt (from 2016)

Kind regards

Bernd

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to