Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #72273

Re: [OT] programming

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: [OT] programming
Date 2015-10-09 09:23 -0700
Organization None to speak of
Message-ID <lnwpuwf1u4.fsf@kst-u.example.com> (permalink)
References (3 earlier) <mv2muo$m6o$1@dont-email.me> <mv6ss4$t36$1@dont-email.me> <mv6tje$v5v$1@dont-email.me> <mv6v8u$41p$1@dont-email.me> <mv7q7o$3kf$1@dont-email.me>

Show all headers | View raw


Richard Heathfield <rjh@cpax.org.uk> writes:
[...]
> 3.6 gives the definition of 'byte': "addressable unit of data storage 
> large enough to hold any member of the basic character set of the 
> execution environment".
>
> On that platform, no unit smaller than 32 bits is addressable.
>
> It would be possible for a C implementation to set CHAR_BIT at 8 only if 
> they jump through all the necessary hoops to ensure that the 
> implementation behaves "as if" 8-bit units were addressable. I don't 
> think the Analog Devices people went to that trouble.
>
> On the other hand, somebody /did/ go to that trouble for... was it a 
> Cray, or a Honeywell? I forget. Anyway, they had 64-bit bytes, but they 
> decided, presumably for the sake of not getting shouted out by a lot of 
> hairy C programmers, that they would emulate 8-bit bytes.

Cray vector systems, such as the T90.

The smallest hardware-addressible unit is 64 bits.  A 64-bit unit is
called a "word"; I don't think it was ever referred to as a "byte".

Because Cray wanted to run a POSIX-compliant system (which requires
CHAR_BIT==8), they implemented 8-bit byte addressing in software, by
storing a 3-bit offset in the otherwise unused high-order 3 bits of a
64-bit pointer.  (Which made string processing really slow -- but that's
not what those systems were designed for).

[...]

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] programming asetofsymbols@gmail.com - 2015-10-07 00:37 -0700
  Re: [OT] programming mark.bluemel@gmail.com - 2015-10-07 00:49 -0700
    Re: [OT] programming asetofsymbols@gmail.com - 2015-10-07 01:06 -0700
      Re: [OT] programming Richard Heathfield <rjh@cpax.org.uk> - 2015-10-07 10:02 +0100
        Re: [OT] programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-07 02:18 -0700
        Re: [OT] programming "Bill Cunningham" <nospam@nspam.invalid> - 2015-10-08 19:07 -0400
          Re: [OT] programming Richard Heathfield <rjh@cpax.org.uk> - 2015-10-09 00:20 +0100
            Re: [OT] programming Bartc <bc@freeuk.com> - 2015-10-09 00:48 +0100
              Re: [OT] programming Keith Thompson <kst-u@mib.org> - 2015-10-08 17:48 -0700
                Re: [OT] programming David Brown <david.brown@hesbynett.no> - 2015-10-09 10:38 +0200
                Re: [OT] programming Keith Thompson <kst-u@mib.org> - 2015-10-09 09:31 -0700
                Re: [OT] programming Richard Damon <Richard@Damon-Family.org> - 2015-10-09 08:34 -0400
                Re: [OT] programming Keith Thompson <kst-u@mib.org> - 2015-10-09 12:05 -0700
              Re: [OT] programming Richard Heathfield <rjh@cpax.org.uk> - 2015-10-09 08:28 +0100
                Re: [OT] programming David Brown <david.brown@hesbynett.no> - 2015-10-09 10:50 +0200
                Re: [OT] programming Keith Thompson <kst-u@mib.org> - 2015-10-09 09:26 -0700
                Re: [OT] programming David Brown <david.brown@hesbynett.no> - 2015-10-11 20:30 +0200
                Re: [OT] programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-11 12:09 -0700
                Re: [OT] programming Bartc <bc@freeuk.com> - 2015-10-09 10:40 +0100
                Re: [OT] programming Keith Thompson <kst-u@mib.org> - 2015-10-09 09:23 -0700
                Re: [OT] programming Bartc <bc@freeuk.com> - 2015-10-09 17:35 +0100
                Re: [OT] programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-09 22:50 -0700
            Re: [OT] programming David Brown <david.brown@hesbynett.no> - 2015-10-09 10:34 +0200
          Re: [OT] programming glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-09 00:20 +0000
      Re: [OT] programming "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-07 09:37 -0700

csiph-web