Profiler May Generate "Unexpected Single Step" on 8086 w/8087

ID Number: Q73193

1.00

MS-DOS

Summary:

On an XT compatible PC (8086/8088 chip) with an 8087 math coprocessor,

the Microsoft Source Profiler version 1.0 may generate an "Unexpected

Single Step" error. This error is caused by a problem in the 8086/8088

hardware that was corrected in all later versions of the chip.

More Information:

This behavior may be seen when the profiler is attempting to single

step an instruction and a hardware exception occurs. One single step

will occur in the exception handler and another will occur when the

exception handler is complete. To avoid this problem, the profiler

masks all interrupts during the single step.

However, the coprocessor exception cannot be masked and, because the

8087 runs concurrently with the 8086, it is impossible to predict when

the coprocessor exception will occur.

A valid workaround is to disable the 8087 and force the use of the

floating-point emulator while profiling. Since the emulator functions

emulate the coprocessor in software, no hardware exception is

generated and the behavior is avoided. To disable the 8087, link with

one of the emulator libraries and set the NO87 environment variable to

a non-null string. For example:

SET NO87=Not Using 8087

Note that this results in the display of the message "Not Using 8087"

whenever the application is invoked.