In 2011 I discovered a running version of Stanford Pascal on MUSIC/SP. This is an improved 1982 version (by McGill university) of 1979 Stanford Pascal which is part of some Hercules distributions. At that time, I already had a working version of VM/370 R6 running on Hercules on my Windows PC.
On Hercules VM, there was the 1979 Stanford version. My goal was to replace this by the 1982 McGill version. Because the compiler is able to compile itself, this first seemed no big problem. But soon I realized that the 1982 language is extended compared with the 1979 language, and the compiler uses these extensions excessively. So the 1982 compiler could not be compiled by the 1979 compiler.
For example, one of the extensions: structured constants:
|
The structured constants are headed by a const keyword, much the same way as simple constants, but in contrast to the simple constants, they appear after the type and var declarations. This is necessary, because the types have to be defined already, because the structured constants reference them.
The 1979 Stanford compiler didn't understand those structured constants. So I had to do a real bootstrap of the 1982 compiler to Hercules, that is: find a way to move the TEXT files (object files) to Hercules, and then maybe run them to compile the compiler on Hercules (which is kind of optional). I did this by encoding/decoding the binary object files into a real "text" format (hex encoding) and transferred them as textfiles.
The compiler then worked on Hercules, and the first correction I made was to fix some year-2000 problems: the date output on the compiler listing showed 1911, which I fixed by doing some date heuristics in PASMONN ASSEMBLE (the Pascal monitor and runtime).