Question: ( a ) In this question, you may invent your own instruction set as long as it is reasonable for your program. You should also

(a) In this question, you may invent your own instruction set as long as it is reasonable
for your program. You should also comment your program properly.
The City Observatory is building an automatic system to issue bad weather
warning to the citizen. There is a rainfall meter and a wind speed meter to
measure the amount of rainfall (in mm) and the wind speed (in ms). The
control and status register of rainfall meter (RFCSR) has the following format:
Bit 0 Error bit, the rainfall meter is in error if bit=1
Bit 1 Ready bit, bit =1, the rainfall meter is ready
Bit 2 Data available, bit=1, data available in RFBR, automatically
cleared when RFBR has been read
Bit 3 Set this bit to start reading the rainfall meter.
Similarly, the control and status register of windspeed meter (WSCSR):
Bit 0 Error bit, the windspeed meter is in error if bit=1
Bit 1 Ready bit, bit =1, the windspeed meter is ready
Bit 2 Data available, bit=1, data available in WSBR, automatically
cleared when WSBR has been read
Bit 3 Set this bit to start reading the windspeed meter.
The buffer registers for rainfall meter and widspeed meter are RFBR and WSBR
respectively. The value return is the multiple of 0.1mm and 0.1ms. For example,
if 5 is read on the rainfall meter, the rainfall is 0.5mm.
The 7-segment LED display is used to display the weather condition, It is controlled
by the buffer register LEDBR. The value (from 0 to 9) written to LEDBR will be
displayed on the LED. If the value 10 is written, a hyphen (-) will be displayed.
Write an assembly language program that uses Programmed IO to read the
rainfall and windspeed meters continuously. [10]
If there is an error in either meter, display a "-" on the LED. Otherwise,
(b)(i) The above program uses programmed I/O. If interrupt-driven I/O is used
instead, describe what the process will be (no program needed), including
how the CPU services the interrupt, information saving and return. [3]
(ii) With reference to the program in part (a), if interrupt driven I/O is used,
which part of the program will not be needed anymore. [2]
 (a) In this question, you may invent your own instruction set

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!