Questions tagged [cpu-flag-bits]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
209 views

Does the 6502's TXS and TSX affect flags or not?

Title says it all really. Some documentation claims that the S and Z flags are affected by both TXS and TSX, just as with all other transfer commands. Other documentation suggests that neither TXS nor ...
10
votes
3answers
1k views

Behavior of the zero and negative/sign flags on classic instruction sets

It seems to me that there's effectively two ways that the zero bit could work. Z is set iff the result of a computation is mathematically equal to 0. Z is set iff a bit pattern consisting entirely of ...
18
votes
5answers
3k views

Why does the Z80 have a half-carry bit?

The Z80 apparently had a 4-bit ALU, and computes 8-bit values in two stages. The half-carry bit preserves the carry from bits 3 to 4. Why did the designers of this chip choose to preserve that value ...