Hans Lermen wrote:
>> Stas Sergeev did send me a patch that solve the problem.
> hmm, what patch are we talking about here?
I have posted a potential fix to Andreas and it works.
The explanation is that if we want to prevent calling int > 0xe0, we have
to do it for ax=0x300 and not for any other functions, where bl is undefined.
I don't have any app to test it so I can be wrong. It was just a quick look
to a dpmi ref. Below is this patch, if you want.
I have also other patches including some dpmi patches, but I am still
waiting for the next official pre-patch to appear on ftp before posting them
because if the changes from 1.0.2 would be merged, it will probably be
necessary for me to rediff my patches.

>> What is not solve is the problem that my clipper application uses 99% of cpu
>> time.
> this is normal. DOS thinks it owns the whole machine and 'waits' by
> loop-polling. With hogthreshold you can tune this a bit, but if your DOS
> application isn't looping at DOSEMU expected points (e.g. the BIOS),
> than you are lost.
This is true for hogthreshold because it tries to be smart and not to slow 
down the app.  But why can't we add another option that will push dosemu
periodically to sleep unconditionally and slow down the execution in favour
of saving a cpu power?

This patch was sent to Andreas:
-------------------------------------------
--- src/dosext/dpmi/dpmi.c      Sat Aug 11 02:59:46 2001
+++ src/dosext/dpmi/dpmi.c      Sat Aug 25 04:28:26 2001
@@ -1308,13 +1308,13 @@
       if (inumber==0x0300) {
        REG(cs) = ((us *) 0)[(_LO(bx) << 1) + 1];
        REG(eip) = ((us *) 0)[_LO(bx) << 1];
+        if ((_LO(bx) >= 0xe0) && (REG(cs) < 0xf000)) { /* avoid hardreboot !! */
+          D_printf("DPMI: Interrupt vector overwritten!");
+          leavedos(99);
+        }
       } else {
        REG(cs) = rmreg->cs;
        REG(eip) = (long) rmreg->ip;
-      }
-      if ((_LO(bx) >= 0xe0) && (REG(cs) < 0xf000)) { /* avoid hardreboot !! */
-        D_printf("DPMI: Interrupt vector overwritten!");
-        leavedos(99);
       }
       if (!(rmreg->sp==0)) {
        REG(ss) = rmreg->ss;
---------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to