Question

The use of which of the following AVR instructions within an interrupt service routine would necessitate saving the status re

Could you please explain the answer besides simply giving it?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)

Option A) is correct.

Explanation:-

RETI: Returns from interrupt service program. The return address from the called location is loaded from the Stack and the global interrupt flag bit in the status register is set.

Note that the status register flag bits are not automatically stored, before entering an interrupt service routine, and it is not restored back when returning from an interrupt routine.

This step of storing and restoring into stack the status register, must be handled by the application program. The stack pointer uses a pre-increment scheme during RETI.

Example :-

extint1: push r0 ; Save status register r0 on the stack
...
pop r0 ; Restore status register r0
reti ; Return and enable interrupts if any
Add a comment
Know the answer?
Add Answer to:
Could you please explain the answer besides simply giving it? The use of which of the following AVR instructions within an interrupt service routine would necessitate saving the status register at th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT