Question: Write assembly language programs to: -perform decision making using branch instructions. use syscall operations to display integers and strings on the console window use syscall

 Write assembly language programs to: -perform decision making using branch instructions.

Write assembly language programs to: -perform decision making using branch instructions. use syscall operations to display integers and strings on the console window use syscall operations to read integers from the keyboard. Assignment Description 1. Write a MIPS assembly language program that reads a customer's current and previous meter readings of electricity and a month to compute its electricity bill. If a customer spent 0 or less (technically this should not happen, though) KWH (kilowatt-hours) that is computed by current meter reading - previous meter reading, then the program should print out. "There is no bill to pay. " If a customer spent less than or equals to 300 KWH in a month, then the payment should be 20 dollars. If a customer spent more than 300 KWH in a month of May, June, July, August, or September, then the payment is computed by: payment = 20 + (used KWH - 300)/15: If a customer spent more than 300 KWH in any other month, then the payment is compute by: payment = 20 + (used KWH - 300) /20: Then if the payment is greater than 0, it should print out the payment amount, along with its used KWH. Name your source code file Assignment4.s. The following shows how it looks like in a C program: int currentMeter: int previousMeter: int usedKWH: int month: int payment: printf("Please enter the current electricity meter reading: "): //read an integer from a user input and store it in currentMeter scanf("%d", &currentMeter): printf("Please enter the previous electricity meter reading: "): //read an integer from a user input and store it in previousMeter scan f ("%d", &previousMeter): printf ("Please enter a month to compute their electricity bill, ") printf("Use an integer between 1 and 12 (1 for January, etc.): "): // read an integer from a user input and store in month scanf("%d", &month): usedKWH = currentMeter - previousMeter: if (useKWH 300 && month > = 5 && month

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!