IBM 1401 address chaining

An important feature of the IBM 1401 that is useful for reducing the size of programs is address chaining.

As an insruction of length greater than one is fetched, the second character is put into the first character of the A-address register. If there are third and fourth characters, they are put into the second and third characters of the A-address register.

If the instruction length is one, the A-address register is not changed.

If the instruction OP code is not L, M, Q or H, the second through fourth characters of the instruction are also put into the B-address register as they are fetched. Otherwise, the B-address register is not changed at this point.

As an instruction of length greater than four is fetched, the fifth character is put into the first character of the B-address register. If there are sixth and seventh characters, they are put into the second and third characters of the B-address register.

The Dataflow manual provides detailed information about the instruction fetch phase.

Because of this method of changing the contents of address registers, if the contents of an address register after executing the previous instruction are the contents desired at the beginning of the next instruction, the address field need not be present. It is not possible to provide the B-address field and omit the A-address field.

Chaining is frequently used to move or add adjacent fields, but it has many other uses. One that is not obvious is to chain BCE or BWZ instructions.

The Principles of Operation manual provides detailed information about the contents of address registers after each instruction is executed.