[TUHS] who invented the link register

Lawrence Stewart stewart at serissa.com
Wed Oct 26 03:00:39 AEST 2022

I’ve just spent a fun hour looking at the old Whirlwind documents.  I think I agree with Angelo.

The 1947 block diagrams and time-pulse charts show that the original “SP” (subprogram) instruction transferred the low 11 bits of the instruction directly to the program counter.  They do not show the old program counter being saved in the AR register, nor is there yet the “TA” (transfer address) instruction to save the AR register to memory.

Evidently both these new features, which together provide a branch and link function were likely described in memo M-647, which is not scanned anywhere I can find.  It is called “Some new orders for WWI"

There was already logic for the program counter to drive the bus, and logic to capture the bus into the AR register, so the modification to SP to save the old program counter was likely pretty easy: drive the bus from the program counter, and capture it in AR, just by adding some new diodes to the sequencer.

Adding the Transfer Address instruction was likely also pretty easy, since there was a way for the AR register to drive the bus. 

With the new SP and TA, one would use SP to call a subroutine, and the first instruction of any subroutine would be TA to save the return address into the final location of the subroutine.  (TA only modified the low 11 bits of the 16 bit location)

Before these instructions, a subroutine call would require one additional memory location, to hold the return address for each point of call, and one additional instruction, one to load the return address into the accumulator and one to store it into the code at the end of the subroutine. (The latter could be the first instruction of the subroutine.)

Originally I thought that maybe David Wheeler invented the Link register, since he’s often credited with inventing the subroutine, but it looks like the particular thing he did was the idea of the “Wheeler Jump” where code explicitly stores the return address into the instruction at the end of the subroutine.  That idea was used in Whirlwind as well.  EDSAC I did not have link, but it was proposed for EDSAC II.  Whirlwind was likely first to implement.

> On 2022, Oct 25, at 4:35 AM, Angelo Papenhoff <aap at papnet.eu> wrote:
> On 25/10/22, Angelo Papenhoff wrote:
>> Might be earlier than this, I just happen to know the Whirlwind somewhat
>> well. It's late 40s machine, so you probably won't find anything *much*
>> older.
> Addendum: the original report from 1947 does not describe this behaviour
> yet. The change came in oct. 1948. M-668 mentions it and refers to M-647,
> which however is not available online.
> So the concept of saving the resturn address in another register is at
> least as old as oct. 1948, but again I wouldn't be surprised if some
> even slightly earlier computer had it too.
> aap

More information about the TUHS mailing list