call
Calls the subroutine at label, even when it is too far away for a single jump, and saves the return address in ra.
Forms
Operands
label- A named address in the program, such as the start of a loop or a variable in
.data.
# call saves the next instruction address (0x0040000c) in ra. link_marker is that skipped instruction; t2 ends at 1.
.text
li t2, 0
call done
link_marker:
addi t2, t2, 100
done:
addi t2, t2, 1