mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Add a sys$exit and make init_stage2 call it when finished.
This commit is contained in:
parent
79ffdb7205
commit
3a3c57357c
5 changed files with 35 additions and 3 deletions
|
@ -16,6 +16,7 @@ enum Function {
|
|||
PosixSeek = 0x1988,
|
||||
PosixKill = 0x1989,
|
||||
PosixGetuid = 0x1990,
|
||||
PosixExit = 0x1991,
|
||||
};
|
||||
|
||||
void initialize();
|
||||
|
@ -23,21 +24,21 @@ void initialize();
|
|||
inline DWORD invoke(DWORD function)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function));
|
||||
asm volatile("int $0x80":"=a"(result):"a"(function));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline DWORD invoke(DWORD function, DWORD arg1)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1));
|
||||
asm volatile("int $0x80":"=a"(result):"a"(function),"d"(arg1));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline DWORD invoke(DWORD function, DWORD arg1, DWORD arg2)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1),"c"(arg2));
|
||||
asm volatile("int $0x80":"=a"(result):"a"(function),"d"(arg1),"c"(arg2));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue