move
Copies the contents of $t2 into $t1.
Used in
- The MIPS instruction setMIPS assembly
- Comparing two numbersMIPS assembly
- jal, jr, and the course calling conventionMIPS assembly
- syscall in the PlaygroundMIPS assembly
- Moving values aroundMIPS assembly
- Maximum and unsigned distanceMIPS assembly
- Byte length of a stringMIPS assembly
- Masks, shifts, popcount, and leading zeroesMIPS assembly
- A subroutine with its arguments in registersMIPS assembly
- Stack arguments and a stack frameMIPS assembly
Forms
Operands
$t1- Any general-purpose register,
$0to$31, using its numeric or named spelling, such as$8or$t0($zerois$0;$rais$31). $t2- A general-purpose register. It may be the same register as
$t1.
# Copy 7 from $t0. Inspect $t2: 7.
li $t0, 7
move $t2, $t0