From: "Johnny Chan" To: Subject: How to browse thru all the Physical RAM installed Date: Tue, 28 Sep 1999 11:57:00 -0700 Message-ID: <000301bf09e3$3fa705c0$ae3d7a86@phoenix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Reply-To: djgpp AT delorie DOT com I am new in Protected mode programming. Here is my question: I want to know how to browse thru all the phyiscal RAM I had installed in the system. I am writing a diagnostic program in MSDOS using DJGPP and WDOSX to verify a network server device. This device requires anything from 500MB to 1GB of physical memory. I am trying to develop some software to hack on those physical memory to sniff the activities on the RAM. This is a controlled enviornment, no HIMEM nor EMM386. plain MSDOS. Somebody suggest me to use near ptr: if (__djgpp_nearptr_enable()) { x=(char *)(__djgpp_conventional_base); printf ("%.8lX\n", __djgpp_conventional_base); for (i=0; i<800000h; i++) // read first 8MB printf ("%X ", x[i]); __djgpp_nearptr_disable(); } I tried this code in my 16MB computer and __djgpp_conventional_base shows FFBFF3C1h. Anybody people know why it is FFBFF3C1h? I wonder if this really can access to the full 4GB RAM? Do you know any DOS-like 32bit debug.exe I can use? any sample code on this area? Also, I wonder how I can map all the RAM I have on the system (for example 2GB RAM) as the logical linear memory so that my program can access it using the near ptr? Finally, as we all known, there are IO.SYS, MSDOS.SYS, COMMAND.COM, drivers, and ther DPMI clients reside on the memory. where can I get the memory mapping directory? Anybody have sample code or suggestion on this? --jC