|
|
1.1 root 1: .data
2: .text
3: LL0:.align 1
4: .globl _i_indx
5: .set MASK__, 0x1c0c
6: .data
7: .text
8: _i_indx: .word MASK__
9:
10: movl 4(fp), r3 /* s = a */
11: movl 8(fp), r10 /* b */
12: movl 16(fp), r12 /* lb */
13: addl3 r3, 12(fp), r11 /* end = a + la */
14: subl2 r12, r11 /* end -= lb */
15: loop:
16: cmpl r3, r11 /* while (s <= end) */
17: jgtr out0 /* not found - return(0) */
18: movl r3, r0 /* current s in string */
19: movl r10, r1 /* b */
20: movl r12, r2 /* lb */
21: cmps3 /* if strings equal */
22: jeql out /* return index */
23:
24: incl r3 /* s++ */
25: jbr loop
26:
27: out:
28: incl r3 /* index = ++s - a */
29: subl3 4(fp), r3, r0
30: ret
31:
32: out0:
33: clrl r0
34: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.