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:         <@(#)htonl.s	1.1 (Berkeley) 1/25/87\0>
   9:         .even
  10: #endif LIBC_SCCS
  11: 
  12: /*
  13:  * netlong = htonl(hostlong);
  14:  *	u_long	netlong,
  15:  *		hostlong;
  16:  *
  17:  * hostlong = ntohl(netlong);
  18:  *	u_long	hostlong,
  19:  *		netlong;
  20:  *
  21:  * Translate from host unsigned long representation to network unsigned
  22:  * long representation and back.  On the PDP-11 all this requires is
  23:  * swapping the bytes within the high and low words of a long, so the
  24:  * two routines are really one ...
  25:  */
  26: #include "DEFS.h"
  27: 
  28: .globl  _htonl, _ntohl
  29: _htonl:
  30: _ntohl:
  31:         PROFCODE(_htonl)
  32:         mov     2(sp),r0
  33:         mov     4(sp),r1
  34:         swab    r0
  35:         swab    r1
  36:         rts     pc

Defined functions

Last modified: 1987-05-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1198
Valid CSS Valid XHTML 1.0 Strict