Question: I need help constructing this cortex - m 4 assembly ( 2 5 points ) The door in the doorway egress problem can allow three

I need help constructing this cortex-m4 assembly
(25 points) The door in the doorway egress problem can allow three robots at a time
to exit. In the algorithm, robots arrange themselves so that each has a clear path to the
door, and they then exit three at a time, with the three closest robots exiting
simultaneously. Each robot must determine if it is among the three to exit. Construct a
Cortex-M4 assembly program for a robot r to do the following. Robot r holds an array
distance with the distance of each other robot to the center of the door. Let
robots_(s)een hold the number of other robots. Variable own_(d)istance holds the distance
from r to the center of the door. Determine if r is one of the three closest robots. If so,
set variable exit to 1 ; otherwise, set exit to 0.(Note: Each distance is an unsigned
integer. We could instead consider each distance as a Q5 number, but that would not
change the program.). You can assume that no two distances are the same.
Demonstrate your results to the lab TA.
Sample results for Part 2- For the following inputs:
distance =78,291,12,466,280
robots_(s)een =5
own_(d)istance =501
the following output is produced:
exit =0
(If own_(d)istance =101, then exit =1.)
I need help constructing this cortex - m 4

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 Programming Questions!