QUESTION 1 TASK: You are making an embedded system for the futuristic McDonald's ice cream machine...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
QUESTION 1 TASK: You are making an embedded system for the futuristic McDonald's ice cream machine that has a built-in cash register. Your program will take inputs int R1, R2 and R3. R1 is the amount of regular ice creams that a person orders, R2 is the amount of chocolate dipped ice creams that a person orders, and R3 is the time of day (on a 24-hour scale). Even though we are in the future, the ice cream machines still never work. Thus, the only times they do work are between hours 9-15 (9AM - 3PM). Assuming the machine is working, the person can either order a regular ice cream cone ($1) or a chocolate dipped ice cream cone ($2). Create a program that does the following . Checks the time of day . If the ice cream machine works, calculate the order total . If the ice cream machine does not work, give the order a total of 0 Some rules • We do not care what registers you use for your project. You CANNOT use RO, that will break the program. Besides that, you can use any registers. The only values you can pass into the first Macro parameters are o a register representing the amount of regular ice creams o a register representing the amount of chocolate ice creams o a register representing the time o an empty register that will represent the end value (total cost) . You must use TWO (2) macros. One macro must be the actual ice cream system that checks the time, and the other must be a macro that calculates the total cost of the order. The total cost macro must be called within the ice cream machine macro (just like macro-ception example) o I recommend building the most basic macro first, then the more complex macro, then building your body. • The one macro (the ice cream machine system) must check the time. Depending on the time, the macro might or might not call the register macro to calculate the cost of the order. • The other macro (the cost calculator) will calculate the cost of the ice cream order. You MUST use LOOPS to calculate the cost, you cannot use multiplication. o You also CANNOT use CMP for the loop. o You can use as many loops as you like (i.e. more than one) QUESTION 1 TASK: You are making an embedded system for the futuristic McDonald's ice cream machine that has a built-in cash register. Your program will take inputs int R1, R2 and R3. R1 is the amount of regular ice creams that a person orders, R2 is the amount of chocolate dipped ice creams that a person orders, and R3 is the time of day (on a 24-hour scale). Even though we are in the future, the ice cream machines still never work. Thus, the only times they do work are between hours 9-15 (9AM - 3PM). Assuming the machine is working, the person can either order a regular ice cream cone ($1) or a chocolate dipped ice cream cone ($2). Create a program that does the following . Checks the time of day . If the ice cream machine works, calculate the order total . If the ice cream machine does not work, give the order a total of 0 Some rules • We do not care what registers you use for your project. You CANNOT use RO, that will break the program. Besides that, you can use any registers. The only values you can pass into the first Macro parameters are o a register representing the amount of regular ice creams o a register representing the amount of chocolate ice creams o a register representing the time o an empty register that will represent the end value (total cost) . You must use TWO (2) macros. One macro must be the actual ice cream system that checks the time, and the other must be a macro that calculates the total cost of the order. The total cost macro must be called within the ice cream machine macro (just like macro-ception example) o I recommend building the most basic macro first, then the more complex macro, then building your body. • The one macro (the ice cream machine system) must check the time. Depending on the time, the macro might or might not call the register macro to calculate the cost of the order. • The other macro (the cost calculator) will calculate the cost of the ice cream order. You MUST use LOOPS to calculate the cost, you cannot use multiplication. o You also CANNOT use CMP for the loop. o You can use as many loops as you like (i.e. more than one)
Expert Answer:
Related Book For
Intermediate Accounting principles and analysis
ISBN: 978-0471737933
2nd Edition
Authors: Terry d. Warfield, jerry j. weygandt, Donald e. kieso
Posted Date:
Students also viewed these accounting questions
-
Calculate the book value of a three-year-old machine that has a cost of $45,000, an estimated residual value of $5,000, and an estimated useful life of four years. The company uses...
-
Macinski Leasing Company leases a new machine that has a cost and fair value of $95,000 to Maggie Sharrer Corporation on a 3-year non-cancelable contract. Maggie Sharrer Corporation agrees to assume...
-
Delphi Leasing Company leases a new machine that has a cost and fair value of $225,000 to Lindy Corporation on a 5-year noncancelable contract. Lindy Corporation agrees to assume all risks of normal...
-
Exporting files into binary files is done in O Logical files O Physical backup O Physical full backup O Physical partial backup L
-
Why do you think the Xbox is designed in the United States and Japan but built in China?
-
1. Describe what a line of credit involves, and explain the legal obligation of a bank to provide capital with a line of credit. 2. On what three priorities might Bank-RI representative Matt Weiner...
-
Discuss the themes, theory, and/or phenomenon that would be anticipated to emerge as a result of the examination. Develop a hypothetical research scenario that would necessitate the use of the Action...
-
Make versus buy, activity-based costing, opportunity costs. The Weaver Company produces gas grills. This year's expected production is 20,000 units. Currently, Weaver makes the side burners for its...
-
2. Let h1(t), h2(t) = C[0, ) and (x) L(0, L). Consider the following one- dimensional heat equation: u = kuxx, 0 0, ux (L,t) = h2(t), t> 0, 0
-
1. What is your assessment of the financial performance of Nelson Nurseries? 2. Do you agree with Christine Barton?s accounts-payable policy? 3. What explains the erosion of the cash balance? 4. What...
-
1) At current time t = 0 an asset is traded at 100. Its volatility is 30% and it pays 2% continuous dividend yield. The risk free interest rate is 3%. a. What is the price of a continuously sampled...
-
Could you elaborate on the mechanisms by which healthcare activities are designed to enhance an individual's health?
-
Provide two examples of Duty of Care provided by your organization. Explain each and provide real-world examples. As a manager in an organization, what role do you play in Duty of Care cases?
-
4. Hoak Company's common stock is currently selling for $50. Last year's dividend was $1.83 per share. Investors expect dividends to grow at an annual rate of 9% into the future. What is Hoak's cost...
-
The distance from Punta Gorda to Fort Myers is 50 km. If you drive at an average speed of 60 km.h-1, how long will it take for you to travel this distance? If you covered this distance in 42 minutes,...
-
Three years after Drew forms the corporation, he decides to combine his business with that of Michael. Michael contributes assets (FMV $500,000; A.B. $200,000) to the corporation for half of its...
-
A camera is dropped from a balloon descending at 3.20 m/s lands on the ground 5.60 s later. What was the altitude of the balloon at the moment the object was dropped?
-
Q:1 Take any product or service offered in Pakistan and apply all determinents of customer Perceived value ?
-
Gul Ducat Corporation has outstanding 2,000,000 shares of common stock of a par value of $10 each. The balance in Retained Earnings at January 1, 2008, was $24,000,000, and it then had additional...
-
How are FASB discussion memoranda and FASB exposure drafts related to FASB statements?
-
The management of Luis Andujar Inc. was discussing whether certain equipment should be written off as a charge to current operations because of obsolescence. This equipment has a cost of $900,000,...
-
Prove the general thermodynamic relationship \[\left(\frac{\partial c_{p}}{\partial p} ight)_{T}=-T\left(\frac{\partial^{2} v}{\partial T^{2}} ight)_{p}\] and evaluate an expression for the variation...
-
It is required to specify an ideal closed cycle gas turbine to produce electricity for a process plant. The first specification requires that the turbine produces the maximum work output possible...
-
For a van der Waals gas that obeys the state equation \[p=\frac{R T}{v-\mathrm{b}}-\frac{\mathrm{a}}{v^{2}}\] shows that the coefficient of thermal expansion, \(\beta\), is given by \[\beta=\frac{R...
Study smarter with the SolutionInn App