Question

. Write a sequence of instructions to compute the following arithmetic expression and store the result...

. Write a sequence of instructions to compute the following arithmetic expression and store the result in register DX: 7 + (-20) * 14 - (-10) * 8– 9

Trace the contents of registers, assume initial contents are 0000

Instruction

AX

BX

CX

DX

Remark

initial

0000

0000

0000

0000

Homework Answers

Answer #1

The sequence of instructions are as follows:

1.MOV AX,-20
2. MUL AX,14
3. MOV BX,-10
4. MUL BX,8
5. MOV CX,9
6. SUB AX,BX
7. SUB AX,CX
8. MOV DX,7
9. ADD DX,AX

The content of registers are shown as below:

Instruction AX BX CX DX Remark
Initial 0 0 0 0
MOV AX,-20 -20 0 0 0 Move -20 to Register AX
MUL AX,14 -280 0 0 0 Multiply 14 to Register AX
MOV BX,-10 -280 -10 0 0 Move -10 to Register BX
MUL BX,8 -280 -80 0 0 Multiply 8 to Register BX
MOV CX,9 -280 -80 9 0 Move 9 to Register CX
SUB AX,BX -200 -80 9 0 Subtract BX from AX and store the result in AX
SUB AX,CX -209 -80 9 0 Subtract CX from AX and store the result in AX
MOV DX,7 -209 -80 9 7 Move 7 to Register DX
ADD DX,AX -209 -80 9 -202 Add DX and AX and store the result in DX
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the...
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the contents of registers B and A are                                  Rd= B= XBH                         Rs= A = 1FH              After the execution of instruction.                                 Rd= B = ?                         Rs= A = ? ADD B If A= E 3H   B=  0 4H then after the  execution of the above instruction the content of A = ? SUI 03H If the value of A = 15Hthen after the execution of the above instruction...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number of address lines is: * 17 19 16 15 20 14 18 2-Which of the following instructions requires (BYTE PTR)? * SHR [500H], 3h LDS SI, [1000H] LAHF PUSH [9AAH] ADD AX, [800H] 3-Where are the interrupt vectors located in the microprocessor’s memory? * in the first 64K byte in the first 1K byte in the first 256K byte in the first 1M byte...
Write a Java program to print the result of the following operations. Your program should contain...
Write a Java program to print the result of the following operations. Your program should contain 4 methods (for each of given data sets). Yes, methods here are not structurally necessary, this requirement is only for you to get practice writing methods. Test Data: a. -8 + 4.0 * 6 b. (11+9) % 9 c. 20 + (-3)*3.0 / 8 d. 5 + 14 / 3 * 2 - 7 % 3 Your program:
AMD 376 Merchandise Planning and Control Instructions :Please write down all calculation procedures used to come...
AMD 376 Merchandise Planning and Control Instructions :Please write down all calculation procedures used to come up with the final answer on a separate sheet of paper. Please circle or highlight your final answer. Missing calculations and not rounding to TWO decimal places (where applicable) will result in zero points. Each question is worth 5 points. 1.A buyer was shopping for women’s blouses and selected a group priced at $175.00 per dozen. Merchandising considerations dictated a markup of 58.5%.Calculate the...
3.   Consider the following data set for an office structure built by Anderson Construction Co. The...
3.   Consider the following data set for an office structure built by Anderson Construction Co. The completed building is nine stories. However, construction was interrupted by a fire after 5.3357 floors were completed. At the time of the fire, Anderson had used 54,067 hours of labor to construct the first 5.3357 stories of the building. It then took Anderson an additional 40,750 labor hours to complete this nine-story building. In this problem, FLRCOM is the number of floors completed, and...
1) Describe an example of each of the following that may be found of your kitchen:...
1) Describe an example of each of the following that may be found of your kitchen: Explain how your choice falls into this category, and if there is a chemical name or symbol for it, provide that as well. Provide a photo of your example with your ID card in it. a) a compound b) a heterogeneous mixture c) an element (symbol) Moving to the Caves… Lechuguilla Caves specifically. Check out this picture of crystals of gypsum left behind in...
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old...
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old man of Scandinavian descent was rushed to the Emergency Room of your local hospital after a family member discovered him unconscious in his home. The woman who dialed “911” told the dispatcher that the man, her brother, was the local librarian of the past 10 years and had no spouse or children. She reported that they had spoken the day before, and he had...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT