Home
 Gallery
 Mad Tech
 Cars
 KDF9
 Project Details
 Testing
 Links

 Vamoosh
 Denham Broadband
 Locostbuilders
 Speedcentral

 About Me
 Contact Info

KDF9 Simulator

This page contains details of a simulator that I wrote for the KDF9 computer. This was my submission for a project for one of my degree modules: History of Computing. A working version of the simulator can be seen here, and I have included some sample KDF9 programs. Note that the simulator is a Java Applet.


Introduction to the KDF9

The KDF 9 was a computer system dating from the early 1960s. Designed and built by English Electric, the machine was based on a stack architecture and was sold primarily as a scientific machine – For example, there was one installed at the National Physical Laboratory. Unlike the machines being built by rivals such as IBM, the machine was aimed almost exclusively at number crunching, and had very limited support for useful text output.

For its time, the machine was regarded as being fairly quick – this was due to its clever stack architecture and its advanced electronics. The machine was based on solid state, transistorised electronics – integrated circuits had not been perfected at the time. The problem that the designers found was that memory was either very slow, or unjustifiably expensive. As such they decided on a new approach to the design of the system – the main store was made of the relatively cheap, but slow and bulky magnetic core stores – a small magnetic core was used to store each individual bit. To allow the machine to operate quickly, a few small stores were constructed from transistor-based circuitry. One of these stores, the main stack, had a capacity of 16 words of 48 bits each, and all arithmetic instructions in the machine operated directly on this store. The intention being that nearly all numerical processing could be done outside of the slow main store, with numbers being fetched or stored only when absolutely necessary. The example programs included show how algorithms could be coded to use the stack only.

At the time of the KDF 9’s design, machines were all programmed directly in assembler. English Electric identified this as a problem and designed the machine so that it could be programmed in a higher-level language, Algol-60 as well as the KDF 9 user code. With this approach, another relatively new technology was required – the compiler, and a great deal of early knowledge in the field of compiler design came from this project.

English Electric was producing a development of the KDF 9, codenamed “Python.” However, commercial events overtook the development and it was scrapped in favour of an IBM System-360 compatible machine, the System 4 However, a few years later, when English Electric had grown into ICL through several mergers, the ICL2900 was developed. This was a machine based on the “Python” project that incorporated all of the advancements in design from the KDF 9, including stacks that were limited in size only by the amount of system memory available. Another company, Burroughs were also producing stack-based machines that were very similar to the KDF 9, which used a development of Algol-60 as their primary language. The Burroughs range (B5500, B5700 and B6700) also included support for data-tagging (making the machine aware of the type of each number stored) as well as advanced multi-processing capabilities on multi-processor systems.

The stack architecture has largely died out now, mainly due to the popular Intel architecture that uses registers, and only supports stacks in software. Also, with the development of relatively cheap, fast memory, the need for two different types of store has been removed. Interestingly, the Java Virtual Machine, for which this simulator is written, utilises a wholly stack-based architecture. The above text shows that, while ignored by many sources, the KDF 9 was an important machine in the history of computing.



Simulator Limitations

Currently, the simulator has the following limitations, compared with the original system:
  • No integer overflow checking
      The KDF9 had an overflow register that was set if the result of any calculation had been truncated because it required more than 48 bits (for a single-length integer) or 96 bits (for a double-length integer). The simulator has no checking for this, but is limited by the size of the long integer in Java (64 bits).
  • No float or double support
      The simulator only supports single-length integers, and there is no support for double-length integers or floating-point numbers. A few instructions have been implemented for double-length integers, but this has only been done where no specific implementation of this type is required. Note that the KDF9 itself was not able to distinguish between different types of number itself.
  • No Support for V-Store
      KDF9 provided a memory system known as the V-store that was used for storing constants
  • No Support for Input/Output
      No support is included for any input/output other than what appears on the main screen, e.g. Line Printers.
  • No concept of a syllable
      Instructions in KDF9 user code do not take up a single amount of memory – this amount was given in terms of a syllable (8 bits), with up to 3 syllables per instruction. This limitation is only a problem when dealing with certain advanced jump and addressing functions.