Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!ll-xn!cit-vax!cit-vlsi!wen-king From: wen-king@cit-vlsi.UUCP Newsgroups: comp.sys.m68k Subject: Re: Byte ordering, and pros/cons Message-ID: <1239@cit-vax.Caltech.Edu> Date: Thu, 27-Nov-86 12:51:57 EST Article-I.D.: cit-vax.1239 Posted: Thu Nov 27 12:51:57 1986 Date-Received: Fri, 28-Nov-86 01:53:00 EST References: <1271@ihwpt.UUCP> Sender: news@cit-vax.Caltech.Edu Reply-To: wen-king@cit-vlsi.UUCP (Wen-King Su) Distribution: net Organization: California Institute of Technology Lines: 55 In article <1271@ihwpt.UUCP> knudsen@ihwpt.UUCP (mike knudsen) writes: >The rationale for Intel and 6502 byte ordering is that it >is natural and consistent for *arithmetic* operations, >including the adds and subtracts in address calculations. >That is, higher addresses have higher-significance bytes. > >Motorola's ordering makes for slower arithmetic, since >you have to go back and fix the carries afterwards. >However, it is easier to read values in a Hex dump. > >More important, tho less generally known, Motorola >byte ordering is better for *graphics* bit-blitting, >since the bytes have the same left-to-right ordering >in the registers as they do in memory. >Graphics programs on Intel procs have to swab bytes >to undo the automatic swab done by the chip >on stores and fetches. As Craig Hansen has said in his previous reply, this debate is pointless. I for one want to see it stopped, and early. Has anyone noticed that the original poster wanted the replies sent via E-mail? I was going to sit tight and shut up myself but I can't stand false information being passed around in this group. Here are the facts: 1) The two orderings are duals. They are symmetrical and self consistent. Anything you can do in one ordering, you can do in the other by taking the dual of all the data, addresses, and operations. 2) It is people - you and me, people who build chips and people who write programs - who are inconsistent and asymetrical. Mirrors does not invert images sideways (as opposed to inverting them upsidedown), its all in our heads. No, Motorola's byte ordering does not make arithmetic operations slower. Bits are stored in the register in the same way as Intel. The only difference is the way addresses are assigned to the individual fields in a register. Nor is there any automatic byte swapping inside Intel's chips. Blitting should not be any more difficult with Intel's byte ordering than Motorola's. The way you pack pixels into words and words into scan lines is what makes all the difference. It is people who are flawed. To date, nobody has come up with a true big-ender machine; not IBM, not Motorola. A true big-ender must have a PC that counts down, and arrays that indexes backward. On the other hand, Intel has adopted a pure little-ender byte ordering in their processors. Now, if only people can learn to write consistent programs on them. I am not flaming the big-enders, just those who mixes them up. The next time you hear somebody claiming one byte ordering is superior than another, you know that he is either confused, misinformed, or he is not talking about byte ordering at all but about one specific software/hardware combination vs. another.