home *** CD-ROM | disk | FTP | other *** search
- {->>>>Is87There<<<<--------------------------------------------}
- { }
- { Filename: 87THERE.SRC -- Last modified 7/13/88 }
- { }
- { This routine detects the presence of a math coprocessor by }
- { attempting to initialize the coprocessor. If something }
- { meaningful comes back, the coprocessor is present. }
- { }
- { From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
- { Scott, Foresman & Co., Inc. 1988 ISBN 0-673-38355-5 }
- {--------------------------------------------------------------}
-
- FUNCTION Is87There : Boolean;
-
- VAR
- ControlWord : Word;
-
- BEGIN
- ControlWord := 0; { Clear control word storage to 0 }
- INLINE
- ($90/$DB/$E3/ { FNINIT }
- $90/$D9/$7E/<ControlWord); { FNSTCW ControlWord }
- IF Hi(ControlWord) = 0 THEN Is87There := False
- ELSE Is87There := True
- END;