Memory Reference Instructions on the CDC 160

This document is one section of the CDC 160 Programmer's Reference Manual.

Index


Instruction Format

            11 10 09 08 07 06 05 04 03 02 01 00
            ___________________________________
           |  |  |  |  |  |  |  |  |  |  |  |  |
           |__|__|__|__|__|__|__|__|__|__|__|__|
           |           |     |                 |
           |   Opcode  | Mode|     Address     |
           |                 |                 |
           |     6-bit F     |     6-bit E     |

Instructions

0010 - And

The data from M[S] is logically anded with A, bit by bit.

0011 - Or

The data from M[S] is logically ored with A, bit by bit..

0100 - Load

The data from M[S] is loaded into A.

0101 - Load Complement

The data from M[S] is ones complemented and loaded into A.

0110 - Add

The data from M[S] is added to A. One's complement addition is used, that is, addition with end-around carry.

0111 - Subtract

The data from M[S] is subtracted from A. That is, the data is complemented and then added with end-around carry.

1000 - Store

The contents of A are stored in M[S].

1001 - Shift and Replace

The data from M[S] are circularly shifted one place left, with the results stored in both A and M[S].

1010 - Add and Replace

The data from M[S] are added to A, with the results stored in both A and M[S]. One's complement addition is used, that is, addition with end-around carry.

1010 - Add One and Replace

One is added to the data from M[S], with the results stored in both A and M[S]. One's complement addition is used, that is, addition with end-around carry.

Addressing Modes

00 - Direct

	S = E
Direct addressing uses the 6-bit E (address) field, padded with zeros, to directly address the first 64 words of memory. These words are typically used for global variables and pointers.

01 - Indirect

	if E = 0
	  then { S = P; S = M[S]; P = P+1 }
	  else { S = E; S = M[S] }
If 6-bit E field is zero, indirect addressing uses the word following the instruction as a pointer to the operand anywhere in memory. The next instruction to be executed will be fetched from the word after this pointer.

If the E field is nonzero, indirect addressing uses the E field, padded with zeros, to address the first 64 words of memory. The word fetched is then used to address the operand anywhere in memory.

10 - Forward Relative

	if E = 0
	  then { S = P; P = P+1 }
	  else { S = P+E }
If 6-bit E field is zero, the operand is in the memory location immediately following the instruction. The next instruction to be executed will be fetched from the word after the operand.

If the E field is nonzero, the operand address is computed by adding the E field to the program counter.

The special case for E=0 was added in serial number 37 and up. Earlier models of the CDC 160 always used simple relative addressing.

11 - Backward Relative

	S = P-E
The operand address is computed by subtracting the E field from the program counter.