Share
VIDEOS 1 TO 50
BCPL Dibrugarh
BCPL Dibrugarh
Published: 2016/03/11
Channel: SudheeProducts
PM inaugurates BCPL at Lepetkata in Dibrugarh, Assam
PM inaugurates BCPL at Lepetkata in Dibrugarh, Assam
Published: 2016/02/05
Channel: PMO India
BCPL, C2+ Recovery GSU Unit
BCPL, C2+ Recovery GSU Unit
Published: 2015/01/19
Channel: prasanta gogoi
BCPL Labour Died CISF incident- PRASANTA.mp4
BCPL Labour Died CISF incident- PRASANTA.mp4
Published: 2012/03/06
Channel: prasanta gogoi
BCPL
BCPL
Published: 2016/12/30
Channel: MONIKANCHAN BORA
BCPL Dibrugarh (GSU & C2+ Unit)
BCPL Dibrugarh (GSU & C2+ Unit)
Published: 2016/12/04
Channel: Tamagna Ghosh
BCPL Program with loop and if statement.
BCPL Program with loop and if statement.
Published: 2013/07/27
Channel: redbear8174
BCPL
BCPL
Published: 2015/10/27
Channel: Audiopedia
Bcpl
Bcpl
Published: 2013/06/22
Channel: sunder rajan
BCPL Summer Reading 2016
BCPL Summer Reading 2016
Published: 2016/05/20
Channel: boonelibrary
BCPL | Bhopal Corporate Premier League
BCPL | Bhopal Corporate Premier League
Published: 2017/04/21
Channel: Bhopal Corporate Premier League
Tatoeage workshop BCPL Holz
Tatoeage workshop BCPL Holz
Published: 2017/06/05
Channel: S tB
BCPL TV commercial
BCPL TV commercial
Published: 2012/05/24
Channel: White Warbler Communications Pvt. Ltd.
BCPL -1, Dibrugarh.
BCPL -1, Dibrugarh.
Published: 2011/12/06
Channel: sunny20rocky
Keith Law talks Smart Baseball with BCPL
Keith Law talks Smart Baseball with BCPL
Published: 2017/04/21
Channel: bcplonline
BCPL Tournament 2017 at mhada colony ferbunder
BCPL Tournament 2017 at mhada colony ferbunder
Published: 2017/02/06
Channel: Pinkesh Ghadi
Adventure Month at BCPL
Adventure Month at BCPL
Published: 2017/07/05
Channel: boonelibrary
BCPL Thanks Its Friends
BCPL Thanks Its Friends
Published: 2014/10/17
Channel: bcplonline
Make a Solar Chandelier with BCPL
Make a Solar Chandelier with BCPL
Published: 2015/08/14
Channel: bcplonline
Super Sixes In BCPL 2015
Super Sixes In BCPL 2015
Published: 2015/12/19
Channel: TennisCricket.in
BCPL ASSAM
BCPL ASSAM
Published: 2013/09/19
Channel: ranjeetprasad25
Play Minecraft at BCPL
Play Minecraft at BCPL
Published: 2016/08/24
Channel: Bullitt County Public Library
BCPL Offers New Digital Resources
BCPL Offers New Digital Resources
Published: 2017/08/31
Channel: bcplonline
Impressie Workshops BCPL Holz 2017
Impressie Workshops BCPL Holz 2017
Published: 2017/06/07
Channel: S tB
Play The Borrowing Game with BCPL!
Play The Borrowing Game with BCPL!
Published: 2016/07/19
Channel: bcplonline
BCPL township under construction
BCPL township under construction
Published: 2011/12/06
Channel: sunny20rocky
BCPL - Ahomiya
BCPL - Ahomiya
Published: 2016/06/22
Channel: SudheeProducts
Popcorn Reviews with BCPL - Check Out DVDs Now Available at BCPL
Popcorn Reviews with BCPL - Check Out DVDs Now Available at BCPL
Published: 2016/11/01
Channel: bcplonline
BCPL PRODUCT WARE HOUSE  460 mtr Long Building
BCPL PRODUCT WARE HOUSE 460 mtr Long Building
Published: 2015/02/12
Channel: prasanta gogoi
Passport Services at BCPL
Passport Services at BCPL
Published: 2016/06/14
Channel: bcplonline
Paula Miller Presents the 2017 BCPL Annual Report
Paula Miller Presents the 2017 BCPL Annual Report
Published: 2017/09/08
Channel: bcplonline
BCPL Youtube Trailer
BCPL Youtube Trailer
Published: 2013/11/13
Channel: bcplonline
Best Catches In BCPL 2015, Bandra
Best Catches In BCPL 2015, Bandra
Published: 2015/12/21
Channel: TennisCricket.in
BCPL Program to add two numbers.
BCPL Program to add two numbers.
Published: 2016/01/09
Channel: redbear8174
See the latest summer reading challenge from BCPL
See the latest summer reading challenge from BCPL
Published: 2017/06/26
Channel: WBAL-TV 11 Baltimore
Free Play With BCPL: RBI Baseball 2017, Lock
Free Play With BCPL: RBI Baseball 2017, Lock's Quest, Injustice 2
Published: 2017/08/07
Channel: bcplonline
Taste of the Town a Smashing Success for BCPL
Taste of the Town a Smashing Success for BCPL
Published: 2016/05/23
Channel: bcplonline
BCPL
BCPL's Makerspace Programming
Published: 2015/09/15
Channel: bcplonline
Inside BCPL 2 - How Does BCPL Buy Books and Get Them in the Library?
Inside BCPL 2 - How Does BCPL Buy Books and Get Them in the Library?
Published: 2011/08/18
Channel: bcplonline
BCPL Participates in The Mannequin Challenge
BCPL Participates in The Mannequin Challenge
Published: 2016/11/10
Channel: bcplonline
Inside BCPL shows you helpful BCPL databases
Inside BCPL shows you helpful BCPL databases
Published: 2011/12/16
Channel: bcplonline
The BCPL Digital Book Mobile Is Bringing E-Books Around Baltimore County
The BCPL Digital Book Mobile Is Bringing E-Books Around Baltimore County
Published: 2017/07/08
Channel: CBS Baltimore
BCPL Welcomes Page the Dragon at its Towson Branch
BCPL Welcomes Page the Dragon at its Towson Branch
Published: 2015/09/09
Channel: bcplonline
BCPL part 2, lepetkata, dibrugarh
BCPL part 2, lepetkata, dibrugarh
Published: 2011/12/06
Channel: sunny20rocky
BCPL Dental Health Storytime
BCPL Dental Health Storytime
Published: 2014/02/27
Channel: bcplonline
Inside BCPL - Between the Covers!
Inside BCPL - Between the Covers!
Published: 2014/04/03
Channel: bcplonline
BCPL Sr. Engineer (Chemical) का Interview Call Letter Download कैसे करें
BCPL Sr. Engineer (Chemical) का Interview Call Letter Download कैसे करें
Published: 2017/01/05
Channel: Jobs Window
Video: Take the BCPL, WBAL-TV Reading Challenge
Video: Take the BCPL, WBAL-TV Reading Challenge
Published: 2017/01/02
Channel: WBAL-TV 11 Baltimore
HSS at BCPL 2016
HSS at BCPL 2016
Published: 2016/05/05
Channel: Melissa H
Save May 14th for BCPL
Save May 14th for BCPL's Taste of the Town
Published: 2016/03/02
Channel: bcplonline
NEXT
GO TO RESULTS [51 .. 100]

WIKIPEDIA ARTICLE

From Wikipedia, the free encyclopedia
Jump to: navigation, search
BCPL
Paradigm procedural, imperative, structured
Designed by Martin Richards
First appeared 1966; 51 years ago (1966)
Typing discipline typeless (everything is a word)
Influenced by
CPL
Influenced
B, C, Go[1]

BCPL ("Basic Combined Programming Language"; or 'Before C Programming Language' (common humorous backronym)[2] ) is a procedural, imperative, and structured computer programming language. 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 on which the C programming language was based. BCPL introduced several features of modern programming languages, including curley braces notation for code blocks; compilation via virtual machine byte code; and the world's first 'hello world' demonstrator program.

Design[edit]


BCPL was designed so that small and simple compilers could be written for it; reputedly some compilers could be run in 16 kilobytes. Further, the original compiler, itself written in BCPL, was easily portable. BCPL was thus a popular choice for bootstrapping a system.[citation needed] 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/5 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 original BCPL compiler was the first to define a virtual machine for this purpose.[citation needed]

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 such as 32-bit or 64-bit.[citation needed]

The interpretation of any value was determined by the operators used to process the values. (For example, + added two values together treating them as integers; ! indirected through a value, effectively treating it as a pointer.) In order for this to work, the implementation provided no type checking. The Hungarian notation was developed to help programmers avoid inadvertent type errors.[citation needed]

The mismatch between BCPL's word orientation and byte-oriented hardware was addressed in several ways. One was providing standard library routines for packing and unpacking words into byte strings. Later, two language features were added: the bit-field selection operator and the infix byte indirection operator (denoted by the '%' character).[citation needed]

BCPL handles bindings spanning separate compilation units in a unique way. There are no user-declarable global variables; instead there is a global vector, which is similar to "blank common" in Fortran. All data shared between different compilation units comprises scalars and pointers to vectors stored in a pre-arranged place in the global vector. Thus the header files (files included during compilation using the "GET" directive) become the primary means of synchronizing global data between compilation units, containing "GLOBAL" directives that present lists of symbolic names, each paired with a number that associates the name with the corresponding numerically addressed word in the global vector. As well as variables, the global vector also contains bindings for external procedures. This makes dynamic loading of compilation units very simple to achieve. Instead of relying on the link loader of the underlying implementation, effectively BCPL gives the programmer control of the linking process.[citation needed]

The global vector also made it very simple to replace or augment standard library routines. A program could save the pointer from the global vector to the original routine and replace it with a pointer to an alternative version. The alternative might call the original as part of its processing. This could be used as a quick ad hoc debugging aid.[citation needed]

BCPL was the first brace programming language, and the braces 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 adopted by C, reappeared in C++ and later in C99.

The book BCPL: The language and its compiler describes the philosophy of BCPL as follows:[citation needed]

"The philosophy of BCPL is not one of the tyrant who thinks he knows best and lays down the law on what is and what is not allowed; rather, BCPL acts more as a servant offering his services to the best of his ability without complaint, even when confronted with apparent nonsense. The programmer is always assumed to know what he is doing and is not hemmed in by petty restrictions."[citation needed]

Examples[edit]

Print factorials:

GET "LIBHDR"

LET START() = VALOF $(
        FOR I = 1 TO 5 DO
                WRITEF("%N! = %I4*N", I, FACT(I))
        RESULTIS 0
$)

AND FACT(N) = N = 0 -> 1, N * FACT(N - 1)

Count solutions to the N queens problem:

GET "LIBHDR"

GLOBAL $(
        COUNT: 200
        ALL: 201
$)

LET TRY(LD, ROW, RD) BE
        TEST ROW = ALL THEN
                COUNT := COUNT + 1
        ELSE $(
                LET POSS = ALL & ~(LD | ROW | RD)
                UNTIL POSS = 0 DO $(
                        LET P = POSS & -POSS
                        POSS := POSS - P
                        TRY(LD + P << 1, ROW + P, RD + P >> 1)
                $)
        $)

LET START() = VALOF $(
        ALL := 1
        FOR I = 1 TO 12 DO $(
                COUNT := 0
                TRY(0, 0, 0)
                WRITEF("%I2-QUEENS PROBLEM HAS %I5 SOLUTIONS*N", I, COUNT)
                ALL := 2 * ALL + 1
        $)
        RESULTIS 0
$)

History[edit]

BCPL was designed by Martin Richards of the University of Cambridge in 1966. BCPL was a response to difficulties with its predecessor, Cambridge Programming Language, later renamed Combined Programming Language (CPL), which was designed 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 Compatible Time-Sharing System (CTSS), was written while Richards was visiting Project MAC at the Massachusetts Institute of Technology (MIT) in the spring of 1967. The language was first described in a paper presented to the 1969 Spring Joint Computer Conference.[citation needed]

BCPL has been rumored to have originally stood for "Bootstrap Cambridge Programming Language", but CPL was never created since development stopped at BCPL, and the acronym was later reinterpreted for the BCPL book.[clarification needed][citation needed]

BCPL is the language in which the original hello world program was written.[3] The first MUD was also written in BCPL (MUD1).

Several operating systems were written partially or wholly in BCPL (for example, TRIPOS and the earliest versions of AmigaDOS). BCPL was also the initial language used in the seminal Xerox PARC Alto project, the first modern personal computer; among other projects, the Bravo document preparation system was written in BCPL.

An early compiler, bootstrapped in 1969, by starting with a paper tape of the O-code of Martin Richards's Atlas 2 compiler, targeted the ICT 1900 series. The two machines had different word-lengths (48 vs 24 bits), different character encodings, and different packed string representations—and the successful bootstrapping increased confidence in the practicality of the method.

By late 1970, implementations existed for the Honeywell 635 and Honeywell 645, the IBM 360, the PDP-10, the TX-2, the CDC 6400, the UNIVAC 1108, the PDP-9, the KDF 9 and the Atlas 2. In 1974 a dialect of BCPL was implemented at BBN without using the intermediate O-code. The initial implementation was a cross-compiler hosted on BBN's Tenex PDP-10s, and directly targeted the PDP-11s used in BBN's implementation of the second generation IMPs used in the Arpanet.

There was also a version produced for the BBC Micro in the mid-1980s, by Richards Computer Products, a company started by John Richards, the brother of Dr. Martin Richards.[4] The BBC Domesday Project made use of the language. Versions of BCPL for the Amstrad CPC and Amstrad PCW computers were also released in 1986 by UK software house Arnor Ltd. MacBCPL was released for the Apple Macintosh in 1985 by Topexpress Ltd, of Kensington, England.

Both the design and philosophy of BCPL strongly influenced B, which in turn influenced C.[citation needed] Programmers at the time debated whether an eventual successor to C would be called "D" (the next letter in the alphabet) or "P" (the next letter in the parent language name). As it happened, the actual name turned out to be "C++" (a pun on the C language increment operator).[citation needed]

In 1979, implementations of BCPL existed for at least 25 architectures; the language gradually fell out of favour as C became popular on non-Unix systems.

Martin Richards maintains a modern Linux version of BCPL on his website, last updated in 2011. He continues to program in it, including for his research on musical automated score following.

References[edit]

  1. ^ Pike, Rob (2014-04-24). "Hello Gophers". Retrieved 2016-03-11. 
  2. ^ Expert C Programming: Deep C Secrets by Peter Van Der Linden (Prentice Hall, 1994)
  3. ^ BCPL, Jargon File
  4. ^ RCP

Further reading[edit]

  • Martin Richards, The BCPL Reference Manual (Memorandum M-352, Project MAC, Cambridge, MA, USA, July, 1967)
  • Martin Richards, BCPL - a tool for compiler writing and systems programming (Proceedings of the Spring Joint Computer Conference, Vol 34, pp 557–566, 1969)
  • Martin Richards, Arthur Evans, Robert F. Mabee, The BCPL Reference Manual (MAC TR-141, Project MAC, Cambridge, MA, USA, 1974)
  • Martin Richards, C. Whitby-Strevens, BCPL, the language and its compiler (Cambridge University Press, 1980) ISBN 0-521-28681-6

External links[edit]

Disclaimer

None of the audio/visual content is hosted on this site. All media is embedded from other sites such as GoogleVideo, Wikipedia, YouTube etc. Therefore, this site has no control over the copyright issues of the streaming media.

All issues concerning copyright violations should be aimed at the sites hosting the material. This site does not host any of the streaming media and the owner has not uploaded any of the material to the video hosting servers. Anyone can find the same content on Google Video or YouTube by themselves.

The owner of this site cannot know which documentaries are in public domain, which has been uploaded to e.g. YouTube by the owner and which has been uploaded without permission. The copyright owner must contact the source if he wants his material off the Internet completely.

Powered by YouTube
Wikipedia content is licensed under the GFDL and (CC) license