The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Angelo Papenhoff <aap@papnet.eu>
To: tuhs@tuhs.org
Subject: [TUHS] Re: who invented the link register
Date: Wed, 26 Oct 2022 07:29:28 +0200	[thread overview]
Message-ID: <Y1jFuA+0xXwPVQce@indra.papnet.eu> (raw)
In-Reply-To: <20221026044530.1DAC22033C@orac.inputplus.co.uk>

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.

Cheers,
aap

  reply	other threads:[~2022-10-26  5:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 19:01 [TUHS] " ron minnich
2022-10-24 23:46 ` [TUHS] " Angelo Papenhoff
2022-10-25  8:35   ` Angelo Papenhoff
2022-10-25 17:00     ` Lawrence Stewart
2022-10-25 18:26       ` Clem Cole
2022-10-25 20:05         ` Marc Donner
2022-10-25 21:03           ` Lawrence Stewart
2022-10-26  4:45       ` Ralph Corderoy
2022-10-26  5:29         ` Angelo Papenhoff [this message]
2022-10-26  7:52           ` Marc Donner
2022-10-26 11:12         ` Larry Stewart
2022-10-25 22:24 ` Bakul Shah
2022-10-25 22:41   ` Harald Arnesen
2022-10-25 22:47   ` Robert Clausecker
2022-10-25 22:52 Noel Chiappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1jFuA+0xXwPVQce@indra.papnet.eu \
    --to=aap@papnet.eu \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).