j
Jump
Jumps to label.
Used in
- if, else and jump tablesRISC-V assembly
- LoopsRISC-V assembly
- Arrays and stringsRISC-V assembly
- jal, ret and the calling conventionRISC-V assembly
- Floating point and the F and D extensionsRISC-V assembly
- The bitmap display and the keyboard registersRISC-V assembly
- When an instruction cannot be carried outRISC-V assembly
- The bigger of two numbersRISC-V assembly
- Length of a stringRISC-V assembly
- Reverse a string in placeRISC-V assembly
Forms
Operands
label- A named address in the program, such as the start of a loop or a variable in
.data.
# j transfers to done; the skipped instruction would add 100 to t2.
.text
li t2, 0
j done
addi t2, t2, 100
done:
addi t2, t2, 1
# t2=1 confirms the named transfer reached done.