News for hackers. Stuff that matters.
Re:What's the difference between the com and exe extensions?... by ajdlinux on Saturday May 27, 2017 @12:57PM (#14430836)
IIRC, when the DOS/Windows shell needs to resolve "program" to either "program.com" or "program.exe", the .com file takes precedence - ISTR this being abused by malware once upon a time.
Re:What's the difference between the com and exe extensions?... by colejohnson66 on Saturday May 27, 2017 @02:37PM (#14431268)
I'm guessing it's because `example.com` comes before `example.exe` when you sort alphabetically? So when it goes looking for `example`, it gets the list of files and takes the first matching one it sees.
Re:What's the difference between the com and exe extensions?... by vram22 on Saturday May 27, 2017 @05:49PM (#14432119)
Or maybe because .COM format was invented before .EXE format (since .COM is simpler)? Just guessing.
Re:What's the difference between the com and exe extensions?... by int_19h on Sunday May 28, 2017 @01:51AM (#14433254)
See my reply in another branch.

https://news.ycombinator.com/item?id=14433246

Re:What's the difference between the com and exe extensions?... by colejohnson66 on Saturday May 27, 2017 @07:11PM (#14432362)
Maybe someone could disassemble DOS to find out why? Sounds like a project for me this weekend
Re:What's the difference between the com and exe extensions?... by lucb1e on Saturday May 27, 2017 @08:32PM (#14432596)
Iirc, MS-DOS is open source and in some museum now.
Re:What's the difference between the com and exe extensions?... by maxlybbert on Saturday May 27, 2017 @10:19PM (#14432852)
DOS 1.1 is available online from the Computer History Museum ( http://www.computerhistory.org/press/ms-source-code.html ). But I think that may be too early to be useful.
Re:What's the difference between the com and exe extensions?... by int_19h on Sunday May 28, 2017 @02:02AM (#14433281)
They also offer DOS 2.0.

But DOS had EXE, COM and BAT files since version 1.0.

Re:What's the difference between the com and exe extensions?... by maxlybbert on Sunday May 28, 2017 @02:13AM (#14433311)
Thank you.
Re:What's the difference between the com and exe extensions?... by int_19h on Sunday May 28, 2017 @01:51AM (#14433251)
It's not alphabetic, because the full order is COM, EXE, BAT - and if it were alphabetic, it would have been BAT, EXE, COM.