diff --git a/app/example1/CMakeLists.txt b/app/example1/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ce37977f5ff5993c97b144fc61cc68151ffeedf3
--- /dev/null
+++ b/app/example1/CMakeLists.txt
@@ -0,0 +1,7 @@
+DOSEK_BINARY(
+  NAME example1
+  SYSTEM_DESC system.oil
+  LIBS libtest
+  TEST_ISO
+  example1.cc
+)
diff --git a/app/example1/example1.cc b/app/example1/example1.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0e1d4368e2acbaf6bce3c3db282a0d1750701187
--- /dev/null
+++ b/app/example1/example1.cc
@@ -0,0 +1,49 @@
+/**
+ * @defgroup apps Applications
+ * @brief The applications...
+ */
+
+/**
+ * @file
+ * @ingroup apps
+ * @brief Just a simple test application
+ */
+#include "os.h"
+#include "test/test.h"
+#include "machine.h"
+
+DeclareTask(TaskA);
+DeclareTask(TaskB);
+DeclareTask(TaskC);
+
+TEST_MAKE_OS_MAIN( StartOS(0) );
+
+int readData() {
+	return 42;
+}
+
+char buf[2];
+
+TASK(TaskA) {
+	int val = readData();
+	if (val == '\n') {
+		buf[1] = '\n';
+		ActivateTask(TaskB);
+	}
+	buf[0] = (char)val;
+	TerminateTask();
+}
+
+TASK(TaskB) {
+	kout << "TaskB: " << buf << endl;
+	TerminateTask();
+}
+
+TASK(TaskC) {
+	kout << "task c" << endl;
+	TerminateTask();
+}
+
+void PreIdleHook() {
+	ShutdownMachine();
+}
diff --git a/app/example1/system.oil b/app/example1/system.oil
new file mode 100644
index 0000000000000000000000000000000000000000..63f370ecde4179df0334368dd429e56cde797603
--- /dev/null
+++ b/app/example1/system.oil
@@ -0,0 +1,35 @@
+CPU TestSystem {
+
+    OS TestSystem {
+        STATUS = STANDARD;
+        ERRORHOOK = FALSE;
+        STARTUPHOOK = FALSE;
+        SHUTDOWNHOOK = FALSE;
+        PRETASKHOOK = FALSE;
+        POSTTASKHOOK = FALSE;
+    };
+
+    TASK TaskA {
+        SCHEDULE = FULL;
+        PRIORITY = 0;
+        ACTIVATION = 1;
+        AUTOSTART = TRUE;
+    };
+
+    TASK TaskB {
+        SCHEDULE = FULL;
+        PRIORITY = 10;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+    TASK TaskC {
+        SCHEDULE = FULL;
+        PRIORITY = 1;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+
+};
+
diff --git a/app/example2/CMakeLists.txt b/app/example2/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4ebad91fb038707e15818c922ecbffdd9f04a16b
--- /dev/null
+++ b/app/example2/CMakeLists.txt
@@ -0,0 +1,7 @@
+DOSEK_BINARY(
+  NAME example2
+  SYSTEM_DESC system.oil
+  LIBS libtest
+  TEST_ISO
+  example2.cc
+)
diff --git a/app/example2/example2.cc b/app/example2/example2.cc
new file mode 100644
index 0000000000000000000000000000000000000000..152b46f74daa79c5b74e41e424beb3aa25c56d90
--- /dev/null
+++ b/app/example2/example2.cc
@@ -0,0 +1,51 @@
+/**
+ * @defgroup apps Applications
+ * @brief The applications...
+ */
+
+/**
+ * @file
+ * @ingroup apps
+ * @brief Just a simple test application
+ */
+#include "os.h"
+#include "test/test.h"
+#include "machine.h"
+
+DeclareTask(TaskA);
+DeclareTask(TaskB);
+DeclareTask(TaskC);
+
+TEST_MAKE_OS_MAIN( StartOS(0) );
+
+int readData() {
+	return 42;
+}
+
+TASK(TaskA) {
+	int val = readData();
+	if (val == 42) {
+		ActivateTask(TaskB);
+	} else {
+		ActivateTask(TaskB);
+	}
+
+	for (val = 0; val < 2; val++) {
+		ActivateTask(TaskC);
+	}
+	TerminateTask();
+}
+
+TASK(TaskB) {
+	kout << "TaskB" << endl;
+	TerminateTask();
+}
+
+TASK(TaskC) {
+	kout << "task c" << endl;
+	TerminateTask();
+}
+
+void PreIdleHook() {
+	ShutdownMachine();
+}
diff --git a/app/example2/system.oil b/app/example2/system.oil
new file mode 100644
index 0000000000000000000000000000000000000000..63f370ecde4179df0334368dd429e56cde797603
--- /dev/null
+++ b/app/example2/system.oil
@@ -0,0 +1,35 @@
+CPU TestSystem {
+
+    OS TestSystem {
+        STATUS = STANDARD;
+        ERRORHOOK = FALSE;
+        STARTUPHOOK = FALSE;
+        SHUTDOWNHOOK = FALSE;
+        PRETASKHOOK = FALSE;
+        POSTTASKHOOK = FALSE;
+    };
+
+    TASK TaskA {
+        SCHEDULE = FULL;
+        PRIORITY = 0;
+        ACTIVATION = 1;
+        AUTOSTART = TRUE;
+    };
+
+    TASK TaskB {
+        SCHEDULE = FULL;
+        PRIORITY = 10;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+    TASK TaskC {
+        SCHEDULE = FULL;
+        PRIORITY = 1;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+
+};
+
diff --git a/app/example3/CMakeLists.txt b/app/example3/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..5d8b2dfc2d4325a01be5405f57d9049a280e2435
--- /dev/null
+++ b/app/example3/CMakeLists.txt
@@ -0,0 +1,8 @@
+DOSEK_BINARY(
+  NAME example3
+  SYSTEM_DESC system.oil
+  LIBS libtest
+  TEST_ISO
+  example3.cc 
+)
+
diff --git a/app/example3/example3.cc b/app/example3/example3.cc
new file mode 100644
index 0000000000000000000000000000000000000000..499548378b5c66f90e1f88a4c25e6fe837d9e308
--- /dev/null
+++ b/app/example3/example3.cc
@@ -0,0 +1,56 @@
+/**
+ * @defgroup apps Applications
+ * @brief The applications...
+ */
+
+/**
+ * @file
+ * @ingroup apps
+ * @brief Just a simple test application
+ */
+#include "os.h"
+#include "test/test.h"
+
+
+DeclareTask(Handler11);
+DeclareTask(Handler12);
+DeclareTask(Handler13);
+
+TEST_MAKE_OS_MAIN( StartOS(0) )
+
+int a = 0;
+
+extern "C" void bar() {
+	test_trace('b');
+	ActivateTask(Handler13);
+}
+
+TASK(Handler11) {
+	a++;
+	if (a > 3) {
+		test_trace('1');
+		bar();
+	}
+	test_trace('C');
+	ChainTask(Handler13);
+}
+
+TASK(Handler12) {
+	test_trace('2');
+	ChainTask(Handler11);
+}
+
+TASK(Handler13) {
+	test_trace('3');
+	if (a < 5)
+		ActivateTask(Handler12);
+	Machine::nop();
+	TerminateTask();
+}
+
+void PreIdleHook() {
+	/* The testcase has finished, check the output */
+	test_trace_assert("C32C32C321b3C321b3C3");
+	test_finish();
+	ShutdownMachine();
+}
diff --git a/app/example3/system.oil b/app/example3/system.oil
new file mode 100644
index 0000000000000000000000000000000000000000..762091f4bcfab812999901ae2af27602fd06e4a6
--- /dev/null
+++ b/app/example3/system.oil
@@ -0,0 +1,35 @@
+CPU TestSystem {
+
+    OS TestSystem {
+        STATUS = STANDARD;
+        ERRORHOOK = FALSE;
+        STARTUPHOOK = FALSE;
+        SHUTDOWNHOOK = FALSE;
+        PRETASKHOOK = FALSE;
+        POSTTASKHOOK = FALSE;
+    };
+
+    TASK Handler11 {
+        SCHEDULE = FULL;
+        PRIORITY = 4;
+        ACTIVATION = 1;
+        AUTOSTART = TRUE;
+    };
+
+    TASK Handler12 {
+        SCHEDULE = FULL;
+        PRIORITY = 3;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+    TASK Handler13 {
+        SCHEDULE = FULL;
+        PRIORITY = 5;
+        ACTIVATION = 1;
+        AUTOSTART = FALSE;
+    };
+
+
+};
+