Sync usage with man page.
[netbsd-mini2440.git] / lib / libc / pc532 / net / ntoh.s
blobf36e298585fb65837fcf94b49ce583061ffe640d
1 /*
2 * Mach Operating System
3 * Copyright (c) 1992 Carnegie Mellon University
4 * Copyright (c) 1992 Helsinki University of Technology
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
13 * CARNEGIE MELLON AND HELSINKI UNIVERSITY OF TECHNOLOGY ALLOW FREE USE
14 * OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND
15 * HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIM ANY LIABILITY OF ANY KIND
16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 * Carnegie Mellon requests users of this software to return to
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
25 * any improvements or extensions that they make and grant Carnegie Mellon
26 * the rights to redistribute these changes.
29 * HISTORY
30 * 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology
31 * Created.
33 * $Id: ntoh.s,v 1.1 1993/09/17 18:43:47 phil Exp $
36 #include <machine/asm.h>
38 .text
39 Entry(ntohl)
40 ENTRY(htonl)
41 movd S_ARG0,r0
42 rotw 8,r0
43 rotd 16,r0
44 rotw 8,r0
45 ret 0
48 Entry(ntohs)
49 ENTRY(htons)
50 movzwd S_ARG0,r0
51 rotw 8,r0
52 ret 0