]> Pileus Git - ~andy/sfvlug/blobdiff - cc/source/syscall.c
Update C Compiling presentation.
[~andy/sfvlug] / cc / source / syscall.c
diff --git a/cc/source/syscall.c b/cc/source/syscall.c
new file mode 100644 (file)
index 0000000..63a2b58
--- /dev/null
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <sys/syscall.h>
+
+void _start()
+{
+       syscall(SYS_write, 0, "hello, world!\n", 14);
+       syscall(SYS_exit, 0);
+}