URL
https://opencores.org/ocsvn/tcp_socket/tcp_socket/trunk
Subversion Repositories tcp_socket
[/] [tcp_socket/] [trunk/] [chips2/] [examples/] [stdlib.h] - Rev 4
Compare with Previous | Blame | View Log
const unsigned long RAND_MAX = 0xfffffffful; unsigned long int seed; void srand(unsigned long int s){ seed = s; } unsigned long rand(){ const unsigned long a = 1103515245ul; const unsigned long c = 12345ul; seed = (a*seed+c); return seed; }