The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: Clem Cole <clemc@ccc.com>
Cc: tuhs <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Unix V6: Assembler Listings
Date: Thu, 11 Jun 2020 08:56:22 -0600	[thread overview]
Message-ID: <CANCZdfrvp3RkK_MKbvvj9P-xcCj3Fk1jFnp+gFFsyVogdmrqXw@mail.gmail.com> (raw)
In-Reply-To: <CAC20D2O1vbT8Wp=qTjeDVAsqFv3SDW47iNawa32JDbNPUTeN+w@mail.gmail.com>

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

On Thu, Jun 11, 2020 at 7:41 AM Clem Cole <clemc@ccc.com> wrote:

> below...
>
> On Thu, Jun 11, 2020 at 9:04 AM Paul Riley <pdr0663@icloud.com> wrote:
>
>> Clem,
>>
>> Thanks for that. So this would compile on modern machines to a cross
>> compiler for V6 also running on a modern machine? I note you say macro11,
>> so not a Unix “as” style syntax, is that right?
>>
> Yes - the AT&T syntax was much simpler/less sugar than the DEC assembler.
>  But the differences are pretty easy to see.  IIRC that assembler generates
> DEC style linker objects and there is a companion linker that can create
> DEC binary objects (*i.e.* 'obj' files) as well as traditional UNIX a.out
> format.   The entire tool suite was created originally to move code from
> RT-11 to UNIX at Harvard and passed around the nascent USENIX community.
>  IIRC that version was forked from a BSD 2.x/NetBSD source repository and
> folks were adding some fields/features in the DEC obj format that RSX
> supported that RT-11 did not.
>
> Go hunting and see what you find.  My memory was that with the BSD 2.x
> project, somebody added a DEC obj to UNIX binary (a.out) converter tool, so
> that you could use ld(1) instead of using the DEC style linker that had
> been included in the original.
>

It's hard to trace. There's one on the UNSW distributions called
macro-linkr with file dates from 76 in
tuhs/Distributions/UNSW/7/source/macro-linkr (the last few elements in the
path are from an extracted tarball). The 2.9 and newer has a m11 command
that looks like a macro assembler. 2.79 (from 1980) has a number of lisp
source files that are in m11 with Harvard copyrights on them. There's a
file called 'macro' that is a binary and another called 'linkr'. The UBC
tapes posted here a while ago had rt11 emulators of various flavors (from
libraries to trap interception) and those were dated in the 76-80 time
frame. These dates seem to line up with the lisp that's on the 77 usenix
tape we have, but I've delved no further there since there's no sources.

There's also a macro/linker from stanford on the 81 tape... But it says
it's from Harvard:

>> This directory contains the sources for a version of MACRO assembly
language
>> for the PDP-11.  It produces Version 6 Unix executables that run under
.> the compatibility package on the vax.  They are essentially unmodified
from
>> those distributed on the 2nd Unix Users group distribution tape from
Harvard.
>> The only change was to make dates on listings work beyond 1979.

NetBSD, as cool as it is,  is about a decade and a half too recent :)

The 2.9BSD and newer have the m11 sources, but they are written in m11.
I've not seen if apout can be used to compile/assemble them on modern
hardware.

It has been >>years<< since I was really familiar with any of this stuff.
>  A question about it came up last fall/winter on the simh mailing listing,
> which is where I found the the URL.
>
> FWIW: I offered the modern port, assuming you might want to run some of it
> as a cross-systems on a newer OS with a modern compiler.   But if you are
> content running this on V6, then you might just want to go back to the
> original.  As I said, my memory is that's in the original USENIX Harvard
> tape.   All that should be Warner's archives if not other places on the
> Internet.
>

Yea, that's the stuff I talked about in my talks... The files I think are
somewhere in tuhs/Applications/Usenix_77, though I've not diving in too
deeply there this morning.


> Just remember that a big problem with the original code is that it will be
> written in pre-'White Book' C (that many of us learned years ago  - not
> even ANSI of Second edition - this used Lesk's portable C library etc.).
>  It sometimes looks a little strange to modern eyes.  Also if you go
> looking,  IIRC, someone at Harvard ported the DEC Macro RT-11 library to
> UNIX v6.  In the late 1970s, I remember tjk, Danny Klein, Tron McConnell
> and I, plus some of the folks over in the bio-med group (whose names I have
> forgotten) had to a number assembler codes that had been written for the
> earlier RT-11 systems to Unix for one of the projects we had.  Some of it
> got re-written in C, but I do remember we managed to use the Harvard
> assembler somehow for parts of it.   If my memory is correct, early VMS and
> messing with BLISS compatibility could have been mixed up in the project
> somehow, but I've long forgotten the details of what we were doing at the
> time.
>

The files are in the TUHS archive for the curious, but the github stuff
looks like the best place to start...


> Have fun.
>

Definitely. You could spend weeks exploring this area...

Warner

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

  reply	other threads:[~2020-06-11 14:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 11:38 Paul Riley
2020-06-11 12:55 ` Clem Cole
     [not found]   ` <9CCCBCA1-DD64-49EA-AD3E-8E2B9C548B99@icloud.com>
2020-06-11 13:40     ` Clem Cole
2020-06-11 14:56       ` Warner Losh [this message]
2020-06-11 15:26 Paul Ruizendaal
2020-06-11 15:57 ` Warner Losh

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=CANCZdfrvp3RkK_MKbvvj9P-xcCj3Fk1jFnp+gFFsyVogdmrqXw@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=clemc@ccc.com \
    --cc=tuhs@minnie.tuhs.org \
    /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).