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 "@(#)hl_lt_s.s 5.2 (Berkeley) 04/12/91" 13#endif /* not lint */ 14 15.data 16.text 17LL0:.align 1 18.globl _hl_lt 19.set MASK__,0x4 20.data 21.text 22_hl_lt:.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 jlss out1 /* if less return(1) */ 30 jgtr out0 /* if greater return(0) */ 31 32 cmpl 12(fp),16(fp) /* if (la == lb) */ 33 jeql out0 /* then equal */ 34 35 addl3 8(fp), 16(fp), r2 /* bend */ 36LOOP1: 37 cmpb (r1), $32 /* if *b != space */ 38 jneq out1 /* then astring < bstring */ 39 incl r1 /* else continue */ 40 cmpl r1, r2 /* till bend */ 41 jlssu LOOP1 42 jbr out0 43 44LB: /* else */ 45 movl 16(fp), r2 /* compare according to lb */ 46 cmps3 47 jlss out1 /* if less return(0) */ 48 49out0: 50 clrl r0 51 ret 52out1: 53 movl $1, r0 54 ret 55