Commit | Line | Data |
---|---|---|
82492b51 KB |
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 | * | |
ad787160 C |
8 | * This module is believed to contain source code proprietary to AT&T. |
9 | * Use and redistribution is subject to the Berkeley Software License | |
10 | * Agreement and your Software Agreement with AT&T (Western Electric). | |
82492b51 KB |
11 | */ |
12 | ||
13 | #ifndef lint | |
ad787160 | 14 | .asciz "@(#)hl_le_s.s 5.2 (Berkeley) 4/12/91" |
82492b51 | 15 | #endif /* not lint */ |
23ec3622 KM |
16 | |
17 | .data | |
18 | .text | |
19 | LL0:.align 1 | |
20 | .globl _hl_le | |
21 | .set MASK__,0x4 | |
22 | .data | |
23 | .text | |
24 | _hl_le:.word MASK__ | |
25 | movl 4(fp),r0 /* a */ | |
26 | movl 8(fp),r1 /* b */ | |
27 | cmpl 12(fp),16(fp) /* if (la <= lb) */ | |
28 | jgtr LB | |
29 | movl 12(fp), r2 /* compare according to la */ | |
30 | cmps3 | |
31 | jleq out1 /* if less or equal return(1) */ | |
32 | jbr out0 /* else greater: return(0) */ | |
33 | ||
34 | LB: /* else */ | |
35 | movl 16(fp), r2 /* compare according to lb */ | |
36 | cmps3 | |
37 | jlss out1 /* if less return(1) */ | |
38 | jgtr out0 /* if greater return(0) */ | |
39 | ||
40 | addl3 4(fp), 12(fp), r2 /* aend */ | |
41 | LOOP2: | |
42 | cmpb (r0), $32 /* if *a != space */ | |
43 | jneq out0 /* then astring > bstring */ | |
44 | incl r0 /* else continue */ | |
45 | cmpl r0, r2 /* till aend */ | |
46 | jlssu LOOP2 | |
47 | out1: | |
48 | movl $1, r0 /* else return(1) */ | |
49 | ret | |
50 | out0: | |
51 | clrl r0 | |
52 | ret |