Date: Sun, 3 Oct 1999 13:05:18 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Alex Mendes da Costa cc: djgpp AT delorie DOT com Subject: Re: Locking Memory In-Reply-To: <37F59194.8E0E36A6@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 Sat, 2 Oct 1999, Alex Mendes da Costa wrote: > 2. Now I don't understand this bit. It says call > __dpmi_lock_linear_region a series of times. But how do I know what > region I have to lock? I already answered this one in another thread where you asked about it. > 3. Then call __dpmi_set_protected_mode_interrupt_vector with _my_cs() > and my function offset. How do I get my function offset? The offset of a function is just its address cast to an unsigned long. Here's how to compute an offset of a hypothetical function my_func: unsigned long func_offset = (unsigned long)my_func; The offset of a variable is its address cast to an unsigned long: unsigned long var_offset = (unsigned long)&my_var;