The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] [tuhs] PDP-11 and early Unix
@ 2022-03-14 20:38 Noel Chiappa
  0 siblings, 0 replies; 8+ messages in thread
From: Noel Chiappa @ 2022-03-14 20:38 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

Oops:

    >  Instructions had a 4-bit opcode ('000'-'054')

'060' was JMP.

    > ('060'opcodes were for the optional EAE.)

'064'.

	Noel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
@ 2022-03-14 20:22 Noel Chiappa
  0 siblings, 0 replies; 8+ messages in thread
From: Noel Chiappa @ 2022-03-14 20:22 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Clem Cole

    > I'm thrilled to see the 11 kept alive.

Ditto. The most elegant archtecture ever, IMO.


    > I was under the impression ??Ken?? had created them for B
    > independently (which, of course, was first on the PDP-7).

"The Development of the C Language", by Dennis M. Ritchie:

  https://www.bell-labs.com/usr/dmr/www/chist.html

says:

  The PDP-7, however, did have a few `auto-increment' memory cells, with the
  property that an indirect memory reference through them incremented the cell.
  This feature probably suggested such operators to Thompson; the
  generalization to make them both prefix and postfix was his own. Indeed,
  the auto-increment cells were not used directly in implementation of the
  operators, and a stronger motivation for the innovation was probably his
  observation that the translation of ++x was smaller than that of x=x+1.

Note the "probably"; unless Ken remembers, and says something, that's
probably the best we are going to get.


    > I did not think the PDP-7 ISA includes addressing modes in the same
    > manner as the 11. .. I thought PDP-7 is a very simple instruction (and
    > small) with an AC, Link/Indirection and a PC - it reminded me of the
    > PDP-8 more than anything else

The PDP-4, -7 and -9 are all the same architecture (very similar to the
PDP-1, but simplified a bit), differing only in implementation. (Most PDP-7
code will run on a -9, un-modified.) Basic instructions look like:

  Instructions had a 4-bit opcode ('000'-'054'), 1 bit of indirect, and 13
  bits of address. It was a load-store architecture, with a single accumulator.

So, yes, similar to an -8. There are other opcodes for non-memory operations
('074' opcode), and I/O ('070'), using bits in the 'address' field. ('060'
opcodes were for the optional EAE.) All of the -4/-7/-9 had the
'auto-increment on locations 010-017' when indirecting through them' feature.
Bitsavers has fairly complete docs on them all:

  http://www.bitsavers.org/pdf/dec/pdp4/
  http://www.bitsavers.org/pdf/dec/pdp7/
  http://www.bitsavers.org/pdf/dec/pdp9/

	Noel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
  2022-03-14 18:00 ` Clem Cole
@ 2022-03-14 19:03   ` Angelo Papenhoff
  0 siblings, 0 replies; 8+ messages in thread
From: Angelo Papenhoff @ 2022-03-14 19:03 UTC (permalink / raw)
  To: tuhs

On 14/03/22, Clem Cole wrote:
> >
> > And a tip of the hatly hat for getting this:
> >
> >   Although the ++ and - operators in C are equivalents of DEC and INC
> >   instructions, they were inspired by an addressing mode in the PDP-7.
> >
> As I said, the authors seem to have done a little homework, although I was
> under the impression ??Ken?? had created them for B independently (which,
> of course, was first on the PDP-7).  The ++/-- for increment and decrement
> was just a nice notation since they are such a common occurrence in real
> code, it's handy to have. But, I did not think the PDP-7 ISA includes
> addressing modes in the same manner as the 11.  I'm probably confused, but
> I thought PDP-7  is a very simple instruction (and small) with an AC,
> Link/Indirection and a PC - it reminded me of the PDP-8 more than anything
> else [although, IIRC it could do both 1's complement and 2's - depending
> the type of AND instruction].

The PDP-7 has auto-increment registers at 10-17 that are incremented
when addressed indirectly.
I don't think it's even possible that the B runtime used them, because
of the implied indirection, which is logically separate in B.
They might still have been an inspiration, but i didn't get that
impression from the copious discussion of that topic.

aap

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
  2022-03-14 16:56 Noel Chiappa
@ 2022-03-14 18:00 ` Clem Cole
  2022-03-14 19:03   ` Angelo Papenhoff
  0 siblings, 1 reply; 8+ messages in thread
From: Clem Cole @ 2022-03-14 18:00 UTC (permalink / raw)
  To: Noel Chiappa; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

On Mon, Mar 14, 2022 at 12:59 PM Noel Chiappa <jnc@mercury.lcs.mit.edu>
wrote:

>
>
> Not a bad artcle, but it had a number of minor errors, which I found
> irritating.
> They should have gotten an expert to proof it.
>
Sure - but usually these are way more bad than good.  Usually way too
much urban legend, so I'm thrilled to see the 11 kept alive.

>
> And a tip of the hatly hat for getting this:
>
>   Although the ++ and - operators in C are equivalents of DEC and INC
>   instructions, they were inspired by an addressing mode in the PDP-7.
>
As I said, the authors seem to have done a little homework, although I was
under the impression ??Ken?? had created them for B independently (which,
of course, was first on the PDP-7).  The ++/-- for increment and decrement
was just a nice notation since they are such a common occurrence in real
code, it's handy to have. But, I did not think the PDP-7 ISA includes
addressing modes in the same manner as the 11.  I'm probably confused, but
I thought PDP-7  is a very simple instruction (and small) with an AC,
Link/Indirection and a PC - it reminded me of the PDP-8 more than anything
else [although, IIRC it could do both 1's complement and 2's - depending
the type of AND instruction].

[-- Attachment #2: Type: text/html, Size: 2134 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
@ 2022-03-14 16:56 Noel Chiappa
  2022-03-14 18:00 ` Clem Cole
  0 siblings, 1 reply; 8+ messages in thread
From: Noel Chiappa @ 2022-03-14 16:56 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: "Nelson H. F. Beebe"

    > there is a nice compact history of the PDP-11 and early Unix at this
    > new article:

Not a bad artcle, but it had a number of minor errors, which I found irritating.
They should have gotten an expert to proof it.


Here are some:

  registers could access any other register - as well as memory or direct
  data - using one of the six different addressing modes

I think 'instruction' may have been meant for the first "register"; as
written it makes on sense. (Unlike the PDP-10, in the PDP-11, a register
can't address another register.) Oh, and there are eight addressing modes.

   use of labels instead of hard-coded addresses makes it easier to
   program and makes the code relocatable in memory

I'm not sure whether the writer knows the difference between 'PC-relative
addressing' (a PDP-11 feature; code that will run at any address, without
_any_ changes to the binary) and 'relocatable binary (which uses labels, as he
describes). - but is not PDP-11 specific.

  The program counter can be accessed like any of the other registers ... The
  program counter is intended to support jump, branching, and other control
  flow instructions.

Uh, no. It's not clear _exactly_ what was meant here, but... having the PC as
a general register is for PC-relative addressing of operands, immediate data,
and absolute addressing of operands. Jumps, branches, etc don't use the fact
that the PC is a general register.

  These are the key advantages of assembly programming over high-level
  languages - assembler code always runs faster and uses less memory.

Not really, with modern compilers.

  The number above represents -2.

A commenter caught this one.

  Just use a $ to represent a decimal number

In UNIX assembler, "$" means 'immediate data'; a trailing 
"." means decimal.


And a tip of the hatly hat for getting this:

  Although the ++ and - operators in C are equivalents of DEC and INC
  instructions, they were inspired by an addressing mode in the PDP-7.

right.

	Noel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
  2022-03-14 14:59 ` Ron Natalie
@ 2022-03-14 15:13   ` Clem Cole
  0 siblings, 0 replies; 8+ messages in thread
From: Clem Cole @ 2022-03-14 15:13 UTC (permalink / raw)
  To: Ron Natalie; +Cc: The Unix Heritage Society mailing list

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Nelson - thank you.  nice article.  FYI: I just passed it on the number of
the folks that had a bit to do with the 11 at DEC.

On Mon, Mar 14, 2022 at 11:07 AM Ron Natalie <ron@ronnatalie.com> wrote:

> Amusingly, the picture at the top of the article is not of any real PDP-11.
>
Yep - I smiled like you did.

> It's one of the PiDP-11 simulations.  I've got one just like it sitting
> on my desk here (running 2.9 bsd mocked up to look like an old JHU/BRL
> UNIX).
>
I tend to leave mine running V7, but it can boot a number of systems.  My
PiDP-8 is running DOS-11, but admit I want to get that running TSS-8, but
is has an issue I have not had the time to chance down.

[-- Attachment #2: Type: text/html, Size: 1523 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TUHS] [tuhs] PDP-11 and early Unix
  2022-03-14 12:58 Nelson H. F. Beebe
@ 2022-03-14 14:59 ` Ron Natalie
  2022-03-14 15:13   ` Clem Cole
  0 siblings, 1 reply; 8+ messages in thread
From: Ron Natalie @ 2022-03-14 14:59 UTC (permalink / raw)
  To: The Unix Heritage Society mailing list

Amusingly, the picture at the top of the article is not of any real 
PDP-11.
It's one of the PiDP-11 simulations.  I've got one just like it sitting 
on my desk here (running 2.9 bsd mocked up to look like an old JHU/BRL 
UNIX).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] [tuhs] PDP-11 and early Unix
@ 2022-03-14 12:58 Nelson H. F. Beebe
  2022-03-14 14:59 ` Ron Natalie
  0 siblings, 1 reply; 8+ messages in thread
From: Nelson H. F. Beebe @ 2022-03-14 12:58 UTC (permalink / raw)
  To: The Unix Heritage Society mailing list

Although the story is well known to members of this list, there is a nice
compact history of the PDP-11 and early Unix at this new article:

	A brief tour of the PDP-11, the most influential minicomputer of all time
	https://arstechnica.com/gadgets/2022/03/a-brief-tour-of-the-pdp-11-the-most-influential-minicomputer-of-all-time/

It describes PDP-11 assembly language, and shows the booting of a Unix
system on a simh instance.  It also includes the famous picture of
Dennis and Ken at a PDP-11 console, and concludes with a link to an
online text of a book about PDP-11 assembly language programming.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-14 20:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 20:38 [TUHS] [tuhs] PDP-11 and early Unix Noel Chiappa
  -- strict thread matches above, loose matches on Subject: below --
2022-03-14 20:22 Noel Chiappa
2022-03-14 16:56 Noel Chiappa
2022-03-14 18:00 ` Clem Cole
2022-03-14 19:03   ` Angelo Papenhoff
2022-03-14 12:58 Nelson H. F. Beebe
2022-03-14 14:59 ` Ron Natalie
2022-03-14 15:13   ` Clem Cole

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).