Context : Ferranti Mark 1 Handbook

## Ferranti Mark 1 Instruction Codes

This page gives a summary of the instruction codes, first in logical order then in numerical order. In between is a key for the notation used. The 6-bit function codes are specified using the Base-32 notation used in the Programmer's Handbook (which go up from 0, 1, 2, 3, ... 63 in the form //, T/, /E, TE, ... T£ -- see note 3 for the Handbook). The link from the base-32 code goes to the appropriate part of the Handbook, although for many of the arithmetic codes there is no explicit specification, so the link is merely to the table of arithmetic instructions in the Handbook text.

The notation used in both summaries is that of the Handbook; the list in numerical order is essentially a copy of the text contained in the Handbook's appendix.

Note that the ' symbol is simply used to indicate a value that is reset by the instruction.

### Summary Instruction Code (ordered logically)

 Arithmetic Instructions (Key) T½ A' = S± T: A' = 0 T/ A' = S+ TF A' = -S± /S S' = L TK A' = 2S± TC A' = A + S± /E S' = M TI A' = A + S+ /A S' = M, M' = 0 TN A' = A - S± TA S' = L, A' = 0 /K D' = S± /U S' = L, L' = M, M' = 0 /C D' = S+ /J M' = M + S /F A' = A + D S± /I L' = M, M' = L /N A' = A + D S+ TR A' = A and S± /D A' = A - D S± TD A' = A or S± /½ A' = A - D S+ TJ A' = A neq S± /@ standardise B-line Instructions Control Instructions TT B' = s /P Uncond. direct jump TL B' = B - s /Q Uncond. rel. jump TZ s' = B /H A-cond. direct jump TO # B' = s /M A-cond. rel. jump TG # B' = B - s /T B-cond. direct jump TB # s' = B /O B-cond. rel. jump /G Stop if /G switch set Miscellaneous /L Stop if /L switch set /: S as mag. instr. // H as mag. instr. /Z S' = H /W Random number generator /R Sideways adder /V Hoot T£ # Dummy
Notes
• Direct Jump -- In conventional parlance this is an indirect jump, i.e. the destination address is held in a store word rather than in a field of the instruction itself (see note 8a of the Manual).
• #    B-exceptional instructions -- The three B-line operations B = S', B' = B - S and S' = B are provided both with and (#) without the usual B-modification of the instruction carried out before it is decoded and obeyed.
• Dummy Instruction T£ -- This is not given in Chapter 1. It presumably did nothing when obeyed. B-modification is also suppressed for the Dummy instruction.

 KEY A The 80-bit Accumulator B One of the 8 20-bit B-lines L The Least significant 40 bits of A D The Multiplicand Register M The Most significant 40 bits of A H The 20-bit value on the console hand switches S The contents of a 40-bit Store line S± S explicitly treated using the plus-minus convention (the default) S+ S explicitly treated using the plus convention s The contents of a 20-bit Store line

### Summary Instruction Code (ordered numerically)

 // H as mag. instr. T/ A' = S+ (Key) /E S' = M TE ** /@ standardise T@ ** /A S' = M, M' = 0 TA S' = L, A' = 0 /: S as mag. instr. T: A' = 0 /S S' = L TS ** /I L' = M, M' = L TI A' = A + S+ /U S' = L, L' = M, M' = 0 TU ** /½ A' = A - D S+ T½ A' = S± /D A' = A - D S± TD A' = A or S± /R Sideways adder TR A' = A and S± /J M' = M + S TJ A' = A neq S± /N A' = A + D S+ TN A' = A - S± /F A' = A + D S± TF A' = -S± /C D' = S+ TC A' = A + S± /K D' = S± TK A' = 2S± /T B-cond. direct jump TT B' = s /Z S' = H TZ s' = B /L Stop if /L switch set TL B' = B - s /W Random number generator TW B' = B - s /H A-cond. direct jump TH ** /Y ** TY ** /P Uncond. direct jump TP ** /Q Uncond. rel. jump TQ ** /O B-cond. rel. jump TO # B' = s /B ** TB # s' = B /G Stop if /G switch set TG # B' = B - s /" ** T" # B' = B - s /M A-cond. rel. jump TM # (B-exceptional /X ** TX #     instructions) /V Hoot TV # /£ ** T£ # Dummy
Notes on the numerically ordered list