From mboxrd@z Thu Jan 1 00:00:00 1970 From: jnc@mercury.lcs.mit.edu (Noel Chiappa) Date: Sun, 26 Mar 2017 20:31:05 -0400 (EDT) Subject: [TUHS] Happy birthday, PDP-8! Message-ID: <20170327003105.B535018C085@mercury.lcs.mit.edu> > From: Dave Horsfall > And as for subroutine calls on the -8, let's not go there... As I dimly > recall, it planted the return address into the first word of the called > routine and jumped to the second instruction; to return, you did an > indirect jump to the first word. That do be correct. That style of subroutine call goes back a _long_ way. IIRC, Whirlwind used that kind of linkage (alas, I've misplaced my copy of the Whirlwind instruction manual, sigh - a real tresure). ISTVR there was something about the way Whirlwind did it that made it clear how it came to be the way it was - IIRC, the last instruction in the subroutine was normally a 'jump to literal' (i.e. a constant, in the instruction), and the Whirlwind 'jump to subroutine' stored the return address in a register; there was a special instruction (normally the first one in any subroutine) that stored the low-order N bits of that register in the literal field of the last instruction: i.e. self-modifying code. The PDP-6 (of which the PDP-10 was a clone) was on the border of that period; it had both types of subroutine linkage (store the return in the destination, and jump to dest+1; and also push the return on the stack). Noel