Difference between revisions of "B programming language"

From Computer History Wiki
Jump to: navigation, search
(External links: Add docs there)
m (External links: + B compiler re-creation)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The '''B''' [[programming language]] was an intermediary between [[BCPL]] and [[C programming language|C]]; very roughly, it is typeless, like BCPL, but has C's syntax.
 
The '''B''' [[programming language]] was an intermediary between [[BCPL]] and [[C programming language|C]]; very roughly, it is typeless, like BCPL, but has C's syntax.
  
In 1969, Doug McIlroy created an implementation of [[TMG]] for the early [[UNIX]] system (on the [[PDP-7]]); this inspired Ken Thompson to produce a [[compiler]] for the machine, which started out to be [[FORTRAN]], but rapidly became the first version of B. The B compiler was re-written from TMG into B itself; apparently all versions produced [[threaded code]], not [[object code]].
+
In 1969, Doug McIlroy created an implementation of [[TMG]] for the early [[UNIX]] system (on the [[PDP-7]]); this inspired Ken Thompson to produce a [[compiler]] for the machine, which started out to be [[FORTRAN]], but rapidly became the first version of B. The B compiler was then re-written from TMG into B itself; apparently all versions produced [[threaded code]], not [[object code]].
  
Dennis Ritchie then produced a [[cross-compiler]], itself in B, which produced object code for a [[GE 635]]. (It was later moved to the [[Honeywell 6000 series|Honeywell 6070]], after Honeywell bought out GE's computer division.) This became quite popular (the use of threaded code in the PDP-7limited its efficiency, and thus use, there), especially at the University of Waterloo in Canada (where it was taken by a Bell Labs alumnus who went there for a while).
+
Dennis Ritchie then produced a [[cross-compiler]], also in B, which produced object code for a [[GE 635]]. (It was later moved to the [[Honeywell 6000 series|Honeywell 6070]], after Honeywell bought out GE's computer division.) This became quite popular (the use of threaded code in the PDP-7 version limited its efficiency, and thus use, there), especially at the University of Waterloo in Canada (where it was taken by Steve Johnson, who went there in 1972 for a sabbatical).
  
 
The later move of B (the threaded code version) to the [[byte]]-[[address]]ed [[PDP-11]] showed the limitation of the [[word]]-addressing model of BCPL and B, and resulted in the creation of C.
 
The later move of B (the threaded code version) to the [[byte]]-[[address]]ed [[PDP-11]] showed the limitation of the [[word]]-addressing model of BCPL and B, and resulted in the creation of C.
  
One interesting historical note: the B tutorial contains the first known instance of a [[Hello, world]] [[program]].
+
One interesting historical note: the B tutorial (below) contains the first known instance of a [[Hello, world]] [[program]].
  
 
==External links==
 
==External links==
Line 13: Line 13:
 
* [http://www.bell-labs.com/usr/dmr/www/bintro.html The Programming Language B]
 
* [http://www.bell-labs.com/usr/dmr/www/bintro.html The Programming Language B]
 
** [http://www.bell-labs.com/usr/dmr/www/btut.html A Tutorial Introduction to the Language B]
 
** [http://www.bell-labs.com/usr/dmr/www/btut.html A Tutorial Introduction to the Language B]
 +
** [http://www.bell-labs.com/usr/dmr/www/kbman.html User's Reference to B]
 
** [http://www.bell-labs.com/usr/dmr/www/bref.html User's Reference to B on MH-TSS]
 
** [http://www.bell-labs.com/usr/dmr/www/bref.html User's Reference to B on MH-TSS]
 +
* [https://github.com/aap/b/tree/master/unix1_bdir B compiler] - a project to re-create it
  
 
==Further reading==
 
==Further reading==
  
Dennis M. Ritchie, ''The Development of the C Language'', Second History of Programming Languages conference, Cambridge, Mass., April, 1993; re-printed in ''History of Programming Languages-II eds. Thomas J. Bergin, Jr. and Richard G. Gibson, Jr. ACM Press (New York) and Addison-Wesley (Reading, Mass), 1996
+
Dennis M. Ritchie, [http://www.bell-labs.com/usr/dmr/www/chist.html ''The Development of the C Language''], Second History of Programming Languages conference, Cambridge, Mass., April, 1993; re-printed in ''History of Programming Languages-II'' eds. Thomas J. Bergin, Jr. and Richard G. Gibson, Jr. ACM Press (New York) and Addison-Wesley (Reading, Mass), 1996
  
 
{{semi-stub}}
 
{{semi-stub}}
  
 
[[Category: Languages]]
 
[[Category: Languages]]

Latest revision as of 15:43, 7 December 2023

The B programming language was an intermediary between BCPL and C; very roughly, it is typeless, like BCPL, but has C's syntax.

In 1969, Doug McIlroy created an implementation of TMG for the early UNIX system (on the PDP-7); this inspired Ken Thompson to produce a compiler for the machine, which started out to be FORTRAN, but rapidly became the first version of B. The B compiler was then re-written from TMG into B itself; apparently all versions produced threaded code, not object code.

Dennis Ritchie then produced a cross-compiler, also in B, which produced object code for a GE 635. (It was later moved to the Honeywell 6070, after Honeywell bought out GE's computer division.) This became quite popular (the use of threaded code in the PDP-7 version limited its efficiency, and thus use, there), especially at the University of Waterloo in Canada (where it was taken by Steve Johnson, who went there in 1972 for a sabbatical).

The later move of B (the threaded code version) to the byte-addressed PDP-11 showed the limitation of the word-addressing model of BCPL and B, and resulted in the creation of C.

One interesting historical note: the B tutorial (below) contains the first known instance of a Hello, world program.

External links

Further reading

Dennis M. Ritchie, The Development of the C Language, Second History of Programming Languages conference, Cambridge, Mass., April, 1993; re-printed in History of Programming Languages-II eds. Thomas J. Bergin, Jr. and Richard G. Gibson, Jr. ACM Press (New York) and Addison-Wesley (Reading, Mass), 1996