Computer Old Farts Forum
 help / color / mirror / Atom feed
* [COFF] [TUHS] v7 K&R C
       [not found]                   ` <20200514173206.GJ20771@mcvoy.com>
@ 2020-05-14 17:37                     ` athornton
  2020-05-14 17:38                       ` lm
  0 siblings, 1 reply; 5+ messages in thread
From: athornton @ 2020-05-14 17:37 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]


On May 14, 2020, at 10:32 AM, Larry McVoy <lm at mcvoy.com> wrote:
> I'm being a whiney grumpy old man, 

I’ve been one of those since I was, like, 20.  I am finally growing into it.  It’s kinda nice.

Adam


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

* [COFF] [TUHS] v7 K&R C
  2020-05-14 17:37                     ` [COFF] [TUHS] v7 K&R C athornton
@ 2020-05-14 17:38                       ` lm
  0 siblings, 0 replies; 5+ messages in thread
From: lm @ 2020-05-14 17:38 UTC (permalink / raw)


On Thu, May 14, 2020 at 10:37:08AM -0700, Adam Thornton wrote:
> 
> On May 14, 2020, at 10:32 AM, Larry McVoy <lm at mcvoy.com> wrote:
> > I'm being a whiney grumpy old man, 
> 
> I???ve been one of those since I was, like, 20.  I am finally growing into it.  It???s kinda nice.

Yeah, there are aspects that are quite pleasant.  Mentoring people is fun.

--lm


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

* [COFF] [TUHS] v7 K&R C
  2020-05-18 16:11             ` crossd
  2020-05-18 16:30               ` clemc
@ 2020-05-18 21:18               ` ron
  1 sibling, 0 replies; 5+ messages in thread
From: ron @ 2020-05-18 21:18 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2941 bytes --]

No typo.   While BCD was a way of encoding digits, BCD was also used as a character encoding.   Often these were outgrowths of the digit+zone punch encoding of IBM cards.   IBM later extended their BCD making into….  The EXTENDED Binary Coded Decimal Interchange Code, going from 6 to 8 bits in the process.l

UNIVAC indeed have their own BCD-sih format called FIELDDATA.   It was notable in that the nul value printed as @.

the PDP-10 and the UNVAC 1100 series were just the longest surviving perhaps of the 36 bit computers, that also included the IBM 70XX series and the GE 600 (Honewell 6000) series.   Both the UNIVAC and the PDP-10 did have the nice variable partial word mode, but all of these were indeed word addressed machines.

 

The early Crays also were word addressed.   The C compiler would simulated byte addressing by putting the byte offsetinto the word in the high order bits (the address resgisters  themselves were pinned at 24 bits).

 

Just to get this back on a UNIX history track, let me delve into more trivia.

Perhaps the real oddity was the Denelcor HEP.   The HEP had two addressing modes:   One was byte addressed (as you expect), the other was for all other data thpes (16-bit, 32-bit, and 64-bit portions of the 64-bit word).   The lower 3 bits of the memory address encoded the word side.   If it was 0 or 4, then it a 64 bit operand at the address specified in the higher part of the pointer.   If it was 2 or 6, then it was either the upper or lower half word.   If it was 1,3,5, or 7, it was one of the respective quarter words.

 

This caused a problem when we ported 4BSD to the thing.    The Berkeley kernel (particularly in the I/O code) did what I called “conversion by union.”   They would store a value in a union using one type pointer and the retrieve it via a different type.    In our compiler, had they used a cast (or went via a void* intermediary), everything would be fine.   But doing this sort of shenanigan (which is technically undefined behavior in C) led to insidious bugs where you’d be doing pointer operations and the WRONG size word would be referenced.

I spent a few days hunting all these down and fixing them.

It was about this time I realized that the code was setting up I/Os using a feature aptly named “The Low Speed Bus” and that we’d never get any reasonable performance that way.   HEP designer Burton Smith and I redesigned the I/O system literally on napkins from the Golden Corral in Aberdeen.   We went back and built a new I/O system out of spare parts we had on hand using an 11/34 as a control processor.   The HEP I/O system was kind of interesting in that while it had a highspeed interface into he HEP’s ECL memory, the thing consisted of 32 individual DEC UNIBUSes.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20200518/615786e7/attachment.htm>


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

* [COFF] [TUHS] v7 K&R C
  2020-05-18 16:11             ` crossd
@ 2020-05-18 16:30               ` clemc
  2020-05-18 21:18               ` ron
  1 sibling, 0 replies; 5+ messages in thread
From: clemc @ 2020-05-18 16:30 UTC (permalink / raw)


On Mon, May 18, 2020 at 12:12 PM Dan Cross <crossd at gmail.com> wrote:

> 6x6-bit data would certainly hold BAUDOT data, and I thought the
> Univac/CDC machines supported a 6-bit character set?
>
BAUDOT is 5 bits.   CDC used a 6-bit Display code - which there were a
number of different versions.  It was a PITA when you programmed it.   The
original Pascal compiler was a mess because of this.



>   Does this live on in the Unisys 1100-series machines? I see some
> reference to FIELDATA online.
>
https://www.fourmilab.ch/documents/univac/fieldata.html

Yes, it was officially a 7-bit code, but the first 1/2 of the code was
non-printable.  So the printable set was 6 bits.





>  they're called 'char' because that was just the way things had always
> been.
>
Right

Clem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20200518/e1f4943a/attachment.htm>


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

* [COFF] [TUHS] v7 K&R C
       [not found]           ` <CABH=_VSqRFD6aHiRRdpQc7fzLaAcBXR-OMRJW3LqnqAih-W8EQ@mail.gmail.com>
@ 2020-05-18 16:11             ` crossd
  2020-05-18 16:30               ` clemc
  2020-05-18 21:18               ` ron
  0 siblings, 2 replies; 5+ messages in thread
From: crossd @ 2020-05-18 16:11 UTC (permalink / raw)


On Sun, May 17, 2020 at 12:24 PM Paul Winalski <paul.winalski at gmail.com>
wrote:

> On 5/16/20, Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
> >
> > Why was there no byte or "mem" type?
>
> These days machine architecture has settled on the 8-bit byte as the
> unit for addressing, but it wasn't always the case.  The PDP-10
> addressed memory in 36-bit units.  The character manipulating
> instructions could deal with a variety of different byte lengths:  you
> could store six 6-bit BCD characters per machine word,


Was this perhaps a typo for 9 4-bit BCD digits? I have heard that a reason
for the 36-bit word size of computers of that era was that the main
competition at the time was against mechanical calculator, which had
9-digit precision. 9*4=36, so 9 BCD digits could fit into a single word,
for parity with the competition.

6x6-bit data would certainly hold BAUDOT data, and I thought the Univac/CDC
machines supported a 6-bit character set?  Does this live on in the Unisys
1100-series machines? I see some reference to FIELDATA online.

I feel like this might be drifting into COFF territory now; Cc'ing there.

or five ASCII
> 7-bit characters (with a bit left over), or four 8-bit characters
> (ASCII plus parity, with four bits left over), or four 9-bit
> characters.
>
> Regarding a "mem" type, take a look at BLISS.  The only data type that
> language has is the machine word.
>
> >   +getfield(buf)
> >   +char buf[];
> >   +{
> >   +       int j;
> >   +       char c;
> >   +
> >   +       j = 0;
> >   +       while((c = buf[j] = getc(iobuf)) >= 0)
> >   +       if(c==':' || c=='\n') {
> >   +               buf[j] =0;
> >   +               return(1);
> >   +       } else
> >   +               j++;
> >   +       return(0);
> >   +}
> >
> > so here the EOF was different and char was signed 7-bit it seems.
>
> That makes perfect sense if you're dealing with ASCII, which is a
> 7-bit character set.


To bring it back slightly to Unix, when Mary Ann and I were playing around
with First Edition on the emulated PDP-7 at LCM+L during the Unix50 event
last USENIX, I have a vague recollection that the B routine for reading a
character from stdin was either `getchar` or `getc`. I had some impression
that this did some magic necessary to extract a character from half of an
18-bit word (maybe it just zeroed the upper half of a word or something).
If I had to guess, I imagine that the coincidence between "character" and
"byte" in C is a quirk of this history, as opposed to any special hidden
meaning regarding textual vs binary data, particularly since Unix makes no
real distinction between the two: files are just unstructured bags of
bytes, they're called 'char' because that was just the way things had
always been.

        - Dan C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20200518/4afbbf66/attachment.htm>


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

end of thread, other threads:[~2020-05-18 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKzdPgyYUCPDn3KjRgx6Aw_=AD8O2Mdk0WkmPZCH9oN+XkPebg@mail.gmail.com>
     [not found] ` <20200511005745.GL17035@mcvoy.com>
     [not found]   ` <m1jYCHm-0036tPC@more.local>
     [not found]     ` <CABH=_VRucqOpJvZVRqhz6Bv-kVe6P-7Hk3SFDuO0XyKZ_=oCBg@mail.gmail.com>
     [not found]       ` <CAC20D2NTRE4cK5jewe-Yuo1UVnH6pY2u-wSt8NiG-5hBkzvvzQ@mail.gmail.com>
     [not found]         ` <CABH=_VT9dU7kuJSa+iN6zdF7RMpS-hE92DsyeSuMkTmrYGL_9g@mail.gmail.com>
     [not found]           ` <357EFE54-BD94-4C10-8C43-C6735BF7D317@via.net>
     [not found]             ` <20200511202555.GU17035@mcvoy.com>
     [not found]               ` <CABH=_VS8XO8BQA=fMCGTf8u-ubXLKT1tzUJ5ntTXWkjeGk1sSA@mail.gmail.com>
     [not found]                 ` <alpine.BSF.2.21.9999.2005140930270.18677@aneurin.horsfall.org>
     [not found]                   ` <20200514173206.GJ20771@mcvoy.com>
2020-05-14 17:37                     ` [COFF] [TUHS] v7 K&R C athornton
2020-05-14 17:38                       ` lm
     [not found] <20200515213138.8E0F72D2D71E@macaroni.inf.ed.ac.uk>
     [not found] ` <alpine.DEB.2.21.2005151752250.19733@sd-119843.dedibox.fr>
     [not found]   ` <077a01d62b08$e696bee0$b3c43ca0$@ronnatalie.com>
     [not found]     ` <20200515233427.31Vab%steffen@sdaoden.eu>
     [not found]       ` <5DB09C5A-F5DA-4375-AAA5-0711FC6FB1D9@ronnatalie.com>
     [not found]         ` <20200516232607.nLiIx%steffen@sdaoden.eu>
     [not found]           ` <CABH=_VSqRFD6aHiRRdpQc7fzLaAcBXR-OMRJW3LqnqAih-W8EQ@mail.gmail.com>
2020-05-18 16:11             ` crossd
2020-05-18 16:30               ` clemc
2020-05-18 21:18               ` ron

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