On Sat, 15 Apr 2000, Josef Drexler wrote:
> On Sat, 15 Apr 2000, Bart Oldeman wrote:
> > The following patch fixes this for me: (but move the line containing
> > "esi,edi,ecx" behind "should use ")
> >
> > I hope I haven't looked over something in this quick patch.
>
> No, you haven't, it works perfectly. Thanks a lot!
Nice. I produced a new one which is a bit more elegant: it treats all int
variations and basically lets dosemu return to vm86 mode after a 0x66 in
this case, where upon the dos app invokes the int instruction which might
get trapped by dosemu in turn.
So it was eg (GP=general protection fault):
0x66 0xcd 0x10 -> GP -> do_int(0x10) -> next instruction
and now:
0x66 0xcd 0x10 -> GP -> 0xcd 0x10 -> GP -> do_int(0x10)
I'll have to let the DOSEMU team decide whether or which version of the
patch they would like to have.
BTW, (0xf1) int 1 is an "undocumented" instruction, but we know how
nicely behaved dos application are ;-)
Bart
diff -u dosemu-1.0.0-orig/src/emu-i386/do_vm86.c
dosemu-1.0.0/src/emu-i386/do_vm86.c
--- dosemu-1.0.0-orig/src/emu-i386/do_vm86.c Sun Mar 5 19:41:09 2000
+++ dosemu-1.0.0/src/emu-i386/do_vm86.c Sat Apr 15 23:33:25 2000
@@ -193,6 +193,13 @@
LWORD(eip) += (csp-lina);
switch (*csp) {
+
+ case 0xcc: /* int 3 */
+ case 0xcd: /* int */
+ case 0xce: /* into */
+ case 0xcf: /* iret */
+ case 0xf1: /* int 1 */
+ break;
case 0x6c: /* insb */
/* NOTE: ES can't be overwritten; prefixes 66,67 should use
esi,edi,ecx