BCPL

To port BCPL from the IBM 7094 to the CDC 6400 I needed to follow an intricate process that left me wondering what to do next. It will make you dizzy if you forget the distinction among programs written in three different languages: BCPL, UNCOL, and 6400 machine language. Here is a diagram of the steps, proceeding from left to right, starting at the bottom.

Working in the evenings at the computer center, I got out the 6400 manual and figured out how to translate each UNCOL instruction into 6400 machine code. It was easy after I decided how to use the particular parts of the 6400’s processing unit. I don’t know if Richards was familiar with CDC machines when designing UNCOL, but it was still easy. Because the translation was so simple, I could write a 6400 machine language program and use it to translate Phase 1 in UNCOL into machine language. (Step 1)

Next, I wrote a new Phase 2 in BCPL, combined it with the Phase 1 in BCPL from Richards, and compiled the whole thing into UNCOL using the Phase 1 machine code (Step2) and then into machine code using the machine language translator I’d written (Step 3).

Finally, I used the complete machine code compiler to compile the complete BCPL compiler into machine code (Step 4) and compared the results which matched, happily.