1. What will be the value of the TOP field in the x87 FPU Status Word after two
ID: 3680554 • Letter: 1
Question
1. What will be the value of the TOP field in the x87 FPU Status Word after two FLD instructions have been issued?
2. If the variable B contained a double value of 80386.0, and it was repetitively multiplied by itself, what status bit in the x87 FPU Status Word would eventually be set?
a. Overflow Exception Flag
b. Zero Divide Exception Flag
c. Denormalized Operand Exception Flag
d. Stack Fault
3. (True or False) If a mask bit in the x87 FPU Control Word is set to 1, the corresponding exception represented by a bit in the x87 FPU Status Word is prevented.
4. Which of the following will avoid stack faults in the x87 floating point unit?
a. Use the FSAVE instruction to preserve the environment.
b. Always match each FLD instruction with an FSTP instruction
c. Only use double precision floating point, not 80-bit floating point
d, None of these
5. Which instruction determines if the ST[0] value is infinity?
a. FLD
b. FISTP
c. FTST
d. FXAM
6. Which x87 register would you use to determine if ST(3) was zero?
a. x87 Control Register
b. x87 Status Register
c. x87 Tag Register
d. None of these
7. What does the following sequence of code do? Assume Die, Too, Are, AreToo, For, and Airy are doubles, Too contains 2.0, For contains 4.0, and the x87 is initialized to use the size of doubles.
FLD Die
FDIV Too
FST Are
FMUL Are
FSTP AreToo
FLDPI
FMUL AreToo
FMUL For
FSTP Airy
It is:
Explanation / Answer
ans1.
PROGRAMMING WiTH THE X87 FPU register number of the current top-of-stack register is stored in the TOP (stack TOP) field in thex87FPU status word. Load operations decrement TOP by one and load a value intothe new top-of-stack register, and store operations store the value from the current TOP register in memory and then increment TOP by one
ans2- a. Overflow Exception Flag
ans3-FAlse
ans4-C
ans5-a
Ans6-b
ans7-FLDdie
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.