UNIVAC I Instruction Set

From Folklore
Jump to: navigation, search

Contents

Unisys History Newsletter.
Volume 3, Number 3
June, 1999
by George Gray

The instruction sets of today's computers range from simple to complex. The instruction set of the UNIVAC I is given in this article as a basis for comparison. A simulator for UNIVAC I and UNIVAC II has been written by Peter Zilahy Ingerman, PhD, who programmed a UNIVAC at the University of Pennsylvania from 1957 to 1963. If you are interested in having a copy of the simulator (which runs under Windows 9x but not, sadly, on Apple), you may write to Dr. Ingerman at 40 Needlepoint Lane, Willingboro NJ 08046-1997 or e-mail him at pzi@ingerman.org His simulator has an example factorial program.

Instructions on the UNIVAC I were six decimal digits (36 bits) in length; the first two (12 bits) were the function code, the third (6 bits) was not used, and the last three (18 bits) were the memory address. Each 72-bit word contained two instructions; the leftmost was executed first.

The UNIVAC I had the following registers:

  • A - accumulator register which contained the result of addition, subtraction, multiplication, and division
  • L - contained multiplicand or divisor
  • F - used in multiplication and extraction X contained the less significant half of a 22-digit product, or an unrounded 11-digit quotient
  • V - two-word register used during transfer operations
  • Y - ten-word register used during transfer operations
  • I - 60-word input buffer O 60-word output buffer
  • CR - contained current pair of instructions
  • CC - pointed to word containing next pair of instructions

Readers who do not want to get bogged down in the details of the instruction set can skip to the brief discussion which follows the instructions. For each instruction, we give the mnemonic, the value in binary, the value in octal, and a description of the instruction.

Instructions
Instruction Binary Octal Mnemonic Description


Add 010100000000 2400 A Load contents of memory into register X, then add contents of register X to value in register A
Load A 010101000000 2500 B Load contents of memory into register A
Store A and Clear 010110000000 2600 C Store contents of register A into memory, then clear register A to zero
Divide 010111000000 2700 D Divide contents of memory by value in register L, rounded quotient in register A, unrounded quotient in register X
Extraction 011000000000 3000 E Extraction permits replacement of one or more digits in a word with the corresponding digits from another word
Load F 011001000000 3100 F Load contents of memory into register F
Store F 011010000000 3200 G Store contents of register F into memory
Store A 011011000000 3300 H Store contents of register A into memory; retain value in A
Store X 100100000000 4400 J Store contents of register X into memory
Move A 100101000000 4500 K Move contents of register A into register L, then clear A to zero
Load L 100110000000 4600 L Load contents of memory into register L and register X
Multiply 100111000000 4700 M Load contents of memory into register X, then multiply contents of register L by contents of X, placing rounded 11-digit product in register A
Negative Multiply 101000000000 5000 N Same as M, except reverse sign of value from memory when loading into register X
Multiply 101010000000 5200 P Load contents of memory into register X, then multiply contents of register L by contents of X, placing 22-digit product in registers A and X
Transfer Equal 101011000000 5300 Q Jump (transfer control) to memory address if contents of A = contents of L
Record Control Counter 101100000000 5400 R Record value of control counter + 1 into memory in the form of an unconditional jump (U) instruction
Subtract 110101000000 6500 S Subtract contents of memory from value in register A
Transfer Greater 110110000000 6600 T Jump (transfer control) to memory address if contents of A > contents of L
Unconditional Transfer 110111000000 6700 U Unconditional jump to memory address
Load V 111000000000 7000 V Load two words from memory into register V
Store V 111001000000 7100 W Store two words from register V into memory
Add 111010000000 7200 X Add contents of register X to value in register A
Load Y 111011000000 7300 Y Load ten words from memory into register Y
Store Y 111100000000 7400 Z Store ten words from register Y into memory
Wait 000100000011 0403 10 Stop and wait for console input
Print 001000000011 1003 50 Print on console printer


Shift Instructions

For the following shift instructions, n was the number of digit positions to shift.

Shift Instructions
Instruction Binary Octal Mnemonic Description
Shift Right 010010nnnnnn 22nn .n Shift contents of A right n digits, zero fill. Example: .3 000 would shift all digits in A three places right and zero fill.
Shift Left 010011nnnnnn 23nn  ;n Shift contents of A left n digits, zero fill
Shift Right, Preserve Sign 000010nnnnnn 02nn -n Shift A right n digits, but preserve sign digit
Shift Left, Preserve Sign 000011nnnnnn 03nn 0n Shift A left n digits, but preserve sign digit


Input/Output Instructions

For the following input/output instructions, n was the unit number of the UNISERVO tape drive. Read

Input/Output Instructions
Instruction Binary Octal Mnemonic Description
Read 000100nnnnnn 04nn 1n Read tape block (60 words) from UNISERVO n into register I
Read Backward 000101nnnnnn 05nn 2n Read backward on tape, place block (60 words) into register I
Transfer and Read 000110nnnnnn 06nn 3n Transfer data from register I into memory, then read next tape block into I
Transfer and Read Backward 000111nnnnnn 07nn 4n Transfer data from register I into memory, then read backward, putting next tape block into I
Write Tape 001000nnnnnn 10nn 5n Write tape block from memory at 100 frames per inch (FPI) density. This density was used for data tapes.
Rewind 001001nnnnnn 11nn 6n Rewind tape
Write Tape 001010nnnnnn 12nn 7n Write tape block from memory at 20 FPI density. This density was used for print tapes.
Rewind Interlock 001011nnnnnn 13nn 8n Rewind tape with interlock



Discussion

A complete multiplication involved three instructions: (1) load multiplicand from memory to L, example: L 041 (2) multiply, example: M 048 (3) store result in memory, example: C 045 Similarly, a division required three instructions: (1) load divisor from memory to L, example: L 041 (2) load dividend in A and divide, example: D 045 (3) store result in memory, example: C 046

The E instruction permitted replacement of one or more digits in a word with the corresponding digits from another word: (1) load the control word into F, example: F 042 (2) load into A the word whose digits will be replaced, example: B 043 (3) get the replacement word and do the replacement, example: E 049 (4) store the result, example: C 017 Each digit in the control word which had a zero in its rightmost bit indicated replacement.


Trademarks

Unisys, UNIVAC, and UNISERVO are registered trademarks of Unisys Corporation.

Copyright 2001 by George Gray

Personal tools