http://learn.cemetech.net/index.php?title=Z80:Opcodes:IN&feed=atom&action=historyZ80:Opcodes:IN - Revision history2024-03-29T07:41:39ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=Z80:Opcodes:IN&diff=309&oldid=prevMaintenance script: Initial automated import2016-02-05T22:32:04Z<p>Initial automated import</p>
<p><b>New page</b></p><div><!-- Short summary of instruction --><br />
Reads a value from a hardware port.<br />
<br />
== Syntax ==<br />
<br />
<!-- Syntax for this instruction --><br />
<br />
in op8,(op8)<br />
<br />
=== Allowed Instructions ===<br />
<br />
<!-- All possible inputs --><br />
<br />
in a,(n) ;8-bit constant<br />
in a,(c)<br />
in b,(c)<br />
in c,(c)<br />
in d,(c)<br />
in e,(c)<br />
in h,(c)<br />
in l,(c)<br />
in (c) ;undocumented command<br />
<br />
== Effects ==<br />
<br />
<!-- What the instruction does to flags --><br />
=== IN A,(N) ===<br />
This command alters no flags.<br />
<br />
=== Others ===<br />
N flag reset, P/V represents parity, C flag preserved, all other flags affected by definition.<br />
<br />
== Uses ==<br />
<br />
<!-- What the instruction can be used for --><br />
This command, along with OUT, is used for hardware interfacing.<br />
The undocumented command IN (C) reads from the port and affects flags, but does not store the value to a register.<br />
<br />
== T-States ==<br />
r denotes 8-bit register.<br />
<br />
{| class="wikitable"<br />
| A, X || 11 <br />
|-<br />
| r, (C) || 12 <br />
|}<br />
<br />
== See Also ==<br />
<br />
<!-- Other instructions that are related to this one --><br />
[[Z80:Opcodes:IND|IND]],[[Z80:Opcodes:INDR|INDR]],[[Z80:Opcodes:INI|INI]],[[Z80:Opcodes:INIR|INIR]],[[Z80:Opcodes:OUT|OUT]],[[Z80:Opcodes:OUTD|OUTD]],[[Z80:Opcodes:OTDR|OTDR]],[[Z80:Opcodes:OUTI|OUTI]],[[Z80:Opcodes:OTIR|OTIR]]<br />
<br />
{{lowercase}}<br />
[[Category:Z80 Assembly]]<br />
[[Category:Z80 Heaven]]<br />
[[Category:Z80 Opcodes]]</div>Maintenance script