The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] B Source Code
@ 2017-09-14  3:48 Doug McIlroy
  2017-09-14  4:49 ` Larry McVoy
  0 siblings, 1 reply; 23+ messages in thread
From: Doug McIlroy @ 2017-09-14  3:48 UTC (permalink / raw)


> Check out:  ybc: a compiler for B <https://github.com/Leushenko/ybc>

From a historical standpoint, a plain B compiler lacks a very important
attribute of B in Unix. Yes, B presaged some C syntax. But its shining
property was that it produced threaded code, for which both compact
and expanded runtime support was available. The latter had software
paging. Thus B transcended the limited physical memory of the early
PDP-11s.

If you can't compile something, you can't run it.  A prime example was B
itself. Without software paging it would not have been able to recompile
itself, and Unix would not have been self-supporting.

Doug


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [TUHS] B Source Code
@ 2017-09-15 15:21 Noel Chiappa
  0 siblings, 0 replies; 23+ messages in thread
From: Noel Chiappa @ 2017-09-15 15:21 UTC (permalink / raw)


    > From: Dave Horsfall

    > Did anyone actually use the WCS?

Well, the uassembler was a product for a while, so they must have..

    > I had visions of implementing CSAV and CRET on our -60, but never did
    > get around to it. 

I recently had the idea of programming them into an M792 ROM card (100nsec
access time); user programs couldn't have used it without burning a segment
(to map in the appropriate part of the I/O space), but it might have sped up
the kernel some (and it would have been trivial to add, once the card was
programmed - with a soldering iron - BTDT, BITD :-).

Haven't gotten to it yet - still looking for an M792 (I don't want to trash
any of my pre-programmed M792-xx's :-).


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

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

Why not just write a Unix-native one? They aren't that much work - I created a
uassembler overnight (literally!) for the QSIC project Dave Bridgham and I
have been working on.

It's been improved a lot since the first version (e.g. the entire uengine
description is now read in from a config file, instead of being compiled in),
but that first version did work fine...

Or was the output format not documented?

	Noel


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [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; 23+ 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] 23+ messages in thread
* [TUHS] B Source Code
@ 2017-09-12 18:03 Robert Swierczek
  2017-09-12 18:14 ` Clem Cole
  0 siblings, 1 reply; 23+ messages in thread
From: Robert Swierczek @ 2017-09-12 18:03 UTC (permalink / raw)


Does anyone know of the existence of source code written in B (C's predecessor?)

I have encountered a few snippets here and there, but nothing
substantial.  The only "real" program that I know of is AberMUD-1.  It
looks like there exists a physical print-out of it:

https://dropsafe.crypticide.com/article/12714

Could it be that this is the only artifact left of this most important
"missing link" of C and Unix History?  How can this (and any other B
source) be gathered and preserved?


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

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

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14  3:48 [TUHS] B Source Code Doug McIlroy
2017-09-14  4:49 ` Larry McVoy
2017-09-14  5:06   ` Lars Brinkhoff
2017-09-14 12:53     ` Ronald Natalie
2017-09-14  5:33   ` Alec Muffett
2017-09-14  5:44     ` Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2017-09-15 15:21 Noel Chiappa
2017-09-14 13:39 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-12 18:03 Robert Swierczek
2017-09-12 18:14 ` Clem Cole
2017-09-12 19:24   ` Clem Cole
2017-09-12 19:43     ` Steve Johnson
2017-09-18 21:45     ` Angelo Papenhoff
2017-09-19 17:01       ` Thorsten Sideboard
2017-09-12 19:36   ` Charles Anthony
2017-09-12 20:39   ` Robert Swierczek

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