From 2866552504857943931
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,738ae3371beb3408
X-Google-Attributes: gidf78e5,public
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: portable method of determining endianness byte order.
Date: 1999/12/07
Message-ID: <t7n1rn7h1w.fsf@calumny.jyacc.com>#1/1
X-Deja-AN: 557485156
X-NNTP-Posting-Host: firewall.jyacc.com
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <38329967.470B6CED@hqs.mid.gmeds.com> <38359FF5.AB0B77E9@zetec.com> <t73dtnacpa.fsf@calumny.jyacc.com> <g1pNRNAk6GR4Ew21@robinton.demon.co.uk> <t7ln7e8spx.fsf@calumny.jyacc.com> <3846CA71.5792390E@tribble.com>
X-UID: 0000000001
X-Status: $$$T
X-Complaints-To: abuse@panix.com
X-Trace: news.panix.com 944524859 12812 209.49.126.226 (7 Dec 1999 00:00:59 GMT)
Organization: PANIX Public Access Internet and UNIX, NYC
NNTP-Posting-Date: 7 Dec 1999 00:00:59 GMT
Newsgroups: comp.std.c++
Originator: clamage@taumet


David R Tribble <david@tribble.com> writes:
> No, you're thinking of its predecessor, the PDP-11.
> VAX integers (32 bits) were little-endian (e.g., 0x11223344 was
> <0x44,0x33,0x22,0x11>), while PDP-11 long ints (32 bits) were
> mixed-endian (e.g., 0x11223344 was <0x22,0x11,0x44,0x33>).

Sounds right. When I first started programming in C, it was on a
PDP-11/45, using a compiler which didn't implement longs or unions,
and which represented structure fields as absolute offsets, so that
no two structures could have the same field names unless the fields
were at the same offset in each structure. That was around 1979.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




