Talk:COM file
From Wikipedia, the free encyclopedia
Contents |
[edit] Default path
I deleted the discussion of how the default path in UNIX helps prevent execution of maliciously named binaries in the current directory. While this is a similar problem, even if this were the case in MS-DOS it wouldn't fix the problem, since the COM file is usually placed in the same directory as the EXE file, in which case it would still find the COM file before the EXE file. It seems more appropriate for an article about paths and default search paths. Deco 19:21, 17 Apr 2005 (UTC)
[edit] Exactly how is a .COM binary a fat binary?
Would someone care to explain that? I am under the impression that a .COM file is just loaded to some segment as is and the operating system jumps to run it. I do not think that MS-DOS on PC has the ability of running fat .COM files, it is just so simple and dumb loading of the binary as possible. I do believe .EXE files can be fat binaries, since on Windows 3.11 the programs usually check if Windows is running or not, and there is many DOS device drivers which are .EXE files but still can be loaded like .SYS files, because the files have both properties of a program and a device driver structure implemented somehow. Those who know better can enlighten me.
- It isn't something done by the operating system; it's done by the COM file itself. The first few bytes have to be, simultaneously, valid x86 code and valid x80 code. For example, the utilities in the MYZ80 emulator start 0xEB 0x52 0xEB. An 8086 sees this as a jump and reads its next instruction from 0x0154; an 8080 goes straight through and reads its next instruction from 0x0103. A fully fat COM file would then include two copies of the rest of its code, one for CP/M and x80, and one for MS-DOS and x86. HungryHorace 11:43, 17 January 2006 (UTC)
[edit] Malicious Use and .COM vs .EXE
The section on Execution preference and its subsection Malicious use are not totally related. Execution preference contains an example of malicious use. The malicious use listed under Malicious use (having a COM file resemble a URL) does not really relate to Execution preference. I think this needs to be reorganized. Agree/disagree? Arun Philip 16:59, 30 January 2006 (UTC)
[edit] Command line arguments and COM files
There are no details on what the system puts in between 0x00 and 0xFF at program execution. It is reserved, but what does it contain? I have been told the command line parameters were stored in there somewhere. That information is seldom available on the internet tho. --88.170.36.239 (talk) 11:01, 28 March 2008 (UTC)

