From 9f16b032d38613ca95e321e1d1e652c43129c68b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 15 Aug 2020 17:42:36 +0200 Subject: Added libgui --- lib/sys.c | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 lib/sys.c (limited to 'lib/sys.c') diff --git a/lib/sys.c b/lib/sys.c deleted file mode 100644 index d676445..0000000 --- a/lib/sys.c +++ /dev/null @@ -1,57 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner -// Syscall implementation - -#include - -/** - * Definitions - */ - -int sys0(enum sys num) -{ - int a; - __asm__ volatile("int $0x80" : "=a"(a) : "0"(num)); - return a; -} - -int sys1(enum sys num, int d1) -{ - int a; - __asm__ volatile("int $0x80" : "=a"(a) : "0"(num), "b"((int)d1)); - return a; -} - -int sys2(enum sys num, int d1, int d2) -{ - int a; - __asm__ volatile("int $0x80" : "=a"(a) : "0"(num), "b"((int)d1), "c"((int)d2)); - return a; -} - -int sys3(enum sys num, int d1, int d2, int d3) -{ - int a; - __asm__ volatile("int $0x80" - : "=a"(a) - : "0"(num), "b"((int)d1), "c"((int)d2), "d"((int)d3)); - return a; -} - -int sys4(enum sys num, int d1, int d2, int d3, int d4) -{ - int a; - __asm__ volatile("int $0x80" - : "=a"(a) - : "0"(num), "b"((int)d1), "c"((int)d2), "d"((int)d3), "S"((int)d4)); - return a; -} - -int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5) -{ - int a; - __asm__ volatile("int $0x80" - : "=a"(a) - : "0"(num), "b"((int)d1), "c"((int)d2), "d"((int)d3), "S"((int)d4), - "D"((int)d5)); - return a; -} -- cgit v1.2.3