www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/19/10:34:02

Newsgroups: comp.os.msdos.djgpp
From: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>
Subject: Re: .COM's with DJGPP?
Sender: usenet AT fys DOT ruu DOT nl (News system Tijgertje)
Message-ID: <353A6BA8.4980@stud.warande.ruu.nl>
Date: Sun, 19 Apr 1998 21:24:56 GMT
References: <35379F0B DOT 6F79F86F AT indigo DOT ie> <3537F565 DOT 3C1CCCA2 AT a DOT crl DOT com> <3538D4C4 DOT 6919240 AT lr DOT net> <3538F4EF DOT A11E233D AT a DOT crl DOT com> <01bd6a50$8a708600$3048a5c6 AT technoid> <35395468 DOT F8F390B2 AT a DOT crl DOT com> <3537A575 DOT 1485 AT cam DOT org> <35395E48 DOT AAC5849E AT a DOT crl DOT com> <3537B99A DOT 6460 AT cam DOT org>
Mime-Version: 1.0
Organization: Organz Are Private
Lines: 30
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Vic wrote:
> 
> Weiqi Gao wrote:
> > Oh-oh, intellegent life detected!
> 
> :) he he
> 
> > > renaming the exe to com will NOT crash the computer.
> > > Why don't you try for yourselves? It's THAT easy. It works on my machine
> > > anyways.
> >
> > But why?
> 
> I think the win95 loader scans the file, it no longet looks at the
> extention. I think it looks for the EXE header, and if it doesn't find
> it, it assumes it's a com. Just relying on the extention would be stupid
> (but we ARE talking about microsoft)

Even under plain DOS the extension COM or EXE makes no difference. DOS
checks to see if the magic string "MZ" is present; then it treats the
program as an executable, otherwise it loads it as a COM file ( 1
segment, code + data must be less than 64K  -- tiny model for old Turbo
C users).
BTW 4dos.com, ndos.com and some other similar command interpreters are
actually EXE's in disguise :-)

Cheers,
-- 
------------ Elliott Oti ---------------
   ------------- http://www.fys.ruu.nl/~oti  ---------

- Raw text -


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