Question: 3. Set Rounding Modes (Requires knowledge of macros.) Write a macro that sets the FPU rounding mode. The single input parameter is a two-letter code:
3. Set Rounding Modes
(Requires knowledge of macros.) Write a macro that sets the FPU rounding mode. The single input parameter is a two-letter code:
• RE: Round to nearest even
• RD: Round down toward negative infinity
• RU: Round up toward positive infinity
• RZ: Round toward zero (truncate)
Sample macro calls (case should not matter):
mRound Re mRound rd mRound RU mRound rZ Write a short test program that uses the FIST (store integer) instruction to test each of the possible rounding modes.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
