The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] as(1) on Ultrix-11 vs 2.11BSD
@ 2020-04-29 13:55 Paul Ruizendaal
  2020-04-29 14:18 ` ron
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Ruizendaal @ 2020-04-29 13:55 UTC (permalink / raw)
  To: TUHS main list

> Sorry, I typed that in haste without testing. I don’t have a 2.11 system to try it on. However, reading the source code, I did that wrong. The args go on the stack, not in line with the code.
> mov $6, -(sp)
> mov a, -(sp)
> mov $1,-(sp)
> sys 4

Without suggesting that every helpful post should be tested, I find the superb https://unix50.org web emulator excellent for such things.

Many thanks to the folks hosting & maintaining this great resource!


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [TUHS] as(1) on Ultrix-11 vs 2.11BSD
@ 2020-04-29  2:26 Noel Chiappa
  2020-04-29  4:08 ` Jacob Ritorto
  0 siblings, 1 reply; 13+ messages in thread
From: Noel Chiappa @ 2020-04-29  2:26 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Jacob Ritorto

    > I wonder if the differences are written up somewhere.  I did try to look
    > for more documentation but came up short.

Sounds like a perfect topic for a CHWiki page. :-) E.g. this one:

  http://gunkies.org/wiki/Unix_V6_internals

which I did as a bit of an addendum to Lions, to explain rsav, qsav and ssav, and
similar topics.


I noticed in the comparison of your two binary files that the instructions
looked the same, but the a.out headers had a difference, but I didn't remember
the fields in the a.out header enough to know what the differences meant.

I thought I remembered doing an a.out page there, but apparently not. I
thought about doing one now, but decided it wasn't worth it; I just needed to
spin up my V6 system and do 'man a.out'! :-)

   Noel


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [TUHS] as(1) on Ultrix-11 vs 2.11BSD
@ 2020-04-28  1:56 Jacob Ritorto
  2020-04-28 13:03 ` Ronald Natalie
  0 siblings, 1 reply; 13+ messages in thread
From: Jacob Ritorto @ 2020-04-28  1:56 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

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

Hiya!
  Got these two pdp11s, one an 11/23 (Ultrix-11 3.1) and the other an 11/84
(2.11BSD)

On the Ultrix machine, I can enter an assembly language program, assemble
it and run it fine.
amnesiac# cat hello.s
        mov     $1,r0
        sys     4
        a
        6
        sys     1
a:      <Hello\n>
amnesiac# od hello
0000000 000407 000022 000000 000000 000014 000000 000000 000000
0000020 012700 000001 104404 000014 000006 104401 062510 066154
0000040 005157 000000 000000 000000 000002 000000 000000 000000
0000060 000000 000000 000141 000000 000000 000000 000002 000014
0000100
amnesiac# ./hello
Hello
amnesiac#


But on the BSD machine, the exact same source program assembles differently
and crashes with Illegal instruction when I run it.
> cat hello.s
        mov     $1,r0
        sys     4
        a
        6
        sys     1
a:      <Hello\n>
> od a.out
0000000  000407 000022 000000 000000 000010 000000 000000 000000
0000020  012700 000001 104404 000014 000006 104401 062510 066154
0000040  005157 000000 000000 000000 000002 000000 000000 000000
0000060  000000 000000 000000 000004 000002 000014 000000 000006
0000100  000141
0000102
> ./a.out
Illegal instruction (core dumped)
>


Anyone know what I'm doing wrong?

thx
jake

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-05-01  0:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 13:55 [TUHS] as(1) on Ultrix-11 vs 2.11BSD 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
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29  2:26 Noel Chiappa
2020-04-29  4:08 ` Jacob Ritorto
2020-04-29 12:20   ` Ronald Natalie
2020-04-28  1:56 Jacob Ritorto
2020-04-28 13:03 ` Ronald Natalie
2020-04-29  0:17   ` Jacob Ritorto
2020-04-29  0:54     ` ron

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