summaryrefslogtreecommitdiff
path: root/kernel/syscalls.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-10-20 18:54:18 +0200
committerMichal Idziorek <m.i@gmx.at>2014-10-20 18:54:18 +0200
commit813272cd88cc6c0a1dfbb121d2130fc849042c8a (patch)
tree61b8ede4a5c191c491621f0185d3a442ff5407dd /kernel/syscalls.c
parent2f6fe94d436347c4d886407dbfd44b6ac1aa41fa (diff)
1st userspace programm and partial newlib support!
Diffstat (limited to 'kernel/syscalls.c')
-rw-r--r--kernel/syscalls.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
new file mode 100644
index 0000000..bf875fd
--- /dev/null
+++ b/kernel/syscalls.c
@@ -0,0 +1,23 @@
+#define FOOLOS_MODULE_NAME "syscalls"
+#include "lib/logger/log.h"
+
+//
+void syscall_outbyte(char c)
+{
+ PutConsoleChar(c,0b1111111111000000);
+}
+
+int example_syscall(int x,int y)
+{
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"example syscall called with %d + %d",x,y);
+ return x+y;
+
+}
+
+int example_syscall_2(int x,int y)
+{
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"example syscall 2 called with %d - %d",x,y);
+ return x-y;
+}
+
+//