Setting Breakpoints with Labels in SPIM ======================================= To use a label to set a breakpoint in SPIM, this label must be defined as a global label. To do that, prepend the following at the top of your code. If the following is your program: #start of your .s file bar: addiu $v0, $0, 0 slt $t0, $a0, $0 beq $t0, $0, cont neg $a0, $a0 addiu $a0, $a0, 1 cont: move $t0, $a0 move $t1, $a0 loop: beq $t0, $0, done addu $v0, $v0, $t1 addiu $t0, $t0, -1 b loop done: jr $ra # end of your .s file If you want to set a breakpoint at bar and loop, then modify your code as follows: #start of your .s file .text # marks the start of your code .globl bar # declares bar as a global label .globl loop # declares loop as a global label bar: addiu $v0, $0, 0 slt $t0, $a0, $0 beq $t0, $0, cont neg $a0, $a0 addiu $a0, $a0, 1 cont: move $t0, $a0 move $t1, $a0 loop: beq $t0, $0, done addu $v0, $v0, $t1 addiu $t0, $t0, -1 b loop done: jr $ra # end of your .s file By adding those lines as above, you can now just enter "breakpoint bar" or "breakpoint loop" into SPIM's console and now SPIM will stop when it reaches those labels when executing your code.