Date: Tue, 18 Feb 2003 09:11:40 +0200 From: Zaretskii Eli Subject: RE: Passing pointers to dpmi_int To: Paul Cousoulis , djgpp AT delorie DOT com Message-id: <4D19136444628A40840EFE8C5AE04147017A1C@ELTIMAIL1.elta.co.il> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-class: urn:content-classes:message Thread-topic: Passing pointers to dpmi_int Thread-index: AcLW3vYwxY204hIKQGiGjEejqoGrrAAPcodg X-PRIVAWALL-ID: 0002556710ab X-OriginalArrivalTime: 18 Feb 2003 07:11:52.0896 (UTC) FILETIME=[03496400:01C2D71D] Reply-To: djgpp AT delorie DOT com This message was scanned for viruses and other malicious code by PrivaWall. This mail was sent from ELTA SYS LTD. > From: Paul Cousoulis [mailto:paulcsouls AT worldnet DOT att DOT net] > Sent: Tuesday, February 18, 2003 1:35 AM > > I'm trying to implement the Virtual DMA Service. In order to lock DMA > memory I need to pass the address of a structure to int 4b in > es:di. The > physical address should be returned in dds_local, but I keep getting > zero even though the function seems to otherwise return successfully. > The code I'm using is: > > > > dr.x.dx = 0; > > dr.x.ax = 0x8103; > > temp = (int)(&dds_local); > > dr.x.es = (unsigned short)(temp>>16); > > dr.x.di = (unsigned short)(temp & 0xffff); > > if(__dpmi_int(0x4b,&dr)) printf("error\n"); Did you read section 18.13 of the DJGPP FAQ list? This message is processed by the PrivaWall Email Security Server.