Random numbers are pulled out of the R register. I think that R increments every line of code. When it gets to 80, it resets to 0. Not sure about that limit, 80, either, but go into vTI debugger, step through the code, and watch R. You'll figure it out.