From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Help X memory peek & poke? Date: Fri, 16 Jan 1998 19:36:10 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 31 Message-ID: <34BFFCFA.8F7@cs.com> References: <01bd2288$fc7589e0$45374b82 AT PCM-2 DOT iw DOT uni-hannover DOT de> NNTP-Posting-Host: ppp247.cs.com 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 Fadi Rifai wrote: > > How can memory space above 1M (32 bit address space) be accessed with > djgpp? An example how to peek & poke data would be very helpfull. If you are referring to allocated memory used by your program, then you don't need to use any special interface. Simply call malloc( 32 * 1024 * 1024 ) and play with the results. :-) The DPMI interface built into DJGPP transparently handles all aspects of memory management so that you can write statements like the above without any overhead whatsoever. If you want to access memory locations with fixed absolute addresses outside your program's address space, then you must use the DJGPP extensions designed for this purpose. Probably the best functions to use are the farpokeX()/farpeekX() functions, which you can look up in the DJGPP library reference ("info libc"). The DJGPP Frequently Asked Questions list contains a vast amount of information (too much to post here) on the topic of memory access in chapter 18. If you have a specific application in mind, please describe it in detail and we'll try to give you more specific advice. hth -- --------------------------------------------------------------------- | John M. Aldrich | "A committee is a life form with six | | aka Fighteer I | or more legs and no brain." | | mailto:fighteer AT cs DOT com | | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------