From: Chris Frolik Newsgroups: comp.os.msdos.djgpp Subject: Real-mode pointers in real-mode interrupt Date: Wed, 27 Aug 1997 22:16:49 -0500 Organization: IndyNet - Indys Internet Gateway (info AT indy DOT net) Lines: 28 Message-ID: <3404EDA1.6C7F@indy.net> NNTP-Posting-Host: ip72-57.ts.indy.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have a question which I believe is beyond the scope of the FAQ, as I have read through the relevant sections. What I am asking may not be possible in DJGPP or protected mode, but if anyone knows how, I'd be grateful if they gave me some hints on how to do this. My problem is using real-mode pointers in a real-mode interrupt. Basically, I am writing a library for IPX in DJGPP, and it requires the use of interrupt 0x7A, which is hooked by the packet driver. If I could, I'd just re-write the interrupt, but since that isn't possible, I have to use it as it is. Here is what I am trying to do: I have a structure (S) which holds (among other things) a pointer to more data (P). The interrupt requires that ES:SI points to this structure. I can do this using __dpmi_int just fine. The problem here is with the pointer (P) inside that struct (S). Interrupt 0x7A expects that this will be a real-mode pointer to more data, but of course I don't think it is possible to get the segment:offset of a pointer or variable in DJGPP. So, I thought about doing what the FAQ says -- placing my data in conventional memory. I can put the struct (S) there and have the ES:SI in the _dpmi_regs struct point to this conventional memory. But, it is not enough just to put my struct in conventional memory, because the pointer in that struct still points to something in DJGPP's flat address space. Since the interrupt expects this to be a real-mode pointer, and the FAQ says that conventional memory uses only 20-bit addresses, I am stuck. If anyone knows how I can get this to work, please let me know. Thanks, -Chris