Transfer

There are three types of transfers (copy) of data between registers and register arrays:

  1. A register to a register, denoted by "TransferRtoR",
  2. A register to a register array, denoted by "TransferRtoA",
  3. A register array to a register, denoted by "TransferAtoR".

In all cases, the user is able to transfer data to or from any set of consecutive bits of a register. The old data in the part of the register receiving the new data is lost and is replaced with the new data. The rest of the receiving register is unchanged. That is, if you transfer 4 bits into the first 4 bits of a 16-bit register, then the last 12 bits of the register are unchanged by the transfer.

When transferring to or from a register array, the user must specify an index register and a sequence of consecutive bits of that register whose value will form the index of the register in the array to or from which the data is to be transferred. For example, a TransferRtoA microinstruction might be created to transfer bits from a register r to a register array A using bits 3-5 of an index register to specify which register in the array is to receive the data. If bits 3-5 of the index register contain the value 0, then the data in register r will be transferred to the first register in array A.

Parameters:

Source: a register or register array from which data is to be transferred

Source start bit: this number designates the leftmost bit that is to be transferred. It must be a number from 0 to one less than the width of the source register or register array.

Destination: a register or register array to which data is to be transferred

Destination start bit: this number designates where the leftmost transferred bit is to be placed in the destination register.

Number of bits: this specifies how many bits are to be transferred. The source start bit added to the number of bits must yield a sum that is at most the width of the source register or register array. Similarly for the destination register or register array.

Index: a register which contains the index of the source or destination register in the array to or from which data is to be transferred. This parameter is only used in transfers of type TransferRtoA or TransferAtoR. The value of the bits in the index register that are used to compute the index are treated as an unsigned integer (that is, they are not treated as a two's complement representation of an integer).

Index start bit: this number designates the position of the leftmost bit of the index register used to compute the index into the array.

Index number of bits: this specifies how many consecutive bits of the index register are to be used to compute the index into the array.


For example, if you specify 16-bit registers r1 and r2 as the source and destination registers, and if you specify a source start bit of 0, a destination start bit of 12, and the number of bits as 4, then the left-most 4 bits of r1 will be transferred (more precisely, copied) into the right-most 4 bits of r2.

For another example, suppose you specify a TransferRtoA microinstruction with source register r and destination register array A containing 8 registers. If you specify an index register i and index start bit = 0 and index number of bits = 3, then the leftmost 3 bits of i are treated as an integer from 0 to 7 that is used to specify which of the 8 registers in array A is to receive the data.