KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm currently taking a Computer Organization and Assembly Language course that mainly uses the MIPS instruction set to teach assembly language. I noticed that many of the examples that the professor has posted online use add or addi to move a value into the $a0 argument register for calling print services like 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've also noticed some examples online where others just use the move instruction to accomplish the same thing like the following... # store the first integer in $a0 and print move $a0, $t0 li $v0, 1 syscall Is using the add or addi instruction preferred over simply using move in this scenario? If so then why? Is there a performance difference or is this just a matter of taste?
Tags (comma-separated)
Save Edits
Cancel