From c742be9c738c91703a7be787639cad167de3a6b1 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 17 Aug 2018 02:28:02 +0200 Subject: started reviving my fool os --- userspace/sys/syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'userspace/sys/syscalls.c') diff --git a/userspace/sys/syscalls.c b/userspace/sys/syscalls.c index c3ff909..10e035c 100644 --- a/userspace/sys/syscalls.c +++ b/userspace/sys/syscalls.c @@ -4,16 +4,16 @@ extern char **environ; //struct _reent *_impure_ptr; // generic syscall interface! -int syscall(int call, int p1, int p2, int p3) + +int __attribute__ ((noinline)) syscall(int call, int p1, int p2, int p3) { int ebx; // will hold return value; + // select syscall and pass params asm("pusha"); - // select syscall asm("mov %0, %%eax"::"m"(call)); - // pass params asm("mov %0,%%edx"::"m"(p1)); asm("mov %0,%%ecx"::"m"(p2)); asm("mov %0,%%ebx"::"m"(p3)); -- cgit v1.2.3