From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Wed, 9 Mar 2016 16:43:02 -0500 Subject: [TUHS] Documentation on B language? In-Reply-To: <201603092134.u29LYp9Q010455@coolidge.cs.Dartmouth.EDU> References: <201603092134.u29LYp9Q010455@coolidge.cs.Dartmouth.EDU> Message-ID: <20160309214302.GC9515@mercury.ccil.org> Doug McIlroy scripsit: > According to Ken, the inspiration for ++ and -- came from the PDP-7 > hardware, not from previous languages. The PDP-7 supported only ++i, > where i had to be one of only a few memory addresses. "For symmetry", > Ken says, he put all four operations in B. (And he did not use the > hardware autoincrement.) On the 12-bit PDP-8, the relevant addresses were 0010-0017; any indirect reference through any such location was automatically preincremented. However, they were hard to use in libraries, because allocation of this incredibly scarce resource had to be manually managed, which meant in effect that only the main program could use any of them, and because PDP-8 programmers weren't in the habit of using them, they often were simply ignored. It was easy enough to add an extra ISZ (increment and skip if zero) operation before the indirection. -- John Cowan http://www.ccil.org/~cowan cowan at ccil.org Wer es in kleinen Dingen mit der Wahrheit nicht ernst nimmt, dem kann man auch in grossen Dingen nicht vertrauen. --Albert Einstein on honesty