[Cabbage PIC]

The Cabbage Compiler


The Cabbage compiler translates a BASIC-like language into the instruction set created by John Walker for his emulator of Charles Babbage's Analytical Engine.

The Cabbage language was developed in two stages: "raw" Cabbage supports only those high-level programming features that can be implemented on top of the existing engine, which include assignment, expressions, and restricted if and while statements. This illustrates in a practical way that Babbage's engine design is equivalent to a modern computer, not just an enhanced calculator (i.e. an improved difference engine).

The second stage of the language, termed "boiled" Cabbage, adds arrays and subroutines which necessitates adding five new instructions to the engine. These allow a wide range of programs to be coded, including a version of the Countess of Lovelace's Bernoulli numbers algorithm. They also offer an opportunity to talk about the early design of hardware and programming languages.



Dr. Andrew Davison
E-mail: ad@fivedots.coe.psu.ac.th
Back to my home page