1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Computer Consoles Inc. 7 * 8 * %sccs.include.proprietary.c% 9 */ 10 11#ifndef lint 12 .asciz "@(#)l_le_s.s 5.2 (Berkeley) 04/12/91" 13#endif /* not lint */ 14 15.data 16.text 17LL0:.align 1 18.globl _l_le 19.set MASK__,0x4 20.data 21.text 22_l_le:.word MASK__ 23 movl 4(fp),r0 /* a */ 24 movl 8(fp),r1 /* b */ 25 cmpl 12(fp),16(fp) /* if (la <= lb) */ 26 jgtr LB 27 movl 12(fp), r2 /* compare according to la */ 28 cmps3 29 jleq out1 /* if less or equal return(1) */ 30 jbr out0 /* else greater: return(0) */ 31 32LB: /* else */ 33 movl 16(fp), r2 /* compare according to lb */ 34 cmps3 35 jlss out1 /* if less return(1) */ 36 jgtr out0 /* if greater return(0) */ 37 38 addl3 4(fp), 12(fp), r2 /* aend */ 39LOOP2: 40 cmpb (r0), $32 /* if *a != space */ 41 jneq out0 /* then astring > bstring */ 42 incl r0 /* else continue */ 43 cmpl r0, r2 /* till aend */ 44 jlssu LOOP2 45out1: 46 movl $1, r0 /* else return(1) */ 47 ret 48out0: 49 clrl r0 50 ret 51