about summary refs log tree commit diff stats
path: root/apps/ex1.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/ex1.mu')
-rw-r--r--apps/ex1.mu13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/ex1.mu b/apps/ex1.mu
new file mode 100644
index 00000000..f6d67001
--- /dev/null
+++ b/apps/ex1.mu
@@ -0,0 +1,13 @@
+# First example: return the answer to the Ultimate Question of Life, the
+# Universe, and Everything.
+#
+# To run:
+#   $ ./translate_mu apps/ex1.mu
+#   $ ./a.elf
+# Expected result:
+#   $ echo $?
+#   42
+
+fn main -> result/ebx: int {
+  result <- copy 0x2a  # Mu requires hexadecimal
+}