--- /dev/null
+/* Busy loop demonstrates the preemptive capabilites of MMURTL.\r
+ It doesn't go through the kernel and never sleeps. It is\r
+ a task that is ALWAYS ready to run.\r
+\r
+ It runs at the default priority of 25, and rest assured,\r
+ other higher priority tasks will receive messages and be\r
+ queued to run.\r
+\r
+ If you run it, you will have to use the CTRL-ALT-DELETE keys\r
+ to kill it.\r
+ To build, use MakeIt.bat, or use CM32 or DASM separately:\r
+ CM32 BusyLoop.c\r
+ DASM BusyLoop.atf\r
+*/\r
+\r
+#include <stdio.h>\r
+#include "\OSSource\Mtimer.h"\r
+#include "\OSSource\MJob.h"\r
+\r
+unsigned long tick;\r
+\r
+void main(void)\r
+{\r
+long i;\r
+ SetJobName("BusyLoop", 8);\r
+ Sleep(100); /* A small delay before we start eating CPU time */\r
+ while (1) \r
+ {\r
+ GetTimerTick(&tick);\r
+ printf("%d \r\n", tick);\r
+ i++;\r
+ }\r
+}\r