The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] recreating bj.s for Unix v5
@ 2015-06-12 18:23 Mark Longridge
  2015-06-15  5:14 ` Lars Brinkhoff
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Longridge @ 2015-06-12 18:23 UTC (permalink / raw)


I noticed that the assembly source file for blackjack is missing from
the source tree so I tried to recreate it, so far unsuccessfully.

My first idea was to grab bj.s from 2.11BSD and assemble it the Unix
v5 as command. That seems to generate a bunch of errors. Also other
assembly source files don't seem to have .even in them.

Another idea would be generate the source code from the executable
itself, but there doesn't seem to be a disassembler for early Unix.

It's possible that v5 bj.s was printed out somewhere but so far no
luck finding it.

Mark



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

* [TUHS] recreating bj.s for Unix v5
  2015-06-12 18:23 [TUHS] recreating bj.s for Unix v5 Mark Longridge
@ 2015-06-15  5:14 ` Lars Brinkhoff
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Brinkhoff @ 2015-06-15  5:14 UTC (permalink / raw)


Mark Longridge <cubexyz at gmail.com> writes:
> Another idea would be generate the source code from the executable
> itself, but there doesn't seem to be a disassembler for early Unix.

There is a PDP-11 disassembler in GNU binutils.  Maybe you can adapt it
four your needs.



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

* [TUHS] recreating bj.s for Unix v5
  2015-06-12 19:01 ` Mark Longridge
@ 2015-06-12 22:46   ` Greg 'groggy' Lehey
  0 siblings, 0 replies; 8+ messages in thread
From: Greg 'groggy' Lehey @ 2015-06-12 22:46 UTC (permalink / raw)


On Friday, 12 June 2015 at 15:01:51 -0400, Mark Longridge wrote:
> On 6/12/15, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>> Where's the binary? I'd like to take a look at it, and see if the
>> source was assembler, or C (there's a C version in the source tree,
>> too). Then I can look and see how close it is to that 2.11 source -
>> that may be a re-implementation, and totally different.
>
> Here it is:
>
> http://www.maxhost.org/other/unix-v5-bj-pdp-11-executable
>
> Judging by it's small size I figure the original code was assembly
> language.

Wouldn't it make sense to disassemble it and create a source file from
that?

Greg
--
Sent from my desktop computer.
Finger grog at FreeBSD.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft MUA reports
problems, please read http://tinyurl.com/broken-mua
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150613/b33312b7/attachment.sig>


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

* [TUHS] recreating bj.s for Unix v5
  2015-06-12 20:00 Noel Chiappa
@ 2015-06-12 20:16 ` Mark Longridge
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Longridge @ 2015-06-12 20:16 UTC (permalink / raw)


> I missed some. It also wants quest1, quest2 and quest5 (and maybe more).
> This may present a bit of a problem, as I can't find any trace of them
> anywhere, and will have to work out from the source what their arguments,
> etc are, what they do, etc.
>
> I wonder how on earth the 2.11 people got this to assemble? (Or maybe they
> didn't?)
>
 >       Noel


You gave me a good hint :)

in 2.11bsd:

cd /usr/src/games/pdp
su
make bj

which does:

as -o bj.o etc.s bj.s us.s
ld -o bj bj.o -lc

the executable seems to work OK.

I tried to assemble it in v5 and it actually does assemble but then
gives "Memory fault -- Core dumped" when trying to run it.

I was wrong about .even, the v5 assembler does understand it. It might
just be easier to modify a later version of bj.c so the v5 compiler
could use it.

On 6/12/15, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>     > From: Noel Chiappa
>
>     > another assembler source file, which contains the following routines
>     > which are missing from bj.s:
>
> I missed some. It also wants quest1, quest2 and quest5 (and maybe more).
> This may present a bit of a problem, as I can't find any trace of them
> anywhere, and will have to work out from the source what their arguments,
> etc are, what they do, etc.
>
> I wonder how on earth the 2.11 people got this to assemble? (Or maybe they
> didn't?)
>
> 	Noel
>



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

* [TUHS] recreating bj.s for Unix v5
@ 2015-06-12 20:00 Noel Chiappa
  2015-06-12 20:16 ` Mark Longridge
  0 siblings, 1 reply; 8+ messages in thread
From: Noel Chiappa @ 2015-06-12 20:00 UTC (permalink / raw)


    > From: Noel Chiappa

    > another assembler source file, which contains the following routines
    > which are missing from bj.s:

I missed some. It also wants quest1, quest2 and quest5 (and maybe more).
This may present a bit of a problem, as I can't find any trace of them
anywhere, and will have to work out from the source what their arguments,
etc are, what they do, etc.

I wonder how on earth the 2.11 people got this to assemble? (Or maybe they
didn't?)

	Noel



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

* [TUHS] recreating bj.s for Unix v5
@ 2015-06-12 19:31 Noel Chiappa
  0 siblings, 0 replies; 8+ messages in thread
From: Noel Chiappa @ 2015-06-12 19:31 UTC (permalink / raw)


    > From: Mark Longridge <cubexyz at gmail.com>

    > My first idea was to grab bj.s from 2.11BSD and assemble it the Unix v5
    > as command. That seems to generate a bunch of errors.

I saw that there's a SysIII bj.s, which is almost identical to the 2.11 one;
so the latter is probably descended from the first, which I assume is Bell
source. So I grabbed it and tried to assemble it.

The errors are because bj.s is designed to be assembled along with another
assembler source file, which contains the following routines which are
missing from bj.s:

 mesg
 decml
 nline

Dunno if you're aware of this, but, the line 'as a.s b.s' _doesn't_
separately assemble a.s and b.s, rather it's as if you'd typed
'cat a.s b.s > temp.s ; as temp.s'. (This is used in the demi-enigmatic
"as data.s l.s" in the system generation procedure.)

I looked around in the sources that come with V6, and I didn't see any obvious
such file. I'm going to whip the required routines up really quickly, and see
if the results assemble/run.


I looked to see if I could steal them from the binary of 'bj' on V6, and...
it looks like that binary is totally different from this source. Let me look
into this...


    > Also other assembly source files don't seem to have .even in them.

The V6 assembler groks '.even'.

	Noel



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

* [TUHS] recreating bj.s for Unix v5
  2015-06-12 18:39 Noel Chiappa
@ 2015-06-12 19:01 ` Mark Longridge
  2015-06-12 22:46   ` Greg 'groggy' Lehey
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Longridge @ 2015-06-12 19:01 UTC (permalink / raw)


Here it is:

http://www.maxhost.org/other/unix-v5-bj-pdp-11-executable

Judging by it's small size I figure the original code was assembly language.

On 6/12/15, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>     > From: Mark Longridge <cubexyz at gmail.com>
>
>     > My first idea was to grab bj.s from 2.11BSD and assemble it the Unix
> v5
>     > as command. That seems to generate a bunch of errors. Also other
>     > assembly source files don't seem to have .even in them.
>
> My first question was going to be 'Maybe try an earlier version of the
> source?', but I see there is no earlier version online. Odd. ISTR that some
> of the fun things in V6 came without source, maybe blackjack was the same
> way?
>
>     > Another idea would be generate the source code from the executable
>     > itself, but there doesn't seem to be a disassembler for early Unix.
>
> Where's the binary? I'd like to take a look at it, and see if the source
> was
> assembler, or C (there's a C version in the source tree, too). Then I can
> look and see how close it is to that 2.11 source - that may be a
> re-implementation, and totally different.
>
> 	Noel
>



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

* [TUHS] recreating bj.s for Unix v5
@ 2015-06-12 18:39 Noel Chiappa
  2015-06-12 19:01 ` Mark Longridge
  0 siblings, 1 reply; 8+ messages in thread
From: Noel Chiappa @ 2015-06-12 18:39 UTC (permalink / raw)


    > From: Mark Longridge <cubexyz at gmail.com>

    > My first idea was to grab bj.s from 2.11BSD and assemble it the Unix v5
    > as command. That seems to generate a bunch of errors. Also other
    > assembly source files don't seem to have .even in them.

My first question was going to be 'Maybe try an earlier version of the
source?', but I see there is no earlier version online. Odd. ISTR that some
of the fun things in V6 came without source, maybe blackjack was the same way?

    > Another idea would be generate the source code from the executable
    > itself, but there doesn't seem to be a disassembler for early Unix.

Where's the binary? I'd like to take a look at it, and see if the source was
assembler, or C (there's a C version in the source tree, too). Then I can
look and see how close it is to that 2.11 source - that may be a
re-implementation, and totally different.

	Noel



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

end of thread, other threads:[~2015-06-15  5:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 18:23 [TUHS] recreating bj.s for Unix v5 Mark Longridge
2015-06-15  5:14 ` Lars Brinkhoff
2015-06-12 18:39 Noel Chiappa
2015-06-12 19:01 ` Mark Longridge
2015-06-12 22:46   ` Greg 'groggy' Lehey
2015-06-12 19:31 Noel Chiappa
2015-06-12 20:00 Noel Chiappa
2015-06-12 20:16 ` Mark Longridge

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