Showing posts with label Difference Between Direct and Indirect Addressing Mode. Show all posts
Showing posts with label Difference Between Direct and Indirect Addressing Mode. Show all posts

Sunday, 10 May 2015

What is the difference between a direct and an indirect address instruction? How many refrences to memory are needed for each type of instruction to bring an operand into a processor register?

Question. What is the difference between a direct and an indirect address instruction? How many references to memory are needed for each type of instruction to bring an operand into a processor register

Answer.

Direct Address Instruction : In Direct address instruction second part of the instruction code implies memory address of operand.

Indirect Address Instruction: In this type of instruction code, second part of instruction code implies effective address of operand.

Have a look at this figure , you will get it.



Part B : 
A direct address instruction needs two references to memory: 
(1) Read instruction; (2) Read operand.
An indirect address instruction needs three references to memory:
(1) Read instruction; (2) Read effective address; (3) Read operand.