From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ce5a08d3 for ; Mon, 23 Sep 2019 17:26:44 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id CF85F9B528; Tue, 24 Sep 2019 03:26:42 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 23ECD946BD; Tue, 24 Sep 2019 03:26:11 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (1024-bit key; unprotected) header.d=ccc.com header.i=@ccc.com header.b="dcr9/k+k"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 95BB3946BD; Tue, 24 Sep 2019 03:26:09 +1000 (AEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by minnie.tuhs.org (Postfix) with ESMTPS id 564B893F38 for ; Tue, 24 Sep 2019 03:26:08 +1000 (AEST) Received: by mail-wm1-f49.google.com with SMTP id i16so10909058wmd.3 for ; Mon, 23 Sep 2019 10:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FU9E24R/KAgvz/2CcNKpLu0+VcLt+fJUYCEfEHMxrbY=; b=dcr9/k+kSLzythgist0wblB8MPDl8/3kXtUfcwmCYfotEz+STBJmuJ7I4UiravwWXx ysGypRmlU2VuBb1Ig8VSBSZylrjKhz//4p2SzSPvCuywGYPfu2sK6E7vNYlSEdw6FGKM /IOB7JnxpRnoyYHXu6s1qWKHMNDfBAkAKelzk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FU9E24R/KAgvz/2CcNKpLu0+VcLt+fJUYCEfEHMxrbY=; b=qYDXfXd8fkFVYoyi2VqrPOa+0d+w4daaR47Lk5AFfs9hm8ak2EzvvdOG0EOzI67yAs vonP1dkhT0FgOH/rqCvgX69ZQoXdjQL7bQpT3gG5vZiZc5RAGM2z8/rUC8/tiOq9Rs6h HK3EnEtsfQ5Wj8CV0lfj9bNiYsbjQXlmVHUhXXMkDlYFWz6UkTZNars3YSKpzx/ep0pe Y91rYbJ+5LMwvr5Rjh5aFJhy2gMG5IehmK1BPWOorFAe8YmH5CedeBovCbpa/FZFkodr xmvzIfBdtUMmKLjnvKH01ucJTDFjkZRSosDh7CO+JsUB6sePNW0VlLgXC2zcXUa7Fmo7 92FQ== X-Gm-Message-State: APjAAAVKEI2lmvGMvAGzHMwI7izGQ8FKMcHLQLuww930OuEhsn6SVt6m qEpnYMhRUbvx9EG+FYnb7XEUXq6zmnkd0KhGOlnb5g== X-Google-Smtp-Source: APXvYqyGczE843RruD2Yv9HtXZ8ceNM42cV6NeUWNICItanIPHKmPmajBxLgV6mEMM3n2WVHZVGQx7rDNuPWVGpu19w= X-Received: by 2002:a7b:c203:: with SMTP id x3mr611360wmi.8.1569259566577; Mon, 23 Sep 2019 10:26:06 -0700 (PDT) MIME-Version: 1.0 References: <20190920225350.GA26132@fuz.su> In-Reply-To: <20190920225350.GA26132@fuz.su> From: Clem Cole Date: Mon, 23 Sep 2019 13:25:40 -0400 Message-ID: To: Robert Clausecker Content-Type: multipart/alternative; boundary="00000000000006cee005933bb745" Subject: Re: [TUHS] 8bc -- a B compiler for the PDP-8 X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000006cee005933bb745 Content-Type: text/plain; charset="UTF-8" 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. --00000000000006cee005933bb745 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
below...

On Fri, Sep 20, 2019 at = 7:08 PM Robert Clausecker <fuz@fuz.su&= gt; wrote:
Greet= ings!

As a project for our university's seminar on the PDP-8 I wrote a
compiler for the B language targeting it.

Ver= y cool.
=C2= =A0 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,=C2=A0 =C2= =A0Load TSS/8 on to your simh system with its=C2=A0Algol compiler and look = at how it generated code.=C2=A0 I would suspect you can use Algol's cal= ling conventions and probably some of its runtime.=C2=A0 =C2=A0Google is yo= ur friend.=C2=A0 I had it running a while back, but do not have it active a= t the moment - the key is all the pieces should be findable in the wild,.
=C2=A0

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 be= en, 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.=C2= =A0 I would not be surprised if there was a BCPL/8.=C2=A0 I would check in = the DECUS library, much of which I think can be found online these days ??b= it savers??.=C2=A0

FWIW: I= IRC, the Grenoble Algol, a DEC Fortran and DEC Focal (plus assembler) were = the languages I remember on TSS/8.=C2=A0 I came late and short lived to the= PDP-8 world and did not do much with it.=C2=A0 So there could have been/un= likely were more.=C2=A0 =C2=A0The 8 Gordon Bell and his students had used t= o 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 weeken= d in about 1976 I think, a couple of us hacked on it to make it swap to pap= er tape=C2=A0- you got about 2-4K of storage max (the read is destructive and much more than that the = tape ripped/got tangled).=C2=A0 But it worked enough we got the beers and p= izza and we claimed success for proving it could be done.=C2=A0 =C2=A0Sadly= I have long ago lost that code for that hack.=C2=A0 =C2=A0The PDP-8 we use= d 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.=C2=A0=C2=A0=
--00000000000006cee005933bb745--