[fpc-devel] Freepascal in microcontrollers

Micha Nelissen micha at neli.hopto.org
Thu Feb 28 09:51:08 CET 2008


Daniƫl Mantione wrote:
> 
> Op Thu, 28 Feb 2008, schreef Micha Nelissen:
> 
>> Jonas said the bits were swapped, not the bytes. So PPC32 (1 shl 30) 
>> becomes (1 shl 6) on Intel (actual), while it should be (1 shl 1) 
>> (expected use by compiler). It's both the "second bit", bit it's in 
>> different places.
> 
> Okay, but does this have impact on the discussion? I mean it makes 
> manual endian conversion a bit more tricky (also need to swap bits 
> around), but doesn't change the fact that you manually need to do endian 
> conversion.

Well we have procedures to do byte swapping, but none to do bit 
swapping. It's also very inefficient AFAIK; while changing the 
compiler's definition of which bit to use is "free".

Micha



More information about the fpc-devel mailing list