From: jnc@mercury.lcs.mit.edu (Noel Chiappa)
Subject: [TUHS] Happy birthday, PDP-8!
Date: Sun, 26 Mar 2017 20:31:05 -0400 (EDT) [thread overview]
Message-ID: <20170327003105.B535018C085@mercury.lcs.mit.edu> (raw)
> 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
next reply other threads:[~2017-03-27 0:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 0:31 Noel Chiappa [this message]
2017-03-27 0:37 ` Arthur Krewat
2017-03-27 12:05 ` Tim Bradshaw
2017-03-27 13:35 ` Tony Finch
2017-03-27 21:37 ` Terry Smith
2017-03-27 13:45 ` [TUHS] Subroutine calling conventions - was " Toby Thain
-- strict thread matches above, loose matches on Subject: below --
2018-03-21 21:52 [TUHS] " Dave Horsfall
2018-03-21 21:59 ` George Michaelson
[not found] <mailman.659.1490686648.3779.tuhs@minnie.tuhs.org>
2017-03-28 22:10 ` Johnny Billquist
2017-03-28 2:38 Noel Chiappa
[not found] <mailman.1.1490580001.4973.tuhs@minnie.tuhs.org>
2017-03-27 23:30 ` Johnny Billquist
2017-03-27 23:33 ` Steve Nickolas
2017-03-27 23:49 ` Johnny Billquist
2017-03-27 1:24 Noel Chiappa
2017-03-27 14:07 ` Arthur Krewat
2017-03-21 23:57 Atindra Chaturvedi
2017-03-21 21:34 Dave Horsfall
2017-03-22 16:34 ` Ron Natalie
2017-03-26 19:49 ` Dave Horsfall
2017-03-26 20:11 ` Paul Winalski
2017-03-26 22:20 ` Greg 'groggy' Lehey
2017-03-26 22:25 ` Greg 'groggy' Lehey
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=20170327003105.B535018C085@mercury.lcs.mit.edu \
--to=jnc@mercury.lcs.mit.edu \
/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).