Intel 80C186XL Computer Hardware User Manual


 
OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE
2-36
Figure 2-21. String Operand
2.2.2.3 I/O Port Addressing
Any memory operand addressing modes can be used to access an I/O port if the port is memory-
mapped. String instructions can also be used to transfer data to memory-mapped ports with an
appropriate hardware interface.
Two addressing modes can be used to access ports located in the I/O space (see Figure 2-22). For
direct I/O port addressing, the port number is an 8-bit immediate operand. This allows fixed ac-
cess to ports numbered 0 to 255. Indirect I/O port addressing is similar to register indirect address-
ing of memory operands. The DX register contains the port number, which can range from 0 to
65,535. Adjusting the contents of the DX register allows one instruction to access any port in the
I/O space. A group of adjacent ports can be accessed using a simple software loop that adjusts the
value of the DX register.
Figure 2-22. I/O Port Addressing
Opcode
SI
DI
Source EA
Destination EA
A1025-0A
Opcode
Data
Port Address
Opcode
Port AddressDX
Direct Port
Addressing
Indirect Port
Addressing
A1026-0A