OUT (n),A

Operation

(n) <- A

Mnemonic

OUT

Operands

(n),A

b7b6b5b4b3b2b1b0
1 1 0 1 0 0 1 1$D3
n

Description

The operand n is placed on the bottom half (A0 through A7) of the address bus to select the I/O device at one of 256 possible ports. The contents of the Accumulator (Register A) also appear on the top half (A8 through A15) of the address bus at this time. Then the byte contained in the Accumulator is placed on the data bus and written to the selected peripheral device.

Condition Bits Affected

None

Example

If the Accumulator contains $23, then upon the execution of

	OUT	($01),A

byte $23 is written to the peripheral device mapped to I/O port address $01.