From b7fa1457727338416499d1b0144f1042a6878a97 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Mon, 18 Dec 2023 16:02:34 +0100 Subject: Add untracked files --- userland/libc/systemcall.s | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 userland/libc/systemcall.s (limited to 'userland/libc/systemcall.s') 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 -- cgit v1.2.3