Assembly language--port

      In the PC system, in addition to various memories, the chips connected to the CPU through the bus also have the following three types of chips.

          Interface chips on various interface cards (for example, network cards, graphics cards), they control the interface cards to work;

          Interface chips on the motherboard, through which the CPU accesses some peripherals;

          Other chips are used to store related system information or perform related input and output processing.

In these chips, there is a set of registers that can be read and written by the CPU. These registers, they may be physically in different chips,
but they are the same in the following two points.

          Both are connected to the bus of the CPU, and this connection is made through the chip where they are located;

          When the CPU reads or writes to them, it sends port read and write commands to the chip where they are located through the control line.

From the perspective of the CPU, these registers are treated as ports, and they are addressed uniformly, thus establishing a unified port address space.
Each port has an address in the address space. When accessing the port, the CPU locates the port through the port address. Because the chip where the port is located is connected to the CPU through the bus.

 

 

Reference: <<Assembly Language>> Wang Shuang

Guess you like

Origin blog.csdn.net/ma2595162349/article/details/108543563