On Wed, Feb 6, 2013 at 10:40 AM, Vincent Snijders <vincent.snijd...@gmail.com> wrote: > 2013/2/6 Juha Manninen <juha.mannine...@gmail.com>: >> I read that bswap is used for converting big-endian (Intel) format to >> little-endian (Motorolla etc.) format. >> However this a an old Delphi app, Win32 only. > > I am confused. Intel i386 is little endian. Motorola Powerpc is big endian.
I copied it from here: http://asm.inightmare.org/opcodelst/index.php?op=BSWAP I think the author was confused. I am always confused, too, because the big/little endian thing is named wrong IMO. In human readable numbers, reading from left to right, big numbers (MSB) come first and little numbers (LSB) last. In essense it is a "little endian" notation as it ends with little numbers. Motorola 68000 and others use the same logic (MSB - LSB) but for some reason it is called " big endian" while Intel which has it upside down, is called "little endian". IIRC the names refer to memory layout, how those registers are written to memory. Anyway, I am confused but it does not matter because there are functions made by someone else and I don't need to think of the details. :) Regards, Juha _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal