xref: /csrg-svn/lib/libc/vax/string/strlen.s (revision 61222)
121435Sdist/*
2*61222Sbostic * Copyright (c) 1983, 1993
3*61222Sbostic *	The Regents of the University of California.  All rights reserved.
434481Sbostic *
542639Sbostic * %sccs.include.redist.c%
621435Sdist */
717322Ssam
834819Sbostic#if defined(LIBC_SCCS) && !defined(lint)
9*61222Sbostic	.asciz "@(#)strlen.s	8.1 (Berkeley) 06/04/93"
1034819Sbostic#endif /* LIBC_SCCS and not lint */
1121435Sdist
1217322Ssam/*
1317322Ssam * Return the length of cp (not counting '\0').
1417322Ssam *
1517322Ssam * strlen(cp)
1617322Ssam *	char *cp;
1717322Ssam */
1817329Ssam#include "DEFS.h"
1917322Ssam
2017329SsamENTRY(strlen, 0)
2117341Smckusick	movl	4(ap),r1
2217341Smckusick1:
2317341Smckusick	locc	$0,$65535,(r1)	# look for '\0'
2417341Smckusick	beql	1b
2517341Smckusick	subl3	4(ap),r1,r0	# len = cp - base
2617322Ssam	ret
27