about summary refs log tree commit diff stats
path: root/tools/mu-init-minify.subx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mu-init-minify.subx')
-rw-r--r--tools/mu-init-minify.subx19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/mu-init-minify.subx b/tools/mu-init-minify.subx
new file mode 100644
index 00000000..f5425b4d
--- /dev/null
+++ b/tools/mu-init-minify.subx
@@ -0,0 +1,19 @@
+# Initialize the minimal runtime for Mu programs without any tests.
+#
+# See translate_min for how this file is used.
+#
+# Mu programs start at a function called 'main' with this signature:
+#   fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
+
+== code
+
+Entry:
+  # initialize stack
+  bd/copy-to-ebp 0/imm32
+  #
+  (main 0 0 Primary-bus-secondary-drive)
+
+  # hang indefinitely
+  {
+    eb/jump loop/disp8
+  }