Date: Wed, 5 May 1999 09:38:40 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Rebecca cc: djgpp mailing Subject: Re: locking whole code In-Reply-To: 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 Tue, 4 May 1999, Rebecca wrote: > During interrupt handling I want to call some > functions which is written by somebody else ( GRX20 ) and I don't know > which other procedures it calls. I think I should lock the whole code ( > and only the code ) because it solves that I don't know the amount of > area to lock. So my question is. How can I lock the whole code? You need to lock all the data as well, because neither code nor data can be swapped in when you are in a real-mode callback. The way to do it is explained in the FAQ (sections 18.9 and 18.11): use the `_CRT0_FLAG_LOCK_MEMORY' bit in the `_crt0_startup_flags' variable.