There’s an interesting (and quite annoying) bug specific to Windows 3.x running in 386 enhanced mode (also known as Windows/386) and using a PS/2 mouse. In some situations, the mouse may jump to the top or the bottom of the screen, especially when the system is somewhat unresponsive. The cause of the jumpiness turns out to be a subtle bug in VKD (Virtual Keyboard Device), a virtual device (VxD) which is part of Windows/386.
The way PS/2 mouse input is handled in Windows/386 is extraordinarily complex. The mouse driver (MOUSE.DRV) simply uses the BIOS INT 15h, sub-function C2h interface to register a mouse callback routine. The BIOS uses IRQ 12 and I/O ports 60h/64h to read data from the mouse. However, the VKD VxD inserts a whole new layer between the BIOS and the mouse hardware. Continue reading