Arargh wrote:
> From ws2_32.dll:
>
> 01000 htonl proc near
> 01000 8B 4C 24 04 mov ecx,dword ptr [esp+4]
> 01004 8B C1 mov eax,ecx
> 01006 8B D1 mov edx,ecx
> 01008 25 0000FF00 and eax,0FF00h
> 0100D C1 E2 10 shl edx,10h
> 01010 0B C2 or eax,edx
> 01012 8B D1 mov edx,ecx
> 01014 C1 EA 10 shr edx,10h
> 01017 81 E1 00FF0000 and ecx,0FF0000h
> 0101D 0B D1 or edx,ecx
> 0101F C1 E0 08 shl eax,8
> 01022 C1 EA 08 shr edx,8
> 01025 0B C2 or eax,edx
> 01027 C2 0004 retn 4
> htonl endp
Someone should have mercy and tell Microsoft about bswap.
It's been available for, what, 20 years?
:-þ


|