www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/12/18:54:41

From: "Johnny Chan" <jchan AT paclink DOT net>
To: "'Eli Zaretskii'" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp AT Delorie DOT com>
Subject: RE: Q: Want to know the starting address and size of my program
Date: Tue, 12 Oct 1999 11:02:43 -0700
Message-ID: <000001bf14db$fc42e8e0$ae3d7a86@phoenix.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <Pine.SUN.3.91.991012095941.7576P-100000@is>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Eli,

>>-----Original Message-----
>>Please define ``starting address'' and ``size''.  
>>A program consists of several sections: 
>>there's code, there's data, there's the 
>>heap, and a few others.  
>>What exactly do you want to know, and for what purpose?

Actually, I am trying to do a FULL system memory scan and
read/write test. I want to know where the code starts and where
the data stays so that I can add some protection based on these
information and my program will not over write any code or
data or heap or others accidentially.

>>If you want to reach the loader from within a running DJGPP 
>>program, then you can't: its space is reused for the transfer 
>>buffer, after the loader has done its job.

What will happen if my program does some memory read/write test
on the memory area where is the loader located originally?

>>You can read this memory with dosmemget, but since it is used for the 
>>transfer buffer, you will get garbage: the startup code 
>>begins using the transfer buffer quite early, so by the time you get 
>>there, it's overwritten many times.

>>Nothing will happen.  But why do you need something like that?

>>It might help if you explain some more.  The above sounds as 
>>if you have already settled on some solution(s) to your problems, 
>>but you based the solution on incorrect assumptions.  
>>It might be a good idea to post a description of your original 
>>problems.  Then someone might come up with ideas about how to 
>>solve them.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019