inet.h: add htons()
[neatlibc.git] / x86 / bits.s
blob2ebfbeb644246b892b086b1a2bdd331ee63f87f5
1 format ELF
3 public htonl
4 public ntohl
5 htonl:
6 ntohl:
7 mov eax, [esp+4]
8 xchg al, ah
9 ror eax, 16
10 xchg al, ah
11 ret
13 public htons
14 public ntohs
15 htons:
16 ntohs:
17 mov eax, [esp+4]
18 ror ax, 8
19 ret