2.5 Program Status Register (STATUS)
STATUS register includes:
◆ status of ALU.
◆ Reset status.
◆ Selection bit of Data memory (GPR and SFR)
Just like other registers, STATUS register can be the target register of any other instruction. If an
instruction that affects Z, DC or C bit that use STATUS as target register, then it cannot write on these 3 status
bits. These bits are cleared or set to 1 according to device logic. TO and PD bit also cannot be written. Hence
the instructions which use STATUS as target instruction may not result in what is predicted.
For example, CLRSTATUS will clear higher 3 bits and set the Z bit to 1. Hence the value of STATUS will
be 000u u1uu (u will not change.). Hence, it is recommended to only use CLRB, SETB, SWAPA and SWAPR
instructions to change STATUS register because these will not affect any status bits.
program status register STATUS (03H)
Selection bit of register memory (for indirect addressing)
Bank2 and Bank3 (100h-1FFh);
Bank0 and Bank1 (00h-FFh).
Carry bit;
When carry happens to higher bits or no borrow happens in Lower 4 bits in the result;
When no carry happens to higher bits or borrow happens in Lower 4 bits in the result.
Carry/borrow bit ;
When carry happens at the highest bit or no borrow happens;
When no carry happens at the highest bit or borrow happens