00001 00007 /* Embedded XINU, Copyright (C) 2007. All rights reserved. */ 00008 00009 static unsigned long randx = 1; 00010 00015 void srand(unsigned long x) 00016 { 00017 randx = x; 00018 } 00019 00024 unsigned long rand(void) 00025 { 00026 return (((randx = randx*1103515245 + 12345)>>16) & 077777); 00027 }