Question: Write an assembly language program to find the maximum of y = 3x^4 - 10x^2 - 15x for the range -4 x 6, by stepping

 Write an assembly language program to find the maximum of y

Write an assembly language program to find the maximum of y = 3x^4 - 10x^2 - 15x for the range -4 x 6, by stepping one by one through the range. During each iteration, print out a message stating the current value of x and the corresponding value of y. After all iterations, print out a final message stating the max value of y and the corresponding value of x that generated XQM&. If there are multiple values of x that generate ymax, you only need to indicate one of them. Also, make sure to define the values of the coefficients 3, 10 and 15 as constants al,a2, and a3... the TA may change these values to further test your code. Try to eliminate as many nop instructions as possible and also try to minimize the length of your code. You may run the program using gdb to verify correctness. Make sure to pay-close attention to the requirements above. To print out the output, refer to the slides that correspond to printF slides on D2L.| Output Format: For input of x = -4, output y = 548 For input = -3, output y = *** ... ... For input of x = -3, output y = *** For input of x = 6, output y = *** The maximum output value is y = ***, when input x = *** The maximum output value is y = ***, when input x = *** 1. Follow the requirements as described above. Make sure to comment your code. 2. Name your source file 'lastnamcZ.m' and store it in your class account. [It is a .m file rather than file since you will have macro definitions.] nano compjute.m will create the buffer for you to enter your code. 3. To expand the macros and to create the .s assembly code file, run: m4 compute.m > computes,s 4. To compile your code and create the executable, run: gcc-o compute compute.s 5. Submit your code to D2L by deadline Write an assembly language program to find the maximum of y = 3x^4 - 10x^2 - 15x for the range -4 x 6, by stepping one by one through the range. During each iteration, print out a message stating the current value of x and the corresponding value of y. After all iterations, print out a final message stating the max value of y and the corresponding value of x that generated XQM&. If there are multiple values of x that generate ymax, you only need to indicate one of them. Also, make sure to define the values of the coefficients 3, 10 and 15 as constants al,a2, and a3... the TA may change these values to further test your code. Try to eliminate as many nop instructions as possible and also try to minimize the length of your code. You may run the program using gdb to verify correctness. Make sure to pay-close attention to the requirements above. To print out the output, refer to the slides that correspond to printF slides on D2L.| Output Format: For input of x = -4, output y = 548 For input = -3, output y = *** ... ... For input of x = -3, output y = *** For input of x = 6, output y = *** The maximum output value is y = ***, when input x = *** The maximum output value is y = ***, when input x = *** 1. Follow the requirements as described above. Make sure to comment your code. 2. Name your source file 'lastnamcZ.m' and store it in your class account. [It is a .m file rather than file since you will have macro definitions.] nano compjute.m will create the buffer for you to enter your code. 3. To expand the macros and to create the .s assembly code file, run: m4 compute.m > computes,s 4. To compile your code and create the executable, run: gcc-o compute compute.s 5. Submit your code to D2L by deadline

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!