Email or username:

Password:

Forgot your password?
Top-level
Ken Shirriff

Adding to memory "ADD [SI],AX" uses the same microcode. A microcode subroutine gets the SI address and reads (R) from memory. Now M represents the memory value. The microcode adds, then falls through to write (W) the result to memory due to the writeback (WB) condition.

5 comments
Ken Shirriff

Each of the 8 addressing formulas has a short microcode subroutine to compute the effective address. The 8086's Translation ROM determines the appropriate 13-bit microcode address based on the ModR/M byte.

Ken Shirriff

For an addressing mode with a displacement "ADD AX,[SI+1234]", a few more lines of microcode fetch the displacement bytes (e.g. 1234) from the instruction prefetch queue (Q), put them in tmpB, and add them to the SI value.

Ken Shirriff

The 8086 chip squeezed a lot of functionality into just 512 words of microcode, making hardware take care of details. The die photo shows these functional blocks on the die. Microcode takes a large area but even registers (like M and N) use a substantial area of the silicon.

Ken Shirriff

Microcode is very low level and pretty tricky, but hopefully this brief Mastodon explanation makes some sense. For a more detailed look at microcode, see my blog post: righto.com/2023/02/8086-modrm-

Ken Shirriff replied to Ken
Go Up