[TUHS] B Source Code

Larry McVoy lm at mcvoy.com
Thu Sep 14 14:49:25 AEST 2017


Doug, could you talk about this some more?  Sort of like Reddit's
explain it like I'm 5?  Assume I'm dense but want to learn and tell
me how this worked again.  Threaded?  I'm guessing you mean that it
did paging, did that need threads in the current sense?

On Wed, Sep 13, 2017 at 11:48:44PM -0400, Doug McIlroy wrote:
> > 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

-- 
---
Larry McVoy            	     lm at mcvoy.com             http://www.mcvoy.com/lm 


More information about the TUHS mailing list