From 813272cd88cc6c0a1dfbb121d2130fc849042c8a Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 20 Oct 2014 18:54:18 +0200 Subject: 1st userspace programm and partial newlib support! --- kernel/syscalls.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 kernel/syscalls.c (limited to 'kernel/syscalls.c') 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; +} + +// -- cgit v1.2.3