Can anyone offer explanations please. This code did not work quite as I expected. It's a test routine for checking WDT/b0 IRQ on the F84 b0 - IRQ i/p (pushbutton, 10k pulldown, debounced). NB even though Option has been set for rising edge trigger, IRQ occurs on falling edge - comments ?) b6 - red LED b7 - green LED The flow is - push button to generate IRQ. Red LED on for 2s, red LED off for 2s, green LED on for 2s, exit. The middle section (zzz3) does show a low power sleep on a meter so I assume zzz2 and zzz4 sleeps are working too During this time, I expected b0 IRQs to be disabled. However, without the explicit "bcf inte", b0 IRQs can still occur, even though they should have been turned off by an implicit "bcf gie" on entry into the ISR. If the pushbutton is pressed while the green LED is on, it goes off and the red comes on, showing that ISR has been re-entered With "bcf inte" included, b0 IRQs are disabled as I thought they should have been. Why is this so ? I can find no reason for it in the documentation (it could be my paperwork that's deficient). What also puzzles me is why if the PB is pressed while the green LED is on (and IRQs are supposedly inactive), after the green goes off, the flow immediately goes back to lighting the red LED, ie an IRQ seems to be stored for processing after the current ISR is done, so why does the "bcf intf" have no effect (assuming intf had somehow been set) ? TIA org irq goto isr entry movlw 00h ;...o oooo tris porta movlw 01h ;oooo oooi tris portb movlw 0c8h ;pull-ups off, WDT, r/edge b0 INT option clrf porta clrf portb bsf inte ;enable b0 IRQ bsf gie zzz1 sleep ;wait for IRQ nop nop goto zzz1 ;loop if WDT, resume after isr ;IRQ routine isr bcf intf bcf inte bsf rled ;red on movlw 0a0h movwf count zzz2 sleep ;timeout1 incfsz count,f goto zzz2 bcf rled ;red off movlw 0a0h movwf count zzz3 sleep ;timeout2 incfsz count,f goto zzz3 bsf gled ;green on movlw 0a0h movwf count zzz4 sleep ;timeout3 incfsz count,f goto zzz4 bcf gled ;green off bcf intf bsf inte retfie -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.