Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. A weather station , Sensor A and Sensor B, at opposite a control program reads an12-bit temperature value from ends of a town. Each

image text in transcribed
7. A weather station , Sensor A and Sensor B, at opposite a control program reads an12-bit temperature value from ends of a town. Each hour has two temperature sensors program e value in a 24 element half-word array called TEMPA. At the same time it reads an 12-bit temperature al Aer 24 a 24 element half-w it temperature value from Sensor B and puts the value in ord array called TEMPB. After 24 hours, the control program e to generate a rounded average for each pair of hourly readings ges in a third 24 half-word array called TEMPAV. To unded average for each pair of hourly temperatures, the mainline calls a procedur and puts the retur ned avera ompute the ro progra The procedure passes m passes a pair of values to a procedure that does the actual computation. EMPAV array. Also, if an average value is 32 dearees 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 each hourly average back to the mainline to be put in the 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

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

More Books

Students also viewed these Databases questions

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago