Registers R1 and R2 of a computer contain the decimal values 1200 and 4600, we have to find effective adress of associated memory operand in each instruction:
Load 20(R1),R5 : This means load 20+R1 into R5 . R1= 1200 , R1 + 20 = 1220 , so R5 have 1220 , Effective address of R5 is 1220.
Move #3000,R5 : This means move value 3000 into R5 , so effective address is part of the instruction whose value is 3000.
Now R5 = 3000
Store R5,30(R1,R2) : This means 30+R1+R2 and store the result into R5 . so R5 = 30+1200+4600 = 5830 , so now R5 value is 5830 , the effective address is 5830.
Add -(R2),R5 : This means -1 from R2 value and store the result into R5 . So R5= 4600 - 1 = 4599 , effective address of R5 is 4599 .
Subtract (R1)+,R5 : This means effective address is contents of R1 so EA = 1200 .
Effective addresses are
- 1220
- 3000 [ it is not EA, it is the address of the instruction part where 3000 is stored ]
- 5830
- 4599
- 1200