mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 06:35:04 +00:00
Simplify top nibble decision.
This commit is contained in:
parent
139a1a2acc
commit
67cd5dd63b
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user