CDC CPU COMPASS
The central-processor dialect of COMPASS, Control Data's macro assembler for the 60-bit 6000, 7600 and Cyber supercomputers, where loading a word meant setting an address register, and in which CDC wrote most of its operating-system code.
Created by Control Data Corporation (software development at Palo Alto and later Sunnyvale, California); no individual designer is credited in the manuals
CDC CPU COMPASS is the central-processor side of COMPASS (short for COMPrehensive ASSembler), Control Data Corporation’s macro assembler for its 60-bit machines: the CDC 6000 series, the 7600, and the Cyber 70, 170 and 180 lines. The same assembler also handled the completely different instruction set of the peripheral processors (PP COMPASS). The CPU dialect is the one application programmers used, and it is known for an unusual way of reaching memory: there are no conventional load or store instructions for central memory. You put an address in an A register, and the hardware moves the data into or out of the matching X register. CDC wrote most of its operating-system code in COMPASS, and the 1986 manual warned customers to stop writing new applications in it.
History & Origins
Not the first 6600 assembler
The encyclopedia index dates CPU COMPASS to 1964, the year the CDC 6600 first reached customers (or 1965, depending on the source). The 6600 did not ship with COMPASS, though. Ralph Grishman’s textbook traces the sequence of 6000-series assemblers:
- SIPROS ASCENT. SIPROS was the original operating system, which Grishman calls “non-operating”. Its assembler, ASCENT, let programmers mix FORTRAN statements and assembly code line by line in the same program. SIPROS was cancelled before it was delivered.
- CLASS, ASCENTF and ASCENT. These came with the Chippewa Operating System, the stop-gap that 6600s actually shipped with. Grishman calls CLASS “the original 6600 assembly language”. The companion assembler for the peripheral processors was ASPER.
- COMPASS. It arrived with SCOPE, CDC’s official successor to Chippewa, and was later used under KRONOS and NOS.
The dated documents fit this order. A Chippewa Systems Bulletin of 29 June 1966 still lists ASCENT as a system file. A CDC training guide for peripheral-processor programmers, copyrighted 1966, is titled ASPER/COMPASS, which shows the change was under way that year. By April 1967 CDC had published a full 6400/6500/6600 COMPASS Reference Manual that says COMPASS “operates under control of the SCOPE monitor system”, and it had released an ASCENT-to-COMPASS translator for converting existing source code. This page therefore uses 1966 as the year CPU COMPASS first appeared. The earlier 1964 date matches the hardware, not this assembler.
A name borrowed from the 3000 series
“COMPASS” was not new in 1966. CDC already used the name for the assemblers of its 3000 series: a COMPASS manual for the 48-bit CDC 3600 is dated August 1963, and there were later versions for the 24-bit 3100 to 3500 machines. The 3000 and 6000 instruction sets have nothing in common, but Wikipedia notes that the macro and conditional-assembly features of the two COMPASS families are similar.
Design Philosophy
The 6600 was Seymour Cray’s design, and its assembly language follows the hardware closely. The central processor has no instructions that operate on memory directly. It works only on registers, and its separate functional units can run several operations at once. COMPASS makes that model very easy to see.
Three register files
| Registers | Width | Purpose |
|---|---|---|
| X0-X7 | 60 bits | Operand registers: integers, floating-point numbers, and packed 6-bit characters |
| A0-A7 | 18 bits | Address registers, each paired with the X register of the same number |
| B0-B7 | 18 bits | Index registers and small integers. B0 always reads as zero |
Memory is reached only through the A registers. When you set an address into A1 to A5, the word at that address is loaded into X1 to X5. Setting A6 or A7 stores X6 or X7 at that address. A0 has no side effect. So “load” in COMPASS is written SA1 ADDR (“set A1 to ADDR”), and “store” is SA6 ADDR.
Readable instruction syntax
Most assemblers of the period used terse opcodes followed by operand lists. COMPASS CPU mnemonics read like small assignments. The destination register is part of the opcode, and the operands are written as an expression:
SA1 A0+B1: set A1 to A0 plus B1, which also loads X1 from that addressIX6 X1+X2: 60-bit integer addFX6 X1*X2: floating-point multiplyBX6 X1*X2: logical AND (Boolean “product”)NE B2,B3,LOOP: branch if B2 is not equal to B3
The same X register can hold an integer, a floating-point number or ten 6-bit display-code characters. The mnemonic (IX, FX, DX, RX, BX and so on) decides how the bits are treated, which is why COMPASS is best described as untyped.
Parcels and “forcing upper”
CPU instructions are 15 or 30 bits long and are packed into 60-bit words: up to four 15-bit parcels, or a mix. A 30-bit instruction cannot be split across two words. When the next instruction does not fit in what is left of the current word, COMPASS fills the gap with no-op instructions and starts the next word, which the manual calls “forcing upper”. The 1967 manual also forces upper automatically for a statement with a label in its location field (so jump targets begin a word), and for the statement after JP, RJ, PS or an unconditional EQ or ZR. Because of this, programmers soon learned to arrange instructions so that as few parcels as possible were wasted.
Key Features
The 1967 manual’s list of headline features gives a good idea of what “comprehensive” meant:
- Free-field source format. Only the column-1 characters are fixed:
*marks a comment line and,a continuation line. The 1986 manual’s coding form still used a standard layout: location field in columns 2-9, operation in 11-16, variable field in 18-29, and comments from column 30. - Macros, both user-written and supplied by the system. Operating-system requests such as
ENDRUNandWRITERwere supplied as system macros. - OPDEF, which the 1967 manual describes as “a special macro form for redefining machine mnemonics”.
- Micros: named character strings substituted into source text at assembly time.
- Conditional assembly:
IF,IFC,IFEQ-style comparisons, and tests for the target machine (IFCP6,IFCP7,IFPPand others). One source file could build for both the 6000 and the 7600, which are not fully compatible even at the source level. - Code duplication with
DUPandECHO, remote assembly withRMTandHERE, and external text withXTEXTfor reading common code from a program library. - Local and common blocks managed with
USE, plusORG,BSS,DATA,DIS,VFDandCONfor laying out storage. - A full octal listing of the generated code next to the source, which was the main debugging tool.
A worked example
This is a shortened version of the example program in Appendix D of the 1986 COMPASS Version 3 manual (Figure D-1, the NOS and NOS/BE version). It adds six numbers from a table, converts the total to decimal display code with the system’s common-deck routine CDD, and stores the result. The manual’s version also sets up an output file and prints THE ANSWER IS 21. Some comments are reworded from the manual’s line-by-line notes, and the omitted lines are marked:
| |
The manual’s notes point out several idioms in this code:
SB1 1first. Holding 1 permanently in B1 was a COMPASS convention. The 1983 NOS coding standard made it mandatory, because the assembler can then use a 15-bitB1form in place of a 30-bit instruction with a constant.SB2 B0to clear a register. B0 is wired to zero, so this 15-bit form needs no constant.MX1 0to zero X1. A mask instruction is faster than the set-X instruction for this.- Keeping the sum in X1. The
COMCCDDroutine expects its argument there, so no extra register moves are needed before theRJ(return jump). =XCDD. The=Xprefix declaresCDDas an external symbol right where it is used.
Evolution
| Version | Earliest manual found | Operating systems named | Notes |
|---|---|---|---|
| COMPASS (version 1) | April 1967 (60190900) | SCOPE | For the 6400, 6500 and 6600. Replaced ASCENT and ASPER |
| 7600 COMPASS 1 | Documented in the May 1970 manual (60279900) | SCOPE 1 (7600) | For the 7600, which is not object-code compatible with the 6600 |
| COMPASS 2 | May 1970 (60279900) | SCOPE 3.3 (6000), SCOPE 2 (7600) | Grishman’s “great leap forward”: several dozen new pseudo-instructions |
| COMPASS 3 | 8 June 1973 (60360900) | SCOPE, KRONOS 2.1, later NOS and NOS/BE | One assembler for the Cyber 70, 6000 and 7600 |
| COMPASS 3.5 and 3.6 | 60492600 series, reportedly from the mid-1970s to July 1986 | NOS 2, NOS/BE 1, SCOPE 2 | Added Cyber 170 700-series, 800-series and Cyber 180 support, and 16-bit PP binaries |
Grishman describes the growth in terms of manual size. The first assembler manual, for SIPROS ASCENT, was “a slim little thing describing 16 pseudo-instructions in four pages”. The COMPASS 3 manual needed more than 125 pages for its 80-plus pseudo-instructions.
CPU COMPASS changed as the hardware did. Some Cyber 70 and 170 models added a Compare/Move Unit, and the 1986 manual adds 16-bit and 32-bit PP instruction formats for the 800-series and Cyber 180 machines. Programs written for the original 6600 kept assembling, and the manual’s instruction index tracks which instructions each machine model supports.
Current Relevance
CDC’s 60-bit hardware has been out of production for decades. According to Wikipedia’s CDC Cyber article, the last formal NOS release, 2.8.7 (PSR level 871), was delivered in December 1997. Even so, CPU COMPASS can be run today.
- DtCyber, a simulator of the 6000, Cyber 70/170 and Cyber 180 machines descended from Tom Hunter’s Desktop CYBER 5.5.1, is maintained on GitHub by the Nostalgic Computing Center. Its NOS 2.8.7 kit says COMPASS is on the initial deadstart tape, along with APL, BASIC, COBOL, FORTRAN, PASCAL and SYMPL. The same repository has kits for older systems (COS, KRONOS 2.1, NOS 1.3, and NOS/BE through a companion repository), so the assembler can be tried under several of the operating systems it originally shipped with.
- Bitsavers keeps scans of the COMPASS reference manuals from the April 1967 first edition to the July 1986 revision M, along with the ASCENT-to-COMPASS translator guide, CDC training material and Grishman’s textbook.
No official Docker image exists. Running COMPASS means building DtCyber and installing one of its operating-system kits.
Why It Matters
CPU COMPASS was the machine-level language of the computers that defined “supercomputer” in the 1960s and early 1970s. Most users wrote FORTRAN, but COMPASS was how you controlled the 6600’s parallel functional units directly, one instruction at a time. Grishman’s textbook ends with a chapter on machine architecture and code optimization.
It also shows a particular way of thinking about machines. With load and store folded into address-register writes, three register files, instructions packed into parcels, and parallel functional units, the 6600 is described by Wikipedia as an early example of what was later called RISC design, although that label is marked as disputed there. CPU COMPASS is where programmers dealt with that design directly. The sequence of assemblers from SIPROS ASCENT’s four-page manual to COMPASS 3’s more than 125 pages of pseudo-instructions shows how quickly macro assemblers were turning into programming systems in their own right.
Finally, CDC’s own warning in 1986 against continued use of COMPASS for application programs describes a problem the industry kept running into. Code tied closely to one machine family is expensive to move when the hardware is replaced.
Timeline
Notable Uses & Legacy
CDC operating systems (SCOPE, KRONOS, NOS, NOS/BE)
Wikipedia says CDC's operating systems were written almost entirely in COMPASS. Primary evidence for NOS is the 3 June 1983 NOS COMPASS Programming Standard, which set the coding rules for the NOS development section alongside a separate SYMPL standard
NOS and NOS/BE common decks
System libraries of reusable COMPASS routines, such as COMCCDD for decimal conversion and COMCWTH for writing lines, pulled into programs with the XTEXT pseudo-instruction. CDC's manual uses them to show how register conventions save instructions
FORTRAN-callable subroutines on CDC scientific installations
The usual way to use COMPASS outside CDC. Grishman's textbook explains that a FORTRAN main program could call COMPASS subroutines, and its debugging examples pair a FORTRAN main program with a COMPASS function. Unlike SIPROS ASCENT, COMPASS could not mix the two languages in one routine
University assembly-language teaching
Ralph Grishman's "Assembly Language Programming for the Control Data 6000 Series" (Algorithmics Press, cited as 1972), later revised with Kevin McAuliffe for the Cyber series, taught CPU COMPASS to students who ran FORTRAN jobs on campus 6000 and Cyber machines
CYBIS (PLATO) courseware
The CYBIS lesson library in the preserved NOS 2.8.7 system includes a lesson called "compass" covering CPU COMPASS and one called "ppu" covering peripheral-processor COMPASS