Intel 80C186XL Opcode SI DI, Source EA Destination EA, Opcode Data, DX Indirect Port Addressing

Models: 80C186XL 80C188XL

1 405
Download 405 pages 42.62 Kb
Page 65
Image 65
Opcode

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 Opcode SI DI, Source EA Destination EA, Opcode Data, Port Address Direct Port Addressing