Index: arch/ia32/src/interrupt.c
===================================================================
--- arch/ia32/src/interrupt.c	(revision 81703f9a9703e68137c37b70a7833fc79132fa2f)
+++ arch/ia32/src/interrupt.c	(revision 204674ee3e573dfb433faf3ebf3f3faf43f34ed7)
@@ -28,4 +28,5 @@
 
 #include <arch/interrupt.h>
+#include <syscall/syscall.h>
 #include <print.h>
 #include <debug.h>
@@ -111,8 +112,12 @@
 }
 
-void syscall(int n, void *stack)
+void syscall(int n, void *st)
 {
-	printf("cpu%d: syscall\n", CPU->id);
-	thread_usleep(1000);
+	__native *stack = (__native *) st;
+	
+	if (stack[-2] < SYSCALL_END)
+		syscall_table[stack[-2]](stack[-5], stack[-3], stack[-4]);
+	else
+		panic("Undefined syscall %d", stack[-2]);
 }
 
Index: generic/include/syscall/syscall.h
===================================================================
--- generic/include/syscall/syscall.h	(revision 81703f9a9703e68137c37b70a7833fc79132fa2f)
+++ generic/include/syscall/syscall.h	(revision 204674ee3e573dfb433faf3ebf3f3faf43f34ed7)
@@ -30,4 +30,6 @@
 #define __SYSCALL_H__
 
+#include <typedefs.h>
+
 typedef enum {
 	SYS_CTL = 0,
@@ -39,5 +41,5 @@
 
 extern int sys_ctl(void);
-extern int sys_io(void);
+extern int sys_io(int fd, const void *buf, size_t count);
 
 extern syshandler_t syscall_table[SYSCALL_END];
Index: generic/src/syscall/syscall.c
===================================================================
--- generic/src/syscall/syscall.c	(revision 81703f9a9703e68137c37b70a7833fc79132fa2f)
+++ generic/src/syscall/syscall.c	(revision 204674ee3e573dfb433faf3ebf3f3faf43f34ed7)
@@ -27,12 +27,22 @@
  */
 
-#include <arch/types.h>
 #include <syscall/syscall.h>
+#include <print.h>
+#include <putchar.h>
 
 int sys_ctl(void) {
+	printf("SYS_CTL\n");
 	return 0;
 }
 
-int sys_io(void) {
+int sys_io(int fd, const void * buf, size_t count) {
+	
+	// TODO: buf sanity checks and a lot of other stuff ...
+
+	size_t i;
+	
+	for (i = 0; i < count; i++)
+		putchar(((char *) buf)[i]);
+	
 	return 0;
 }
