Mail Archives: djgpp/1999/03/04/19:46:41
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 -