A byte from the port whose address is formed by A in the high bits and nn in the low bits is written to A.
in
Operands
in r,(nn) | in r,nn | in r,(rr) | in (rr)Variants
Every form of in the assembler accepts. The cycles column counts clock
cycles, written as taken/not taken for the conditional forms.
| Instruction | Description | Flags | Bytes | Cycles |
|---|---|---|---|---|
| in a,(nn) | A byte from the port whose address is formed by A in the high bits and | — | 2 | 11 |
| in b,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to B. | N=0P/V=PH=0ZS | 2 | 12 |
| in c,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to C. | N=0P/V=PH=0ZS | 2 | 12 |
| in d,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to D. | N=0P/V=PH=0ZS | 2 | 12 |
| in e,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to E. | N=0P/V=PH=0ZS | 2 | 12 |
| in h,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to H. | N=0P/V=PH=0ZS | 2 | 12 |
| in l,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to L. | N=0P/V=PH=0ZS | 2 | 12 |
| in (c) undocumented | Inputs a byte from the port at the 16-bit address contained in the BC register pair and affects flags only. | N=0P/V=PH=0ZS | 2 | 12 |
| in a,(c) | A byte from the port at the 16-bit address contained in the BC register pair is written to A. | N=0P/V=PH=0ZS | 2 | 12 |