Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

image text in transcribed
image text in transcribed
A weather station has two temperature sensors, Sensor A and Sensor B, at opposite ends of a town. Each hour a control program reads an 8-bit temperature value from Sensor A and puts the value in a 24 element byte array called TEMPA. At the same time it reads an 8-bit temperature value from Sensor B and puts the value in a 24 element byte array called TEMPB. After 24 hours, the control program calls a procedure to generate a rounded average for each pair of hourly readings and puts the returned average in a third 24 byte array called TEMPAV. To compute the 9 0 rounded average for each pair of hourly temperatures, the mainline program passes a pair of values to a procedure that does the actual computation. The procedure passes each hourly average back to the mainline to be put in the TEMPAV 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. 3 Using STANDARD PROGRAM STRUCTURES 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 pair of values, and store the 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_2

Step: 3

blur-text-image_3

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 Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students explore these related Databases questions