below... On Fri, Sep 20, 2019 at 7:08 PM Robert Clausecker wrote: > Greetings! > > As a project for our university's seminar on the PDP-8 I wrote a > compiler for the B language targeting it. Very cool. > It's a bit rough around > the edges and the runtime code needs some work (division and > remainder are missing), but it does compile B code correctly, > generating acceptable code (for my taste, though the function call > sequence could be better). > A suggestion, Load TSS/8 on to your simh system with its Algol compiler and look at how it generated code. I would suspect you can use Algol's calling conventions and probably some of its runtime. Google is your friend. I had it running a while back, but do not have it active at the moment - the key is all the pieces should be findable in the wild,. > > I hope some of you enjoy this compiler for an important historical > language for an important historical computer (makes me wonder why > the two weren't married before). > Might have been, although when Ken created B for the PDP-7, BCPL was his model and there were already implementations of BCPL around for a number of processors. I would not be surprised if there was a BCPL/8. I would check in the DECUS library, much of which I think can be found online these days ??bit savers??. FWIW: IIRC, the Grenoble Algol, a DEC Fortran and DEC Focal (plus assembler) were the languages I remember on TSS/8. I came late and short lived to the PDP-8 world and did not do much with it. So there could have been/unlikely were more. The 8 Gordon Bell and his students had used to write it, was in the EE Dept at the time and most unused because we hard started to collect PDP-11s. But I do have a fondness for the TSS/8, because on a bet, one summer weekend in about 1976 I think, a couple of us hacked on it to make it swap to paper tape - you got about 2-4K of storage max (the read is destructive and much more than that the tape ripped/got tangled). But it worked enough we got the beers and pizza and we claimed success for proving it could be done. Sadly I have long ago lost that code for that hack. The PDP-8 we used was a very early 8 that CMU had and at one point was in donated to Boston Computer Museum/was on display until the museum closed.