The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Angelo Papenhoff <aap@papnet.eu>
To: Dave Horsfall <dave@horsfall.org>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] Unix quix
Date: Thu, 30 Jan 2020 07:32:06 +0100	[thread overview]
Message-ID: <20200130063206.GA28074@indra.papnet.eu> (raw)
In-Reply-To: <alpine.BSF.2.21.9999.2001301457490.15513@aneurin.horsfall.org>

On 30/01/20, Dave Horsfall wrote:
> On Wed, 22 Jan 2020, Noel Chiappa wrote:
> 
> [ Whirlwind ]
> 
> > Pretty interesting machine, if you study its instruction set, BTW; with 
> > no stack, subroutines are 'interesting'.
> 
> Not much worse than the PDP-8 :-)  Plant return address in first word and 
> jump to the second word; to return, do an indirect jump to the first word.
> 
> Recursion was possible. but I think you had to emulate the stack.

On the whirlwind the sp (subprogram) instruction puts the return address
in the A register. with ta (transfer A) you can put it into the address
part of an instruction, so a function call is as simple as

	...
	sp foo
	...

	foo:	ta foo0
		...
	foo0:	sp .

So it's pretty nice you can use sp for calls and jumps. cp (conditional
sp) works the same but only jumps if AC is negative.
The big difference between the WW and later machines is that there is no
indirection on the WW! You end up writing lots of addresses into
instructions. It's even weirder on the TX-0 with its (original) limited
instruction set where you don't even have instructions to just store an
address, only the full word.

aap

  reply	other threads:[~2020-01-30  6:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 18:42 Noel Chiappa
2020-01-24 18:57 ` Paul Winalski
2020-01-30  4:00 ` Dave Horsfall
2020-01-30  6:32   ` Angelo Papenhoff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-24 19:38 Nelson H. F. Beebe
2020-01-24 20:05 ` Bakul Shah
2020-01-22 20:49 Doug McIlroy
2020-01-22 23:06 ` Rob Pike
2020-01-23 15:56   ` Leah Neukirchen
2020-01-24  2:44     ` Warner Losh
2020-01-24 14:49       ` Clem Cole
2020-01-24 16:34         ` Jon Steinhart
2020-01-26  0:03           ` Heinz Lycklama
2020-01-24 16:40         ` Warner Losh
2020-01-20 20:28 Rob Pike
2020-01-20 21:06 ` Adam Thornton
2020-01-22  9:31 ` Rob Pike
2020-01-22 14:57   ` Dan Cross
2020-01-22 17:54     ` Warner Losh
2020-01-22 18:01       ` Vincenzo Nicosia
2020-01-22 18:21       ` Clem Cole
2020-01-22 19:42         ` Warner Losh
2020-01-22 20:42           ` Clem Cole
2020-01-22 23:10             ` Rob Pike
2020-01-22 23:34             ` Warner Losh
2020-01-22 23:42               ` Clem Cole
2020-01-22 19:00       ` Warner Losh

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=20200130063206.GA28074@indra.papnet.eu \
    --to=aap@papnet.eu \
    --cc=dave@horsfall.org \
    --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).