X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sat, 11 Mar 2006 09:53:11 -0500 Message-Id: <200603111453.k2BErBNn000441@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <002a01c644cd$45e6b5d0$36aebc3e@AMILO> (asal56@dsl.pipex.com) Subject: Re: Can you help? References: <002a01c644cd$45e6b5d0$36aebc3e AT AMILO> Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > So here's my question(s). If I were to use DJGPP, can I run the all > the code between disable() and enable() in PM? (I think this is > another way of asking if inp() in outp() can be used in PM without > needing to return to RM, isn't it?) Yes, if you use a non-paging DPMI server. I.e. you should pre-allocate your buffers and fill them with some data to ensure that they exist in RAM. Might want to play with csdpmi0, which doesn't support paging. Also, make sure you hook both RM and PM interrupt vectors, in the right order, so that your interrupts are handled with the smallest latency. > Secondly, the above code only works well when surrounded by the > disable() and enable() functions. I noted from some of your > documentation you have similar functions in PM. Is it acceptable to > run the loop for long periods with interrupts disabled in PM (and be > confident that won't be interrupted)? Sure, but don't run under Windows or they're emulated, meaning interrupts still happen elsewhere, they just don't happen to you. > Lastly, and if the answer to both of the above isn't "Yes", if I > have to keep switching from PM to RM and back, can I keep interrupts > disabled all the time, including thoughout the transitions between > the two modes? I'm not sure if the DPMI server is guaranteed to keep interrupts disabled in that case. It may need to, for example, go to disk for the real mode half.