Annotation of cci/usr/src/lib/libc/compat-4.1/rand.c, revision 1.1

1.1     ! root        1: /* @(#)rand.c  4.1 (Berkeley) 12/21/80 */
        !             2: static long    randx = 1;
        !             3: 
        !             4: srand(x)
        !             5: unsigned x;
        !             6: {
        !             7:        randx = x;
        !             8: }
        !             9: 
        !            10: rand()
        !            11: {
        !            12:        register R12;           /* = r12 */
        !            13: 
        !            14:        R12 = randx;
        !            15:        asm ("  emul    $1103515245, r12, $12345, r0");
        !            16:        asm ("  movl    r1, r0");
        !            17:        asm ("  movl    r0, r12");
        !            18:        return ((randx = R12) & 0x7fffffff);
        !            19: 
        !            20: /*     return((randx = randx * 1103515245 + 12345) & 0x7fffffff); */
        !            21: }

unix.superglobalmegacorp.com

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