The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: jnc@mercury.lcs.mit.edu (Noel Chiappa)
Subject: [TUHS] PDP-11, Unix, octal?
Date: Mon, 16 Jan 2017 15:45:08 -0500 (EST)	[thread overview]
Message-ID: <20170116204508.CFD1918C085@mercury.lcs.mit.edu> (raw)

    > From: Warren Toomey

    > Something I've been meaning to ask for a while: why Unix and octal on
    > the PDP-11? Because of the DEC documentation?

Yeah, DEC did it all in octal.

    > I understand why other DEC architectures (e.g. PDP-7) were octal: 18b
    > is a multiple of 3. But PDP-11 is 16b, multiple of 4.

Look at PDP-11 machine code. Two-op instructions look like this (bit-wise):

  oooossssssdddddd

where 'ssssss' and 'dddddd' (source and destination) have the same format:

  mmmrrr

where 'mmm' is the mode (things like R, @Rn, etc) and 'rrr' is the register
number. All on octal boundaries. So if you see '010011' in a dump (or when
looking at memory through the front console switches :-), you know
immediately that means:

  MOV	R0, @R1

Much harder in hex... :-)

	Noel


             reply	other threads:[~2017-01-16 20:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 20:45 Noel Chiappa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-16 19:10 [TUHS] Article on 'not meant to understand this' Steve Johnson
2017-01-16 20:15 ` [TUHS] PDP-11, Unix, octal? Warren Toomey
2017-01-16 20:25   ` Lars Brinkhoff
2017-01-16 22:31     ` ron minnich
2017-01-16 20:31   ` Erik E. Fair
2017-01-17  1:09   ` Steve Johnson
2017-01-17  1:33     ` William Pechter
2017-01-17 14:28     ` Joerg Schilling
2017-01-17 15:14       ` Nelson H. F. Beebe
2017-01-17 16:53         ` William Cheswick
2017-01-17 14:12   ` Joerg Schilling
2017-01-17 15:28     ` ron minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170116204508.CFD1918C085@mercury.lcs.mit.edu \
    --to=jnc@mercury.lcs.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).