I am currently trying to solve a problem where I am given these criteria:
I believe that I have some of the answers correct but I am confused because the question mentions nothing about an address being stored at address 10 so how can indirect addressing even happen?
Question: Where is the corresponding operand given the following addressing modes?
Assume the address field of an instruction contains the decimal 10. Where is the corresponding operand given the following addressing modes?
- Immediate addressing: Operand- 10
- Direct addressing: Operand - 10 -> address
- Indirect addressing: 10 -> address -> address
- Register addressing:
- Register indirect addressing:
Can anybody help me out?
Here's the chart I'm using:
Updated where's:
Immediate addressing: The corresponding operand is located in the address field of the given memory. In all cases the operand is simply the value in the address field of the given memory location. So in this case the operand value would be 10.
Direct addressing: In direct addressing the address field contains the address of the operand. Therefore the corresponding operand is going to be whatever is stored for an operand at memory address 10.
Indirect addressing: In indirect addressing the contents of memory address 10 are the address to the operand. Therefore the address field of location 10 contains the address to the location holding the operand in its address field.
Register addressing: In register addressing the address field of memory location 10 holds an address to a register instead of another memory address. The corresponding operand is found inside the contents of the register.
Register indirect addressing: Register indirect addressing is very similar to register addressing because memory location 10 also holds an address to a location containing its operand, however; the difference is that the address could be to a register or to a memory location.