summaryrefslogtreecommitdiff
path: root/stage3/rng.c
blob: a52b449c0e715dd8f42227a6e65044ac4b944e68 (plain)
1
2
3
4
5
6
7
8
9
#include "rng.h"

int rand()
{
	static unsigned long int next = 1;

	next = next * 1103515245 + 12345;
	return (unsigned int) (next/65535) % 32768;
}