[TUHS] Unix quix

Angelo Papenhoff aap at papnet.eu
Thu Jan 30 16:32:06 AEST 2020


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


More information about the TUHS mailing list