modulo in mips code example
Example: mips mod
mod_fcn:
li $t0, 4
div $a0, $t0 # i mod 4
mfhi $t1 # temp for mod
move $v0, $t1 # retrun moded num
jr $ra
mod_fcn:
li $t0, 4
div $a0, $t0 # i mod 4
mfhi $t1 # temp for mod
move $v0, $t1 # retrun moded num
jr $ra