I am currently taking a computer organization and assembler course, which mainly uses the MIPS instruction set to teach assembler.
I noticed that many of the examples the professor posted on the Internet use add or addi to move the value of $ a0 to the case register to invoke print services, such as the following ...
# store the first integer in $a0 and print add $a0, $zero, $t0 li $v0, 1 syscall
or...
# store the first integer in $a0 and print addi $a0, $t0, 0 li $v0, 1 syscall
I also noticed some examples on the Internet where others simply use the move command to do the same as the following ...
# store the first integer in $a0 and print move $a0, $t0 li $v0, 1 syscall
Is the add or addi command used over the simple use of move in this scenario? If so, why? Is there a difference in performance or is it just a matter of taste?
Anthony jack
source share