Question: 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

QUESTION 1 TASK: You are making an embedded system for the futuristic McDonalds ice cream machine that has a built-in cash r 

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)

Step by Step Solution

3.51 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Date C Cod... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!