[TUHS] who invented the link register

Angelo Papenhoff aap at papnet.eu
Wed Oct 26 15:29:28 AEST 2022

On 26/10/22, Ralph Corderoy wrote:
> > 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.)
> So before SP and TA, would the ‘latter’ instruction at the start of the
> subroutine, which stores the accumulator holding the return address, be
> modifying all sixteen bits of the location unlike TA which only modifies
> the bottom eleven?

"Before" sounds a bit misleading. The Whirlwind ran its first actual program
(from test storage, i.e. 27 switch and 5 flip-flop registers) in late 1949,
so the change we're talking about here was early enough that the old way
of doing jumps was only ever theoretical.
Still, there was from the start a td (transfer digits) instruction,
which stores the address bits from AC into the addressed location. ta is
much the same except it stores A. 

> If so, did the accumulator's top bits hold the ‘return’ op-code or was
> there another instruction near the subroutine's end which loaded the
> 11-bit address before a second instruction jumped to it?

Without ta, a subroutine jump could be done like this:

	ca reta		; load return address
	sp foo		; jump to foo
ret,	...		; return here

foo,	td foo1		; store return address
	...		; do stuff
foo1,	sp .		; return from here

reta,	ret

Of course then you lose the possibility of passing some argument in AC.


More information about the TUHS mailing list