Immediate value in the Instruction Direct register reference
Solution
Given Assembly Code:
Question1:
LOAD R4, 12+R9
It will load the immediate value of Register R9 + 12 into register R4. (Immediate Mode)
ADD R6, R5, R4
It will add the content of Register R4 with content of Register R5 , then will store the value in R6.
Here no memory access is required,hence Direct Register Reference mode.
Question 2:
No other address mode will be captured for the above instruction.
Question 3:
Whenever the instructions uses address field instead of the memory reference, Direct register addressing mode will be used. One of the disadvantage in using Direct register address is the address space is very limted.
Question 4 :
It is the simplest addressing mode in which the operand is available in the instruction itself. It will allow you to declare and use constant or set intial values for variables.It doesn\'t need the memory reference to acquire the operand.
Ex : move #400, R2; // move immediate value 400 in register R2.
