134438Sbostic/* 234438Sbostic * Copyright (c) 1988 Regents of the University of California. 334438Sbostic * All rights reserved. 434438Sbostic * 5*34824Sbostic * Redistribution and use in source and binary forms are permitted 6*34824Sbostic * provided that the above copyright notice and this paragraph are 7*34824Sbostic * duplicated in all such forms and that any documentation, 8*34824Sbostic * advertising materials, and other materials related to such 9*34824Sbostic * distribution and use acknowledge that the software was developed 10*34824Sbostic * by the University of California, Berkeley. The name of the 11*34824Sbostic * University may not be used to endorse or promote products derived 12*34824Sbostic * from this software without specific prior written permission. 13*34824Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*34824Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*34824Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*34824Sbostic * 1734438Sbostic * This code is derived from software contributed to Berkeley by 1834438Sbostic * Computer Consoles Inc. 1934438Sbostic */ 2029699Ssam 2134438Sbostic#if defined(LIBC_SCCS) && !defined(lint) 22*34824Sbostic .asciz "@(#)strcmp.s 1.3 (Berkeley) 06/27/88" 2334438Sbostic#endif /* LIBC_SCCS and not lint */ 2434438Sbostic 2529699Ssam#include "DEFS.h" 2629699Ssam 2729699Ssam/* 2829699Ssam * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0 2929699Ssam * 3029699Ssam * strcmp(s1, s2) 3129699Ssam * register char *s1, *s2; 3229699Ssam*/ 3329699Ssam 3429699SsamENTRY(strcmp, 0) 3529699Ssam movl 4(fp),r0 3629699Ssam movl 8(fp),r1 3729699Ssam cmps2 3829699Ssam jgtr greater 3929699Ssam jlss less 4029699Ssamequal: clrl r0 4129699Ssam ret 4229699Ssamless: movl $-1,r0 4329699Ssam ret 4429699Ssamgreater: movl $1,r0 4529699Ssam ret 46