Question: 7. A weather station has two temperature sensors , Sensor A and Sensor B, at opposite ends of a town. Each hour a control program

 7. A weather station has two temperature sensors , Sensor A

7. A weather station has two temperature sensors , Sensor A and Sensor B, at opposite ends of a town. Each hour a control program reads an12-bit temperature value from e value in a 24 element half-word array called TEMPA. At the program same time it reads an 12-bit temperature al Aer 24 it temperature value from Sensor B and puts the value in a 24 element half-w calls a procedur and puts the returned averages i ompute th progra The procedure passes ord array called TEMPB. After 24 hours, the control program e to generate a rounded average for each pair of hourly readings n a third 24 half-word array called TEMPAV. To e rounded average for each pair of hourly temperatures, the mainline m passes a pair of values to a procedure that does the actual computation. each hourly average back to the mainline to be put in the EMPAV array. Also, if an average value is 32 degrees or less, the procedure will write a value of 0xFF to a memory location called FREZWARN. The averages for the past 24 hours and, if appropriate, a Freeze Warning will be shown on the evening weather report. 7a. Using STANDARD PROGRAM STRUCTURES shown in Chapter 3, write the ALGORITHM for the mainline section of the program. Include the steps required to pass the required parameters to the procedure, call the procedure for each calculation, and store each returned average value in the TEMPAV array. Assume the stack and R13 have already been initialized and that you will save registers in the procedure as needed

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!