[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tuhs
Subject:    Re: [TUHS] Unix quix
From:       Angelo Papenhoff <aap () papnet ! eu>
Date:       2020-01-30 6:32:06
Message-ID: 20200130063206.GA28074 () indra ! papnet ! eu
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic