I am getting this weird exception every time I run my program: "line 168: Runtime exception at 0x00400278: break instruction executed; no code given." line 168 is rem $s3,$s4,$t0 under findKey label. I have probably messed up something while I was trying to solve other issues with my code. If anyone could tell me what this exception means and what would be the best way to fix it I'd highly appreciate it.
Here is the part of my code i believe has the issue:
findKey:
rem $s3,$s4,$t0
jal loop
jr $ra
loop:
bge $t4,$t0,end1 #if counter = 10 exit loop
j l1 #Else go to L1
l1:
beqz $t3,l2 #if found = 0 continue searching (go to L2)
j end1 #else go to end1
l2:
addi $t4,$t4,1
addi $t5,$t5,4
#move $t7,$s7
lw $t7,($t5) # hash[position]
beq $t7,$s4,l3
j else
l3:
li $t3,1
j end1
else:
addi $s3,$s3,1
rem $s3,$s3,$t0
j loop
end1:
beq $t3,1,return1
#return
j return2
return1:
move $s2,$s3 #Print result
jr $ra
return2:
sw $s2,minus
jr $ra