The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Ronald Natalie <ron@ronnatalie.com>
To: Jacob Ritorto <jacob.ritorto@gmail.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 09:03:16 -0400	[thread overview]
Message-ID: <3642A182-45AA-43F8-A07B-8FAB69AD84A9@ronnatalie.com> (raw)
In-Reply-To: <CAHYQbfA6pKX46RqJipojKjWzEfS_bkWyW2bz5wpj5aTOw10ucA@mail.gmail.com>

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

Yes, you aren’t programming 2.11 BSD correctly.

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.


> On Apr 27, 2020, at 9:56 PM, Jacob Ritorto <jacob.ritorto@gmail.com> wrote:
> 
>         mov     $1,r0
>         sys     4
>         a
>         6
>         sys     1

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).



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

  reply	other threads:[~2020-04-28 13:04 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 [this message]
2020-04-29  0:17   ` Jacob Ritorto
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=3642A182-45AA-43F8-A07B-8FAB69AD84A9@ronnatalie.com \
    --to=ron@ronnatalie.com \
    --cc=jacob.ritorto@gmail.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).