
/*
 * This is my favorite tiny RNG, If you have a ZX81 you may recognise it :-)
 *								(RdeBath)
 */

static unsigned int sseed = 0;

int rand()
{
   return ( sseed = (((sseed+1L)*75L)%65537L)-1 ) & (((unsigned)-1)>>1);
   						/*  ^ AKA MAXINT */
}

void srand(seed)
unsigned int seed;
{
   sseed=seed;
}
