Question: Convert the following program to assembly. Test code checks it 1 2 void exercises_ex_2(void) { // To get rounding, Look at the remainder after dividing
Convert the following program to assembly. Test code checks it 1 2 void exercises_ex_2(void) { // To get rounding, Look at the remainder after dividing by 5. Round a remainder of u16_degrees_f = (116_degrees_c9)75+ (((u16_degrees_c*9)%5 + 1) >> 2) + 32; } // End. 3 4 Note: the formula above is formatted nicely in the Test code. For clarity, the variables u16_degrees_c and 116_degrees_+ are defined elsewhere so we can concentrate on the code Code .text 3} void exercises_ex_2(void) { |_exercises_ex_2: global exercises_ex_2 Write assembly which implements the given above. As discussed in introductions - An introduction to PIC24 assembly, do not use registers was in your code Instead, you must re-use registers. Plan carefully, since the multiply and divide instructions both produce a result that spans two registers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
