Question: when zero flag is set?
Answer: The zero flag indicates the result of a 6510 instruction as being numerically zero (0) or non-zero. If an operation results in a value of zero, then the flag is set (1). If an operation results in a non-zero value, then the flag is cleared (0).