The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] pcc in 8th edition
@ 2021-04-26 18:00 Norman Wilson
  2021-04-26 18:11 ` Dan Cross
  0 siblings, 1 reply; 18+ messages in thread
From: Norman Wilson @ 2021-04-26 18:00 UTC (permalink / raw)
  To: tuhs

Adam Thornton:

  I sat in on an undergrad course from [Dave Hanson] my first year of
  grad school (94-95) and he taught it with lcc.  I asked `why not
  gcc' and he said, `gcc is 100,000 lines and I don't know what 90%
  of them are doing; lcc is 10,000'.

===

My copy is indeed about 10K lines, not counting the code-generator
modules.  Those are C files generated by a utility program lburg
from a template file.  The three architectures supplied in the
distribution, for MIPS, SPARC, and X86, have template files of
about 900, 1200, and 700 lines respectively.

The template file for the VAX is about 2800 lines, but includes
some metalanguage of my own, interpreted by an awk script, to
generate extra rules for all the direct-store type-to-type
instructions.  The C output from lburg for the other architectures
is 5000-6000 lines; for the VAX, after expansion by my awk
program and then by lburg, is nearly 20K.

Did someone say Complex Instruction Set?

Norman Wilson
Toronto ON

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

* Re: [TUHS] pcc in 8th edition
  2021-04-26 18:00 [TUHS] pcc in 8th edition Norman Wilson
@ 2021-04-26 18:11 ` Dan Cross
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Cross @ 2021-04-26 18:11 UTC (permalink / raw)
  To: Norman Wilson; +Cc: The Eunuchs Hysterical Society

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

On Mon, Apr 26, 2021 at 2:03 PM Norman Wilson <norman@oclsc.org> wrote:

> Adam Thornton:
>
>   I sat in on an undergrad course from [Dave Hanson] my first year of
>   grad school (94-95) and he taught it with lcc.  I asked `why not
>   gcc' and he said, `gcc is 100,000 lines and I don't know what 90%
>   of them are doing; lcc is 10,000'.
>
> ===
>
> My copy is indeed about 10K lines, not counting the code-generator
> modules.  Those are C files generated by a utility program lburg
> from a template file.  The three architectures supplied in the
> distribution, for MIPS, SPARC, and X86, have template files of
> about 900, 1200, and 700 lines respectively.
>
> The template file for the VAX is about 2800 lines, but includes
> some metalanguage of my own, interpreted by an awk script, to
> generate extra rules for all the direct-store type-to-type
> instructions.  The C output from lburg for the other architectures
> is 5000-6000 lines; for the VAX, after expansion by my awk
> program and then by lburg, is nearly 20K.
>
> Did someone say Complex Instruction Set?
>

Indeed!

https://yarchive.net/comp/vax.html

I recall one of Mashey's posts talking about the number of page faults that
_might_ arise from execution of one instance of one of the more baroque VAX
instructions. It was something like 40 (!!).

        - Dan C.

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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 17:11     ` Clem Cole
  2021-04-25 17:32       ` arnold
  2021-04-25 20:11       ` Paul Ruizendaal
@ 2021-04-30 23:08       ` Paul Ruizendaal
  2 siblings, 0 replies; 18+ messages in thread
From: Paul Ruizendaal @ 2021-04-30 23:08 UTC (permalink / raw)
  To: TUHS main list

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

I’m still playing with PCC2. I’ve solved the issue with building an ILP32 version, but the ’stin’ file remains equally intriguing and mysterious.

Unfortunately, it seems that PCC2 retargeting manual is lost - so this list appears my best source.

From the paper that Clem shared, I get the general idea behind PCC2 and its tree tile covering algorithm: it does a full top-down search, matching on the basis of operations (“OPCODES”) and addressing modes (“SHAPES”). In general, the cost of a tile is estimated as the sum of the number of memory accesses and the number of instructions (normally 1).

The SHAPES section of a ’stin’ file defines the addressing modes, and the OPCODES section defines instructions for operations. The instructions are specified as macros, similar in style to PCC or the dmr compiler. What I find difficult to understand is the role of the “needs” field.

The grammer for the ’stin’ pre-processor has the following comment about the ’needs’ field:
	1,2,3	Number of needed registers
	$P		need pairs
	$<		share left
	$>		share right
	$L		result left
	$R		result right
	$1,2,3	result in reg 1, 2, 3
	$C		operation produces correct condition codes
	$N		no value produced: side effects only
	$A		need them all
	$[		share left, RHS is preferred (if a temp register)
	$]		share right, RHS is preferred (if a temp register)
	$l		left side is referenced once more
	$r		right side is referenced once more
I am puzzled as to how 'needs' should be read. Are the needs properties of or requirements for the tile? Or both?

For example, here is two lines from the ’stin’ file for the 68K:

operation:	=
shapes:		SAWD[sus], SAWD[sus]			(means: operands must be "signed/unsigned addressable short words")
needs:		{$C}
macro:		"mov.w AR,AL"

operation:	=
shapes:		LAWD[lul], LAWD[lul]
needs:		{$C $l $r}
macro:		"mov.l AR,AL”

Does this mean that instruction sets the condition codes as a side effect, or does it say that the line must be used when the conditions codes are required?. Why are the left and right side used once more for move.l but not for move.w? And why is the below a separate definition on yet another line?

operation:	=
shapes:		LAWD[lul], LAWD[lul]
needs:		{$R $l $r}
macro:		“RL!R mov.l AR,AL”

Hopefully there is somebody on the list who has worked with PCC2 and still remembers about the ’needs’ field.

Paul


> Thank you, that Usenix paper is most helpful.
> 
> In short, there were (at least) 4 generations of PCC: PCC, PCC2, QCC and RCC. The first two by SCJ and the latter two by Kristol.
> PCC2 seems to go back to about 1980, and QCC and RCC were created in the first half of 1985. The C compiler in 8th Edition seems to be PCC2 based.
> 
> For ease of reference I’ve put the M68K compiler that is included in the Blit source tree (https://www.tuhs.org/Archive/Distributions/Research/Dan_Cross_v8/ <https://www.tuhs.org/Archive/Distributions/Research/Dan_Cross_v8/>) here:
> https://gitlab.com/pnru/pcc2_m68k <https://gitlab.com/pnru/pcc2_m68k>
> 
> Anybody who has some more info on how to read a “stin” file, please share.
> 
> Paul
> 
>> On Apr 25, 2021, at 7:11 PM, Clem Cole <clemc@ccc.com <mailto:clemc@ccc.com>> wrote:
>> 
>> yes  i'll mail under separate cover a scan
>> ᐧ
>> 
>> On Sun, Apr 25, 2021 at 11:47 AM Paul Ruizendaal <pnr@planet.nl <mailto:pnr@planet.nl>> wrote:
>> By now found some more clues, in particular this link:
>> http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm <http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm>
>> 
>> Apparently I am talking about PCC and PCC2 in the below question.
>> 
>> The first post mentions 4 papers. They can be found online, apart from the USENIX one:
>> "Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer USENIX Conference Proceedings)
>> 
>> Anybody have that?
>> 
>> The second post mentions official documentation:
>> 
>> "In porting QCC, a useful text is the "Portable C Compiler - 
>> Version 2 (PCC2) Internals".  It includes documentation of 
>> stin file formats, PCC2 tree forms, debugging flags, and 
>> compiler #defines.  The manual is expensive so it's worth it 
>> most if you buy it before you figure it all out doing a 
>> port.  Since the manual is based on PCC2 (and hasn't been 
>> updated), it's a good starting point, but doesn't have the 
>> latest information.”
>> 
>> Anybody have that? (It is not on bitsavers)
>> 
>> Paul
>> 
>> > On 25 Apr 2021, at 14:49, arnold@skeeve.com <mailto:arnold@skeeve.com> wrote:
>> > 
>> > Not an answer to your questions, but you may want to take a look
>> > at the PCC Revived project.  It lives in CVS, but I have a git mirror at
>> > git://github.com/arnoldrobbins/pcc-revived <http://github.com/arnoldrobbins/pcc-revived>
>> > 
>> > HTH,
>> > 
>> > Arnold
>> > 
>> > Paul Ruizendaal <pnr@planet.nl <mailto:pnr@planet.nl>> wrote:
>> > 
>> >> For clarity and ease of reference:
>> >> 
>> >> - The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512> <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>>
>> >> 
>> >> - A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c> <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c>>
>> >> 
>> >> - The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin> <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>>
>> >> 
>> >> - The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y> <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y>>
>> >> 
>> >> 
>> >> ====
>> >> 
>> >> Sometimes one thing leads to another.
>> >> 
>> >> Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.
>> >> 
>> >> My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.
>> >> 
>> >> This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.
>> >> 
>> >> All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
>> >> 
>> >> A quick google did not yield much background or documentation on the STY format.
>> >> 
>> >> Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?
>> >> 
>> >> Many thanks in advance
>> >> 
>> >> Paul
>> >> 
>> 

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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 22:02 Norman Wilson
  2021-04-26  0:18 ` Nemo Nusquam
@ 2021-04-26 16:51 ` Adam Thornton
  1 sibling, 0 replies; 18+ messages in thread
From: Adam Thornton @ 2021-04-26 16:51 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

> Dave Hanson collaborated from his appointment at Princeton.

I sat in on an undergrad course from him my first year of grad school (94-95) and he taught it with lcc.  I asked “why not gcc” and he said, “gcc is 100,000 lines and I don’t know what 90% of them are doing; lcc is 10,000”.

Adam

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 20:48 Norman Wilson
  2021-04-25 20:54 ` Dan Cross
@ 2021-04-26  6:29 ` Noel Hunt
  1 sibling, 0 replies; 18+ messages in thread
From: Noel Hunt @ 2021-04-26  6:29 UTC (permalink / raw)
  To: Norman Wilson; +Cc: The Eunuchs Hysterical Society

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

> I think there are a few Research-specific hacks to add
> additional stab info for pi(9.1) ...

Having written a Dwarf interface for pi(9.1) I would
be most interested to know what those additions were.

Noel Hunt

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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 22:02 Norman Wilson
@ 2021-04-26  0:18 ` Nemo Nusquam
  2021-04-26 16:51 ` Adam Thornton
  1 sibling, 0 replies; 18+ messages in thread
From: Nemo Nusquam @ 2021-04-26  0:18 UTC (permalink / raw)
  To: tuhs

On 2021-04-25 18:02, Norman Wilson wrote (in part):
> Some of the earliest work on lcc was done in 1127; Chris
> Fraser worked for the Labs for some years, Dave Hanson
> collaborated from his appointment at Princeton.  I believe
> there was a /usr/bin/lcc.  Some programs used it, either
> because they needed some part of the ISO syntax (pcc2 was
> pre-ISO) or just because.
>
> I don't think that version of lcc used Reiser's c2 optimizer;
> it generated reasonably good code by itself, including
> emitting auto-increment/decrement instructions.  Later
> versions of lcc (such as that I later adopted as cc in
> my personal V10 world) couldn't do that any more, so I
> had to keep c2, and in fact to modify it to turn
> 	addl3 a,b,(p)
> 	mova 4(p),p
> into
> 	addl3 a,b,(p)+
> (or maybe it was addl2 $4,p, I forget)
>
> But that's another story which I'll tell only if asked,
> and nothing to do with the original question.
Please consider yourself asked. #6-)

N.

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

* Re: [TUHS] pcc in 8th edition
@ 2021-04-25 22:02 Norman Wilson
  2021-04-26  0:18 ` Nemo Nusquam
  2021-04-26 16:51 ` Adam Thornton
  0 siblings, 2 replies; 18+ messages in thread
From: Norman Wilson @ 2021-04-25 22:02 UTC (permalink / raw)
  To: tuhs

Dan Cross:

  I seem to recall that LCC was also used, at least on 10th Ed. Am I
  imagining things, or was that real?

===

Some of the earliest work on lcc was done in 1127; Chris
Fraser worked for the Labs for some years, Dave Hanson
collaborated from his appointment at Princeton.  I believe
there was a /usr/bin/lcc.  Some programs used it, either
because they needed some part of the ISO syntax (pcc2 was
pre-ISO) or just because.

I don't think that version of lcc used Reiser's c2 optimizer;
it generated reasonably good code by itself, including
emitting auto-increment/decrement instructions.  Later
versions of lcc (such as that I later adopted as cc in
my personal V10 world) couldn't do that any more, so I
had to keep c2, and in fact to modify it to turn
	addl3 a,b,(p)
	mova 4(p),p
into
	addl3 a,b,(p)+
(or maybe it was addl2 $4,p, I forget)

But that's another story which I'll tell only if asked,
and nothing to do with the original question.

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 20:48 Norman Wilson
@ 2021-04-25 20:54 ` Dan Cross
  2021-04-26  6:29 ` Noel Hunt
  1 sibling, 0 replies; 18+ messages in thread
From: Dan Cross @ 2021-04-25 20:54 UTC (permalink / raw)
  To: Norman Wilson; +Cc: The Eunuchs Hysterical Society

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

I seem to recall that LCC was also used, at least on 10th Ed. Am I
imagining things, or was that real?

On Sun, Apr 25, 2021 at 4:51 PM Norman Wilson <norman@oclsc.org> wrote:

> I was waiting to see whether Steve Johnson would speak
> up, because I'm not much of an expert; but yes, the VAX
> C compiler in V8/V9/V10 is pcc2.
>
> I think there are a few Research-specific hacks to add
> additional stab info for pi(9.1) and on request insert
> basic-block profiling for lcomp(1), but nothing major.
>
> Maybe we did some hacking on c2 as well.  I know I did
> a lot of c2 cleanup later in my personal hacking in
> Toronto, but I don't think I did much if any in New
> Jersey.  But that's independent of the compiler (modulo,
> I think, some of my later fixes discovered by using c2
> with a different compiler).
>
> Norman Wilson
> Toronto ON
>

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

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

* Re: [TUHS] pcc in 8th edition
@ 2021-04-25 20:48 Norman Wilson
  2021-04-25 20:54 ` Dan Cross
  2021-04-26  6:29 ` Noel Hunt
  0 siblings, 2 replies; 18+ messages in thread
From: Norman Wilson @ 2021-04-25 20:48 UTC (permalink / raw)
  To: tuhs

I was waiting to see whether Steve Johnson would speak
up, because I'm not much of an expert; but yes, the VAX
C compiler in V8/V9/V10 is pcc2.

I think there are a few Research-specific hacks to add
additional stab info for pi(9.1) and on request insert
basic-block profiling for lcomp(1), but nothing major.

Maybe we did some hacking on c2 as well.  I know I did
a lot of c2 cleanup later in my personal hacking in
Toronto, but I don't think I did much if any in New
Jersey.  But that's independent of the compiler (modulo,
I think, some of my later fixes discovered by using c2
with a different compiler).

Norman Wilson
Toronto ON

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 17:11     ` Clem Cole
  2021-04-25 17:32       ` arnold
@ 2021-04-25 20:11       ` Paul Ruizendaal
  2021-04-30 23:08       ` Paul Ruizendaal
  2 siblings, 0 replies; 18+ messages in thread
From: Paul Ruizendaal @ 2021-04-25 20:11 UTC (permalink / raw)
  To: TUHS main list

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

Thank you, that Usenix paper is most helpful.

In short, there were (at least) 4 generations of PCC: PCC, PCC2, QCC and RCC. The first two by SCJ and the latter two by Kristol.
PCC2 seems to go back to about 1980, and QCC and RCC were created in the first half of 1985. The C compiler in 8th Edition seems to be PCC2 based.

For ease of reference I’ve put the M68K compiler that is included in the Blit source tree (https://www.tuhs.org/Archive/Distributions/Research/Dan_Cross_v8/) here:
https://gitlab.com/pnru/pcc2_m68k

Anybody who has some more info on how to read a “stin” file, please share.

Paul

> On Apr 25, 2021, at 7:11 PM, Clem Cole <clemc@ccc.com> wrote:
> 
> yes  i'll mail under separate cover a scan
> ᐧ
> 
> On Sun, Apr 25, 2021 at 11:47 AM Paul Ruizendaal <pnr@planet.nl <mailto:pnr@planet.nl>> wrote:
> By now found some more clues, in particular this link:
> http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm <http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm>
> 
> Apparently I am talking about PCC and PCC2 in the below question.
> 
> The first post mentions 4 papers. They can be found online, apart from the USENIX one:
> "Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer USENIX Conference Proceedings)
> 
> Anybody have that?
> 
> The second post mentions official documentation:
> 
> "In porting QCC, a useful text is the "Portable C Compiler - 
> Version 2 (PCC2) Internals".  It includes documentation of 
> stin file formats, PCC2 tree forms, debugging flags, and 
> compiler #defines.  The manual is expensive so it's worth it 
> most if you buy it before you figure it all out doing a 
> port.  Since the manual is based on PCC2 (and hasn't been 
> updated), it's a good starting point, but doesn't have the 
> latest information.”
> 
> Anybody have that? (It is not on bitsavers)
> 
> Paul
> 
> > On 25 Apr 2021, at 14:49, arnold@skeeve.com <mailto:arnold@skeeve.com> wrote:
> > 
> > Not an answer to your questions, but you may want to take a look
> > at the PCC Revived project.  It lives in CVS, but I have a git mirror at
> > git://github.com/arnoldrobbins/pcc-revived <http://github.com/arnoldrobbins/pcc-revived>
> > 
> > HTH,
> > 
> > Arnold
> > 
> > Paul Ruizendaal <pnr@planet.nl <mailto:pnr@planet.nl>> wrote:
> > 
> >> For clarity and ease of reference:
> >> 
> >> - The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512> <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>>
> >> 
> >> - A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c> <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c>>
> >> 
> >> - The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin> <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>>
> >> 
> >> - The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y> <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y>>
> >> 
> >> 
> >> ====
> >> 
> >> Sometimes one thing leads to another.
> >> 
> >> Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.
> >> 
> >> My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.
> >> 
> >> This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.
> >> 
> >> All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
> >> 
> >> A quick google did not yield much background or documentation on the STY format.
> >> 
> >> Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?
> >> 
> >> Many thanks in advance
> >> 
> >> Paul
> >> 
> 


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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 17:32       ` arnold
@ 2021-04-25 17:46         ` Clem Cole
  0 siblings, 0 replies; 18+ messages in thread
From: Clem Cole @ 2021-04-25 17:46 UTC (permalink / raw)
  To: Aharon Robbins; +Cc: TUHS main list, Paul Ruizendaal

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

No worries, I already did -- but I also sent it back to the pubs' folks at
USENIX.  They have slowing scanning the print archives on an as-needed
basis; which is where it belongs.
ᐧ

On Sun, Apr 25, 2021 at 1:32 PM <arnold@skeeve.com> wrote:

> And maybe give to Warren too? :-)
>
> Clem Cole <clemc@ccc.com> wrote:
>
> > yes  i'll mail under separate cover a scan
> > ᐧ
> >
> > On Sun, Apr 25, 2021 at 11:47 AM Paul Ruizendaal <pnr@planet.nl> wrote:
> >
> > > By now found some more clues, in particular this link:
> > >
> http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm
> > >
> > > Apparently I am talking about PCC and PCC2 in the below question.
> > >
> > > The first post mentions 4 papers. They can be found online, apart from
> the
> > > USENIX one:
> > > "Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer
> > > USENIX Conference Proceedings)
> > >
> > > Anybody have that?
> > >
> > > The second post mentions official documentation:
> > >
> > > "In porting QCC, a useful text is the "Portable C Compiler -
> > > Version 2 (PCC2) Internals".  It includes documentation of
> > > stin file formats, PCC2 tree forms, debugging flags, and
> > > compiler #defines.  The manual is expensive so it's worth it
> > > most if you buy it before you figure it all out doing a
> > > port.  Since the manual is based on PCC2 (and hasn't been
> > > updated), it's a good starting point, but doesn't have the
> > > latest information.”
> > >
> > > Anybody have that? (It is not on bitsavers)
> > >
> > > Paul
> > >
> > > > On 25 Apr 2021, at 14:49, arnold@skeeve.com wrote:
> > > >
> > > > Not an answer to your questions, but you may want to take a look
> > > > at the PCC Revived project.  It lives in CVS, but I have a git
> mirror at
> > > > git://github.com/arnoldrobbins/pcc-revived
> > > >
> > > > HTH,
> > > >
> > > > Arnold
> > > >
> > > > Paul Ruizendaal <pnr@planet.nl> wrote:
> > > >
> > > >> For clarity and ease of reference:
> > > >>
> > > >> - The “Tour of paper” is for instance here:
> > > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <
> > > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>
> > > >>
> > > >> - A machine description for the VAX that matches with that paper is
> for
> > > instance in the SysIII source:
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> > > <
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> > > >
> > > >>
> > > >> - The new style description in 8th edition is here:
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>
> > > >>
> > > >> - The program that translates the “stin” file to a “table.c” file is
> > > here:
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> > > <
> > >
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> > > >
> > > >>
> > > >>
> > > >> ====
> > > >>
> > > >> Sometimes one thing leads to another.
> > > >>
> > > >> Following the recent mention of some retro-brew 68K single board
> > > systems, I decided to build a CB030 board (in progress). I figure it
> is a
> > > rough proxy for a 1980 VAX and would allow for some experimentation
> with
> > > the 32V / SysIII / 8th edition code.
> > > >>
> > > >> My first thought was to use the M68K compiler that is included with
> the
> > > Blit sources (see THUS Archive for this), as I had used that before to
> > > explore some of the Blit source. That compiler is LP32, not ILP32 -
> which
> > > may be a source of trouble. Just changing the SZINT parameter yielded
> some
> > > issues, so I started looking at the PCC source.
> > > >>
> > > >> This source does not have a “table.c” in the well known format as
> > > described in the “A tour of the portable C compiler” paper. Instead it
> uses
> > > a file “stin” which appears to be in a more compact format and is
> > > translated into a “table.c” file by a new pre-processor ("sty.y”). Then
> > > looking at the VAX compilers for 8th and 10th edition, these too use
> this
> > > “stin” file.
> > > >>
> > > >> All the other m68K compilers (based on pcc) that I found appear to
> > > derive from the V7/32V/SysIII lineage, not from the 8th edition
> lineage.
> > > >>
> > > >> A quick google did not yield much background or documentation on the
> > > STY format.
> > > >>
> > > >> Anybody on this list that can shed some light on the history of the
> STY
> > > table and on how to use it? Any surviving reports or memos that would
> be
> > > useful?
> > > >>
> > > >> Many thanks in advance
> > > >>
> > > >> Paul
> > > >>
> > >
> > >
>

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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 17:11     ` Clem Cole
@ 2021-04-25 17:32       ` arnold
  2021-04-25 17:46         ` Clem Cole
  2021-04-25 20:11       ` Paul Ruizendaal
  2021-04-30 23:08       ` Paul Ruizendaal
  2 siblings, 1 reply; 18+ messages in thread
From: arnold @ 2021-04-25 17:32 UTC (permalink / raw)
  To: pnr, clemc; +Cc: tuhs

And maybe give to Warren too? :-)

Clem Cole <clemc@ccc.com> wrote:

> yes  i'll mail under separate cover a scan
> ᐧ
>
> On Sun, Apr 25, 2021 at 11:47 AM Paul Ruizendaal <pnr@planet.nl> wrote:
>
> > By now found some more clues, in particular this link:
> > http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm
> >
> > Apparently I am talking about PCC and PCC2 in the below question.
> >
> > The first post mentions 4 papers. They can be found online, apart from the
> > USENIX one:
> > "Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer
> > USENIX Conference Proceedings)
> >
> > Anybody have that?
> >
> > The second post mentions official documentation:
> >
> > "In porting QCC, a useful text is the "Portable C Compiler -
> > Version 2 (PCC2) Internals".  It includes documentation of
> > stin file formats, PCC2 tree forms, debugging flags, and
> > compiler #defines.  The manual is expensive so it's worth it
> > most if you buy it before you figure it all out doing a
> > port.  Since the manual is based on PCC2 (and hasn't been
> > updated), it's a good starting point, but doesn't have the
> > latest information.”
> >
> > Anybody have that? (It is not on bitsavers)
> >
> > Paul
> >
> > > On 25 Apr 2021, at 14:49, arnold@skeeve.com wrote:
> > >
> > > Not an answer to your questions, but you may want to take a look
> > > at the PCC Revived project.  It lives in CVS, but I have a git mirror at
> > > git://github.com/arnoldrobbins/pcc-revived
> > >
> > > HTH,
> > >
> > > Arnold
> > >
> > > Paul Ruizendaal <pnr@planet.nl> wrote:
> > >
> > >> For clarity and ease of reference:
> > >>
> > >> - The “Tour of paper” is for instance here:
> > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <
> > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>
> > >>
> > >> - A machine description for the VAX that matches with that paper is for
> > instance in the SysIII source:
> > https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> > <
> > https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> > >
> > >>
> > >> - The new style description in 8th edition is here:
> > https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <
> > https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>
> > >>
> > >> - The program that translates the “stin” file to a “table.c” file is
> > here:
> > https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> > <
> > https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> > >
> > >>
> > >>
> > >> ====
> > >>
> > >> Sometimes one thing leads to another.
> > >>
> > >> Following the recent mention of some retro-brew 68K single board
> > systems, I decided to build a CB030 board (in progress). I figure it is a
> > rough proxy for a 1980 VAX and would allow for some experimentation with
> > the 32V / SysIII / 8th edition code.
> > >>
> > >> My first thought was to use the M68K compiler that is included with the
> > Blit sources (see THUS Archive for this), as I had used that before to
> > explore some of the Blit source. That compiler is LP32, not ILP32 - which
> > may be a source of trouble. Just changing the SZINT parameter yielded some
> > issues, so I started looking at the PCC source.
> > >>
> > >> This source does not have a “table.c” in the well known format as
> > described in the “A tour of the portable C compiler” paper. Instead it uses
> > a file “stin” which appears to be in a more compact format and is
> > translated into a “table.c” file by a new pre-processor ("sty.y”). Then
> > looking at the VAX compilers for 8th and 10th edition, these too use this
> > “stin” file.
> > >>
> > >> All the other m68K compilers (based on pcc) that I found appear to
> > derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
> > >>
> > >> A quick google did not yield much background or documentation on the
> > STY format.
> > >>
> > >> Anybody on this list that can shed some light on the history of the STY
> > table and on how to use it? Any surviving reports or memos that would be
> > useful?
> > >>
> > >> Many thanks in advance
> > >>
> > >> Paul
> > >>
> >
> >

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 15:45   ` Paul Ruizendaal
@ 2021-04-25 17:11     ` Clem Cole
  2021-04-25 17:32       ` arnold
                         ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Clem Cole @ 2021-04-25 17:11 UTC (permalink / raw)
  To: Paul Ruizendaal; +Cc: TUHS main list

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

yes  i'll mail under separate cover a scan
ᐧ

On Sun, Apr 25, 2021 at 11:47 AM Paul Ruizendaal <pnr@planet.nl> wrote:

> By now found some more clues, in particular this link:
> http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm
>
> Apparently I am talking about PCC and PCC2 in the below question.
>
> The first post mentions 4 papers. They can be found online, apart from the
> USENIX one:
> "Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer
> USENIX Conference Proceedings)
>
> Anybody have that?
>
> The second post mentions official documentation:
>
> "In porting QCC, a useful text is the "Portable C Compiler -
> Version 2 (PCC2) Internals".  It includes documentation of
> stin file formats, PCC2 tree forms, debugging flags, and
> compiler #defines.  The manual is expensive so it's worth it
> most if you buy it before you figure it all out doing a
> port.  Since the manual is based on PCC2 (and hasn't been
> updated), it's a good starting point, but doesn't have the
> latest information.”
>
> Anybody have that? (It is not on bitsavers)
>
> Paul
>
> > On 25 Apr 2021, at 14:49, arnold@skeeve.com wrote:
> >
> > Not an answer to your questions, but you may want to take a look
> > at the PCC Revived project.  It lives in CVS, but I have a git mirror at
> > git://github.com/arnoldrobbins/pcc-revived
> >
> > HTH,
> >
> > Arnold
> >
> > Paul Ruizendaal <pnr@planet.nl> wrote:
> >
> >> For clarity and ease of reference:
> >>
> >> - The “Tour of paper” is for instance here:
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>
> >>
> >> - A machine description for the VAX that matches with that paper is for
> instance in the SysIII source:
> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> <
> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c
> >
> >>
> >> - The new style description in 8th edition is here:
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>
> >>
> >> - The program that translates the “stin” file to a “table.c” file is
> here:
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> <
> https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y
> >
> >>
> >>
> >> ====
> >>
> >> Sometimes one thing leads to another.
> >>
> >> Following the recent mention of some retro-brew 68K single board
> systems, I decided to build a CB030 board (in progress). I figure it is a
> rough proxy for a 1980 VAX and would allow for some experimentation with
> the 32V / SysIII / 8th edition code.
> >>
> >> My first thought was to use the M68K compiler that is included with the
> Blit sources (see THUS Archive for this), as I had used that before to
> explore some of the Blit source. That compiler is LP32, not ILP32 - which
> may be a source of trouble. Just changing the SZINT parameter yielded some
> issues, so I started looking at the PCC source.
> >>
> >> This source does not have a “table.c” in the well known format as
> described in the “A tour of the portable C compiler” paper. Instead it uses
> a file “stin” which appears to be in a more compact format and is
> translated into a “table.c” file by a new pre-processor ("sty.y”). Then
> looking at the VAX compilers for 8th and 10th edition, these too use this
> “stin” file.
> >>
> >> All the other m68K compilers (based on pcc) that I found appear to
> derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
> >>
> >> A quick google did not yield much background or documentation on the
> STY format.
> >>
> >> Anybody on this list that can shed some light on the history of the STY
> table and on how to use it? Any surviving reports or memos that would be
> useful?
> >>
> >> Many thanks in advance
> >>
> >> Paul
> >>
>
>

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

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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 12:49 ` arnold
  2021-04-25 14:04   ` Paul Ruizendaal
@ 2021-04-25 15:45   ` Paul Ruizendaal
  2021-04-25 17:11     ` Clem Cole
  1 sibling, 1 reply; 18+ messages in thread
From: Paul Ruizendaal @ 2021-04-25 15:45 UTC (permalink / raw)
  To: TUHS main list

By now found some more clues, in particular this link:
http://computer-programming-forum.com/47-c-language/fab825b2dce1aa59.htm

Apparently I am talking about PCC and PCC2 in the below question.

The first post mentions 4 papers. They can be found online, apart from the USENIX one:
"Four Generations of Portable C Compiler" by D.M. Kristol (1986 Summer USENIX Conference Proceedings)

Anybody have that?

The second post mentions official documentation:

"In porting QCC, a useful text is the "Portable C Compiler - 
Version 2 (PCC2) Internals".  It includes documentation of 
stin file formats, PCC2 tree forms, debugging flags, and 
compiler #defines.  The manual is expensive so it's worth it 
most if you buy it before you figure it all out doing a 
port.  Since the manual is based on PCC2 (and hasn't been 
updated), it's a good starting point, but doesn't have the 
latest information.”

Anybody have that? (It is not on bitsavers)

Paul

> On 25 Apr 2021, at 14:49, arnold@skeeve.com wrote:
> 
> Not an answer to your questions, but you may want to take a look
> at the PCC Revived project.  It lives in CVS, but I have a git mirror at
> git://github.com/arnoldrobbins/pcc-revived
> 
> HTH,
> 
> Arnold
> 
> Paul Ruizendaal <pnr@planet.nl> wrote:
> 
>> For clarity and ease of reference:
>> 
>> - The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>
>> 
>> - A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c>
>> 
>> - The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>
>> 
>> - The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y>
>> 
>> 
>> ====
>> 
>> Sometimes one thing leads to another.
>> 
>> Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.
>> 
>> My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.
>> 
>> This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.
>> 
>> All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
>> 
>> A quick google did not yield much background or documentation on the STY format.
>> 
>> Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?
>> 
>> Many thanks in advance
>> 
>> Paul
>> 


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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 12:49 ` arnold
@ 2021-04-25 14:04   ` Paul Ruizendaal
  2021-04-25 15:45   ` Paul Ruizendaal
  1 sibling, 0 replies; 18+ messages in thread
From: Paul Ruizendaal @ 2021-04-25 14:04 UTC (permalink / raw)
  To: TUHS main list

Thank you for the tip!

I had seen the revival when googling around. The M68K version looks like an interesting option for my intended project(s). Still, I also would like to work with the versions from the early 80’s, just to get a better feel for the history of it all and to start with something small (the revival is 2-3 times the size of the early 80’s code *).

On top of that, there is something magical about real-life machine descriptions that fit in 400 short lines.

Paul

*) On 32V the actual virtual address space for a process was limited to 192KB, due to how the MMU was used.


> On Apr 25, 2021, at 2:49 PM, arnold@skeeve.com wrote:
> 
> Not an answer to your questions, but you may want to take a look
> at the PCC Revived project.  It lives in CVS, but I have a git mirror at
> git://github.com/arnoldrobbins/pcc-revived
> 
> HTH,
> 
> Arnold
> 
> Paul Ruizendaal <pnr@planet.nl> wrote:
> 
>> For clarity and ease of reference:
>> 
>> - The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512
>> 
>> - A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c 
>> 
>> - The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin 
>> 
>> - The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y 
>> 
>> 
>> ====
>> 
>> Sometimes one thing leads to another.
>> 
>> Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.
>> 
>> My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.
>> 
>> This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.
>> 
>> All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
>> 
>> A quick google did not yield much background or documentation on the STY format.
>> 
>> Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?
>> 
>> Many thanks in advance
>> 
>> Paul
>> 


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

* Re: [TUHS] pcc in 8th edition
  2021-04-25 12:35 Paul Ruizendaal
@ 2021-04-25 12:49 ` arnold
  2021-04-25 14:04   ` Paul Ruizendaal
  2021-04-25 15:45   ` Paul Ruizendaal
  0 siblings, 2 replies; 18+ messages in thread
From: arnold @ 2021-04-25 12:49 UTC (permalink / raw)
  To: tuhs, pnr

Not an answer to your questions, but you may want to take a look
at the PCC Revived project.  It lives in CVS, but I have a git mirror at
git://github.com/arnoldrobbins/pcc-revived

HTH,

Arnold

Paul Ruizendaal <pnr@planet.nl> wrote:

> For clarity and ease of reference:
>
> - The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>
>
> - A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c>
>
> - The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>
>
> - The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y>
>
>
> ====
>
> Sometimes one thing leads to another.
>
> Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.
>
> My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.
>
> This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.
>
> All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.
>
> A quick google did not yield much background or documentation on the STY format.
>
> Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?
>
> Many thanks in advance
>
> Paul
>

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

* [TUHS] pcc in 8th edition
@ 2021-04-25 12:35 Paul Ruizendaal
  2021-04-25 12:49 ` arnold
  0 siblings, 1 reply; 18+ messages in thread
From: Paul Ruizendaal @ 2021-04-25 12:35 UTC (permalink / raw)
  To: TUHS main list

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

For clarity and ease of reference:

- The “Tour of paper” is for instance here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512 <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.3512>

- A machine description for the VAX that matches with that paper is for instance in the SysIII source: https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c <https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/cc/vax/pcc/table.c>

- The new style description in 8th edition is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/vax/stin>

- The program that translates the “stin” file to a “table.c” file is here: https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y <https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/src/cmd/ccom/common/sty.y>


====

Sometimes one thing leads to another.

Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.

My first thought was to use the M68K compiler that is included with the Blit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.

This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these too use this “stin” file.

All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.

A quick google did not yield much background or documentation on the STY format.

Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?

Many thanks in advance

Paul


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

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

* [TUHS] pcc in 8th edition
@ 2021-04-25  9:15 Paul Ruizendaal via TUHS
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Ruizendaal via TUHS @ 2021-04-25  9:15 UTC (permalink / raw)
  To: TUHS main list

Sometimes one thing leads to another.

Following the recent mention of some retro-brew 68K single board systems, I decided to build a CB030 board (in progress). I figure it is a rough proxy for a 1980 VAX and would allow for some experimentation with the 32V / SysIII / 8th edition code.

My first thought was to use the M68K compiler that is included with the bit sources (see THUS Archive for this), as I had used that before to explore some of the Blit source. That compiler is LP32, not ILP32 - which may be a source of trouble. Just changing the SZINT parameter yielded some issues, so I started looking at the PCC source.

This source does not have a “table.c” in the well known format as described in the “A tour of the portable C compiler” paper. Instead it uses a file “stin” which appears to be in a more compact format and is translated into a “table.c” file by a new pre-processor ("sty.y”). Then looking at the VAX compilers for 8th and 10th edition, these to use this “stin” file.

All the other m68K compilers (based on pcc) that I found appear to derive from the V7/32V/SysIII lineage, not from the 8th edition lineage.

A quick google did not yield much background or documentation on the STY format.

Anybody on this list that can shed some light on the history of the STY table and on how to use it? Any surviving reports or memos that would be useful?

Many thanks in advance

Paul


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

end of thread, other threads:[~2021-04-30 23:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 18:00 [TUHS] pcc in 8th edition Norman Wilson
2021-04-26 18:11 ` Dan Cross
  -- strict thread matches above, loose matches on Subject: below --
2021-04-25 22:02 Norman Wilson
2021-04-26  0:18 ` Nemo Nusquam
2021-04-26 16:51 ` Adam Thornton
2021-04-25 20:48 Norman Wilson
2021-04-25 20:54 ` Dan Cross
2021-04-26  6:29 ` Noel Hunt
2021-04-25 12:35 Paul Ruizendaal
2021-04-25 12:49 ` arnold
2021-04-25 14:04   ` Paul Ruizendaal
2021-04-25 15:45   ` Paul Ruizendaal
2021-04-25 17:11     ` Clem Cole
2021-04-25 17:32       ` arnold
2021-04-25 17:46         ` Clem Cole
2021-04-25 20:11       ` Paul Ruizendaal
2021-04-30 23:08       ` Paul Ruizendaal
2021-04-25  9:15 Paul Ruizendaal via TUHS

The Unix Heritage Society mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/tuhs

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 tuhs tuhs/ http://inbox.vuxu.org/tuhs \
		tuhs@minnie.tuhs.org
	public-inbox-index tuhs

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.tuhs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git