here's explained difference between .COM and .EXE - http://blogs.msdn.com/b/oldnewthing/arc ... 32730.aspx
But when I open a .COM file with a text editor all of them starts with "MZ"
Only these .COM commands are left in x64 systems - chcp.com;diskcomp.com;diskcopy.com;format.com;mode.com;more.com;tree.com
(i.e. missing command.com,edit.com,graftabl.com,win.com ...) but at the moment I have no x32 system to compare them.
I assume that only the listed above were possible for porting to .EXE but the extensions were left for compatibility.
Are the .com files in x64 systems really .com files?
Moderator: DosItHelp
Re: Are the .com files in x64 systems really .com files?
If you mean the following, then the answer is "No", i fear:
"Are the .com files in x64 systems really executable files containing raw 16 bit machine code?"
As you assumed they are in the PE format.
penpen.
"Are the .com files in x64 systems really executable files containing raw 16 bit machine code?"
As you assumed they are in the PE format.
penpen.
Re: Are the .com files in x64 systems really .com files?
Wonderful
A brand new way to check if a system is a x32 or x64 :
A brand new way to check if a system is a x32 or x64 :
Code: Select all
@echo off
setlocal enableExtensions
dpath %windir%\system32
for /f %%a in ('type diskcopy.com') do (
set "fline=%%~a"
goto :break
)
:break
if "%fline:~0,2%" == "MZ" (
echo x64
) else (
echo x32
)
endlocal
Re: Are the .com files in x64 systems really .com files?
Sorry, but that does not mean, that all com files in 32 bit systems are 16 bit machine code executable.
Under win Xp you can see this:
PE files:
"chcp.com", "diskcomp.com", "diskcopy.com", "format.com", "graftabl.com",
"mode.com", "more.com", "tree.com", and "win.com".
32 bit executable, but no PE file:
edit.com
16 bit executables:
"command.com", "graphics.com", "kb16.com", and "loadfix.com"
penpen
Under win Xp you can see this:
PE files:
"chcp.com", "diskcomp.com", "diskcopy.com", "format.com", "graftabl.com",
"mode.com", "more.com", "tree.com", and "win.com".
32 bit executable, but no PE file:
edit.com
16 bit executables:
"command.com", "graphics.com", "kb16.com", and "loadfix.com"
penpen