Hi, Volkan !
char random;
char rand(void)
{
char sum = 0;
if(random & 0x80)
sum = 1;
if(random & 0x20)
sum ^= 1;
if(random & 0x10)
sum ^= 1;
if(random & 0x04)
sum ^= 1;
random <<= 1;
random |= sum;
return(random);
}
void srand(char seed)
{
random = seed;
}
mfg robert
Lesezeichen