mips/lib/runtime.asm

31 lines
287 B
NASM

#
# MIPS32r6 ASSEMBLY RUNTIME
# - sets up the stack
# - calls main
# - exits
#
.extern main
.globl _start
.stack
.align 2
.space 4096
__mips_stack:
.text
.align 2
_start:
# setup stack
la $sp, __mips_stack
# call main
jal main
nop
# exit
move $a0, $v0
li $v0, 60
syscall