DOS/32 Advanced DOS Extender - Programmer's Reference 2.49 - DPMI function 0E00h - Get Coprocessor Status Returns information about whether or not a numeric coprocessor exists, the type of coprocessor available (if any), and whether or not the host or client is providing coprocessor emulation.
In: | AX = 0E00h
Out: | if successful: CF clear AX = coprocessor status
Bit | Significance
0 MPv (MP bit in the virtual MSW/CR0) | 0 = numeric coprocessor is disabled for this client 1 = numeric coprocessor is enabled for this client
1 EMv (EM bit in the virtual MSW/CR0) | 0 = client is not emulating coprocessor instructions 1 = client is emulating coprocessor instructions
2 MPr (MP bit from the actual MSW/CR0) | 0 = numeric coprocessor is not present 1 = numeric coprocessor is present
3 EMr (EM bit from the actual MSW/CR0) | 0 = host is not emulating coprocessor instructions 1 = host is emulating coprocessor instructions
4-7 coprocessor type: | 00h = no coprocessor 01h = 8087 02h = 80287 03h = 80387 04h = 80486 with numeric coprocessor 05h = 80586 (Pentium) 06h = 80686 (Pentium Pro or Pentium II) 07h-0Fh reserved for future numeric processors
8-15 not applicable | reserved
if failed: CF set
Notes: a) If the real EM (EMr) bit is set, the host is supplying or is capable of supplying floating point emulation. b) If the MPv bit is not set, the host may not need to save the coprocessor state for this virtual machine to improve system performance. c) MPr bit setting should be consistent with the setting of coprocessor type information. Ignore MPr bit information if it is in conflict with the coprocessor type information. d) If the virtual EM (EMv) bit is set, the host delivers all coprocessor exceptions to the client, and the client is performing its own floating point emulation (whether or not a coprocessor is present or the host also has a floating point emulator). In other words, if the EMv bit is set, the host sets the EM bit in the real CR0 while the virtual machine is active, and reflects coprocessor not present faults (INT 07h) to the virtual machine. e) A client can determine the CPU type with DPMI function 0400h but a client should not draw any conclusions about the presence or absence of a coprocessor based on the CPU type alone. f) DOS/32 Advanced DPMI will not distinguish between 80387 and 80487 (80486 with built-in FPU). That is, if the CPU installed in machine is 80486SX, and an 80387 FPU is present, DOS/32 Advanced DPMI will report the presence of an 80487. g) DOS/32 Advanced DPMI does not have a built-in FPU emulator. That is, when client enables FPU emulation (using Set Coprocessor Emulation DPMI function 0E01h), but does not handle the exception 07h (Coprocessor not available), the first instruction executed by the CPU that uses FPU will cause exception 07h which will be trapped by DOS/32 Advanced which in its turn will terminate the client and return to DOS with an error message. Copyright © Supernar Systems, Ltd. 1996-2002 All Rights Reserved.