RETFIE

Return from Interrupt

Return from interrupt. The stack is POPed and the top of the stack (TOS) is loaded into the program counter. This is a two-cycle instruction.

[the_ad id="3059"]

Syntax:

[ label ] RETFIE

Operation:

TOS → PC,

1 → GIE or PEIE,

 

Operands:

  • None

Status Affected: GIE, PEIE

Example:

ISR       ;interrupt service routine
BCF INTCON,GIE
BCF INTCON,TMR0IE
...
...
BSF INTCON,GIE 
BSF INTCON,TMR0IE
RETFIE    ;exit interrupt service routine

[the_ad id="3059"]