mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-29 12:13:12 +03:00
5646ab62dc
git-svn-id: svn://kolibrios.org@1817 a494cfbc-eb01-0410-851d-a64ba20cac60
34 lines
436 B
C
34 lines
436 B
C
|
|
unsigned int seed_o = 0x45168297;
|
|
|
|
|
|
void srand (unsigned seed)
|
|
{
|
|
seed_o = seed;
|
|
}
|
|
|
|
|
|
int rand (void)
|
|
{
|
|
seed_o = seed_o * 0x15a4e35 + 1;
|
|
return(seed_o >> 16);
|
|
}
|
|
|
|
|
|
void* malloc(unsigned s)
|
|
{
|
|
asm ("int $0x40"::"a"(68), "b"(12), "c"(s) );
|
|
}
|
|
|
|
|
|
void free(void *p)
|
|
{
|
|
asm ("int $0x40"::"a"(68), "b"(13), "c"(p) );
|
|
}
|
|
|
|
|
|
void* realloc(void *p, unsigned s)
|
|
{
|
|
asm ("int $0x40"::"a"(68), "b"(12), "c"(p), "d"(s) );
|
|
}
|