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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Implementing Programming Languages Questions!