That is an awesome story!  Things were a little easier on MIPS at SiCortex because the MIPS 5KF core had a mode in which it could fetch instructions from JTAG,...slowly.  That was good enough to initialize the registers and initialize the cache, at which point you could run regular C code to initialize the DRAM controllers, as long as you didn't cause a miss :)

On Mar 11, 2024, at 8:30 PM, ron minnich <rminnich@gmail.com> wrote:


One of the neatest compilers I worked with was Eric Biederman's romcc.

"romcc is a C compiler which produces binaries which do not rely on RAM, but
instead only use CPU registers."

We used romcc for 15 years or so. It was critical to getting DRAM and Hypertransport topology working on the Opteron. Remember: at power-on/reset, RAM is dead, dead, dead, and getting it going on newer systems is (literally) billions of instructions. So, no ram. The only "ram" romcc had were the general purpose registers. Later, eric added support for the SIMD registers, and "memory" grew a few hundred bytes. No memory, no stack: 100% inlining. romcc knew how to use puddle arithmetic and all the other tricks. It was amazing.

It is a full ANSI C compiler (as of 2006 ANSI C) in 25KLOC code, in one file: https://github.com/wt/coreboot/blob/master/util/romcc/romcc.c

The story of its creation, as told to me by the Linux NetworX CTO ca 2004: Eric worked at Linux NetworX at the time, and they were shipping LinuxBIOS-based systems. Everyone working with Opteron was suffering with assembly. Eric vanished for 30 days, and on the 31st day returned from the mountain (or his apartment I guess) with romcc, and It Was Good. Really good. The code we wrote for Opteron Hypertransport was far better than AMDs; they even admitted it to us later.  We could even run with empty Socket 0; they could not. 

Last I checked, it still builds and 100 or so regression tests work just fine.



On Mon, Mar 11, 2024 at 3:28 PM Peter Yardley <peter.martin.yardley@gmail.com> wrote:
I used the DEC VMS C compiler extensively while I was at NSWIT. I ported a lot of Berkley (I think) C code to VMS. Some of their VLSI design suite, KIC etc. There weren’t a lot of changes to make, the compiler and library was pretty K&R from what I remember. The usual small header issues applied. VMS IO is a bit different from UNIX IO  but they had a mode (stream I think) that meant minimal changes to UNIX code.

http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/vax/lang/c/AI-L370C-TE_Guide_to_VAX_C_V2.3_Mar1987.pdf

It did help that the code I was working with was pretty damn good. I learn C porting KIC to VMS.

> On 12 Mar 2024, at 7:44 AM, Marc Rochkind <mrochkind@gmail.com> wrote:
>
> Since it came up in this thread, here's my review of Coherent in BYTE Magazine (1985):
>
> https://www.mrochkind.com/mrochkind/docs/Byte-Pick-Coherent-Theos.pdf
>
> Marc
>
> On Mon, Mar 11, 2024 at 11:13 AM Paul Ruizendaal <pnr@planet.nl> wrote:
> On Thu, Mar 7, 2024, 4:14 PM Tom Lyon <pugs78 at gmail.com> wrote:
>
> > For no good reason, I've been wondering about the early history of C
> > compilers that were not derived from Ritchie, Johnson, and Snyder at Bell.
> > Especially for x86.  Anyone have tales?
> > Were any of those compilers ever used to port UNIX?
>
> An unusual one would be the “revenue bomb” compiler that Charles Simonyi and Richard Brodie did at Microsoft in 1981.
>
> This compiler was intended to provided a uniform environment for the menagerie of 8 and 16-bit computers of the era. It compiled to a byte code which executed through a small interpreter. This by itself was hardly new of course, but it had some unique features. It generated code in overlays, so that it could run a code base larger than 64KB (but it defined only one data segment). It also defined a small set of “system” commands, that allowed for uniform I/O. I still have the implementation spec for that interpreter somewhere.
>
> This compiler was used for the first versions of Multiplan and Word, and my understanding is that the byte code engine was later re-used in Visual Basic. I think the compiler also had a Xenix port, maybe it even was Xenix native (and at this time, Xenix would still essentially have been V7).
>
> I am not sure to what extent this compiler was independent of the Bell compilers. It could well be that it was based on PCC, Microsoft was a Unix licensee after all and at the time busy doing ports. On the other hand, Charles Simonyi would certainly have been capable of creating his own from scratch. I do know that this compiler preceded Lattice C, the latter of which was distributed by Microsoft as Microsoft C 1.0.
>
> Maybe others know more about this Simonyi/Brodie compiler?
>
> Paul
>
> Notes:
> http://www.memecentral.com/mylife.htm
> https://web.archive.org/web/20080905231519/http://www.computerworld.com/softwaretopics/software/appdev/story/0%2C10801%2C76413%2C00.html
> http://seefigure1.com/images/xenix/xenix-timeline.jpg
>
>
> --
> My new email address is mrochkind@gmail.com

Peter Yardley
peter.martin.yardley@gmail.com