Code Smells of Desperation

In this web content, the author delves into the inner workings of WIN87EM.DLL, the math exception handler in the Windows 3.1 operating system. The author notes that WIN87EM.DLL is an x87 floating-point emulator and is responsible for intercepting math errors. The code in WIN87EM.DLL appears to have been written and rewritten multiple times, resulting in convoluted and seemingly nonsensical instructions. The author questions the usefulness of certain steps taken in the code, such as writing to I/O port F0h multiple times and executing FNCLEX twice. The author speculates that the code may be a desperate attempt to make things work or support faulty hardware. Overall, the math error interrupt handler in WIN87EM.DLL is described as confusing and unlikely to follow standard practices.

https://www.os2museum.com/wp/this-code-smells-of-desperation/

To top