RAND (III)                   1/15/73                   RAND (III)





NAME            rand -- random number generator



SYNOPSIS        jsr pc,srand    /to initialize

                jsr pc,rand     /to get a random number



DESCRIPTION     The routine uses a multiplicative congruential

                random number generator to return successive

                pseudo-random numbers in r0 in the range from 1

                to 2^15-1.



                The generator is reinitialized by calling srand

                with 1 in r0.



                It can be set to a random starting point by call-

                ing srand with whatever you like in r0, for exam-

                ple the result left in r1 from sys time.



FILES           kept in /lib/liba.a



SEE ALSO        --



DIAGNOSTICS     --



BUGS            --



WARNING         The author of this routine has been writing

                random-number generators for many years and has

                never been known to write one that worked.