Review: j Review: j Instruction
1000 LOOP: slt $t0, $s1, $s2 # set $t0 to 1 if $s1 < $s2
1004 beq $t0, $zero, ENDLP # goto ENDLP if $t0 != 0, aka $s0 >= $s1
.
.
.
j LOOP
1032 ENDLP:
MIPS format for a j instruction:
?????? ??????????????????????????
opcode jump address (26 bits)
Calculating a new PC from a jump instruction:
addrToJumpTo = upper4BitsFromPC + (jumpAddress * 4)
Previous Slide Next Slide Alyce Brady, Kalamazoo College