Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!looking!brad From: brad@looking.UUCP Newsgroups: comp.sys.ibm.pc,comp.sys.intel Subject: Telling the difference between a 287 and a 387 cleanly? Message-ID: <1076@looking.UUCP> Date: Sun, 25-Oct-87 21:05:08 EST Article-I.D.: looking.1076 Posted: Sun Oct 25 21:05:08 1987 Date-Received: Tue, 27-Oct-87 06:45:49 EST Organization: Looking Glass Software, Waterloo Ont. Lines: 22 Xref: utgpu comp.sys.ibm.pc:8102 comp.sys.intel:346 I would like to know the cleanest method for (on a 386) telling the difference between the 80827 and 80387 math chips. So far I have thought of a few methods: 1) Assuming you know you have a 386, examine the CR0 register bit 4, which is the "387" bit. 2) Reset the processor (with output to I/O port) and examine the status word. The two processors supposedly differ on reset. 3) Execute a 387 instruction and see what happens. The problem with all three of these is that they could be highly hardware and OS dependent. For example, what will some of these do when in "virtual 8086" mode on a 386? We don't want to muck this up with funny traps etc. Is there an intel approved way to tell a 386 from 286 in virtual 8086 mode as well? Or will an attempt to set the IOPL flags work in that mode as it does in real mode? -- Brad Templeton, Looking Glass Software Ltd. - Waterloo, Ontario 519/884-7473