English
Language : 

PIC18LF24K Datasheet, PDF (116/594 Pages) –
PIC18(L)F26/45/46K40
10.4.5 STATUS REGISTER
The STATUS register, shown in Register 10-2, contains
the arithmetic status of the ALU. As with any other SFR,
it can be the operand for any instruction.
If the STATUS register is the destination for an instruc-
tion that affects the Z, DC, C, OV or N bits, the results
of the instruction are not written; instead, the STATUS
register is updated according to the instruction per-
formed. Therefore, the result of an instruction with the
STATUS register as its destination may be different
than intended. As an example, CLRF STATUS will set
the Z bit and leave the remaining Status bits
unchanged (‘000u u1uu’).
It is recommended that only BCF, BSF, SWAPF, MOVFF
and MOVWF instructions are used to alter the STATUS
register, because these instructions do not affect the Z,
C, DC, OV or N bits in the STATUS register.
For other instructions that do not affect Status bits, see
the instruction set summaries in Section
35.0 “Instruction Set Summary” and Table 35-3.
Note:
The C and DC bits operate as the borrow
and digit borrow bits, respectively, in
subtraction.
 2016 Microchip Technology Inc.
Preliminary
DS40001816C-page 116