Email: info (at) nordier.com Mobile: +27 81 363 1607 Location: Sandton, South Africa
I work for a US-based semiconductor company as the lead software engineer responsible for C compiler development. The software made available here generally reflects an interest in C and UNIX, and the earlier history of computing.
V7/x86 is a port of the Seventh Edition of the UNIX operating system to the x86 (IA-32) based PC. UNIX V7 was the last general distribution (around 1979) to come from the Research group at Bell Labs, the original home of UNIX. The port was done mostly around 1999 when "Ancient UNIX" source code licenses first became available, and was revised for release, with some enhancements, during 2006-7.
The distribution includes the full UNIX Version 7 operating system, with source code, pre-built binaries, man pages, and original Version 7 documentation. Also included are a custom UNIX-style x86 assembler, an ACK-based C compiler, and several key early UCB software components such as the C shell, the editors ex and vi, and the pager more.
V7/x86 currently supports ATA (IDE) hard drives, ATAPI CDROM drives, a 1.44M floppy drive, and standard serial ports, in addition to the usual PC screen and keyboard. For easier installation and setup, supplied utilities allow access to CD (ISO 9660) and FAT (MS-DOS) filesystems. Source code is available under a Berkeley-style license.
The v7/x86 distribution is available either as a small ISO9660 CD image:
which is complete in itself, or split up into primary components:
The larger files are compressed with bzip2 and will require bunzip2 to decompress them.
UNIX Version 7 comes with a comprehensive set of documentation, including man pages (/usr/man) and additional (/usr/doc) documents. The V7/x86 policy has generally been to update man pages to reflect changes due to the x86 port, but to leave the additional documents unchanged, since these are usually attributable to individual authors.
There are presently a few supplementary v7/x86 documents available:
The distribution is supplied primarily as a small (less than 4M, compressed) CD image. Download this and burn it onto a CD. The resultant CD is bootable, and runs V7/x86 off a memory-based filesystem, ending up in a menu-driven install program. The install program handles the simple case of installing from CD to a hard disk partition.
Note that the install program expects to install to an existing V7/x86 hard disk partition. This can be created with any fdisk compatible utility that allows the partition type to be specified. The V7/x86 partition type is 0x72 (114 decimal).
Through use of a boot manager, V7/x86 can co-exist on the same machine with other x86 operating systems.
If, for one reason or another, you are unable to use the CD-based install, another approach would be to put the boot image on a floppy disk, boot from that, and use (say) the FAT (MS-DOS) filesystem utilities to transfer the distribution tarball. In this case, you would have to do most of the install "by hand", but the process is reasonably straightforward, and you can refer to the shell script the install program uses (in /usr/lib/install) to check on the steps needed.
V7/x86 is also made available pre-installed as a virtual machine package, and this is probably the easiest way to take a look at it:
The V7/x86 virtual machine package is usable with various emulators and virtualization applications. These include Bochs, VMware products such as Player and Workstation, and Oracle VirtualBox. (Tested using Bochs 2.5.1, VMware Player 4.0.3, and VirtualBox 3.2.6.)
For Bochs, the supplied bochsrc file is what is needed.
For VMware, use the .vmx file.
For VirtualBox, add the .vmdk file using the media manager and then set up a simple virtual machine from scratch (Operating System: Other; Version: Other/Unknown; Memory: 16 megabytes).
BCPL was apparently first implemented by Martin Richards at MIT around 1967, and was a widely-used systems programming language during the 1970s. However, it is chiefly remembered nowadays, because it directly inspired the programming language B, which in turn gave rise to the immensely successful language C.
To anyone interested in the whys and wherefores of C, a passing acquaintance with BCPL is worthwhile. Viewed forwards through BCPL, rather than backwards through Java and C++, many C constructs, and idiomatic C ways of doing things, just make a lot more sense.
Beyond its historical importance, BCPL had intrinsic merits. In retrospect, what particularly impresses, is the elegant simplicity of its compiler. This is well documented in the book BCPL: the language and its compiler by Martin Richards and Colin Whitby-Strevens (Cambridge: Cambridge University Press, 1979).
In its heyday, a great virtue of BCPL was portability. Through the use of INTCODE (a simple assembly language for an abstract machine), the problem of first bringing up the compiler on a new platform was reduced to that of coding an INTCODE interpreter in some high-level language. Such a task might take only a day or two.
The focus here is on "classic" BCPL, as it was around 1979, and the implementations are very close to that described in the BCPL book.
This is an x86 (IA-32) port of the "classic" old BCPL compiler (around 1980) from the Tripos Research Group at Cambridge University. This is a distribution suitable for compiling and running a range of older BCPL programs on 64-bit and 32-bit Linux and FreeBSD systems
As a real, working computer language implementation, that can be studied, modified, and played with, this old BCPL compiler has a good deal to recommend it. The compiler frontend consists of only about 2,000 lines of BCPL code, and (as supplied here) compiles to a static (fully-linked) x86 binary that is less than 36,000 bytes in size.
The present distribution supplies a compiler backend (OCODE to x86 code generator), together with peephole optimizer, and reasonably extensive runtime support. A few revisions have been made to the compiler frontend -- it looks for header files in a standard location, for instance -- and the runtime incorporates support for UNIX command line arguments and error reporting. Some documentation that formed part of the original BCPL distribution tape is also included, as are a few utility programs.
Download the latest distribution: obcpl-0.9.8.tar.xz.
An earlier distribution presents the Cambridge BCPL porting kit, with an INTCODE interpreter and an INTCODE to x86 code generator. Again, the primary version is for FreeBSD and Linux systems. This is a less capable compiler, and the obcpl distribution is to be preferred unless you are interested in INTCODE specifically.
Download the latest distribution: bcplkit-0.9.7.tar.xz.
Also available are the original BCPL distribution files that the other distributions make use of. The direct source of these files was a tar archive "bcpltape.tgz" that was originally made available -- around 1991, I would guess -- by Ken Yap. The archive consists of a brief README and fifty-five files named "f01" to "f75", twenty files not being present. The README notes that the supplied archive contains all the files from Martin Richards' "transport" tape with the exception of IBM360 object files. The Cambridge files have date stamps early in November 1984.
As the original porting kit archive seemed to have dropped off the web when I went looking for it, I am making it available here. In redistributing it, I have corrected a number of character mapping problems, apparently caused by incompatible EBCDIC dialects, and have assigned meaningful names to the files and grouped them in directories according to internal evidence.
Download the bcpltape distribution: bcpltape.tar.xz
The Classic BCPL for Windows distribution from David Cannon makes use of portions of the software supplied here, and is a simple solution to the problem of compiling old BCPL programs on that platform.
Martin Richards, the originator of BCPL, has continued to develop the language, and has a large and complex distribution of "present day" BCPL available, together with some archive materials, at his home page.