4.1.6 Interrupt Return Mode
The retfie
PIC18 instruction can be followed by
“f
” (no comma) to indicate that the shadow registers should be
retrieved and copied to their corresponding registers on execution. Without this modifier,
the registers are not updated from the shadow registers. This syntax is not relevant for
Baseline and Mid-range devices.
The following examples show both forms and the opcodes they generate.
0011 retfie f ;shadow registers copied
0010 retfie ;return without copy
The “0
” and “1
” operands indicated in
the device data sheet can be alternatively used if desired.