Detecting Presence of 80x87 Math CoprocessorLast reviewed: July 17, 1997Article ID: Q38285 |
5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a | 1.00 1.50
MS-DOS | OS/2 | WINDOWSkbprg
The information in this article applies to:
SUMMARYThere is no direct way to query the Microsoft C floating-point libraries to determine whether a math coprocessor is being used. Compiling using /FPi indicates that you don't want to worry about whether a coprocessor is present. Consequently, the compiler generates code that will do the following:
MORE INFORMATIONIf you want to know whether a coprocessor is present, you'll have to test it yourself. For more information on how to test for the presence of an 80x87 coprocessor, please consult Intel's "80286 and 80287 Programmer's Reference Manual," pages 3-2 and 3-3 (in the second half of the book). This section is titled "System-Level Numeric Programming," and states that your program can detect the presence of the 80287 NPX. It then gives an assembly-language example that works correctly for both 8086- and 80286-based machines. You can use this routine in your program as follows:
|
Additional reference words: kbinf 1.00 1.50 5.10 6.00 6.00a 6.00ax 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |