Coder Social home page Coder Social logo

lilith-emulator's Introduction

Historic Lilith emulator

This is a Lilith emulator which I developed and used in 1983 to bootstrap a Modula-2 compiler from the Lilith architecture to the Perkin Elmer 3220 architecture.

At that time I had a PDP 11/40 available, and a Perkin Elmer 3220 machine, sources for the Modula-2 compiler for the Lilith, and the binaries (including sources) for the PDP-11 machine. The goal was to develop a Modula-2 compiler for the Perkin-Elmer 3220 architecture.

I couldn't crossdevelop that compiler on the PDP 11 as this machine was available for some limited time only (it was put out of service just months afterwards I have used it) and because of its painful memory restrictions. The latter would have enforced me to use a 5-pass architecture like that of the compiler for the PDP-11 as opposed to the simpler 4-pass architecture for the Lilith. This required me to write an emulator. I had the choice between an emulator for the PDP-11 or the Lilith and chose the latter as documentation was available and the Lilith architecture seemed to be significantly simpler.

As I had no binaries of the Lilith compiler in Lilith code, I had to cross compile it on the PDP-11 using the Modula-2 compiler for the PDP-11:

     +------------------------+          +------------------------+
     | Modula-2        Lilith |          | Modula-2        Lilith |
     +------+          +------+----------+------+          +------+
	    | Modula-2 | Modula-2        PDP-11 |  PDP-11  |
	    +----------+------+          +------+----------+
			      |  PDP-11  |
			      +----------+

In the next step it was possible to generate the Lilith code. (There was some challenge, though, as this compiler was somewhat too big for the PDP-11 architecture. This step worked out once I stripped everything out of the sources which was not required to let the compiler compile itself.)

     +------------------------+          +------------------------+
     | Modula-2        Lilith |          | Modula-2        Lilith |
     +------+          +------+----------+------+          +------+
	    | Modula-2 | Modula-2        Lilith |  Lilith  |
	    +----------+------+          +------+----------+
			      |  PDP-11  |
			      +----------+

The resulting code was moved to the Perkin-Elmer 3220 architecture and run by emulator which is to be found in the src directory.

At that time we run UNIX Edition VII from Wollongong on the Perkin-Elmer 3220 architecture. We had just a C compiler which was derived from the original C compiler developed by Kernighan and Ritchie. In consequence, you'll find in the src directory ancient K&R style. At that time I didn't care much about portability issues and was just happy that it worked out to bootstrap the Modula-2 compiler. I never intended to polish up this code or use it for another purpose. It was intended as a temporary project only which took me one week to develop.

It is now quite impossible to get this running again under a recent C compiler or a recent system. No ANSI C compiler will accept this code and even if everything gets tweaked such that it is accepted, it still won't run because there exist far too many portability issues. The emulator depends on an evaluation order generated by the K&R compiler at multiple occassions which, however, was never guaranteed by C. The only method to get this code running is to compile and run it under an emulator for this ancient architecture using an installation of UNIX Edition VII which is fortunately now freely available.

Links:

I make this code available under the terms of the GNU General Public License (see the attached file LICENSE) for the purpose of documenting a historic development process.

See https://github.com/afborchert/lilith for more infos.

Andreas F. Borchert

lilith-emulator's People

Contributors

afborchert avatar

Stargazers

 avatar Mtv Europe avatar Fidel H Viegas avatar Guido Hoss avatar Norayr Chilingarian avatar R. S. Doiel avatar Lars Brinkhoff avatar Jeffrey H. Johnson avatar fugio avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.