The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Jacob Ritorto <jacob.ritorto@gmail.com>
To: Ronald Natalie <ron@ronnatalie.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] as(1) on Ultrix-11 vs 2.11BSD
Date: Tue, 28 Apr 2020 20:17:54 -0400	[thread overview]
Message-ID: <CAHYQbfBPgLKLGeGL=wLBQLOhXqLd0AfpRZOpfJi_7hjo2aYc3w@mail.gmail.com> (raw)
In-Reply-To: <3642A182-45AA-43F8-A07B-8FAB69AD84A9@ronnatalie.com>

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

On Tue, Apr 28, 2020 at 9:03 AM Ronald Natalie <ron@ronnatalie.com> wrote:

> Yes, you aren’t 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 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.   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’t look at the
> 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 return
> value of write).
>

Ah, so passing exit code as an arg to sys 1.  Cool.  Thanks again!

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

  reply	other threads:[~2020-04-29  0:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  1:56 Jacob Ritorto
2020-04-28 13:03 ` Ronald Natalie
2020-04-29  0:17   ` Jacob Ritorto [this message]
2020-04-29  0:54     ` ron
2020-04-29  2:26 Noel Chiappa
2020-04-29  4:08 ` Jacob Ritorto
2020-04-29 12:20   ` Ronald Natalie
2020-04-29 13:55 Paul Ruizendaal
2020-04-29 14:18 ` ron
2020-04-30 21:49   ` Alexander Voropay
2020-04-30 22:06     ` Clem Cole
2020-04-30 22:09       ` Clem Cole
2020-05-01  0:12     ` Ronald Natalie

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='CAHYQbfBPgLKLGeGL=wLBQLOhXqLd0AfpRZOpfJi_7hjo2aYc3w@mail.gmail.com' \
    --to=jacob.ritorto@gmail.com \
    --cc=ron@ronnatalie.com \
    --cc=tuhs@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).