logoalt Hacker News

Anarch157atoday at 2:39 PM1 replyview on HN

I don't know enough of the 8086 so I don't know if this works the same, but on the Z80 (which means it was probably true for the 8080 too), XOR A would also clear pretty much all bits on the flag register, meaning the flags would be in a known state before doing something that could affect them.


Replies

vanderZwantoday at 2:42 PM

Which I guess is the same reason why modern Intel CPU pipelines can rely on it for pipelining.