English Electric KDF8 - Instruction Set

Instruction Set

Each KDF8 machine-code instruction took the format

OO AAA RR BBB

In this representation

OO represents a two-(octal) character operation code, identifying the instruction to be performed, in the range 00 to 77, AAA represents a six-(octal) character “A” core address ranging from 000000 to 777777. (A theoretical ¼ Meg directly addressable main store, an actual 96K!) RR represents a two-character Register setting (one character for each of two possible registers numbered 1 to 7 used to modify the “A” and “B” addresses, with 0 indicating no register modification) and BBB represents the “B” address, the same as the “A” address in format.

Instructions were read in turn from main store into registers, then executed.

Example. An instruction to read data from the on-line paper-tape reader to locations starting at store location (octal) 200000 would look like

14 200000 00 770000 (spaces for clarity only)

Where 14 was the operation code for this type of read, 200000 was the lowest store location the data would be read to, 00 indicates that no register modification was to be done to the A or B addresses of the instruction, and 77 was the (fixed) device identifier of the paper tape reader. (Note - 77 used as a device id for a write operation would direct the write to the operator's teleprinter. Embarrassing if this was due to a program error, and it was a large data block intended for mag tape.....) The last four octal characters (0000) were not required in this instruction, and would be ignored when the instruction was processed. Such "spare" characters were frequently, given the extremely limited main store available used by programmers to store constants.

Some aspects of the instruction set were advanced, and greatly eased programming of commercial systems.

The operation codes 51-54 did DECIMAL arithmetic Add, Subtract, Multiply and Divide on variable length numbers, stored as decimal characters. One end of each operand was stored at the “A” and “B” addresses of the instruction. The other end was identified by an ISS (Item Separator Symbol), octal 74. Thus numbers could be literally any length. A “Sector Compare” instruction (Octal 43) permitted three-way conditional branching of program control depending on whether the data stored in the range from the “A” address to the “B” address was greater, less than, or equal to, the value of the same number of characters stored at locations to the left of the (previously set) “T” register, as the following Assembler language version attempts to demonstrate.


Tag Op A-Address RR B-Address COMPARE SET £T SALARY,R SC TAXLIMIT TAXLIMIT,R CTC BELOWTAXLIMIT ABOVETAXLIMIT EQUAL TC EQUALTAXLIMIT

In this example, we are comparing a salary with a tax limit, and jumping to one of three program locations depending on the respective values. The “,R” Assembler convention represents the rightmost character of the named field. CTC stood for “Conditional Transfer of Control” and TC for (unconditional) Transfer of Control

(In fact, a rarely if ever used feature of this very common instruction group was that if a line advance was in progress on the on-line printer at the time of making the comparison, program control would jump to NONE of these three addresses, but to core address 000200. Presumably the instructions set designers understood the need for this!)

Disclaimer – it’s been 40 years since I programmed for this computer, so yes, I may have got the > and < jumps the wrong way round!

In the above “compare” code, the original (KDP10?) instruction set compared from right to left, requiring the whole length of the data strings to be compared, a character at a time. KDP8 was enhanced to compare from left to right, so the comparison could stop as soon as the relative values were clear, speeding up processing of such instructions considerably.

Variable length data was handled with the aid of specially designated characters. The ISS or Item Separator Symbol, octal 74, usually represented as “●” was used to separate variable length data fields. Octal 75 “<” and 76 “>” identified the start and end of a data message, Octal 777777 was by custom and practice used to identify End of File. So data such as names and addresses could be punched onto paper tape for data input as (for example)

Various instructions could operate directly on this variable length data, and records could be batched say ten to the batch onto magnetic tape, for efficient storage. Given the relatively slow (by today's standards) of both the processor and I/O rates, a significant aspect of the programmer's task was to balance the batching of data on tape, with the computing needed per record and organise the simultaneous I/O and compute operations with the aim of maximising overlap of computing with I/O and avoiding the tape-decks stopping between batch reads.

Read more about this topic:  English Electric KDF8

Famous quotes containing the words instruction and/or set:

    Much of the pressure contemporary parents feel with respect to dressing children in designer clothes, teaching young children academics, and giving them instruction in sports derives directly from our need to use our children to impress others with our economic surplus. We find “good” rather than real reasons for letting our children go along with the crowd.
    David Elkind (20th century)

    Is it enough
    That the dish of milk is set out at night,
    That we think of him sometimes,
    Sometimes and always, with mixed feelings?
    John Ashbery (b. 1927)