Mail Archives: djgpp/2000/10/20/15:00:16
> Since I've already replaced ISR of timer interrupt by my own, therefore I
> suppose DPMI can't do anything behind my back. Am I right? please tell me
> if I'm actually wrong.
If you are running a non-ring-0 DPMI provider, it needs to swap stacks for
you when a hardware interrupt happens - so it actually messes with the
interrupts too. If you run a ring-0 provider without stack swaps you could
replace the ISRs without worrying too much. I can't say for sure if the
ring swapping code would work with auto EOI.
> Turning on auto-EOI is not just so stright forward in DJGPP. I suscepts that
> the ICW2 (Vector base address?) is not 0x08h as usually should be set to.
This is correct. This interrupt range interferes with exceptions which have
the same values, and in some cases are very difficult to tell exceptions from
hardware interrupts. Each DPMI provider usually revectors to a higher point.
The DPMI spec allows the revector point to be returned - but almost all
providers lie about revectoring and then just try to fix up the calls.
> Every time after I set up the 8259, the program crash immediately, no matter
> whether I set or clear the auto-EOI bit. Please give me a help if anybody
> can.
I suggest you download the sources for CWSDPMI and look at them, if you
want to run in regular DOS. The source for PMODE is also available.
> Another factor that prevents me from further increase the data rate, is that
> it seems when you issue EOI by writing 20h to 8259, the DPMI will thinks
> that the protect mode ISR fails, it then switch to real mode and call the
> real mode ISR routine. I read this from the README of PCTIME14 program.
Read the source of exphdlr.c instead. This isn't what happens in
CWSDPMI or PMODE.
> I've
> varified this by hooking both real mode and protect mode ISRs. I haven't
> chainned the real mode ISR as PCTIME14 do, but the real mode routine
> really can affect the output!! I think except using Auto-EOI, there should
> be another method to prevent DPMI from calling the real mode ISR? isn't it?
> Please tell me the method, if this is not a bug.
If you do the following:
1) Hook the PM interrupt, don't chain, and
2) Either never leave PM (don't call any interrupts) or replace the RM
interrupt of one of your own you should be OK.
Since you need maximum speed, I suggest you pick a DOS DPMI provider like
CWSDPR0 or PMODE and grab the source and look at what happens in detail.
- Raw text -