Question

In: Computer Science

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 = 1000:0002. (b) Illustrate POP CX if it is the subsequent instruction that accessed the Stack memory.

Solutions

Expert Solution

As you have mentioned you want question no 2 only

(a) Illustrate the PUSH BX instruction if BX =1234H and SS:SP = 1000:0002. (b) Illustrate POP CX if it is the subsequent instruction that accessed the Stack memory.

Stack is an area of memory for keeping temporary data. Stack is used by CALL instruction to keep return address for procedure, RET instruction gets this value from the stack and returns to that offset.

there are two instructions that work with the stack:

PUSH - stores 16 bit value in the stack.

POP - gets 16 bit value from the stack.

PUSH and POP work with 16 bit values only.

The stack uses LIFO (Last In First Out) algorithm

Here BX is the register so PUSH BX // store value of AX in stack

POP CX // set CX to original value of BX i.e 1234H

The exchange happens because stack uses LIFO (Last In First Out) algorithm

The stack memory area is set by SS (Stack Segment) register, and SP (Stack Pointer) register. Generally operating system sets values of these registers on program start

PUSH source" instruction does the following:

  • Subtract 2 from SP register.
  • Write the value of source to the address SS:SP.

The current address pointed by SS:SP is called the top of the stack


Related Solutions

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
If you can’t answer both I would rather you answer number 2 then. Thank you :)...
If you can’t answer both I would rather you answer number 2 then. Thank you :) 1) What is parasite-mediated apparent competition and how does it differ from classical competition? 2) Species A is the indigenous population on an island nation.  Species B was introduced to this island 200 years ago and shares the same habitat as species A.  During the ensuing 200 years since species B was introduced, and in the face of a growing human population, the population of species...
ONLY ANSWER #3 Thank you 1. What is the relationship among corporate, business and functional-level strategies...
ONLY ANSWER #3 Thank you 1. What is the relationship among corporate, business and functional-level strategies and how do they create value for the organization? Please ensure that after defining, you give specific examples of each. 2. What is a learning organization and how can it be beneficial? * 3. Perform a Self-SWOT analysis (Completed in Table format) Remember, the self-SWOT can really be beneficial for you, but you only get out of it what you put in. Formulate a...
Please answer and explain, thank you.1) Name 3 biological membranes besides the plasma membrane.2)...
1) Name 3 biological membranes besides the plasma membrane.2) How do ribosomal subunits move from their site of synthesis to their site of complete assembly?3) How is the behavior of simple, pure lipid vesicles similar to cells?4) Which term best describes oxidation? Which term best describes reduction? Which processes are usually exergonic? Which are usually endergonic? (Anabolism, Catabolism, Metabolism)
Please only answer no need to explain. Thank you 1. The three stages of aerobic respiration...
Please only answer no need to explain. Thank you 1. The three stages of aerobic respiration are ________________________________,       _____________________________ and _________________________________. 2.   Microorganisms that are able to respire oxidatively or fermentatively are called     ___________________________________. An example of such an organism is       _________________________________. When they grow aerobically they produce       _____________ ATPs and when they are anaerobic they produce _________ ATPs. 3.   Chemoheterotrophs are able to use _____________________________as a source of       __________________ and carbon, whereas photoautotrophs are able...
Create C program that takes 1 parameter: a number. Using that number, dynamically allocate a memory...
Create C program that takes 1 parameter: a number. Using that number, dynamically allocate a memory so you store that number of integers. Write integers in order starting from 1 until you fill all that memory. Print the addresses and values of the first and the last integer stored in the memory.
Create C program that takes 1 parameter: a number. Using that number, dynamically allocate a memory...
Create C program that takes 1 parameter: a number. Using that number, dynamically allocate a memory so you store that number of integers. Write integers in order starting from 1 until you fill all that memory. Print the addresses and values of the first and the last integer stored in the memory. Help ASAP!!!
Please only answer if you're 100% on the answer and can fully complete. Thank you. USE...
Please only answer if you're 100% on the answer and can fully complete. Thank you. USE FIRST-IN, FIRST-OUT COSTING Sulu Company produces its finished product in two processing departments--Assembly and Packaging. The following information is available for the month of July: Assembly Department: The beginning work-in-process inventory was $5,755 ($4,815 direct materials and $940 conversion costs) and consisted of 350 units that were 10% complete as to conversion costs. During July, an additional 4,500 units were started into production. A...
1. Provide 2 examples and 2 characteristics of ecdysozoans. typed answer please. thank you.
1. Provide 2 examples and 2 characteristics of ecdysozoans. typed answer please. thank you.
THERE IS NO MORE INFO, ONLY THIS, THANK YOU 2. It is illegal for any two...
THERE IS NO MORE INFO, ONLY THIS, THANK YOU 2. It is illegal for any two firms that sell similar products to engage in price fixing agreements. Violating the anti-trust laws can bring both civil and criminal prosecutions. Nevertheless, price fixing does take place. Examples would be found at the service plazas along the NY State Thruway and the NJ Turnpike. Each location has a small number of fast-food restaurants. Each fast-food restaurant belongs to a different firm, which should...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT