Commit | Line | Data |
---|---|---|
ca67e7b4 | 1 | # "@(#)l_ge_s.s 5.1 (Berkeley) 11/3/86" |
23ec3622 KM |
2 | |
3 | .data | |
4 | .text | |
5 | LL0:.align 1 | |
6 | .globl _l_ge | |
7 | .set MASK__,0x4 | |
8 | .data | |
9 | .text | |
10 | _l_ge:.word MASK__ | |
11 | movl 4(fp),r0 /* a */ | |
12 | movl 8(fp),r1 /* b */ | |
13 | cmpl 12(fp),16(fp) /* if (la <= lb) */ | |
14 | jgtr LB | |
15 | movl 12(fp), r2 /* compare according to la */ | |
16 | cmps3 | |
17 | jlss out0 /* if less return(0) */ | |
18 | jgtr out1 /* if greater return(1) */ | |
19 | ||
20 | cmpl 12(fp),16(fp) /* if (la == lb) */ | |
21 | jeql out1 /* then equal */ | |
22 | ||
23 | addl3 8(fp), 16(fp), r2 /* bend */ | |
24 | LOOP1: | |
25 | cmpb (r1), $32 /* if *b != space */ | |
26 | jneq out0 /* then astring < bstring */ | |
27 | incl r1 /* else continue */ | |
28 | cmpl r1, r2 /* till bend */ | |
29 | jlssu LOOP1 | |
30 | jbr out1 | |
31 | ||
32 | LB: /* else */ | |
33 | movl 16(fp), r2 /* compare according to lb */ | |
34 | cmps3 | |
35 | jlss out0 /* if less return(0) */ | |
36 | ||
37 | out1: | |
38 | movl $1, r0 | |
39 | ret | |
40 | out0: | |
41 | clrl r0 | |
42 | ret |