OUT Output Instruction
This instruction is used send data byte stored in the accumulator to the output port whose address specified in the instruction. The instruction format is
OUT 8 bit port address [ output port address ] - A]
Example: How to send data byte sorted in register B to the output port identified by 8 bit address (00H)?
Solution : OUT instruction is used to send data byte stored in the accumulator to the specified output port. Hence data strode in register B will have to copied into accumulator first using MOV instruction. Following instruction are used to perform the given task.
MOV A, B
Hardware and other details of interfacing input output ports are explained in chapter 7.