Jump anywhere: Difference between revisions

Content added Content deleted
Line 1,969: Line 1,969:
* &nbsp; <code>jalr $NN,0xNNNNNNNN</code> sets the program counter equal to <code>0xNNNNNNNN</code> and moves the old program counter plus 8 into register <code>$NN</code>.
* &nbsp; <code>jalr $NN,0xNNNNNNNN</code> sets the program counter equal to <code>0xNNNNNNNN</code> and moves the old program counter plus 8 into register <code>$NN</code>.


Most of the time you won't be jumping to a specific address. You can place a label before any instruction, and a jump to that label is the same as a jump to the address of that instruction.


Most of the time you won't be jumping to a specific address. You can place a label before any instruction, and a jump to that label is the same as a jump to the address of that instruction.


<lang mips>j GoHere
<lang mips>j GoHere