BCPL (2022)

原始链接: https://www.cl.cam.ac.uk/~mr10/BCPL.html

BCPL is a simple, typeless programming language created in 1966 by Martin Richards. An interpretive implementation is available for free academic and private use. Distribution files (bcpl.tgz or bcpl.zip) can be downloaded, but be aware of potential browser decompression issues. The distribution includes BCPL and C source files, demonstration programs, and an experimental native code version for Linux and DEC Alpha. A version for the GP2X handheld is in development. An older version is available, but the current version is recommended for Cintpos compatibility. Key changes include a new compiler with cross-referencing and environment variables like BCPLROOT, BCPLPATH, and BCPLHDRS. A Windows CE version has also been upgraded. The distribution includes related languages like MCPL and VSPL, the Cintpos operating system, and benchmark tools, and a precompiled VSPL version for Windows is provided, requiring setup via `setupwin32.bat`.

A Hacker News comment discusses BCPL, a programming language. The commenter, ColinWright, used BCPL extensively during their PhD. They learned BCPL to overcome a compiler bug in Pascal encountered while participating in a CoNeutron competition. After discovering a bug in the Pascal compiler, they switched to BCPL. The translated BCPL code ran ten times faster, making their player nearly unbeatable. They even outperformed a player created by David Seal, running on then-new ARM processors. The commenter’s computational environment included ForTran, the zed line editor, and batch-control, all running on an IBM3084Q with the Phoenix OS.
相关文章

原文
BCPL

In recent years many people have kindly offer me links to translations of this web page into other languages. Unfortunately I am no longer permitted by the department to include these links so the link below has been disabled.

BCPL is a simple typeless language that was designed in 1966 by Martin Richards and implemented for the first time at MIT in the Spring of 1967.

A machine independent interpretive implementation of BCPL is available free of charge for private and academic purposes. If you would like to install it on your machine, have a look at the distribution README file and obtain a copy of bcpl.tgz. or bcpl.zip. The sizes and dates of creation of these files can be found in FILES.

BEWARE: Your browser may silently decompress bcpl.tgz producing a .tar file with name bcpl.tgz. If this happens, it can be de-tarred using: tar xvf bcpl.tgz rather than the expected tar zxvf bcpl.tgz. Your browser may suggest you write the file to bcpl.tgz.gz. If this happens make sure you make the target bcpl.tgz.

This distribution includes all BCPL and C the source files, a collection of demonstration BCPL programs and an experimental native code version running on Linux and DEC Alpha machines. A version for the GP2X handheld linux machine has just been added (but is still under development). As an aside the Cintpos portable operating system is also soon be available for this wonderful little handhend machine.

An older rather out of date version of BCPL is still available via BCPL23-4-04.html. But I no longer recommend that you use it.

The current version is much more compatible with the Cintpos distribution. The main changes are the use of a new BCPL compiler with some extensions including a cross-referencing facility, changes in the directory structure and the use of the environment variables BCPLROOT, BCPLPATH and BCPLHDRS (in place of CINTCODE and BCPLPATH). The Windows CE version of this system has also been upgraded, and, as of 13 July 2004, its distribution seems to work at least on my HP 620LX running Windows CE 2.0.

Free Distribution

This distribution assumes the following overall directory structure:
|
*--BCPL          -- bcpl.tgz or bcpl.zip, 32-bit Cintcode BCPL
|  |
|  *--cintcode
|  |
|  *--bcplprogs
|  |
|  *--natbcpl
|
*--BCPL64         -- bcpl64.tgz or bcpl64.zip, 64-bit Cintcode BCPL
|  |
|  *--cintcode
|  |
|  *--bcplprogs
|  |
|  *--natbcpl    -- Not yet available
|
*--MCPL          -- mcpl.tgz or mcpl.zip
|  |                A typeless language related to BCPL, ML, C and prolog
|  *--mintcode
|  |
|  *--mcplprogs
|  |
|  *--natmcpl
|
*--Cintpos       -- cintpos.tgz or cintpos.zip, a Cintcode interpretive
|  |                version of the Tripos Portable Operating System
|  *--cintpos
|
*--Bench         -- bench.tgz or bench.zip
|  |                A language independent benchmark
|  *--src
|
*--Cobench       -- cobench.tgx or cobench.zip
|                   A language independent benchmark for BCPL style
|                   coroutines
|
*--Tcobench      -- tcobench.tgz or tcobench.zip
|                   A language independent benchmark using both threads and
|                   BCPL style coroutines. (Under development)
|
*--VSPL          -- vspl.tgz or vspl.zip
                    A complete compiler and interpreter for a simple but
                    not trivial language called VSPL. It is implemented
                    in several different ways using several different
                    implemetation languages including BCPL, C, and java.
                    The BCPL version is about 21 pages long.

A precompiled version for Windows is included in the standard distribution as the file os/windows/wincintsys.exe. It can be recompiled using Microsoft Visual C. To run it, edit the file setupwin32.bat and the execute it.

An advantage of an interpretive system is that it is easy to generate data relating memory references to time. Such data can be used to produce a picture of the execution of a program, for example RASTERps.zip contains an A4 sized Postcript diagram of a version of the BCPL compiler compiling itself.

WARNING

This distribution is new and still somewhat unpolished, but even so, it may still be of interest.

My home page.

Martin Richards, last modified 31 March 2022

联系我们 contact @ memedata.com