diff options
author | Anton Kling <anton@kling.gg> | 2023-12-18 16:02:34 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-12-18 16:02:34 +0100 |
commit | b7fa1457727338416499d1b0144f1042a6878a97 (patch) | |
tree | 3add0539a6afec94d1f1fdcd2f4200f21a84d776 /userland/libc/systemcall.s | |
parent | 43a72a1a5719039de5d7e347806aae163e30f17a (diff) |
Add untracked files
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 |