Context : Ferranti Mark 1*, Ferranti Mark 1 Handbook

Ferranti Mark 1 Star Instruction Codes

Note that the specification below is a combination from three sources which are not completely consistent.

This page gives a summary of the instruction codes of the Ferranti Mark 1*, first in logical order then in numerical order. In between is a key for the notation used, and at the end is a specification of the magnetic instruction.

The 5-bit function codes are specified (in bold) using the revised Base-32 notation used in the Mark 1* as well as by their numerical equivalent 0, 1, 2, 3, ... 31.

Summary Instruction Code (ordered logically)

Arithmetic Instructions
J16  M = M + S  P21  M = S;  L = 0
K17M = M - S N20L = S;   (M = 0 ??)
Q22M = M & S;   L = 0 M19S = M
L18M = M /≡ S;   L = 0 R23S = M;  A = 0
X29A = A + D * S U26A shifted up(+ve)/down(-ve) by γ
T25A = A - D * S V27A standardized;  S' = number of shifts
Y30D = S S24M = M + no. of "1"s in S (strictly,* 2-38)
B-line Instructions Control Instructions
A7B = S';   Set Q E11Jump to γ
03B = B + S';   Set Q C9Jump to γ if A ≥ 0
1B = B - S';   Set Q D10Jump to γ if A < 0
:5S' = B;  (Set Q ??) I15Jump to γ if Q positive
@4S'0-9 = C
Miscellaneous Instructions
ø0Stop Program F12Input next symbol to S'0-4;   S'5-19 = 0
Z31Stop Program if console switch set $6Output S'15-19
G13S' = H B8Print Output Page   (??)
W28S' obeyed as a magnetic instruction


Note that the links in the key are to the relevant detail in the Mark 1 Handbook and should be read in conjunction with the page summarising the differences between the Mark 1 and Mark 1*.
SThe contents of a 40-bit line-pair in Store (address given is first of pair)
S'The contents of a 20-bit Store line    BOne of the 8 20-bit B-lines
AThe 80-bit Accumulator The Multiplicand Register
LThe Least significant 40 bits of A HThe 20-bit value on the console hand switches
The Most significant 40 bits of A QSign bit of last B-line involved in a B-order
CControl Address ...Unused instruction
γThe contents of the address field of the current instruction (a "Literal")
??Indicates a point of inconsistency in the three sources.

1.   All the instructions were subject to B-modification except the B-line instructions themselves (1, 3, 5 & 7)
2.   Instruction ø 0 had alternative representations Ø and φ (Greek small phi)
3.   Instruction ½ 2 had alternative representation λ (Greek small lambda)

Abbreviated Instruction Code (ordered numerically)

ø0   Stop Program   J16   M = M + S
1B = B - S';   Set Q K17M = M - S
½2 ... L18M = M /≡ S;   L = 0
03B = B + S';   Set Q M19S = M
@4S'0-9 = C;   S'10-19 = 0 N20L = S;   (M = 0 ??)
:5S' = B;   (Set Q ??) P21M = S;   L = 0
$6Output S'15-19 Q22M = M & S;   L = 0
A7B = S';   Set Q R23S = M;   A = 0
B8Print Output Page   (??) S24M = No. of "1"s in S (strictly,* 2-38)
C9Jump to γ if A ≥ 0 T25A = A - D * S
D10Jump to γ if A < 0 U26A shifted up(+ve)/down(-ve) by γ
E11Jump to γ V27A standardized;  S' = number of shifts
F12Input next symbol to S'0-4;   S'5-19 = 0 W28S' obeyed as a magnetic instruction
G13S' = H X29A = A + D * S
H14 ... Y30D = S
I15Jump to γ if Q positive Z31Stop Program if console switch set

The Magnetic Instruction

The coding for the operations to exchange data between the main CRT store and the magnetic drum (or drums) was achieved by a single instruction in the main order code which gave the address of a 20-bit line in store which contained the detailed coding.

The main store comprised up to 16 pages each of 64 20-bit words (S') -- 12 being the actual number given in (only) one of the sources. Any consecutive pair of 20-bit words in a page could be treated as a 40-bit number (S). (But note that the second half of the pair identified by address 63 was word 0 in the same page.)

A drum was physically laid out in consecutive tracks, each of which held two pages. Checking and transfers were allowed both in units of one page and two. If two pages, they were always from the same track.

For two-page transfers, the pair of pages involved was always a pair comprising an even-numbered page address and the following page. The bottom bit of the main store address was ignored. The bottom bit of an address on drum was also ignored, the resulting even address specifying the first of two pages on a particular track. But if the bottom bit was set, it specified that the two page checks/transfers were to be between the even-numbered page on one store and the odd-numbered page on the other and vice versa.

For the two check instructions, the corresponding lines of the page or page-pair would be checked against each other. If the check was successful the next instruction would be skipped. The next instruction would therefore normally be a jump to instructions to deal with an unsuccessful transfer.

The layout of the magnetic instruction was :

Bits 0 - 9    a page (or "half-track") address on drum
Bits 10 - 12    the function code
Bits 16 - 19    a page address in main store
There were 8 codes, given in the manual as S to Z in the Base-32 code [this only makes sense if bits 13 and 14 were always set as 1] :
S    Check the main store page against the drum page.
T    Check the main store page-pair against the drum page-pair.
U    Transfer the drum page to the main store page.
V    Transfer the drum page-pair to the main store page-pair.
W    Transfer the main store page to the drum page.
X    Transfer the main store page-pair to the drum page-pair.
Y    As for U; also set M0-9 to the drum address.
Z    As for V; also set M0-9 to the drum address of the second page transferred.
(Y and Z were a more pragmatic version of the idea provided for in the hardware on the Mark 1, but not used, to have an extra line associated with each page in main store which gave the drum page address it originated from (if any)).

Note that given the four extra instructions created by use of the "crossover bit" in instructions T, V, X and Z, the magnetic instruction effectively represented another twelve codes in the instruction code set of the machine.

Copyright The University of Manchester 2003, 2004