Subject: Re: Need byte-splitter utility

From: "Glen S" <[email-masked]>
Date: Mon Mar 31 23:04:00 2003

What is the difference between odd/even and high/low?

>As it turns out, it's not an odd-even split I need; It's high-byte/low-byte 
>split.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

---

From: "Andy Holt" <[email-masked]>
Date: Tue Apr 1 04:31:00 2003

> What is the difference between odd/even and high/low?
On a "little-endian" bus: none
On a "big-endian" bus: flipping the low order address bit :-)
  or is it vice-versa.

Andy

---

From: "Eric Smith" <[email-masked]>
Date: Wed Apr 2 01:57:42 2003

>>As it turns out, it's not an odd-even split I need; It's
>> high-byte/low-byte  split.

On a big-endian processor, the high byte is the even byte, and the
low byte is the odd byte.

On a little-endian processor, it's the other way around.

---

From: "Fred Cisin (XenoSoft)" <[email-masked]>
Date: Wed Apr 2 13:57:00 2003

> On a little-endian processor, it's the other way around.

... and if we are using a little-endian machine to split a file made from
big-endian contents, ...

Well, we either need FOUR different programs: odd/even, even/odd,
high/low, and low/high.   :-)

OR, one program, and rename the files appropriately after splitting them.

On the code that I posted earlier, there is one significant error:
FILE *FPIN, FPO1, FPO2;
needs to be:
FILE *FPIN, *FPO1, *FPO2;

Also, some operating systems will require filenames (including STDIO.H)
to be in lower case, and few compilers will require FILE.H.

--
Grumpy Ol' Fred        [email-masked]

---

From: Peter Turnbull <[email-masked]>
Date: Thu Apr 3 17:49:00 2003

> On a "big-endian" bus: flipping the low order address bit :-)

Depends if it's word-aligned or not :-)

-- 
Pete						Peter Turnbull
						Network Manager
						University of York