X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sun, 8 Feb 2004 09:49:59 -0500 Message-Id: <200402081449.i18EnxTv025955@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <20040208012443.22711.00001133@mb-m19.aol.com> (sterten@aol.com) Subject: Re: attaching source code to the ececutable References: <200402071458 DOT i17EwZtr013586 AT envy DOT delorie DOT com> <20040208012443 DOT 22711 DOT 00001133 AT mb-m19 DOT aol DOT com> Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > >So include a command line option to print the includes source. > > are you saying, the source is included in the .exe by default ? No, I'm saying that *you* can include the sources into the exe. > Hmm, I could also put the source itself into a string and add it to > the source before compiling it. That's what bin2h does. > to be sure that I understand this correctly : > The exe-header of the executables always specify a length of 2048 bytes, > and only 2048 bytes of the program are loaded to RAM and then Yes. > eventually later the .exe-file is opened again and additional > code is loaded ? Not eventually, immediately. The 2048-byte program, when it runs, reads the exe and loads the rest of the program into memory and runs it. > So, e.g. can I switch directories from within > a DJGPP program or delete/rename/move/open the executable itself ? You can do that, yes. But by the time you do that, your program is already loaded and running. > >It does. That's how ALL djgpp programs work. DJGPP programs are > >*already* a program with data attached to it. So, you can't do what > >you want with DJGPP. > > like attaching additional data ? You can attach more data, but if you just read the EXE header and expect *your* data to follow it, you will find the DJGPP executable instead.