MIPS assembly language please help
Write a program for a grocery store to calculate the total charge for customers.
In the main:
Your program should ask customer the number of items that he/she is purchasing and it should check to see it is less than or equal to 20 items , then your program should passthan number to FillPriceArray subroutine.
FillPriceArray subroutine fills the array, accumulate the prices and returnthe sumto main.
In the main you get the number of couponsform user (it should be the same as the number of items)and pass the coupon number to FillCouponArray function.
FillCouponArray function gets the coupon amount. The coupon should be less than item price and coupon should not be more than $10 if the coupon is more than item price or exceed $10 then you place 0 in the CouponArray for that coupon. Also the FillCouponArray function accumulates the coupons and return it to main. Finally your main program should calculate the total charge by subtracting the total price from total discount coupons and out put the total charge with a thank you massage on the screen.
Please enter the number of item you are purchasing(should be less than or equal to 20)
Sorry too many items to purchase!! Please enter number of items you are purchasing
Please enter the price of item 1
Please enter the price of item 2
Please enter the price of item 3
Please enter the number of coupons that you want to use.
Too many Coupons!!Please enter the number of coupons that you want to use.
Please enter the amount of coupon 1
This coupon is not acceptable
Please enter the amount of coupon 2
Please enter the amount of coupon 3
Your total charge is: $30
Thank you for shopping with us.
Some definitions required to know before doing this program: -
1.What is Mars?
2.What is MIPS?
3.What is MARS MIPS Simulator
Let’s us explain one by one-
Mars: It’s an Integrated Development Environment for Mips (Microprocessor without Interlocked Pipelined Stages) Assembly Language Programming to perform the mips various tasks in the Processor.
Mips (Microprocessor without Interlocked Pipelined Stages): Its used to measure the computer performance, how much a computer can do a work more than one simultaneously in same time. It’s also used to calculate the measurement of cost of computing. The speed of the computer is measured by the MIPS.
MARS MIPS Simulator is an assembly language editor, or you can say it’s an IDE for the MIPS instructions.
Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*See Solution
Q: The code you will need for this assignment is here (in C file) /* YOUR NAME HERE* CSCI 4100* Progr...
A: C shell is a type of command processor which enables user to write and modify commands .It can also ...
Q: What can you show me about Python rules and methods?
A: Note:The following summary is about some syntax rules followed in python and rules to define a metho...
Q: How would I go about writing this program?
A: Create a class and get int type data from a user, to print the number of lines on console.Use three ...
Q: Describe the process of how to solve the substitution cipher below and solve it: ZFSZB YESUK SQYDJ S...
A: The process is as follows:scan to look for single letter words – they would most likely correspond t...
Q: Briefly discuss the advantages and disadvantages off frequent software upgrades
A: Advantages of frequent software upgrades:Software upgrades can increase the performance of the syst...
Q: Please explain all steps: What Boolean equation is represented by the following K-Maps: a) ...
A: K-Map simplificationFor 3 variables adjacent groups of 2 cells, or 4 cells (1 x4 or 2 x 2), for 4 va...
Q: The category of operating system used for handheld devices.
A: Handheld DevicesA handheld device is an electronic or a computing device that can be carried in our...
Q: What is it when they say 4g or 5g phone network
A: The usage of 4G or 5G defines that the mobile phone includes 4G or 5G network for the communication....
Q: Describe an application where smart cards provide sufficient security but magnetic stripe cards do n...
A: Smart Card A smart card, ICC (integrated circuit card) is a plastic card. A smart card may have a ma...