1*54394Storek/* 2*54394Storek * Copyright (c) 1992 The Regents of the University of California. 3*54394Storek * All rights reserved. 4*54394Storek * 5*54394Storek * This software was developed by the Computer Systems Engineering group 6*54394Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7*54394Storek * contributed to Berkeley. 8*54394Storek * 9*54394Storek * %sccs.include.redist.c% 10*54394Storek * 11*54394Storek * from: $Header: htons.s,v 1.1 92/06/25 12:47:05 torek Exp $ 12*54394Storek */ 13*54394Storek 14*54394Storek#if defined(LIBC_SCCS) && !defined(lint) 15*54394Storek .asciz "@(#)htons.s 5.1 (Berkeley) 06/25/92" 16*54394Storek#endif /* LIBC_SCCS and not lint */ 17*54394Storek 18*54394Storek/* netorder = htons(hostorder) */ 19*54394Storek 20*54394Storek#include "DEFS.h" 21*54394Storek 22*54394StorekENTRY(htons) 23*54394Storek sethi %hi(0xffff0000), %o1 24*54394Storek retl 25*54394Storek andn %o0, %o1, %o0 26