aboutsummaryrefslogtreecommitdiff
path: root/target/kos/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/kos/main.c')
-rw-r--r--target/kos/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/kos/main.c b/target/kos/main.c
new file mode 100644
index 0000000..7326b4f
--- /dev/null
+++ b/target/kos/main.c
@@ -0,0 +1,14 @@
+#include <knightos/display.h>
+#include <knightos/system.h>
+
+/* Warning! C support in KnightOS is highly experimental. Your mileage may vary. */
+
+void main() {
+ SCREEN *screen;
+ get_lcd_lock();
+ screen = screen_allocate();
+ screen_clear(screen);
+ draw_string(screen, 0, 0, "Hello world!");
+ screen_draw(screen);
+ while (1);
+}