IN A, (n)

Read from port and store in A

\(A \longleftarrow (n)\)

76543210
11011011DB
n

This instruction places n onto the bottom half (A0…A7) of the address bus to select the I/O device at one of 256 possible ports. The contents of the Accumulator also appear on the top half (A8…A15) of the address bus at this time. One byte from the selected port is placed on the data bus and written to the Accumulator (Register A).

Flags Affected
None.
Opcode Matrix
A
IN (n)
IN A,(n)
DBnn211
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Special

Last modified November 16, 2021: Optimise I/O pages (a987132)