<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3AOpcodes%3AIN</id>
	<title>Z80:Opcodes:IN - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3AOpcodes%3AIN"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Opcodes:IN&amp;action=history"/>
	<updated>2026-05-15T10:28:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Opcodes:IN&amp;diff=309&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Opcodes:IN&amp;diff=309&amp;oldid=prev"/>
		<updated>2016-02-05T22:32:04Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Short summary of instruction --&amp;gt;&lt;br /&gt;
Reads a value from a hardware port.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Syntax for this instruction --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    in op8,(op8)&lt;br /&gt;
&lt;br /&gt;
=== Allowed Instructions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- All possible inputs --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    in a,(n)        ;8-bit constant&lt;br /&gt;
    in a,(c)&lt;br /&gt;
    in b,(c)&lt;br /&gt;
    in c,(c)&lt;br /&gt;
    in d,(c)&lt;br /&gt;
    in e,(c)&lt;br /&gt;
    in h,(c)&lt;br /&gt;
    in l,(c)&lt;br /&gt;
    in (c)          ;undocumented command&lt;br /&gt;
&lt;br /&gt;
== Effects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- What the instruction does to flags --&amp;gt;&lt;br /&gt;
=== IN A,(N) ===&lt;br /&gt;
This command alters no flags.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
N flag reset, P/V represents parity, C flag preserved, all other flags affected by definition.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- What the instruction can be used for --&amp;gt;&lt;br /&gt;
This command, along with OUT, is used for hardware interfacing.&lt;br /&gt;
The undocumented command IN (C) reads from the port and affects flags, but does not store the value to a register.&lt;br /&gt;
&lt;br /&gt;
== T-States ==&lt;br /&gt;
r denotes 8-bit register.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| A, X || 11 &lt;br /&gt;
|-&lt;br /&gt;
| r, (C) || 12 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Other instructions that are related to this one --&amp;gt;&lt;br /&gt;
[[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]]&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:Z80 Assembly]]&lt;br /&gt;
[[Category:Z80 Heaven]]&lt;br /&gt;
[[Category:Z80 Opcodes]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>