DOS/32 Advanced DOS Extender - Programmer's Reference 2.50 - DPMI function 0E01h - Set Coprocessor Emulation Enables or disables the numeric coprocessor for this virtual machine and the reflection of coprocessor exceptions to the client.
In: | AX = 0E01h BX = coprocessor bits
Bit | Significance
0 new value of MPv bit for client's virtual CR0 | 0 = disable numeric coprocessor for this client 1 = enable numeric coprocessor for this client
1 new value of EMv bit for client's virtual CR0 | 0 = client will not supply coprocessor emulation 1 = client will supply coprocessor emulation
2-15 not applicable | reserved
Out: | if successful: CF clear if failed: CF set AX = error code 8026h - invalid request (client requested disabling coprocessor on a processor which does not support it)
Notes: a) 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. b) If the virtual EM (EMv) bit is set, the host delivers all coprocessor exceptions to the client, so that the client can provide 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 client is active, and reflects coprocessor not present faults (Int 7) to the client. c) Floating point emulation can be tested on a system with a numeric coprocessor by using this function to enable client handling of coprocessor exceptions and disable the coprocessor. d) The client should use DPMI function 0203h to register an exception handler for Coprocessor not Present faults (INT 07h) prior to setting the EMv bit with this function. e) A client can determine the CPU type with DPMI function 0400h and the presence or absence of a coprocessor with DPMI function 0E00h. The 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 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 © DOS/32 Advanced Team 1996-2002 All Rights Reserved