8086 Microcode Browser
Recorded: Dec. 4, 2025, 3:05 a.m.
| Original | Summarized |
8086 Microcode Browser - Small things retro |
The 8086 Microcode Browser, developed by Small things retro, represents a detailed exploration of the foundational microcode underpinning the Intel 8086 microprocessor. This interactive browser, born from extensive notes originally taken during the analysis of microcode extracted and disassembled by Andrew Jenner in 2020, provides a granular view into the complex operational mechanisms underlying the processor’s behavior. The core functionality of the browser revolves around the dissection of the 8086’s microcode ROM, presenting each 21-bit micro-instruction in a readable format accompanied by detailed tooltips. This layered approach allows users to readily understand the purpose of each instruction. A key feature is the “Browse by Instruction” option, which facilitates navigation through the approximately 300 documented 8086 instructions. Selecting an instruction within this list instantly directs the user to its corresponding microcode entry point, utilizing a database of approximately 60 unique microcode routines. The browser's revelations highlight the intricate and often counter-intuitive nature of the 8086's design. Several key observations emerge regarding register usage and internal naming conventions, underscoring the legacy of its evolutionary development. For instance, the same physical register ID, such as ‘10100’, can represent different values depending on whether it serves as a source or a destination, illustrating a nuanced contextual interpretation within the microcode. Similarly, ‘N’ and ‘R’ are identified as the same physical register, reflecting the processor’s design. Furthermore, the internal naming within the chip exhibits a significant degree of inconsistency, particularly concerning the designation of ‘SI’ as ‘IJ’, a consequence of the 8086’s design process. The browser’s analysis exposes critical details about the processor’s operation, notably concerning the instruction pointer (IP), which functions as the program counter (PC), but instead of directly pointing to the next instruction, it designates the subsequent prefetch address. To ensure accurate execution, especially when dealing with branching or interrupt handling, the microcode employs a dedicated micro-operation called ‘CORR,’ which meticulously rewinds the IP value to definitively capture the boundary of the next instruction. This intricate system is exemplified by the widespread reuse of micro-instructions for arithmetic functionalities. Almost all arithmetic instructions are predicated on a core set of four micro-instructions (008-00B), where the bulk of the processing is handled by a single micro-operation termed ‘XI.’ This operation demonstrates remarkable versatility, exhibiting varied arithmetic behaviors determined by both the opcode and the ModRM bits within the instruction. The significant degree of reutilization constitutes a functional elegance, reflective of the design constraints and priorities prevalent during the 8086’s conception in 1978. The “Browse by Instruction” function, combined with the detailed tooltips, allows a user to gain a fundamental understanding of the internal working conditions of the 8086 microprocessor. |