7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
\((C) \longleftarrow r\) | ||||||||
OUT (C), r | ||||||||
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | ED |
0 | 1 | r | 0 | 0 | 1 | |||
\((C) \longleftarrow F\) | ||||||||
OUT (C), F | ||||||||
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | ED |
0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 71 |
Register | r |
---|---|
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
A | 111 |
The contents of Register C are placed on the bottom half (A0…7) of the address bus to select the I/O device at one of 256 possible ports.
The contents of Register B are placed on the top half (A8…A15) of the address bus at this time.
Then the byte contained in r is placed on the data bus and written to the selected peripheral device.
There is an undocumented code where r=%110 which writes the flag register.
Unlike it's IN F, (C) counterpart, this instruction is completely undocumented, but it's here not in the undocumented section to be consistent.
Flags Affected
None. |
Opcode Matrix
A | B | C | D | E | H | L | F | |
---|---|---|---|---|---|---|---|---|
OUT (C) |
OUT (C),A
ED79212 |
OUT (C),B
ED41212 |
OUT (C),C
ED49212 |
OUT (C),D
ED51212 |
OUT (C),E
ED59212 |
OUT (C),H
ED61212 |
OUT (C),L
ED69212 |
OUT (C),F
ED71212 |
Instruction
Opcode hexSize bytesCycle count
| Special | Undocumented |