IndexBy

Trait IndexBy 

Source
pub trait IndexBy<T> {
    // Required method
    fn index_by(&self, delta: T) -> Address;
}
Expand description

The IndexBy trait implements address arithmetic (adding a signed or unsigned value to an address).

On page 12-9, Volume 2 of the Technical Manual contains some wording that I interpret to mean that address indexation arithmetic wraps:

While the sum of a base address in N₂,₁ and an index register in X is being formed betweek PK¹³ and PK²², the X Adder carry circuit is forced into a “set” condition. This causes the sum of an 18 bit number and its 18 bit ONE’s complement to be all ZEROS, rather than all ONES, if this sum should be formed. The comuted address of an operand, deferred address, or next instruction then becomes the first register of the S Memory (address 0) rather than the last register of the V mMemory (address 377 777 (octal)), when, for example, the base address is 000 004 and the index is 777 773. The logic for obtaining this result simply uses the PK¹³ᵝ 0.4 microsecond time level to set the X Adder carry circuit at the time that XAC would ordinarily have been used to clear it.

IndexBy is also used to increment the program counter, and on the real TX2 this was done by a special circuit, not an adder. Volume 2 of the Technical Manual (section 12-2.3 “P REGISTER DRIVER LOGIC”) states,

Information can be transferred into the P register only from the X Adder. In addition to this single transfer path, ther P register has a counter which can index the contents of the P register by one. Note that count circuit does not alter the contents of P₂.₉

Required Methods§

Source

fn index_by(&self, delta: T) -> Address

Implementors§