Computer port (software)
Encyclopedia
- For other uses of "port", see port (disambiguation)Port (disambiguation)A port is a facility for receiving ships and transferring cargo.Port or ports may also refer to:-Transportation:* Port , a nautical term meaning the left hand side of a vessel for an observer facing forward...
.
In computer programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...
, port has a wide range of meanings.
A software port (usually just called a 'port') is a virtual/logical data connection that can be used by programs to exchange data directly, instead of going through a file or other temporary storage location. The most common of these are TCP and UDP port
TCP and UDP port
In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is associated with an IP address of the host, as well as the type of protocol used for communication...
s(ranges: 0-65535), which are used to exchange data between computers on the Internet. The port variable represents a particular Transport Service user at the specified host.
In Flow-based programming
Flow-based programming
In computer science, flow-based programming is a programming paradigm that defines applications as networks of "black box" processes, which exchange data across predefined connections by message passing, where the connections are specified externally to the processes...
, a 'port' is a (named) point of contact between a process and a connection.
I/O or machine port mechanism
A port number is part of the addressing information used to identify the senders and receivers of messages. Port numbers are most commonly used with TCP/IP connections. Home network routers and computer software work with ports and sometimes allow you to configure port number settings. These port numbers allow different applications on the same computer to share network resources simultaneously.For Input or Output (I/O) operations, nearly all processor families use memory-mapped I/O
Memory-mapped I/O
Memory-mapped I/O and port I/O are two complementary methods of performing input/output between the CPU and peripheral devices in a computer...
—the same assembly instructions are used for both memory access and hardware I/O
Hardware register
In digital electronics, especially computing, a hardware register stores bits of information, in a way that all the bits can be written to or read out simultaneously.The hardware registers inside a central processing unit are called processor registers....
.
However, Intel microprocessors use port-mapped I/O—they have a completely separate set of assembly instructions
X86 instruction listings
The x86 instruction set has been extended several times, introducing wider registers and datatypes and/or new functionality.-x86 integer instructions:...
(IN, INS, OUT, and OUTS) that are used specifically for hardware I/O. These instructions figure out which hardware device to communicate with using the concept of an I/O port or machine port. These ports are numbered based on which hardware device they refer to. These hardware I/O ports are in a completely different address space
Address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.- Overview :...
from normal memory.
Intel microprocessors generally allow one octet
Octet (computing)
An octet is a unit of digital information in computing and telecommunications that consists of eight bits. The term is often used when the term byte might be ambiguous, as there is no standard for the size of the byte.-Overview:...
(8-bit byte or word) to be sent or received during each instruction. The hardware device decides how to interpret data sent to it and what data to send to the processor. For example, a common use is to ask a hardware device which byte (in a data transfer) it will be sending next.
Some I/O ports are connected with "peripheral" devices outside the CPU itself, but inside the computer case. Other I/O ports are connected to "peripheral" external devices outside the computer case using some Computer port (hardware)
Computer port (hardware)
In computer hardware, a port serves as an interface between the computer and other computers or peripheral devices. Physically, a port is a specialized outlet on a piece of equipment to which a plug or cable connects...
.
See also
- Port number
- Computer port (hardware)Computer port (hardware)In computer hardware, a port serves as an interface between the computer and other computers or peripheral devices. Physically, a port is a specialized outlet on a piece of equipment to which a plug or cable connects...
- TCP and UDP portTCP and UDP portIn computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is associated with an IP address of the host, as well as the type of protocol used for communication...
- List of TCP and UDP port numbers