Domanda

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!

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top