related topics
{math, number, function}
{system, computer, user}
{language, word, form}
{son, year, death}
{film, series, show}
{theory, work, human}
{village, small, smallsup}

BCPL (Basic Combined Programming Language) is a computer programming language designed by Martin Richards of the University of Cambridge in 1966.



Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still felt because a stripped down and syntactically changed version of BCPL, called B, was the language upon which the C programming language was based. BCPL was the first curly bracket programming language, and the curly brackets survived the syntactical changes and have become a common means of denoting program source code statements. In practice, on limited keyboards of the day, source programs often used the sequences $( and $) in place of the symbols { and }. The single-line '//' comments of BCPL, which were not taken up in C, reappeared in C++, and later in C99.

BCPL was a response to difficulties with its predecessor CPL, created during the early 1960s; Richards created BCPL by "removing those features of the full language which make compilation difficult". The first compiler implementation, for the IBM 7094 under CTSS, was written while Richards was visiting Project MAC at MIT in the spring of 1967. The language was first described in a paper presented to the 1969 Spring Joint Computer Conference.

The language is clean, powerful, and portable. It therefore proved possible to write small and simple compilers for it; reputedly some compilers could be run in 16 kilobytes. In addition, the Richards compiler, itself written in BCPL, was easily portable. BCPL was therefore a popular choice for bootstrapping a system.

A major reason for the compiler's portability lay in its structure. It was split into two parts: the front end parsed the source and generated O-code for a virtual machine, and the back end took the O-code and translated it into the code for the target machine. Only 1/5th of the compiler's code needed to be rewritten to support a new machine, a task that usually took between 2 and 5 man-months. This approach became common practice later, e.g., Pascal or Java, but the Richards BCPL compiler was the first to define a virtual machine for this purpose.

The language is unusual in having only one data type: a word, a fixed number of bits, usually chosen to align with the architecture's machine word and of adequate capacity to represent any valid storage address. For many machines of the time, this data type was a 16-bit word. This choice later proved to be a significant problem when BCPL was used on machines in which the smallest addressable item was not a word, but a byte or on machines with larger word sizes: 32-bit and 64-bit words, which allowed them to manage large address spaces.

Full article ▸

related documents
Data element
Context-free language
Mnemonic dominic system
Common Language Infrastructure
Lint (software)
Z notation
List of Fourier-related transforms
Poem code
IBM Business System 12
Entropy encoding
Online algorithm
Recursive language
Linearity of integration
Euler's theorem
Hilbert's Nullstellensatz
Product of group subsets
Constant folding
Dining cryptographers protocol
Surjective function
Group object
Discrete mathematics
The Third Manifesto
De Bruijn-Newman constant
Sigmoid function
Hurwitz polynomial