Message-ID: <19991002115023.6605.rocketmail@web1404.mail.yahoo.com> Date: Sat, 2 Oct 1999 04:50:23 -0700 (PDT) From: Prashant TR Subject: Re: Locking Memory To: djgpp AT delorie DOT com Cc: alexmdc AT virtualis DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: djgpp AT delorie DOT com --- Alex Mendes da Costa wrote: > "Lock all the memory your handler touches and the > code of the handler > itself and any function it calls with a series of > calls to > __dpmi_lock_linear_region". Locking is to prevent your code or data from being paged. If your program starts paging when you're inside an interrupt handler, especially this one with IRQ1 (the 2nd highest proority), your program would lock up. This is because your hard disk will use IRQ14/15 which has a lower prority. This means that you can't access your hard disk, which of course means that your program crashes. You can get the linear address you want to lock by adding __djgpp_base_address and the offset of the function you want to lock. If you wanted to lock the assembly function "foo()", I would use the code _go32_dpmi_lock_code(foo, 1234); where 1234 is the size of my interrupt handler. See the help in RHIDE. Use the above function rather than direct dealing with DPMI. Its much easier. --- Prashant TR http://www.members.tripod.com/prashant_tr/ ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com