JCL Help:Get8087StatusWord

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the 80x87 status word.


Pascal

 function Get8087StatusWord(ClearExceptions: Boolean): Word;


Parameters

Parameters Description
ClearExceptions: Boolean If True the function clears any pending floating point exceptions before returning the status word. If False the function does not clear pending exceptions (it's the difference between using FSTSW and FNSTSW).


Return Value

Returns the contents of the 80x87 status word.

Bit(s) Description
0 (IE) Invalid error such as stack overflow/underflow.
1 (DE) Denormalized error meaning at least one operand was denormalized.
2 (ZE) Zero error indicates the divisor was 0 while the dividend was non-zero or non-infinity.
3 (OE) Overflow error indicating the result of an operation was too large to be represented. If overflow error is masked a result of infinity was returned.
4 (UE) Underflow error indicating the result of an operation was too small to be represented.
5 (PE) Precision error indicating an operand or the result exceeds the selected precision.
6 (SF) Used in some newer coprocessors to denote overflow or underflow.
7 (ES) Error summary is set if any of the unmasked error bits is set.
8-10, 14 (C0-C2,C3) Condition code bits indicate certain conditions such as NAN. These are opcode dependent. See the Intel reference.
11-13 (TOP) Stack top pointer. Register which functions as top of stack, usually 0.
15 (B) Busy bit indicating the coprocessor is performing some task.


Description

Get8087StatusWord returns the 80x87 status word. This is the FPU's register that reflects it's overall status. The meaning of the individual bits are documented in the table below.


See Also

Set8087ControlWord Get8087ControlWord


About

Unit

Jcl8087


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page