The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: jnc@mercury.lcs.mit.edu (Noel Chiappa)
Subject: [TUHS] Work I've done with a PDP-11 simulator
Date: Mon, 12 May 2014 10:49:44 -0400 (EDT)	[thread overview]
Message-ID: <20140512144944.F3AB618C0D2@mercury.lcs.mit.edu> (raw)

    > To boot up the root pack (I don't think I did this at any point; I've
    > always mounted it as a subsidiary drive)
    > ...
    > The disk has a working RL bootstrap in block 0, it should boot OK. 

So I recently had to reboot my machine, and I took the opportunity to try
this; it worked right off, booted 'unix' OK. (I didn't try any of the other
Unixes in the root directory.) I had only that pack mounted on DL0, nothing
else.


    > So, just for grins, because I was curious (after your question), I did
    > try recompiling the C compiler, to see what I'd get.
    > What I got were three files (c0, c1 and c2) which were _the exact same
    > size_ (down to the byte) as the binaries on the V6 Research distro, but
    > had a number of differences when compared with 'cmp -l'. Odd!
    > ...
    > I'll take a gander tomorrow and try and work it out.

So, this turned out to be because I had replaced the csv.o in libc.a with a
new one, because the standard V6 one doesn't work with long returns (which
use R1 as well as R0, and the V6 cret bashed R1). I put the old csv.o back,
and re-linked them, and this time c? all turned out identical.

So the source in the distro really is the source for the running compiler on
it.

What was wierd was that in the new one, the routine csv is one word shorter
(and so is csv.o). So now I don't understand what made them the same sizes!?
The new ones should have been one word shorter!? Still poking into this...

I understand most of the differences between the versions of c? with the old
and new csv.o; in all the jumps to cret, the indirect word in the instruction
was off by two (because cret was one word lower because csv was one word
shorter); that, along with different contents in csv.o, created most of the
differences.

Why one word shorter? Because in csv:

	tst     -(sp)	/ creates a temporary on top of the stack
	jmp     (r0)

had been replaced with:

        jsr     pc,(r0)

(saving one instruction, and making it one word smaller).

	Noel



             reply	other threads:[~2014-05-12 14:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 14:49 Noel Chiappa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-12 19:10 Noel Chiappa
2014-05-12 20:59 ` SPC
2014-05-12 17:06 Noel Chiappa
2014-05-12 17:20 ` SPC
2014-05-12 19:50 ` John Cowan
2014-05-11 23:13 Norman Wilson
2014-05-12  5:29 ` John Cowan
2014-05-11 16:16 Norman Wilson
2014-05-11 16:45 ` John Cowan
2014-05-11 22:19   ` pechter
2014-05-11  3:26 Noel Chiappa
2014-05-11  3:13 Noel Chiappa
2014-05-11  4:20 ` John Cowan
2014-05-11  2:06 Noel Chiappa
2014-05-11  2:31 ` Gregg Levine
2014-05-11  2:34   ` Gregg Levine
2014-05-11 17:21 ` Clem Cole
2014-05-11 17:24   ` Clem Cole
2014-05-11 18:50   ` Ronald Natalie
2014-05-11  0:51 Noel Chiappa
2014-05-11  0:57 ` Larry McVoy
2014-05-11  1:27   ` John Cowan
2014-05-11  1:58     ` Larry McVoy
2014-05-11  2:40       ` John Cowan
2014-05-05 15:32 Noel Chiappa
2014-05-04 23:54 Noel Chiappa
2014-05-05  1:53 ` John Cowan
2014-05-05  8:10   ` SPC
2014-04-30  2:19 Noel Chiappa
2014-05-03 22:14 ` SPC
2014-05-03 22:20   ` Gregg Levine
2014-05-03 22:22     ` Larry McVoy
2014-05-05 13:50 ` Kurt H Maier

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=20140512144944.F3AB618C0D2@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).