FACTOID # 4: China's labor force stands at 706 million people, almost three times that of Europe and twice that of North and South America combined
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > COM file
COM
File extension: .com
Type of format: Executable

In MS-DOS and compatible DOSes, and in 8-bit CP/M, a COM file is a simple type of executable file. The name of the file format is derived from the file name extension .com (not to be confused with the .com top-level domain), which was originally the extension used for such files. However there is no actual association between the file format and the file name extension in any but CP/M and very early versions of MS-DOS. A filename extension is a suffix to the name of a computer file applied to show its format. ... Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ... CP/M was an operating system originally created for Intel 8080/85 based microcomputers by Gary Kildall of Digital Research, Inc. ... An executable or executable file, in computer science, is a file whose contents are meant to be interpreted as a program by a computer. ... A filename extension or filename suffix is an extra set of (usually) alphanumeric characters that is appended to the end of a filename to allow computer users (as well as various pieces of software on the computer system) to quickly determine the type of data stored in the file. ... For dot-com companies, see dot-com company. ... A file format is a particular way to encode information for storage in a computer file. ...

Contents

Platform support

The format is still executable on many modern Windows-based platforms, but it is run in an MS-DOS-emulating subsystem which was removed from the x64 variants. Windows redirects here. ... In computing, a platform describes some sort of framework, either in hardware or software, which allows software to run. ...


COM files can also be executed on DOS emulators such as DOSBox, on any platform supported by these emulators. "COM" is short for "core image" and is also interpreted as "command" as these .com files contained the code for the basic commands that could be run on the machine. DOS Version of Z running in DOSBox in Debian. ...


Many shell utilities such as the MS-DOS version of more used this format, as well as small, early applications. Example output of the more command. ...


Binary format

The COM format is perhaps the simplest executable format of all; it contains no metadata, only code and data, and is loaded at offset 0x0100 of some segment and executed. Because of how the segmentation model works, there is no need for relocation. Metadata is data about data. ... In computing, a loader is a program that performs the functions of a linker program and then immediately schedules the resulting executable program for action (in the form of a memory image), without necessarily saving the program as an executable file. ... In mathematics and computer science, hexadecimal, base-16, or simply hex, is a numeral system with a radix, or base, of 16, usually written using the symbols 0–9 and A–F, or a–f. ... On the Intel x86 architecture, a memory segment is the portion of memory which may be addressed by a single index register without changing a 16-bit segment selector. ... Relocation is the process of replacing references to symbols with actual addresses during fragment preparation and it is typically done by the Linker. ...


Its simplicity exacts a price, however: the binary has a maximum size of 65,280 (0xFF00) bytes and stores all its code and data in one segment. This was not an issue on early 8-bit machines, but it is the main reason why the format fell into disuse soon after the introduction of 16- and then 32-bit processors with their much larger, segmented memories. In computer science, object file or object code is an intermediate representation of code generated by a compiler after it processes a source code file. ... In computing, a code segment, also known as a text segment or simply as text, is a phrase used to refer to a portion of memory or of an object file that contains executable computer instructions. ... Data is one of the sections of a program in an object file or in memory, which contains the global variables that are initialized by the programmer. ... 8-bit refers to the number of bits used in the data bus of a computer. ... In computer science, 16-bit is an adjective used to describe integers that are at most two bytes wide, or to describe CPU architectures based on registers, address buses, or data buses of that size. ... 32-bit is a term applied to processors, and computer architectures which manipulate the address and data in 32-bit chunks. ... On the Intel x86 architecture, a memory segment is the portion of memory which may be addressed by a single index register without changing a 16-bit segment selector. ...


In Intel 8080 CPU architecture, only 65,536 bytes of memory could be addressed (address range 0x0000 to 0xFFFF). Under CP/M, the first page of this memory, from 0x0000 to 0x00FF was reserved for system use, and any user program had to be loaded at exactly 0x0100 to be executed. COM files fit this model perfectly. Note that there was no possibility of running more than one program or command at a time: the program loaded at 0x0100 was run, and no other. AMD clone NEC 8080AF (2nd-source). ...


Although the file format is the same in MS-DOS and CP/M, this does not mean that CP/M programs can be directly executed under MS-DOS or vice versa; MS-DOS COM files contain x86 instructions, while CP/M COM files contain 8080, 8085 or Z80 instructions. Additionally, MS-DOS COM files often depend on operating system traps supplied exclusively by MS-DOS via interrupt 21h. It is possible to construct a fat COM file which both processor families can execute. x86 or 80x86 is the generic name of a microprocessor architecture first developed and manufactured by Intel. ... AMD clone NEC 8080AF (2nd-source). ... The Intel 8085 was an 8-bit microprocessor made by Intel in the mid-1970s. ... One of the first Z80 microprocessors manufactured; the date stamp is from June 1976. ... It has been suggested that this article or section be merged into Exception handling. ... BIOS Interrupt Calls are a facility that MS-DOS programs, and some other software such as boot loaders, use to invoke the BIOSs facilities. ... A fat binary (or multiarchitecture binary) is a computer program that is native to multiple instruction set architectures (ISA) and thus can be run on multiple processor types. ...


Files may have names ending in .COM, but not be in the simple format described above; this is indicated by a magic number at the start of the file. For example, the COMMAND.COM file in DR-DOS 6 is actually in DOS executable format, indicated by the first two bytes being MZ (0x4D 0x5A), the initials of Mark Zbikowski. Under CP/M 3, if the first byte of a COM file is 0xC9 then this indicates the presence of a 256-byte header; since 0xC9 corresponds to the 8080 instruction RET, this means that the COM file will immediately terminate if run on an earlier version of CP/M that does not support this extension. In computer programming, a magic number is a constant used to identify the file or data type employed. ... COMMAND.COM is the name for the default operating system shell (or command line interpreter) for DOS and 16/32bits versions of Windows (95/98/98 SE/Me). ... This article is about the operating system. ... The DOS executable format is the executable file format used for . ... Mark Zbikowski aka Mark J. Zbikowski aka Zibo is a Microsoft Senior Software Designer. ... AMD clone NEC 8080AF (2nd-source). ...


Execution preference

If a directory contains both a COM file and an EXE file with same name (not including extension), the COM file is preferred. For example, if a directory contains two files named foo.com and foo.exe, the following would execute foo.com:

 C:>foo 

If the user wishes to run foo.exe, they can explicitly use the complete filename:

 C:>foo.exe 

Taking advantage of this default behaviour, virus writers and other malicious programmers sometimes use names like notepad.com for their creations. Their hope is that, if it is placed in the directory of the corresponding EXE file, a run command or batch file may accidentally trigger their program instead of the ubiquitous notepad.exe text editor. A computer virus is a computer program that can copy itself and infect a computer without permission or knowledge of the user. ... For the item of stationery, see notebook. ...


On Windows NT and derivatives (Windows 2000, Windows XP, and Windows Vista), the PATHEXT variable is used to determine the order of preference (and acceptable extensions) for calling files without extensions from the command line. The default value still places .com files before .exe files, however. Windows NT (New Technology) is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. ... Windows 2000 (also referred to as Win2K) is a preemptive, interruptible, graphical and business-oriented operating system that was designed to work with either uniprocessor or symmetric multi-processor 32-bit Intel x86 computers. ... Windows XP is a line of operating systems developed by Microsoft for use on general-purpose computer systems, including home and business desktops, notebook computers, and media centers. ... Windows Vista is a line of graphical operating systems used on personal computers, including home and business desktops, notebook computers, Tablet PCs, and media centers. ...


Recent malicious usage of the .com extension

Some recent computer virus writers have hoped to capitalise on modern computer users' likely lack of knowledge of the COM command-file format, along with their more likely familiarity with dot-com Internet domain names. E-mails have been sent with an attachment named along the lines of "www.example.com". Unwary Microsoft Windows users who clicked on the attachment would not be visiting a web site at http://www.example.com/, but rather would find themselves running a carefully-crafted, and probably malicious, binary command called www.example and giving it full permission to do to their machine whatever its author had in mind. For dot-com companies, see dot-com company. ... Windows redirects here. ...


Note that there is nothing malicious about the COM file format itself. This example highlights an unintended name collision between .com command files and, a decade or more later, .com commercial web sites.


  Results from FactBites:
 
COM file - Wikipedia, the free encyclopedia (776 words)
The name of the file format is derived from the file name extension.com (not to be confused with the.com top-level domain), which was originally the extension used for such files.
COM files can also be executed on DOS emulators such as DOSBox, on any platform supported by these emulators.
Files may have names ending in.COM, but not be in the simple format described above; this is indicated by a magic number at the start of the file.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.