72.5k views
0 votes
What does jalr $s do?

User Worthwelle
by
7.6k points

1 Answer

4 votes

Final answer:

JALR is a MIPS assembly language instruction used for jumping to an address stored in a register and linking the return address to a link register, commonly used for function calls.

Step-by-step explanation:

JALR (Jump and Link Register) is an instruction used in MIPS assembly language, which is a part of computer architecture and assembly language programming courses often found in computer science or computer engineering curricula. This instruction is used to jump to a specified address stored in a register. When executed, JALR will jump to the address contained in the register $s and at the same time save the address of the next instruction into the link register (which is usually $ra). This is very useful for implementing function calls in assembly since it allows the program to return to the point right after the function call, once the function execution is finished.

User Moussa Harajli
by
8.5k points