
PROGRAMMING CONCEPTS–IV 5-3
5.2 | I/O Instructions
The 8086 has two instructions to communicate with I/O.
i) IN
Usage: IN accumulator, port
This is the case when data is taken from the I/O device – this implies that the device is an
input device. With this instruction, an I/O Read machine cycle is initiated and the data
in the input device is transferred to the accumulator of the processor.
ii) OUT
Usage: OUT port, accumulator
In this case, data is given to an output device from the accumulator with the initia-
tion of an I/O Write machine cycle. In both cases, ‘port’ implies the port address,
i.e., the address, of the I/O device. The source has ...