Gets a 32-bit pseudo-random number using Marsaglia’s XOR-shift algorithm (using a 32-bits state)
u32 cpct_getRandom_mxor_u32 ();
call cpct_getRandom_mxor_u32_asm
<u32> | Next 32-bits pseudo-random value. |
This function uses cpct_nextRandom_mxor_u32 to produce a sequence of 32-bits pseudo-random numbers. It uses cpct_mxor32_seed to store the last returned random 32-bits value: this is required to produce the next value in the sequence.
To know more about how these 32-bits numbers are produced, check cpct_nextRandom_mxor_u32 documentation.
AF, BC, DE, HL
57 bytes divided in,
Case | microSecs (us) | CPU Cycles ----------------------------------------- Any | 67 | 268 -----------------------------------------
Contains the 32-bits seed for Marsaglia’s XOR-shift random number generator.
_cpct_mxor32_seed:: .dw #0x1A7B, #0x59F2