A lot of DOS programs using 32-bit CPUs would embed a "DOS extender" which would take care of the switch to 32-bit mode and needed translation of interrupts and device accesses, forming another layer of mini-OS on top of DOS while leaving the "launch application from DOS" flow unchanged to the user. Windows 3.1 also had Win32s which provided partial compatibility for 32-bit Windows applications, though that wasn't directly related.