9.3 STATUS Register
The STATUS
register contains:
- the arithmetic status of the ALU
- the Reset status
The STATUS register can be the destination for any instruction, like any other register.
If the STATUS register is the destination for an instruction that affects the Z, DC or C
bits, then writes to these three bits are disabled. These bits are set or cleared
according to the device logic. Furthermore, the TO and PD bits are not writable. Therefore, the result
of an instruction with the STATUS register as destination may be different than
intended.
For example, CLRF STATUS
will clear bits [4:3] and [1:0] and set the
Z bit. This leaves the STATUS register as ‘000u u1uu
’
(where u = unchanged).
It is recommended, therefore, that only
BCF
, BSF
,
SWAPF
and MOVWF
instructions are used to alter the
STATUS register, because these instructions do not affect any Status bits. For other
instructions not affecting any Status bits, refer to the “Instruction Set
Summary” chapter.Important: The C and DC bits operate as
Borrow and Digit Borrow out
bits, respectively, in subtraction.