[fpc-pascal] x86 asm bswap
Jeppe Græsdal Johansen
jjohan07 at student.aau.dk
Wed Feb 6 09:40:58 CET 2013
function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal;
begin
result := BeToN(aValue);
end;
Den 06-02-2013 09:25, Juha Manninen skrev:
> 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.
>
> Later PNG support functions can be replaced with something else, bu
> that is another story.
>
>
> Regards,
> Juha
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list