The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: segaloco via TUHS <tuhs@tuhs.org>
To: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] S2-bits V2 Source Code Restoration
Date: Sun, 23 Apr 2023 17:45:22 +0000	[thread overview]
Message-ID: <AFnJ4HVwT49YWtrIG0N7dDGvQjxwobc2419dmF2vwThUnv0JZLWY7tsRVRo3Tw2i-LC61GAJ-FepgfvQI6w1EUKrrAx6x8mEiKumEHljbr0=@protonmail.com> (raw)

Hi folks, sharing another project that I've been tinkering on for a little bit since I like having a lot of irons in the fire: https://gitlab.com/segaloco/v2src

After the link is a repository which over time will be accumulating the results of disassembly and analysis of files found in the s2-bits.tar.gz file in the archive.  Details of my process are contained in the repository's readme.  The short of it is I'm disassembling the binaries one by one, and where possible am comparing them with known sources to massage these into a pretty close restoration of the original sources.

A few discoveries I've made in the process thus far:

    - These binaries appear to represent a version between the first and second editions.  The binaries themselves are a mix of "naked" binaries as well as V1 and V2 a.out formats.  Where it matters, things are much closer in character to V2 than V1.

    - All section 1 content that would be gone by V2 is removed here.  Curiously, mount(1), type(1), and umount(1) which are in both V1 and V2 are absent from the s2-bits.

    - The sources marked "V2" in the UNIX source tree may be a bit closer in character to V3.  Notable examples are that, while string references to /etc/uids remain, all data references have been updated to /etc/passwd, and several mathematical operations in the disassembled binaries map to KE-11 Extended Arithemtic Element registers where in the sources labeled "V2" in the tree have instead shifted to doing these calculations differently, presumably as these sources target the 11/45, not the 11/20.  Additionally, the cat.s in "V2" on the tree contains the '-' stdin option, which was first documented in V3.  The most likely story is that they're somewhere between, just like the s2-bits are between V1 and V2, but all of these observed differences thus far have aligned the sources with their descriptions in the third edition manual.

Anywho, as usual, if anyone spots anything amiss or that could be done better, happy to accept contributions, or fork it and tinker away.  Also, if anyone has already done this, speak up and tell me now so I don't double up on something so involved =P

- Matt G.

                 reply	other threads:[~2023-04-23 17:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='AFnJ4HVwT49YWtrIG0N7dDGvQjxwobc2419dmF2vwThUnv0JZLWY7tsRVRo3Tw2i-LC61GAJ-FepgfvQI6w1EUKrrAx6x8mEiKumEHljbr0=@protonmail.com' \
    --to=tuhs@tuhs.org \
    --cc=segaloco@protonmail.com \
    /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).