Description
Topics: Floating-point instructions
Prerequisite Reading: Chapters 1-9
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.

