Annotation of 43BSDTahoe/usr.lib/libF77/CCI/rindex_s.s, revision 1.1

1.1     ! root        1: #      "@(#)rindex_s.s 5.1 (Berkeley) 11/3/86"
        !             2: 
        !             3: .data
        !             4: .text
        !             5: LL0:.align     1
        !             6: .globl _rindex_
        !             7: .set MASK__,0x1c0c
        !             8: .data
        !             9: .text
        !            10: _rindex_: .word        MASK__
        !            11: 
        !            12:        movl    16(fp),r12      /* sublen */
        !            13:        tstl    r12             /* if sublen == 0 */
        !            14:        jeql    out0            /*   return(0L) */
        !            15: 
        !            16:        movl    4(fp), r11      /* str */
        !            17:        movl    8(fp), r10      /* substr */
        !            18:        addl3   r11, 12(fp), r3 /* p = str + strlen */
        !            19:        subl2   r12, r3         /* p -= sublen */
        !            20: loop:
        !            21:        cmpl    r3, r11         /* while (p >= str) */
        !            22:        jlss    out0            /* not found - return(0L) */
        !            23:        movl    r3, r0          /* current p (in str) */
        !            24:        movl    r10, r1         /* substr */
        !            25:        movl    r12, r2         /* sublen */
        !            26:        cmps3                   /* if strigs equal */
        !            27:        jeql    out             /* return index */
        !            28: 
        !            29:        decl    r3              /* p-- */
        !            30:        jbr     loop
        !            31: 
        !            32: out:
        !            33:        incl    r3              /* index = ++p - str */
        !            34:        subl3   r11, r3, r0
        !            35:        ret
        !            36: 
        !            37: out0:
        !            38:        clrl    r0
        !            39:        ret
        !            40: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.