From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Memory access Date: Thu, 05 Dec 1996 19:46:41 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 29 Message-ID: <32A79721.4E5F@cs.com> References: <19961205205800 DOT PAA05656 AT ladder01 DOT news DOT aol DOT com> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp211.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: isjolly AT aol DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp isjolly AT aol DOT com wrote: > > Hi, > > I need to access a binary file which has been loaded into memory. When > references to data is made in the code, using pointers to structures DJGPP > v2 exits without crashing with the error message: You can't do direct memory access under DJGPP because of PROTECTED mode. There are a number of ways to do it, however, besides just writing a pointer to a specific location. Please download the DJGPP Frequently Asked Questions list (v2/faq202b.zip) and read section 10.2 there. Also, what method are you using to load the file into memory? Some sample code might be nice. Finally, those numbers that DJGPP programs post when they crash are a stack traceback of the program. To find out exactly where your program crashed, make sure the dump is still on the screen, and type 'symify ', where is the name of your program. You can use the resulting information to trace what you did wrong. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------