mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2025-09-12 13:37:45 -04:00

- Move source code from `trunk` into program root directory. - Fix build and ASM files. - Translated a few RU comments to en_US. - Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden. (Work towards #75, point 3) Reviewed-on: https://git.kolibrios.org/KolibriOS/kolibrios/pulls/244 Reviewed-by: Gleb Zaharov <risdeveau@codrs.ru> Reviewed-by: Burer <burer@kolibrios.org> Co-authored-by: Andrew <dent.ace@gmail.com> Co-committed-by: Andrew <dent.ace@gmail.com>
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) );
|
|
}
|