The Electrologica X1, and its successor X8 were word-based computers with 27-bit words, using 1's complement binary arithmetic. In an article comparing Algol-60 compilers for X1 and X8 F. E. J. Kruseman Aretz gives (p. 21) a short summary, albeit very informative for most purposes, of the instruction set of X1, a terse resumé of which is:
Each instruction occupied exactly one word, and in most instructions the least-significant 15 bits were used either as an address or a literal, depending on the addressing mode.
The remaining 12 bits were subdivided into
- 6 bits of the "opcode proper" (ocp),
- 2 bits for the addressing mode (0 - access the memory word referred by the address field, 1 - use the address field as a literal, if it makes sense for the given instruction, 2 - add contents of the register B, for "base", to the address field to find out the effective memory address, 3 - not mentioned, another source tells that it was used for self-modifying code),
- 2 bits for the condition code generation (0 - do not generate, 1 - "the result is >= +0", 2 - "the result is +0/-0", 3 - "the sign of the result is equal to that of the previous condition-generating result"),
- 2 bits for the conditional execution (0 - unconditional, 1 - execute but do not modify the target, 2 - skip if the condition is false, 3 - skip if it is true)
The opcode proper further subdivided into two 3-bit parts, "register" and "function".
The article stops at providing details to figure out of all mentioned instructions. For example,
For transfer of control there are a.o. the following instructions:
ocp ELAN notation effect variants
40 JUMP(label) T:= T + store[label] UYN :B
41 JUMP(−label) T:= T − store[label] UYN :B
42 GOTO(label) T:= store[label] UYN :B
42 GOTOR(label) restore T,C,LS,OF,... from store[label] UYN B
46 SUB0(:label) store[8]:= T,C,LS,OF,... ; T:= label UYN
... ... ... ...
46 SUB15(:label) store[23]:= T,C,LS,OF,... ; T:= label UYN
Herein is T the instruction counter. Also in these instructions T is incremented by 1 before execution of the instruction.
Which bit patterns in the actual binary representation of the instruction with ocp 42 allowed to tell apart GOTO
from GOTOR
is unclear; the same stands for ocp 46 SUBn
.
Another case of superficiality for the sake of brevity is
An important group are the 16 shift operations. There are four different circuits: A, S, AS, and SA. The circuit AS has 53 bits (the sign bit of S is excluded from the shift) and plays a role in arithmetical shifts, the circuit SA has 54 bits. There are also 2 kinds of shifts: round shifts, in which the bits that are shifted out at one side are entered again at the other side, and shifts–out, where bits are lost at one side and copies of the sign bit are supplied at the other side. Both shift types can, finally, be carried out to the right and to the left.
No indication of the ocp
s of these instructions, or of other ways to encode the shift circuit, type and direction, is given.
Is there a comprehensive table of all of the valid opcodes of Electrologica X1 and their meanings?