1/* strlen.s 4.1 84/11/01 */ 2 3/* 4 * Return the length of cp (not counting '\0'). 5 * 6 * strlen(cp) 7 * char *cp; 8 */ 9 .globl _strlen 10 11_strlen: 12 .word 0x0 13 movl 4(ap),r2 140: 15 locc $0,$65535,(r2) # look for '\0' 16 beql 0b 17 subl3 r2,r1,r0 # len = cp - base 18 ret 19