Answer :- i) Here port C pin zero is being polled continuously. First port C data is being loaded in to aacumulator A and then using AND instruction bit zero is tested. If bit zero is found at logic low then "do something" part is being executed.
ii) In the polling method we can see that processor is doing one
task only i.e. polling the port C pin zero. No other task is being
done. If we implement the interrupt system then processor can do
other tasks and when interrupt comes, the "do something" part is
executed in the ISR.
We can use XIRQ pin of the 68HC11 controller. This is a level
sensitive interrupt pin. We connect same configuration to XIRQ pin
i place of port C pin zero.
iii) We can prioritize the interrupts. High priority interrupts will be served first. So as per the need, we can make the priority. XIRQ is a non-maskable and higher priority interrupt.
b. The following 68HC11 code forms part of a polling loop: LOOP LDAA PORTC ANDA #01 BNE LOOP do something More code...