diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-10-30 07:29:15 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-10-30 07:29:15 -0700 |
commit | 34f37b89447cfbffce7bd3e40164a35b13b5b347 (patch) | |
tree | 4cb9d38a86386c934e379c3558e0122ea7324e40 /tools/mu-init-minify.subx | |
parent | fb50fb081ad55129712da97cac187471b8c87b91 (diff) | |
download | mu-34f37b89447cfbffce7bd3e40164a35b13b5b347.tar.gz |
clean up treeshaking support for baremetal
Check minified sizes by running: tools/translate_minified _files_ ls -l a.bin qemu-system-i386 code.img What I had before was for the linux/ version.
Diffstat (limited to 'tools/mu-init-minify.subx')
-rw-r--r-- | tools/mu-init-minify.subx | 19 |
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 + } |