<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 5/11/25 6:28 AM, Jackson Helie G
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFmyUGFcRSN6=d5EngK85jdGBeE-F9VKgauwo-zVgAo0hzxyQg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">I checked Dennis M. Ritchie's "Users' Reference to
        B" and found an example of implementing a B program at the
        bottom of the manual. It said that bc generates intermediate
        code suitable for ba, and then ba generates assembly code. So, I
        am curious about what the intermediate code generated by bc is?</div>
    </blockquote>
    <p>I found this reference
(<a class="moz-txt-link-freetext" href="https://www.softwarepreservation.org/projects/BCPL/cambridge/Richards-Bootstrapping_BCPL-1973.pdf">https://www.softwarepreservation.org/projects/BCPL/cambridge/Richards-Bootstrapping_BCPL-1973.pdf</a>)
      written by Martin Richards about the intermediate code of BCPL. I
      never saw or used B, but this is one possibility.</p>
    <p>But it seems very different from C compilers prior to the
      Portable C Compiler, even though code generation was table driven
      (<a class="moz-txt-link-freetext" href="https://wolfram.schneider.org/bsd/7thEdManVol2/ctour/ctour.html">https://wolfram.schneider.org/bsd/7thEdManVol2/ctour/ctour.html</a>).<br>
    </p>
    <p>Note, before the RTS group at Project MAC started using UNIX, we
      had a home-written operating system for PDP-11/45 and PDP-11/70. I
      got a BCPL compiler from somewhere and made some enhancements -
      such as direct support for external variables and routines using a
      linker rather than the pure BCPL global array. When RTS got access
      to a VAX-11/780 running VMS, I was able to modify the Sixth or
      Seventh edition C compiler to generate code for the VAX-11/780 and
      wrote enough of a compatibility library to port various C programs
      to VMS. All that vanished once we were able to install 4BSD on the
      VAX-11/780. The machine was shared by the people doing the NIL
      project (New Implementation of LISP) on the VAX. I don't remember
      the details, but this paper coauthored by Guy Steele
      (<a class="moz-txt-link-freetext" href="https://www.dreamsongs.com/Files/HOPL2-Uncut.pdf">https://www.dreamsongs.com/Files/HOPL2-Uncut.pdf</a>) implies that
      NIL shifted their efforts to a different target machine: "In 1978,
      Gabriel and Guy Steele set out to implement NIL [Brooks, 1982a] on
      the S-1 Mark IIA, a supercomputer being designed and built by the
      Lawrence Livermore National Laboratory [Correll, 1979; Hailpern,
      1979]."
      <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.9px Helvetica; color: #000000}</style></p>
  </body>
</html>