<story><title>Undocumented 8086 instructions, explained by the microcode</title><url>https://www.righto.com/2023/07/undocumented-8086-instructions.html</url></story><parent_chain></parent_chain><comment><author>chx</author><text>&amp;gt; The undocumented C9 opcode is identical to the documented CB, far return instruction.&lt;p&gt;I &lt;i&gt;remember&lt;/i&gt; this.&lt;p&gt;Once ... gosh, it&amp;#x27;s hard to believe how long ago that was now, but once I knew the entire Z80 opcode table off head. I could read the Z80 machine code and disassemble it. High school crowded that stuff out of my head, I went to a special math school, it was very very hard. Except... C9 was RET (and the Z80 is an extension of the Intel 8080).  That has burned into me so deep I still remember, across more than 35 years. I will be 30 ;) years old in two weeks.</text></comment>
<story><title>Undocumented 8086 instructions, explained by the microcode</title><url>https://www.righto.com/2023/07/undocumented-8086-instructions.html</url></story><parent_chain></parent_chain><comment><author>colejohnson66</author><text>A lot of the undocumented instruction &amp;quot;match&amp;quot; bits make sense, such as POP CS at [0F]. However, it&amp;#x27;s clear that the authors of the microcode &lt;i&gt;deliberately&lt;/i&gt; made every opcode match to some routine, as evidenced by Jcc being mirrored into the [60..6F] region, LOCK into [F1], group 2 &amp;#x2F;6 into &amp;#x2F;7, etc. It wouldn&amp;#x27;t&amp;#x27;ve &amp;quot;cost&amp;quot; anything extra to make Jcc only match on its documented [70..7F] region (and others) like later processors do. What&amp;#x27;s the advantage of matching on undefined byte sequences?&lt;p&gt;Also, SALC is still &lt;i&gt;technically&lt;/i&gt; undocumented by Intel (AMD documents it, though). It doesn&amp;#x27;t have a dedicated section in the SDM (would be in Volume 2, Chapter 4), and in the opcode map (Volume 2, Appendix A), there&amp;#x27;s a blank there. One actually has to go to Volume 3, Chapter 23 &amp;quot;Architecture Compatibility&amp;quot;, Section 15 &amp;quot;Undefined Opcodes&amp;quot; (of version 080 from June) to see it mentioned. It&amp;#x27;s weird. They even call it out as SALC &amp;quot;when not in 64-bit mode&amp;quot; and that it performs &amp;quot;IF (CF=1), AL=FF, ELSE, AL=0&amp;quot;, but refuse to officially document it.</text></comment>