If you want a guess a number game, (to the ten thousands). Then this post is for you! This relies on an asm() command called "rdtsc". Which is used for random numbers or time (shift eax to the left 32 times to do this). Here is the function:
unsigned short rand() {
unsigned short c; // We are going to set the value of eax to c after "rdtsc"
__asm__("rdtsc\n" : "=a" (c));
return c;
}
If you want a guess a number game, (to the ten thousands). Then this post is for you! This relies on an asm() command called "rdtsc". Which is used for random numbers or time (shift eax to the left 32 times to do this). Here is the function:
That is it!
I stand corrected lol.