delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/09/13:01:52

From: elf AT netcom DOT com (Marc Singer)
Message-Id: <199605091643.JAA15512@netcom8.netcom.com>
Subject: Re: How to program DMA
To: Schuster AT eev DOT e-technik DOT uni-erlangen DOT de (Michael Schuster)
Date: Thu, 9 May 1996 09:43:51 -0700 (PDT)
Cc: djgpp AT delorie DOT com (DJGPP List Alias)
In-Reply-To: <1C660601A1@merlin2.e-technik.uni-erlangen.de> from "Michael Schuster" at May 9, 96 02:00:19 pm
MIME-Version: 1.0

> "  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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019