www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/12/08:52:02

Date: Sun, 12 Jan 1997 15:24:44 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Help! __dpmi_lock_linear_region wont!
In-Reply-To: <Pine.SGI.3.91.970109173452.10525A-100000@chinook.physics.utoronto.ca>
Message-ID: <Pine.SUN.3.91.970112151639.7675S-100000@is>
MIME-Version: 1.0

On Thu, 9 Jan 1997, Peter Berdeklis wrote:

> I'm trying to lock some DOS memory for a real mode interrupt handler and a 
> bunch of DMA buffers, but every call to __dpmi_lock_linear_region returns 
> a -1.  Why?

AFAIK, DOS memory is always locked anyway.  So why do you want to lock 
it?

> vector_mem.handle = 0;	// should be don't care for this call, right?
> vector_mem.size = handler_size;
> vector_mem.address = real_mode_int_segment << 4;  // dos memory always in
> 						// paragraphs so offset=0,
> 						// right?
> 
> if( __dpmi_lock_linear_region( &vector_mem ) == -1 )
> 	exit(-1);	// region not locked, exit
> }

`real_mode_int_segment' isn't a valid protected-mode address (else you 
could just dereference it as a pointer, instead of the farptr, dosmemget 
and such, right?), that's why the call fails (I think).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019