xref: /original-bsd/lib/libc/vax/net/htons.s (revision f5e44690)
1/*
2 * Copyright (c) 1983 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#ifndef lint
8_sccsid:.asciz	"@(#)htons.s	5.2 (Berkeley) 06/05/85"
9#endif not lint
10
11/* hostorder = htons(netorder) */
12
13#include "DEFS.h"
14
15ENTRY(htons)
16	rotl	$8,4(ap),r0
17	movb	5(ap),r0
18	movzwl	r0,r0
19	ret
20