Page 1 of 1

Young Persons Guide to BCPL Programming on the Raspberry Pi

Posted: Mon Aug 27, 2012 7:23 am
by hermanhermitage
Martin Richards has a version of BCPL at his home page (http://www.cl.cam.ac.uk/~mr10/index.html) and has put excellent documentation for the RaspberryPi at http://www.cl.cam.ac.uk/~mr10/bcpl4raspi.pdf.

Whilst primarily of historical significance today, BCPL was a tour de force for bootstrapping compilers and operating systems in its day.

The chain of influence of the language itself is roughly: Algol -> CPL -> BCPL -> B -> C -> ...
(BBC Basic takes its indirection operator (addr!offset) from BCPL.)

The legacy of its pioneering use of O-Code / Virtual Machine targeting can be seen all around us today with the popularity of CLR and JVM.

The pillars of BCPL were a pragmatic cleanliness and simplicity combined with the concept of untyped variables but typed operators.

It is an excellent language for someone who wants to learn about low-level programming concepts without getting caught up in the complexities of assembler or C++.

Re: Young Persons Guide to BCPL Programming on the Raspberry

Posted: Tue Aug 28, 2012 5:50 pm
by gordon@drogon.net
hermanhermitage wrote:Martin Richards has a version of BCPL at his home page (http://www.cl.cam.ac.uk/~mr10/index.html) and has put excellent documentation for the RaspberryPi at http://www.cl.cam.ac.uk/~mr10/bcpl4raspi.pdf.

Whilst primarily of historical significance today, BCPL was a tour de force for bootstrapping compilers and operating systems in its day.

The chain of influence of the language itself is roughly: Algol -> CPL -> BCPL -> B -> C -> ...
(BBC Basic takes its indirection operator (addr!offset) from BCPL.)

The legacy of its pioneering use of O-Code / Virtual Machine targeting can be seen all around us today with the popularity of CLR and JVM.

The pillars of BCPL were a pragmatic cleanliness and simplicity combined with the concept of untyped variables but typed operators.

It is an excellent language for someone who wants to learn about low-level programming concepts without getting caught up in the complexities of assembler or C++.
BCPL. Wow. Now there's a big blast from (my) past. I spent a couple of years writing BCPL on BBC Micros for a factory automation / robotics project. Still have the books!

Image

But I have to say that does not make me want to go back to BCPL one little bit. (especilly recomending emacs ;-) I much prefer C now. Great for a bit of history though!

OK: Editing this because I've been using BCPL recently and surprised myself at how versatile it still is after all these years, and when I googled for some BCPL information - this post came up! I do prefer C (and RTB BASIC, of-course), but BCPL still has uses. Amazing.

-Gordon

Re: Young Persons Guide to BCPL Programming on the Raspberry

Posted: Tue Aug 28, 2012 6:28 pm
by xtramural
What a great resource that guide is.

This was also a blast for the past for me since my old prof - Andrew Colin - designed a language based on BCPL called STAB-1* and that was the 2nd language - after Algol 68 - that I learnt/used.

*The implemention of stab-1 - A. J. T. Colin in Software: Practice and Experience Volume 2, Issue 2, pages 137–142, April/June 1972
Abstract
This paper describes the implementation of STAB-1, a BCPL-like language for a small PDP-11 computer. The paper lays considerable emphasis on the actual techniques of implementation, and highlights some of the practical difficulties which were encountered. Finally, the experience gained is distilled into a set of precepts for compiler writers. The paper is seen as mainly tutorial in nature.

Re: Young Persons Guide to BCPL Programming on the Raspberry

Posted: Fri Sep 07, 2012 3:27 am
by scruss
Yes, this is rather good. I just found this article this evening after digging out an old game I wrote in BCPL for the Amstrad CPC. It was an interesting language, even if (for the AMSDOS version) you had to jump through hoops to compile separate code segments.