Date: Sun, 3 Oct 1999 12:04:51 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Alex Mendes da Costa cc: djgpp AT delorie DOT com Subject: Re: More Assembly! In-Reply-To: <37F3FA6B.4B73AF3@virtualis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 1 Oct 1999, Alex Mendes da Costa wrote: > I understand pretty much what to do after reading through > the FAQ but the only bit I don't understand is the section which reads: > "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". > > How do I know which regions to lock and how much of these to lock? You need to lock the code of your handler, the code of any function your handler calls, and every variable this code uses. Every function that you lock is a separate region whose address is the address of the function and whose size is the size of function's code. Every variable is also a separate region. If your functions use the stack, you need to lock the part of the stack they use as well. Each region should be locked with a separate call to __dpmi_lock_linear_region.