I am referencing zilog z80 manual and i am little puzzled reading at AND instruction. It says in the 'condition bits affected' section, P/V flag is set if the operation overflows. I can understand how add or sub instruction overflows but it doesn't make sense for me that AND operation overflows. Any help is appreciated!! Thanks!
Asked
Active
Viewed 391 times
1 Answers
4
According to this page, the P/V bit serves two purposes. The result for the AND instruction is really the P function, that is, the P bit is set if there are an even number of 1 bits in the result of doing the AND.

Greg Hewgill
- 951,095
- 183
- 1,149
- 1,285
-
I am sorry if i missed it but is it written somewhere that parity P flag is affected during AND operation? Thanks!! – kofhearts Nov 26 '12 at 02:48
-
1Yes, on the linked page, the line that reads `AND r SZ513P00` – Greg Hewgill Nov 26 '12 at 02:51