This file contains the random number generator for PwnOS.
The algorithm is known as the Mersenne Twister, or MT19937. See http://en.wikipedia.org/wiki/Mersenne_twister and http://www.math.sci.hiroshima-u.ac.jp- /~m-mat- /MT- /MT2002- /emt19937ar.html for details on the algorithm.
TODO: This needs mutual exclusion for multithreading.
| Random.asm | This file contains the random number generator for PwnOS. |
| Functions | |
| InitializeRandom | Initializes the RandomNumbers array based on the provided seed. |
| GetRandomNumber | Returns a uniformly-distributed random integer between 0 and 0FFFFFFFFh |
| GenerateRandom | Regenerates the RandomNumbers array after a pass though. |
| GetBoundedRandomNumber | Returns a uniformly-distributed random integer between 0 (inclusive) and eax (exclusive) |