Joke Collection Website - Mood Talk - What does the program status word PSW in the single chip microcomputer do? Can you be more specific? Thank you.

What does the program status word PSW in the single chip microcomputer do? Can you be more specific? Thank you.

PSW is an 8-bit flag register, which is used to store the related state after instruction execution.

From high position to low position

7. Carry flag Cy(Carry): used to indicate whether most significant bit A7 (accumulator most significant bit) has carry or borrow during addition and subtraction.

6. Auxiliary carry bit AC (auxiliary carry): used to indicate whether the lower 4 bits (A3) are higher than the upper 4 bits (A4 carry or borrow) during addition and subtraction.

5. User flag bit F0 (flag zero)

4 & amp3. Register selection bits RS 1 and RS0. Users can easily determine the actual physical addresses of working registers R0-R7 by changing the states of RS 1 and RS0.

2. Overflow flag bit OV (overflow):

It can indicate whether overflow occurs during operation, which is automatically formed when the machine executes instructions.

1. Not used

0. Parity flag bit p (parity)