1. (5 points) Implement the following expression in assembly language: AX = (val3 + 7) -...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. (5 points) Implement the following expression in assembly language: AX = (val3 + 7) - (var2 + vall) + (5/3) +7 Assume that vall, val2, and val3 are 16-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. Initialize val1 with 12 (decimal), va 12 with 9 (decimal), and val3 with 2 (decimal) You are ONLY allowed to use 16-bit registers. Use ONLY mov, add, sub instructions whenever needed. Use the debugger to verify your answer. O Submit the following: Save your source code using your last name. Lastnamel.asm ▪ Screenshot (showing the code and register window) of AX register contains the correct result. O . 2. (5 points) Implement the following expression in assembly language: CX = -val2 vall + (-vall + val3) + 3 Assume that vall, val2, and val3 are 8-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. Initialize vall with 12 (decimal), val2 with 9 (decimal), and va13 with 2 (decimal) - You are NOT allowed to update the values stored in vall, val2, and val3 You are only allowed to use 16-bit registers to hold intermediate results, whenever needed. Use mov, add, sub, max.ex, XX, or neg instructions whenever needed. Use the debugger to verify your answer. Submit the following: Save your source code using your last name, Lastname2.asm and upload the Lastname2.asm ▪ Screenshot (showing the code and register window) of CX register contains the correct result. 3. (3 points) True/False (2.1) The instruction, var BYTE '?' Lastnamel.asm and upload the The above instruction declares a variable named var and keeps in uninitialized. (2.2) The instruction, var DWORD "ABCD" stores the string 'ABCD in to variable named var (2.3) The instruction, var BYTE "ABCD" stores the characters A, B, C, D in an array of characters named var (2 points) Declare a variable: (6 DUP 3 DUP (?) Varl DWORD 2 DUP What is the total size of the array Varl? Explain your answer. >> 1. (5 points) Implement the following expression in assembly language: AX = (val3 + 7) - (var2 + vall) + (5/3) +7 Assume that vall, val2, and val3 are 16-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. Initialize val1 with 12 (decimal), va 12 with 9 (decimal), and val3 with 2 (decimal) You are ONLY allowed to use 16-bit registers. Use ONLY mov, add, sub instructions whenever needed. Use the debugger to verify your answer. O Submit the following: Save your source code using your last name. Lastnamel.asm ▪ Screenshot (showing the code and register window) of AX register contains the correct result. O . 2. (5 points) Implement the following expression in assembly language: CX = -val2 vall + (-vall + val3) + 3 Assume that vall, val2, and val3 are 8-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. Initialize vall with 12 (decimal), val2 with 9 (decimal), and va13 with 2 (decimal) - You are NOT allowed to update the values stored in vall, val2, and val3 You are only allowed to use 16-bit registers to hold intermediate results, whenever needed. Use mov, add, sub, max.ex, XX, or neg instructions whenever needed. Use the debugger to verify your answer. Submit the following: Save your source code using your last name, Lastname2.asm and upload the Lastname2.asm ▪ Screenshot (showing the code and register window) of CX register contains the correct result. 3. (3 points) True/False (2.1) The instruction, var BYTE '?' Lastnamel.asm and upload the The above instruction declares a variable named var and keeps in uninitialized. (2.2) The instruction, var DWORD "ABCD" stores the string 'ABCD in to variable named var (2.3) The instruction, var BYTE "ABCD" stores the characters A, B, C, D in an array of characters named var (2 points) Declare a variable: (6 DUP 3 DUP (?) Varl DWORD 2 DUP What is the total size of the array Varl? Explain your answer. >>
Expert Answer:
Answer rating: 100% (QA)
Solution I can give one answer and i am trying to solve ... View the full answer
Related Book For
Posted Date:
Students also viewed these chemical engineering questions
-
Write the following expression in a simpler form: (x + 2x)? x(x 2) + 12x4 6x3 + 12x4 B =
-
Consider the following expression in C: a/b > 0 && b/a > 0. What will be the result of evaluating this expression when a is zero? What will be the result when b is zero? Would it make sense to try to...
-
Is there any way to implement truly stable storage? Explain your answer.
-
Find the critical points of the function. Then use the Second Derivative Test to determine whether they are local minima, local maxima, or saddle points (or state that the test fails). f(x, y) = x -...
-
Do you favour anti-gouging laws as a means of protecting consumers from high prices following natural disasters, such as Hurricane Katrina in New Orleans? If so, why? If not, why not?
-
In a paragraph, explain why risk management is considered an art and a science.
-
Discuss the place of selling in the marketing mix.
-
Diaz Company was organized on January 1. During the first year of operations, the following plant asset expenditures and receipts were recorded in random order. InstructionsAnalyze the foregoing...
-
what ways do power dynamics influence the outcome of conflict resolution processes, and how can imbalances be addressed to ensure fairness and equity ?
-
? Dean and Ellen Price are married and have a manufacturing business. They bought a piece of business equipment (7-year personal property) on 4/1/2017 for $50,000. Use half-year convention to...
-
On June 24, 2021, Erika purchased a duplex with the intent of renting both units. The seller, Emanuel, had fallen behind on payments, so Erika paid Emanuel $50,000 in cash and assumed the $225,000...
-
The firm sold one of its fixed assets just as the year ended. Would this imply that operating cash flow for the year was a larger figure, a smaller figure, or would have no effect on its operating...
-
1. What is the difference between invitation to treat and offer? 2. Explain the statement "acceptance must be absolute and unqualified." Question 3 Ali goes to the convenience store to buy a can of...
-
Find the complete solution of the linear system, or show that it is inconsistent. (If the system has infinitely many solutions, express your answer in terms of t, where x = x(t), y = y(t), and z=t....
-
Marianne's duplex sold at a foreclosure auction for $280,000. At the time of foreclosure, she had not made any payments to the bank for 11 months ($2,400 each). The outstanding balance of her...
-
Discuss the innovative idea/project addressing the problem below by the following (a) potential impact - (b) novelty and innovation- (c) feasibility- (d) sustainability- Reference: i. Potential...
-
Read the letter and then answer the questions. Midwest Nurseries Proposal Purchaser and Site for Work April 29, 2023 Mr,Edwin Banks 115Carriage Way Midwest, IL65432 RE: Landscape Improvement for...
-
Modify the CYK algorithm so that it applies to any CFG, not just those in CNF.
-
Write an LL(1) parser generator in purely functional Scheme. If you consult Figure 2.24, remember that you will need to use tail recursion in place of iteration. Assume that the input CFG consists of...
-
Consider the following regular expression in Perl: /^(?:((?:ab)+) |a((?:ba)*))$/. Describe, in English, the set of strings it will match. Show a natural NFA for this set, together with the minimal...
-
Explain how you might implement setjmp and longjmp on a SPARC.
-
The spectral density of a random signal is given by \[S(f)= \begin{cases}0.0001 \mathrm{~m}^{2} / \text { cycle } / \mathrm{s}, & 10 \mathrm{~Hz} \leq f \leq 1000 \mathrm{~Hz} \\ 0, & \text {...
-
Fill in the Blank. Univariate distributions describe the probability distributions of __________ random variables.
-
What is a marginal density function?
Study smarter with the SolutionInn App