OUT (C), r
|\((C) \longleftarrow r\)|
|OUT (C), r|
|\((C) \longleftarrow F\)|
|OUT (C), F|
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.
Instruction Opcode hexSize bytesCycle count