From f0cd2e91bb3276ffef3a4cd0c86cb55cedd60274 Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:14:33 +0200 Subject: [PATCH] Mon 14 Oct 23:14:00 CEST 2024 --- library/syscall.S | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 library/syscall.S diff --git a/library/syscall.S b/library/syscall.S new file mode 100644 index 0000000..b4676ee --- /dev/null +++ b/library/syscall.S @@ -0,0 +1,29 @@ +# Copyright (C) 2015 The University of Notre Dame +# This software is distributed under the GNU General Public License. +# See the file LICENSE for details. + + .global syscall +syscall: + pushl %ebp + movl %esp,%ebp + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + pushl %edi + movl 8(%ebp), %eax + movl 12(%ebp), %ebx + movl 16(%ebp), %ecx + movl 20(%ebp), %edx + movl 24(%ebp), %esi + movl 28(%ebp), %edi + int $48 + popl %edi + popl %esi + popl %edx + popl %ecx + popl %ebx + addl $4,%esp + leave + ret