Mail Archives: djgpp/1996/05/09/13:01:52
> " When your program runs under a DPMI host, hardware interrupts are
> always passed to protected mode first ... However, if the interrupts
> happen at a high frequency (say, more than 10 KHz), then the
> overhead of the interrupt reflection from real to protected mode might
> be too painful, and you might consider installing a real-mode interrupt
> handler in addition to the protected-mode one. "
>
> So, if I am in the protected mode with the DPMI host, why is it faster
> to switch to the realmode and get there the interrupt? Or don't I
> understand that properly.
The text is explaining that interrupts, in DOS, occur in REAL mode.
The DPMI server does some shuffling to pass the interrupt to you which
takes time. If you're using a fast machine, this may not be a
problem. Fast might be a 90MHz Pentium.
Your realmode interrupt handler would write to memory that the protect
mode code can see and then set a semaphore. Protect mode code waits
for data in a polling loop and does the rest of the magic.
- Raw text -