Program Status Register
- Also knows as Flag Register
- Address: 0xD0
- Size: 8-bit.
- Bit and Byte addressable.
- Contains 6 flag bits and 2 user definable bits.
- Flag bits indicate some conditions that resulted after an instruction was executed.
Bit | Description |
---|---|
P | Parity flag. Set/Cleared by hardware. This bit will set if Accumulator has odd number of 1’s after an operation. If not, the bit will remain cleared. It is used in serial port routines |
-- | User definable flag |
OV | Overflow flag is set if there was an arithmetic overflow. For signed numbers, results greater than 127 or less than -128 will set OV flag. For unsigned numbers this can be ignored. |
RS0 | Register bank select bit 0 (See below) |
RS1 | Register bank select bit 1 (See below) |
F0 | General purpose flag bit available for user |
AC | Auxiliary Carry Flag is set if carry was generated out of bit 3 in to bit 4 or if the result in the lower nibble is in the range of 0AH to 0FH. It is useful in arithmetic operations on BCD values. |
CY | Carry Flag is set if data is coming out of bit 7 of ACC during an arithmetic operation. It is also the Boolean accumulator. 1 bit register for Boolean instruction |
RS1 | RS0 | Register Bank |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 2 |
1 | 1 | 3 |
Related topics:
8051 Registers | 8051 Program Counter | 8051 R Registers | 8051 SFR | 8051 P Registers | 8051 Stack | 8051 Stack Pointer | 8051 Data Pointer | 8051 PCON Register | 8051 TCON Register | 8051 TMOD Register | 8051 Timer Registers | 8051 SCON Register | 8051 SBUF Register | 8051 IE Register | 8051 IP Register | 8051 A Register | 8051 B Register
List of topics: 8051
No comments:
Post a Comment