Annotation of 43BSD/lib/libc/vax/gen/strlen.s, revision 1.1.1.1

1.1       root        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: #ifdef LIBC_SCCS
                      8:        .asciz  "@(#)strlen.s   5.3 (Berkeley) 3/9/86"
                      9: #endif LIBC_SCCS
                     10: 
                     11: /*
                     12:  * Return the length of cp (not counting '\0').
                     13:  *
                     14:  * strlen(cp)
                     15:  *     char *cp;
                     16:  */
                     17: #include "DEFS.h"
                     18: 
                     19: ENTRY(strlen, 0)
                     20:        movl    4(ap),r1
                     21: 1:
                     22:        locc    $0,$65535,(r1)  # look for '\0'
                     23:        beql    1b
                     24:        subl3   4(ap),r1,r0     # len = cp - base
                     25:        ret

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.