1. Engineering
  2. Computer Science
  3. procedure pyththeorem this procedure will use the pythagorean...

Question: procedure pyththeorem this procedure will use the pythagorean...

Question details

# Procedure: pythTheorem # This procedure will use the pythagorean Theorem to calculate the 3rd side of a triangle. # Parameters: # $a0 - Tl2is is a pointer to the variable holding side a. # $al -This is a pointer to the variable holding side b # $a2 - Tl2is is a pointer to the variable holding side c. # Return Value: None pythTheorem: addi $sp, $sp,4 sw şra, 0 (Ssp) # Load a and b into the coprocessor from memory #TODO #TODO # Now square both of the values. #TODO #TODO # Add the two variables #TODO# Now take the square root of the result. #TODO # store the result back into memory. #TODO lw Şra, 0 (sp) addi $sp, $sp, 4 jr $ra # Return from the procedure

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution