Question: Write a mips assembly language program that allows you to simulate a car crash alert program. The keyboard will be used as inputs. The display

Write a mips assembly language program that allows you to simulate a car crash alert program. The keyboard will be used as inputs. The display will print the scenario based on input. USE POLLING METHOD!

Initial Conditions. Assume that you are braking and the speed is 0

You will poll the keyboard. Ignore all inputs other than A, B, C and S

If A occurs assume we are accelerating and no longer braking PRINT car acel. If A occurs and we are already accelerating nothing changes.

If B occurs assume we are braking and no longer accelerating PRINT car brak. If B occurs and we are already braking nothing changes.

If C occurs PRINT car crash . If speed is equal to or below 15mph PRINT Airbag no deploy. If speed is above 15mph and below 45mph PRINT Airbags deployed. If speed is equal to or above 45mph and Braking then PRINT Airbags deploy Ambulance no alert

If speed is equal to or above 45mph and Accelerating then PRINT Airbags deploy Ambulance alerted!

If S occurs then input the numbers until next S. This will be the speed of the vehicle. Hence input = S27S means the speed is 27mph. HINT you will need to convert the number read from ascii format.

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!