tags:

views:

39

answers:

1

I don't have a syscall code in my MIPS instruction, however in the simulator I can see the following:

alt text

I don't have any of the following code line in my .s

li $v0 10
syscall

Why is that? It's bothering me as it gives me a bad address in the syscall

+2  A: 

It's a syscall used by the simulator to exit from the program (it gives control back to operating system), you can get a summary of available syscall of Spim here: link.

The simulator adds a bootstrap at the beginning and an end section at the end of your program. Since you specify which syscall to execute by loading the corresponding value in register $v0 that's what it actually does: set the syscall to be the exit one and the call it with syscall.

Jack