Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 Unisoft-Cosmos; site sagan.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!qantel!dual!ptsfa!well!micropro!sagan!frank From: frank@sagan.UUCP (Frank Whaley) Newsgroups: net.micro.pc Subject: Re: "Official" 8087 presence test for IBM's Message-ID: <142@sagan.UUCP> Date: Wed, 18-Sep-85 16:25:30 EDT Article-I.D.: sagan.142 Posted: Wed Sep 18 16:25:30 1985 Date-Received: Fri, 20-Sep-85 05:47:40 EDT References: <16423@watmath.UUCP> Distribution: net Organization: MicroPro Int'l Corp., San Rafael, CA Lines: 50 Summary: "Official" Intel 8087/80287 presence test In article <16423@watmath.UUCP>, jmsellens@watmath.UUCP (John M Sellens) writes: > I got a note from IBM the other day, and figuring that it might be of > general interest, and that not everyone will have received a copy, > here is how to find out if a machine has an 80(2)87 installed: > int 11H > and ax,2 > jz no_coprocessor > What that means is that on return from an interrupt 11H, bit 1 of the > AX register (i.e. the bit next to the low order bit) will be set if > there is a co-processor installed (and the switches are set right on > the PC/XT/portable mother board). > John [ FLAME ON ] I too have received a copy of the memo from IBM (Independent Developer Relations) detailing a "technical note covering the determination of the presence of a math co-processor in an IBM Personal Computer." This "technical note" indicates that the Equipment Check Interrupt (INT 11H) should be used. "If bit 1 of the AX register is equal to 1 on return, a math co-processor is installed." Baloney. In the fine print IBM admits that "the user must have set the switch on the planar board properly per published instructions." So all the bit in question indicates is the position of the switch. Personally, I don't care about the position of a switch. Nor do I care to attach "equipment determination" code to manufacturer-specific interrupt routines. Instead, I will continue to use the software test: ndpcw DW (?) ; control word ; ; look for 8087 or 80287 co-processor ; FNINIT ; init if there XOR AH,AH ; stall for a bit MOV Byte Ptr ndpcw + 1,AH ; clear initial control word value FNSTCW ndpcw ; store control word CMP Byte Ptr ndpcw + 1,3 ; if equal, it's there Note that, should this routine "yield unreliable results", it is far more likely to fail than succeed, in which case we will use software to emulate the NDP. [ FLAME OFF ] -- frank ... Frank Whaley, MicroPro Product Development {dual,hplabs,glacier,lll-crg}!well!micropro!sagan!frank