Part 2: Ones' Complement is the Loneliest Representation

Created 22 September 2022 - Updated 24 September 2022

Unisys is a strange animal. Few other companies have two completely incompatible mainframe families, sold into the same market [1]. Unisys is a fusion of two companies - Burroughs and Sperry. Burroughs built several successful computer families, at the high, medium, and low end; the high-end system, now known as the Clearpath Libra, was and is an absolute work of art and is technologically astounding for its day. Sperry was primarily a defense and aerospace company, though with a presence in many markets, and was especially known for having built the world's first commercial computer, the Univac I. The product family that became the modern Clearpath Dorado originated with the Univac 1108 in 1964, and Sperry and later Unisys have maintained continuous binary compatibility since.

OS 2200 has a deep presence in two industries - government, especially defense, and airlines. There may also be some financial users, but I'm not aware of them. I've also seen indications that both OS 2200 and MCP were getting greenfield customers well into the 2000s. Many OS 2200 sites are running Unisys's fourth-generation language, MAPPER.

Dorado Hardware

The 11xx/22xx/Dorado ISA is a product of its time. Instructions are a fixed-length 36-bit word, with six formats. It provides a complex set of registers, including distinct register files for accumulators, base addresses, and address offset. Most instructions accept a destination accumulator register and a single memory reference (whether a direct address or a base + offset.) Since all registers exist in the address space, there's no real distinction in instruction format for most ops between accessing registers and accessing RAM. Arithmetic, somewhat unusually, is ones' complement - zero can have a sign. Operations are provided for sixth-word, third-word, halfword, word, and doubleword operands and accumulators. Basic SIMD also exists for 12b and 18b values. There's also a full set of decimal fixed-point operations. Four privilege rings are provided, and there are complex memory-security features at the ISA level.

OS 2200 is primarily an ASCII system, and has ISA-level support for things like filling memory regions with ASCII spaces. There's also some support for the legacy FIELDATA 6-bit character encoding.

While the Dorado ISA exists today primarily under emulation, there are subtle supervisor-mode differences between the "H" ISA version implemented by Unisys CMOS chips and the "E" ISA version run under emulation.

Sick 2200 Tricks

A few pieces of OS 2200 history are shocking to me. One is that it once had a fairly comprehensive UNIX environment, based on System V Release 2, called SX 1100. Considering how distinct the OS 2200 EXEC (at the time, the 1100 OS EXEC) and its services are from UNIX, and how unusual the instruction set is, I feel that this has to be one of the strangest UNIX environments ever shipped. It also had a poor reputation for performance.

The second surprising piece is Java. Unisys has provided two OS 2200 JVMs. One was a native JVM, running directly on the Dorado ISA. It surprises me that this was possible to do with acceptable performance, as Java is two's complement, uses IEEE 754 FP, and definitely uses neither 9-bit bytes nor 36-bit ints. This has since been replaced by the JProcessor, an external embedded x86 environment running Linux, which can be near-transparently invoked from the OS 2200 environment and has considerably higher performance.

Remarkably, both the native JVM and JProcessor JVM can do JNI invocations of native OS 2200 applications. Considering the huge differences between the JVM and the Dorado hardware and OS environment, this is very impressive to me - and the JProcessor gets extra impressiveness points for doing that from another OS entirely in a transparent manner.

[1] Bull is the exception; GCOS 7 and GCOS 8 are at least as incompatible as MCP and OS 2200 are. One could probably make a case for Fujitsu, but generally the markets for GS, BS, and VME have little overlap (except in Britain.)

Back to Let's Play OS 2200!