> Hi, > > I need to read 2, 4 or 8 bytes in a processor independent way. For > example: > I have 4 bytes ($12 $34 $56 $78), starting with the most signifikant (like > the 68k processor). Reading a DWord under i386 swaps the bytes > ($78563412). > Is there a fast way/procedure to read a word/dword/qword independent of > the > processor? > Something like > > function GetWordInLeastSignifikantByteOrder(P: PWord): Word; > > If not, how can I determine the current processor byte order?
{$ifdef FPC_BIG_ENDIAN} {$ifdef FPC_LITTLE_ENDIAN} _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal