From mboxrd@z Thu Jan 1 00:00:00 1970 From: grog@lemis.com (Greg 'groggy' Lehey) Date: Mon, 27 Mar 2017 09:25:38 +1100 Subject: [TUHS] Happy birthday, PDP-8! In-Reply-To: References: <01db01d2a32a$1eae0280$5c0a0780$@ronnatalie.com> Message-ID: <20170326222538.GE81001@eureka.lemis.com> On Monday, 27 March 2017 at 6:49:30 +1100, Dave Horsfall wrote: > > 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. Recursion? What was that? This was fairly typical of the day. I've used other machines (UNIVAC, Control Data) that did the same. Later models added a second call method that stored the return address in a register instead, only marginally easier for recursion. At Uni I was given a relatively simple task to do in PDP-8 assembler: a triple precision routine (36 bits!) to clip a value to ensure it stayed between two limits. Simple, eh? Not on the PDP-8. Three parameters, each three words long. only one register, no index registers. I didn't finish it. Revisiting now, I still don't know how to do it elegantly. How *did* the PDP-8 pass parameters? Greg -- Sent from my desktop computer. Finger grog at lemis.com for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: not available URL: