The PDP6 multi-level indirect addressing allowed one instruction to address a multi-dimensional array, with the coordinates taken from the accumulators (fast registers). The programmer created, for each dimension, a set of pointers into an array of the next higher dimension. These intermediate arrays are Margin Arrays. If the array indices are in accumulators A,B,C,D, and the array size is I*J*K*L, the fetch instruction would look like MOVE X,@MARA(A) @ means indirect address The margin arrays are MARA: @MARB(B); @MARB+J(B); @MARB+2*J(B); ... ; @MARB+(I-1)*J(B) MARB: @MARC(C); @MARC+K(C); ... ; @MARC+(I*J-1)*K(C) MARC: ARR(D); ARR+L(D); ... ; ARR+(I*J*K-1)*L(D) ARR: BLOCK(I*J*K*L) <--- the array data goes here Of course people came up with hacks. I wrote a program to tabulate 5x5 magic squares, and used the fancy addressing to calculate sums of partial rows in the partially filled-in magic square, in a single instruction. I calculated the expression 65-(A+B+C) in one instruction, with the intermediate margin arrays pointing to overlapping areas in one-dimensional arrays. Rich ------- Quoting Tom Karzes <karzes@sonic.net>:
If I recall correctly, the PDP-10 had a similar situation with indirect memory references. Pointers had an "indirect" bit, and if set, the indirection would continue for as long as the pointer chain had the indirect bit set.
Does anyone recall the details of how this worked? I assume the sequence could be interrupted and later resumed?
Tom
Bernie Cosell writes:
On 15 Mar 2018 at 17:13, Henry Baker wrote:
... On the PDP-1 (I know, more comments from the stone age) it did "infinite" levels of indirect, But: ...
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun