From: j DOT aldrich6 AT genie DOT com Message-Id: <199604090252.AA121448338@relay1.geis.com> Date: Tue, 9 Apr 96 02:52:00 UTC 0000 To: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Subject: Paths and .COM files I have been considering writing a DOS version of Unix 'whence', and a couple of questions have cropped up. First: In what order does DOS examine a root filename for valid executable extensions? My experiments would suggest that it looks for .COM, followed by .EXE, and finally .BAT, but I'd like some confirmation. Second, is it possible for DJGPP to create .COM files? I think someone asked this before, but I don't remember the answer. During the above- mentioned experimentation, I tried compiling a sample 'Hello world' program as a .COM like so: gcc -o foo.com foo.c I was expecting gcc to pop out with an error, but it actually seemed to work. However, when I ran the program, it failed utterly. Actually, now that I think about it, gcc probably just created its usual coff image and just named it 'foo.com', which caused DOS to barf because it wasn't in the right format. Does anybody here know exactly what would be required to go about creating a .COM as opposed to an .EXE? Thanks, John