Functions | |||
![]()  | ![]()  | void | initrand (UINT16 seed) NONBANKED | 
![]()  | ![]()  | Initalise the random number generator. More... | |
![]()  | ![]()  | INT8 | rand (void) BANKED | 
![]()  | ![]()  | Returns a random value. | |
![]()  | ![]()  | UINT16 | randw (void) BANKED | 
![]()  | ![]()  | Returns a random word. | |
![]()  | ![]()  | void | initarand (UINT16 seed) BANKED | 
![]()  | ![]()  | Random generator using the linear lagged additive method Note that 'initarand()' calls 'initrand()' with the same seed value, and uses 'rand()' to initialize the random generator. More... | |
![]()  | ![]()  | INT8 | arand (void) BANKED | 
![]()  | ![]()  | Generates a random number using the linear lagged additive method. | |
| void initrand (UINT16 seed) | 
Initalise the random number generator.
seed needs to be different each time, else the same sequence will be generated. A good source is the DIV register.
| void initarand (UINT16 seed) | 
Random generator using the linear lagged additive method Note that 'initarand()' calls 'initrand()' with the same seed value, and uses 'rand()' to initialize the random generator.
 1.0.0 written by Dimitri van Heesch,
 © 1997-1999