From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31896 invoked from network); 25 Aug 2023 20:33:55 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 25 Aug 2023 20:33:55 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9F1C042A97; Sat, 26 Aug 2023 06:33:51 +1000 (AEST) Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by minnie.tuhs.org (Postfix) with ESMTPS id 893B442A90 for ; Sat, 26 Aug 2023 06:33:45 +1000 (AEST) Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-48d167f6cffso586581e0c.0 for ; Fri, 25 Aug 2023 13:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; t=1692995624; x=1693600424; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yl9euZBGIdXOBieC/tICYaN//y6ngdc3XnF/6VH/o0s=; b=Jac/eAZf36HaWZICvwWZmQDiMh0PUGI9+gg/hpjfynwNpWjKlp0BXi5CoTDW/LtZHi iSQfNrTTf8R9zy80jTlQ6n04zRISAV6vAENRke8FwCsgFFoY6WddeNloGxL8ID8ArZkk IElfdTXJfXFWE0SZ2y9yiWaUOsmHd0WXDcDMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692995624; x=1693600424; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yl9euZBGIdXOBieC/tICYaN//y6ngdc3XnF/6VH/o0s=; b=KKRuqQUVayUvOiTE0nhXxf6sQcK9Xh0TdTopgLrKSmz/CQsKd3EBXFJaU750nH2qpi slzc3eN+g6ARDF+PM+sRlP6rN1gtlFZi/RlNaF7j+N5MGZH4KbQ0hr9fUfuu+OKKDNFt Yk/1c/TrXH3kaJl2uj+g4V2XyVsdm7g0xP1IIg6PuzMcS6+E9hkB6xHzMTRh0btWTaVk 4/bRRfuRfRWArikMhXxKCFnKM4A7y8VYnZ/UekX09Jz9OgZgsHMNLDdyaBrqqZFJJY1x Nip/EwBXNsMEIL2lN8vLmX+Bbi7+8OrWZd34vbu9JGB906Oe46dJXq0Akd0pdLYuUEfI BJ0w== X-Gm-Message-State: AOJu0YxXlXIcs8aKzuty+EILCbVR53j8TUZVCNFLZAmzrN6XR2jXHERs 2jRRIYCG0OnkyAG1k5RSbbYYU4mDy/uLHkJZKrQvRNtTas1z2TjbPpM= X-Google-Smtp-Source: AGHT+IHtx1e7rRysqnts4gdsmFA5764d5QvjIONIivzu2mE+xlRBMvkwPqRjDgNy1yXxMeGpQyUMyMvuQiV41xwxEyI= X-Received: by 2002:a1f:cb44:0:b0:48f:a303:c15e with SMTP id b65-20020a1fcb44000000b0048fa303c15emr10715112vkg.1.1692995624386; Fri, 25 Aug 2023 13:33:44 -0700 (PDT) MIME-Version: 1.0 References: <0brzeViMphXChfHcG_z67mvox9cjHK0KEt6b0VPndBMnBcJ4ywJQFoiJ-yMaR2x2FAnxqD8RjdVCf01kftJkhw0AopHnGcoY8yCpbujx56s=@protonmail.com> In-Reply-To: <0brzeViMphXChfHcG_z67mvox9cjHK0KEt6b0VPndBMnBcJ4ywJQFoiJ-yMaR2x2FAnxqD8RjdVCf01kftJkhw0AopHnGcoY8yCpbujx56s=@protonmail.com> From: Clem Cole Date: Fri, 25 Aug 2023 16:33:08 -0400 Message-ID: To: segaloco Content-Type: multipart/alternative; boundary="000000000000cc60e70603c54291" Message-ID-Hash: GHH23VPFM6IR4X4DPPXX635JO5TKIAR7 X-Message-ID-Hash: GHH23VPFM6IR4X4DPPXX635JO5TKIAR7 X-MailFrom: clemc@ccc.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: UNIX Disassemblers and other RE Tools List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000cc60e70603c54291 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable below... On Fri, Aug 25, 2023 at 3:51=E2=80=AFPM segaloco via TUHS w= rote: > Hello, I've been doing some research on the history of disassembly lately= , > tools available historically, today, and what sorts of developments have > been made regarding utilities and systems for taking a machine-code binar= y > and working it back to some semblance of source code. > > So in the early days UNIX had das(I), a PDP-11 disassembler I believe > written by Ken (he's OWNER in the manual) with very little information > other than "it exists". Fast forward to the UNIX 4.1 manual in 1981 for > the 3B20S and there is dis(1), a 3B20 disassembler. Other such manuals > feature dis(1) versions for other 3B targets. > > Was a disassembler ever considered part of the standard binary objects > toolkit with the assembler, linker, etc. not to my memory - although some of the debuggers could. IIRC, the DDT that was on the Harvard tape knew about it. I also remember on that tape was a PDP-11 disassembler. Phil Karn wrote a table-based one for UNIX when we were students - but it was aimed at 8-bit micros. It could do 8080/8085 and Z80; if I remember, it could also do MOS6502 and M6800. It had a feature that it could take an external symbol table and turn out code that was reasonable to reassemble. [ I may have a copy if it squirreled away ]. That said, while they we not part of the core tool kit, by the time of BSD4.2 there were a couple of disassemblers kicking around the USENET. I remember one for the Vax and another for the 68000. You might do a grep for dis-assembler in the USENET archives for comp.sources > or was that the sort of thing that was more niche and therefore just kind= a > cropped up when/if someone decided to write one? exactly - need driven. Phil wrote his when we were trying to pull apart a ROM for a tape controller. It had a funky interface on it that was not well documented and what we did have, was wrong. So, disassembled enough of the ROM that we could changed it. > Were there legal concerns to be grappled with when producing a > disassembler? Mumble ... by the mid-80s/late-90 people we disassembling code for game controllers and PCs. So many manufacturers started adding words in the EULA saying that was a no-no. But I don't remember worrying about it much when I was a student 10-15 years before that. > Were such tools ever shipped or did they only appear in the manuals as > they were technically up in the code base, just not commonly distributed = or > used? Also, was there any thought given during the development of C to > producing "decompilers" as has been becoming more common lately? Or was = it > a foregone conclusion that C to assembly is a "lossy" conversion and goin= g > the other direction couldn't be fully automated. > Again - in V6/V7 with DMR's compiler, it was not always easy, but the code generally was pretty straightforward. Post Wulf's 'Green Book' on compiler optimization and we started to have a generation of BLISS-style optimizers pretty much everywhere, I think those compilers really started refactoring code plus instruction sets got more sophisticated, so I think it started to get harder and harder to reconstruct. But I'll defer to someone like Paul W or Steve Johnson who loved building those style of tools. > > Thank you for any insights! > > - Matt G. > =E1=90=A7 =E1=90=A7 --000000000000cc60e70603c54291 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
below...

On Fri, Aug 25, 2023 at = 3:51=E2=80=AFPM segaloco via TUHS <tuhs@tuhs.org> wrote:
Hello, I've been doing some research on the = history of disassembly lately, tools available historically, today, and wha= t sorts of developments have been made regarding utilities and systems for = taking a machine-code binary and working it back to some semblance of sourc= e code.

So in the early days UNIX had das(I), a PDP-11 disassembler I believe writt= en by Ken (he's OWNER in the manual) with very little information other= than "it exists".=C2=A0 Fast forward to the UNIX 4.1 manual in 1= 981 for the 3B20S and there is dis(1), a 3B20 disassembler.=C2=A0 Other suc= h manuals feature dis(1) versions for other 3B targets.

Was a disassembler ever considered part of the standard binary objects tool= kit with the assembler, linker, etc.
not to my=C2=A0me= mory - although some of the debuggers could.=C2=A0 IIRC,=C2=A0the=C2=A0DDT = that was on the Harvard tape knew about it.=C2=A0 I also=C2=A0remember on t= hat tape was a PDP-11 disassembler.=C2=A0 =C2=A0Phil Karn wrote a table-bas= ed one for UNIX when we were students - but it was aimed at 8-bit micros.= =C2=A0 It could do 8080/8085 and Z80; if I remember, it could also do MOS65= 02 and M6800.=C2=A0 It had a feature that it could take an external symbol = table and turn out code that was reasonable to reassemble.=C2=A0 =C2=A0[ I = may have a copy if it squirreled away ].

That said, wh= ile they we not=C2=A0part of the core tool kit, by the time of BSD4.2 there= were a couple of disassemblers kicking around the USENET.=C2=A0 =C2=A0I re= member one for the Vax and another for the 68000. You might do a grep for d= is-assembler in the USENET archives for comp.sources

=C2=A0
= or was that the sort of thing that was more niche and therefore just kinda = cropped up when/if someone decided to write one?=C2=A0
= exactly - need driven.=C2=A0 Phil wrote his when we were trying to pull apa= rt a ROM for a tape controller.=C2=A0 It had a funky interface on it that w= as not well documented and what we did have, was wrong.=C2=A0 So, disassemb= led enough of the ROM that we could changed it.

<= div>=C2=A0
Were the= re legal concerns to be grappled with when producing a disassembler?
Mumble ... by the mid-80s/late-90 people we disassembling cod= e for game controllers and PCs. So many manufacturers started adding words = in the EULA saying that was a no-no.=C2=A0 =C2=A0But I don't remember w= orrying about it much when I was a student=C2=A0 10-15 years before that.

=C2=A0
=C2=A0 Were such tools ever shipped or did they only a= ppear in the manuals as they were technically up in the code base, just not= commonly distributed or used?=C2=A0 Also, was there any thought given duri= ng the development of C to producing "decompilers" as has been be= coming more common lately?=C2=A0 Or was it a foregone conclusion that C to = assembly is a "lossy" conversion and going the other direction co= uldn't be fully automated.
Again - in V6/V7 wi= th DMR's compiler, it was not always easy, but the code generally=C2=A0= was pretty straightforward.

Post W= ulf's 'Green Book' on compiler optimization and we started to h= ave a generation of BLISS-style optimizers pretty much everywhere, I think = those compilers really started refactoring code plus instruction sets got m= ore sophisticated, so I think it started to get harder and harder to recons= truct.=C2=A0=C2=A0

But I'll defer to someone=C2=A0= like Paul W or Steve Johnson who loved building those style of tools.
=

Thank you for any insights!

- Matt G.
= 3D""=E1=90=A7
3D""=E1=90=A7 --000000000000cc60e70603c54291--