Detailed reference for the RETFIE instruction in PIC18 ISA.
Return from interrupt and re‑enable interrupts.
; Basic return from an ISR
RETFIE ; Pop PC from stack, set I=1; Basic return from an ISR
RETFIE ; Pop PC from stack, set I=1; Return from Timer0 ISR
RETFIE ; Restore PC and enable interrupts again; Return from Timer0 ISR
RETFIE ; Restore PC and enable interrupts again; Return after deliberately disabling interrupts
RETFIE ; I bit restored to 1, execution continues in main code; Return after deliberately disabling interrupts
RETFIE ; I bit restored to 1, execution continues in main code