Write an ASM program that evaluates the following expression, using variables: Z=(A-B)-(C-D) 1. Declare and initialize...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an ASM program that evaluates the following expression, using variables: Z=(A-B)-(C-D) 1. Declare and initialize the memory variable A to 32-bit signed integer value -54: and variable B to 16-bit signed integer value -3210. 2. Declare the memory variables C and D and read in their values from the keyb as 32-bit signed integer value -43210 and 8-bit signed integer values -10 a. You should display a message asking for the value of the variable example: "What is the value of C?" then b. Read in the value of C from the keyboard and then c. Display the value you have read beside (ie, to the right of) the mes "What is the value of C?". Then repeat for variable D in the next line. 3. Variable Z should be declared as a 32-bit signed integer. 4. Display the string "Z = (A - B) - (C-D)" alone in a single line. 5. Display the values of all the variables A, B, C, D together in the next line (in order in which they appear in the expression); each separated by 3 spaces a semicolumn and 3 spaces again. 6. Display an empty line. 7. Display the final result contained in variable Z, in binary, then in decimal, and in hexadecimal; each in a separate line. Write an ASM program that evaluates the following expression, using variables: Z=(A-B)-(C-D) 1. Declare and initialize the memory variable A to 32-bit signed integer value -54: and variable B to 16-bit signed integer value -3210. 2. Declare the memory variables C and D and read in their values from the keyb as 32-bit signed integer value -43210 and 8-bit signed integer values -10 a. You should display a message asking for the value of the variable example: "What is the value of C?" then b. Read in the value of C from the keyboard and then c. Display the value you have read beside (ie, to the right of) the mes "What is the value of C?". Then repeat for variable D in the next line. 3. Variable Z should be declared as a 32-bit signed integer. 4. Display the string "Z = (A - B) - (C-D)" alone in a single line. 5. Display the values of all the variables A, B, C, D together in the next line (in order in which they appear in the expression); each separated by 3 spaces a semicolumn and 3 spaces again. 6. Display an empty line. 7. Display the final result contained in variable Z, in binary, then in decimal, and in hexadecimal; each in a separate line.
Expert Answer:
Answer rating: 100% (QA)
ASM Program code Declare and initialize the variables A and B A DW 54 B DW 3210 Declare the variables C and D C DW 0 D DB 0 Display a message asking for the value of C mov ah 09h mov dx offset message... View the full answer
Posted Date:
Students also viewed these databases questions
-
Find the best alternative using incremental IRR analysis. A B D Initial cost $2000 4000 5000 3000 Annual benefit 800 1300 500 400 Salvage value 1400 2000 1500 3000 Life, in years 6 4 MARR required 6%...
-
Minimize the following expression using a K-map: F = AB + A B CD + CD + A B C D and then draw schematics using: (a) NAND gates. (b) NOR gates.
-
A B C D E G A country and western band is based in City A. They are planning a concert tour to the seven cities shown in the mileage chart shown to the right. Find the cheapest-link tour, and give...
-
1. The standard price per unit of materials is used in the calculation of which of the following variances? Materials price variance Materials quantity variance a NO NO b NO YES c YES NO d YES YES 2...
-
How are accounts classified in a classified balance sheet?
-
A soft drink machine dispenses only regular Coke and Diet Coke. Sixty percent of all purchases from this machine are diet drinks. The machine currently has 10 cans of each type. If 15 customers want...
-
Differentiate technology from methodology and from method. Can you come up with an example that differentiates these concepts in a specific context, perhaps software development?
-
A plastic ball has radius 12.0 cm and floats in water with 16.0% of its volume submerged. (a) What force must you apply to the ball to hold it at rest totally below the surface of the water? (b) If...
-
Image transcription text Week 4A Design Project 2: Ulysses - Starprobe (NASA-JPL) The primary objective of the Starprobe mission was to investigate the properties of the solar wind during the fly-by...
-
The following information is taken from the accounts of FasGrow Company. The entries in the T-accounts are summaries of the transactions that affected those accounts during the year. The overhead...
-
Tors Party & Rentals Tors Party & Rentals (TPR) is a party and novelty store located just north of Windsor. TPR is a private company, and was founded in 2008 by Amanda Harkings. TPR sells all kinds...
-
The following table shows the approximate speed of sound in air, water, and steel. Design a program that displays a menu allowing the user to select air, water, or steel. After the user has made a...
-
The following transactions occurred for Wilke Technology Solutions: Requirements 1. Open four-column accounts using the following account numbers: Cash, 110; Accounts Receivable, 120; Office...
-
After graduating, your success in business has put you in a position to purchase a house for \($500,000.\) You plan to put \($100,000\) down and borrow \($400,000.\) You need to decide on a mortgage,...
-
Donna Corporation manufactures custom cabinets for kitchens. It uses a normalcosting system with two direct-cost categoriesdirect materials and direct manufacturing laborand one indirect-cost pool,...
-
An electric motor drives a punching press. A flywheel fitted to the press has a radius of gyration \(0.4 \mathrm{~m}\) and runs at \(240 \mathrm{rpm}\). The press is capable of punching 600 holes per...
-
1. "Workplace bullying legislation has been proposed in 30 states. . . . No state has yet passed the legislation,". Why do you think workplace bullying has been so difficult to address with...
-
Proposals have been made to ?sail? spacecraft to the outer solar system using the pressure of sunlight, or even to propel interstellar spacecraft with high-powered, Earth-based lasers. Sailing...
-
To address his concern regarding the previous advisers asset allocation approach, Raye should assess the Laws portfolio using: A. a homogeneous and mutually exclusive asset classbased risk analysis....
-
Raye believes the previous advisers specification for debt is incorrect given that, for purposes of asset allocation, asset classes should be: A. diversifying. B. mutually exclusive. C. relatively...
-
Walker Patel is a portfolio manager at an investment management firm. After successfully implementing meanvariance optimization (MVO), he wants to apply reverse optimization to his portfolio. For...
Study smarter with the SolutionInn App