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_gt_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_gt 1929958Smckusick.set MASK__,0x4 2029958Smckusick.data 2129958Smckusick.text 2229958Smckusick_hl_gt:.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 jleq out0 /* if less or equal return(0) */ 3029958Smckusick jbr out1 /* else greater: return(1) */ 3129958Smckusick 3229958SmckusickLB: /* else */ 3329958Smckusick movl 16(fp), r2 /* compare according to lb */ 3429958Smckusick cmps3 3529958Smckusick jlss out0 /* if less return(0) */ 3629958Smckusick jgtr out1 /* if greater return(1) */ 3729958Smckusick 3829958Smckusick addl3 4(fp), 12(fp), r2 /* aend */ 3929958SmckusickLOOP2: 4029958Smckusick cmpb (r0), $32 /* if *a != space */ 4129958Smckusick jneq out1 /* then astring > bstring */ 4229958Smckusick incl r0 /* else continue */ 4329958Smckusick cmpl r0, r2 /* till aend */ 4429958Smckusick jlssu LOOP2 4529958Smckusickout0: 4629958Smckusick clrl r0 4729958Smckusick ret 4829958Smckusickout1: 4929958Smckusick movl $1, r0 /* else return(1) */ 5029958Smckusick ret 51