When global interrupts are disabled (GIE cleared) and any interrupt source, with the exception of the clock switch interrupt, has both its interrupt enable bit and interrupt flag bit set, one of the following will occur:
SLEEP instructionSLEEP instruction will execute as a
NOPSLEEP instructionSLEEP instruction will be completely
executedIn the event where flag bits were checked before executing a
SLEEP instruction, it may be possible for flag bits to have become set
before the SLEEP instruction completes. To determine whether a
SLEEP instruction executed, test the PD bit. If the PD bit is
set, the SLEEP instruction was executed as a NOP.
1 assumed. In
this case after wake-up, the processor calls the ISR at 0x0004. If
GIE = 0, execution will continue in-line.