BeOS for Intel:
Developer Questions
|
FAQ Number:
FAQ-0428
|
Last Modified:
4/9/98
|
Keywords:
BeOS,
Intel,
Developer,
Questions,
port,
software,
platform,
PowerPC,
cross,
compile,
CodeWarrior,
API,
endianess
|
|
"Endianess" refers to the way that different processors (for example, Intel x86 and PowerPC) represent data internally. Basically, there are two different possibilities, "little" and "big." Intel uses little, while PowerPC uses big.
The "issues" part comes when you want to move data from one system to another, say, when you transfer a word processing file from a BeOS/PPC system to a BeOS/Intel system, or even to a Windows/Intel system. Because the processor's endianess changes, the data could be (though not necessarily will be) unreadable.
Fortunately, endianess issues are well understood, and well-written software takes it into account. For developers who have already thought about the problem (and there are plenty of textbooks with the answer), it shouldn't be a stumbling block.
Be has included a number of functions for doing byte-swapping, etc., which are commonly used in writing endian-neutral code, and we've written several Newsletter articles about the issue:
YABSA -- Yet Another Byte-swapping Article, By Bradley Taylor
http://www.be.com/aboutbe/benewsletter/Issue99.html#Insight
Will Your DATA Look Like ATAD?, By Bradley Taylor
http://www.be.com/aboutbe/benewsletter/Issue63.html#Insight
Be Inc.'s "Swapping Bytes, Part III", By Peter Potrebic
http://www.be.com/aboutbe/benewsletter/volume_II/Issue8.html#Insight
|