about summary refs log tree commit diff stats
path: root/baremetal/mu-init.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-29 21:08:05 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-29 21:08:05 -0800
commit0daf12c59aa8a6b9d996f56797b6f74c3aa0a738 (patch)
treef10222abdb7e7273cd6ff4974bd31280b808b645 /baremetal/mu-init.subx
parent63a247fcd4c7597c93e28fc92e489a7882ae2d7c (diff)
downloadmu-0daf12c59aa8a6b9d996f56797b6f74c3aa0a738.tar.gz
7469 - first working baremetal Mu program
It doesn't _quite_ do what it should, so this is more precisely the first
_buggy_ baremetal Mu program. But the tooling works, at least.
Diffstat (limited to 'baremetal/mu-init.subx')
-rw-r--r--baremetal/mu-init.subx17
1 files changed, 17 insertions, 0 deletions
diff --git a/baremetal/mu-init.subx b/baremetal/mu-init.subx
new file mode 100644
index 00000000..232b3b49
--- /dev/null
+++ b/baremetal/mu-init.subx
@@ -0,0 +1,17 @@
+# Initialize the minimal runtime for Mu programs.
+#
+# See translate_mu_baremetal for how this file is used.
+#
+# Mu baremetal programs start at a function called 'main' without inouts or outputs.
+
+== code
+
+# initialize stack
+bd/copy-to-ebp 0/imm32
+# no heap yet
+(main)
+
+# hang indefinitely
+{
+  eb/jump loop/disp8
+}