1*47942Sbostic/*- 2*47942Sbostic * Copyright (c) 1991 The Regents of the University of California. 3*47942Sbostic * All rights reserved. 4*47942Sbostic * 5*47942Sbostic * This code is derived from software contributed to Berkeley by 6*47942Sbostic * Computer Consoles Inc. 7*47942Sbostic * 8*47942Sbostic * %sccs.include.proprietary.c% 9*47942Sbostic */ 1029958Smckusick 11*47942Sbostic#ifndef lint 12*47942Sbostic .asciz "@(#)hl_lt_s.s 5.2 (Berkeley) 04/12/91" 13*47942Sbostic#endif /* not lint */ 14*47942Sbostic 1529958Smckusick.data 1629958Smckusick.text 1729958SmckusickLL0:.align 1 1829958Smckusick.globl _hl_lt 1929958Smckusick.set MASK__,0x4 2029958Smckusick.data 2129958Smckusick.text 2229958Smckusick_hl_lt:.word MASK__ 2329958Smckusick movl 4(fp),r0 /* a */ 2429958Smckusick movl 8(fp),r1 /* b */ 2529958Smckusick cmpl 12(fp),16(fp) /* if (la <= lb) */ 2629958Smckusick jgtr LB 2729958Smckusick movl 12(fp), r2 /* compare according to la */ 2829958Smckusick cmps3 2929958Smckusick jlss out1 /* if less return(1) */ 3029958Smckusick jgtr out0 /* if greater return(0) */ 3129958Smckusick 3229958Smckusick cmpl 12(fp),16(fp) /* if (la == lb) */ 3329958Smckusick jeql out0 /* then equal */ 3429958Smckusick 3529958Smckusick addl3 8(fp), 16(fp), r2 /* bend */ 3629958SmckusickLOOP1: 3729958Smckusick cmpb (r1), $32 /* if *b != space */ 3829958Smckusick jneq out1 /* then astring < bstring */ 3929958Smckusick incl r1 /* else continue */ 4029958Smckusick cmpl r1, r2 /* till bend */ 4129958Smckusick jlssu LOOP1 4229958Smckusick jbr out0 4329958Smckusick 4429958SmckusickLB: /* else */ 4529958Smckusick movl 16(fp), r2 /* compare according to lb */ 4629958Smckusick cmps3 4729958Smckusick jlss out1 /* if less return(0) */ 4829958Smckusick 4929958Smckusickout0: 5029958Smckusick clrl r0 5129958Smckusick ret 5229958Smckusickout1: 5329958Smckusick movl $1, r0 5429958Smckusick ret 55