Next: Storing operators, Previous: Instruction structure, Up: MIX instruction set
The following instructions are used to load memory contents into a register.
LDArA <- V.
LDXrX <- V.
LDirIi <- V.
LDANrA <- -V.
LDXNrX <- -V.
LDiNrIi <- -V.
In all the above load instructions the `MOD' field selects the bytes of the memory cell with address `M' which are loaded into the requisite register (indicated by the `OPCODE'). For instance, the word `+ 00 13 01 27 11' represents the instruction
LD3 13,1(3:3)
^ ^ ^ ^
| | | |
| | | --- MOD = 27 = 3*8 + 3
| | --- INDEX = 1
| --- ADDRESS = 00 13
--- OPCODE = 11
Let us suppose that, prior to this instruction execution, the state of the MIX computer is the following:
[rI1] = - 00 01
[rI3] = + 24 12
[12] = - 01 02 03 04 05
As, in this case, `M = 13 + [rI1] = 12', we have
V = [M](3:3) = (- 01 02 03 04 05)(3:3)
= + 00 00 00 00 03
(note that the specified subfield is left-padded with null bytes to complete a word). Hence, the MIX state, after the instruction execution, will be
[rI1] = - 00 01
[rI3] = + 00 03
[12] = - 01 02 03 04 05
To further illustrate loading operators, the following table shows the contents of `rX' after different `LDX' instructions: