What is the role of syscall instruction in MIPS?
The syscall is used to request a service from the kernel. For MIPS, the service number/code must be passed in $v0 and arguments are passed in a few of the other designated registers. For example, to print we might do:
li $v0, 1
add $a0, $t0, $zero
syscall
In this case, 1 is the service code for print integer. The second instruction effectively performs a copy from $t0 to $a0 which is the designated register where the argument is held ( in this case, the integer to be printed ). A list of the services and corresponding arguments is given: http://courses.missouristate.edu/KenVollmar/Mars/Help/SyscallHelp.html