[TUHS] Documentation on B language?

John Cowan cowan at mercury.ccil.org
Thu Mar 10 07:43:02 AEST 2016


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



More information about the TUHS mailing list