03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE<br />

Opcode<br />

SI<br />

DI<br />

Source EA<br />

Destination EA<br />

A1025-0A<br />

Figure 2-21. String Operand<br />

2.2.2.3 I/O Port Addressing<br />

Any memory operand addressing modes can be used to access an I/O port if the port is memorymapped.<br />

String instructions can also be used to transfer data to memory-mapped ports with an<br />

appropriate hardware interface.<br />

Two addressing modes can be used to access ports located in the I/O space (see Figure 2-22). For<br />

direct I/O port addressing, the port number is an 8-bit immediate operand. This allows fixed access<br />

to ports numbered 0 to 255. Indirect I/O port addressing is similar to register indirect addressing<br />

of memory operands. The DX register contains the port number, which can range from 0 to<br />

65,535. Adjusting the contents of the DX register allows one instruction to access any port in the<br />

I/O space. A group of adjacent ports can be accessed using a simple software loop that adjusts the<br />

value of the DX register.<br />

Opcode<br />

Data<br />

Opcode<br />

Port Address<br />

Direct Port<br />

Addressing<br />

DX<br />

Indirect Port<br />

Addressing<br />

Port Address<br />

A1026-0A<br />

Figure 2-22. I/O Port Addressing<br />

2-36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!