Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

To: 5thGenTexan

C had pointers to pointers because you could do that addressing mode on the PDP-11.

In the old days of V7, I could look at a line of C and tell you exactly which PDP-11 instructions the compiler would emit. The mapping between C and PDP-11 assembly is very obvious. When they started porting C off onto other architectures, C looked much more powerful than originally thought by PDP-11 hackers, because we could do all those things in one line of PDP-11 Macro assembly.

For example, copying strings char-by-char with pointers, with auto-increment. Blindingly obvious that it boils down to one PDP-11 instruction, with two registers, indirect auto-inc.


79 posted on 10/14/2011 12:29:42 AM PDT by NVDave
[ Post Reply | Private Reply | To 41 | View Replies ]


To: NVDave
That's the problem with lore - sometimes we are passed down inaccuracies. The pointer to pointer story was from a prof I had.

I worked on PDP-11 based testers while in college. You knew it was going to be a bad day when the tape reader ate your diagnostics tape.

8^)

107 posted on 10/14/2011 8:04:18 AM PDT by 5thGenTexan
[ Post Reply | Private Reply | To 79 | View Replies ]

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson