deeptoaster / opcode-table

A set of extensible tables for displaying details of machine instructions for Z80 and other architectures
7 stars 3 forks source link

XOR a, a Flags #8

Open the-pink-hacker opened 9 months ago

the-pink-hacker commented 9 months ago

The opcode AF also known as instruction xor a, a guarantees that a is 0. The zero flag is labeled as "as defined". This is in fact true, but since the flag will always be set no matter what, shouldn't it say set instead?

Sorry if this is too nit-picky.

dt-anchorzero commented 6 months ago

That's true, and this also applies to a few more instructions (cp a, sub a, etc.).

The reason it reads this way is because xor 𝑟 is generated in common for all seven registers, but I'll take a look and see if we can add it as a special case. Thanks for the suggestion!