From 0daf12c59aa8a6b9d996f56797b6f74c3aa0a738 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 29 Dec 2020 21:08:05 -0800 Subject: 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. --- baremetal/mu-init.subx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 baremetal/mu-init.subx (limited to 'baremetal/mu-init.subx') 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 +} -- cgit 1.4.1-2-gfad0