Subject: Re: Need byte-splitter utility

From: [email-masked] (Sean 'Captain Napalm' Conner)
Date: Wed Apr 2 03:26:40 2003

It was thus said that the Great Tony Duell once stated:
> 
> > 	Fortunately, a number of other list users have offered outstandingly 
> > helpful pointers (thanks, troops!) As it turns out, it's not an odd-even 
> > split I need; It's high-byte/low-byte split. I'm still digging, and I
> 
> Care to explain what the difference is? As I understand it you have a 
> file containing bytes like this (say)
> 
> L0 H0 L1 H1 L2 H2.... 
> 
> And you want to make 2 files, one containing
> L0 L1 L2 ...
> 
> And the other containing
> H0 H1 H2...
> 
> Looks like an odd/even split to me.

  Might be a big-endian/little-endian issue.  A Z80 (if I recall) would lay
down 16 bit quantities as:

	L0 H0 L1 H1 L2 H2 ...

  while a 6809 (which I know) would lay out 16 bit quantities as:

	H0 L0 H1 L1 H2 L2 ...

  So maybe that's what he's talking about?

  -spc (But in either case, you'll still end up with two files and I would
	think that as long as you know which one you need where ... )

---

From: [email-masked] (Tony Duell)
Date: Fri Apr 4 12:15:11 2003

>   while a 6809 (which I know) would lay out 16 bit quantities as:

Sure... But once you've split them up into Hn and Ln files, does it 
matter? Provided you know which way round the bytes were originally and 
which file then ended up in. You can just pick the appropriate file for 
the high and low bytes in each case.

> 	think that as long as you know which one you need where ... )

_Exactly_!!!

-tony