Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions