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.
|J||16||M = M + S||P||21||M = S; L = 0|
|K||17||M = M - S||N||20||L = S; (M = 0 ??)|
|Q||22||M = M & S; L = 0||M||19||S = M|
|L||18||M = M /≡ S; L = 0||R||23||S = M; A = 0|
|X||29||A = A + D * S||U||26||A shifted up(+ve)/down(-ve) by γ|
|T||25||A = A - D * S||V||27||A standardized; S' = number of shifts|
|Y||30||D = S||S||24||M = M + no. of "1"s in S (strictly,* 2-38)|
|B-line Instructions||Control Instructions|
|A||7||B = S'; Set Q||E||11||Jump to γ|
|0||3||B = B + S'; Set Q||C||9||Jump to γ if A ≥ 0|
|£||1||B = B - S'; Set Q||D||10||Jump to γ if A < 0|
|:||5||S' = B; (Set Q ??)||I||15||Jump to γ if Q positive|
|@||4||S'0-9 = C|
|ø||0||Stop Program||F||12||Input next symbol to S'0-4; S'5-19 = 0|
|Z||31||Stop Program if console switch set||$||6||Output S'15-19|
|G||13||S' = H||B||8||Print Output Page (??)|
|W||28||S' obeyed as a magnetic instruction|
KEYNote 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*.
S The contents of a 40-bit line-pair in Store (address given is first of pair) S' The contents of a 20-bit Store line B One of the 8 20-bit B-lines A The 80-bit Accumulator D The Multiplicand Register L The Least significant 40 bits of A H The 20-bit value on the console hand switches M The Most significant 40 bits of A Q Sign bit of last B-line involved in a B-order C Control 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)
|ø||0||Stop Program||J||16||M = M + S|
|£||1||B = B - S'; Set Q||K||17||M = M - S|
|½||2||...||L||18||M = M /≡ S; L = 0|
|0||3||B = B + S'; Set Q||M||19||S = M|
|@||4||S'0-9 = C; S'10-19 = 0||N||20||L = S; (M = 0 ??)|
|:||5||S' = B; (Set Q ??)||P||21||M = S; L = 0|
|$||6||Output S'15-19||Q||22||M = M & S; L = 0|
|A||7||B = S'; Set Q||R||23||S = M; A = 0|
|B||8||Print Output Page (??)||S||24||M = No. of "1"s in S (strictly,* 2-38)|
|C||9||Jump to γ if A ≥ 0||T||25||A = A - D * S|
|D||10||Jump to γ if A < 0||U||26||A shifted up(+ve)/down(-ve) by γ|
|E||11||Jump to γ||V||27||A standardized; S' = number of shifts|
|F||12||Input next symbol to S'0-4; S'5-19 = 0||W||28||S' obeyed as a magnetic instruction|
|G||13||S' = H||X||29||A = A + D * S|
|H||14||...||Y||30||D = S|
|I||15||Jump to γ if Q positive||Z||31||Stop Program if console switch set|
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 drumThere 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] :
Bits 10 - 12 the function code
Bits 16 - 19 a page address in main store
S Check the main store page against the drum page.(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)).
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.
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.