Appendix 3

The 803 Instruction Code

These tables give the complete instruction set of the 803. Some special notes follow.

Unless otherwise stated the N digits of the instruction specify the address of a location.

In the "Result" columns a' and n' indicate "new contents" of the accumulator and location N. a and n likewise indicate the "old contents".

  Function Operation   Result
  a' n'
GROUP 0 00 Do nothing a n
01 Negate -a n
02 Replace and count n + 1 n
03 Collate a & n n
04 Add a + n n
05 Subtract a - n n
06 Clear zero n
07 Negate and add n - a n
GROUP 1 10 Exchange n a
11 Exchange and negate -n a
12 Exchange and count n + 1 a
13 Write and collate a & n a
14 Write and add a + n a
15 Write and subtract a - n a
16 Write and clear zero a
17 Write, negate and add n - a a
GROUP 2 20 Write a a
21 Write negatively a -a
22 Count in store a n + 1
23 Collate in store a a & n
24 Add into store a a + n
25 Negate store and add to store a a - n
26 Clear store a zero
27 Subtract from store a n - a
GROUP 3 30 Replace n n
31 Replace and negate store n -n
32 Replace and count in store n n + 1
33 Replace and collate in store n a & n
34 Replace and add to store n a + n
35 Replace, negate store and add n a - n
36 Replace and clear store n zero
37 Replace and subtract from store n n - a

N.B. The "1" added in count functions is to scale 2-38.

The time taken to obey any instruction of Group 0 to 3 is 720 microseconeds in early machines, and 576 microseconds in machines completed after December 1960.

GROUP 4
Function Operation
40 Transfer, unconditionally, to first instruction.
41 Transfer to the first instruction if C(A) is negative.
42 Transfer to the first instruction if C(A) is zero.
43 Transfer to the first instruction if the overflow indicator is set. Clear the overflow indicator.
44 Transfer, unconditionally, to second instruction.
45 Transfer to the second instruction if C(A) is negative.
46 Transfer to the second instruction if C(A) is zero.
47 Transfer to the second instruction if the overflow indicator is set. Clear the overflow indicator.

If a transfer is made to the second instruction in a location, that instruction is obeyed as stored, irrespective of the state of the B digit.

If a transfer instuction is placed in the first half of an instruction pair, the B digit in this pair must be zero.

The time taken to obey any instruction of group 4 is 720 microseconds in early machines, and 288 microseconds in machines completed after December 1960.

GROUP 5

In functions 52, 53 and 56 the N digits specify the address of a location in the store. In functions 50, 51, 54 and 55, the seven right-hand N digits specify a number N, which therefore lies between 0 and 127 inclusive. In function 57 the N digits are not used.

By "double-length number" is meant the combined content of the accumulator and the auxiliary register (A.R.), treated as one number of 1 sign and 76 fractional digits.

In the column "Time Taken", the upper time is for early machines, the lower time for machines completed after December 1960.

Function Operation Time Taken
50 Halve the double-length number N times (with sign digit regeneration). /(N+2)x720μsec.
\(N+2)x288 μsec.
51 Shift C(A) right N places (without sign digit regeneration). Clear A.R. /(N+2)x720μsec.
\(N+2)x288 μsec.
52 Multiply C(A) by C(N), with double-length product. /41 x 720μsec.
\(42-Y)x288 μsec. *
53 Multiply C(A) by C(N), with single-length rounded product. Clear A.R. /41 x 720μsec.
\(43-Y)x288 μsec. *
54 Double the double-length number N times. /(N+2)x720 μsec.
\(N+2)x288 μsec. *
55 Double C(A) N times. Clear A.R. /(N+2)x720 μsec.
\(N+2)x288 μsec. *
56 Divide the double-length number by C(N), with single-length quotient. Clear A.R. /(41 x 720 μsec.
\(42 x 288 μsec. *
57 Read A.R.
(Clear accumulator sign digit, and replace other digits of C(A) by a copy of the A.R. content).
/720 μsec.
\576 μsec. *

* Y is the number of consecutive 1's or 0's at the left-hand end of the content of the accumulator,
e.g. if C(A) - 10 x 2-38, Y is 35.

GROUP 6

Spare. In the basic 803, all instructions of Group 6 are interpreted as "do nothing", and take 720 microseconds to obey in early machine, and 576 microseconds in machines completed after 1960. See appendix 5 for Automatic Floating Point functions.

GROUP 7

In function 73 the N digits specify the address of a location. In function 74 the five right-hand N digits specify a telecode character by its "value". In functions 70 and 71 the N digits are not used. The other functions of this group vary according to the type of input and output equipment fitted to the individual 803; this table gives outline details of a typical arrangement.

Function Operation
70 Read the Number Generator
71 Read the Tape Reader (normally attached to Channel 1) (Mix one character into the 5 right-hand positions of C(A).)
72 Channel 2 function (See Note below).
73 Write the address of this instruction (in the right-hand part of location N.
74 Punch the specified character on Output Channel 1.
75 Channel 2 function (See Note below).
76 Channel 2 function (See Note below).
77 Channel 2 function (See Note below).

The time taken to perform function 70, 71, 73 or 74 is 720 microseconds provided the associated busy line (if any) is free, on early machine, and 576 microseconds on machines completed after December 1960.

Note on Channel 2. Separate publications relating to equipment which makes use of Channel 2 should be consulted for the interpretation of functions 72, 75, 76 and 77, but it should be noted that if a function 77 instruction is placed in the first half of an instruction pair, the B digit in that pair must be zero.

Special Notes

  1. The B Digit

    If the B digit is a 1, the right-hand instruction is modified by the addition of the corresponding part of the content of the location specified by N1, the digits of the left-hand instruction, before being obeyed.

  2. Addresses 0 to 3

    Locations 0 to 3 contain the Initial Instructions; if a transfer is made to location 0, 1, 2 or 3, the computer endeavours to obey this routine. If location 0, 1, 2 or 3 is used as B-line, the modification is by the addition of the appropriate initial instruction.

    If any instruction specifies the content of location 0, 1, 2 or 3 as operand, the operand used is zero: further it is not possible to change the content of location 0, 1, 2 or 3. Thus the instruction 12 2 has no effect other than to change C(A) to 2-38.

  3. Altering the content of a location by an instruction contained therein

    This note is included for completeness: the situation described arises very infrequently.

    If the left-hand instruction in a location calls for the alteration of the content of the same location in such a way that the right-hand instruction is changed, then, if the B digit is an 0, the right-hand instruction is obeyed in its new form. But if the B digit is a 1, the instruction actually carried out is the old form modified by the new.

    Example: If C(250) is 22 250 : 14 10, the computer obeys it as 22 250 and then 14 11. But if C(250) is 22 250 / 14 10, then the computer obeys 22 250 and then 30 21 (i.e. 14 10 + 14 11).


Previous Appendix Contents Next Appendix