[comp.arch] new word order?

friedl@mtndew.Tustin.CA.US (Stephen J. Friedl) (02/28/91)

Hi folks,

     I need some help.  I know about big-endian and little-endian
architectures, but George Bush keeps talking about a "new word order",
and I cannot for the life of me figure out which way it could go.
Anybody have any ideas?

     Steve :-)

-- 
Stephen J. Friedl, KA8CMY  /  3B2-kind-of-guy  /  Tustin, CA / 3B2-kind-of-guy
+1 714 544 6561  / friedl@mtndew.Tustin.CA.US  / {uunet,attmail}!mtndew!friedl

"Anybody want to buy 40,000 unused body bags?" - Gen. Norman Schwartzkopf

gillies@m.cs.uiuc.edu (Don Gillies) (03/01/91)

friedl@mtndew.Tustin.CA.US (Stephen J. Friedl) writes:

>     I need some help.  I know about big-endian and little-endian
>architectures, but George Bush keeps talking about a "new word order",
>and I cannot for the life of me figure out which way it could go.
>Anybody have any ideas?

The "New Word Order" is otherwise known as "Off the Deep Endian", a
-- 

imw@siesoft.co.uk (Ian Wild) (03/01/91)

friedl@mtndew.Tustin.CA.US (Stephen J. Friedl) says:
>Hi folks,
>
>     I need some help.  I know about big-endian and little-endian
>architectures, but George Bush keeps talking about a "new word order",
>and I cannot for the life of me figure out which way it could go.
>Anybody have any ideas?
>
>     Steve :-)

Didn't Microsoft provide a switch for this in their Xenix cc?

Bytes in a long:

68xxx:               1 2 3 4
80x86 (normally):    4 3 2 1
80x86 (+ cc -Mb):    2 1 4 3

My question is WHY?


Ian

jerry@TALOS.UUCP (Jerry Gitomer) (03/02/91)

imw@siesoft.co.uk (Ian Wild) writes:

|friedl@mtndew.Tustin.CA.US (Stephen J. Friedl) says:
||Hi folks,
||
||     I need some help.  I know about big-endian and little-endian
||architectures, but George Bush keeps talking about a "new word order",
||and I cannot for the life of me figure out which way it could go.
||Anybody have any ideas?
||
||     Steve :-)

|Didn't Microsoft provide a switch for this in their Xenix cc?

|Bytes in a long:

|68xxx:               1 2 3 4
|80x86 (normally):    4 3 2 1
|80x86 (+ cc -Mb):    2 1 4 3

|My question is WHY?

|Ian

	Maybe it just can't count in a normal manner.

-- 
Jerry Gitomer at National Political Resources Inc, Alexandria, VA USA
I am apolitical, have no resources, and speak only for myself.
Ma Bell (703)683-9090      (UUCP:  ...{uupsi,vrdxhq}!pbs!npri6!jerry 

sef@kithrup.COM (Sean Eric Fagan) (03/02/91)

In article <1255@TALOS.UUCP> jerry@TALOS.UUCP (Jerry Gitomer) writes:
>imw@siesoft.co.uk (Ian Wild) writes:
>|Didn't Microsoft provide a switch for this in their Xenix cc?
>|Bytes in a long:
>|68xxx:               1 2 3 4
>|80x86 (normally):    4 3 2 1
>|80x86 (+ cc -Mb):    2 1 4 3
>|My question is WHY?
>	Maybe it just can't count in a normal manner.

Disclaimer:  this was all before my time, so I could easily have gotten some
of the details incorrect.

Anyway:  there once was a machine, 8086 based, which ran a Burroughs
Operating System.  CTOS, I think it was called.  It was multitasking and
multiprocessing.  Either SCO or uSoft ported XENIX XT to run under this OS
(actually, *with* it, but it could still be said to run *under* it).  The
machine, either in the hardware or in a software convention, defined that 4
bytes longs were to be of the order

	2 1 4 3

Thus, the switch, and the support for it.  It has a magic number and
everything (Microsoft x.out executable byte-swapped long or some such).

Hopefully, I haven't gotten anything *too* wrong...

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef@kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.

hrubin@pop.stat.purdue.edu (Herman Rubin) (03/02/91)

In article <1255@TALOS.UUCP>, jerry@TALOS.UUCP (Jerry Gitomer) writes:
> imw@siesoft.co.uk (Ian Wild) writes:
> 
> |friedl@mtndew.Tustin.CA.US (Stephen J. Friedl) says:
 
			...................

> |68xxx:               1 2 3 4
> |80x86 (normally):    4 3 2 1
> |80x86 (+ cc -Mb):    2 1 4 3
> 
> |My question is WHY?

I am familiar with the order on the VAXen, and I can give some answer to
the WHY.  First to clarify the notation; the order listed is the order of
bytes in memory by address, and the byte number is from most significant
to least significant.  The 68xxx is big-endian; the most significant byte
comes first in memory.  The 80x86 and VAX are little-endian; the least
significant byte comes first in memory.  If an object is likely to have
its information in the least significant end, this is an advantage in
that the memory address of the lowest order byte is that of the {short
word, long word, double word}.

But for floating point, they had the most significant short word first.
For double on the VAX, the order is 21436587, so truncating to single
was done by using the same address.

I do not think that either way is the right way to do things; I am 
merely reporting.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (Internet, bitnet)   {purdue,pur-ee}!l.cc!hrubin(UUCP)

jdn@misc.Eng.Sun.COM (Jeff Nisewanger) (03/03/91)

In article <1991Mar1.095745.13399@siesoft.co.uk> imw@siesoft.co.uk (Ian Wild) writes:
>Didn't Microsoft provide a switch for this in their Xenix cc?
>
>Bytes in a long:
>
>68xxx:               1 2 3 4
>80x86 (normally):    4 3 2 1
>80x86 (+ cc -Mb):    2 1 4 3
>
>My question is WHY?


	I *think* that 2143 was the byte ordering of longs on the
PDP-11. I don't know if this was done specifically for compatibility with
the PDP but my guess is that an early C compiler implementation on the '86
may have used the PDP-11 byte ordering since the PDP Unix C compiler was
the primary 16-bit reference implementation of the time.



	Jeff
--
Jeff Nisewanger                         ARPA: jdn@Eng.Sun.COM
Window Systems Group                    UUCP: ...!sun!jdn
Sun Microsystems, Inc.                  415/336-5743

mash@mips.com (John Mashey) (03/03/91)

In article <1991Mar02.081830.2049@kithrup.COM> sef@kithrup.COM (Sean Eric Fagan) writes:
>Anyway:  there once was a machine, 8086 based, which ran a Burroughs
>Operating System.  CTOS, I think it was called.  It was multitasking and

CTOS was Convergent Technologies' Operating System for X86 processors.
Burroughs had a version called BTOS that they used when reselling the
products.  This was designed right at the beginning of CT, and was/is
a fairly elegant distributed operating system for the business environment,
with diskless/diskful workstations and servers right from the beginning
(1979/1980, before my time at CT), using cheap RS422 networks.
I don't know the current numbers,
but Unisys claims that CTOS is #3 on the desktop, after MS/DOS & Mac,
and this wouldn't surprise me, as there are probably 1 Million of these
out there (+/- 200K).
In some ways it was ahead of its time,
and I believe Unisys is in the process of "opening" it up.  Had it
been broadly licensed in 1980 (which would have taken amazing foresight),
the desktop world might be rather different.  In many respects, it was
the business equivalent of Apollo, i.e., visionary technology early,
hurt at least somewhat by less-strong, but wider-licensed later
technology.
-- 
-john mashey	DISCLAIMER: <generic disclaimer, I speak for me only, etc>
UUCP: 	 mash@mips.com OR {ames,decwrl,prls,pyramid}!mips!mash 
DDD:  	408-524-7015, 524-8253 or (main number) 408-720-1700
USPS: 	MIPS Computer Systems MS 1/05, 930 E. Arques, Sunnyvale, CA 94086

przemek@liszt.helios.nd.edu (Przemek Klosowski) (03/05/91)

In<7235@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
>
>But for floating point, they had the most significant short word first.
>For double on the VAX, the order is 21436587, so truncating to single
>was done by using the same address.

Ah, but the simple conversion was paid for by the floating point
format where the exponent had to have the same length in float and
double. It is so nice to have 10^(+-308) dynamic range, whereas the
floats (and doubles) on VAX allowed only 10^(+-38) range---not enough
if you are using things like Heisenberg constant squared... Of course
VAX gave you also the G 64 bit floating format---I just never figured out
how I can use from my C compiler. Then, there was an H float: 128 bits...

The compatibility between the float and double on one hand contributed
to the ease of programming on VAX (it did not matter if you declared a
number as a float in one routine, and as a double in another, if you
needed extra accuracy); on the other hand porting was tough (ask me
about the problems I had with the routines from "Numerical
Recipes")---actually, this part caused me much, much more problems
than zero pointers or sizeof int == sizeof void *.

--
			przemek klosowski (przemek@ndcvx.cc.nd.edu)
			Physics Dept
			University of Notre Dame IN 46556

rhealey@digibd.com (Rob Healey) (03/06/91)

In article <1991Mar1.095745.13399@siesoft.co.uk> imw@siesoft.co.uk (Ian Wild) writes:
>>     I need some help.  I know about big-endian and little-endian
>>architectures, but George Bush keeps talking about a "new word order",
>>and I cannot for the life of me figure out which way it could go.
>>Anybody have any ideas?
>>
>Didn't Microsoft provide a switch for this in their Xenix cc?
>Bytes in a long:
>
>68xxx:               1 2 3 4
>80x86 (normally):    4 3 2 1
>80x86 (+ cc -Mb):    2 1 4 3
>
>My question is WHY?
>
	If my fading memory serves me correctly, the last case looks
	suspiciously like the PDP-ian word order of 32 bit integer
	representation. Or maybe it was 3 4 1 2?...

	Wasn't Xenix ported to the PDP11 way back when?

		-Rob