xref: /csrg-svn/lib/libc/vax/net/ntohs.s (revision 34814)
121444Sdist/*
221444Sdist * Copyright (c) 1983 Regents of the University of California.
3*34814Sbostic * All rights reserved.
4*34814Sbostic *
5*34814Sbostic * Redistribution and use in source and binary forms are permitted
6*34814Sbostic * provided that the above copyright notice and this paragraph are
7*34814Sbostic * duplicated in all such forms and that any documentation,
8*34814Sbostic * advertising materials, and other materials related to such
9*34814Sbostic * distribution and use acknowledge that the software was developed
10*34814Sbostic * by the University of California, Berkeley.  The name of the
11*34814Sbostic * University may not be used to endorse or promote products derived
12*34814Sbostic * from this software without specific prior written permission.
13*34814Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*34814Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*34814Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1621444Sdist */
1721444Sdist
18*34814Sbostic#if defined(LIBC_SCCS) && !defined(lint)
19*34814Sbostic	.asciz "@(#)ntohs.s	5.5 (Berkeley) 06/27/88"
20*34814Sbostic#endif /* LIBC_SCCS and not lint */
2121444Sdist
229718Ssam/* hostorder = ntohs(netorder) */
239718Ssam
249718Ssam#include "DEFS.h"
259718Ssam
2634425SmckusickENTRY(ntohs, 0)
279718Ssam	rotl	$8,4(ap),r0
289718Ssam	movb	5(ap),r0
299718Ssam	movzwl	r0,r0
309718Ssam	ret
31