The word you are looking for is 'Big Endian'. Have a google on 'Big Endian' and 'Little Endian' on google.
this is a delphi routine, it may not work in FPC, certainly I would try it first in Delphi compatibility mode, and with Intel style assembler syntax: function Swap32(value : dword) : dword ; assembler ; asm bswap eax end ; for words there is always 'swap' in the system unit. Matt _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal