Mail Archives: djgpp/2004/02/07/02:47:33
>> I should also mention, that I usually have a simple routine and a
commandline
>> switch which prints the attached sourcecode of these .exes.
>
>If you just want to print the sources (or any text file), use djgpp's
>bin2h program. That will turn the source into an includable .h file
>which you can use to print from.
no, it's for the potential user or email-friend who has got the
.exe from you and now wants to see its sourcecode.
>Any program that relies on extra data being "after the executable" is
>going to have problems with djgpp, because "the executable" is only 2k
>bytes long and the whole program is already attached after it! That's
>how we manage to run 32-bit programs in a 16-bit environment.
I have many programs with text attached and never observed
any problems.
I assume that the attached text isn't loaded, when the program
is executed. DOS/Windows looks for the length of the program
in the .exe header and then only loads to RAM the number of bytes
specified there, and ignores the rest.
So there can only be problems, if the program opens
the .exe files itself, (like my sourcecode-printing routine does)
e.g. for computing a checksum.
Maybe in that case (opening the file which is just being executed)
an error message or a warning should be displayed (unless I
suppress it).
- Raw text -