Question: b) Write a macro in assembly, tstMacro , that will compute the total surface area of a series of square pyramids and find some statistical
b) Write a macro in assembly, tstMacro, that will compute the total surface area of a series of square pyramids and find some statistical information. The formula for the total square surface area of a pyramid is:
totalAreas[i] = aSides[i] ( 2 x sSides[i] + aSides[i] )
Additionally, find the minimum, median, maximum, and average for the total surface areas array. The provided aSides[], is byte sized. The provided sSides[] array and the provided length are double-word sized. The totalAreas[] array, min, med, max, and ave are double-word sized variables of where to store the appropriate results. All data is unsigned. You may assume data is sorted (large to small) and the length is always even. Pay close attention to the data types! You may define additional variables, but must show the declaration(s). The macro will be invoked as follows:
tstMacro aSides, sSides, length, totalAreas, min, med, max, ave
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
