COMPASS
Encyclopedia
COMPASS is an acronym for COMPrehensive ASSembler. COMPASS is any of a family of macro assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

s on Control Data Corporation
Control Data Corporation
Control Data Corporation was a supercomputer firm. For most of the 1960s, it built the fastest computers in the world by far, only losing that crown in the 1970s after Seymour Cray left the company to found Cray Research, Inc....

's 3000 series
CDC 3000
The CDC 3000 series computers from Control Data Corporation were mid-1960s follow-ons to the CDC 1604 and CDC 924 systems. Over time, a range of machines were produced - divided into the 'upper 3000 series' and the 'lower 3000 series'. CDC phased out production of the 3000 series in the early 1970s...

, and on the 60-bit CDC 6000 series
CDC 6000 series
The CDC 6000 series was a family of mainframe computers manufactured by Control Data Corporation in the 1960s. It consisted of CDC 6400, CDC 6500, CDC 6600 and CDC 6700 computers, which all were extremely rapid and efficient for their time...

, 7600
CDC 7600
The CDC 7600 was the Seymour Cray-designed successor to the CDC 6600, extending Control Data's dominance of the supercomputer field into the 1970s. The 7600 ran at 36.4 MHz and had a 65 Kword primary memory using core and variable-size secondary memory...

 and Cyber 70 and 170 series
CDC Cyber
The CDC Cyber range of mainframe-class supercomputers were the primary products of Control Data Corporation during the 1970s and 1980s. In their day, they were the computer architecture of choice for scientific and mathematically intensive computing...

 mainframe computer
Mainframe computer
Mainframes are powerful computers used primarily by corporate and governmental organizations for critical applications, bulk data processing such as census, industry and consumer statistics, enterprise resource planning, and financial transaction processing.The term originally referred to the...

s. While the architectures are very different, the macro and conditional assembly facilities are similar.

COMPASS for 24-bit machines

See 60184200

COMPASS for 48-bit machines

See 60052500C

COMPASS for 60-bit machines

There are two flavors of COMPASS on the 60-bit machines:
  • COMPASS CP is the assembly language for the CP (Central Processor), the processor running user programs. See CDC 6600 CP architecture.
  • COMPASS PP is the assembly language for the PP (Peripheral Processor), only running operating system
    Operating system
    An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

     code. See CDC 6600 PP architecture.


COMPASS is a classical two-pass assembler with macro and conditional assembly features, and generates a full listing showing both the source assembly code and the generated machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...

 (in octal
Octal
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three...

). CDC's operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s were written almost entirely in COMPASS assembly language.

Central processor (CP or CPU) hardware
Hardware
Hardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....

 maintains 24 operational registers
Processor register
In computer architecture, a processor register is a small amount of storage available as part of a CPU or other digital processor. Such registers are addressed by mechanisms other than main memory and can be accessed more quickly...

, named A0 to A7, X0 to X7 and B0 to B7. Registers X0 to X7 are 60 bits long and are used to hold data, while registers B0 to B7 are 18 bits long and their major purpose is to hold either addresses
Memory address
A digital computer's memory, more specifically main memory, consists of many memory locations, each having a memory address, a number, analogous to a street address, at which computer programs store and retrieve, machine code or data. Most application programs do not directly read and write to...

 or be used as indexing registers
Index register
An index registerCommonly known as a B-line in early British computers. in a computer's CPU is a processor register used for modifying operand addresses during the run of a program, typically for doing vector/array operations...

, except that B0 is always zero. As a programming convention, B1 (or B7) often contains positive 1.

A or address registers
Memory address register
The Memory Address Register is a CPU register that either stores the memory address from which data will be fetched to the CPU or the address to which data will be sent and stored....

 are also 18 bits long. Each A register pairs with the corresponding X register. Whenever an address is set into any of A1 to A5 registers, the data at that memory location (address) is transferred into the corresponding X register. Likewise, setting an address into one of A6 or A7 registers stores the data held in the corresponding X6 or X7 register to that memory location. However, A0 can be used to hold any address without affecting the contents of register X0.

CP instructions are written in a particularly user-friendly form: "SA1 A0+B1" denotes set address register A1 to the sum of address register A0 and index register B1. The hardware then initiates a memory load from the computed address into register X1.

Peripheral processor (PP or PPU) instructions are completely different from CPU instructions. Peripheral processor hardware is simpler; it has an 18-bit A (accumulator
Accumulator (computing)
In a computer's central processing unit , an accumulator is a register in which intermediate arithmetic and logic results are stored. Without a register like an accumulator, it would be necessary to write the result of each calculation to main memory, perhaps only to be read right back again for...

 register, a 12-bit Program Address register, a 12-bit Q register (not programmer-visible), and a 22-bit R register (used to accomplish address relocation during central memory read and write instructions on Cyber 180 systems). No special job validation was required to assemble peripheral processor programs, but to be executed, such programs were required to installed into the operating system via special system editing commands.

Example code

This COMPASS sample code
COMPASS/Sample Code
This COMPASS sample code displays the calendar of the year given as a parameter on the terminal. If no parameter is given, then the calendar of the current year is displayed. IDENT CALEND,FWA ABS SST...

 displays the calendar
Calendar
A calendar is a system of organizing days for social, religious, commercial, or administrative purposes. This is done by giving names to periods of time, typically days, weeks, months, and years. The name given to each day is known as a date. Periods in a calendar are usually, though not...

 of the year given as a parameter on the terminal
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

. If no parameter is given, then the calendar of the current year is displayed.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK