xref: /original-bsd/lib/libc/vax/string/strlen.s (revision e79a6a26)
1/*
2 * Copyright (c) 1983, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8#if defined(LIBC_SCCS) && !defined(lint)
9	.asciz "@(#)strlen.s	8.1 (Berkeley) 06/04/93"
10#endif /* LIBC_SCCS and not lint */
11
12/*
13 * Return the length of cp (not counting '\0').
14 *
15 * strlen(cp)
16 *	char *cp;
17 */
18#include "DEFS.h"
19
20ENTRY(strlen, 0)
21	movl	4(ap),r1
221:
23	locc	$0,$65535,(r1)	# look for '\0'
24	beql	1b
25	subl3	4(ap),r1,r0	# len = cp - base
26	ret
27