1
\$\begingroup\$

I wonder how a multi-bytes instruction is executed when there is only 16-bit data bus? Assume the instruction is MOV AX,[10H]. The machine code of this instruction is 3 bytes. By combining the CS:IP registers, a 20-bit address is generated and there three bytes (which represents the machine code of that instruction) is accessed.

                 |           |
        CS:IP -> +-----------+
                 |    A0     |
                 +-----------+
                 |    10     |
                 +-----------+
                 |    00     |
                 +-----------+
                 |           |

As you can see, we have to put A01000 on the data bus.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I'm guessing it needs multiple cycles to fetch the whole instruction (if I'm understanding your question correctly). \$\endgroup\$
    – tangrs
    Oct 1 '15 at 12:18
3
\$\begingroup\$

Intel 8086 processor doesn't execute commands directly from data bus. Instead, commands at CS:IP are fed into 6-byte prefetch queue and executed from there. This queue was specifically designed to accommodate a complete instruction, and the maximum instruction length on 8086 is limited to 6 bytes.

\$\endgroup\$
1
  • \$\begingroup\$ Yeah, bad phrasing. Certainly the instruction length was used to define the queue size, not the other way around. \$\endgroup\$ Oct 1 '15 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.