Question: 4. Write a MIPS function named block to find the volume and surface area of a right rectangular prism (i.e. a cube for which the
4. Write a MIPS function named block to find the volume and surface area of a right rectangular prism (i.e. a cube for which the angles are all 90, but the edges may ha
ve different lengths). The API is shown below: ################## Begin function block ### Find the volume and surface area of a right rectangular prism ### The three edge lengths, length, width, and height are given ### in registers $a0, $a1, and $a2, respectively. ### The volume should be returned in register $v0. ### The surface area should be returned in register $v1 ### Pre: The results will be small enough to fit in general ### registers. ### Author: .text block: Use the MIPS mult instruction for multiplication.
4. Write a MIPS function named 'block' to find the volume and surface area of a right rectangular prism (i.e. a cube for which the angles are all 90 , but the edges may have different lengths). The API is shown below: \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# Begin function block \#\#\# Find the volume and surface area of a right rectangular prism \#\#\# The three edge lengths, length, width, and height are given ### in registers $a0, $a1, and $a2, respectively. \#\#\# The volume should be returned in register \$v0. \#\#\# The surface area should be returned in register $v1 \#\#\# Pre: The results will be small enough to fit in general \#\#\# registers. \#\#\# Author : block: Use the MIPS mult instruction for multiplication
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
