The interpreter is "Wirth Level 1 Compliant", which I define as the ability to execute N. Wirth's single pass compiler to compile its own sources :) The bootstrapping process to get there relied heavily on Jos' emulator, which I used to build thesingle pass compiler with the earlier multipass compiler (not so easy, by the way!).
Inspired by Jos Dreesen's Lilith emulator and following his[...]
recent discovery of the ETHZ M2 single pass compiler sources, I
decided to build my own take of a runtime environment for the
compiler and the M-code object files it generates.
Instead of emulating the Lilith machine on a microcode level, my
design interprets the M-code opcodes directly. Also, several core
functions of Lilith's original Medos-2 operating system are
carried out by the interpreter itself, which allows the design to
become less dependent on the original Lilith machine architecture
and also improves performance. The main areas concerned are
object file loading and staging, memory management and OS-level
file and device management.
The bottomline of this approach (and the most pronounced
difference to Jos Dreesen's emulator) is that It no longer
faithfully simulates the historic Lilith machine. In particular,
the interpreter (currently) lacks the bit-mapped graphic
capabilities of the original machine. On the plus side however,
it is now possible to run (character-based) Modula-2 programs in
a standard terminal environment. Also, we can read/write files in
the UNIX file system directly. And finally, code and data no
longer share the same limited address space as in the Lilith,
although this advantage might be considered theoretical at best
in 2022 :)
Everything is still work in progress and there are plenty of rough edges, but you can check out a beta version at[...]
https://github.com/ghoss/m2emul
Cheers,
Guido
single pass compiler with the earlier multipass compiler (not so easy, by the way!).The interpreter is "Wirth Level 1 Compliant", which I define as the ability to execute N. Wirth's single pass compiler to compile its own sources :) The bootstrapping process to get there relied heavily on Jos' emulator, which I used to build the
There has been available, from Emulith's beginning, a binary of the single-pass compiler . Would it not have been simpler to use that ?
Otherwise, nice development !
Jos
I look forward to seeing this good work completed.
As a side issue, Andreas Borchert did a fair amount of work that
included a Lilith emulator, linker, and others tools. His work is here: https://github.com/afborchert/lilith (Caveat is that his C source is
K&R1 but there are tools to correct that.)
N
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 406 |
Nodes: | 16 (2 / 14) |
Uptime: | 107:59:09 |
Calls: | 8,527 |
Calls today: | 6 |
Files: | 13,209 |
Messages: | 5,920,352 |