-1

I am trying to solve a homework problem which is as follows:

Assume that we have the following values in the given memory locations: Memory value table

Also assume that the base register R1 stores 200 and is always implicitly used for the indexed addressing mode. What datum is loaded into the accumulator if the instruction is LOAD 1000 for Immediate addressing modes, Direct addressing modes, Indirect addressing modes, Base(Indexed) addressing modes respectively.

A. 1300,1200,800,1100

B. 1000,1200,800,1300

C. 1000,1100,1200,800

D. 1000,1300,1230,800

Given answer is D.

How do we get 1230 as the value when Indirect addressing mode is used ?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
doge
  • 29
  • 4

1 Answers1

0

Looks like a typo in the question. The value at address 1300 is 1200, not 1230.

There's no 1230 in memory anywhere that's shown, and this is a load. In general the final value in a register after a load is definitely a value that was in memory (possibly zero or sign-extended). If it did any other computation it would be called something other than load.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847