www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/04/19:46:41

Sender: nate AT cartsys DOT com
Message-ID: <36DF285A.4580EEA9@cartsys.com>
Date: Thu, 04 Mar 1999 16:42:02 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.1 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: BASH as default DOS shell under Windows 98?
References: <Pine DOT GSO DOT 3 DOT 95 DOT 990303220311 DOT 25226A-100000 AT holyrood DOT ed DOT ac DOT uk> <7bl4kq$r29$1 AT oak DOT prod DOT itd DOT earthlink DOT net> <36de423b DOT 261027328 AT news DOT cso DOT uiuc DOT edu> <mvparvia DOT 920579623 AT snakemail DOT hut DOT fi>
Reply-To: djgpp AT delorie DOT com

Mikko V.I. Parviainen wrote:
> 
> [On copying bash.exe as command.com]
> locke AT mcs DOT net (Peter Johnson) writes:
> >Um.. that would be a BAD idea.   Considering that command.com is NOT
> >an .exe file (.coms and .exes are loaded differently by DOS).
> 
> Actually, I have the impression that command.com has been an exe file
> since at least MS-DOS 5.0. DOS determines the type of an executable
> from its internal structure, not file system name.
> 
> If I recall correctly, one could run a file with any name as an
> .exe-file, if only all relevant data is in the right place.

AFAIK command.com will only try to execute *.com and *.exe files. 
However, DOS's internal spawn function doesn't care, and will happily
execute any file you tell it.  If it lacks the MZ magic, it's assumed to
be .com; loaded and JMP seg:0100...
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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