about summary refs log tree commit diff stats
path: root/console.mu
diff options
context:
space:
mode:
Diffstat (limited to 'console.mu')
-rw-r--r--console.mu14
1 files changed, 14 insertions, 0 deletions
diff --git a/console.mu b/console.mu
new file mode 100644
index 00000000..4e6c10a5
--- /dev/null
+++ b/console.mu
@@ -0,0 +1,14 @@
+# example program: reading events from keyboard or mouse
+#
+# Keeps printing 'a' until you press a key or click on the mouse.
+
+recipe main [
+  switch-to-display
+  {
+    _, found?:boolean <- check-for-interaction
+    break-if found?:boolean
+    print-character-to-display 97:literal, 7:literal/white
+    loop
+  }
+  return-to-console
+]