Description
This assignment is very similar to Lab 4 except that (1) it
uses floating-point instructions instead of integer instructions, and (2) the function used in Lab 4 to compute the
integer square root is no longer needed since you can use
the VSQRT.F32 instruction instead.
Create a single ARM Cortex-M4 assembly source code
file containing the four functions whose function prototype declarations appear below:
float Root1(float a, float b, float c) ;
Computes the root given by −𝑏+√𝐷𝑖𝑠𝑐𝑟𝑖𝑚𝑖𝑛𝑎𝑛𝑡(𝑎,𝑏,𝑐)
2𝑎
float Root2(float a, float b, float c) ;
Computes the root given by −𝑏−√𝐷𝑖𝑠𝑐𝑟𝑖𝑚𝑖𝑛𝑎𝑛𝑡(𝑎,𝑏,𝑐)
2𝑎
float Quadratic(float x, float a, float b, float c) ;
Computes the quadratic, 𝑎𝑥2 + 𝑏𝑥 + 𝑐
float Discriminant(float a, float b, float c) ;
Computes the value of the discriminant, 𝑏
2 − 4𝑎𝑐
Functions Root1 and Root2 should call this function.
These functions are called by a main program download from here. If your code is correct, the
display should look similar to the image shown, the sliders can be used to vary the coefficient
values, and pressing the blue pushbutton will restore the initial conditions. Otherwise, incorrect
return values will cause an error message to be displayed as white text on a red background and
the program will be halted.

