"Writing Cross-Platform Software: Getting Started" is largely about alignment:<p><a href="http://www.warplife.com/tips/code/portable/getting-started/" rel="nofollow">http://www.warplife.com/tips/code/portable/getting-started/</a><p>For years it was the top hit for "cross-platform software development". After a while it wasn't anymore. Eventually I looked into why; I found dozens of articles on the same topic, all with the term "getting started" in their titles.<p>Some people would be angry. I was very pleased. I don't really want credit for my work; what I want is for problems to go away.
It's not that data really _has_ to be aligned.<p>It's that computers are easier and cheaper to design and manufacture if they require data alignment.<p>Consider that it would be straightforward for today's 64-bit CPUs to permit 64-bit values to have one-byte alignment. There's all kinds of ways to implement that in hardware and software, but to do so requires extra circuitry, that would require larger silicon dies, there would be a greater failure rate at the fab and so on.