From 49af3bfc627331f33efed10804db63687a1ddd7a Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 22 Sep 2024 23:39:22 -0400 Subject: multitude of mld fixes, add entrypoint --- lib/runtime.asm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/runtime.asm (limited to 'lib/runtime.asm') diff --git a/lib/runtime.asm b/lib/runtime.asm new file mode 100644 index 0000000..5cb4458 --- /dev/null +++ b/lib/runtime.asm @@ -0,0 +1,29 @@ +# +# MIPS32r6 ASSEMBLY RUNTIME +# - sets up the stack +# - calls main +# - exits +# + +.extern main + +.stack +.align 2 + +.space 4096 +__mips_stack: + +.text +.align 2 + +_start: + # setup stack + la $sp, __mips_stack + + # call main + jal main + + # exit + move $a0, $v0 + li $v0, 1 + syscall -- cgit v1.2.3-freya