<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://fileformats.archiveteam.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=DOS_executable_%28.com%29</id>
		<title>DOS executable (.com) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=DOS_executable_%28.com%29"/>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;action=history"/>
		<updated>2026-04-20T12:42:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=50687&amp;oldid=prev</id>
		<title>Jsummers: /* See also */</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=50687&amp;oldid=prev"/>
				<updated>2025-08-08T13:09:07Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;See also&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:09, 8 August 2025&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;TLD &lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;com&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Com]] (disambiguation page)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* [[Executable envelopes]] - Some special COM-based formats are listed here&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* [[MS-DOS EXE&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Sample files ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Sample files ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jsummers</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=47993&amp;oldid=prev</id>
		<title>Sembiance: /* Sample files */</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=47993&amp;oldid=prev"/>
				<updated>2024-02-16T19:27:27Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Sample files&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:27, 16 February 2024&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Sample files ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Sample files ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;https://telparia.com/fileFormatSamples/&lt;/del&gt;executable/com&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{DexvertSamples|&lt;/ins&gt;executable/com&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sembiance</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=39124&amp;oldid=prev</id>
		<title>Sembiance: Added sample files</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=39124&amp;oldid=prev"/>
				<updated>2021-01-14T21:36:09Z</updated>
		
		<summary type="html">&lt;p&gt;Added sample files&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:36, 14 January 2021&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[TLD .com]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[TLD .com]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== Sample files ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* https://telparia.com/fileFormatSamples/executable/com/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sembiance</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=27473&amp;oldid=prev</id>
		<title>Jsummers: Category:MS-DOS</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=27473&amp;oldid=prev"/>
				<updated>2017-03-29T16:25:21Z</updated>
		
		<summary type="html">&lt;p&gt;Category:MS-DOS&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:25, 29 March 2017&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; | extensions = {{ext|com}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; | extensions = {{ext|com}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''COM''' (&amp;quot;command file&amp;quot;) is the native executable format of [[wikipedia:CP/M|CP/M]]. The format was inherited by the DOS family of operating systems; MS-DOS 1.0 introduced [[MS-DOS EXE|MZ]] as a replacement. COM files are raw, flat binaries without relocations; there are no identifying headers or magic numbers, except for a variant introduced in CP/M 3 which contains a 256-byte header.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''COM''' (&amp;quot;command file&amp;quot;) is the native executable format of [[wikipedia:CP/M|CP/M]]. The format was inherited by the DOS family of operating systems; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/ins&gt;MS-DOS&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]] &lt;/ins&gt;1.0 introduced [[MS-DOS EXE|MZ]] as a replacement. COM files are raw, flat binaries without relocations; there are no identifying headers or magic numbers, except for a variant introduced in CP/M 3 which contains a 256-byte header.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On PC computers, COM files are loaded at fixed offset 0x100 in an arbitrary [[wikipedia:x86 memory segmentation#Real mode|real mode memory segment]]. The entry point is located at the start of the file. Many COM files start with a jump instruction (opcode &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0xeb&amp;lt;/code&amp;gt;), but this isn't required. Since the executable is limited to a single segment, the maximum size of a COM file is 65280 (0xff00) bytes.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On PC computers, COM files are loaded at fixed offset 0x100 in an arbitrary [[wikipedia:x86 memory segmentation#Real mode|real mode memory segment]]. The entry point is located at the start of the file. Many COM files start with a jump instruction (opcode &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0xeb&amp;lt;/code&amp;gt;), but this isn't required. Since the executable is limited to a single segment, the maximum size of a COM file is 65280 (0xff00) bytes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Some files carrying the &amp;lt;code&amp;gt;.com&amp;lt;/code&amp;gt; extension are in fact in the [[MS-DOS EXE|MZ]] format: for example, the &amp;lt;code&amp;gt;COMMAND.COM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EDIT.COM&amp;lt;/code&amp;gt; binaries distributed with Windows 95 and later are MZ executables. The DOS loader can detect this and load the file appropriately.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Some files carrying the &amp;lt;code&amp;gt;.com&amp;lt;/code&amp;gt; extension are in fact in the [[MS-DOS EXE|MZ]] format: for example, the &amp;lt;code&amp;gt;COMMAND.COM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EDIT.COM&amp;lt;/code&amp;gt; binaries distributed with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/ins&gt;Windows 95&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]] &lt;/ins&gt;and later are MZ executables. The DOS loader can detect this and load the file appropriately.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== See also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[Wikipedia: COM file]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[Wikipedia: COM file]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Microsoft]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:MS-DOS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jsummers</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=26722&amp;oldid=prev</id>
		<title>Dan Tobias at 23:31, 7 October 2016</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=26722&amp;oldid=prev"/>
				<updated>2016-10-07T23:31:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:31, 7 October 2016&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Some files carrying the &amp;lt;code&amp;gt;.com&amp;lt;/code&amp;gt; extension are in fact in the [[MS-DOS EXE|MZ]] format: for example, the &amp;lt;code&amp;gt;COMMAND.COM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EDIT.COM&amp;lt;/code&amp;gt; binaries distributed with Windows 95 and later are MZ executables. The DOS loader can detect this and load the file appropriately.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Some files carrying the &amp;lt;code&amp;gt;.com&amp;lt;/code&amp;gt; extension are in fact in the [[MS-DOS EXE|MZ]] format: for example, the &amp;lt;code&amp;gt;COMMAND.COM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EDIT.COM&amp;lt;/code&amp;gt; binaries distributed with Windows 95 and later are MZ executables. The DOS loader can detect this and load the file appropriately.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== See also ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* [[TLD .com]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[Wikipedia: COM file]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [[Wikipedia: COM file]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dan Tobias</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=23213&amp;oldid=prev</id>
		<title>Felix at 18:56, 27 August 2015</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=23213&amp;oldid=prev"/>
				<updated>2015-08-27T18:56:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:56, 27 August 2015&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{FormatInfo&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{FormatInfo&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|subcat=Executables&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;| subcat = Executables&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|extensions={{ext|com&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;| extensions = {{ext|com}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;|mimetypes=&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{mimetype|application/octet-stream&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;==Introduction==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''COM''' (&amp;quot;command file&amp;quot;) is the native &lt;/ins&gt;executable &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;format &lt;/ins&gt;of [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wikipedia:CP/M|&lt;/ins&gt;CP/M]]. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The format was inherited by &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;DOS family of operating systems; MS-DOS 1.0 introduced &lt;/ins&gt;[[MS-DOS EXE|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MZ&lt;/ins&gt;]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;as a replacement. &lt;/ins&gt;COM files &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;are &lt;/ins&gt;raw, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;flat binaries &lt;/ins&gt;without &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;relocations; there are no identifying headers or magic numbers&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;except for &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;variant introduced in CP&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;M 3 which contains &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;256&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;byte header&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;On DOS and early Windows systems, files with extension .com are a special type of 16 bit &lt;/del&gt;executable &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which most &lt;/del&gt;of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the time can only be run from the commandline. The extension comes from &lt;/del&gt;[[CP/M]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and stands for &amp;quot;command program&amp;quot; (or some variant thereof)&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;As such they predate &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;more common &lt;/del&gt;[[MS-DOS EXE|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;EXE&lt;/del&gt;]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;format, and are quite limited compared to the newer format:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;COM files &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;contain only one area of combined code and data. There is no segmentation, no seperate code and data segments, and (more importantly) no relocation table&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*They contain the &lt;/del&gt;raw &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;program binary&lt;/del&gt;, without &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;any header&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which will be mapped into memory at &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;specific offset (&amp;lt;code&amp;gt;0x100&amp;lt;&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&amp;gt;) in &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(possibly random) segment. Thus they resemble some arbitrary [[ROM]] (.bin) format.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*They can be at most around 64kb big (65280 bytes to be exact)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*They can only use relative adressing, since the position in memory where they are loaded is not known to the program (but can be determined through an API call)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A good example is '''command.com''', the 16 bit command line interface of [[MS&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DOS]]&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Since &lt;/del&gt;COM files &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;contain directly executable code, most &lt;/del&gt;of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;them &lt;/del&gt;start with a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;simple &lt;/del&gt;&amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;oxeb&lt;/del&gt;&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;byte&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But &lt;/del&gt;this is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not set in stone&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and there are lots &lt;/del&gt;of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;COM files that have &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;different first byte&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;On PC computers, &lt;/ins&gt;COM files &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;are loaded at fixed offset 0x100 in an arbitrary [[wikipedia:x86 memory segmentation#Real mode|real mode memory segment]]. The entry point is located at the start &lt;/ins&gt;of &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the file. Many COM files &lt;/ins&gt;start with a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;jump instruction (opcode &lt;/ins&gt;&amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;0xeb&lt;/ins&gt;&amp;lt;/code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;but &lt;/ins&gt;this &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;isn't required. Since the executable &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;limited to a single segment&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the maximum size &lt;/ins&gt;of a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;COM file is 65280 (0xff00) bytes&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Sometimes, COM &lt;/del&gt;files &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;first 2 bytes&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;These &lt;/del&gt;are in fact &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;simply renamed &lt;/del&gt;[[MS-DOS EXE|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;EXE&lt;/del&gt;]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/del&gt;, the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;original &lt;/del&gt;DOS &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;kernel did not care about &lt;/del&gt;the file &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Some &lt;/ins&gt;files &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;carrying &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;com&amp;lt;/code&amp;gt; extension &lt;/ins&gt;are in fact &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in the &lt;/ins&gt;[[MS-DOS EXE|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MZ&lt;/ins&gt;]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;format: for example&lt;/ins&gt;, the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;COMMAND.COM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EDIT.COM&amp;lt;/code&amp;gt; binaries distributed with Windows 95 and later are MZ executables. The &lt;/ins&gt;DOS &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;loader can detect this and load &lt;/ins&gt;the file &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;appropriately&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//en.wikipedia.org/wiki/COM_file Wikipedia entry&lt;/del&gt;] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on COM files&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[Wikipedia&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;COM file]&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[category:File formats with extension .com]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Felix</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=17343&amp;oldid=prev</id>
		<title>Jsummers at 02:33, 9 May 2014</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=17343&amp;oldid=prev"/>
				<updated>2014-05-09T02:33:29Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:33, 9 May 2014&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On DOS and early Windows systems, files with extension .com are a special type of 16 bit executable which most of the time can only be run from the commandline. The extension comes from [[CP/M]] and stands for &amp;quot;command program&amp;quot; (or some variant thereof). As such they predate the more common [[EXE]] format, and are quite limited compared to the newer format:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On DOS and early Windows systems, files with extension .com are a special type of 16 bit executable which most of the time can only be run from the commandline. The extension comes from [[CP/M]] and stands for &amp;quot;command program&amp;quot; (or some variant thereof). As such they predate the more common [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MS-DOS EXE|&lt;/ins&gt;EXE]] format, and are quite limited compared to the newer format:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*COM files contain only one area of combined code and data. There is no segmentation, no seperate code and data segments, and (more importantly) no relocation table&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*COM files contain only one area of combined code and data. There is no segmentation, no seperate code and data segments, and (more importantly) no relocation table&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*They contain the raw program binary, without any header, which will be mapped into memory at a specific offset (&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;) in a (possibly random) segment. Thus they resemble some arbitrary [[ROM]] (.bin) format.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*They contain the raw program binary, without any header, which will be mapped into memory at a specific offset (&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;) in a (possibly random) segment. Thus they resemble some arbitrary [[ROM]] (.bin) format.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since COM files contain directly executable code, most of them start with a simple &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;oxeb&amp;lt;/code&amp;gt; byte, representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But this is not set in stone, and there are lots of COM files that have a different first byte.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since COM files contain directly executable code, most of them start with a simple &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;oxeb&amp;lt;/code&amp;gt; byte, representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But this is not set in stone, and there are lots of COM files that have a different first byte.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Sometimes, COM files are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in the first 2 bytes. These are in fact simply renamed [[EXE]] files, the original DOS kernel did not care about the file extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Sometimes, COM files are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in the first 2 bytes. These are in fact simply renamed [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MS-DOS EXE|&lt;/ins&gt;EXE]] files, the original DOS kernel did not care about the file extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jsummers</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=7395&amp;oldid=prev</id>
		<title>Dan Tobias: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=7395&amp;oldid=prev"/>
				<updated>2012-12-05T23:47:01Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:47, 5 December 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A good example is '''command.com''', the 16 bit command line interface of [[MS-DOS]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A good example is '''command.com''', the 16 bit command line interface of [[MS-DOS]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since COM files contain directly executable code, most of them start with a simple &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;oxeb&amp;lt;/code&amp;gt; byte, representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But this is not set in stone, and there are lots of COM files that have a different first byte&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since COM files contain directly executable code, most of them start with a simple &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;oxeb&amp;lt;/code&amp;gt; byte, representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But this is not set in stone, and there are lots of COM files that have a different first byte&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Sometimes, COM files are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in the first 2 bytes. These are in fact simply renamed [[EXE]] files, the original DOS kernel did not care &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for &lt;/del&gt;the file extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Sometimes, COM files are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in the first 2 bytes. These are in fact simply renamed [[EXE]] files, the original DOS kernel did not care &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;about &lt;/ins&gt;the file extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dan Tobias</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=7388&amp;oldid=prev</id>
		<title>Darkstar: completely rewritten the page</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=DOS_executable_(.com)&amp;diff=7388&amp;oldid=prev"/>
				<updated>2012-12-05T23:02:11Z</updated>
		
		<summary type="html">&lt;p&gt;completely rewritten the page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FormatInfo&lt;br /&gt;
|subcat=Executables&lt;br /&gt;
|extensions={{ext|com}}&lt;br /&gt;
|mimetypes=&lt;br /&gt;
{{mimetype|application/octet-stream}}&lt;br /&gt;
}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
On DOS and early Windows systems, files with extension .com are a special type of 16 bit executable which most of the time can only be run from the commandline. The extension comes from [[CP/M]] and stands for &amp;quot;command program&amp;quot; (or some variant thereof). As such they predate the more common [[EXE]] format, and are quite limited compared to the newer format:&lt;br /&gt;
*COM files contain only one area of combined code and data. There is no segmentation, no seperate code and data segments, and (more importantly) no relocation table&lt;br /&gt;
*They contain the raw program binary, without any header, which will be mapped into memory at a specific offset (&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;) in a (possibly random) segment. Thus they resemble some arbitrary [[ROM]] (.bin) format.&lt;br /&gt;
*They can be at most around 64kb big (65280 bytes to be exact)&lt;br /&gt;
*They can only use relative adressing, since the position in memory where they are loaded is not known to the program (but can be determined through an API call)&lt;br /&gt;
A good example is '''command.com''', the 16 bit command line interface of [[MS-DOS]].&lt;br /&gt;
&lt;br /&gt;
Since COM files contain directly executable code, most of them start with a simple &amp;lt;code&amp;gt;0xe9&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;oxeb&amp;lt;/code&amp;gt; byte, representing a short JUMP to the &amp;quot;real&amp;quot; entry point of the program. But this is not set in stone, and there are lots of COM files that have a different first byte&lt;br /&gt;
&lt;br /&gt;
Sometimes, COM files are larger than 64kb and start with a &amp;quot;MZ&amp;quot; or &amp;quot;ZM&amp;quot; signature in the first 2 bytes. These are in fact simply renamed [[EXE]] files, the original DOS kernel did not care for the file extension but only looked at the first 2 bytes to determine the file format (COM or EXE) of the program to be run.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/COM_file Wikipedia entry] on COM files&lt;br /&gt;
*[http://www.fileformat.info/format/com/corion.htm Entry] on fileformat.info&lt;br /&gt;
[[category:File formats with extension .com]]&lt;/div&gt;</summary>
		<author><name>Darkstar</name></author>	</entry>

	</feed>