diff options
Diffstat (limited to 'userland/libc/systemcall.s')
-rw-r--r-- | userland/libc/systemcall.s | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/userland/libc/systemcall.s b/userland/libc/systemcall.s new file mode 100644 index 0000000..51b00ec --- /dev/null +++ b/userland/libc/systemcall.s @@ -0,0 +1,28 @@ +.global syscall +.global s_syscall +syscall: + push %ebp + mov %esp,%ebp + push %edi + push %esi + push %ebx + mov 0x1C(%ebp), %edi + mov 0x18(%ebp), %esi + mov 0x14(%ebp), %edx + mov 0x10(%ebp), %ecx + mov 0xc(%ebp), %ebx + mov 0x8(%ebp), %eax + int $0x80 + pop %ebx + pop %esi + pop %edi + leave + ret + +s_syscall: + push %ebp + mov %esp,%ebp + movl 0x8(%ebp), %eax + int $0x80 + leave + ret |