1: /*
   2:  * Copyright (c) 1987 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifdef LIBC_SCCS
   8:         <@(#)htons.s	1.1 (Berkeley) 1/25/87\0>
   9:         .even
  10: #endif LIBC_SCCS
  11: 
  12: /*
  13:  * netshort = htons(hostshort);
  14:  *	u_short	netshort,
  15:  *		hostshort;
  16:  *
  17:  * hostshort = ntohs(netshort);
  18:  *	u_short	hostshort,
  19:  *		netshort;
  20:  *
  21:  * Translate from host unsigned short representation to network unsigned
  22:  * short representation and back.  On the PDP-11 all this requires is
  23:  * swapping the bytes of a short, so the two routines are really one ...
  24:  */
  25: #include "DEFS.h"
  26: 
  27: .globl  _htons, _ntohs
  28: _htons:
  29: _ntohs:
  30:         PROFCODE(_htons)
  31:         mov     2(sp),r0
  32:         swab    r0
  33:         rts     pc

Defined functions

_htons declared in line 27; defined in line 28; used 83 times
Last modified: 1987-05-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3251
Valid CSS Valid XHTML 1.0 Strict