Sorry, that was a mis-type - it should read "I'd use", not "I use".furrykef wrote: Speaking of words versus bytes, there's a quirk in the M68k that I never realized until I thought about it this morning. Suppose I want to deliberately modify only half of a word:
How counterintuitive! If you always use 16-bit writes, you avoid the problem.Code: Select all
move.b #0, d0 ; Overwites LSB move.b #0, TwoByteVariable ; Overwrites MSB!
What do you use?Chilly Willy wrote:Yeah, I use something like that.
- Kef
And you hit on the one major advantage of little-endian over big-endian - no matter the size of the int, a pointer always points at the LSB. Some programmers utilitize that without realizing it's different in BE systems. Those programming quirks are REAL hard to find when porting.