Pregunta

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!

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top