mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-11 03:25:06 +00:00
Simplify top nibble decision.
This commit is contained in:
@@ -337,7 +337,7 @@ template <Personality personality, typename T, bool uses_ready_line> void Proces
|
|||||||
flags_.negative_result = uint8_t(result);
|
flags_.negative_result = uint8_t(result);
|
||||||
flags_.overflow = (( (result ^ a_) & (result ^ operand_) ) & 0x80) >> 1;
|
flags_.overflow = (( (result ^ a_) & (result ^ operand_) ) & 0x80) >> 1;
|
||||||
|
|
||||||
if(Numeric::carried_out<7>(a_, operand_, result)) {
|
if(flags_.carry) {
|
||||||
result += 0x60;
|
result += 0x60;
|
||||||
} else if (result >= 0xa0) {
|
} else if (result >= 0xa0) {
|
||||||
flags_.carry = 1; // There'll now definitely be carry.
|
flags_.carry = 1; // There'll now definitely be carry.
|
||||||
|
Reference in New Issue
Block a user