Description
Purpose: Learn to use arithmetic instructions, control instructions, compare instructions, and conditional jump instructions. Points: 80 Assignment: Write a simple assembly language program to calculate some geometric information for each rectangular solid (see diagram to the right). Specifically, the program will find the volume and surface area for each of the rectangular solid in a set of rectangular solids. Once the values are computed, the program should find the minimum, maximum, estimated median, sum, and average for the volumes and surface areas. volumes[ n] = lengths[n] × heights[ n] × widths[ n] surfaceAreas[ n] = 2 × lengths[ n] × widths[ n] + 2 × lengths[ n] × heights[ n] + 2 × widths[ n] × heights[n] Since the list is not sorted, we will estimate the median value. Since the list length is odd, the estimated median will be computed by summing the first, last, and middle values and then dividing by 3. Do not change the sizes/types of the provided data sets. All data is signed. As such, the IDIV/IMUL would be used (not DIV/MUL). Also, CDW/CWD/CDQ must be used (as they are for signed data). The JG/JGE/JL/JLE must be used (as they are for signed data). Of course, these are alternate dimension rectangular solids that allow negative dimensions. There is no provided main. Create the program source file based on the previous assignments. You may declare additional variables as needed. Hints: Pay close attention to the data types. The lengths[] array is double-word sized (4 bytes each), the widths[] array (2 bytes each) is word sized, the heights[] array (1 byte each) is byte sized, the volumes[] array is double-word sized and the the surfaceAreas[] array is double-word sized. Consider completing the volumes calculations before attempting the surface area calculations. Submission: • All source files must assemble and execute on Ubuntu with yasm. • Submit source files ◦ Submit a copy of the program source file via the on-line submission • Once you submit, the system will score the project and provide feedback. ◦ If you do not get full score, you can (and should) correct and resubmit. ◦ You can re-submit an unlimited number of times before the due date/time. • Late submissions will be accepted for a period of 24 hours after the due date/time for any given assignment. Late submissions will be subject to a ~2% reduction in points per an hour late. If you submit 1 minute – 1 hour late -2%, 1-2 hours late -4%, … , 23-24 hours late -50%. This means after 24 hours late submissions will receive an automatic 0. Program Header Block All source files must include your name, section number, assignment, NSHE number, and program description. The required format is as follows: ; Name: ; NSHE ID: ; Section: