The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] B Source Code
@ 2017-09-14 13:39 Noel Chiappa
  2017-09-14 14:24 ` Dan Cross
  2017-09-15  3:59 ` Dave Horsfall
  0 siblings, 2 replies; 9+ messages in thread
From: Noel Chiappa @ 2017-09-14 13:39 UTC (permalink / raw)


    > From: Alec Muffett

    > "threaded code" in the old sense could be smaller than the equivalent
    > CISC binary on the same machine

One can think of 'threaded code' as code for a new virtual machine, one
specialized to the task at hand.

    > https://en.m.wikipedia.org/wiki/Threaded_code

For those who really want to delve in some depth, see the chapter "Turning
Cousins into Sisters" (Chapter 15, pg. 365) in "Computer Engineering: A DEC
View of Hardware Systems Design", by Bell, Mudge and McNamara.

Interesting factoid: The PDP-11 initially used a threaded FORTRAN
implementation. In line with the observation above (about a new virtual
machine), DEC actually looked into writing microcode for the -11/60 (which had
a writeable control store) to implement the FORTRAN virtual machine.

	Noel


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

* [TUHS] B Source Code
  2017-09-14 13:39 [TUHS] B Source Code Noel Chiappa
@ 2017-09-14 14:24 ` Dan Cross
  2017-09-14 19:46   ` Derek Fawcus
  2017-09-15  3:59 ` Dave Horsfall
  1 sibling, 1 reply; 9+ messages in thread
From: Dan Cross @ 2017-09-14 14:24 UTC (permalink / raw)


On Thu, Sep 14, 2017 at 9:39 AM, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>     > From: Alec Muffett
>
>     > "threaded code" in the old sense could be smaller than the equivalent
>     > CISC binary on the same machine
>
> One can think of 'threaded code' as code for a new virtual machine, one
> specialized to the task at hand.
>
>     > https://en.m.wikipedia.org/wiki/Threaded_code
>
> For those who really want to delve in some depth, see the chapter "Turning
> Cousins into Sisters" (Chapter 15, pg. 365) in "Computer Engineering: A DEC
> View of Hardware Systems Design", by Bell, Mudge and McNamara.

Huh. I happened to have that book on my shelf here at work and it's a great
description. That chapter cites a CACM paper from June 1973; citation here:
http://dl.acm.org/citation.cfm?id=362270

The paper is short; only 4 or so pages.

Now I'm confused about the timeline: I thought B was obsolete by this time
and that C was on the rise. Was the term "threaded code" in use earlier? Ah,
I see a note at the bottom of the paper that it was received in June, 1971 and
revised in December 1972, but not published until June 1973 (2 years after
initial submission). Given that the technique is described in the context of a
FORTRAN IV compiler for the PDP-11 that must have been in existence at
the time it was submitted in 1971, it seems reasonable to believe that the
technique was known in advance.

        - Dan C.


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

* [TUHS] B Source Code
  2017-09-14 14:24 ` Dan Cross
@ 2017-09-14 19:46   ` Derek Fawcus
  0 siblings, 0 replies; 9+ messages in thread
From: Derek Fawcus @ 2017-09-14 19:46 UTC (permalink / raw)


On Thu, Sep 14, 2017 at 10:24:08AM -0400, Dan Cross wrote:
> 
> Was the term "threaded code" in use earlier?

Forth.

Which was say 1968 - 1970 for its inception, how did it's early
versions refer to the technique?  I certainly recall it being
used as the term when I learnt about Forth (which was much later than that).

DF


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

* [TUHS] B Source Code
  2017-09-14 13:39 [TUHS] B Source Code Noel Chiappa
  2017-09-14 14:24 ` Dan Cross
@ 2017-09-15  3:59 ` Dave Horsfall
  2017-09-15 11:43   ` William Pechter
  2017-09-15 12:44   ` Clem Cole
  1 sibling, 2 replies; 9+ messages in thread
From: Dave Horsfall @ 2017-09-15  3:59 UTC (permalink / raw)


On Thu, 14 Sep 2017, Noel Chiappa wrote:

> Interesting factoid: The PDP-11 initially used a threaded FORTRAN 
> implementation. In line with the observation above (about a new virtual 
> machine), DEC actually looked into writing microcode for the -11/60 
> (which had a writeable control store) to implement the FORTRAN virtual 
> machine.

Did anyone actually use the WCS?  I had visions of implementing CSAV and
CRET on our -60, but never did get around to it.  Too late now...

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] B Source Code
  2017-09-15  3:59 ` Dave Horsfall
@ 2017-09-15 11:43   ` William Pechter
  2017-09-19  1:20     ` Dave Horsfall
  2017-09-15 12:44   ` Clem Cole
  1 sibling, 1 reply; 9+ messages in thread
From: William Pechter @ 2017-09-15 11:43 UTC (permalink / raw)


I thought Reuters re-microcoded them to be the fastest PDP8 around...

So was the DEC Field Service story...

Bill


-----Original Message-----
From: Dave Horsfall <dave@horsfall.org>
To: The Eunuchs Hysterical Society <tuhs at tuhs.org>
Sent: Fri, 15 Sep 2017 0:00
Subject: Re: [TUHS] B Source Code

On Thu, 14 Sep 2017, Noel Chiappa wrote:

> Interesting factoid: The PDP-11 initially used a threaded FORTRAN 
> implementation. In line with the observation above (about a new virtual 
> machine), DEC actually looked into writing microcode for the -11/60 
> (which had a writeable control store) to implement the FORTRAN virtual 
> machine.

Did anyone actually use the WCS?  I had visions of implementing CSAV and
CRET on our -60, but never did get around to it.  Too late now...

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

* [TUHS] B Source Code
  2017-09-15  3:59 ` Dave Horsfall
  2017-09-15 11:43   ` William Pechter
@ 2017-09-15 12:44   ` Clem Cole
  2017-09-15 13:03     ` Clem Cole
  1 sibling, 1 reply; 9+ messages in thread
From: Clem Cole @ 2017-09-15 12:44 UTC (permalink / raw)


CMU/CS implemented CSAV and CRET on the 11/40e (6th edition++).  IMO - it
was a mixed bag.  I've forgotten the statistics, it was a few ticks fasters
for saving the registers, which was good.   The primary thing it did was
save a small amount of address space on the non-I/D 40  - which was helpful
for applications as they got larger and were running out of address
space...... But it was PITA in practice because it meant that binaries
compiled on IUS and SUS (the UNIX two systems in CS), would not run
anywhere else on campus which were mostly 11/34 or later 11/34A's and it a
networked environment (which we were just starting to create) the seams
tended to show a little more than we would have liked.

IIRC I eventually got a emulator working at Mellon Institute and EE systems
so they binaries would not core dump, but we just recompiled we ran into
them.

The real solution to address space issue was when DEC released the 11/44
which was separate I/D (11/70 class) and the thunk work that we did in
2.9BSD in trying to move 4.1/4.2 code to the 11.

FYI:  Danny Klein and I should have the compiler somewhere (and the
microcode) is I ever get my CMU archives off tape.  It's on my list of
things to look for.

Clem



On Thu, Sep 14, 2017 at 11:59 PM, Dave Horsfall <dave at horsfall.org> wrote:

> On Thu, 14 Sep 2017, Noel Chiappa wrote:
>
> Interesting factoid: The PDP-11 initially used a threaded FORTRAN
>> implementation. In line with the observation above (about a new virtual
>> machine), DEC actually looked into writing microcode for the -11/60 (which
>> had a writeable control store) to implement the FORTRAN virtual machine.
>>
>
> Did anyone actually use the WCS?  I had visions of implementing CSAV and
> CRET on our -60, but never did get around to it.  Too late now...
>
> --
> Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will
> suffer."
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170915/e6e59abe/attachment.html>


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

* [TUHS] B Source Code
  2017-09-15 12:44   ` Clem Cole
@ 2017-09-15 13:03     ` Clem Cole
  2017-09-15 14:16       ` [TUHS] Rich's B compiler, was " Tony Finch
  0 siblings, 1 reply; 9+ messages in thread
From: Clem Cole @ 2017-09-15 13:03 UTC (permalink / raw)


Also, in my Tektronix archives... we had an 11/60 with WSC and IIRC Steve
Glaser took a stab at moving the CMU stuff. The microengines between the
11/40 and 11/60 were different, so the code had to be rewritten. A big
issue, again IIRC, was the microcode compiler/tools for the WSC ran on RSX
so it meant UNIX was not running, which was not popular.

But around the same time, unexpected our group had the chance to get an
fairly loaded cast off seperate I/D based 11/70 which had been running
RSTS/Cobol for a business support team in sales.    By the time, Steve got
anything working on the 11/60, I had the 11/70 (aka "teklabs") up and
installed; and I don't remember what happened to the WSC stuff; since we
had better solution to small address space problem of adding a '17th
address bit' with hardware.

Clem

Clem

On Fri, Sep 15, 2017 at 8:44 AM, Clem Cole <clemc at ccc.com> wrote:

> CMU/CS implemented CSAV and CRET on the 11/40e (6th edition++).  IMO - it
> was a mixed bag.  I've forgotten the statistics, it was a few ticks fasters
> for saving the registers, which was good.   The primary thing it did was
> save a small amount of address space on the non-I/D 40  - which was helpful
> for applications as they got larger and were running out of address
> space...... But it was PITA in practice because it meant that binaries
> compiled on IUS and SUS (the UNIX two systems in CS), would not run
> anywhere else on campus which were mostly 11/34 or later 11/34A's and it a
> networked environment (which we were just starting to create) the seams
> tended to show a little more than we would have liked.
>
> IIRC I eventually got a emulator working at Mellon Institute and EE
> systems so they binaries would not core dump, but we just recompiled we ran
> into them.
>
> The real solution to address space issue was when DEC released the 11/44
> which was separate I/D (11/70 class) and the thunk work that we did in
> 2.9BSD in trying to move 4.1/4.2 code to the 11.
>
> FYI:  Danny Klein and I should have the compiler somewhere (and the
> microcode) is I ever get my CMU archives off tape.  It's on my list of
> things to look for.
>
> Clem
>
>
>
> On Thu, Sep 14, 2017 at 11:59 PM, Dave Horsfall <dave at horsfall.org> wrote:
>
>> On Thu, 14 Sep 2017, Noel Chiappa wrote:
>>
>> Interesting factoid: The PDP-11 initially used a threaded FORTRAN
>>> implementation. In line with the observation above (about a new virtual
>>> machine), DEC actually looked into writing microcode for the -11/60 (which
>>> had a writeable control store) to implement the FORTRAN virtual machine.
>>>
>>
>> Did anyone actually use the WCS?  I had visions of implementing CSAV and
>> CRET on our -60, but never did get around to it.  Too late now...
>>
>> --
>> Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will
>> suffer."
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170915/0da58f8d/attachment.html>


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

* [TUHS] Rich's B compiler, was Re:  B Source Code
  2017-09-15 13:03     ` Clem Cole
@ 2017-09-15 14:16       ` Tony Finch
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Finch @ 2017-09-15 14:16 UTC (permalink / raw)


I mentioned some of this list's discussions about overlays and threaded
code in the pub last night, and my friend Rich Wareham said that he had
implemented a B compiler as a fun project, using Python and LLVM.

I thought it might be of interest, so here's a link:
https://github.com/rjw57/rbc

The doc/pdf subdirectory includes copies of the reference documents Rich
used as a specification for B.

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/  -  I xn--zr8h punycode
Shannon, Rockall: Northerly 4 or 5, occasionally 6 at first in east. Moderate
or rough. Showers. Good.


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

* [TUHS] B Source Code
  2017-09-15 11:43   ` William Pechter
@ 2017-09-19  1:20     ` Dave Horsfall
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Horsfall @ 2017-09-19  1:20 UTC (permalink / raw)


On Fri, 15 Sep 2017, William Pechter wrote:

[ WCS on the 11/60 ]

> I thought Reuters re-microcoded them to be the fastest PDP8 around...

I'd heard that some newspaper house in Australia ordered a bunch, and when 
the contract fell through DEC were stuck with them, so they practically 
gave them away to Universities.

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


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

end of thread, other threads:[~2017-09-19  1:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 13:39 [TUHS] B Source Code Noel Chiappa
2017-09-14 14:24 ` Dan Cross
2017-09-14 19:46   ` Derek Fawcus
2017-09-15  3:59 ` Dave Horsfall
2017-09-15 11:43   ` William Pechter
2017-09-19  1:20     ` Dave Horsfall
2017-09-15 12:44   ` Clem Cole
2017-09-15 13:03     ` Clem Cole
2017-09-15 14:16       ` [TUHS] Rich's B compiler, was " Tony Finch

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