svn commit: r314087 - head/sys/x86/x86

Warner Losh imp at bsdimp.com
Sun Feb 26 17:37:46 UTC 2017


On Sun, Feb 26, 2017 at 5:44 AM, Konstantin Belousov
<kostikbel at gmail.com> wrote:
> On Sun, Feb 26, 2017 at 04:43:12AM +1100, Bruce Evans wrote:
> 2.9 BSD was a port to PDP-11, AFAIK, with 16bit ints.

A bit off topic, but 2BSD was basically[**] a continuation of Research
Unix which started out life on the PDP-11 (well, OK, it started life
in assembler on the PDP-7, but then was rewritten in C on the PDP-11).
PDP-11 had 16-bit ints, 32-bit longs, 16-bit shorts, 16-bit pointers,
8-bit chars and 20-bit physical addresses. After 2.9, it also required
weird things like separate I&D space where you could have a function
pointer and a data pointer that had the same bit pattern, but referred
to different objects because instruction space and address space were
different (effectively giving 17-bits of address space, kinda). But
you also had things like an overlay manager from hell that would page
in different parts of the code if the program couldn't fit int 64k,
and many of the limitations of the BSD 2.11 TCP stack were based on
limitations of how deep you could do the overlays. It didn't have long
longs. Or a compiler more modern than K&R[*].

Other than that, ULL vs explicit casts

Warner

[*] OK, gcc can produce pdp-11 output, even to this day. But it's far
far to large to run on a pdp-11 natively.
[**] Lots of cross pollination between BSD and Bell Labs is noted and
documented extensively elsewhere.


More information about the svn-src-head mailing list