This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Status flags during bit-level operations

I can understand that during ANL or ORL operations at bit level, there won't be any change with the status flags of the PSW.

However, if a CPL or CLR or SETB operation is performed on one of the addressable bits of the Accumulator (e.g. SETB 0E3h) and if the result of that operation changes the number of 1's in the accumulator, shouldn't that cause a change in the status of the Parity flag of the PSW?

I'd presume that a similar case could be made for the operation MOV 0E5h,C resulting in a change in the number of 1's of the accumulator?

Parents
  • Any instruction that modifies the ACC will condition the P flag - Note that I said condition, and not change.

    So ANL, ORL, CPL, CLR, SETB, MOV (and any I've not included) that affect the ACC, will condition the P flag.

    Refer to the bible for details.

Reply
  • Any instruction that modifies the ACC will condition the P flag - Note that I said condition, and not change.

    So ANL, ORL, CPL, CLR, SETB, MOV (and any I've not included) that affect the ACC, will condition the P flag.

    Refer to the bible for details.

Children