(Solved) : X86 Assembly Language Instructions Write Assembly Language Procedure Use Intel Floating Po Q42720370 . . .

x86 Assembly Language Instructions: Write an assembly language procedure that will use Intel floating-point instructions to p

x86 Assembly Language Instructions: Write an assembly language procedure that will use Intel floating-point instructions to perform the computations required to evaluate the distance formula (found in any algebra textbook). In other words, given the real number coordinates (Xı, yı) and (X2, y2) that represent two points on the x-y plane, compute the distance between the two points according to the equation d= [(x1 – x2)+(y1 – y2)). This procedure must be called from a high-level language main program (written in C, C++, Java, Pascal, Fortran, or any other high-level language approved by the instructor for which you have access to a compiler) which prompts the user for the values of the real numbers xl, yl, x2, and y2; passes these four values (as well as a pointer resultptr to the memory location used to return the result) to the procedure using the standard mechanism supported by the high-level language compiler (most likely through a stack frame); and (after the called procedure returns) displays the result (the Euclidean distance between the two points) computed by the assembly language procedure. Note that while most high-level languages return an integer value in the EAX register, in this case the calculated distance will be a real number. Therefore, the assembly procedure must use the supplied pointer (which will need to be set up to point to a float or double variable in memory) to store the result in memory such that it is accessible to the caller, which will then display the computed distance to the user. Show transcribed image text x86 Assembly Language Instructions: Write an assembly language procedure that will use Intel floating-point instructions to perform the computations required to evaluate the distance formula (found in any algebra textbook). In other words, given the real number coordinates (Xı, yı) and (X2, y2) that represent two points on the x-y plane, compute the distance between the two points according to the equation d= [(x1 – x2)+(y1 – y2)). This procedure must be called from a high-level language main program (written in C, C++, Java, Pascal, Fortran, or any other high-level language approved by the instructor for which you have access to a compiler) which prompts the user for the values of the real numbers xl, yl, x2, and y2; passes these four values (as well as a pointer resultptr to the memory location used to return the result) to the procedure using the standard mechanism supported by the high-level language compiler (most likely through a stack frame); and (after the called procedure returns) displays the result (the Euclidean distance between the two points) computed by the assembly language procedure. Note that while most high-level languages return an integer value in the EAX register, in this case the calculated distance will be a real number. Therefore, the assembly procedure must use the supplied pointer (which will need to be set up to point to a float or double variable in memory) to store the result in memory such that it is accessible to the caller, which will then display the computed distance to the user.

Expert Answer


Answer to x86 Assembly Language Instructions: Write an assembly language procedure that will use Intel floating-point instructions…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?