The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] wump.c for v6
@ 2020-01-07  0:40 Noel Chiappa
  2020-01-07  0:44 ` Warner Losh
  0 siblings, 1 reply; 21+ messages in thread
From: Noel Chiappa @ 2020-01-07  0:40 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Will Senn

    > On another note,You said you looked in v5 and v6 source code? I looked
    > at tuhs and didn't see anything earlier than v7. Where did you find
    > them?

Huh? https://www.tuhs.org/cgi-bin/utree.pl

	Noel


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [TUHS] wump.c for v6
@ 2020-01-10 14:27 Noel Chiappa
  0 siblings, 0 replies; 21+ messages in thread
From: Noel Chiappa @ 2020-01-10 14:27 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Clem Cole <clemc@ccc.com>

    > So, unless anyone else can illuminate, I'm not sure where the first cpp
    > that some of us using v6 had originated.

I recall a prior extensive discussion about 'cpp'. I looked, and found it
(March 30, 2017) but it was a private discussion, not on TUHS (although you
were part of it :-). Here are clips of what I wrote (I don't want to re-post
what others wrote) from what I wrote, which tell most of the story:


There were a series of changes to C before V7 came out, resulting in the
so-called 'phototypsetter C compiler' (previously discussed on TUHS), and they
included the preprocessor. There's that series of short notes describing
changes to C (and the compiler), and they include mention of the preprocessor.

[Available here: http://gunkies.org/wiki/Typesetter_C for those who want to see
them.]

The MIT 'V6' Unix (which was, AFAICT, an augmented version of an early version
of PWB Unix) had that C compiler; and if you look at the PWB1 tree online, it
does have the C with 'cpp':

  http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/c/c

I did a diff of that 'cpp' with the MIT one, and they are basically identical.

----

I went looking for the C manual in the V6 distro, to see if it mentioned the
pre-processor. And it does:

  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/doc/c/c5

(Section 12, "Compiler control lines", about half way down.) So, I'm like,
'WTF? I just looked at cc.c and no mention of cpp!'

So I looked a little harder, and if you look at the cc.c in the distro (URL
above), you see this:

	insym(&defloc, "define");
	insym(&incloc, "include");
	insym(&eifloc, "endif");
	insym(&ifdloc, "ifdef");
	insym(&ifnloc, "ifndef");
	insym(&unxloc, "unix");

The pre-processor is integrated into 'cc' in the initial V6. So we do have a very
early version of it, after all...

----

So, 'cc' in V5 also included pre-processor support (just #define and #include,
though):

  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/cc.c

Although we don't have the source to 'cc' to show it, V4 also appears to have
had it, per the man page:

  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man1/cc.1

"If the -p flag is used, only the macro prepass is run on all files whose name
ends in .c"; and the V4 system source:

  http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/nsys

also has .h files.

No sign of it in the man page for cc.1 in V3, though.


This all makes sense. .h files aren't any use with[out] #include, and without
#include, you have to have the structure definition, etc in multiple source
files. So #include would have gotten added very early on.

In V3, the system was apparently still in assembler, so no need.

-----


Also, there's an error in:

    https://ewe2.ninja/computers/cno/

when it says "V6 was a very different beast for programming to V7. No c
preprocessor. The practical upshot of this is no #includes." that's
clearly incorrect (see above). Also, if you look at Lions (which is pure
early V6), in the source section, all the .c files have #include's.

      Noel

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [TUHS] wump.c for v6
@ 2020-01-07  1:58 Noel Chiappa
  0 siblings, 0 replies; 21+ messages in thread
From: Noel Chiappa @ 2020-01-07  1:58 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > From: Warner Losh <imp@bsdimp.com>

    > There's no wupus source before V7.

If you look at Clem's original message:

    >> From: Clem Cole <clemc@ccc.com>
    >> Date: Mon, 6 Jan 2020 16:08:50 -0500

    >> You got my curiosity up and found the V5 and V6 source code

(the one Will was replying to), Clem's talking about the source to crt0.s,
etc.

     Noel

^ permalink raw reply	[flat|nested] 21+ messages in thread
* [TUHS] wump.c for v6
@ 2020-01-06  6:13 Will Senn
  2020-01-06 15:20 ` Clem Cole
  0 siblings, 1 reply; 21+ messages in thread
From: Will Senn @ 2020-01-06  6:13 UTC (permalink / raw)
  To: tuhs

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

Hi,

Does the wump.c source exist for v6? The game's in the distribution and 
so is the man page, but I can't find the source. I see it's in v7, but I 
don't know the provenance of the game source, hence the question.

I find the following interesting... in the v7 source it says:

/*
  *      wumpus
  *      stolen from PCC Vol 2 No 1
  */

But it's actually from PCC Vol 2 No 2 (Nov 1973):
https://archive.computerhistory.org/resources/access/text/2017/09/102661095/102661095-05-v2-n2-acc.pdf

and the basic source is given in the games issue:
https://archive.computerhistory.org/resources/access/text/2017/09/102661095/102661095-05-v2-games-acc.pdf

The correct volume is noted in the v6 manpage:

This program is based on one described  in  2  (No-
vember 1973).  It will never replace Space War.

and in the v7 manpage:

This program is based on one described in People's Computer
      Company, 2, 2 (November 1973).

BUGS
      It will never replace Space War.

I'm curious if it was ported to c for v6, or if it was basic?

Thanks,

Will

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF


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

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

end of thread, other threads:[~2020-01-10 14:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07  0:40 [TUHS] wump.c for v6 Noel Chiappa
2020-01-07  0:44 ` Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2020-01-10 14:27 Noel Chiappa
2020-01-07  1:58 Noel Chiappa
2020-01-06  6:13 Will Senn
2020-01-06 15:20 ` Clem Cole
2020-01-06 15:24   ` Clem Cole
2020-01-06 16:25   ` Will Senn
2020-01-06 16:35     ` Clem Cole
2020-01-06 18:29       ` Warner Losh
2020-01-06 18:38         ` Will Senn
2020-01-06 18:48           ` Warner Losh
2020-01-06 21:08             ` Clem Cole
2020-01-06 21:38               ` Clem Cole
2020-01-06 22:14                 ` Warner Losh
2020-01-06 23:46                 ` Will Senn
2020-01-07 20:04             ` Sean Dwyer via TUHS
2020-01-07 21:08               ` Clem Cole
2020-01-08  6:35                 ` Sean Dwyer via TUHS
2020-01-06 19:10           ` Bakul Shah
2020-01-06 20:29             ` Will Senn

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