Hello. Patrick J. LoPresti wrote: > By instrumenting the code a bit, I learned > that winnt.exe is attempting to invoke the pushfd and popfd > instructions (opcodes 0x9c and 0x9d, respectively), which > dosemu does not support. Good investigation but actually you are hacking the wrong place. These instructions are handled in handle_vm86_fault() which is in /usr/src/linux/arch/i386/kernel/vm86.c The attached patch must be a good start for fixing the problem. It is against the latest 2.4.19-pre-ac kernels and probably can't be applied to 2.4.18 because -ac tree have a lot of changes in vm86. > All winnt.exe is really doing is trying to determine whether the > processor is a 486 or higher. It does this by using pushfd and popfd > to attempt to alter the next-to-highest bit of the EFLAGS register. No, it tries to alter the AC flag which is a bit 2 of the higher word of eflags. But dosemu explicitly clears this flag because due to some unknown bugs it sometimes sets spuriously. grep the do_vm86.c for the string "BUG:" and comment the relevant code, then winnt.exe will work. > So, my question boils down to this: How can I modify the EFLAGS > register from within vm86_GP_fault()? If someone will tell me this, I > will submit a patch to add support for emulating the pushf/pushfd and > popf/popfd opcodes. Well, but this won't solve the AC problem...