Hi,
First sorry for my poor English. I've found not a few nice random number generators, but I have a problem how to initiate it.
There is several good eggs, but:
1. RDTSC instruction, as I think it's very good, but it may be not allowed in CPL 3.
2. IN Acc, DX (i.e. DX=40hex) instruction, as I think it's very good, but it may be not allowed in CPL 3.
3. CALL QueryPerformanceCounter/QueryPerformanceFrequency (WinAPI), but if the installed hardware does not support a high-resolution performance counter, the return value is zero.
4. CALL GetTickCount, as I think is not so good.
What do you think of it? How is your own solution?
:confused:
First sorry for my poor English. I've found not a few nice random number generators, but I have a problem how to initiate it.
There is several good eggs, but:
1. RDTSC instruction, as I think it's very good, but it may be not allowed in CPL 3.
2. IN Acc, DX (i.e. DX=40hex) instruction, as I think it's very good, but it may be not allowed in CPL 3.
3. CALL QueryPerformanceCounter/QueryPerformanceFrequency (WinAPI), but if the installed hardware does not support a high-resolution performance counter, the return value is zero.
4. CALL GetTickCount, as I think is not so good.
What do you think of it? How is your own solution?
:confused:
I use GetTickCount and then I ROR/XOR/whatever the value some times. That's good enough for me :)
Im ror-ing too, this one is fully enought for me ( best result is about 17 clicks) i attached and old prog of mine to test my random functions.
BTW. if u realy wont something POwerfull u should serch for "WhizKid Technomagic" random number generator, His stuff is realy awsome.
BTW. if u realy wont something POwerfull u should serch for "WhizKid Technomagic" random number generator, His stuff is realy awsome.
Hi
If you're looking for something a little more sophisticated you might want to try the Park-Miller or Mersenne Twister algorithms, both are discussed here:
http://www.asmcommunity.net/board/showthread.php?threadid=11188&highlight=random+number
For API's you could also try UuidCreate, which creates a unique 128 bit identifier which can be used as a seed or "random" value.
Cheers,
Kayaker
If you're looking for something a little more sophisticated you might want to try the Park-Miller or Mersenne Twister algorithms, both are discussed here:
http://www.asmcommunity.net/board/showthread.php?threadid=11188&highlight=random+number
For API's you could also try UuidCreate, which creates a unique 128 bit identifier which can be used as a seed or "random" value.
Cheers,
Kayaker
MazeGen,
You can check this example:
http://www.asmcommunity.net/board/attachment.php?s=&postid=62842
You can check this example:
http://www.asmcommunity.net/board/attachment.php?s=&postid=62842
Thanks to all - I got it.