Question: Design a mixed assembler / C program with the following functionality. The assembler code starts the application and allocates an array of floating point numbers
Design a mixed assemblerC program with the following functionality. The assembler code starts the application and allocates an array of floating point numbers x x xn in ROM your choice of at least numbers This array and its length must be passed to a C function deviation that returns the standard deviation s of the numbers computed by the following formula
where x is the average of x x xn The return value of the function must be copied by the assembly code into a variable s allocated in RAM and displayed in terminal window.
Do not use any C library for the square root. Compute it by using NewtonRaphson algorithm.
The algorithm takes a positive real number a and accuracy e from the user's terminal input and computes the square root of a according to the following pseudocode:
Initialize xnew a do xold xnew; xnew xold a xold; while xold xnewxnew e
Note that floating point values are returned from C functions in the S register.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
