OUT (C),r

Operation

(C) <- r

Mnemonic

OUT

Operands

(C),r

b7b6b5b4b3b2b1b0
1 1 1 0 1 0 1 1$ED
0 1 r 0 0 1

Description

The contents of Register C are 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 Register r are placed on the top half (A8 through A15) of the address bus at this time. Then the byte contained in register r is placed on the data bus and written to the selected peripheral device. Register r identifies any of the CPU registers shown in the following table, which also shows the corresponding three-bit r field for each that appears in the assembled object code.

RegisterrHex
B000$41
C001$49
D010$51
E011$59
H100$61
L101$69
A111$79

Condition Bits Affected

None

Example

If Register C contains $01 and the D Register contains $5A, then upon the execution of

	OUT	(C),D

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