[fpc-pascal]byte order

Matt Emson memsom at interalpha.co.uk
Fri Jul 4 12:07:23 CEST 2003

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.


More information about the fpc-pascal mailing list