Date: Tue, 13 Oct 1998 18:10:29 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Jay Tseng cc: "'djgpp AT delorie DOT com'" Subject: Re: help needed on DPMI and DOS extender In-Reply-To: <01BDF2E4.8F657C20@PLUM.engr.rendition.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 8 Oct 1998, Jay Tseng wrote: > I am writing C code which called DPMI service thru int386(31h,..) > to access local memory residing in the graphics card. The code is > compiled under gcc v2.01 without any switch except -o. General > Protection Fault happens when accessing local (graphic) memory, even > given the fact that I have mapped the local memory to system memory > using int386(31h,..). I think that the mapping did not do what it is > supposed to do since it needs DOS extender which I did not supply. IMHO, this approach is dead wrong. Even if it will eventually work, it is so much more complicated, and you will need to reinvent so many things that are already done for you, that it just isn't worth it. I suggest to toss everything and start anew. Begin by reading Chapter 18 of the DJGPP FAQ list (v2/faq211b.zip from the same place you get DJGPP), which explains a lot of background about low-level stuff, and includes explanation and code snippets that access memory-mapped devices and map them into your program's address space. If the material in the FAQ doesn't solve your problem, or is not clear enough, please ask specific questions about what it says. > * What's the difference between DPMI and go32-v2.exe? > * When to use them and how? For example, how can we invoke go32-v2, > from where to invoke it, can I link it with the c object codes, > and how DPMI is used? Forget about go32-v2, it has no bearing on your problem. It's just a diagnostic program (well, not really, but that's close enough). > * What kind of configuration settings in autoexec.bat and > config.sys are needed? Nothing special beyond the usual DJGPP setup. See the file README.1ST for detailed setup instructions. > Any other things that I should be aware of regarding the DOS > extender? There is no extender in DJGPP v2.