Thank you for your answers. But I want to know the reason why flag not affected after execution of CMA instruction. If Accumulator is 00000000, than CMA changes into 11111111.
However, in your case, if content of accumulator are all one's, the complement of A will be all zeros and Z flag should be affected. It is interesting.
Thanks to all for sharing the information. But I want to know that parity flag in of 8085 is set when even number of 1 in accumulator and zero flag is reset when value in accumulator is non zero. If accumulator is 00000000, than parity=0 and z=1.
But after execution of CMA instruction, the content of accumulator is 11111111 which should change parity to 1 and z=0. This is not happen. WHY???
Flags are affected when only arithmatic and logical operations are done in ALU. CMA is neither an arithmatic nor logical operation. It is like if u execute MOV A,0h, will zero flag is affected? The answer is no.
I apologize, but I am not completely agree with your explanation.
Because the following instructions (falls in same category as CMA) are not satisfying the explanation:
CMC, STC, RLC, RRC, RAL, RAR
And yes all the above Including CMA falls in the logical group.
And now answer to Nitin ji:
First of all we generally complement a number not to check whether it becomes zero or not but to perform other tasks like toggling interrupt masks and many other things where the result is always known and the status is not required to be checked from any flag. For that reason as other persons mentioned Intel doesn't provide any flag updation mechanism for this particular instruction.
I will be glad if this helps you understanding the issue.