Question

In: Computer Science

There are 3 forms of Program Memory Addressing Modes: Direct, Relative and Indirect. Explain/Illustrate what happens...

There are 3 forms of Program Memory Addressing Modes: Direct, Relative and Indirect. Explain/Illustrate what happens to CS and IP registers if the JMP THERE instruction is stored at memory address 10000H (CS=1000H, IP=0000H) and the address of THERE is:


(A) 10020H
(B) 30000H

Solutions

Expert Solution

(A) Address of THERE is 10020H

Direct addressing -

The current value of IP which holds the address of next instruction to be executed will be stored in the TOP OF THE STACK. Now, the IP will be replaced by the mentioned value, i.e. IP <- 10020H

Now, the Memory address is calculated as: (Contents of CS) X 10H + (contents of IP).

Indirect addressing -

Suppose that the content present at address 10020H is 0003H. So, the working of the microprocessor for executing the above instruction will be as follows:

IP <- content present at 10020H
    i.e.        IP <- 0003H

And the required memory address is calculated in a similar way as in Direct Addressing mode: (Contents of CS) X 10H + (contents of IP).

Relative addressing -

In this mode, the Effective Address (EA) of the operand is calculated by adding the content of the CPU register and the address part of the instruction word. The effective address is calculated by adding displacement (immediate value given in the instruction) and the register value.

EA = CPU Register + Displacement

(B) Address of THERE is 30000H

Direct addressing -

The current value of IP which holds the address of next instruction to be executed will be stored in the TOP OF THE STACK. Now, the IP will be replaced by the mentioned value, i.e. IP <- 30000H

Now, the Memory address is calculated as: (Contents of CS) X 10H + (contents of IP).

Indirect addressing -

Suppose that the content present at address 30000H is 0003H. So, the working of the microprocessor for executing the above instruction will be as follows:

IP <- content present at 30000H
    i.e.        IP <- 0003H

And the required memory address is calculated in a similar way as in Direct Addressing mode: (Contents of CS) X 10H + (contents of IP).

Relative addressing -

In this mode, the Effective Address (EA) of the operand is calculated by adding the content of the CPU register and the address part of the instruction word. The effective address is calculated by adding displacement (immediate value given in the instruction) and the register value.

EA = CPU Register + Displacement

Related Solutions

Describe the indirect indexed addressing modes of CPU12. Illustrate with detailed examples of all addressing modes....
Describe the indirect indexed addressing modes of CPU12. Illustrate with detailed examples of all addressing modes. In the response space, give two paragraphs: 1- An Explanation: complete this part in the answer section 2- An example: complete this part in the answer section
ANSWER NUMBER 2 ONLY THANK YOU! :) 1) (a)There are 3 forms of Program Memory Addressing...
ANSWER NUMBER 2 ONLY THANK YOU! :) 1) (a)There are 3 forms of Program Memory Addressing Modes: Direct, Relative and Indirect. Explain/Illustrate what happens to CS and IP registers if the JMP THERE instruction is stored at memory address 10000H (CS=1000H, IP=0000H) and the address of THERE is: (A) 10020H (B) 30000H (b) Determine whether the JMP THERE instructions are SHORT, NEAR or FAR jump. Explain your answer. 2) (a) Illustrate the PUSH BX instruction if BX =1234H and SS:SP...
what are the different addressing modes used in unconditional branch/ jump instructions? Illustrate how the new...
what are the different addressing modes used in unconditional branch/ jump instructions? Illustrate how the new program counter value is calculated in each case.
Why would memory indirect addressing (i.e., the instruction contains a memory address A, which in turn...
Why would memory indirect addressing (i.e., the instruction contains a memory address A, which in turn is a pointer to memory location B which contains the value) be difficult to implement on the hardware in Figure 5.8?
Differentiate between a direct cost and an indirect cost of a segment. What happens to these...
Differentiate between a direct cost and an indirect cost of a segment. What happens to these categories if the segment to which they are related is eliminated?
What are the modes by which FDI occurs? What is the forms of FDI and what...
What are the modes by which FDI occurs? What is the forms of FDI and what is the difference between the two?
Explain the direct and indirect costs of youth violence?
Explain the direct and indirect costs of youth violence?
Explain briefly Foreign Direct Investment. What are the different forms of FDI?
Explain briefly Foreign Direct Investment. What are the different forms of FDI?
1. What are direct bankruptcy costs? 2. What are indirect bankruptcy costs? 3. What are the...
1. What are direct bankruptcy costs? 2. What are indirect bankruptcy costs? 3. What are the agency costs of equity
(a) Why is indirect finance, relative to direct finance, more widely used for channelling funds? (15...
(a) Why is indirect finance, relative to direct finance, more widely used for channelling funds? (b) How does the moral hazard affect the choice between debt and equity contracts? How does a debt contract reduce the problem of moral hazard?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT