From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 22882 invoked from network); 29 Apr 2020 00:19:06 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 29 Apr 2020 00:19:06 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id A5B3B9C98A; Wed, 29 Apr 2020 10:19:04 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0DAB89C95C; Wed, 29 Apr 2020 10:18:34 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FpDHtBoL"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 356359C95C; Wed, 29 Apr 2020 10:18:32 +1000 (AEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by minnie.tuhs.org (Postfix) with ESMTPS id B3DE69C95A for ; Wed, 29 Apr 2020 10:18:31 +1000 (AEST) Received: by mail-pl1-f170.google.com with SMTP id f15so155945plr.3 for ; Tue, 28 Apr 2020 17:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OVFtBBS+bIPsge1PR++RdDzsb27/RGZIs9yY6ViyUaE=; b=FpDHtBoLq8onfL6A98Z7xhmkaOPmZ+ThowYdNsG2Gl5fWyTLMtzEpvAM9Onx0rYEHw UqI6Z1wzRbMxBwpPpOXnFA0+boiIbrHvG5JEV7iY4ONaR6dBEG5M3ifFWz9DSanAVhZA 3cdANsNRw5owsnHsX9sV4BBNjOzZ4UCX4cRFIzVhcaZcl64JkcBeuQQ3q+WXuRZ3615P fL1wFqx9/GSxQ8k59IsWzf+zXLqnzk7L44PzKnA6uwju2SNSq9zk0jTxw5Qq2qX156rT kbp6OjFff0/0F2w4Hpz8LvPHhJxwujmunhBIVpUhsfnhK44fUQC0wbSLuZUKvR5FIYqy aeXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OVFtBBS+bIPsge1PR++RdDzsb27/RGZIs9yY6ViyUaE=; b=ls4nCvTFNXMxdJkeuXfmp2p/PkD/qlEUDKZvF3qpe/dIxmlFSnx+BeusccDF5NfOp6 PWBIJP3nghiTrVYXFTp8Sizp4OSGXsQxbotL2HEDzhr1AO64u8oIauy++e2/fFTVLjIW 4hhzEEO3pBaAHEEvxFouk9+espFVbTPCbsQIVYXt4WkvuSU4UNFVT9CKQ3bIwWnyTNFO /okQoH005kJP3opfcR8YJq21gfvYZZK2qghwaJUW4Ml3uzxl+W1VJoGll9iGMV2oVZUa CaXSqdH1o60rhT3/BQYODvHv4puD590ybuqfr9nQLfK1C33GeCvIveYs4SlmSnaOxSlo jlaA== X-Gm-Message-State: AGi0PuYdZjZrprAUavI9D25ETEbSkMzgMEdhPhOh2I6KCynrYBWxPXvO skxSMKovXTdRigPMf95GvcSb1ZVwM6kVew8ixQ0= X-Google-Smtp-Source: APiQypJ3a80m+ZheF+UfjLjR6gZk8uIpoBoyqlHsWD9KXFIv7GHGwWlaDDj5cFkNCmbsv7cHaVL1sfFhZxq7Pzcowy4= X-Received: by 2002:a17:902:7c98:: with SMTP id y24mr30892816pll.37.1588119511041; Tue, 28 Apr 2020 17:18:31 -0700 (PDT) MIME-Version: 1.0 References: <3642A182-45AA-43F8-A07B-8FAB69AD84A9@ronnatalie.com> In-Reply-To: <3642A182-45AA-43F8-A07B-8FAB69AD84A9@ronnatalie.com> From: Jacob Ritorto Date: Tue, 28 Apr 2020 20:17:54 -0400 Message-ID: To: Ronald Natalie Content-Type: multipart/alternative; boundary="000000000000510d7a05a462e3e6" Subject: Re: [TUHS] as(1) on Ultrix-11 vs 2.11BSD X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000510d7a05a462e3e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 28, 2020 at 9:03 AM Ronald Natalie wrote: > Yes, you aren=E2=80=99t programming 2.11 BSD correctly. > Wow, I'd hoped it was that. Thank you so much! I spent way too much time fiddling incorrectly. Was an example I'd cobbled together from my college textbook I've been going back through, _Assembly_Language_for_the_PDP-11_RT-RSX-UNIX_ (c)1981 Kapps and Stafford. We didn't have UNIX for the class so never ran into this. > Your examples are the older UNIX syscalls (your programs work correctly i= n > Version 6 by the way as well). > > In 2.11 BSD, all the arguments for the syscalls are inline (i.e., none ar= e > passed in registers. This appears to be the beginnings of making the > kernel protable across architectures. > The systent table no longer has separate fields for args in registers and > not in registers and the code in sys/pdp/trap.c doesn=E2=80=99t look at t= he > registers anymore. > I wonder if the differences are written up somewhere. I did try to look for more documentation but came up short. Must've been quite well-ingrained in programmers' minds in the day. > Proper code now should be: > sys 4 > 1 > a > 6 > sys 1 > 0 > Note your previous code used to just return 6 from the program (the retur= n > value of write). > Ah, so passing exit code as an arg to sys 1. Cool. Thanks again! --000000000000510d7a05a462e3e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 28, 2020 at 9:03 AM Ronal= d Natalie <ron@ronnatalie.com&= gt; wrote:
Yes, you aren=E2=80=99t programming 2.= 11 BSD correctly.
=C2=A0
Wow, I'd hope= d it was that.=C2=A0 Thank you so much!=C2=A0 I spent way too much time fid= dling incorrectly.=C2=A0
Was an example I'd cobbled toge= ther from my college textbook I've been going back through, _Assembly_L= anguage_for_the_PDP-11_RT-RSX-UNIX_ (c)1981 Kapps and Stafford.=C2=A0 We di= dn't have UNIX for the class so never ran into this.

=

Your examples are the older UNIX= syscalls (your programs work correctly in Version 6 by the way as well).

In 2.11 BSD, all the arguments for the syscalls are= inline (i.e., none are passed in registers. =C2=A0 This appears to be the = beginnings of making the kernel protable across architectures.
Th= e systent table no longer has separate fields for args in registers and not= in registers and the code in sys/pdp/trap.c doesn=E2=80=99t look at the re= gisters anymore.

I wonder if th= e differences are written up somewhere.=C2=A0 I did try to look for more do= cumentation but came up short.=C2=A0 Must've been quite well-ingrained = in programmers' minds in the day.


Proper code now sho= uld be:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sys 4
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A01
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0a=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A06
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 sys 1
=C2=A0 =C2=A0 =C2=A0 =C2=A0 0
Note you= r previous code used to just return 6 from the program (the return value of= write).
=C2=A0
Ah, so passing exit = code as an arg to sys 1.=C2=A0 Cool.=C2=A0 Thanks again!

=

--000000000000510d7a05a462e3e6--