Stantec Zebra

This page is an edited chapter excerpt from Early British Computers, and their Emulation by Kristian Brooks. This page will soon be split into two: the background of the system and the emulators, and the emulators themselves.

The Stantec ZEBRA computer was designed in 1956 by Willem van der Poel and built in Newport, South Wales. One of the engineers at the Newport facility where the ZEBRA was manufactured was Don Hunter (1928 – 2021), a hugely influential figure in computing, and the author of the first (and most capable) ZEBRA emulator.

Stantec is Standard Telephone & Cable, a large company that, at one point, was the primary manufacturer and distributor of undersea telephone and telegraph cable, and is the origin of fibre-optic communications and pulse-code modulation (PCM), both of which are used all over the world nowadays. ZEBRA means Zeer Eenvoudig Biner Reken-Automaat, literally “Very Easy Binary Calculating Machine” or “very simple binary computer”.

Don worked in Cambridge on the EDSAC in his early years, before moving to Stantec to work on their STEP-1 computer, later having a hand in designing and building the ZEBRA under a contract with the Dutch telecoms organizations. Hunter later started his own software company, consulted for various companies including Oracle, and ran the last known surviving Elliot 903 mainframe from his home until he donated it to Andrew Herbert as a gift.

There were, of course, ZEBRAs also sold to companies – one designed sails for yachts, one created feed for cattle, and the Stantec facility itself had a few in operation. They were used for telephone traffic simulations, for calculating the optimal configurations for fibre optics, and for teaching computing to schools.

One student at Glamorgan Technical College – Rod Delamere, later an engineer at the very same Stantec factory as Hunter – reminisced:

it was necessary to travel to STC in Newport every other week to test the programs we had prepared in Simple Code for the Stantec Zebra.

The ZEBRA’s main lasting impact on modern computing is the work done on it by George Hockham and Charles Kao: proving the viability of fibre-optic cables as a data transfer medium. All modern network infrastructure can be directly traced to the work Hockham and Kao did on the ZEBRA between 1958 and 1966. Interestingly, Kao also married one of the engineers of the ZEBRA in 1959.

 

The Stantec ZEBRA, in a promotional leaflet. 1: Processor 2: Control Deck 3: Accessory/Memory Unit

Mark 1

The Zebra uses a drum for memory and has 8000 words of 33 bits each – for a total of 264,000 bits, or 33,000 bytes (though it doesn’t use bytes).

Van der Poel went through several iterations of computer designs before landing on the Zebra; from the simple Testudo, to the more advanced Zero, then onto Ptera, and finally the perfected design of Zebra, each design increasing in complexity, performance and capability.

Ultimately, the Zebra became a revolutionary product for the late 50s – van der Poel remarks on the engineering of Stantec:

The perfect engineering of Standard Telephones & Cables must be credited with the head switching mechanism. It contained transistor switches, very advanced for their time and fast enough to switch between heads in the inter-word gap, which was only seven bits long. That was very remarkable. There were other innovations, too: the back plane wiring was printed circuitry - also very revolutionary.

The Zebra had 600 vacuum tubes in the full machine, less than the Pilot ACE, and a small number for the time. This was due to the creative design of the instruction set – the first 15 bits in a machine-code instruction set a physical gate that routed data around the machine, allowing for a huge combination of effects through whatever you wanted to do in the system.

Every vacuum tube was stored on a module, which could be swapped in and out if something went wrong - also revolutionary compared to most other computers of the time.

 

A single vacuum tube from the cabinet of the Stantec ZEBRA.

 

 

The Zebra also had a couple of different programming methods. There was, of course, the native instruction set referred to as “Normal Code”. Nowadays, we’d regard this as a textual representation, much like some ASM nowadays is a textual representation of machine-code instructions.

There is also “Simple Code”, which is extremely similar to the EDSAC’s instruction set; similar enough that most EDSAC programs will run on the Zebra. A notable change from EDSAC is the introduction in the Zebra of an index register, as well as a pre-packaged library of subroutines for convenience, something the EDSAC didn’t get until a later revision.

This Simple Code is what was primarily used in education, as it was very easy to teach, to reason about, and to write in exercise books. Unfortunately, it seems that very few of these exercise books still remain – but a preservation effort for this documentation is still ongoing.

 

Rod Delamere's Journal, containing notes made during programming lessons using the Stantec ZEBRA.

 

There were also some other language interpreters created for the Zebra. Hunter remarks about a Matrix interpreter, as well as a fully compliant ALGOL compiler. However, neither of these were really used over the Normal Code or Simple Code, both of which were load-and-go.

ZEBRA’s overall architecture was very much parallel, allowing multiple operations at one time to converge on a specific set of logic gates to speed up the time to calculate certain things. The drum was arranged so that you could maximise read time for data, and has the fastest data access time of any computer built around the same time. The ZEBRA even came with an Efficiency Meter built-in, which could measure how much time was spent waiting for data to move around the system; 100% meaning that there was no waiting at all.

The Zebra was used in a lot of educational institutions, such as the University of Wales’ College of Cardiff (later Cardiff University) which used their ZEBRA from 1962 to 1969, as well as UWIST - University of Wales Institute of Science and Technology  -  which later merged into Cardiff University, as well as Bradford University, on top of Peterborough Technical College and Leicester Regional College of Technology.

Bradford University was a hotspot of activity for the Zebra, as it is where R. J. Ord-Smith wrote and published “The STANTEC-ZEBRA Simple Code and its Interpretation”.

 

Mark 2

In 1960, two years after the ZEBRA was released onto the market, Stantec released a version 2 of the computer. This version used transistors, as opposed to the vacuum tubes of the earlier model.

There are two known intact ZEBRA computers in the world at the time of writing. One is in the National Museum of Wales National Collections Centre at Nantgarw (a machine I had the privilege to be able to look at and inspect closely), and one is at the private Technikum29 museum in Frankfurt (to which a visit is planned). Notably, both are of the Mark2 variety.

 

The control panel of the Stantec ZEBRA at the National Collection Centre of the National Museum of Wales, Nantgarw.

 

The ZEBRA at the Technikum29 museum is marked with the serial number “102”, possibly implying that more than 100 ZEBRAs were built in total, but most sources (including Don Hunter and Willem van der Poel) say that Stantec only sold approximately 50 of them.

The Mark 2 is a much smaller machine overall than the Mark1, which mostly comes down to the advantage of the transistors being far smaller.

The size difference is very noticeable if you compare the illustration of a “Typical Stantec Computer system installation” from one of the ZEBRA manuals, to what both the National Museum of Wales and the private museum have physically present; the illustration contains 2 processor racks (there’s more than just the processor in the racks, but for now we’ll just refer to them as the processor racks), but the Mark2 computers only have 1 rack each.

 

Snow
Forest

Seeing as the Mark 2 is the only instance of the computer that still survives – and only 2 of them, to boot – a short technical analysis on the computer seems prudent.

The ZEBRA Mark 2 constitutes 5 main components (plus 2 accessories): these are the Control Deck, two Interface Wings, the Processor, and the Memory Drum. The accessories are a teletype (used for text and numerical output, which uses an interesting software-synthesized communication protocol), and a punch card reader (for program input).

The Control Deck is where the computer is controlled. Many buttons are available, showing the state of some of the main registers, as well as the instruction currently being read. Beneath the Control Deck, 6 power distribution units provide power to the accessories and the processor. Since there are 6 slots, but at most 5 parts have been observed in either example, it is presumed that the ZEBRA is capable of connecting to external peripherals and interfacing with them just as easily. No documentation has yet been found about this possibility, however.

Underneath the right (looking at the control deck, such as in Figure 33) Interface Wing, the power supply and regulator for the computer; atop it, the teletype. On the other side, the card reader, and some logic circuitry underneath to handle decoding the cards to instructions.

The processor rack contains both the processor and the memory drum, which is a large specially built device with approximately 250 cables coming from all around the outer surface. The cables go into a unit, which is screwed into the rack.

Interestingly, the drum is tied to the performance of the computer: Don Hunter explained that:

The efficiency meter indicates the number of instructions actually executed in relation to the possible maximum number of instructions which could be executed in one revolution of the drum: 32. Hence the minimum efficiency is 3.1% and the maximum is 100%.

With a drum speed of 6,000 r.p.m, and 32 instructions per revolution, this means that the ZEBRA tops out at 192,000 instructions per minute, or 3,200 instructions per second (in other words, 3.2KHz).

Van der Poel stated that the speed of the Zebra is roughly equivalent to a ‘modern’ 1996 pocket calculator [36], and with a speed of 3.2KHz and a highly parallel instruction set, it seems likely to be the case.

The processor itself comprises 3 “units”, with a total of 750 circuit boards. Each board is simple by design, with solder connections (where present) drawn in by hand, and components assembled by hand. Many of these boards come together with a large printed circuit board backing plane to form the processor.

The units and their components are:

Memory
Carrier Reading Amplifier
Track Selector
Track Switch
TSV
Processor Carrier Writing Amplifier
A, B Accumulators
C, D, E Registers
LBV 1
CV
Control Unit
Peripheral Stabilizer Unit
Input/Output Unit
Parity Unit
Key Word Control Unit
C, D, E Registers
ABU C, D, E Registers
R Register
P-Pulse, M-P Generator

Curiously, the A, B, C, D, E and R registers are actually on the first couple of rows of the memory drum. It’s not clear what the purpose of having racks dedicated to them are – though my best guess is that these handle the rapid switching and access speed necessary to read these registers on the quickly spinning drum, and separately from the rest of the drum circuitry. It’s also not clear why the unit marked “Peripheral” has two copies of the C,D,E registers in this case, or what “ABU” refers to.

Further inspection of the ZEBRA documentation would be necessary to get a clearer understanding of what’s going on inside these units.

Emulators of the ZEBRA

The Computer Conservation Society provides information on emulators for this system. In particular, it gives us one written by Don Hunter, one by Willem van-der-Poel himself, and one written by Jurjen Bos, an enthusiast of the system.

Hunter’s and van der Poel’s emulators are based on the same software, so they look identical. They are built for MS-DOS, and only work on 16-bit architecture CPUs.

 

Don Hunter's ZEBRA emulator.

 

Jurjen Bos

Bos’ emulator is far more sophisticated and works on any computer, due to being programmed in Python, an emulated language with no bindings to any of the software degradation issues discussed in my thesis. The Matrix of Software Preservation that I devised (see the thesis, Section 2.5 for more detail) tells us that we may need preventative measures, just in case.

 

Bos' emulator in use.

Bos’ emulator, being designed for maximum compatibility, works out of the box. It uses some code that will tie it down to certain system configurations (using third-party libraries that are not easily updated), but these can be resolved with less urgency in the matter.

Bos’ emulator is fully working, and fully open-source, so, as mentioned, the Matrix tells us that only preventative measures are necessary for it. These will be done as an addendum to this project, via open-source contributions (it is possible that my changes are not accepted and thus do not become part of the software).

Don Hunter

On the 16th December of 1994, Don Hunter started writing a tool in Pascal to process some software that was written for the ZEBRA.

  {16-DEC-1994. Written by Don Hunter

Specifically, it was written using Turbo PASCAL – which we can tell by the usage of INLINE in the code.

The emulator is distributed as a zip file. Notably, it has three versions of the “stored programs” drum, known as ZLOT, and a lot of demonstration programs included as .SRC files.

The provided MANUAL.TXT explains the reasoning behind the text-mode design:

The aim was to create an accurate ZEBRA model with modest graphics, to be driven from the keyboard rather than via Windows. It runs at about 1.5 times the speed of the original ZEBRA on a 386 at 33 MHz.

It also explains that the emulator is designed for someone already familiar with the ZEBRA, and is not intended to help someone learn how to use the computer:

You need the ZEBRA manuals to make much use of it.

The interface is designed to be reminiscent of the Control Deck of the actual ZEBRA, where the lines match 1:1 with the actual rows of lights on the Deck:

 

 

The emulator also provides provisions for punching your own programs into virtual tape, and feeding them through the emulator. It can either display the teletype output on the screen, or output it to a file.

The emulator has two run modes; it defaults to “fast”, where it foregoes all attempts to time things properly and merely outputs things as fast as it can, but “displayed” is an option, where it slows down to show you how the lights on the Control Deck change as the program runs.

Additionally to all of this, it provides a whole bunch of utilities for the user, to inspect memory, to show specific registers, to lock certain blocks of memory from being accessed, and control the interface more precisely.

 

The ZEBRA’s teletype Baud code is convertible to ASCII, though it is not a 1:1 relationship. After reverse engineering the specific code that the emulator accepts and cross-referencing some program tapes from the National Museum of Wales’ archive, I’ve managed to create a table that will allow you to output text to the actual Teletype that the ZEBRA used, via a UART connection.

This has not yet been tested, but the Technikum29 museum has graciously offered the use of their ZEBRA as soon as it is restored, to test this system.

Making Don Hunter's Emulator work

Very thankfully, Hunter provided the source code for the emulator – ZEBRA.PAS. This file contains the full code, so no reverse-engineering is necessary, as there was for the Pilot ACE. The ZEBRA.EXE file itself cannot be run natively – as it is an MS-DOS executable – but we can simply recompile the Pascal source into a 32-bit Windows executable.

In terms of the Matrix, this software works on certain environments (a 16-bit MS-DOS setup), but is fully open source. Thus, we can just change the things that tie it down to this old DOS architecture and make it work.

We need to use a modern version of Turbo Pascal – due to the INLINE usage mentioned several times above – but Free Pascal for modern Windows provides a compatibility mode that allows us to do this.

 

 

The first issue encountered is the usage of the dos module in Pascal; this is specific to DOS, and no longer exists. The existing code used this module specifically for the GetTime function, for which a modern replacement exists in the sysutils module.

After replacing the INLINE code with a call to the simple CursorOff function, the program compiles and runs – although it crashes immediately due to a “Read past end of file” error. After some debugging, it was narrowed down to the import function, and the word size issue was discovered in the zwordold struct:

This is the 16-bit,byte,16-bit struct used to demonstrate the issue of padding and alignment in Section 2.4.1.2 of my thesis.

Rather unusually, Free Pascal chose to keep the Integer size at 16 bits for backwards-compatibility, but change the alignment padding to better suit modern computers. Thus, the fix is simply to add the padded attribute to the record, to bring the size back down to what the processor expects:

For a 64-bit executable, the Integer size changes to 32 bit, so it becomes necessary to change the type here to SmallInt:

These changes allow the program to recompile, run, and successfully execute all the test programs provided, natively on 64-bit Windows 11:

 

Using the fixed Emulator

Using the emulator is a simple process:

  1. Extract all the files in the zip to a folder on your computer
  2. Run ZEBRA-NEW.exe (the original zebra.exe is preserved for reference)
  3. Select one of the demo files that end in .SRC to run
  4. Press the a key in the emulator to begin loading a tape
  5. Type the file name of the demo file you wish to run, minus the .SRC extension (i.e head to print the header banner of the History of Computing Collection)
  6. Press F7 to prime the system
  7. Press F7 again to run the program
  8. Wait for the program to finish (or provide input if you started a program that takes user input, but be fast! The computer does not wait for you.)

If you would like to learn how to write your own programs for the ZEBRA, consult the articles by van der Poel and Ord-Smith:

    W.L. van der Poel, Microprogramming and Trickology, in:
        Digitale  Informationswandler,  Ed.  W. Hoffmann. Vieweg,
        1962  p269-311. 
    W.L.  van  der   Poel,  The  Simple   Code  for  ZEBRA,   Het
        PTT-bedrijf, Aug. 1959, Vol. IX no 2. p31-66.