OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE

Opcode

SI

DI

Source EA

Destination EA

A1025-0A

Figure 2-21. String Operand

2.2.2.3I/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.

Opcode Data

Opcode

Port Address

Direct Port Addressing

DX

Indirect Port Addressing

Port Address

A1026-0A

Figure 2-22. I/O Port Addressing

2-36

Page 65
Image 65
Intel 80C186XL, 80C188XL user manual Opcode Source EA Destination EA