APPLICATION SYSTEM SOFTWARE
SYSTEMS SOFTWARE
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
____ setting their properties as Read-Only
|
|
____ copying them to secondary storage
|
|
____ copying them onto the stack
|
|
____ copying them onto the heap
|
Detailed explanation-1: -Context save An ISR always needs to save the “context” so that the interrupted code is unaffected by the computations of the ISR. In a system implemented without an RTOS, this is simply a matter of preserving any registers used by the ISR-generally on the stack-and restoring them before return.
Detailed explanation-2: -Each interrupt vector contains the address of the start of the ISR that will run for that interrupt. The CPU will then load the address of the ISR in the Program Counter Register (PC), so that the program then starts executing at the beginning of the ISR.
Detailed explanation-3: -An ISR is just a program written as a subroutine, with the register saves/recovery tacked on, then ended with a RETI instruction instead of RET. It can be located anywhere in program memory.
Detailed explanation-4: -When an interrupt request occurs, the stack is used as a place to temporarily save the flags of the program and the value of the PC that were running until just before the interrupt occurred.