Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site digi-g.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!stolaf!umn-cs!digi-g!deg
From: deg@digi-g.UUCP (Dan Germann)
Newsgroups: net.micro.pc
Subject: Re: Detection of the Math Co-processor
Message-ID: <253@digi-g.UUCP>
Date: Wed, 26-Sep-84 21:19:15 EDT
Article-I.D.: digi-g.253
Posted: Wed Sep 26 21:19:15 1984
Date-Received: Fri, 28-Sep-84 06:26:24 EDT
References: <206@gitpyr.UUCP> <404@intelca.UUCP>, <227@gitpyr.UUCP>
Organization: DigiGraphic Systems Corp., Mpls.  MN
Lines: 22

It should be possible to determine if a coprocessor is resident by executing
an instruction that changes the state of something that the 8088 can access.
One instruction that would work is a store.  The 8087 manual specifies
the maximum execution time for each 8087 instruction, so it should be easy
to compute a value for a timing loop.  Since the initial contents of the
8087's registers are undefined, it probably would be a good idea to load
something into the register before it is stored:

	FNINIT
	
	FNLD1
	
	FNSTP	
; At this point, you can see whether the 8087 stored something into ;
. Make sure that your assembler doesn't put a WAIT opcode in front of the 8087 instructions. There are probably shorter code sequences that would give the same results.