[fpc-pascal] Re: x86 asm bswap

Lukasz Sokol el.es.cr at gmail.com
Wed Feb 6 09:45:30 CET 2013




On 06/02/2013 08:25, Juha Manninen wrote:
> A Delphi project "DeleD 3-D" which I try to convert, has
> unit_PNGSupport with method:
> 
> function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal; assembler;
> asm
>     mov eax, aValue
>     bswap eax;
> end;
> 
> What would be a cross-platform replacement?
> 
> 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.
>
What Vincent said, and...
 
> Later PNG support functions can be replaced with something else, bu
> that is another story.
> 
> 
> Regards,
> Juha

There was a (recent) discussion about Swap and BEtoN, on Lazarus list.
(message titles: "Unpack of PHP", mostly on 4/02/2013)

Lukasz






More information about the fpc-pascal mailing list